commit 83a6224d607c645cadbe371c921928166da0aef0 (HEAD, refs/remotes/origin/master) Author: Paul Eggert Date: Mon Apr 9 13:34:44 2018 -0700 make-dist: check exit statuses more carefully * make-dist: Do a better job checking for subprocess failure. diff --git a/make-dist b/make-dist index d651e18b83..7fd227862b 100755 --- a/make-dist +++ b/make-dist @@ -346,7 +346,7 @@ fi # $update = yes echo "Creating staging directory: '${tempparent}'" -mkdir ${tempparent} +mkdir ${tempparent} || exit tempdir="${tempparent}/${emacsname}" ### This trap ensures that the staging directory will be cleaned up even @@ -356,7 +356,7 @@ if [ "${clean_up}" = yes ]; then fi echo "Creating top directory: '${tempdir}'" -mkdir ${tempdir} +mkdir ${tempdir} || exit if [ "$changelog" = yes ]; then if test -r .git; then @@ -379,10 +379,13 @@ fi ### tar file; this means that people can start reading the INSTALL and ### README while the rest of the tar file is still unpacking. Whoopee. echo "Making links to top-level files" -ln INSTALL README BUGS ${tempdir} -ln ChangeLog.*[0-9] Makefile.in autogen.sh configure configure.ac ${tempdir} -ln config.bat make-dist .dir-locals.el ${tempdir} -ln aclocal.m4 CONTRIBUTE ChangeLog ${tempdir} +top_level=' + INSTALL README BUGS + ChangeLog.*[0-9] Makefile.in autogen.sh configure configure.ac + config.bat make-dist .dir-locals.el + aclocal.m4 CONTRIBUTE ChangeLog +' +ln $top_level $tempdir || exit echo "Creating subdirectories" for subdir in site-lisp \ @@ -412,132 +415,151 @@ do [ "$subdir" = "site-lisp" ] || [ -d "$subdir" ] || \ echo "WARNING: $subdir not found, making anyway" [ "$verbose" = "yes" ] && echo " ${tempdir}/${subdir}" - mkdir ${tempdir}/${subdir} + mkdir ${tempdir}/${subdir} || exit done echo "Making links to 'lisp' and its subdirectories" files=`find lisp \( -name '*.el' -o -name '*.elc' -o -name 'ChangeLog*' \ - -o -name 'README' \)` + -o -name 'README' \)` || exit ### Don't distribute site-init.el, site-load.el, or default.el. for file in lisp/Makefile.in $files; do case $file in */site-init*|*/site-load*|*/default*) continue ;; esac - ln $file $tempdir/$file + ln $file $tempdir/$file || exit done echo "Making links to 'leim' and its subdirectories" -(cd leim - ln ChangeLog.*[0-9] README ../${tempdir}/leim - ln CXTERM-DIC/README CXTERM-DIC/*.tit ../${tempdir}/leim/CXTERM-DIC - ln SKK-DIC/README SKK-DIC/SKK-JISYO.L ../${tempdir}/leim/SKK-DIC - ln MISC-DIC/README MISC-DIC/*.* ../${tempdir}/leim/MISC-DIC - ln Makefile.in ../${tempdir}/leim/Makefile.in - ln leim-ext.el ../${tempdir}/leim/leim-ext.el) +(cd leim && + ln ChangeLog.*[0-9] README ../${tempdir}/leim && + ln CXTERM-DIC/README CXTERM-DIC/*.tit ../${tempdir}/leim/CXTERM-DIC && + ln SKK-DIC/README SKK-DIC/SKK-JISYO.L ../${tempdir}/leim/SKK-DIC && + ln MISC-DIC/README MISC-DIC/*.* ../${tempdir}/leim/MISC-DIC && + ln Makefile.in ../${tempdir}/leim/Makefile.in && + ln leim-ext.el ../${tempdir}/leim/leim-ext.el && +:) || exit ## FIXME Can we not just use the "find -type f" method for this one? echo "Making links to 'build-aux'" -(cd build-aux - ln config.guess config.sub msys-to-w32 ../${tempdir}/build-aux - ln gitlog-to-changelog gitlog-to-emacslog ../${tempdir}/build-aux - ln install-sh move-if-change ../${tempdir}/build-aux - ln update-copyright update-subdirs ../${tempdir}/build-aux - ln dir_top make-info-dir ../${tempdir}/build-aux) +(cd build-aux && + ln config.guess config.sub msys-to-w32 ../${tempdir}/build-aux && + ln gitlog-to-changelog gitlog-to-emacslog ../${tempdir}/build-aux && + ln install-sh move-if-change ../${tempdir}/build-aux && + ln update-copyright update-subdirs ../${tempdir}/build-aux && + ln dir_top make-info-dir ../${tempdir}/build-aux && +:) || exit echo "Making links to 'src'" ### Don't distribute the configured versions of ### config.in, paths.in, buildobj.h, or Makefile.in. -(cd src - echo " (It is ok if ln fails in some cases.)" - ln [a-zA-Z]*.[chm] ../${tempdir}/src - ln [a-zA-Z]*.in ../${tempdir}/src - ln deps.mk ../${tempdir}/src - ln README ChangeLog.*[0-9] ../${tempdir}/src - ln .gdbinit .dbxinit ../${tempdir}/src - cd ../${tempdir}/src - rm -f globals.h config.h epaths.h Makefile buildobj.h) +(cd src && + ln [a-zA-Z]*.[chm] ../${tempdir}/src && + ln [a-zA-Z]*.in ../${tempdir}/src && + ln deps.mk ../${tempdir}/src && + ln README ChangeLog.*[0-9] ../${tempdir}/src && + ln .gdbinit .dbxinit ../${tempdir}/src && + cd ../${tempdir}/src && + rm -f globals.h config.h epaths.h Makefile buildobj.h && +:) || exit echo "Making links to 'src/bitmaps'" -(cd src/bitmaps - ln README *.xbm ../../${tempdir}/src/bitmaps) +(cd src/bitmaps && + ln README *.xbm ../../${tempdir}/src/bitmaps && +:) || exit echo "Making links to 'lib'" -(cd lib - ln [a-zA-Z_]*.[ch] ../${tempdir}/lib - ln gnulib.mk.in Makefile.in ../${tempdir}/lib - cd ../${tempdir}/lib - script='/[*]/d; s/\.in\.h$/.h/' - rm -f `ls *.in.h | sed "$script"`) +(cd lib && + ln [a-zA-Z_]*.[ch] ../${tempdir}/lib && + ln gnulib.mk.in Makefile.in ../${tempdir}/lib && + cd ../${tempdir}/lib && + script='/[*]/d; s/\.in\.h$/.h/' && + rm -f `ls *.in.h | sed "$script"` && +:) || exit echo "Making links to 'lib-src'" -(cd lib-src - ln [a-zA-Z]*.[ch] ../${tempdir}/lib-src - ln ChangeLog.*[0-9] Makefile.in README ../${tempdir}/lib-src - ln rcs2log ../${tempdir}/lib-src) +(cd lib-src && + ln [a-zA-Z]*.[ch] ../${tempdir}/lib-src && + ln ChangeLog.*[0-9] Makefile.in README ../${tempdir}/lib-src && + ln rcs2log ../${tempdir}/lib-src && +:) || exit echo "Making links to 'm4'" -(cd m4 - ln *.m4 ../${tempdir}/m4) +(cd m4 && + ln *.m4 ../${tempdir}/m4 && +:) || exit echo "Making links to 'modules'" -(cd modules - ln *.py ../${tempdir}/modules -) +(cd modules && + ln *.py ../${tempdir}/modules && +:) || exit echo "Making links to 'nt'" -(cd nt - ln emacs-x86.manifest emacs-x64.manifest ../${tempdir}/nt - ln [a-z]*.bat [a-z]*.[ch] ../${tempdir}/nt - ln *.in gnulib-cfg.mk ../${tempdir}/nt - ln mingw-cfg.site epaths.nt INSTALL.W64 ../${tempdir}/nt - ln ChangeLog.*[0-9] INSTALL README README.W32 ../${tempdir}/nt) +(cd nt && + ln emacs-x86.manifest emacs-x64.manifest ../${tempdir}/nt && + ln [a-z]*.bat [a-z]*.[ch] ../${tempdir}/nt && + ln *.in gnulib-cfg.mk ../${tempdir}/nt && + ln mingw-cfg.site epaths.nt INSTALL.W64 ../${tempdir}/nt && + ln ChangeLog.*[0-9] INSTALL README README.W32 ../${tempdir}/nt && +:) || exit echo "Making links to 'nt/inc' and its subdirectories" for f in `find nt/inc -type f -name '[a-z]*.h'`; do - ln $f $tempdir/$f + ln $f $tempdir/$f || exit done echo "Making links to 'nt/icons'" -(cd nt/icons - ln README [a-z]*.ico ../../${tempdir}/nt/icons - ln [a-z]*.cur ../../${tempdir}/nt/icons) +(cd nt/icons && + ln README [a-z]*.ico ../../${tempdir}/nt/icons && + ln [a-z]*.cur ../../${tempdir}/nt/icons && +:) || exit echo "Making links to 'msdos'" -(cd msdos - ln ChangeLog.*[0-9] INSTALL README emacs.ico emacs.pif ../${tempdir}/msdos - ln depfiles.bat inttypes.h ../${tempdir}/msdos - ln mainmake.v2 sed*.inp ../${tempdir}/msdos) +(cd msdos && + ln ChangeLog.*[0-9] INSTALL README emacs.ico emacs.pif ../${tempdir}/msdos && + ln depfiles.bat inttypes.h ../${tempdir}/msdos && + ln mainmake.v2 sed*.inp ../${tempdir}/msdos && +:) || exit echo "Making links to 'nextstep'" -(cd nextstep - ln ChangeLog.*[0-9] README INSTALL Makefile.in ../${tempdir}/nextstep) +(cd nextstep && + ln ChangeLog.*[0-9] README INSTALL Makefile.in ../${tempdir}/nextstep && +:) || exit echo "Making links to 'nextstep/templates'" -(cd nextstep/templates - ln Emacs.desktop.in Info-gnustep.plist.in Info.plist.in InfoPlist.strings.in ../../${tempdir}/nextstep/templates) +(cd nextstep/templates && + ln Emacs.desktop.in Info-gnustep.plist.in Info.plist.in InfoPlist.strings.in \ + ../../${tempdir}/nextstep/templates && +:) || exit echo "Making links to 'nextstep/Cocoa/Emacs.base/Contents'" -(cd nextstep/Cocoa/Emacs.base/Contents - ln PkgInfo ../../../../${tempdir}/nextstep/Cocoa/Emacs.base/Contents) +(cd nextstep/Cocoa/Emacs.base/Contents && + ln PkgInfo ../../../../${tempdir}/nextstep/Cocoa/Emacs.base/Contents && +:) || exit echo "Making links to 'nextstep/Cocoa/Emacs.base/Contents/Resources'" -(cd nextstep/Cocoa/Emacs.base/Contents/Resources - ln Credits.html *.icns ../../../../../${tempdir}/nextstep/Cocoa/Emacs.base/Contents/Resources) +(cd nextstep/Cocoa/Emacs.base/Contents/Resources && + ln Credits.html *.icns \ + ../../../../../${tempdir}/nextstep/Cocoa/Emacs.base/Contents/Resources && +:) || exit echo "Making links to 'nextstep/GNUstep/Emacs.base/Resources'" -(cd nextstep/GNUstep/Emacs.base/Resources - ln README emacs.tiff ../../../../${tempdir}/nextstep/GNUstep/Emacs.base/Resources ) +(cd nextstep/GNUstep/Emacs.base/Resources && + ln README emacs.tiff \ + ../../../../${tempdir}/nextstep/GNUstep/Emacs.base/Resources && +:) || exit echo "Making links to 'oldXMenu'" -(cd oldXMenu - ln *.[ch] *.in *.mk ../${tempdir}/oldXMenu - ln README ChangeLog.*[0-9] ../${tempdir}/oldXMenu) +(cd oldXMenu && + ln *.[ch] *.in *.mk ../${tempdir}/oldXMenu && + ln README ChangeLog.*[0-9] ../${tempdir}/oldXMenu && +:) || exit echo "Making links to 'lwlib'" -(cd lwlib - ln *.[ch] *.in *.mk ../${tempdir}/lwlib - ln README ChangeLog.*[0-9] ../${tempdir}/lwlib) +(cd lwlib && + ln *.[ch] *.in *.mk ../${tempdir}/lwlib && + ln README ChangeLog.*[0-9] ../${tempdir}/lwlib && +:) || exit ## It is important to distribute admin/ because it contains sources ## for generated lisp/international/uni-*.el files. @@ -546,7 +568,7 @@ for f in `find admin -type f`; do case $f in */Makefile) [ -f $f.in ] && continue ;; esac - ln $f $tempdir/$f + ln $f $tempdir/$f || exit done if [ "$with_tests" = "yes" ]; then @@ -557,7 +579,7 @@ if [ "$with_tests" = "yes" ]; then case $f in */Makefile) [ -f $f.in ] && continue ;; esac - ln $f $tempdir/$f + ln $f $tempdir/$f || exit done fi @@ -569,45 +591,50 @@ for f in `find etc -type f`; do etc/refcards/*.aux|etc/refcards/*.dvi|etc/refcards/*.log|etc/refcards/*.ps) continue ;; esac - ln $f $tempdir/$f + ln $f $tempdir/$f || exit done echo "Making links to 'info'" -ln `find info -type f -print` ${tempdir}/info +ln `find info -type f -print` ${tempdir}/info || exit echo "Making links to 'doc/emacs'" -(cd doc/emacs - ln *.texi *.in ChangeLog.*[0-9] ../../${tempdir}/doc/emacs) +(cd doc/emacs && + ln *.texi *.in ChangeLog.*[0-9] ../../${tempdir}/doc/emacs && +:) || exit echo "Making links to 'doc/misc'" -(cd doc/misc +(cd doc/misc && ln *.texi *.tex *.in gnus-news.el ChangeLog.*[0-9] \ - ../../${tempdir}/doc/misc) + ../../${tempdir}/doc/misc && +:) || exit echo "Making links to 'doc/lispref'" -(cd doc/lispref - ln *.texi *.in README ChangeLog.*[0-9] ../../${tempdir}/doc/lispref - ln spellfile ../../${tempdir}/doc/lispref - ln two-volume.make two-volume-cross-refs.txt ../../${tempdir}/doc/lispref) +(cd doc/lispref && + ln *.texi *.in README ChangeLog.*[0-9] ../../${tempdir}/doc/lispref && + ln spellfile ../../${tempdir}/doc/lispref && + ln two-volume.make two-volume-cross-refs.txt ../../${tempdir}/doc/lispref && +:) || exit echo "Making links to 'doc/lispintro'" -(cd doc/lispintro - ln *.texi *.in *.eps *.pdf ../../${tempdir}/doc/lispintro - ln README ChangeLog.*[0-9] ../../${tempdir}/doc/lispintro - cd ../../${tempdir}/doc/lispintro) +(cd doc/lispintro && + ln *.texi *.in *.eps *.pdf ../../${tempdir}/doc/lispintro && + ln README ChangeLog.*[0-9] ../../${tempdir}/doc/lispintro && + cd ../../${tempdir}/doc/lispintro && +:) || exit echo "Making links to 'doc/man'" -(cd doc/man - ln *.*[0-9] *.in ../../${tempdir}/doc/man - cd ../../${tempdir}/doc/man - rm -f emacs.1) +(cd doc/man && + ln *.*[0-9] *.in ../../${tempdir}/doc/man && + cd ../../${tempdir}/doc/man && + rm -f emacs.1 && +:) || exit ### It would be nice if they could all be symlinks to top-level copy, but ### you're not supposed to have any symlinks in distribution tar files. echo "Making sure copying notices are all copies of 'COPYING'" for subdir in . etc leim lib lib-src lisp lwlib msdos nt src; do - rm -f ${tempdir}/${subdir}/COPYING - cp COPYING ${tempdir}/${subdir} + rm -f ${tempdir}/${subdir}/COPYING || exit + cp COPYING ${tempdir}/${subdir} || exit done if [ "${newer}" ]; then @@ -615,12 +642,13 @@ if [ "${newer}" ]; then ## We remove .elc files unconditionally, on the theory that anyone picking ## up an incremental distribution already has a running Emacs to byte-compile ## them with. - find ${tempparent} \( -name '*.elc' -o ! -newer ${newer} \) -exec rm -f {} \; + find ${tempparent} \( -name '*.elc' -o ! -newer ${newer} \) \ + -exec rm -f {} \; || exit fi ## Don't distribute backups, autosaves, etc. echo "Removing unwanted files" -find ${tempparent} \( -name '*~' -o -name '#*#' -o -name '.*ignore' -o -name '=*' -o -name 'TAGS' \) -exec rm -f {} \; +find ${tempparent} \( -name '*~' -o -name '#*#' -o -name '.*ignore' -o -name '=*' -o -name 'TAGS' \) -exec rm -f {} \; || exit if [ "${make_tar}" = yes ]; then echo "Looking for $default_gzip" @@ -648,13 +676,23 @@ if [ "${make_tar}" = yes ]; then taropt="$taropt --sort=name" [ "$verbose" = "yes" ] && taropt="$taropt --verbose" - (cd ${tempparent} ; tar $taropt -cf - ${emacsname} ) \ - | ${default_gzip} \ - > ${emacsname}.tar${gzip_extension} + (cd $tempparent && + case $default_gzip in + cat) tar $taropt -cf - $emacsname;; + *) if tar $taropt -cf /dev/null --use-compress-program="$default_gzip" \ + $emacsname/src/lisp.h + then + tar $taropt -cf - --use-compress-program="$default_gzip" $emacsname + else + tar $taropt -cf $emacsname.tar $emacsname && + $default_gzip <$emacsname.tar + fi;; + esac + ) >$emacsname.tar$gzip_extension || exit fi if [ "${clean_up}" != yes ]; then - (cd ${tempparent}; mv ${emacsname} ..) + (cd ${tempparent} && mv ${emacsname} ..) && rm -rf ${tempparent} fi commit 32dc0cb1b5ae895d237c7118ccaeb084715934fd Author: Tino Calancha Date: Mon Apr 9 11:47:47 2018 +0900 Preserve case in query-replace undo If the user query and replaces 'foo' with 'BAR', then undo must comeback to 'foo', not to 'FOO' (Bug#31073). * lisp/replace.el (perform-replace): Bind nocasify to non-nil value during undo/undo-all actions. * test/lisp/replace-tests.el (query-replace-undo-bug31073): Add test. diff --git a/lisp/replace.el b/lisp/replace.el index c28c9b36f0..4916cb138e 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -2619,6 +2619,7 @@ It must return a string." (let ((stack-idx 0) (stack-len (length stack)) (num-replacements 0) + (nocasify t) ; Undo must preserve case (Bug#31073). search-string next-replacement) (while (and (< stack-idx stack-len) diff --git a/test/lisp/replace-tests.el b/test/lisp/replace-tests.el index 66c6842660..40a1a31cf7 100644 --- a/test/lisp/replace-tests.el +++ b/test/lisp/replace-tests.el @@ -380,4 +380,24 @@ Each element has the format: (should (string= "211" (replace-tests--query-replace-undo))) (should (string= "211" (replace-tests--query-replace-undo 'comma)))) +(ert-deftest query-replace-undo-bug31073 () + "Test for https://debbugs.gnu.org/31073 ." + (let ((text "aaa aaa") + (count 0)) + (with-temp-buffer + (insert text) + (goto-char 1) + (cl-letf (((symbol-function 'read-event) + (lambda (&rest args) + (cl-incf count) + (let ((val (pcase count + ((or 1 2 3) ?\s) ; replace current and go next + (4 ?U) ; undo-all + (_ ?q)))) ; exit + val)))) + (perform-replace "a" "B" t nil nil)) + ;; After undo text must be the same. + (should (string= text (buffer-string)))))) + + ;;; replace-tests.el ends here commit 24f7defaf79e5afc38f40de01c78a4a7ed51dbd4 Author: Michael Albinus Date: Sun Apr 8 19:22:45 2018 +0200 * lisp/auth-source.el (auth-source-secrets-search): Fix docstring. diff --git a/lisp/auth-source.el b/lisp/auth-source.el index 3923af1027..56122d1d1a 100644 --- a/lisp/auth-source.el +++ b/lisp/auth-source.el @@ -1497,13 +1497,13 @@ Here's an example that looks for the first item in the `Login' Secrets collection: (let ((auth-sources \\='(\"secrets:Login\"))) - (auth-source-search :max 1) + (auth-source-search :max 1)) Here's another that looks for the first item in the `Login' Secrets collection whose label contains `gnus': (let ((auth-sources \\='(\"secrets:Login\"))) - (auth-source-search :max 1 :label \"gnus\") + (auth-source-search :max 1 :label \"gnus\")) And this one looks for the first item in the `Login' Secrets collection that's a Google Chrome entry for the git.gnus.org site commit 5fb34352f6050ba225d14f2a51a6b99739826b1b Author: nitishch Date: Sat Apr 7 08:45:03 2018 +0530 Fix python-shell-send-defun at start of buffer (Bug#30822) * lisp/progmodes/python.el (python-shell-send-defun): Handle the case when we hit the beginning of buffer. Copyright-paperwork-exempt: yes diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index afafd1b42c..adf7b33ccb 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -3163,9 +3163,12 @@ t when called interactively." (beginning-of-line 1)) (> (current-indentation) 0))) (when (not arg) - (while (and (forward-line -1) - (looking-at (python-rx decorator)))) - (forward-line 1)) + (while (and + (eq (forward-line -1) 0) + (if (looking-at (python-rx decorator)) + t + (forward-line 1) + nil)))) (point-marker)) (progn (or (python-nav-end-of-defun) commit 8df23a82042fa7dbaaa4377bc376d705595b073f Author: Philipp Stephani Date: Wed Apr 4 12:14:56 2018 +0200 Document that 'make-process' mixes the output streams * doc/lispref/processes.texi (Asynchronous Processes): * src/process.c (Fmake_process): Document that standard error is mixed with standard output if STDERR is nil. * test/src/process-tests.el (make-process/mix-stderr): New unit test. diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi index af177e053c..3e26f57798 100644 --- a/doc/lispref/processes.texi +++ b/doc/lispref/processes.texi @@ -681,7 +681,9 @@ a default sentinel will be used, which can be overridden later. @item :stderr @var{stderr} Associate @var{stderr} with the standard error of the process. A non-@code{nil} value should be either a buffer or a pipe process -created with @code{make-pipe-process}, described below. +created with @code{make-pipe-process}, described below. If +@var{stderr} is @code{nil}, standard error is mixed with standard +output, and both are sent to @var{buffer} or @var{filter}. @end table The original argument list, modified with the actual connection diff --git a/src/process.c b/src/process.c index ed2cab7b51..c357a8bdc3 100644 --- a/src/process.c +++ b/src/process.c @@ -1657,7 +1657,8 @@ to use a pty, or nil to use the default specified through :stderr STDERR -- STDERR is either a buffer or a pipe process attached to the standard error of subprocess. Specifying this implies -`:connection-type' is set to `pipe'. +`:connection-type' is set to `pipe'. If STDERR is nil, standard error +is mixed with standard output and sent to BUFFER or FILTER. usage: (make-process &rest ARGS) */) (ptrdiff_t nargs, Lisp_Object *args) diff --git a/test/src/process-tests.el b/test/src/process-tests.el index 7d35560229..849676ea8f 100644 --- a/test/src/process-tests.el +++ b/test/src/process-tests.el @@ -181,5 +181,23 @@ (should-not (process-query-on-exit-flag process)))) (kill-process process))))) +(ert-deftest make-process/mix-stderr () + "Check that ‘make-process’ mixes the output streams if STDERR is nil." + (skip-unless (executable-find shell-file-name)) + (with-temp-buffer + (let ((process (make-process + :name "mix-stderr" + :command (list shell-file-name shell-command-switch + "echo stdout && echo stderr >&2") + :buffer (current-buffer) + :sentinel #'ignore + :noquery t + :connection-type 'pipe))) + (while (process-live-p process) + (accept-process-output process)) + (should (eq (process-status process) 'exit)) + (should (eq (process-exit-status process) 0)) + (should (equal (buffer-string) "stdout\nstderr\n"))))) + (provide 'process-tests) ;; process-tests.el ends here. commit 55525480780d34b2f968739249685d0c9e9a063f Author: Stefan Monnier Date: Sat Apr 7 11:21:52 2018 -0400 * lisp/simple.el (undo-auto--undoable-change): Avoid leak diff --git a/lisp/simple.el b/lisp/simple.el index aad8d3b06c..3d50e38b59 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -2969,7 +2969,7 @@ that calls `undo-auto-amalgamate'." (defun undo-auto--ensure-boundary (cause) "Add an `undo-boundary' to the current buffer if needed. REASON describes the reason that the boundary is being added; see -`undo-auto--last-boundary' for more information." +`undo-auto--last-boundary-cause' for more information." (when (and (undo-auto--needs-boundary-p)) (let ((last-amalgamating @@ -3018,10 +3018,10 @@ default values.") "Add an `undo-boundary' in appropriate buffers." (undo-auto--boundaries (let ((amal undo-auto--this-command-amalgamating)) - (setq undo-auto--this-command-amalgamating nil) - (if amal - 'amalgamate - 'command)))) + (setq undo-auto--this-command-amalgamating nil) + (if amal + 'amalgamate + 'command)))) (defun undo-auto-amalgamate () "Amalgamate undo if necessary. @@ -3034,30 +3034,38 @@ behavior." (let ((last-amalgamating-count (undo-auto--last-boundary-amalgamating-number))) (setq undo-auto--this-command-amalgamating t) - (when - last-amalgamating-count - (if - (and - (< last-amalgamating-count 20) - (eq this-command last-command)) + (when last-amalgamating-count + (if (and (< last-amalgamating-count 20) + (eq this-command last-command)) ;; Amalgamate all buffers that have changed. + ;; This may be needed for example if some *-change-functions + ;; reflected these changes in some other buffer. (dolist (b (cdr undo-auto--last-boundary-cause)) (when (buffer-live-p b) (with-current-buffer b - (when - ;; The head of `buffer-undo-list' is nil. - ;; `car-safe' doesn't work because - ;; `buffer-undo-list' need not be a list! - (and (listp buffer-undo-list) - (not (car buffer-undo-list))) + (when (and (consp buffer-undo-list) + ;; `car-safe' doesn't work because + ;; `buffer-undo-list' need not be a list! + (null (car buffer-undo-list))) + ;; The head of `buffer-undo-list' is nil. (setq buffer-undo-list (cdr buffer-undo-list)))))) (setq undo-auto--last-boundary-cause 0))))) (defun undo-auto--undoable-change () "Called after every undoable buffer change." - (add-to-list 'undo-auto--undoably-changed-buffers (current-buffer)) + (unless (memq (current-buffer) undo-auto--undoably-changed-buffers) + (let ((bufs undo-auto--undoably-changed-buffers)) + ;; Drop dead buffers from the list, to avoid memory leak in + ;; (while t (with-temp-buffer (setq buffer-undo-list nil) (insert "a"))) + (while bufs + (let ((next (cdr bufs))) + (if (or (buffer-live-p (car bufs)) (null next)) + (setq bufs next) + (setcar bufs (car next)) + (setcdr bufs (cdr next)))))) + (push (current-buffer) undo-auto--undoably-changed-buffers)) (undo-auto--boundary-ensure-timer)) ;; End auto-boundary section commit a4291bf287af6ee5a2cf031f8b442674342714df Author: Marco Wahl Date: Wed Mar 28 11:04:08 2018 +0200 Fix goto page from page directory (Bug#28909) * lisp/textmodes/page-ext.el (pages-directory-goto): Use the interactive spec as in `occur-mode-goto-occurrence'. diff --git a/lisp/textmodes/page-ext.el b/lisp/textmodes/page-ext.el index 8a41bc3742..fbdae5892a 100644 --- a/lisp/textmodes/page-ext.el +++ b/lisp/textmodes/page-ext.el @@ -699,7 +699,7 @@ to the same line in the pages buffer." (defun pages-directory-goto (&optional event) "Go to the corresponding line in the pages buffer." ;; This function is mostly a copy of `occur-mode-goto-occurrence' - (interactive "@e") + (interactive (list last-nonmenu-event)) (if event (mouse-set-point event)) (if (or (not pages-buffer) (not (buffer-name pages-buffer))) commit 8d3bb7beb4bfab60ba31505728f8f945116d7a40 Author: Michal Nazarewicz Date: Sat Mar 31 14:16:54 2018 +0100 Handle quotation marks and apostrophes in ‘sgml-quote’ To be able to use text in an HTML argument, quotation marks need to be replaced with an appropriate character reference. Make ‘sgml-quote’ do that. While at it, fix entiteis not being unquoted if they lack closing semicolon (e.g. ‘&’) occuring at the very end of a region. Even though unlikely, make ‘sgml-quote’ handle this scenario. * lisp/textmodes/sgml-mode.el (sgml-quote): Handle quotation marks and apostrophes. Match entities lacking semicolon at the end of regions. * test/lisp/textmodes/sgml-mode-tests.el (sgml-quote-works): New test case for ‘sgml-quote’ function. diff --git a/etc/NEWS b/etc/NEWS index 02b31ecff4..ac60a36584 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -208,6 +208,13 @@ Can be controlled via the new variable 'footnote-align-to-fn-text'. formats (e.g. "black" => "#000000" => "rgb(0, 0, 0)") has been added, bound to 'C-c C-f'. +** SGML mode + +--- +*** 'sgml-quote' now handles double quotes and apostrophes +when escaping text and in addition all numeric entities when +unescaping text. + ** Dired +++ diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el index f6bdfc6384..52d14bd800 100644 --- a/lisp/textmodes/sgml-mode.el +++ b/lisp/textmodes/sgml-mode.el @@ -1241,8 +1241,11 @@ See `sgml-tag-alist' for info about attribute rules." (defun sgml-quote (start end &optional unquotep) "Quote SGML text in region START ... END. -Only &, < and > are quoted, the rest is left untouched. -With prefix argument UNQUOTEP, unquote the region." +Only &, <, >, ' and \" characters are quoted, the rest is left +untouched. This is sufficient to use quoted text as SGML argument. + +With prefix argument UNQUOTEP, unquote the region. All numeric entities, +\"amp\", \"lt\", \"gt\" and \"quot\" named entities are unquoted." (interactive "r\nP") (save-restriction (narrow-to-region start end) @@ -1250,14 +1253,23 @@ With prefix argument UNQUOTEP, unquote the region." (if unquotep ;; FIXME: We should unquote other named character references as well. (while (re-search-forward - "\\(&\\(amp\\|\\(l\\|\\(g\\)\\)t\\)\\)[][<>&;\n\t \"%!'(),/=?]" + "\\(&\\(amp\\|quot\\|lt\\|gt\\|#\\([0-9]+\\|[xX][0-9a-fA-F]+\\)\\)\\)\\([][<>&;\n\t \"%!'(),/=?]\\|$\\)" nil t) - (replace-match (if (match-end 4) ">" (if (match-end 3) "<" "&")) t t - nil (if (eq (char-before (match-end 0)) ?\;) 0 1))) - (while (re-search-forward "[&<>]" nil t) + (replace-match + (string + (or (cdr (assq (char-after (match-beginning 2)) + '((?a . ?&) (?q . ?\") (?l . ?<) (?g . ?>)))) + (let ((num (match-string 3))) + (if (or (eq ?x (aref num 0)) (eq ?X (aref num 0))) + (string-to-number (substring num 1) 16) + (string-to-number num 10))))) + t t nil (if (eq (char-before (match-end 0)) ?\;) 0 1))) + (while (re-search-forward "[&<>\"']" nil t) (replace-match (cdr (assq (char-before) '((?& . "&") (?< . "<") - (?> . ">")))) + (?> . ">") + (?\" . """) + (?' . "'")))) t t))))) (defun sgml-pretty-print (beg end) diff --git a/test/lisp/textmodes/sgml-mode-tests.el b/test/lisp/textmodes/sgml-mode-tests.el index 7ca6e676c6..6c0070ccb1 100644 --- a/test/lisp/textmodes/sgml-mode-tests.el +++ b/test/lisp/textmodes/sgml-mode-tests.el @@ -131,5 +131,35 @@ The point is set to the beginning of the buffer." (sgml-delete-tag 1) (should (string= "Winter is comin'" (buffer-string))))) +(ert-deftest sgml-quote-works () + (let ((text "Foo \"Baz\" 'Qux'\n")) + (with-temp-buffer + ;; Back and forth transformation. + (insert text) + (sgml-quote (point-min) (point-max)) + (should (string= "Foo<Bar> "Baz" 'Qux'\n" + (buffer-string))) + (sgml-quote (point-min) (point-max) t) + (should (string= text (buffer-string))) + + ;; The same text escaped differently. + (erase-buffer) + (insert "Foo<Bar> "Baz" 'Qux'\n") + (sgml-quote (point-min) (point-max) t) + (should (string= text (buffer-string))) + + ;; Lack of semicolon. + (erase-buffer) + (insert "&&") + (sgml-quote (point-min) (point-max) t) + (should (string= "&&" (buffer-string))) + + ;; Double quoting + (sgml-quote (point-min) (point-max)) + (sgml-quote (point-min) (point-max)) + (sgml-quote (point-min) (point-max) t) + (sgml-quote (point-min) (point-max) t) + (should (string= "&&" (buffer-string)))))) + (provide 'sgml-mode-tests) ;;; sgml-mode-tests.el ends here commit 358da4565b589570759ddc9c2d1043405fdbb26e Author: Michael Albinus Date: Fri Apr 6 11:49:21 2018 +0200 Make dbus.el fitter for Emacs configured --without-dbus * lisp/net/dbus.el (dbus-error, dbus-debug): Define if not exist. * test/lisp/net/secrets-tests.el: Revert 51c8369fa2 and 79a3ad9592. diff --git a/lisp/net/dbus.el b/lisp/net/dbus.el index f63ab9a15a..2d9660d127 100644 --- a/lisp/net/dbus.el +++ b/lisp/net/dbus.el @@ -41,9 +41,16 @@ (defvar dbus-message-type-method-return) (defvar dbus-message-type-error) (defvar dbus-message-type-signal) -(defvar dbus-debug) (defvar dbus-registered-objects-table) +;; The following symbols are defined in dbusbind.c. We need them also +;; when Emacs is compiled without D-Bus support. +(unless (boundp 'dbus-error) + (define-error 'dbus-error "D-Bus error")) + +(unless (boundp 'dbus-debug) + (defvar dbus-debug nil)) + ;; Pacify byte compiler. (eval-when-compile (require 'cl-lib)) diff --git a/test/lisp/net/secrets-tests.el b/test/lisp/net/secrets-tests.el index d0c0d6fe24..dc9c7f1004 100644 --- a/test/lisp/net/secrets-tests.el +++ b/test/lisp/net/secrets-tests.el @@ -20,7 +20,7 @@ ;;; Code: (require 'ert) -(when (featurep 'dbusbind) (require 'secrets)) +(require 'secrets) (require 'notifications) ;; We do not want chatty messages. @@ -28,7 +28,6 @@ (ert-deftest secrets-test00-availability () "Test availability of Secret Service API." - (skip-unless (featurep 'dbusbind)) :expected-result (if secrets-enabled :passed :failed) (should secrets-enabled) (should (dbus-ping :session secrets-service)) @@ -59,7 +58,6 @@ (ert-deftest secrets-test01-sessions () "Test opening / closing a secrets session." - (skip-unless (featurep 'dbusbind)) (skip-unless secrets-enabled) (skip-unless (secrets-empty-path secrets-session-path)) @@ -85,7 +83,6 @@ (ert-deftest secrets-test02-collections () "Test creation / deletion a secrets collections." - (skip-unless (featurep 'dbusbind)) (skip-unless secrets-enabled) (skip-unless (secrets-empty-path secrets-session-path)) @@ -147,7 +144,6 @@ (ert-deftest secrets-test03-items () "Test creation / deletion a secret item." - (skip-unless (featurep 'dbusbind)) (skip-unless secrets-enabled) (skip-unless (secrets-empty-path secrets-session-path)) @@ -189,7 +185,6 @@ (ert-deftest secrets-test04-search () "Test searching of secret items." - (skip-unless (featurep 'dbusbind)) (skip-unless secrets-enabled) (skip-unless (secrets-empty-path secrets-session-path)) commit 10ef466a9eb621a3752de69930fcb14bf1af4887 Author: Paul Eggert Date: Thu Apr 5 21:38:49 2018 -0700 ; Spelling fix diff --git a/admin/make-tarball.txt b/admin/make-tarball.txt index 9b9c96425a..62aa31bad8 100644 --- a/admin/make-tarball.txt +++ b/admin/make-tarball.txt @@ -240,7 +240,7 @@ Update the refcards/pdf/ and ps/ directories, and also refcards/emacs-refcards.tar.gz (use make -C etc/refcards pdf ps dist). FIXME: The above instructions are not quite complete, as they do not -specify the manual procuedure used to copy the generated files in the +specify the manual procedure used to copy the generated files in the 'manual' directory to the corresponding web files, and to cvs remove and add files as needed. Also, they are missing some files, e.g., they generate manual/html_mono/ada-mode.html but do not generate the commit 79a3ad95923b81e9a12115a6815ab92545233090 Author: Tino Calancha Date: Fri Apr 6 10:05:43 2018 +0900 Require secrets.el iif Emacs has dbusbind support * test/lisp/net/secrets-tests.el: Require secrets.el if and only if, Emacs has been compiled with dbusbind support. diff --git a/test/lisp/net/secrets-tests.el b/test/lisp/net/secrets-tests.el index 352a7c362d..d0c0d6fe24 100644 --- a/test/lisp/net/secrets-tests.el +++ b/test/lisp/net/secrets-tests.el @@ -20,7 +20,7 @@ ;;; Code: (require 'ert) -(require 'secrets) +(when (featurep 'dbusbind) (require 'secrets)) (require 'notifications) ;; We do not want chatty messages. commit 51c8369fa2b7dac9e609431ddbc86765ad1ea9b4 Author: Tino Calancha Date: Fri Apr 6 08:55:39 2018 +0900 Run secrets suite test when Emacs has dbus support * test/lisp/net/secrets-tests.el (secrets-test00-availability) (secrets-test01-sessions, secrets-test02-collections) (secrets-test03-items, secrets-test04-search): Skip test unless Emacs is compiled with dbus support. diff --git a/test/lisp/net/secrets-tests.el b/test/lisp/net/secrets-tests.el index dc9c7f1004..352a7c362d 100644 --- a/test/lisp/net/secrets-tests.el +++ b/test/lisp/net/secrets-tests.el @@ -28,6 +28,7 @@ (ert-deftest secrets-test00-availability () "Test availability of Secret Service API." + (skip-unless (featurep 'dbusbind)) :expected-result (if secrets-enabled :passed :failed) (should secrets-enabled) (should (dbus-ping :session secrets-service)) @@ -58,6 +59,7 @@ (ert-deftest secrets-test01-sessions () "Test opening / closing a secrets session." + (skip-unless (featurep 'dbusbind)) (skip-unless secrets-enabled) (skip-unless (secrets-empty-path secrets-session-path)) @@ -83,6 +85,7 @@ (ert-deftest secrets-test02-collections () "Test creation / deletion a secrets collections." + (skip-unless (featurep 'dbusbind)) (skip-unless secrets-enabled) (skip-unless (secrets-empty-path secrets-session-path)) @@ -144,6 +147,7 @@ (ert-deftest secrets-test03-items () "Test creation / deletion a secret item." + (skip-unless (featurep 'dbusbind)) (skip-unless secrets-enabled) (skip-unless (secrets-empty-path secrets-session-path)) @@ -185,6 +189,7 @@ (ert-deftest secrets-test04-search () "Test searching of secret items." + (skip-unless (featurep 'dbusbind)) (skip-unless secrets-enabled) (skip-unless (secrets-empty-path secrets-session-path)) commit b6aea79b008c7fcb9aea60a33709f94a734532f8 Author: Michael Albinus Date: Thu Apr 5 17:40:57 2018 +0200 Add tests for secrets.el * lisp/net/secrets.el (secrets-lock-collection): New defun. (secrets-search-items, secrets-create-item): Fix structure of :dict-entry. * test/lisp/net/secrets-tests.el: New package. diff --git a/lisp/net/secrets.el b/lisp/net/secrets.el index fbb0a74978..e5ab5b31ab 100644 --- a/lisp/net/secrets.el +++ b/lisp/net/secrets.el @@ -539,6 +539,18 @@ For the time being, only the alias \"default\" is supported." secrets-interface-service "SetAlias" alias :object-path secrets-empty-path)) +(defun secrets-lock-collection (collection) + "Lock collection labeled COLLECTION. +If successful, return the object path of the collection." + (let ((collection-path (secrets-collection-path collection))) + (unless (secrets-empty-path collection-path) + (secrets-prompt + (cadr + (dbus-call-method + :session secrets-service secrets-path secrets-interface-service + "Lock" `(:array :object-path ,collection-path))))) + collection-path)) + (defun secrets-unlock-collection (collection) "Unlock collection labeled COLLECTION. If successful, return the object path of the collection." @@ -612,9 +624,9 @@ The object labels of the found items are returned as list." (error 'wrong-type-argument (cadr attributes))) (setq props (append props - (list :dict-entry - (substring (symbol-name (car attributes)) 1) - (cadr attributes))) + `((:dict-entry + ,(substring (symbol-name (car attributes)) 1) + ,(cadr attributes)))) attributes (cddr attributes))) ;; Search. The result is a list of object paths. (setq result @@ -650,9 +662,9 @@ The object path of the created item is returned." (error 'wrong-type-argument (cadr attributes))) (setq props (append props - (list :dict-entry - (substring (symbol-name (car attributes)) 1) - (cadr attributes))) + `((:dict-entry + ,(substring (symbol-name (car attributes)) 1) + ,(cadr attributes)))) attributes (cddr attributes))) ;; Create the item. (setq result diff --git a/test/lisp/net/secrets-tests.el b/test/lisp/net/secrets-tests.el new file mode 100644 index 0000000000..dc9c7f1004 --- /dev/null +++ b/test/lisp/net/secrets-tests.el @@ -0,0 +1,234 @@ +;;; secrets-tests.el --- Tests of Secret Service API + +;; Copyright (C) 2018 Free Software Foundation, Inc. + +;; Author: Michael Albinus + +;; This program is free software: you can redistribute it and/or +;; modify it under the terms of the GNU General Public License as +;; published by the Free Software Foundation, either version 3 of the +;; License, or (at your option) any later version. +;; +;; This program is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. +;; +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see `https://www.gnu.org/licenses/'. + +;;; Code: + +(require 'ert) +(require 'secrets) +(require 'notifications) + +;; We do not want chatty messages. +(setq secrets-debug nil) + +(ert-deftest secrets-test00-availability () + "Test availability of Secret Service API." + :expected-result (if secrets-enabled :passed :failed) + (should secrets-enabled) + (should (dbus-ping :session secrets-service)) + ;; We do not test when there's an open session. + (should (secrets-empty-path secrets-session-path))) + +(defun secrets--test-get-all-sessions () + "Return all object paths for existing secrets sessions." + (let ((session-path (concat secrets-path "/session"))) + (delete + session-path + (dbus-introspect-get-all-nodes :session secrets-service session-path)))) + +(defun secrets--test-close-all-sessions () + "Close all secrets sessions which are bound to this Emacs." + (secrets-close-session) + ;; We loop over all other sessions. If a session does not belong to + ;; us, a `dbus-error' is fired, which we ignore. + (dolist (path (secrets--test-get-all-sessions)) + (dbus-ignore-errors + (dbus-call-method + :session secrets-service path secrets-interface-session "Close")))) + +(defun secrets--test-delete-all-session-items () + "Delete all items of collection \"session\" bound to this Emacs." + (dolist (item (secrets-list-items "session")) + (secrets-delete-item "session" item))) + +(ert-deftest secrets-test01-sessions () + "Test opening / closing a secrets session." + (skip-unless secrets-enabled) + (skip-unless (secrets-empty-path secrets-session-path)) + + (unwind-protect + (progn + ;; Simple opening / closing of a session. + (should (secrets-open-session)) + (should-not (secrets-empty-path secrets-session-path)) + (should (secrets-close-session)) + (should (secrets-empty-path secrets-session-path)) + + ;; Reopening a new session. + (should (string-equal (secrets-open-session) (secrets-open-session))) + (should (string-equal secrets-session-path (secrets-open-session))) + (should-not + (string-equal (secrets-open-session) (secrets-open-session 'reopen))) + (should-not + (string-equal secrets-session-path (secrets-open-session 'reopen)))) + + ;; Exit. + (should (secrets-close-session)) + (secrets--test-close-all-sessions))) + +(ert-deftest secrets-test02-collections () + "Test creation / deletion a secrets collections." + (skip-unless secrets-enabled) + (skip-unless (secrets-empty-path secrets-session-path)) + + (unwind-protect + (progn + ;; There must be at least the collections "Login" and "session". + (should (member "Login" (secrets-list-collections))) + (should (member "session" (secrets-list-collections))) + + ;; Create a random collection. This asks for a password + ;; outside our control, so we make it in the interactive case + ;; only. + (unless noninteractive + (let ((collection (md5 (concat (prin1-to-string process-environment) + (current-time-string)))) + (alias (secrets-get-alias "default"))) + (notifications-notify + :title (symbol-name (ert-test-name (ert-running-test))) + :body "Please enter the password \"secret\" twice") + ;; The optional argument ALIAS does not seem to work. + (should (secrets-create-collection collection)) + (should (member collection (secrets-list-collections))) + + ;; We reset the alias. The temporary collection "session" + ;; is not accepted. + (secrets-set-alias collection "default") + (should (string-equal (secrets-get-alias "default") collection)) + + ;; Delete alias. + (secrets-delete-alias "default") + (should-not (secrets-get-alias "default")) + + ;; Lock / unlock the collection. + (secrets-lock-collection collection) + (should + (secrets-get-collection-property + (secrets-collection-path collection) "Locked")) + (notifications-notify + :title (symbol-name (ert-test-name (ert-running-test))) + :body "Please enter the password \"secret\"") + (secrets-unlock-collection collection) + (should-not + (secrets-get-collection-property + (secrets-collection-path collection) "Locked")) + + ;; Delete the collection. The alias disappears as well. + (secrets-set-alias collection "default") + (secrets-delete-collection collection) + (should-not (secrets-get-alias "default")) + + ;; Reset alias. + (when alias + (secrets-set-alias alias "default") + (should (string-equal (secrets-get-alias "default") alias)))))) + + ;; Exit. + (should (secrets-close-session)) + (secrets--test-close-all-sessions))) + +(ert-deftest secrets-test03-items () + "Test creation / deletion a secret item." + (skip-unless secrets-enabled) + (skip-unless (secrets-empty-path secrets-session-path)) + + (unwind-protect + (progn + ;; There shall be no items in the "session" collection. + (should-not (secrets-list-items "session")) + ;; There shall be items in the "Login" collection. + (should (secrets-list-items "Login")) + + ;; Create a new item. + (secrets-create-item "session" "foo" "secret") + (should (string-equal (secrets-get-secret "session" "foo") "secret")) + + ;; Create an item with attributes. + (secrets-create-item + "session" "bar" "secret" + :method "sudo" :user "joe" :host "remote-host") + (should + (string-equal (secrets-get-attribute "session" "bar" :method) "sudo")) + ;; The attributes are collected in reverse order. :xdg:schema + ;; is added silently. + (should + (equal + (secrets-get-attributes "session" "bar") + '((:host . "remote-host") (:user . "joe") + (:method . "sudo") + (:xdg:schema . "org.freedesktop.Secret.Generic")))) + + ;; Delete them. + (dolist (item (secrets-list-items "session")) + (secrets-delete-item "session" item)) + (should-not (secrets-list-items "session"))) + + ;; Exit. + (secrets--test-delete-all-session-items) + (should (secrets-close-session)) + (secrets--test-close-all-sessions))) + +(ert-deftest secrets-test04-search () + "Test searching of secret items." + (skip-unless secrets-enabled) + (skip-unless (secrets-empty-path secrets-session-path)) + + (unwind-protect + (progn + ;; There shall be no items in the "session" collection. + (should-not (secrets-list-items "session")) + + ;; Create some items. + (secrets-create-item + "session" "foo" "secret" + :method "sudo" :user "joe" :host "remote-host") + (secrets-create-item + "session" "bar" "secret" + :method "sudo" :user "smith" :host "remote-host") + (secrets-create-item + "session" "baz" "secret" + :method "ssh" :user "joe" :host "other-host") + + ;; Search the items. + (should-not (secrets-search-items "session" :user "john")) + (should + (equal + (sort (secrets-search-items "session" :user "joe") 'string-lessp) + '("baz" "foo"))) + (should + (equal + (secrets-search-items "session":method "sudo" :user "joe") '("foo"))) + (should + (equal + (sort (secrets-search-items "session") 'string-lessp) + '("bar" "baz" "foo")))) + + ;; Exit. + (secrets--test-delete-all-session-items) + (should (secrets-close-session)) + (secrets--test-close-all-sessions))) + +(defun secrets-test-all (&optional interactive) + "Run all tests for \\[secrets]." + (interactive "p") + (funcall + (if interactive 'ert-run-tests-interactively 'ert-run-tests-batch) + "^secrets")) + +(provide 'secrets-tests) +;;; secrets-tests.el ends here commit f9052b73500740a9084d3a60e73875f1bbd332a5 Author: Glenn Morris Date: Thu Apr 5 08:58:20 2018 -0400 * test/lisp/gnus/message-tests.el (message-all-epg-keys-available-p): Add skip condition. diff --git a/test/lisp/gnus/message-tests.el b/test/lisp/gnus/message-tests.el index 9124dcf77a..a95559775b 100644 --- a/test/lisp/gnus/message-tests.el +++ b/test/lisp/gnus/message-tests.el @@ -113,6 +113,7 @@ ("Person 6" "p6@p6.org")))))) (ert-deftest message-all-epg-keys-available-p () + (skip-unless (epg-check-configuration (epg-find-configuration 'OpenPGP))) (let ((person1 '("Person 1" "p1@p1.org")) (person2 '("Person 2" "p2@p2.org")) (person3 '("Person 3" "p3@p3.org")) commit 0b690a83f674a160ccbaa9f374226b1fcfb2d535 Author: Tino Calancha Date: Thu Apr 5 12:15:54 2018 +0900 Honor dired-create-destination-dirs if copying/renaming >1 files Check `dired-create-destination-dirs' when the user wants to copy/rename several files. * lisp/dired-aux.el (dired-do-create-files): Call `dired-maybe-create-dirs' right before bind `into-dir' (Bug#30624). * test/lisp/dired-aux-tests.el (dired-test-bug30624): Add test. diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index e8b5e6755e..821b7d7975 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -1864,28 +1864,31 @@ Optional arg HOW-TO determines how to treat the target. (dired-mark-read-file-name (concat (if dired-one-file op1 operation) " %s to: ") target-dir op-symbol arg rfn-list default)))) - (into-dir (cond ((null how-to) - ;; Allow users to change the letter case of - ;; a directory on a case-insensitive - ;; filesystem. If we don't test these - ;; conditions up front, file-directory-p - ;; below will return t on a case-insensitive - ;; filesystem, and Emacs will try to move - ;; foo -> foo/foo, which fails. - (if (and (file-name-case-insensitive-p (car fn-list)) - (eq op-symbol 'move) - dired-one-file - (string= (downcase - (expand-file-name (car fn-list))) - (downcase - (expand-file-name target))) - (not (string= - (file-name-nondirectory (car fn-list)) - (file-name-nondirectory target)))) - nil - (file-directory-p target))) - ((eq how-to t) nil) - (t (funcall how-to target))))) + (into-dir + (progn + (unless dired-one-file (dired-maybe-create-dirs target)) + (cond ((null how-to) + ;; Allow users to change the letter case of + ;; a directory on a case-insensitive + ;; filesystem. If we don't test these + ;; conditions up front, file-directory-p + ;; below will return t on a case-insensitive + ;; filesystem, and Emacs will try to move + ;; foo -> foo/foo, which fails. + (if (and (file-name-case-insensitive-p (car fn-list)) + (eq op-symbol 'move) + dired-one-file + (string= (downcase + (expand-file-name (car fn-list))) + (downcase + (expand-file-name target))) + (not (string= + (file-name-nondirectory (car fn-list)) + (file-name-nondirectory target)))) + nil + (file-directory-p target))) + ((eq how-to t) nil) + (t (funcall how-to target)))))) (if (and (consp into-dir) (functionp (car into-dir))) (apply (car into-dir) operation rfn-list fn-list target (cdr into-dir)) (if (not (or dired-one-file into-dir)) diff --git a/test/lisp/dired-aux-tests.el b/test/lisp/dired-aux-tests.el index ab6d1cb056..daf60f760e 100644 --- a/test/lisp/dired-aux-tests.el +++ b/test/lisp/dired-aux-tests.el @@ -93,6 +93,27 @@ (should-error (dired-copy-file-recursive from to-cp nil)) (should-error (dired-rename-file from to-mv nil))))) +(ert-deftest dired-test-bug30624 () + "test for https://debbugs.gnu.org/30624 ." + (cl-letf* ((target-dir (make-temp-file "target" 'dir)) + ((symbol-function 'dired-mark-read-file-name) + (lambda (&rest _) target-dir)) + (inhibit-message t)) + ;; Delete target-dir: `dired-do-create-files' must recreate it. + (delete-directory target-dir) + (let ((file1 (make-temp-file "bug30624_file1")) + (file2 (make-temp-file "bug30624_file2")) + (dired-create-destination-dirs 'always) + (buf (dired temporary-file-directory))) + (unwind-protect + (progn + (dired-revert) + (dired-mark-files-regexp "bug30624_file") + (should (dired-do-create-files 'copy 'dired-copy-file "Copy" nil))) + (delete-directory target-dir 'recursive) + (mapc #'delete-file `(,file1 ,file2)) + (kill-buffer buf))))) + (provide 'dired-aux-tests) ;; dired-aux-tests.el ends here commit 17788644e62954110c62b29ff2662f2ea58438c9 Author: Paul Eggert Date: Wed Apr 4 17:02:28 2018 -0700 Move password-word-equivalents defn to mule-conf * lisp/international/mule-conf.el (password-word-equivalents): Move here ... * lisp/simple.el (password-word-equivalents): ... from here. This variable belongs in an i18n file somewhere, not in simple.el, since it’s i18n-related. Also, having it in simple.el tickles Emacs performance bugs on some platforms when developers visit simple.el. Problem reported by Drew Adams in, for example: https://lists.gnu.org/r/emacs-devel/2018-04/msg00124.html diff --git a/lisp/international/mule-conf.el b/lisp/international/mule-conf.el index ea687f0ae5..dc095707a2 100644 --- a/lisp/international/mule-conf.el +++ b/lisp/international/mule-conf.el @@ -1571,6 +1571,61 @@ for decoding and encoding files, process I/O, etc." (aset latin-extra-code-table ?\225 t) (aset latin-extra-code-table ?\226 t) +(defcustom password-word-equivalents + '("password" "passcode" "passphrase" "pass phrase" + ; These are sorted according to the GNU en_US locale. + "암호" ; ko + "パスワード" ; ja + "ପ୍ରବେଶ ସଙ୍କେତ" ; or + "ពាក្យសម្ងាត់" ; km + "adgangskode" ; da + "contraseña" ; es + "contrasenya" ; ca + "geslo" ; sl + "hasło" ; pl + "heslo" ; cs, sk + "iphasiwedi" ; zu + "jelszó" ; hu + "lösenord" ; sv + "lozinka" ; hr, sr + "mật khẩu" ; vi + "mot de passe" ; fr + "parola" ; tr + "pasahitza" ; eu + "passord" ; nb + "passwort" ; de + "pasvorto" ; eo + "salasana" ; fi + "senha" ; pt + "slaptažodis" ; lt + "wachtwoord" ; nl + "كلمة السر" ; ar + "ססמה" ; he + "лозинка" ; sr + "пароль" ; kk, ru, uk + "गुप्तशब्द" ; mr + "शब्दकूट" ; hi + "પાસવર્ડ" ; gu + "సంకేతపదము" ; te + "ਪਾਸਵਰਡ" ; pa + "ಗುಪ್ತಪದ" ; kn + "கடவுச்சொல்" ; ta + "അടയാളവാക്ക്" ; ml + "গুপ্তশব্দ" ; as + "পাসওয়ার্ড" ; bn_IN + "රහස්පදය" ; si + "密码" ; zh_CN + "密碼" ; zh_TW + ) + "List of words equivalent to \"password\". +This is used by Shell mode and other parts of Emacs to recognize +password prompts, including prompts in languages other than +English. Different case choices should not be assumed to be +included; callers should bind `case-fold-search' to t." + :type '(repeat string) + :version "24.4" + :group 'processes) + ;; The old code-pages library is obsoleted by coding systems based on ;; the charsets defined in this file but might be required by user ;; code. diff --git a/lisp/simple.el b/lisp/simple.el index 7d8010fa50..aad8d3b06c 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -3170,61 +3170,6 @@ which is defined in the `warnings' library.\n") (setq buffer-undo-list nil) t)) -(defcustom password-word-equivalents - '("password" "passcode" "passphrase" "pass phrase" - ; These are sorted according to the GNU en_US locale. - "암호" ; ko - "パスワード" ; ja - "ପ୍ରବେଶ ସଙ୍କେତ" ; or - "ពាក្យសម្ងាត់" ; km - "adgangskode" ; da - "contraseña" ; es - "contrasenya" ; ca - "geslo" ; sl - "hasło" ; pl - "heslo" ; cs, sk - "iphasiwedi" ; zu - "jelszó" ; hu - "lösenord" ; sv - "lozinka" ; hr, sr - "mật khẩu" ; vi - "mot de passe" ; fr - "parola" ; tr - "pasahitza" ; eu - "passord" ; nb - "passwort" ; de - "pasvorto" ; eo - "salasana" ; fi - "senha" ; pt - "slaptažodis" ; lt - "wachtwoord" ; nl - "كلمة السر" ; ar - "ססמה" ; he - "лозинка" ; sr - "пароль" ; kk, ru, uk - "गुप्तशब्द" ; mr - "शब्दकूट" ; hi - "પાસવર્ડ" ; gu - "సంకేతపదము" ; te - "ਪਾਸਵਰਡ" ; pa - "ಗುಪ್ತಪದ" ; kn - "கடவுச்சொல்" ; ta - "അടയാളവാക്ക്" ; ml - "গুপ্তশব্দ" ; as - "পাসওয়ার্ড" ; bn_IN - "රහස්පදය" ; si - "密码" ; zh_CN - "密碼" ; zh_TW - ) - "List of words equivalent to \"password\". -This is used by Shell mode and other parts of Emacs to recognize -password prompts, including prompts in languages other than -English. Different case choices should not be assumed to be -included; callers should bind `case-fold-search' to t." - :type '(repeat string) - :version "24.4" - :group 'processes) - (defvar shell-command-history nil "History list for some commands that read shell commands. commit c26054bbfed6c72ec18675166f2316d9dc2bfdd6 Author: Juri Linkov Date: Wed Apr 4 23:49:45 2018 +0300 * lisp/isearch.el (isearch-pre-command-hook): Default to shift-translated move commands that can be enabled by the `isearch-move' property `enabled', and disabled by `disabled'. (search-exit-option): Doc fix. (isearch-post-command-hook): Check for isearch-forward. https://lists.gnu.org/archive/html/emacs-devel/2018-03/msg00438.html diff --git a/lisp/isearch.el b/lisp/isearch.el index aa6acfd0c8..15a15436f7 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -72,7 +72,9 @@ If t, random control and meta characters terminate the search and are then executed normally. If `edit', edit the search string instead of exiting. If `move', extend the search string by motion commands -that have the `isearch-move' property on their symbols. +that have the `isearch-move' property on their symbols +equal to `enabled', or the shift-translated command is +not disabled by the value `disabled' of the same property. If `shift-move', extend the search string by motion commands while holding down the shift key. Both `move' and `shift-move' extend the search string by yanking text @@ -2434,7 +2436,10 @@ See more for options in `search-exit-option'." ;; Don't terminate the search for motion commands. ((or (and (eq search-exit-option 'move) (symbolp this-command) - (eq (get this-command 'isearch-move) t)) + (or (eq (get this-command 'isearch-move) 'enabled) + (and (not (eq (get this-command 'isearch-move) 'disabled)) + (stringp (nth 1 (interactive-form this-command))) + (string-match-p "^^" (nth 1 (interactive-form this-command)))))) (and (eq search-exit-option 'shift-move) this-command-keys-shift-translated)) (setq this-command-keys-shift-translated nil) @@ -2469,7 +2474,8 @@ See more for options in `search-exit-option'." string "")) (setq isearch-yank-flag t) (setq isearch-forward (<= (or isearch-other-end isearch-opoint) (point))) - (goto-char isearch-pre-move-point) + (when isearch-forward + (goto-char isearch-pre-move-point)) (isearch-search-and-update))) (setq isearch-pre-move-point nil)))) commit 25b22772a7149a5207e4693f149718329a25e135 Author: Juri Linkov Date: Wed Apr 4 23:43:54 2018 +0300 * lisp/shell.el (shell-mode): Check if buffer has a live process. (Bug#31028) diff --git a/lisp/shell.el b/lisp/shell.el index 5c228a5eba..d4a0556ceb 100644 --- a/lisp/shell.el +++ b/lisp/shell.el @@ -568,8 +568,10 @@ buffer." (setq list-buffers-directory (expand-file-name default-directory)) ;; shell-dependent assignments. (when (ring-empty-p comint-input-ring) - (let ((shell (file-name-nondirectory (car - (process-command (get-buffer-process (current-buffer)))))) + (let ((shell (if (get-buffer-process (current-buffer)) + (file-name-nondirectory + (car (process-command (get-buffer-process (current-buffer))))) + "")) (hsize (getenv "HISTSIZE"))) (and (stringp hsize) (integerp (setq hsize (string-to-number hsize))) commit 29006a6fd8e989013098b0281aa0b9efe13feb1d Author: Damien Cassou Date: Tue Mar 27 16:57:51 2018 +0200 Detect if a message can be encrypted and add an MML tag * lisp/gnus/message.el (message-all-recipients): Return a list of pairs, one for each recipient in To, Cc, Bcc. (message-all-epg-keys-available-p): Check that there is a public key in epg for each recipient of the current message. (message-sign-encrypt-if-all-keys-available): Add MML tag to sign and encrypt current message if there is a public key for every recipient in current message. * test/lisp/gnus/message-tests.el (message-all-recipients): Test for message-all-recipients. diff --git a/etc/NEWS b/etc/NEWS index baff9664cf..02b31ecff4 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -337,6 +337,14 @@ or NextCloud hosted files and directories. It was obsolete since Emacs 22.1, replaced by customize. +** Message + ++++ +*** Messages can now be systematically encrypted +when the PGP keyring contains a public key for every recipient. To +achieve this, add 'message-add-encrypt-tag-if-can-encrypt' to +'message-send-hook'. + * New Modes and Packages in Emacs 27.1 +++ diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 37b994de99..fdb296fc24 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -2582,6 +2582,36 @@ PGG manual, depending on the value of `mml2015-use'." (t 'message))))) +(defun message-all-recipients () + "Return a list of all recipients in the message, looking at TO, CC and BCC. + +Each recipient is in the format of `mail-extract-address-components'." + (mapcan (lambda (header) + (let ((header-value (message-fetch-field header))) + (and + header-value + (mail-extract-address-components header-value t)))) + '("To" "Cc" "Bcc"))) + +(defun message-all-epg-keys-available-p () + "Return non-nil if the pgp keyring has a public key for each recipient." + (require 'epa) + (let ((context (epg-make-context epa-protocol))) + (catch 'break + (dolist (recipient (message-all-recipients)) + (let ((recipient-email (cadr recipient))) + (when (and recipient-email (not (epg-list-keys context recipient-email))) + (throw 'break nil)))) + t))) + +(defun message-sign-encrypt-if-all-keys-available () + "Add MML tag to encrypt message when there is a key for each recipient. + +Consider adding this function to `message-send-hook' to +systematically send encrypted emails when possible." + (when (message-all-epg-keys-available-p) + (mml-secure-message-sign-encrypt))) + ;;; diff --git a/test/lisp/gnus/message-tests.el b/test/lisp/gnus/message-tests.el index ec1f247020..9124dcf77a 100644 --- a/test/lisp/gnus/message-tests.el +++ b/test/lisp/gnus/message-tests.el @@ -29,6 +29,8 @@ (require 'ert) (require 'ert-x) +(require 'cl-lib) + (ert-deftest message-mode-propertize () (with-temp-buffer (unwind-protect @@ -97,6 +99,50 @@ (should (string= stripped-was (message-strip-subject-trailing-was with-was))))))) +(ert-deftest message-all-recipients () + (ert-with-test-buffer (:name "message") + (insert "To: Person 1 , Person 2 \n") + (insert "CC: Person 3 , Person 4 \n") + (insert "BCC: Person 5 , Person 6 \n") + (should (equal (message-all-recipients) + '(("Person 1" "p1@p1.org") + ("Person 2" "p2@p2.org") + ("Person 3" "p3@p3.org") + ("Person 4" "p4@p4.org") + ("Person 5" "p5@p5.org") + ("Person 6" "p6@p6.org")))))) + +(ert-deftest message-all-epg-keys-available-p () + (let ((person1 '("Person 1" "p1@p1.org")) + (person2 '("Person 2" "p2@p2.org")) + (person3 '("Person 3" "p3@p3.org")) + (recipients nil) + (keyring '("p1@p1.org" "p2@p2.org"))) + (cl-letf (((symbol-function 'epg-list-keys) + (lambda (_ email) (cl-find email keyring :test #'string=))) + ((symbol-function 'message-all-recipients) + (lambda () recipients))) + + (setq recipients (list)) + (should (message-all-epg-keys-available-p)) + + (setq recipients (list person1)) + (should (message-all-epg-keys-available-p)) + + (setq recipients (list person1 person2)) + (should (message-all-epg-keys-available-p)) + + (setq recipients (list person3)) + (should-not (message-all-epg-keys-available-p)) + + (setq recipients (list person1 person3)) + (should-not (message-all-epg-keys-available-p)) + + (setq recipients (list person3 person1)) + (should-not (message-all-epg-keys-available-p)) + + (setq recipients (list person1 person2 person3)) + (should-not (message-all-epg-keys-available-p))))) (provide 'message-mode-tests) commit 447da5b0d49b7aa14fa5d6969015770fdf9b9f92 Author: Ted Zlatanov Date: Wed Apr 4 14:14:27 2018 -0400 * lisp/auth-source.el (auth-sources): Allow sexp customization type diff --git a/lisp/auth-source.el b/lisp/auth-source.el index 66e1897b87..3923af1027 100644 --- a/lisp/auth-source.el +++ b/lisp/auth-source.el @@ -305,7 +305,8 @@ can get pretty complex." :tag "Personality/Username" (const :tag "Any" t) (string - :tag "Name"))))))))) + :tag "Name")))))) + (sexp :tag "A data structure (external provider)")))) (defcustom auth-source-gpg-encrypt-to t "List of recipient keys that `authinfo.gpg' encrypted to. commit d02fd482fbeaf6ed551e78223b538495cb0c3541 Author: Paul Eggert Date: Wed Apr 4 10:59:09 2018 -0700 Improve GC+Cairo workaround Suggested by Eli Zaretskii (Bug#20890#31). * src/font.h (font_data_structures_may_be_ill_formed): New function. * src/ftfont.c (ftfont_close): * src/ftcrfont.c (ftcrfont_close): Use it. diff --git a/src/font.h b/src/font.h index d88c8eb4f6..469431fee6 100644 --- a/src/font.h +++ b/src/font.h @@ -945,6 +945,22 @@ extern void font_deferred_log (const char *, Lisp_Object, Lisp_Object); font_deferred_log ((ACTION), (ARG), (RESULT)); \ } while (false) +/* FIXME: This is for use in functions that can be called while + garbage-collecting, but which assume that Lisp data structures are + properly-formed. This invalid assumption can lead to core dumps + (Bug#20890). */ +INLINE bool +font_data_structures_may_be_ill_formed (void) +{ +#ifdef USE_CAIRO + /* Although this works around Bug#20890, it is probably not the + right thing to do. */ + return gc_in_progress; +#else + return false; +#endif +} + INLINE_HEADER_END #endif /* not EMACS_FONT_H */ diff --git a/src/ftcrfont.c b/src/ftcrfont.c index 614ef08370..425250e229 100644 --- a/src/ftcrfont.c +++ b/src/ftcrfont.c @@ -164,6 +164,9 @@ ftcrfont_open (struct frame *f, Lisp_Object entity, int pixel_size) static void ftcrfont_close (struct font *font) { + if (font_data_structures_may_be_ill_formed ()) + return; + struct ftcrfont_info *ftcrfont_info = (struct ftcrfont_info *) font; int i; diff --git a/src/ftfont.c b/src/ftfont.c index 51b04a8682..9a8777ef07 100644 --- a/src/ftfont.c +++ b/src/ftfont.c @@ -1242,15 +1242,8 @@ ftfont_open (struct frame *f, Lisp_Object entity, int pixel_size) void ftfont_close (struct font *font) { - /* FIXME: Although this function can be called while garbage-collecting, - the function assumes that Lisp data structures are properly-formed. - This invalid assumption can lead to core dumps (Bug#20890). */ -#ifdef USE_CAIRO - /* Although this works around Bug#20890, it is probably not the - right thing to do. */ - if (gc_in_progress) + if (font_data_structures_may_be_ill_formed ()) return; -#endif struct ftfont_info *ftfont_info = (struct ftfont_info *) font; Lisp_Object val, cache; commit 2f779d8ce804de84fed55a6b0aa74499ef369852 Merge: bc17d5d124 3109d2bb17 Author: Glenn Morris Date: Wed Apr 4 07:50:45 2018 -0700 Merge from origin/emacs-26 3109d2b (origin/emacs-26) ; * lisp/ldefs-boot.el: Update. 86825c4 * etc/NEWS: Remove temporary markup. 737d0a2 * Update etc/AUTHORS fbd03ba * ChangeLog.3: Update 56794ac Fix Bug#31022 a231c33 Update "Calendrical Calculations" cites 1527235 ; * doc/lispref/compile.texi (Compilation Functions): Fix wor... b07decd ; * doc/lispref/compile.texi (Compilation Functions): Fix typo a64c11a Fix term.el rendering following a window resize (Bug#30544) 1e6f09a * files.el (auto-save-visited-mode): Don't prompt for filenames. eb8b13f ; * etc/NEWS: Improve the entry about pinentry.el removal. 52501ec Quote a few backticks in docstrings. Conflicts: etc/NEWS lisp/ldefs-boot.el commit bc17d5d12474e57bb50535224be3c96349df383a Author: Martin Rudalics Date: Wed Apr 4 08:24:52 2018 +0200 * etc/NEWS: Mention that output of 'help-for-help' is searchable now diff --git a/etc/NEWS b/etc/NEWS index 2caeebe174..baff9664cf 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -225,6 +225,10 @@ and commands in the same format as the edit buffer of the buffer generated by 'view-lossage' to the "*Edit Macro*" buffer created by 'edit-last-kbd-macro', and to save the macro by 'C-c C-c'. +--- +*** The list of help commands produced by 'C-h C-h' ('help-for-help') +can now be searched via 'C-s'. + ** Ibuffer --- commit fbd025a667b2361db30c3cb723b4f0ca15413d4a Author: Stefan Monnier Date: Tue Apr 3 23:17:30 2018 -0400 * lisp/vc/emerge.el: Use lexical-binding Replace all `(lambda ...) with closures. Use inhibit-read-only. (emerge-mode): Use define-minor-mode. (emerge-setup, emerge-setup-with-ancestor): Don't use 'run-hooks' on local var. (emerge-files, emerge-files-with-ancestor): Don't use 'add-hook' on local var. (emerge-convert-diffs-to-markers): Remove unused var 'B-point-min'. Simplify 'offset'. (emerge--current-beg, emerge--current-end): New macros. (emerge-select-version): Pass 'diff-vector' to the function it calls. Change all callers to use it instead of dyn-bound vars. diff --git a/lisp/vc/emerge.el b/lisp/vc/emerge.el index 0da14d07fd..fc8c318e3a 100644 --- a/lisp/vc/emerge.el +++ b/lisp/vc/emerge.el @@ -1,6 +1,6 @@ -;;; emerge.el --- merge diffs under Emacs control +;;; emerge.el --- merge diffs under Emacs control -*- lexical-binding:t -*- -;;; The author has placed this file in the public domain. +;; The author has placed this file in the public domain. ;; This file is part of GNU Emacs. @@ -24,42 +24,20 @@ ;;; Code: -;; There aren't really global variables, just dynamic bindings -(defvar A-begin) -(defvar A-end) -(defvar B-begin) -(defvar B-end) -(defvar diff-vector) -(defvar merge-begin) -(defvar merge-end) -(defvar valid-diff) - ;;; Macros (defmacro emerge-defvar-local (var value doc) - "Defines SYMBOL as an advertised variable. + "Define SYMBOL as an advertised buffer-local variable. Performs a defvar, then executes `make-variable-buffer-local' on the variable. Also sets the `permanent-local' property, so that `kill-all-local-variables' (called by major-mode setting commands) won't destroy Emerge control variables." `(progn - (defvar ,var ,value ,doc) - (make-variable-buffer-local ',var) - (put ',var 'permanent-local t))) - -;; Add entries to minor-mode-alist so that emerge modes show correctly -(defvar emerge-minor-modes-list - '((emerge-mode " Emerge") - (emerge-fast-mode " F") - (emerge-edit-mode " E") - (emerge-auto-advance " A") - (emerge-skip-prefers " S"))) -(if (not (assq 'emerge-mode minor-mode-alist)) - (setq minor-mode-alist (append emerge-minor-modes-list - minor-mode-alist))) + (defvar-local ,var ,value ,doc) + (put ',var 'permanent-local t))) ;; We need to define this function so describe-mode can describe Emerge mode. -(defun emerge-mode () +(define-minor-mode emerge-mode "Emerge mode is used by the Emerge file-merging package. It is entered only through one of the functions: `emerge-files' @@ -74,7 +52,13 @@ It is entered only through one of the functions: Commands: \\{emerge-basic-keymap} Commands must be prefixed by \\\\[emerge-basic-keymap] in `edit' mode, -but can be invoked directly in `fast' mode.") +but can be invoked directly in `fast' mode." + :lighter (" Emerge" + (emerge-fast-mode " F") + (emerge-edit-mode " E") + (emerge-auto-advance " A") + (emerge-skip-prefers " S"))) +(put 'emerge-mode 'permanent-local t) ;;; Emerge configuration variables @@ -453,8 +437,6 @@ Must be set before Emerge is loaded." ;; Variables which control each merge. They are local to the merge buffer. ;; Mode variables -(emerge-defvar-local emerge-mode nil - "Indicator for emerge-mode.") (emerge-defvar-local emerge-fast-mode nil "Indicator for emerge-mode fast submode.") (emerge-defvar-local emerge-edit-mode nil @@ -556,7 +538,7 @@ This is *not* a user option, since Emerge uses it for its own processing.") (if temp (setq file-A temp startup-hooks - (cons `(lambda () (delete-file ,file-A)) + (cons (lambda () (delete-file file-A)) startup-hooks)) ;; Verify that the file matches the buffer (emerge-verify-file-buffer)))) @@ -567,7 +549,7 @@ This is *not* a user option, since Emerge uses it for its own processing.") (if temp (setq file-B temp startup-hooks - (cons `(lambda () (delete-file ,file-B)) + (cons (lambda () (delete-file file-B)) startup-hooks)) ;; Verify that the file matches the buffer (emerge-verify-file-buffer)))) @@ -584,48 +566,49 @@ This is *not* a user option, since Emerge uses it for its own processing.") ;; create the merge buffer from buffer A, so it inherits buffer A's ;; default directory, etc. (merge-buffer (with-current-buffer - buffer-A - (get-buffer-create merge-buffer-name)))) + buffer-A + (get-buffer-create merge-buffer-name)))) (with-current-buffer - merge-buffer - (emerge-copy-modes buffer-A) - (setq buffer-read-only nil) - (auto-save-mode 1) - (setq emerge-mode t) - (setq emerge-A-buffer buffer-A) - (setq emerge-B-buffer buffer-B) - (setq emerge-ancestor-buffer nil) - (setq emerge-merge-buffer merge-buffer) - (setq emerge-output-description - (if output-file - (concat "Output to file: " output-file) - (concat "Output to buffer: " (buffer-name merge-buffer)))) - (save-excursion (insert-buffer-substring emerge-A-buffer)) - (emerge-set-keys) - (setq emerge-difference-list (emerge-make-diff-list file-A file-B)) - (setq emerge-number-of-differences (length emerge-difference-list)) - (setq emerge-current-difference -1) - (setq emerge-quit-hook quit-hooks) - (emerge-remember-buffer-characteristics) - (emerge-handle-local-variables)) + merge-buffer + (emerge-copy-modes buffer-A) + (setq buffer-read-only nil) + (auto-save-mode 1) + (setq emerge-mode t) + (setq emerge-A-buffer buffer-A) + (setq emerge-B-buffer buffer-B) + (setq emerge-ancestor-buffer nil) + (setq emerge-merge-buffer merge-buffer) + (setq emerge-output-description + (if output-file + (concat "Output to file: " output-file) + (concat "Output to buffer: " (buffer-name merge-buffer)))) + (save-excursion (insert-buffer-substring emerge-A-buffer)) + (emerge-set-keys) + (setq emerge-difference-list (emerge-make-diff-list file-A file-B)) + (setq emerge-number-of-differences (length emerge-difference-list)) + (setq emerge-current-difference -1) + (setq emerge-quit-hook quit-hooks) + (emerge-remember-buffer-characteristics) + (emerge-handle-local-variables)) (emerge-setup-windows buffer-A buffer-B merge-buffer t) (with-current-buffer merge-buffer - (run-hooks 'startup-hooks 'emerge-startup-hook) - (setq buffer-read-only t)))) + (mapc #'funcall startup-hooks) + (run-hooks 'emerge-startup-hook) + (setq buffer-read-only t)))) ;; Generate the Emerge difference list between two files (defun emerge-make-diff-list (file-A file-B) (setq emerge-diff-buffer (get-buffer-create "*emerge-diff*")) (with-current-buffer - emerge-diff-buffer - (erase-buffer) - (shell-command - (format "%s %s %s %s" - (shell-quote-argument emerge-diff-program) - emerge-diff-options - (shell-quote-argument file-A) - (shell-quote-argument file-B)) - t)) + emerge-diff-buffer + (erase-buffer) + (shell-command + (format "%s %s %s %s" + (shell-quote-argument emerge-diff-program) + emerge-diff-options + (shell-quote-argument file-A) + (shell-quote-argument file-B)) + t)) (emerge-prepare-error-list emerge-diff-ok-lines-regexp) (emerge-convert-diffs-to-markers emerge-A-buffer emerge-B-buffer emerge-merge-buffer @@ -711,7 +694,7 @@ This is *not* a user option, since Emerge uses it for its own processing.") (if temp (setq file-A temp startup-hooks - (cons `(lambda () (delete-file ,file-A)) + (cons (lambda () (delete-file file-A)) startup-hooks)) ;; Verify that the file matches the buffer (emerge-verify-file-buffer)))) @@ -722,7 +705,7 @@ This is *not* a user option, since Emerge uses it for its own processing.") (if temp (setq file-B temp startup-hooks - (cons `(lambda () (delete-file ,file-B)) + (cons (lambda () (delete-file file-B)) startup-hooks)) ;; Verify that the file matches the buffer (emerge-verify-file-buffer)))) @@ -733,7 +716,7 @@ This is *not* a user option, since Emerge uses it for its own processing.") (if temp (setq file-ancestor temp startup-hooks - (cons `(lambda () (delete-file ,file-ancestor)) + (cons (lambda () (delete-file file-ancestor)) startup-hooks)) ;; Verify that the file matches the buffer (emerge-verify-file-buffer)))) @@ -746,6 +729,7 @@ This is *not* a user option, since Emerge uses it for its own processing.") buffer-ancestor file-ancestor &optional startup-hooks quit-hooks output-file) + ;; FIXME: Duplicated code! (setq file-A (expand-file-name file-A)) (setq file-B (expand-file-name file-B)) (setq file-ancestor (expand-file-name file-ancestor)) @@ -754,36 +738,37 @@ This is *not* a user option, since Emerge uses it for its own processing.") ;; create the merge buffer from buffer A, so it inherits buffer A's ;; default directory, etc. (merge-buffer (with-current-buffer - buffer-A - (get-buffer-create merge-buffer-name)))) + buffer-A + (get-buffer-create merge-buffer-name)))) (with-current-buffer - merge-buffer - (emerge-copy-modes buffer-A) - (setq buffer-read-only nil) - (auto-save-mode 1) - (setq emerge-mode t) - (setq emerge-A-buffer buffer-A) - (setq emerge-B-buffer buffer-B) - (setq emerge-ancestor-buffer buffer-ancestor) - (setq emerge-merge-buffer merge-buffer) - (setq emerge-output-description - (if output-file - (concat "Output to file: " output-file) - (concat "Output to buffer: " (buffer-name merge-buffer)))) - (save-excursion (insert-buffer-substring emerge-A-buffer)) - (emerge-set-keys) - (setq emerge-difference-list - (emerge-make-diff3-list file-A file-B file-ancestor)) - (setq emerge-number-of-differences (length emerge-difference-list)) - (setq emerge-current-difference -1) - (setq emerge-quit-hook quit-hooks) - (emerge-remember-buffer-characteristics) - (emerge-select-prefer-Bs) - (emerge-handle-local-variables)) + merge-buffer + (emerge-copy-modes buffer-A) + (setq buffer-read-only nil) + (auto-save-mode 1) + (setq emerge-mode t) + (setq emerge-A-buffer buffer-A) + (setq emerge-B-buffer buffer-B) + (setq emerge-ancestor-buffer buffer-ancestor) + (setq emerge-merge-buffer merge-buffer) + (setq emerge-output-description + (if output-file + (concat "Output to file: " output-file) + (concat "Output to buffer: " (buffer-name merge-buffer)))) + (save-excursion (insert-buffer-substring emerge-A-buffer)) + (emerge-set-keys) + (setq emerge-difference-list + (emerge-make-diff3-list file-A file-B file-ancestor)) + (setq emerge-number-of-differences (length emerge-difference-list)) + (setq emerge-current-difference -1) + (setq emerge-quit-hook quit-hooks) + (emerge-remember-buffer-characteristics) + (emerge-select-prefer-Bs) + (emerge-handle-local-variables)) (emerge-setup-windows buffer-A buffer-B merge-buffer t) (with-current-buffer merge-buffer - (run-hooks 'startup-hooks 'emerge-startup-hook) - (setq buffer-read-only t)))) + (mapc #'funcall startup-hooks) + (run-hooks 'emerge-startup-hook) + (setq buffer-read-only t)))) ;; Generate the Emerge difference list between two files with an ancestor (defun emerge-make-diff3-list (file-A file-B file-ancestor) @@ -872,7 +857,7 @@ This is *not* a user option, since Emerge uses it for its own processing.") (emerge-read-file-name "Output file" emerge-last-dir-output f f nil))))) (if file-out - (add-hook 'quit-hooks `(lambda () (emerge-files-exit ,file-out)))) + (push (lambda () (emerge-files-exit file-out)) quit-hooks)) (emerge-files-internal file-A file-B startup-hooks quit-hooks @@ -894,7 +879,7 @@ This is *not* a user option, since Emerge uses it for its own processing.") (emerge-read-file-name "Output file" emerge-last-dir-output f f nil))))) (if file-out - (add-hook 'quit-hooks `(lambda () (emerge-files-exit ,file-out)))) + (push (lambda () (emerge-files-exit file-out)) quit-hooks)) (emerge-files-with-ancestor-internal file-A file-B file-ancestor startup-hooks quit-hooks @@ -922,9 +907,9 @@ This is *not* a user option, since Emerge uses it for its own processing.") (write-region (point-min) (point-max) emerge-file-B nil 'no-message)) (emerge-setup (get-buffer buffer-A) emerge-file-A (get-buffer buffer-B) emerge-file-B - (cons `(lambda () - (delete-file ,emerge-file-A) - (delete-file ,emerge-file-B)) + (cons (lambda () + (delete-file emerge-file-A) + (delete-file emerge-file-B)) startup-hooks) quit-hooks nil))) @@ -953,11 +938,10 @@ This is *not* a user option, since Emerge uses it for its own processing.") (get-buffer buffer-B) emerge-file-B (get-buffer buffer-ancestor) emerge-file-ancestor - (cons `(lambda () - (delete-file ,emerge-file-A) - (delete-file ,emerge-file-B) - (delete-file - ,emerge-file-ancestor)) + (cons (lambda () + (delete-file emerge-file-A) + (delete-file emerge-file-B) + (delete-file emerge-file-ancestor)) startup-hooks) quit-hooks nil))) @@ -972,7 +956,7 @@ This is *not* a user option, since Emerge uses it for its own processing.") (setq command-line-args-left (nthcdr 3 command-line-args-left)) (emerge-files-internal file-a file-b nil - (list `(lambda () (emerge-command-exit ,file-out)))))) + (list (lambda () (emerge-command-exit file-out)))))) ;;;###autoload (defun emerge-files-with-ancestor-command () @@ -994,7 +978,7 @@ This is *not* a user option, since Emerge uses it for its own processing.") (setq command-line-args-left (nthcdr 4 command-line-args-left))) (emerge-files-with-ancestor-internal file-a file-b file-anc nil - (list `(lambda () (emerge-command-exit ,file-out)))))) + (list (lambda () (emerge-command-exit file-out)))))) (defun emerge-command-exit (file-out) (emerge-write-and-delete file-out) @@ -1007,7 +991,8 @@ This is *not* a user option, since Emerge uses it for its own processing.") (setq emerge-file-out file-out) (emerge-files-internal file-a file-b nil - (list `(lambda () (emerge-remote-exit ,file-out ',emerge-exit-func))) + (let ((f emerge-exit-func)) + (list (lambda () (emerge-remote-exit file-out f)))) file-out) (throw 'client-wait nil)) @@ -1016,14 +1001,15 @@ This is *not* a user option, since Emerge uses it for its own processing.") (setq emerge-file-out file-out) (emerge-files-with-ancestor-internal file-a file-b file-anc nil - (list `(lambda () (emerge-remote-exit ,file-out ',emerge-exit-func))) + (let ((f emerge-exit-func)) + (list (lambda () (emerge-remote-exit file-out f)))) file-out) (throw 'client-wait nil)) -(defun emerge-remote-exit (file-out emerge-exit-func) +(defun emerge-remote-exit (file-out exit-func) (emerge-write-and-delete file-out) (kill-buffer emerge-merge-buffer) - (funcall emerge-exit-func (if emerge-prefix-argument 1 0))) + (funcall exit-func (if emerge-prefix-argument 1 0))) ;;; Functions to start Emerge on RCS versions @@ -1041,10 +1027,9 @@ This is *not* a user option, since Emerge uses it for its own processing.") (emerge-revisions-internal file revision-A revision-B startup-hooks (if arg - (cons `(lambda () - (shell-command - ,(format "%s %s" emerge-rcs-ci-program file))) - quit-hooks) + (let ((cmd (format "%s %s" emerge-rcs-ci-program file))) + (cons (lambda () (shell-command cmd)) + quit-hooks)) quit-hooks))) ;;;###autoload @@ -1065,12 +1050,10 @@ This is *not* a user option, since Emerge uses it for its own processing.") (emerge-revision-with-ancestor-internal file revision-A revision-B ancestor startup-hooks (if arg - (let ((cmd )) - (cons `(lambda () - (shell-command - ,(format "%s %s" emerge-rcs-ci-program file))) + (let ((cmd (format "%s %s" emerge-rcs-ci-program file))) + (cons (lambda () (shell-command cmd)) quit-hooks)) - quit-hooks))) + quit-hooks))) (defun emerge-revisions-internal (file revision-A revision-B &optional startup-hooks quit-hooks _output-file) @@ -1098,11 +1081,11 @@ This is *not* a user option, since Emerge uses it for its own processing.") ;; Do the merge (emerge-setup buffer-A emerge-file-A buffer-B emerge-file-B - (cons `(lambda () - (delete-file ,emerge-file-A) - (delete-file ,emerge-file-B)) + (cons (lambda () + (delete-file emerge-file-A) + (delete-file emerge-file-B)) startup-hooks) - (cons `(lambda () (emerge-files-exit ,file)) + (cons (lambda () (emerge-files-exit file)) quit-hooks) nil))) @@ -1146,12 +1129,12 @@ This is *not* a user option, since Emerge uses it for its own processing.") (emerge-setup-with-ancestor buffer-A emerge-file-A buffer-B emerge-file-B buffer-ancestor emerge-ancestor - (cons `(lambda () - (delete-file ,emerge-file-A) - (delete-file ,emerge-file-B) - (delete-file ,emerge-ancestor)) + (cons (lambda () + (delete-file emerge-file-A) + (delete-file emerge-file-B) + (delete-file emerge-ancestor)) startup-hooks) - (cons `(lambda () (emerge-files-exit ,file)) + (cons (lambda () (emerge-files-exit file)) quit-hooks) output-file))) @@ -1233,20 +1216,20 @@ Otherwise, the A or B file present is copied to the output file." file-ancestor file-out nil ;; When done, return to this buffer. - (list - `(lambda () - (switch-to-buffer ,(current-buffer)) - (message "Merge done."))))) + (let ((buf (current-buffer))) + (list (lambda () + (switch-to-buffer buf) + (message "Merge done")))))) ;; Merge of two files without ancestor ((and file-A file-B) (message "Merging %s and %s..." file-A file-B) (emerge-files (not (not file-out)) file-A file-B file-out nil ;; When done, return to this buffer. - (list - `(lambda () - (switch-to-buffer ,(current-buffer)) - (message "Merge done."))))) + (let ((buf (current-buffer))) + (list (lambda () + (switch-to-buffer buf) + (message "Merge done")))))) ;; There is an output file (or there would have been an error above), ;; but only one input file. ;; The file appears to have been deleted in one version; do nothing. @@ -1456,9 +1439,8 @@ These characteristics are restored by `emerge-restore-buffer-characteristics'." merge-buffer lineno-list) (let* (marker-list - (A-point-min (with-current-buffer A-buffer (point-min))) - (offset (1- A-point-min)) - (B-point-min (with-current-buffer B-buffer (point-min))) + (offset (with-current-buffer A-buffer + (- (point-min) (save-restriction (widen) (point-min))))) ;; Record current line number in each buffer ;; so we don't have to count from the beginning. (a-line 1) @@ -1480,17 +1462,17 @@ These characteristics are restored by `emerge-restore-buffer-characteristics'." (state (aref list-element 4))) ;; place markers at the appropriate places in the buffers (with-current-buffer - A-buffer - (setq a-line (emerge-goto-line a-begin a-line)) - (setq a-begin-marker (point-marker)) - (setq a-line (emerge-goto-line a-end a-line)) - (setq a-end-marker (point-marker))) + A-buffer + (setq a-line (emerge-goto-line a-begin a-line)) + (setq a-begin-marker (point-marker)) + (setq a-line (emerge-goto-line a-end a-line)) + (setq a-end-marker (point-marker))) (with-current-buffer - B-buffer - (setq b-line (emerge-goto-line b-begin b-line)) - (setq b-begin-marker (point-marker)) - (setq b-line (emerge-goto-line b-end b-line)) - (setq b-end-marker (point-marker))) + B-buffer + (setq b-line (emerge-goto-line b-begin b-line)) + (setq b-begin-marker (point-marker)) + (setq b-line (emerge-goto-line b-end b-line)) + (setq b-end-marker (point-marker))) (setq merge-begin-marker (set-marker (make-marker) (- (marker-position a-begin-marker) @@ -1502,15 +1484,15 @@ These characteristics are restored by `emerge-restore-buffer-characteristics'." offset) merge-buffer)) ;; record all the markers for this difference - (setq marker-list (cons (vector a-begin-marker a-end-marker - b-begin-marker b-end-marker - merge-begin-marker merge-end-marker - state) - marker-list))) + (push (vector a-begin-marker a-end-marker + b-begin-marker b-end-marker + merge-begin-marker merge-end-marker + state) + marker-list)) (setq lineno-list (cdr lineno-list))) ;; convert the list of difference information into a vector for ;; fast access - (setq emerge-difference-list (apply 'vector (nreverse marker-list))))) + (setq emerge-difference-list (apply #'vector (nreverse marker-list))))) ;; If we have an ancestor, select all B variants that we prefer (defun emerge-select-prefer-Bs () @@ -1636,7 +1618,7 @@ the height of the merge window. `C-u -' alone as argument scrolls half the height of the merge window." (interactive "P") (emerge-operate-on-windows - 'scroll-up + #'scroll-up ;; calculate argument to scroll-up ;; if there is an explicit argument (if (and arg (not (equal arg '-))) @@ -1663,7 +1645,7 @@ the height of the merge window. `C-u -' alone as argument scrolls half the height of the merge window." (interactive "P") (emerge-operate-on-windows - 'scroll-down + #'scroll-down ;; calculate argument to scroll-down ;; if there is an explicit argument (if (and arg (not (equal arg '-))) @@ -1690,7 +1672,7 @@ the width of the A and B windows. `C-u -' alone as argument scrolls half the width of the A and B windows." (interactive "P") (emerge-operate-on-windows - 'scroll-left + #'scroll-left ;; calculate argument to scroll-left ;; if there is an explicit argument (if (and arg (not (equal arg '-))) @@ -1718,7 +1700,7 @@ the width of the A and B windows. `C-u -' alone as argument scrolls half the width of the A and B windows." (interactive "P") (emerge-operate-on-windows - 'scroll-right + #'scroll-right ;; calculate argument to scroll-right ;; if there is an explicit argument (if (and arg (not (equal arg '-))) @@ -1745,18 +1727,18 @@ This resets the horizontal scrolling of all three merge buffers to the left margin, if they are in windows." (interactive) (emerge-operate-on-windows - (lambda (x) (set-window-hscroll (selected-window) 0)) + (lambda (_) (set-window-hscroll (selected-window) 0)) nil)) -;; Attempt to show the region nicely. -;; If there are min-lines lines above and below the region, then don't do -;; anything. -;; If not, recenter the region to make it so. -;; If that isn't possible, remove context lines evenly from top and bottom -;; so the entire region shows. -;; If that isn't possible, show the top of the region. -;; BEG must be at the beginning of a line. (defun emerge-position-region (beg end pos) + "Attempt to show the region nicely. +If there are min-lines lines above and below the region, then don't do +anything. +If not, recenter the region to make it so. +If that isn't possible, remove context lines evenly from top and bottom +so the entire region shows. +If that isn't possible, show the top of the region. +BEG must be at the beginning of a line." ;; First test whether the entire region is visible with ;; emerge-min-visible-lines above and below it (if (not (and (<= (progn @@ -1795,7 +1777,7 @@ to the left margin, if they are in windows." (memq (aref (aref emerge-difference-list n) 6) '(prefer-A prefer-B))) (setq n (1+ n))) - (let ((buffer-read-only nil)) + (let ((inhibit-read-only t)) (emerge-unselect-and-select-difference n))) (error "At end"))) @@ -1809,14 +1791,14 @@ to the left margin, if they are in windows." (memq (aref (aref emerge-difference-list n) 6) '(prefer-A prefer-B))) (setq n (1- n))) - (let ((buffer-read-only nil)) + (let ((inhibit-read-only t)) (emerge-unselect-and-select-difference n))) (error "At beginning"))) (defun emerge-jump-to-difference (difference-number) "Go to the N-th difference." (interactive "p") - (let ((buffer-read-only nil)) + (let ((inhibit-read-only t)) (setq difference-number (1- difference-number)) (if (and (>= difference-number -1) (< difference-number (1+ emerge-number-of-differences))) @@ -1878,6 +1860,13 @@ buffer after this will cause serious problems." (let ((emerge-prefix-argument arg)) (run-hooks 'emerge-quit-hook))) +(defmacro emerge--current-beg (diff-vector side) + ;; +1 because emerge-place-flags-in-buffer1 moved the marker by 1. + `(1+ (aref ,diff-vector ,(pcase-exhaustive side ('A 0) ('B 2) ('merge 4))))) +(defmacro emerge--current-end (diff-vector side) + ;; -1 because emerge-place-flags-in-buffer1 moved the marker by 1. + `(1- (aref ,diff-vector ,(pcase-exhaustive side ('A 1) ('B 3) ('merge 5))))) + (defun emerge-select-A (&optional force) "Select the A variant of this difference. Refuses to function if this difference has been edited, i.e., if it @@ -1885,26 +1874,25 @@ is neither the A nor the B variant. A prefix argument forces the variant to be selected even if the difference has been edited." (interactive "P") - (let ((operate - (lambda () - (emerge-select-A-edit merge-begin merge-end A-begin A-end) - (if emerge-auto-advance - (emerge-next-difference)))) + (let ((operate #'emerge-select-A-edit) (operate-no-change - (lambda () (if emerge-auto-advance - (emerge-next-difference))))) + (lambda (_diff-vector) + (if emerge-auto-advance (emerge-next-difference))))) (emerge-select-version force operate-no-change operate operate))) ;; Actually select the A variant -(defun emerge-select-A-edit (merge-begin merge-end A-begin A-end) +(defun emerge-select-A-edit (diff-vector) (with-current-buffer - emerge-merge-buffer - (delete-region merge-begin merge-end) - (goto-char merge-begin) - (insert-buffer-substring emerge-A-buffer A-begin A-end) - (goto-char merge-begin) - (aset diff-vector 6 'A) - (emerge-refresh-mode-line))) + emerge-merge-buffer + (goto-char (emerge--current-beg diff-vector merge)) + (delete-region (point) (emerge--current-end diff-vector merge)) + (save-excursion + (insert-buffer-substring emerge-A-buffer + (emerge--current-beg diff-vector A) + (emerge--current-end diff-vector A))) + (aset diff-vector 6 'A) + (emerge-refresh-mode-line) + (if emerge-auto-advance (emerge-next-difference)))) (defun emerge-select-B (&optional force) "Select the B variant of this difference. @@ -1913,26 +1901,25 @@ is neither the A nor the B variant. A prefix argument forces the variant to be selected even if the difference has been edited." (interactive "P") - (let ((operate - (lambda () - (emerge-select-B-edit merge-begin merge-end B-begin B-end) - (if emerge-auto-advance - (emerge-next-difference)))) + (let ((operate #'emerge-select-B-edit) (operate-no-change - (lambda () (if emerge-auto-advance - (emerge-next-difference))))) + (lambda (_diff-vector) + (if emerge-auto-advance (emerge-next-difference))))) (emerge-select-version force operate operate-no-change operate))) ;; Actually select the B variant -(defun emerge-select-B-edit (merge-begin merge-end B-begin B-end) +(defun emerge-select-B-edit (diff-vector) (with-current-buffer - emerge-merge-buffer - (delete-region merge-begin merge-end) - (goto-char merge-begin) - (insert-buffer-substring emerge-B-buffer B-begin B-end) - (goto-char merge-begin) - (aset diff-vector 6 'B) - (emerge-refresh-mode-line))) + emerge-merge-buffer + (goto-char (emerge--current-beg diff-vector merge)) + (delete-region (point) (emerge--current-end diff-vector merge)) + (save-excursion + (insert-buffer-substring emerge-B-buffer + (emerge--current-beg diff-vector B) + (emerge--current-end diff-vector B))) + (aset diff-vector 6 'B) + (emerge-refresh-mode-line) + (if emerge-auto-advance (emerge-next-difference)))) (defun emerge-default-A () "Make the A variant the default from here down. @@ -1940,7 +1927,7 @@ This selects the A variant for all differences from here down in the buffer which are still defaulted, i.e., which the user has not selected and for which there is no preference." (interactive) - (let ((buffer-read-only nil)) + (let ((inhibit-read-only t)) (let ((selected-difference emerge-current-difference) (n (max emerge-current-difference 0))) (while (< n emerge-number-of-differences) @@ -1962,7 +1949,7 @@ This selects the B variant for all differences from here down in the buffer which are still defaulted, i.e., which the user has not selected and for which there is no preference." (interactive) - (let ((buffer-read-only nil)) + (let ((inhibit-read-only t)) (let ((selected-difference emerge-current-difference) (n (max emerge-current-difference 0))) (while (< n emerge-number-of-differences) @@ -2071,7 +2058,7 @@ With prefix argument, puts point before, mark after." (A-begin (1+ (aref diff-vector 0))) (A-end (1- (aref diff-vector 1))) (opoint (point)) - (buffer-read-only nil)) + (inhibit-read-only t)) (insert-buffer-substring emerge-A-buffer A-begin A-end) (if (not arg) (set-mark opoint) @@ -2089,7 +2076,7 @@ With prefix argument, puts point before, mark after." (B-begin (1+ (aref diff-vector 2))) (B-end (1- (aref diff-vector 3))) (opoint (point)) - (buffer-read-only nil)) + (inhibit-read-only t)) (insert-buffer-substring emerge-B-buffer B-begin B-end) (if (not arg) (set-mark opoint) @@ -2450,28 +2437,28 @@ the nearest previous difference." (1- index) (error "No difference contains or precedes point"))))))) +(defvar emerge-line-diff) + (defun emerge-line-numbers () "Display the current line numbers. This function displays the line numbers of the points in the A, B, and merge buffers." (interactive) (let* ((valid-diff - (and (>= emerge-current-difference 0) - (< emerge-current-difference emerge-number-of-differences))) + (and (>= emerge-current-difference 0) + (< emerge-current-difference emerge-number-of-differences))) (emerge-line-diff (and valid-diff (aref emerge-difference-list emerge-current-difference))) - (merge-line (emerge-line-number-in-buf 4 5)) + (merge-line (emerge-line-number-in-buf valid-diff 4 5)) (A-line (with-current-buffer emerge-A-buffer - (emerge-line-number-in-buf 0 1))) + (emerge-line-number-in-buf valid-diff 0 1))) (B-line (with-current-buffer emerge-B-buffer - (emerge-line-number-in-buf 2 3)))) + (emerge-line-number-in-buf valid-diff 2 3)))) (message "At lines: merge = %d, A = %d, B = %d" merge-line A-line B-line))) -(defvar emerge-line-diff) - -(defun emerge-line-number-in-buf (begin-marker end-marker) +(defun emerge-line-number-in-buf (valid-diff begin-marker end-marker) ;; FIXME point-min rather than 1? widen? (let ((temp (1+ (count-lines 1 (line-beginning-position))))) (if valid-diff @@ -2537,46 +2524,41 @@ Interactively, reads the register using `register-read-with-preview'." (error "Register does not contain text")) (emerge-combine-versions-internal template force))) -(defun emerge-combine-versions-internal (emerge-combine-template force) - (let ((operate - (lambda () - (emerge-combine-versions-edit merge-begin merge-end - A-begin A-end B-begin B-end) - (if emerge-auto-advance - (emerge-next-difference))))) +(defun emerge-combine-versions-internal (combine-template force) + (let ((operate (lambda (diff-vector) + (emerge-combine-versions-edit diff-vector + combine-template)))) (emerge-select-version force operate operate operate))) -(defvar emerge-combine-template) - -(defun emerge-combine-versions-edit (merge-begin merge-end - A-begin A-end B-begin B-end) +(defun emerge-combine-versions-edit (diff-vector combine-template) (with-current-buffer - emerge-merge-buffer - (delete-region merge-begin merge-end) - (goto-char merge-begin) - (let ((i 0)) - (while (< i (length emerge-combine-template)) - (let ((c (aref emerge-combine-template i))) - (if (= c ?%) - (progn - (setq i (1+ i)) - (setq c - (condition-case nil - (aref emerge-combine-template i) - (error ?%))) - (cond ((= c ?a) - (insert-buffer-substring emerge-A-buffer A-begin A-end)) - ((= c ?b) - (insert-buffer-substring emerge-B-buffer B-begin B-end)) - ((= c ?%) - (insert ?%)) - (t - (insert c)))) - (insert c))) - (setq i (1+ i)))) - (goto-char merge-begin) - (aset diff-vector 6 'combined) - (emerge-refresh-mode-line))) + emerge-merge-buffer + (goto-char (emerge--current-beg diff-vector merge)) + (delete-region (point) (emerge--current-end diff-vector merge)) + (save-excursion + (let ((i 0)) + (while (< i (length combine-template)) + (let ((c (aref combine-template i))) + (if (not (= c ?%)) + (insert c) + (setq i (1+ i)) + (pcase (condition-case nil + (aref combine-template i) + (error ?%)) + (?a + (insert-buffer-substring emerge-A-buffer + (emerge--current-beg diff-vector A) + (emerge--current-end diff-vector A))) + (?b + (insert-buffer-substring emerge-B-buffer + (emerge--current-beg diff-vector B) + (emerge--current-end diff-vector B))) + (?% (insert ?%)) + (c (insert c))))) + (setq i (1+ i))))) + (aset diff-vector 6 'combined) + (emerge-refresh-mode-line) + (if emerge-auto-advance (emerge-next-difference)))) (defun emerge-set-merge-mode (mode) "Set the major mode in a merge buffer. @@ -2617,7 +2599,7 @@ keymap. Leaves merge in fast mode." (emerge-place-flags-in-buffer1 difference before-index after-index))) (defun emerge-place-flags-in-buffer1 (difference before-index after-index) - (let ((buffer-read-only nil)) + (let ((inhibit-read-only t)) ;; insert the flag before the difference (let ((before (aref (aref emerge-globalized-difference-list difference) before-index)) @@ -2682,7 +2664,7 @@ keymap. Leaves merge in fast mode." (defun emerge-remove-flags-in-buffer (buffer before after) (with-current-buffer buffer - (let ((buffer-read-only nil)) + (let ((inhibit-read-only t)) ;; remove the flags, if they're there (goto-char (- before (1- emerge-before-flag-length))) (if (looking-at emerge-before-flag-match) @@ -2717,18 +2699,18 @@ keymap. Leaves merge in fast mode." (emerge-recenter) (emerge-refresh-mode-line)))) -;; Perform tests to see whether user should be allowed to select a version -;; of this difference: -;; a valid difference has been selected; and -;; the difference text in the merge buffer is: -;; the A version (execute a-version), or -;; the B version (execute b-version), or -;; empty (execute neither-version), or -;; argument FORCE is true (execute neither-version) -;; Otherwise, signal an error. (defun emerge-select-version (force a-version b-version neither-version) + "Perform tests to see whether user should be allowed to select a version +of this difference: + a valid difference has been selected; and + the difference text in the merge buffer is: + the A version (execute a-version), or + the B version (execute b-version), or + empty (execute neither-version), or + argument FORCE is true (execute neither-version) +Otherwise, signal an error." (emerge-validate-difference) - (let ((buffer-read-only nil)) + (let ((inhibit-read-only t)) (let* ((diff-vector (aref emerge-difference-list emerge-current-difference)) (A-begin (1+ (aref diff-vector 0))) @@ -2740,13 +2722,13 @@ keymap. Leaves merge in fast mode." (if (emerge-compare-buffers emerge-A-buffer A-begin A-end emerge-merge-buffer merge-begin merge-end) - (funcall a-version) + (funcall a-version diff-vector) (if (emerge-compare-buffers emerge-B-buffer B-begin B-end emerge-merge-buffer merge-begin merge-end) - (funcall b-version) + (funcall b-version diff-vector) (if (or force (= merge-begin merge-end)) - (funcall neither-version) + (funcall neither-version diff-vector) (error "This difference region has been edited"))))))) ;; Read a file name, handling all of the various defaulting rules. @@ -2972,78 +2954,6 @@ If some prefix of KEY has a non-prefix definition, it is redefined." ;; Now define the key (define-key keymap key definition)) -;;;;; Improvements to describe-mode, so that it describes minor modes as well -;;;;; as the major mode -;;(defun describe-mode (&optional minor) -;; "Display documentation of current major mode. -;;If optional arg MINOR is non-nil (or prefix argument is given if interactive), -;;display documentation of active minor modes as well. -;;For this to work correctly for a minor mode, the mode's indicator variable -;;\(listed in `minor-mode-alist') must also be a function whose documentation -;;describes the minor mode." -;; (interactive) -;; (with-output-to-temp-buffer "*Help*" -;; (princ mode-name) -;; (princ " Mode:\n") -;; (princ (documentation major-mode)) -;; (let ((minor-modes minor-mode-alist) -;; (locals (buffer-local-variables))) -;; (while minor-modes -;; (let* ((minor-mode (car (car minor-modes))) -;; (indicator (car (cdr (car minor-modes)))) -;; (local-binding (assq minor-mode locals))) -;; ;; Document a minor mode if it is listed in minor-mode-alist, -;; ;; bound locally in this buffer, non-nil, and has a function -;; ;; definition. -;; (if (and local-binding -;; (cdr local-binding) -;; (fboundp minor-mode)) -;; (progn -;; (princ (format "\n\n\n%s minor mode (indicator%s):\n" -;; minor-mode indicator)) -;; (princ (documentation minor-mode))))) -;; (setq minor-modes (cdr minor-modes)))) -;; (with-current-buffer standard-output -;; (help-mode)) -;; (help-print-return-message))) - -;; This goes with the redefinition of describe-mode. -;;;; Adjust things so that keyboard macro definitions are documented correctly. -;;(fset 'defining-kbd-macro (symbol-function 'start-kbd-macro)) - -;; substitute-key-definition should work now. -;;;; Function to shadow a definition in a keymap with definitions in another. -;;(defun emerge-shadow-key-definition (olddef newdef keymap shadowmap) -;; "Shadow OLDDEF with NEWDEF for any keys in KEYMAP with entries in SHADOWMAP. -;;In other words, SHADOWMAP will now shadow all definitions of OLDDEF in KEYMAP -;;with NEWDEF. Does not affect keys that are already defined in SHADOWMAP, -;;including those whose definition is OLDDEF." -;; ;; loop through all keymaps accessible from keymap -;; (let ((maps (accessible-keymaps keymap))) -;; (while maps -;; (let ((prefix (car (car maps))) -;; (map (cdr (car maps)))) -;; ;; examine a keymap -;; (if (arrayp map) -;; ;; array keymap -;; (let ((len (length map)) -;; (i 0)) -;; (while (< i len) -;; (if (eq (aref map i) olddef) -;; ;; set the shadowing definition -;; (let ((key (concat prefix (char-to-string i)))) -;; (emerge-define-key-if-possible shadowmap key newdef))) -;; (setq i (1+ i)))) -;; ;; sparse keymap -;; (while map -;; (if (eq (cdr-safe (car-safe map)) olddef) -;; ;; set the shadowing definition -;; (let ((key -;; (concat prefix (char-to-string (car (car map)))))) -;; (emerge-define-key-if-possible shadowmap key newdef))) -;; (setq map (cdr map))))) -;; (setq maps (cdr maps))))) - ;; Define a key if it (or a prefix) is not already defined in the map. (defun emerge-define-key-if-possible (keymap key definition) ;; look up the present definition of the key @@ -3057,18 +2967,6 @@ If some prefix of KEY has a non-prefix definition, it is redefined." (if (not present) (define-key keymap key definition))))) -;; Ordinary substitute-key-definition should do this now. -;;(defun emerge-recursively-substitute-key-definition (olddef newdef keymap) -;; "Like `substitute-key-definition', but act recursively on subkeymaps. -;;Make sure that subordinate keymaps aren't shared with other keymaps! -;;\(`copy-keymap' will suffice.)" -;; ;; Loop through all keymaps accessible from keymap -;; (let ((maps (accessible-keymaps keymap))) -;; (while maps -;; ;; Substitute in this keymap -;; (substitute-key-definition olddef newdef (cdr (car maps))) -;; (setq maps (cdr maps))))) - ;; Show the name of the file in the buffer. (defun emerge-show-file-name () "Displays the name of the file loaded into the current buffer. commit 9b0e8a4c6b540dcb962607763846040942858c5a Author: Paul Eggert Date: Tue Apr 3 17:30:48 2018 -0700 Pacify GCC when --enable-profiling * src/conf_post.h (PROFILING): Undef if not on a platform that supports it. Simplify uses accordingly. * src/emacs.c (etext) [PROFILING]: Declare at top level to avoid GCC warning. diff --git a/src/conf_post.h b/src/conf_post.h index 69f686d72d..00e283d289 100644 --- a/src/conf_post.h +++ b/src/conf_post.h @@ -344,6 +344,10 @@ extern int emacs_setenv_TZ (char const *); # define vfork fork #endif +#if ! (defined __FreeBSD__ || defined GNU_LINUX || defined __MINGW32__) +# undef PROFILING +#endif + /* Some versions of GNU/Linux define noinline in their headers. */ #ifdef noinline #undef noinline diff --git a/src/dispnew.c b/src/dispnew.c index 56f125218d..324c05ddc4 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -234,9 +234,7 @@ DEFUN ("dump-redisplay-history", Fdump_redisplay_history, #endif /* GLYPH_DEBUG */ -#if (defined PROFILING \ - && (defined __FreeBSD__ || defined GNU_LINUX || defined __MINGW32__) \ - && !HAVE___EXECUTABLE_START) +#if defined PROFILING && !HAVE___EXECUTABLE_START /* This function comes first in the Emacs executable and is used only to estimate the text start for profiling. */ void diff --git a/src/emacs.c b/src/emacs.c index 8ea61b71fb..f25e612664 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -94,10 +94,14 @@ along with GNU Emacs. If not, see . */ #include "getpagesize.h" #include "gnutls.h" -#if (defined PROFILING \ - && (defined __FreeBSD__ || defined GNU_LINUX || defined __MINGW32__)) +#ifdef PROFILING # include extern void moncontrol (int mode); +# ifdef __MINGW32__ +extern unsigned char etext asm ("etext"); +# else +extern char etext; +# endif #endif #ifdef HAVE_SETLOCALE @@ -1700,22 +1704,14 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem GNU/Linux and MinGW. It might work on some other systems too. Give it a try and tell us if it works on your system. To compile for profiling, use the configure option --enable-profiling. */ -#if defined (__FreeBSD__) || defined (GNU_LINUX) || defined (__MINGW32__) #ifdef PROFILING if (initialized) { -#ifdef __MINGW32__ - extern unsigned char etext asm ("etext"); -#else - extern char etext; -#endif - atexit (_mcleanup); monstartup ((uintptr_t) __executable_start, (uintptr_t) &etext); } else moncontrol (0); -#endif #endif initialized = 1; diff --git a/src/lisp.h b/src/lisp.h index c931d9c8f0..a18b64a588 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -3596,8 +3596,7 @@ extern void replace_range_2 (ptrdiff_t, ptrdiff_t, ptrdiff_t, ptrdiff_t, extern void syms_of_insdel (void); /* Defined in dispnew.c. */ -#if (defined PROFILING \ - && (defined __FreeBSD__ || defined GNU_LINUX || defined __MINGW32__)) +#ifdef PROFILING _Noreturn void __executable_start (void); #endif extern Lisp_Object Vwindow_system; commit 3109d2bb17f975c045e1b683e73254e6d24ab017 Author: Nicolas Petton Date: Tue Apr 3 22:46:40 2018 +0200 ; * lisp/ldefs-boot.el: Update. diff --git a/lisp/ldefs-boot.el b/lisp/ldefs-boot.el index c01d17a50e..5ac7c4a877 100644 --- a/lisp/ldefs-boot.el +++ b/lisp/ldefs-boot.el @@ -38667,10 +38667,20 @@ Zone out, completely. ;;;;;; "eshell/em-term.el" "eshell/em-tramp.el" "eshell/em-unix.el" ;;;;;; "eshell/em-xtra.el" "facemenu.el" "faces.el" "files.el" "font-core.el" ;;;;;; "font-lock.el" "format.el" "frame.el" "help.el" "hfy-cmap.el" -;;;;;; "ibuf-ext.el" "indent.el" "international/characters.el" "international/charscript.el" -;;;;;; "international/cp51932.el" "international/eucjp-ms.el" "international/mule-cmds.el" -;;;;;; "international/mule-conf.el" "international/mule.el" "isearch.el" -;;;;;; "jit-lock.el" "jka-cmpr-hook.el" "language/burmese.el" "language/cham.el" +;;;;;; "ibuf-ext.el" "indent.el" "international/characters.el" "international/charprop.el" +;;;;;; "international/charscript.el" "international/cp51932.el" +;;;;;; "international/eucjp-ms.el" "international/mule-cmds.el" +;;;;;; "international/mule-conf.el" "international/mule.el" "international/uni-bidi.el" +;;;;;; "international/uni-brackets.el" "international/uni-category.el" +;;;;;; "international/uni-combining.el" "international/uni-comment.el" +;;;;;; "international/uni-decimal.el" "international/uni-decomposition.el" +;;;;;; "international/uni-digit.el" "international/uni-lowercase.el" +;;;;;; "international/uni-mirrored.el" "international/uni-name.el" +;;;;;; "international/uni-numeric.el" "international/uni-old-name.el" +;;;;;; "international/uni-special-lowercase.el" "international/uni-special-titlecase.el" +;;;;;; "international/uni-special-uppercase.el" "international/uni-titlecase.el" +;;;;;; "international/uni-uppercase.el" "isearch.el" "jit-lock.el" +;;;;;; "jka-cmpr-hook.el" "language/burmese.el" "language/cham.el" ;;;;;; "language/chinese.el" "language/cyrillic.el" "language/czech.el" ;;;;;; "language/english.el" "language/ethiopic.el" "language/european.el" ;;;;;; "language/georgian.el" "language/greek.el" "language/hebrew.el" commit 86825c4242d70b37e5c1b439cd33ba8e2ecf0406 Author: Nicolas Petton Date: Tue Apr 3 22:33:13 2018 +0200 * etc/NEWS: Remove temporary markup. diff --git a/etc/NEWS b/etc/NEWS index 4f7bf31620..823882c5c6 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -15,24 +15,15 @@ in older Emacs versions. You can narrow news to a specific version by calling 'view-emacs-news' with a prefix argument or by typing C-u C-h C-n. -Temporary note: -+++ indicates that all necessary documentation updates have been done. - (This means all the relevant manuals in doc/ AND lisp doc-strings.) ---- means doc strings are updated, and no change in the manuals is needed. -When you add a new item, use the appropriate mark if you are sure it applies, - * Installation Changes in Emacs 26.1 ---- ** By default libgnutls is now required when building Emacs. Use 'configure --with-gnutls=no' to build even when GnuTLS is missing. ---- ** GnuTLS version 2.12.2 or later is now required, instead of merely version 2.6.6 or later. -+++ ** The new option 'configure --with-mailutils' causes Emacs to rely on GNU Mailutils to retrieve email. It is recommended, and is the default if GNU Mailutils is installed. When --with-mailutils is not @@ -42,18 +33,15 @@ via insecure channels. To avoid this problem, use either --with-mailutils or --without-pop when configuring; --without-pop is the default on platforms other than native MS-Windows. ---- ** The new option 'configure --enable-gcc-warnings=warn-only' causes GCC to issue warnings without stopping the build. This behavior is now the default in developer builds. As before, use '--disable-gcc-warnings' to suppress GCC's warnings, and '--enable-gcc-warnings' to stop the build if GCC issues warnings. ---- ** When GCC warnings are enabled, '--enable-check-lisp-object-type' is now enabled by default when configuring. -+++ ** The Emacs server now has socket-launching support. This allows socket based activation, where an external process like systemd can invoke the Emacs server process upon a socket connection event and @@ -61,13 +49,11 @@ hand the socket over to Emacs. Emacs uses this socket to service emacsclient commands. This new functionality can be disabled with the configure option '--disable-libsystemd'. -+++ ** A systemd user unit file is provided. Use it in the standard way: 'systemctl --user enable emacs'. (If your Emacs is installed in a non-standard location, you may need to copy the emacs.service file to eg ~/.config/systemd/user/) ---- ** New configure option '--disable-build-details' attempts to build an Emacs that is more likely to be reproducible; that is, if you build and install Emacs twice, the second Emacs is a copy of the first. @@ -76,7 +62,6 @@ Deterministic builds omit the build date from the output of the following variables nil: 'emacs-build-system', 'emacs-build-time', 'erc-emacs-build-time'. ---- ** Emacs can now be built with support for Little CMS. If the lcms2 library is installed, Emacs will enable features built on @@ -86,27 +71,23 @@ linked to Little CMS exposes color management functions in Lisp: the color metrics 'lcms-cie-de2000' and 'lcms-cam02-ucs', as well as functions for conversion to and from CIE CAM02 and CAM02-UCS. ---- ** The configure option '--with-gameuser' now defaults to 'no', as this appears to be the most common configuration in practice. When it is 'no', the shared game directory and the auxiliary program update-game-score are no longer needed and are not installed. ---- ** Emacs no longer works on IRIX. We expect that Emacs users are not affected by this, as SGI stopped supporting IRIX in December 2013. * Startup Changes in Emacs 26.1 -+++ ** New option '--fg-daemon'. This is the same as '--daemon', except it runs in the foreground and does not fork. This is intended for modern init systems such as systemd, which manage many of the traditional aspects of daemon behavior themselves. '--bg-daemon' is now an alias for '--daemon'. -+++ ** New option '--module-assertions'. When given this option, Emacs will perform expensive correctness checks when dealing with dynamic modules. This is intended for module @@ -114,27 +95,23 @@ authors that wish to verify that their module conforms to the module requirements. The option makes Emacs abort if a module-related assertion triggers. -+++ ** Emacs now supports 24-bit colors on capable text terminals. Terminal is automatically initialized to use 24-bit colors if the required capabilities are found in terminfo. See the FAQ node "(efaq) Colors on a TTY" for more information. -+++ ** Emacs now obeys the X resource "scrollBar" at startup. The effect is similar to that of "toolBar" resource on the tool bar. * Changes in Emacs 26.1 -+++ ** Option 'buffer-offer-save' can be set to new value, 'always'. When set to 'always', the command 'save-some-buffers' will always offer this buffer for saving. ** Security vulnerability related to Enriched Text mode is removed. -+++ *** Enriched Text mode does not evaluate Lisp in 'display' properties. This feature allows saving 'display' properties as part of text. Emacs 'display' properties support evaluation of arbitrary Lisp forms @@ -154,14 +131,12 @@ init file: '(defun enriched-decode-display-prop (start end &optional param) (list start end))) -+++ ** Functions in 'write-contents-functions' can fully short-circuit the 'save-buffer' process. Previously, saving a buffer that was not visiting a file would always prompt for a file name. Now it only does so if 'write-contents-functions' is nil (or all its functions return nil). ---- ** New variable 'executable-prefix-env' for inserting magic signatures. This variable affects the format of the interpreter magic number inserted by 'executable-set-magic'. If non-nil, the magic number now @@ -170,11 +145,9 @@ determined by 'executable-prefix', which is by default "#!/path/to/interpreter". By default, 'executable-prefix-env' is nil, so the default behavior is not changed. -+++ ** The variable 'emacs-version' no longer includes the build number. This is now stored separately in a new variable, 'emacs-build-number'. -+++ ** Emacs now provides a limited form of concurrency with Lisp threads. Concurrency in Emacs Lisp is "mostly cooperative", meaning that Emacs will only switch execution between threads at well-defined @@ -187,12 +160,10 @@ buffer and its own match data. See the chapter "(elisp) Threads" in the ELisp manual for full documentation of these facilities. -+++ ** The new user variable 'electric-quote-chars' provides a list of curved quotes for 'electric-quote-mode', allowing user to choose the types of quotes to be used. ---- ** The new user option 'electric-quote-context-sensitive' makes 'electric-quote-mode' context sensitive. If it is non-nil, you can type an ASCII apostrophe to insert an opening or closing quote, @@ -202,7 +173,6 @@ line, after a whitespace character, and after an opening parenthesis; and it will replace the apostrophe by a closing quote character in all other cases. ---- ** The new variable 'electric-quote-inhibit-functions' controls when to disable electric quoting based on context. Major modes can add functions to this list; Emacs will temporarily disable @@ -210,13 +180,11 @@ functions to this list; Emacs will temporarily disable This can be used by major modes that derive from 'text-mode' but allow inline code segments, such as 'markdown-mode'. -+++ ** The new user variable 'dired-omit-case-fold' allows the user to customize the case-sensitivity of dired-omit-mode. It defaults to the same sensitivity as that of the filesystem for the corresponding dired buffer. -+++ ** Emacs now uses double buffering to reduce flicker when editing and resizing graphical Emacs frames on the X Window System. This support requires the DOUBLE-BUFFER extension, which major X servers have @@ -231,16 +199,13 @@ frame by evaluating this form: (modify-frame-parameters nil '((inhibit-double-buffering . t))) ---- ** The customization group 'wp', whose label was "text", is now deprecated. Use the new group 'text', which inherits from 'wp', instead. -+++ ** The new function 'call-shell-region' executes a command in an inferior shell with the buffer region as input. -+++ ** The new user option 'shell-command-dont-erase-buffer' controls if the output buffer is erased between shell commands; if non-nil, the output buffer is not erased; this variable also controls where @@ -250,19 +215,16 @@ When 'shell-command-dont-erase-buffer' is nil, the default value, the behavior of 'shell-command', 'shell-command-on-region' and 'async-shell-command' is as usual. -+++ ** The new user option 'async-shell-command-display-buffer' controls whether the output buffer of an asynchronous command is shown immediately, or only when there is output. -+++ ** New user option 'mouse-select-region-move-to-beginning'. This option controls the position of point when double-clicking mouse-1 on the end of a parenthetical grouping or string-delimiter: the default value nil keeps point at the end of the region, setting it to non-nil moves point to the beginning of the region. -+++ ** New user option 'mouse-drag-and-drop-region'. This option allows you to drag the entire region of text to another place or another buffer. Its behavior is customizable via the new @@ -270,63 +232,50 @@ options 'mouse-drag-and-drop-region-cut-when-buffers-differ', 'mouse-drag-and-drop-region-show-tooltip', and 'mouse-drag-and-drop-region-show-cursor'. -+++ ** The new user option 'confirm-kill-processes' allows the user to skip a confirmation prompt for killing subprocesses when exiting Emacs. When set to t (the default), Emacs will prompt for confirmation before killing subprocesses on exit, which is the same behavior as before. ---- ** 'find-library-name' will now fall back on looking at 'load-history' to try to locate libraries that have been loaded with an explicit path outside 'load-path'. -+++ ** Faces in 'minibuffer-prompt-properties' no longer overwrite properties in the text in functions like 'read-from-minibuffer', but instead are added to the end of the face list. This allows users to say things like '(read-from-minibuffer (propertize "Enter something: " 'face 'bold))'. -+++ ** The new variable 'extended-command-suggest-shorter' has been added to control whether to suggest shorter 'M-x' commands or not. ---- ** icomplete now respects 'completion-ignored-extensions'. -+++ ** Non-breaking hyphens are now displayed with the 'nobreak-hyphen' face instead of the 'escape-glyph' face. -+++ ** Approximations to quotes are now displayed with the new 'homoglyph' face instead of the 'escape-glyph' face. -+++ ** New face 'header-line-highlight'. This face is the header-line analogue of 'mode-line-highlight'; it should be the preferred mouse-face for mouse-sensitive elements in the header line. ---- ** 'C-x h' ('mark-whole-buffer') will now avoid marking the prompt part of minibuffers. ---- ** 'fill-paragraph' no longer marks the buffer as changed unless it actually changed something. ---- ** The locale language name 'ca' is now mapped to the language environment 'Catalan', which has been added. ---- ** 'align-regexp' has a separate history for its interactive argument. 'align-regexp' no longer shares its history with all other history-less functions that use 'read-string'. -+++ ** The networking code has been reworked so that it's more asynchronous than it was (when specifying :nowait t in 'make-network-process'). How asynchronous it is varies based on the @@ -342,13 +291,11 @@ to deal with asynchronous sockets is to avoid interacting with them until they have changed status to "run". This is most easily done from a process sentinel. ---- ** 'make-network-process' and 'open-network-stream' sometimes allowed :service to be an integer string (e.g., :service "993") and sometimes required an integer (e.g., :service 993). This difference has been eliminated, and integer strings work everywhere. ---- ** It is possible to disable attempted recovery on fatal signals. Two new variables support disabling attempts to recover from stack overflow and to avoid automatic auto-save when Emacs is delivered a @@ -363,91 +310,73 @@ These variables are for users who would like to avoid the small probability of data corruption due to techniques Emacs uses to recover in these situations. -+++ ** File local and directory local variables are now initialized each time the major mode is set, not just when the file is first visited. These local variables will thus not vanish on setting a major mode. -+++ ** A second dir-local file (.dir-locals-2.el) is now accepted. See the doc string of 'dir-locals-file' for more information. -+++ ** Connection-local variables can be used to specify local variables with a value depending on the connected remote server. For details, see the node "(elisp) Connection Local Variables" in the ELisp manual. ---- ** International domain names (IDNA) are now encoded via the new puny.el library, so that one can visit Web sites with non-ASCII URLs. -+++ ** The new 'list-timers' command lists all active timers in a buffer, where you can cancel them with the 'c' command. -+++ ** 'switch-to-buffer-preserve-window-point' now defaults to t. Applications that call 'switch-to-buffer' and want to show the buffer at the position of its point should use 'pop-to-buffer-same-window' in lieu of 'switch-to-buffer'. -+++ ** The new variable 'debugger-stack-frame-as-list' allows displaying all call stack frames in a Lisp backtrace buffer as lists. Both debug.el and edebug.el have been updated to heed to this variable. ---- ** Values in call stack frames are now displayed using 'cl-prin1'. The old behavior of using 'prin1' can be restored by customizing the new option 'debugger-print-function'. -+++ ** NUL bytes in text copied to the system clipboard are now replaced with "\0". -+++ ** The new variable 'x-ctrl-keysym' has been added to the existing roster of X keysyms. It can be used in combination with another variable of this kind to swap modifiers in Emacs. ---- ** New input methods: 'cyrillic-tuvan', 'polish-prefix', 'uzbek-cyrillic'. ---- ** The 'dutch' input method no longer attempts to support Turkish too. Also, it no longer converts 'IJ' and 'ij' to the compatibility characters U+0132 LATIN CAPITAL LIGATURE IJ and U+0133 LATIN SMALL LIGATURE IJ. -+++ ** File name quoting by adding the prefix "/:" is now possible for the local part of a remote file name. Thus, if you have a directory named "/~" on the remote host "foo", you can prevent it from being substituted by a home directory by writing it as "/foo:/:/~/file". -+++ ** The new variable 'maximum-scroll-margin' allows having effective settings of 'scroll-margin' up to half the window size, instead of always restricting the margin to a quarter of the window. -+++ ** Emacs can scroll horizontally using mouse, touchpad, and trackbar. You can enable this by customizing 'mouse-wheel-tilt-scroll'. If you want to reverse the direction of the scroll, customize 'mouse-wheel-flip-direction'. -+++ ** The default GnuTLS priority string now includes %DUMBFW. This is to avoid bad behavior in some firewalls, which causes the connection to be closed by the remote host. ** Emacsclient changes -+++ *** Emacsclient has a new option '-u' / '--suppress-output'. This option suppresses display of return values from the server process. -+++ *** Emacsclient has a new option '-T' / '--tramp'. This helps with using a local Emacs session as the server for a remote emacsclient. With appropriate setup, one can now set the EDITOR @@ -455,40 +384,32 @@ environment variable on a remote machine to emacsclient, and use the local Emacs to edit remote files via Tramp. See the node "(emacs) emacsclient Options" in the user manual for the details. -+++ *** Emacsclient now accepts command-line options in ALTERNATE_EDITOR and '--alternate-editor'. For example, ALTERNATE_EDITOR="emacs -Q -nw". Arguments may be quoted "like this", so that for example an absolute path containing a space may be specified; quote escaping is not supported. ---- ** New user option 'dig-program-options' and extended functionality for DNS-querying functions 'nslookup-host', 'dns-lookup-host', and 'run-dig'. Each function now accepts an optional name server argument interactively (with a prefix argument) and non-interactively. -+++ ** 'describe-key-briefly' now ignores mouse movement events. -+++ ** The new variable 'eval-expression-print-maximum-character' prevents large integers from being displayed as characters by 'M-:' and similar commands. ---- ** Two new commands for finding the source code of Emacs Lisp libraries: 'find-library-other-window' and 'find-library-other-frame'. -+++ ** The new variable 'display-raw-bytes-as-hex' allows you to change the display of raw bytes from octal to hex. -+++ ** You can now provide explicit field numbers in format specifiers. For example, '(format "%2$s %1$s %2$s" "X" "Y")' produces "Y X Y". -+++ ** Emacs now supports optional display of line numbers in the buffer. This is similar to what 'linum-mode' provides, but much faster and doesn't usurp the display margin for the line numbers. Customize the @@ -514,14 +435,12 @@ line-number display in a window can use the new function Users and developers are encouraged to switch to this new feature instead. ---- ** The new user option 'arabic-shaper-ZWNJ-handling' controls how to handle ZWNJ in Arabic text rendering. * Editing Changes in Emacs 26.1 -+++ ** New variable 'column-number-indicator-zero-based'. Traditionally, in Column Number mode, the displayed column number counts from zero starting at the left margin of the window. This @@ -531,14 +450,12 @@ you may set this variable to nil. (Behind the scenes, there is now a new mode line construct, '%C', which operates exactly as '%c' does except that it counts from one.) -+++ ** New single-line horizontal scrolling mode. The 'auto-hscroll-mode' variable can now have a new special value, 'current-line', which causes only the line where the cursor is displayed to be horizontally scrolled when lines are truncated on display and point moves outside the left or right window margin. -+++ ** New mode line constructs '%o' and '%q', and user option 'mode-line-percent-position'. '%o' displays the "degree of travel" of the window through the buffer. Unlike the default '%p', this @@ -548,32 +465,26 @@ the end of the window, e.g. "5-17%". The new option 'mode-line-percent-position' makes it easier to switch between '%p', '%P', and these new constructs. -+++ ** Two new user options 'list-matching-lines-jump-to-current-line' and 'list-matching-lines-current-line-face' to show the current line highlighted in *Occur* buffer. -+++ ** The 'occur' command can now operate on the region. -+++ ** New bindings for 'query-replace-map'. 'undo', undo the last replacement; bound to 'u'. 'undo-all', undo all replacements; bound to 'U'. ---- ** 'delete-trailing-whitespace' deletes whitespace after form feed. In modes where form feed was treated as a whitespace character, 'delete-trailing-whitespace' would keep lines containing it unchanged. It now deletes whitespace after the last form feed thus behaving the same as in modes where the character is not whitespace. ---- ** Emacs no longer prompts about editing a changed file when the file's content is unchanged. Instead of only checking the modification time, Emacs now also checks the file's actual content before prompting the user. ---- ** Various casing improvements. *** 'upcase', 'upcase-region' et al. convert title case characters @@ -591,14 +502,12 @@ Strings such as ΌΣΟΣ are now correctly converted to Όσος when capitalized instead of incorrect Όσοσ (compare lowercase sigma at the end of the word). -+++ ** Emacs can now auto-save buffers to visited files in a more robust manner via the new mode 'auto-save-visited-mode'. Unlike 'auto-save-visited-file-name', this mode uses the normal saving procedure and therefore obeys saving hooks. 'auto-save-visited-file-name' is now obsolete. -+++ ** New behavior of 'mark-defun'. Prefix argument selects that many (or that many more) defuns. Negative prefix arg flips the direction of selection. Also, @@ -607,26 +516,22 @@ Negative prefix arg flips the direction of selection. Also, defun are selected unless they are separated from the defun by a blank line. ---- ** New command 'replace-buffer-contents'. This command replaces the contents of the accessible portion of the current buffer with the contents of the accessible portion of a different buffer while keeping point, mark, markers, and text properties as intact as possible. -+++ ** New commands 'apropos-local-variable' and 'apropos-local-value'. These are buffer-local versions of 'apropos-variable' and 'apropos-value', respectively. They show buffer-local variables whose names and values, respectively, match a given pattern. -+++ ** More user control of reordering bidirectional text for display. The two new variables, 'bidi-paragraph-start-re' and 'bidi-paragraph-separate-re', allow customization of what exactly are paragraphs, for the purposes of bidirectional display. ---- ** New variable 'x-wait-for-event-timeout'. This controls how long Emacs will wait for updates to the graphical state to take effect (making a frame visible, for example). @@ -634,27 +539,21 @@ state to take effect (making a frame visible, for example). * Changes in Specialized Modes and Packages in Emacs 26.1 ---- ** Emacs 26.1 comes with Org v9.1.6. See the file ORG-NEWS for user-visible changes in Org. ---- ** New function 'cl-generic-p'. ** Dired -+++ *** You can answer 'all' in 'dired-do-delete' to delete recursively all remaining directories without more prompts. -+++ *** Dired supports wildcards in the directory part of the file names. -+++ *** You can now use '`?`' in 'dired-do-shell-command'. It gets replaced by the current file name, like ' ? '. -+++ *** A new option 'dired-always-read-filesystem' defaulting to nil. If non-nil, buffers visiting files are reverted before they are searched; for instance, in 'dired-mark-files-containing-regexp' a @@ -662,7 +561,6 @@ non-nil value of this option means the file is revisited in a temporary buffer; this temporary buffer is the actual buffer searched: the original buffer visiting the file is not modified. ---- *** Users can now customize mouse clicks in Dired in a more flexible way. The new command 'dired-mouse-find-file' can be bound to a mouse click and used to visit files/directories in Dired in the selected window. @@ -672,78 +570,62 @@ that invoke 'dired-mouse-find-file' with non-default optional arguments, to tailor the effects of mouse clicks on file names in Dired buffers. -+++ *** In wdired, when editing files to contain slash characters, the resulting directories are automatically created. Whether to do this is controlled by the 'wdired-create-parent-directories' variable. -+++ *** 'W' is now bound to 'browse-url-of-dired-file', and is useful for viewing HTML files and the like. ---- *** New variable 'dired-clean-confirm-killing-deleted-buffers' controls whether Dired asks to kill buffers visiting deleted files and directories. The default is t, so Dired asks for confirmation, to keep previous behavior. ---- ** html2text is now marked obsolete. ---- ** smerge-refine-regions can refine regions in separate buffers. ---- ** Info menu and index completion uses substring completion by default. This can be customized via the 'info-menu' category in 'completion-category-overrides'. -+++ ** The ancestor buffer is shown by default in 3-way merges. A new option 'ediff-show-ancestor' and a new toggle 'ediff-toggle-show-ancestor'. ---- ** TeX: Add luatex and xetex as alternatives to pdftex ** Electric-Buffer-menu -+++ *** Key 'U' is bound to 'Buffer-menu-unmark-all' and key 'M-DEL' is bound to 'Buffer-menu-unmark-all-buffers'. -+++ ** hideshow mode got four key bindings that are analogous to outline mode bindings: 'C-c @ C-a', 'C-c @ C-t', 'C-c @ C-d', and 'C-c @ C-e'. ** bs ---- *** Two new commands 'bs-unmark-all', bound to 'U', and 'bs-unmark-previous', bound to . ** Buffer-menu -+++ *** Two new commands 'Buffer-menu-unmark-all', bound to 'U' and 'Buffer-menu-unmark-all-buffers', bound to 'M-DEL'. ---- ** Checkdoc *** 'checkdoc-arguments-in-order-flag' now defaults to nil. ** Gnus ---- *** The ~/.newsrc file will now only be saved if the native select method is an NNTP select method. -+++ *** A new command for sorting articles by readedness marks has been added: 'C-c C-s C-m C-m'. -+++ *** In 'message-citation-line-format' the '%Z' format is now the time zone name instead of the numeric form. The '%z' format continues to be the numeric form. The new behavior is compatible with @@ -751,72 +633,57 @@ be the numeric form. The new behavior is compatible with ** Ibuffer ---- *** New command 'ibuffer-jump'. ---- *** New filter commands 'ibuffer-filter-by-basename', 'ibuffer-filter-by-file-extension', 'ibuffer-filter-by-directory', 'ibuffer-filter-by-starred-name', 'ibuffer-filter-by-modified' and 'ibuffer-filter-by-visiting-file'; bound respectively to '/b', '/.', '//', '/*', '/i' and '/v'. ---- *** Two new commands 'ibuffer-filter-chosen-by-completion' and 'ibuffer-and-filter', the second bound to '/&'. ---- *** The commands 'ibuffer-pop-filter', 'ibuffer-pop-filter-group', 'ibuffer-or-filter' and 'ibuffer-filter-disable' have the alternative bindings '/', '/S-', '/|' and '/DEL', respectively. ---- *** The data format specifying filters has been extended to allow explicit logical 'and', and a more flexible form for logical 'not'. See 'ibuffer-filtering-qualifiers' doc string for full details. ---- *** A new command 'ibuffer-copy-buffername-as-kill'; bound to 'B'. ---- *** New command 'ibuffer-change-marks'; bound to '* c'. ---- *** A new command 'ibuffer-mark-by-locked' to mark all locked buffers; bound to '% L'. ---- *** A new option 'ibuffer-locked-char' to indicate locked buffers; Ibuffer shows a new column displaying 'ibuffer-locked-char' for locked buffers. ---- *** A new command 'ibuffer-unmark-all-marks' to unmark all buffers without asking confirmation; bound to 'U'; 'ibuffer-do-replace-regexp' bound to 'r'. ---- *** A new command 'ibuffer-mark-by-content-regexp' to mark buffers whose content matches a regexp; bound to '% g'. ---- *** Two new options 'ibuffer-never-search-content-name' and 'ibuffer-never-search-content-mode' used by 'ibuffer-mark-by-content-regexp'. ** Browse-URL ---- *** Support for opening links to man pages in Man or WoMan mode. ** Comint ---- *** New user option 'comint-move-point-for-matching-input' to control where to place point after 'C-c M-r' and 'C-c M-s'. -+++ *** New user option 'comint-terminfo-terminal'. This option allows control of the value of the TERM environment variable Emacs puts into the environment of the Comint mode and its @@ -825,42 +692,35 @@ default is "dumb", for compatibility with previous behavior. ** Compilation mode ---- *** Messages from CMake are now recognized. -+++ *** The number of errors, warnings, and informational messages is now displayed in the mode line. These are updated as compilation proceeds. ** Grep ---- *** Grep commands will now use GNU grep's '--null' option if available, which allows distinguishing the filename from contents if they contain colons. This can be controlled by the new custom option 'grep-use-null-filename-separator'. ---- *** The grep/rgrep/lgrep functions will now ask about saving files before running. This is controlled by the 'grep-save-buffers' variable. ** Edebug ---- *** Edebug can be prevented from pausing 1 second after reaching a breakpoint (e.g. with "f" and "o") by customizing the new option 'edebug-sit-on-break'. -+++ *** New customizable option 'edebug-max-depth'. This allows you to enlarge the maximum recursion depth when instrumenting code. ** Eshell ---- *** 'eshell-input-filter's value is now a named function 'eshell-input-filter-default', and has a new custom option 'eshell-input-filter-initial-space' to ignore adding commands prefixed @@ -868,7 +728,6 @@ with blank space to eshell history. ** EUDC ---- *** Backward compatibility support for BBDB versions less than 3 (i.e., BBDB 2.x) is deprecated and will likely be removed in the next major release of Emacs. Users of BBDB 2.x should plan to upgrade to @@ -876,29 +735,23 @@ BBDB 3.x. ** eww -+++ *** New 'M-RET' command for opening a link at point in a new eww buffer. -+++ *** A new 's' command for switching to another eww buffer via the minibuffer. ---- *** The 'o' command ('shr-save-contents') has moved to 'O' to avoid collision with the 'o' command from 'image-map'. -+++ *** A new command 'C' ('eww-toggle-colors') can be used to toggle whether to use the HTML-specified colors or not. The user can also customize the 'shr-use-colors' variable. ---- *** Images that are being loaded are now marked with gray "placeholder" images of the size specified by the HTML. They are then replaced by the real images asynchronously, which will also now respect width/height HTML specs (unless they specify widths/heights bigger than the current window). ---- *** The 'w' command on links is now 'shr-maybe-probe-and-copy-url'. 'shr-copy-url' now only copies the url at point; users who wish to avoid accidentally accessing remote links may rebind 'w' and 'u' in @@ -906,7 +759,6 @@ avoid accidentally accessing remote links may rebind 'w' and 'u' in ** Ido ---- *** The commands 'find-alternate-file-other-window', 'dired-other-window', 'dired-other-frame', and 'display-buffer-other-window' are now remapped to Ido equivalents if @@ -914,12 +766,10 @@ Ido mode is active. ** Images -+++ *** Images are automatically scaled before displaying based on the 'image-scaling-factor' variable (if Emacs supports scaling the images in question). -+++ *** It's now possible to specify aspect-ratio preserving combinations of :width/:max-height and :height/:max-width keywords. In either case, the "max" keywords win. (Previously some combinations would, @@ -927,23 +777,19 @@ depending on the aspect ratio of the image, just be ignored and in other instances this would lead to the aspect ratio not being preserved.) -+++ *** Images inserted with 'insert-image' and related functions get a keymap put into the text properties (or overlays) that span the image. This keymap binds keystrokes for manipulating size and rotation, as well as saving the image to a file. These commands are also available in 'image-mode'. -+++ *** A new library for creating and manipulating SVG images has been added. See the "(elisp) SVG Images" section in the ELisp reference manual for details. -+++ *** New setf-able function to access and set image parameters is provided: 'image-property'. ---- *** New commands 'image-scroll-left' and 'image-scroll-right' for 'image-mode' that complement 'image-scroll-up' and 'image-scroll-down': they have the same prefix arg behavior and stop @@ -951,25 +797,20 @@ at image boundaries. ** Image-Dired ---- *** Now provides a minor mode 'image-dired-minor-mode' which replaces the function 'image-dired-setup-dired-keybindings'. ---- *** Thumbnail generation is now asynchronous. The number of concurrent processes is limited by the variable 'image-dired-queue-active-limit'. ---- *** 'image-dired-thumbnail-storage' has a new option 'standard-large' for generating 256x256 thumbnails according to the Thumbnail Managing Standard. ---- *** Inherits movement keys from 'image-mode' for viewing full images. This includes the usual char, line, and page movement commands. ---- *** All the -options types have been changed to argument lists instead of shell command strings. This change affects 'image-dired-cmd-create-thumbnail-options', @@ -981,47 +822,38 @@ instead of shell command strings. This change affects 'image-dired-cmd-pngnq-options', 'image-dired-cmd-pngcrush-options', 'image-dired-cmd-create-standard-thumbnail-options'. ---- *** Recognizes more tools by default, including pngnq-s9 and OptiPNG. ---- *** 'find-file' and related commands now work on thumbnails and displayed images, providing a default argument of the original file name via an addition to 'file-name-at-point-functions'. ---- ** The default 'Info-default-directory-list' no longer checks some obsolete directory suffixes (gnu, gnu/lib, gnu/lib/emacs, emacs, lib, lib/emacs) when searching for info directories. -+++ ** The commands that add ChangeLog entries now prefer a VCS root directory for the ChangeLog file, if none already exists. Customize 'change-log-directory-files' to nil for the old behavior. ---- ** Support for non-string values of 'time-stamp-format' has been removed. ** Message ---- *** 'message-use-idna' now defaults to t (because Emacs comes with built-in IDNA support now). ---- *** When sending HTML messages with embedded images, and you have exiftool installed, and you rotate images with EXIF data (i.e., JPEGs), the rotational information will be inserted into the outgoing image in the message. (The original image will not have its orientation affected.) ---- *** The 'message-valid-fqdn-regexp' variable has been removed, since there are now top-level domains added all the time. Message will no longer warn about sending emails to top-level domains it hasn't heard about. ---- *** 'message-beginning-of-line' (bound to 'C-a') understands folded headers. In 'visual-line-mode' it will look for the true beginning of a header while in non-'visual-line-mode' it will move the point to the indented @@ -1029,102 +861,81 @@ header's value. ** Package -+++ *** The new variable 'package-gnupghome-dir' has been added to control where the GnuPG home directory (used for signature verification) is located and whether GnuPG's option '--homedir' is used or not. ---- *** Deleting a package no longer respects 'delete-by-moving-to-trash'. ** Python -+++ *** The new variable 'python-indent-def-block-scale' has been added. It controls the depth of indentation of arguments inside multi-line function signatures. ** Tramp -+++ *** The method part of remote file names is mandatory now. A valid remote file name starts with "/method:host:" or "/method:user@host:". -+++ *** The new pseudo method "-" is a marker for the default method. "/-::" is the shortest remote file name then. -+++ *** The command 'tramp-change-syntax' allows you to choose an alternative remote file name syntax. -+++ *** New connection method "sg", which supports editing files under a different group ID. -+++ *** New connection method "doas" for OpenBSD hosts. -+++ *** New connection method "gdrive", which allows access to Google Drive onsite repositories. -+++ *** Gateway methods in Tramp have been removed. Instead, the Tramp manual documents how to configure ssh and PuTTY accordingly. -+++ *** Setting the "ENV" environment variable in 'tramp-remote-process-environment' enables reading of shell initialization files. ---- *** Tramp is able now to send SIGINT to remote asynchronous processes. ---- *** Variable 'tramp-completion-mode' is obsoleted. ---- ** 'auto-revert-use-notify' is set back to t in 'global-auto-revert-mode'. ** JS mode ---- *** JS mode now sets 'comment-multi-line' to t. ---- *** New variable 'js-indent-align-list-continuation', when set to nil, will not align continuations of bracketed lists, but will indent them by the fixed width 'js-indent-level'. ** CSS mode ---- *** Support for completing attribute values, at-rules, bang-rules, HTML tags, classes and IDs using the 'completion-at-point' command. Completion candidates for HTML classes and IDs are retrieved from open HTML mode buffers. ---- *** CSS mode now binds 'C-h S' to a function that will show information about a CSS construct (an at-rule, property, pseudo-class, pseudo-element, with the default being guessed from context). By default the information is looked up on the Mozilla Developer Network, but this can be customized using 'css-lookup-url-format'. ---- *** CSS colors are fontified using the color they represent as the background. For instance, #ff0000 would be fontified with a red background. -+++ ** Emacs now supports character name escape sequences in character and string literals. The syntax variants '\N{character name}' and '\N{U+code}' are supported. -+++ ** Prog mode has some support for multi-mode indentation. This allows better indentation support in modes that support multiple programming languages in the same buffer, like literate programming @@ -1138,34 +949,27 @@ more details. ** ERC ---- *** New variable 'erc-default-port-tls' used to connect to TLS IRC servers. ** URL -+++ *** The new function 'url-cookie-delete-cookie' can be used to programmatically delete all cookies, or cookies from a specific domain. -+++ *** 'url-retrieve-synchronously' now takes an optional timeout parameter. ---- *** The URL package now supports HTTPS over proxies supporting CONNECT. -+++ *** 'url-user-agent' now defaults to 'default', and the User-Agent string is computed dynamically based on 'url-privacy-level'. ** VC and related modes -+++ *** 'vc-dir-mode' now binds 'vc-log-outgoing' to 'O'; and has various branch-related commands on a keymap bound to 'B'. -+++ *** 'vc-region-history' is now bound to 'C-x v h', replacing the older 'vc-insert-headers' binding. @@ -1174,22 +978,18 @@ for a single file. ** CC mode ---- *** Opening a .h file will turn C or C++ mode depending on language used. This is done with the help of the 'c-or-c++-mode' function, which analyzes buffer contents to infer whether it's a C or C++ source file. ---- ** New option 'cpp-message-min-time-interval' to allow user control of progress messages in cpp.el. ---- ** New DNS mode command 'dns-mode-ipv6-to-nibbles' to convert IPv6 addresses to a format suitable for reverse lookup zone files. ** Ispell -+++ *** Enchant is now supported as a spell-checker. Enchant is a meta-spell-checker that uses providers such as Hunspell @@ -1201,7 +1001,6 @@ configure different spelling-checkers for different languages. ** Flymake -+++ *** Flymake has been completely redesigned Flymake now annotates arbitrary buffer regions, not just lines. It @@ -1218,7 +1017,6 @@ backend", which has been updated to benefit from the new UI features. ** Term ---- *** 'term-char-mode' now makes its buffer read-only. The buffer is made read-only to prevent changes from being made by @@ -1235,7 +1033,6 @@ the previous behavior. ** Xref -+++ *** When an *xref* buffer is needed, 'TAB' quits and jumps to an xref. A new command 'xref-quit-and-goto-xref', bound to 'TAB' in *xref* @@ -1246,81 +1043,64 @@ the *xref* buffer hadn't been necessary in the first place. * New Modes and Packages in Emacs 26.1 ---- ** New Elisp data-structure library 'radix-tree'. ---- ** New library 'xdg' with utilities for some XDG standards and specs. ** HTML -+++ *** A new submode of 'html-mode', 'mhtml-mode', is now the default mode for *.html files. This mode handles indentation, fontification, and commenting for embedded JavaScript and CSS. ---- ** New mode 'conf-toml-mode' is a sub-mode of 'conf-mode', specialized for editing TOML files. ---- ** New mode 'conf-desktop-mode' is a sub-mode of 'conf-unix-mode', specialized for editing freedesktop.org desktop entries. ---- ** New minor mode 'pixel-scroll-mode' provides smooth pixel-level scrolling. ---- ** New major mode 'less-css-mode' (a minor variant of 'css-mode') for editing Less files. -+++ ** New package 'auth-source-pass' integrates 'auth-source' with the password manager password-store (http://passwordstore.org). * Incompatible Lisp Changes in Emacs 26.1 ---- ** 'password-data' is now a hash-table so that 'password-read' can use any object for the 'key' argument. -+++ ** Command 'dired-mark-extension' now automatically prepends a '.' to the extension when not present. The new command 'dired-mark-suffix' behaves similarly but it doesn't prepend a '.'. -+++ ** Certain cond/pcase/cl-case forms are now compiled using a faster jump table implementation. This uses a new bytecode op 'switch', which isn't compatible with previous Emacs versions. This functionality can be disabled by setting 'byte-compile-cond-use-jump-table' to nil. -+++ ** If 'comment-auto-fill-only-comments' is non-nil, 'auto-fill-function' is now called only if either no comment syntax is defined for the current buffer or the self-insertion takes place within a comment. ---- ** The alist 'ucs-names' is now a hash table. ---- ** 'if-let' and 'when-let' now support binding lists as defined by the SRFI-2 (Scheme Request for Implementation 2). ---- ** 'C-up', 'C-down', 'C-left' and 'C-right' are now defined in term mode to send the same escape sequences that xterm does. This makes things like 'forward-word' in readline work. ---- ** Customizable variable 'query-replace-from-to-separator' now doesn't propertize the string value of the separator. Instead, text properties are added by 'query-replace-read-from'. Additionally, the new nil value restores pre-24.5 behavior of not providing replacement pairs via the history. ---- ** Some obsolete functions, variables, and faces have been removed: *** 'make-variable-frame-local'. Variables cannot be frame-local any more. @@ -1350,68 +1130,57 @@ change FOO, respectively. The exhaustive list of removed variables is: *** Many variables obsoleted in 22.1 referring to face symbols. -+++ ** The variable 'text-quoting-style' is now a customizable option. It controls whether to and how to translate ASCII quotes in messages and help output. Its possible values and their semantics remain unchanged from Emacs 25. In particular, when this variable's value is 'grave', all quotes in formats are output as-is. ---- ** Functions like 'check-declare-file' and 'check-declare-directory' now generate less chatter and more-compact diagnostics. The auxiliary function 'check-declare-errmsg' has been removed. -+++ ** The regular expression character class '[:blank:]' now matches Unicode horizontal whitespace as defined in the Unicode Technical Standard #18. If you only want to match space and tab, use '[ \t]' instead. -+++ ** 'min' and 'max' no longer round their results. Formerly, they returned a floating-point value if any argument was floating-point, which was sometimes numerically incorrect. For example, on a 64-bit host (max 1e16 10000000000000001) now returns its second argument instead of its first. -+++ ** The variable 'old-style-backquotes' has been made internal and renamed to 'lread--old-style-backquotes'. No user code should use this variable. -+++ ** 'default-file-name-coding-system' now defaults to a coding system that does not process CRLF. For example, it defaults to 'utf-8-unix' instead of to 'utf-8'. Before this change, Emacs would sometimes mishandle file names containing these control characters. -+++ ** 'file-attributes', 'file-symlink-p' and 'make-symbolic-link' no longer quietly mutate the target of a local symbolic link, so that Emacs can access and copy them reliably regardless of their contents. The following changes are involved. ---- *** 'file-attributes' and 'file-symlink-p' no longer prepend "/:" to symbolic links whose targets begin with "/" and contain ":". For example, if a symbolic link "x" has a target "/y:z:", '(file-symlink-p "x")' now returns "/y:z:" rather than "/:/y:z:". ---- *** 'make-symbolic-link' no longer looks for file name handlers of target when creating a symbolic link. For example, '(make-symbolic-link "/y:z:" "x")' now creates a symbolic link to "/y:z:" instead of failing. -+++ *** 'make-symbolic-link' removes the remote part of a link target if target and newname have the same remote part. For example, '(make-symbolic-link "/x:y:a" "/x:y:b")' creates a link with the literal string "a"; and '(make-symbolic-link "/x:y:a" "/x:z:b")' creates a link with the literal string "/x:y:a" instead of failing. -+++ *** 'make-symbolic-link' now expands a link target with leading "~" only when the optional third arg is an integer, as when invoked interactively. For example, '(make-symbolic-link "~y" "x")' now @@ -1421,26 +1190,21 @@ avoid this expansion in interactive use, you can now prefix the link target with "/:". For example, '(make-symbolic-link "/:~y" "x" 1)' now creates a link to literal "~y". -+++ ** 'file-truename' returns a quoted file name if the target of a symbolic link has remote file name syntax. -+++ ** Module functions are now implemented slightly differently; in particular, the function 'internal--module-call' has been removed. Code that depends on undocumented internals of the module system might break. ---- ** The argument LOCKNAME of 'write-region' is propagated to file name handlers now. ---- ** When built against recent versions of GTK+, Emacs always uses gtk_window_move for moving frames and ignores the value of the variable 'x-gtk-use-window-move'. The variable is now obsolete. -+++ ** Several functions that create or rename files now treat their destination argument specially only when it is a directory name, i.e., when it ends in '/' on GNU and other POSIX-like systems. When the @@ -1459,7 +1223,6 @@ Affected functions include 'add-name-to-file', 'copy-directory', 'make-symbolic-link', 'rename-file', 'thumbs-rename-images', and 'write-file'. ---- ** The list returned by 'overlays-at' is now in decreasing priority order. The documentation of this function always said the order should be that of decreasing priority, if the 2nd argument of the function is @@ -1467,7 +1230,6 @@ non-nil, but the code returned the list in the increasing order of priority instead. Now the code does what the documentation says it should do. -+++ ** 'format' now avoids allocating a new string in more cases. 'format' was previously documented to return a newly-allocated string, but this documentation was not correct, as (eq x (format x)) returned @@ -1476,14 +1238,12 @@ return a newly-allocated string, and the implementation now takes advantage of the doc change to avoid making copies of strings in common cases like (format "foo") and (format "%s" "foo"). ---- ** The function 'eldoc-message' now accepts a single argument. Programs that called it with multiple arguments before should pass them through 'format' first. Even that is discouraged: for ElDoc support, you should set 'eldoc-documentation-function' instead of calling 'eldoc-message' directly. ---- ** Using '&rest' or '&optional' incorrectly is now an error. For example giving '&optional' without a following variable, or passing '&optional' multiple times: @@ -1494,7 +1254,6 @@ passing '&optional' multiple times: Previously, Emacs would just ignore the extra keyword, or give incorrect results in certain cases. ---- ** The pinentry.el library has been removed. That package (and the corresponding change in GnuPG and pinentry) was intended to provide a way to input passphrase through Emacs with @@ -1522,29 +1281,23 @@ utilize swap memory usually. * Lisp Changes in Emacs 26.1 -+++ ** The function 'assoc' now takes an optional third argument TESTFN. This argument, when non-nil, is used for comparison instead of 'equal'. -+++ ** New optional argument TESTFN in 'alist-get', 'map-elt' and 'map-put'. If non-nil, the argument specifies a function to use for comparison, instead of, respectively, 'assq' and 'eql'. -+++ ** New function 'seq-set-equal-p' to check if SEQUENCE1 and SEQUENCE2 contain the same elements, regardless of the order. -+++ ** The new function 'mapbacktrace' applies a function to all frames of the current stack trace. -+++ ** The new function 'file-name-case-insensitive-p' tests whether a given file is on a case-insensitive filesystem. -+++ ** Several accessors for the value returned by 'file-attributes' have been added. They are: 'file-attribute-type', 'file-attribute-link-number', 'file-attribute-user-id', @@ -1554,48 +1307,38 @@ have been added. They are: 'file-attribute-type', 'file-attribute-modes', 'file-attribute-inode-number', 'file-attribute-device-number' and 'file-attribute-collect'. -+++ ** The new function 'buffer-hash' computes a fast, non-consing hash of a buffer's contents. -+++ ** 'interrupt-process' now consults the list 'interrupt-process-functions', to determine which function has to be called in order to deliver the SIGINT signal. This allows Tramp to send the SIGINT signal to remote asynchronous processes. The hitherto existing implementation has been moved to 'internal-default-interrupt-process'. -+++ ** The new function 'read-multiple-choice' prompts for multiple-choice questions, with a handy way to display help texts. ---- ** 'comment-indent-function' values may now return a cons to specify a range of indentation. -+++ ** New optional argument TEXT in 'make-temp-file'. ---- ** New function 'define-symbol-prop'. -+++ ** New function 'secure-hash-algorithms' to list the algorithms that 'secure-hash' supports. See the node "(elisp) Checksum/Hash" in the ELisp manual for details. -+++ ** Emacs now exposes the GnuTLS cryptographic API with the functions 'gnutls-macs' and 'gnutls-hash-mac'; 'gnutls-digests' and 'gnutls-hash-digest'; 'gnutls-ciphers' and 'gnutls-symmetric-encrypt' and 'gnutls-symmetric-decrypt'. See the node "(elisp) GnuTLS Cryptography" in the ELisp manual for details. -+++ ** The function 'gnutls-available-p' now returns a list of capabilities supported by the GnuTLS library used by Emacs. -+++ ** Emacs now supports records for user-defined types, via the new functions 'make-record', 'record', and 'recordp'. Records are now used internally to represent cl-defstruct and defclass instances, for @@ -1605,108 +1348,87 @@ If your program defines new record types, you should use package-naming conventions for naming those types. This is so any potential conflicts with other types are avoided. -+++ ** 'save-some-buffers' now uses 'save-some-buffers-default-predicate' to decide which buffers to ask about, if the PRED argument is nil. The default value of 'save-some-buffers-default-predicate' is nil, which means ask about all file-visiting buffers. ---- ** string-(to|as|make)-(uni|multi)byte are now declared obsolete. -+++ ** New variable 'while-no-input-ignore-events' which allow setting which special events 'while-no-input' should ignore. It is a list of symbols. ---- ** New function 'undo-amalgamate-change-group' to get rid of undo-boundaries between two states. ---- ** New var 'definition-prefixes' is a hash table mapping prefixes to the files where corresponding definitions can be found. This can be used to fetch definitions that are not yet loaded, for example for 'C-h f'. ---- ** New var 'syntax-ppss-table' to control the syntax-table used in 'syntax-ppss'. -+++ ** 'define-derived-mode' can now specify an :after-hook form, which gets evaluated after the new mode's hook has run. This can be used to incorporate configuration changes made in the mode hook into the mode's setup. ---- ** Autoload files can be generated without timestamps, by setting 'autoload-timestamps' to nil. FIXME As an experiment, nil is the current default. If no insurmountable problems before next release, it can stay that way. ---- ** 'gnutls-boot' now takes a parameter ':complete-negotiation' that says that negotiation should complete even on non-blocking sockets. ---- ** There is now a new variable 'flyspell-sort-corrections-function' that allows changing the way corrections are sorted. ---- ** The new command 'fortune-message' has been added, which displays fortunes in the echo area. -+++ ** New function 'func-arity' returns information about the argument list of an arbitrary function. This generalizes 'subr-arity' for functions that are not built-in primitives. We recommend using this new function instead of 'subr-arity'. ---- ** New function 'region-bounds' can be used in the interactive spec to provide region boundaries (for rectangular regions more than one) to an interactively callable function as a single argument instead of two separate arguments 'region-beginning' and 'region-end'. -+++ ** 'parse-partial-sexp' state has a new element. Element 10 is non-nil when the last character scanned might be the first character of a two character construct, i.e., a comment delimiter or escaped character. Its value is the syntax of that last character. -+++ ** 'parse-partial-sexp's state, element 9, has now been confirmed as permanent and documented, and may be used by Lisp programs. Its value is a list of currently open parenthesis positions, starting with the outermost parenthesis. ---- ** 'read-color' will now display the color names using the color itself as the background color. ---- ** The function 'redirect-debugging-output' now works on platforms other than GNU/Linux. -+++ ** The new function 'string-version-lessp' compares strings by interpreting consecutive runs of numerical characters as numbers, and compares their numerical values. According to this predicate, "foo2.png" is smaller than "foo12.png". ---- ** Numeric comparisons and 'logb' no longer return incorrect answers due to internal rounding errors. For example, '(< most-positive-fixnum (+ 1.0 most-positive-fixnum))' now correctly returns t on 64-bit hosts. ---- ** The functions 'ffloor', 'fceiling', 'ftruncate' and 'fround' now accept only floating-point arguments, as per their documentation. Formerly, they quietly accepted integer arguments and sometimes returned nonsensical answers, e.g., '(< N (ffloor N))' could return t. ---- ** On hosts like GNU/Linux x86-64 where a 'long double' fraction contains at least EMACS_INT_WIDTH - 3 bits, 'format' no longer returns incorrect answers due to internal rounding errors when formatting @@ -1714,46 +1436,37 @@ Emacs integers with '%e', '%f', or '%g' conversions. For example, on these hosts '(eql N (string-to-number (format "%.0f" N)))' now returns t for all Emacs integers N. ---- ** Calls that accept floating-point integers (for use on hosts with limited integer range) now signal an error if arguments are not integral. For example '(decode-char 'ascii 0.5)' now signals an error. ---- ** Functions 'string-trim-left', 'string-trim-right' and 'string-trim' now accept optional arguments which specify the regexp of a substring to trim. -+++ ** The new function 'char-from-name' converts a Unicode name string to the corresponding character code. -+++ ** New functions 'sxhash-eq' and 'sxhash-eql' return hash codes of a Lisp object suitable for use with 'eq' and 'eql' correspondingly. If two objects are 'eq' ('eql'), then the result of 'sxhash-eq' ('sxhash-eql') on them will be the same. -+++ ** Function 'sxhash' has been renamed to 'sxhash-equal' for consistency with the new functions. For compatibility, 'sxhash' remains as an alias to 'sxhash-equal'. -+++ ** 'make-hash-table' now defaults to a rehash threshold of 0.8125 instead of 0.8, to avoid rounding glitches. -+++ ** New function 'add-variable-watcher' can be used to call a function when a symbol's value is changed. This is used to implement the new debugger command 'debug-on-variable-change'. -+++ ** New variable 'print-escape-control-characters' causes 'prin1' and 'print' to output control characters as backslash sequences. -+++ ** Time conversion functions that accept a time zone rule argument now allow it to be OFFSET or a list (OFFSET ABBR), where the integer OFFSET is a count of seconds east of Universal Time, and the string @@ -1761,157 +1474,120 @@ ABBR is a time zone abbreviation. The affected functions are 'current-time-string', 'current-time-zone', 'decode-time', 'format-time-string', and 'set-time-zone-rule'. -+++ ** 'format-time-string' now formats '%q' to the calendar quarter. -+++ ** New built-in function 'mapcan'. It avoids unnecessary consing (and garbage collection). -+++ ** 'car' and 'cdr' compositions 'cXXXr' and 'cXXXXr' are now part of Elisp. -+++ ** 'gensym' is now part of Elisp. ---- ** Low-level list functions like 'length' and 'member' now do a better job of signaling list cycles instead of looping indefinitely. -+++ ** The new functions 'make-nearby-temp-file' and 'temporary-file-directory' can be used for creation of temporary files on remote or mounted directories. -+++ ** On GNU platforms when operating on a local file, 'file-attributes' no longer suffers from a race when called while another process is altering the filesystem. On non-GNU platforms 'file-attributes' attempts to detect the race, and returns nil if it does so. -+++ ** The new function 'file-local-name' can be used to specify arguments of remote processes. -+++ ** The new functions 'file-name-quote', 'file-name-unquote' and 'file-name-quoted-p' can be used to quote / unquote file names with the prefix "/:". -+++ ** The new error 'file-missing', a subcategory of 'file-error', is now signaled instead of 'file-error' if a file operation acts on a file that does not exist. -+++ ** The function 'delete-directory' no longer signals an error when operating recursively and when some other process deletes the directory or its files before 'delete-directory' gets to them. -+++ ** New error type 'user-search-failed' like 'search-failed' but avoids debugger like 'user-error'. -+++ ** The function 'line-number-at-pos' now takes a second optional argument 'absolute'. If this parameter is nil, the default, this function keeps on returning the line number taking potential narrowing into account. If this parameter is non-nil, the function ignores narrowing and returns the absolute line number. ---- ** The function 'color-distance' now takes a second optional argument 'metric'. When non-nil, it should be a function of two arguments that accepts two colors and returns a number. ** Changes in Frame and Window Handling -+++ *** Resizing a frame no longer runs 'window-configuration-change-hook'. 'window-size-change-functions' should be used instead. -+++ *** The new function 'frame-size-changed-p' can tell whether a frame has been resized since the last time 'window-size-change-functions' has been run. -+++ *** The function 'frame-geometry' now also returns the width of a frame's outer border. -+++ *** New frame parameters and changed semantics for older ones: -+++ **** 'z-group' positions a frame above or below all others. -+++ **** 'min-width' and 'min-height' specify the absolute minimum size of a frame. -+++ **** 'parent-frame' makes a frame the child frame of another Emacs frame. The section "(elisp) Child Frames" in the ELisp manual describes the intrinsics of that relationship. -+++ **** 'delete-before' triggers deletion of one frame before that of another. -+++ **** 'mouse-wheel-frame' specifies another frame whose windows shall be scrolled instead. -+++ **** 'no-other-frame' has 'next-frame' and 'previous-frame' skip this frame. -+++ **** 'skip-taskbar' removes a frame's icon from the taskbar and has 'Alt-' skip this frame. -+++ **** 'no-focus-on-map' avoids that a frame gets input focus when mapped. -+++ **** 'no-accept-focus' means that a frame does not want to get input focus via the mouse. -+++ **** 'undecorated' removes the window manager decorations from a frame. -+++ **** 'override-redirect' tells the window manager to disregard this frame. -+++ **** 'width' and 'height' now allow the specification of pixel values and ratios. -+++ **** 'left' and 'top' now allow the specification of ratios. -+++ **** 'keep-ratio' preserves size and position of child frames when their parent frame is resized. -+++ **** 'no-special-glyphs' suppresses display of truncation and continuation glyphs in a frame. -+++ **** 'auto-hide-function' and 'minibuffer-exit' handle auto hiding of frames and exiting from minibuffer individually. -+++ **** 'fit-frame-to-buffer-margins' and 'fit-frame-to-buffer-sizes' handle fitting a frame to its buffer individually. -+++ **** 'drag-internal-border', 'drag-with-header-line', 'drag-with-mode-line', 'snap-width', 'top-visible' and 'bottom-visible' allow dragging and resizing frames with the mouse. -+++ **** 'minibuffer' is now set to the default minibuffer window when initially specified as nil and is not reset to nil when initially specifying a minibuffer window. @@ -1919,29 +1595,23 @@ specifying a minibuffer window. *** The new function 'frame-list-z-order' returns a list of all frames in Z (stacking) order. -+++ *** The function 'x-focus-frame' optionally tries to not activate its frame. -+++ *** The variable 'focus-follows-mouse' has a third meaningful value 'auto-raise' to indicate that the window manager automatically raises a frame when the mouse pointer enters it. -+++ *** The new function 'frame-restack' puts a frame above or below another on the display. -+++ *** The new face 'internal-border' specifies the background of a frame's internal border. -+++ *** The NORECORD argument of 'select-window' now has a meaningful value 'mark-for-redisplay' which is like any other non-nil value but marks WINDOW for redisplay. -+++ *** Support for side windows is now official. The display action function 'display-buffer-in-side-window' will display its buffer in a side window. Functions for toggling all side windows on a frame, @@ -1949,18 +1619,15 @@ changing and reversing the layout of side windows and returning the main (major non-side) window of a frame are provided. For details consult the section "(elisp) Side Windows" in the ELisp manual. -+++ *** Support for atomic windows - rectangular compositions of windows treated by 'split-window', 'delete-window' and 'delete-other-windows' like a single live window - is now official. For details consult the section "(elisp) Atomic Windows" in the ELisp manual. -+++ *** New 'display-buffer' alist entry 'window-parameters' allows the assignment of window parameters to the window used for displaying the buffer. -+++ *** New function 'display-buffer-reuse-mode-window' is an action function suitable for use in 'display-buffer-alist'. For example, to avoid creating a new window when opening man pages when there's already one, @@ -1972,49 +1639,39 @@ use (inhibit-same-window . nil) (mode . Man-mode)))) -+++ *** New window parameter 'no-delete-other-windows' prevents that its window gets deleted by 'delete-other-windows'. -+++ *** New window parameters 'mode-line-format' and 'header-line-format' allow the buffer-local formats for this window to be overridden. -+++ *** New command 'window-swap-states' swaps the states of two live windows. -+++ *** New functions 'window-pixel-width-before-size-change' and 'window-pixel-height-before-size-change' support detecting which window changed size when 'window-size-change-functions' are run. -+++ *** The new function 'window-lines-pixel-dimensions' returns the pixel dimensions of a window's text lines. -+++ *** The new function 'window-largest-empty-rectangle' returns the dimensions of the largest rectangular area not occupying any text in a window's body. -+++ *** The semantics of 'mouse-autoselect-window' has changed slightly. For details see the section "(elisp) Mouse Window Auto-selection" in the ELisp manual. ---- *** 'select-frame-by-name' now may return a frame on another display if it does not find a suitable one on the current display. ---- ** 'tcl-auto-fill-mode' is now declared obsolete. Its functionality can be replicated simply by setting 'comment-auto-fill-only-comments'. ** New pcase pattern 'rx' to match against an rx-style regular expression. For details, see the doc string of 'rx--pcase-macroexpander'. ---- ** New functions to set region from secondary selection and vice versa. The new functions 'secondary-selection-to-region' and 'secondary-selection-from-region' let you set the beginning and the @@ -2028,7 +1685,6 @@ uniscribe). * Changes in Emacs 26.1 on Non-Free Operating Systems -+++ ** Intercepting hotkeys on Windows 7 and later now works better. The new keyboard hooking code properly grabs system hotkeys such as 'Win-*' and 'Alt-TAB', in a way that Emacs can get at them before the @@ -2038,7 +1694,6 @@ Windows NT and later you can now register any hotkey combination. (On Windows 9X, the previous limitations, spelled out in the Emacs manual, still apply.) ---- ** 'convert-standard-filename' no longer mirrors slashes on MS-Windows. Previously, on MS-Windows this function converted slash characters in file names into backslashes. It no longer does that. If your Lisp @@ -2052,7 +1707,6 @@ code. One possible way is this: (aset file-name (match-beginning 0) ?\\) (setq start (match-end 0)))) ---- ** GUI sessions on MS-Windows now treat SIGINT like Posix platforms do. The effect of delivering a Ctrl-C (SIGINT) signal to a GUI Emacs on MS-Windows is now the same as on Posix platforms -- Emacs saves the @@ -2060,7 +1714,6 @@ session and exits. In particular, this will happen if you start emacs.exe from the Windows shell, then type Ctrl-C into that shell's window. ---- ** 'signal-process' supports SIGTRAP on Windows XP and later. The 'kill' emulation on Windows now maps SIGTRAP to a call to the 'DebugBreakProcess' API. This causes the receiving process to break @@ -2070,25 +1723,19 @@ This is in contrast to the default action on POSIX Systems, where it causes the receiving process to terminate with a core dump if no debugger has been attached to it. ---- ** 'set-mouse-position' and 'set-mouse-absolute-pixel-position' work on macOS. ---- ** Emacs can now be run as a GUI application from the command line on macOS. -+++ ** 'ns-appearance' and 'ns-transparent-titlebar' change the appearance of frame decorations on macOS 10.9+. ---- ** 'ns-use-thin-smoothing' enables thin font smoothing on macOS 10.8+. ---- ** 'process-attributes' on Darwin systems now returns more information. ---- ** Mousewheel and trackpad scrolling on macOS 10.7+ now behaves more like the macOS default. The new variables 'ns-mwheel-line-height', 'ns-use-mwheel-acceleration' and 'ns-use-mwheel-momentum' can be used commit 3deaac1bd9569fd57185e9e6256cc8419323ba78 Author: Eli Zaretskii Date: Tue Apr 3 19:59:40 2018 +0300 ; * src/ftfont.c (ftfont_spec_pattern): Fix whitespace. diff --git a/src/ftfont.c b/src/ftfont.c index fea00ffe41..51b04a8682 100644 --- a/src/ftfont.c +++ b/src/ftfont.c @@ -768,7 +768,7 @@ ftfont_spec_pattern (Lisp_Object spec, char *otlayout, struct OpenTypeSpec **ots /* We really don't like color fonts, they cause Xft crashes. See Bug#30874. */ if (Vxft_ignore_color_fonts - && ! FcPatternAddBool(pattern, FC_COLOR, FcFalse)) + && ! FcPatternAddBool (pattern, FC_COLOR, FcFalse)) goto err; #endif commit eb0d10d567af76967d8e738e51a79ef4998470b7 Author: Alan Mackenzie Date: Tue Apr 3 16:37:39 2018 +0000 Put combine-change-calls around comment-region and uncomment-region * lisp/newcomment.el (comment-combine-change-calls): New buffer local variable. (uncomment-region-default-1, comment-region-default-1): Functions renamed from uncomment-region-default and comment-region-default. (uncomment-region-default, comment-region-default): New functions, which call the above either enclosed in combine-change-calls or not. diff --git a/lisp/newcomment.el b/lisp/newcomment.el index 9eb6875772..0e983fd916 100644 --- a/lisp/newcomment.el +++ b/lisp/newcomment.el @@ -159,6 +159,14 @@ The function has no args. Applicable at least in modes for languages like fixed-format Fortran where comments always start in column zero.") +(defvar-local comment-combine-change-calls t + "If non-nil (the default), use `combine-change-calls' around + calls of `comment-region-function' and + `uncomment-region-function'. This Substitutes a single call to + each of the hooks `before-change-functions' and + `after-change-functions' in place of those hooks being called + for each individual buffer change.") + (defvar comment-region-function 'comment-region-default "Function to comment a region. Its args are the same as those of `comment-region', but BEG and END are @@ -898,7 +906,7 @@ comment markers." (save-excursion (funcall uncomment-region-function beg end arg)))) -(defun uncomment-region-default (beg end &optional arg) +(defun uncomment-region-default-1 (beg end &optional arg) "Uncomment each line in the BEG .. END region. The numeric prefix ARG can specify a number of chars to remove from the comment markers." @@ -995,6 +1003,15 @@ comment markers." (goto-char (point-max)))))) (set-marker end nil)) +(defun uncomment-region-default (beg end &optional arg) + "Uncomment each line in the BEG .. END region. +The numeric prefix ARG can specify a number of chars to remove from the +comment markers." + (if comment-combine-change-calls + (combine-change-calls beg end (uncomment-region-default-1 beg end arg)) + (uncomment-region-default-1 beg end arg))) + + (defun comment-make-bol-ws (len) "Make a white-space string of width LEN for use at BOL. When `indent-tabs-mode' is non-nil, tab characters will be used." @@ -1191,7 +1208,7 @@ changed with `comment-style'." ;; FIXME: maybe we should call uncomment depending on ARG. (funcall comment-region-function beg end arg))) -(defun comment-region-default (beg end &optional arg) +(defun comment-region-default-1 (beg end &optional arg) (let* ((numarg (prefix-numeric-value arg)) (style (cdr (assoc comment-style comment-styles))) (lines (nth 2 style)) @@ -1260,6 +1277,11 @@ changed with `comment-style'." lines indent)))))) +(defun comment-region-default (beg end &optional arg) + (if comment-combine-change-calls + (combine-change-calls beg end (comment-region-default-1 beg end arg)) + (comment-region-default-1 beg end arg))) + ;;;###autoload (defun comment-box (beg end &optional arg) "Comment out the BEG .. END region, putting it inside a box. commit 424103a6e351a6d2d8b94f86998c90fdf6afea27 Author: Alan Mackenzie Date: Tue Apr 3 16:16:49 2018 +0000 Introduce new macro combine-change-calls This macro is a bit like combine-after-change-calls, but also works with a non-null before-change-functions. It suppresses the operation of the change hooks on a possibly large sequence of buffer modifications, replacing them with a single invocation of before-change-functions at the start, and a single invocation of after-change-functions at the end. * lisp/subr.el (undo--combining-change-calls): New variable. (combine-change-calls-1, undo--wrap-and-run-primitive-undo): New functions. (combine-change-calls): New macro. * doc/lispref/text.texi (Change Hooks): Document combine-change-calls. * etc/NEWS: Add an entry under "Lisp Changes" for combine-change-calls. diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index e992c0f561..ebfa8b9b0f 100644 --- a/doc/lispref/text.texi +++ b/doc/lispref/text.texi @@ -5136,8 +5136,8 @@ making. When that happens, the arguments to individual changes are made, but won't necessarily be the minimal such region, and the arguments to each successive call of @code{after-change-functions} will then delimit the part of text being -changed exactly. In general, we advise to use either before- or the -after-change hooks, but not both. +changed exactly. In general, we advise using either the before- or +the after-change hook, but not both. @defmac combine-after-change-calls body@dots{} The macro executes @var{body} normally, but arranges to call the @@ -5161,6 +5161,30 @@ because it may lead to inefficient behavior for some change hook functions. @end defmac +@defmac combine-change-calls beg end body@dots{} +This executes @var{body} normally, except any buffer changes it makes +do not trigger the calls to @code{before-change-functions} and +@code{after-change-functions}. Instead there is a single call of each +of these hooks for the region enclosed by @var{beg} and @var{end}, the +parameters supplied to @code{after-change-functions} reflecting the +changes made to the size of the region by @var{body}. + +The result of this macro is the result returned by @var{body}. + +This macro is useful when a function makes a possibly large number of +repetitive changes to the buffer, and the change hooks would otherwise +take a long time to run, were they to be run for each individual +buffer modification. Emacs itself uses this macro, for example, in +the commands @code{comment-region} and @code{uncomment-region}. + +@strong{Warning:} You must not alter the values of +@code{before-change-functions} or @code{after-change-function} within +@var{body}. + +@strong{Warning:} You must not make any buffer changes outside of the +region specified by @var{beg} and @var{end}. +@end defmac + @defvar first-change-hook This variable is a normal hook that is run whenever a buffer is changed that was previously in the unmodified state. diff --git a/etc/NEWS b/etc/NEWS index 7dc014707b..2caeebe174 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -451,6 +451,13 @@ socket has been pased to Emacs (Bug#24218). instead of just Microsoft platforms. This fixes a 'get-free-disk-space' bug on OS X 10.8 and later (Bug#28639). ++++ +** New macro combine-change-calls arranges to call the change hooks +('before-change-functions' and 'after-change-functions') just once +each around a sequence of lisp forms, given a region. This is +useful when a function makes a possibly large number of repetitive +changes and the change hooks are time consuming. + --- ** The function 'get-free-disk-space' returns now a non-nil value for remote systems, which support this check. diff --git a/lisp/subr.el b/lisp/subr.el index cfaa8aa4e5..98724e9413 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -3572,6 +3572,119 @@ in BODY." . ,body) (combine-after-change-execute))) +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +(defvar undo--combining-change-calls nil + "Non-nil when `combine-change-calls-1' is running.") + +(defun combine-change-calls-1 (beg end body) + "Evaluate BODY, running the change hooks just once, for region \(BEG END). + +Firstly, `before-change-functions' is invoked for the region +\(BEG END), then BODY (a function) is evaluated with +`before-change-functions' and `after-change-functions' bound to +nil, then finally `after-change-functions' is invoked on the +updated region (BEG NEW-END) with a calculated OLD-LEN argument. +If `inhibit-modification-hooks' is initially non-nil, the change +hooks are not run. + +The result of `combine-change-calls-1' is the value returned by +BODY. BODY must not make a different buffer current, except +temporarily. It must not make any changes to the buffer outside +the specified region. It must not change +`before-change-functions' or `after-change-functions'. + +Additionally, the buffer modifications of BODY are recorded on +the buffer's undo list as a single \(apply ...) entry containing +the function `undo--wrap-and-run-primitive-undo'." + (let ((old-bul buffer-undo-list) + (end-marker (copy-marker end t)) + result) + (if undo--combining-change-calls + (setq result (funcall body)) + (let ((undo--combining-change-calls t)) + (if (not inhibit-modification-hooks) + (run-hook-with-args 'before-change-functions beg end)) + (if (eq buffer-undo-list t) + (setq result (funcall body)) + (let (;; (inhibit-modification-hooks t) + before-change-functions after-change-functions) + (setq result (funcall body))) + (let ((ap-elt + (list 'apply + (- end end-marker) + beg + (marker-position end-marker) + #'undo--wrap-and-run-primitive-undo + beg (marker-position end-marker) buffer-undo-list)) + (ptr buffer-undo-list)) + (if (not (eq buffer-undo-list old-bul)) + (progn + (while (and (not (eq (cdr ptr) old-bul)) + ;; In case garbage collection has removed OLD-BUL. + (cdr ptr) + ;; Don't include a timestamp entry. + (not (and (consp (cdr ptr)) + (consp (cadr ptr)) + (eq (caadr ptr) t) + (setq old-bul (cdr ptr))))) + (setq ptr (cdr ptr))) + (unless (cdr ptr) + (message "combine-change-calls: buffer-undo-list broken")) + (setcdr ptr nil) + (push ap-elt buffer-undo-list) + (setcdr buffer-undo-list old-bul))))) + (if (not inhibit-modification-hooks) + (run-hook-with-args 'after-change-functions + beg (marker-position end-marker) + (- end beg))))) + (set-marker end-marker nil) + result)) + +(defmacro combine-change-calls (beg end &rest body) + "Evaluate BODY, running the change hooks just once. + +BODY is a sequence of lisp forms to evaluate. BEG and END bound +the region the change hooks will be run for. + +Firstly, `before-change-functions' is invoked for the region +\(BEG END), then the BODY forms are evaluated with +`before-change-functions' and `after-change-functions' bound to +nil, and finally `after-change-functions' is invoked on the +updated region. The change hooks are not run if +`inhibit-modification-hooks' is initially non-nil. + +The result of `combine-change-calls' is the value returned by the +last of the BODY forms to be evaluated. BODY may not make a +different buffer current, except temporarily. BODY may not +change the buffer outside the specified region. It must not +change `before-change-functions' or `after-change-functions'. + +Additionally, the buffer modifications of BODY are recorded on +the buffer's undo list as a single \(apply ...) entry containing +the function `undo--wrap-and-run-primitive-undo'. " + `(combine-change-calls-1 ,beg ,end (lambda () ,@body))) + +(defun undo--wrap-and-run-primitive-undo (beg end list) + "Call `primitive-undo' on the undo elements in LIST. + +This function is intended to be called purely by `undo' as the +function in an \(apply DELTA BEG END FUNNAME . ARGS) undo +element. It invokes `before-change-functions' and +`after-change-functions' once each for the entire region \(BEG +END) rather than once for each individual change. + +Additionally the fresh \"redo\" elements which are generated on +`buffer-undo-list' will themselves be \"enclosed\" in +`undo--wrap-and-run-primitive-undo'. + +Undo elements of this form are generated by the macro +`combine-change-calls'." + (combine-change-calls beg end + (while list + (setq list (primitive-undo 1 list))))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + (defmacro with-case-table (table &rest body) "Execute the forms in BODY with TABLE as the current case table. The value returned is the value of the last form in BODY." commit 1233bcb0a78755ec4f3a925b84c15b1c6f715b1c Author: Paul Eggert Date: Tue Apr 3 08:24:10 2018 -0700 Work around GC+Cairo bug Workaround suggested by Robert Pluim (Bug#20890#13). * src/ftfont.c (ftfont_close) [USE_CAIRO]: Do nothing if GC is in progress. diff --git a/src/ftfont.c b/src/ftfont.c index 84e4a30389..fea00ffe41 100644 --- a/src/ftfont.c +++ b/src/ftfont.c @@ -1245,6 +1245,12 @@ ftfont_close (struct font *font) /* FIXME: Although this function can be called while garbage-collecting, the function assumes that Lisp data structures are properly-formed. This invalid assumption can lead to core dumps (Bug#20890). */ +#ifdef USE_CAIRO + /* Although this works around Bug#20890, it is probably not the + right thing to do. */ + if (gc_in_progress) + return; +#endif struct ftfont_info *ftfont_info = (struct ftfont_info *) font; Lisp_Object val, cache; commit 95b77b04516ee52eb3a79f95e1d5eebfb1d9287f Author: Paul Eggert Date: Tue Apr 3 08:12:41 2018 -0700 Port FC_COLOR change to older fontconfig Problem reported by John ff in: https://lists.gnu.org/r/emacs-devel/2018-04/msg00058.html * src/ftfont.c (ftfont_spec_pattern) [!FC_COLOR]: Don’t use FC_COLOR on older fontconfigs that don’t have it. diff --git a/src/ftfont.c b/src/ftfont.c index 24a92dd52e..84e4a30389 100644 --- a/src/ftfont.c +++ b/src/ftfont.c @@ -764,7 +764,7 @@ ftfont_spec_pattern (Lisp_Object spec, char *otlayout, struct OpenTypeSpec **ots if (scalable >= 0 && ! FcPatternAddBool (pattern, FC_SCALABLE, scalable ? FcTrue : FcFalse)) goto err; -#ifdef HAVE_XFT +#if defined HAVE_XFT && defined FC_COLOR /* We really don't like color fonts, they cause Xft crashes. See Bug#30874. */ if (Vxft_ignore_color_fonts commit 737d0a258d8870cbb34f38a409d603b7f8954d2e Author: Nicolas Petton Date: Tue Apr 3 15:00:12 2018 +0200 * Update etc/AUTHORS diff --git a/etc/AUTHORS b/etc/AUTHORS index 9d238fb807..072072d417 100644 --- a/etc/AUTHORS +++ b/etc/AUTHORS @@ -9,7 +9,7 @@ Aaron Ecay: changed ob-R.el ob-core.el org-src.el ox-latex.el nsterm.m ob-awk.el ob-exp.el ob-python.el ob-tangle.el org-bibtex.el org-id.el org.el org.texi package.el paren.el -Aaron Jensen: changed Info.plist.in frameset.el +Aaron Jensen: changed frameset.el Info.plist.in nsterm.m Aaron Larson: co-wrote bibtex.el @@ -93,10 +93,10 @@ Alakazam Petrofsky: changed hanoi.el Alan Mackenzie: wrote cc-awk.el and co-wrote cc-align.el cc-cmds.el cc-defs.el cc-engine.el cc-fonts.el cc-langs.el cc-mode.el cc-styles.el cc-vars.el -and changed cc-mode.texi bytecomp.el edebug.el modes.texi subr.el - display.texi font-lock.el isearch.el programs.texi follow.el help.el - ispell.el lread.c syntax.texi control.texi cus-start.el doc.c eval.c - frames.texi help-fns.el lisp.el and 133 other files +and changed cc-mode.texi bytecomp.el subr.el edebug.el modes.texi + display.texi font-lock.el isearch.el programs.texi syntax.texi + follow.el help.el ispell.el lread.c control.texi cus-start.el doc.c + eval.c frames.texi help-fns.el lisp.el and 133 other files Alan Modra: changed unexelf.c @@ -162,7 +162,7 @@ Alexandre Veyrenc: changed fr-refcard.tex Alexandru Harsanyi: wrote soap-client.el soap-inspect.el and changed emacs3.py vc-hooks.el vc.el xml.el -Alex Branham: changed dired-x.el dired.el eww.el +Alex Branham: changed bibtex.el dired-x.el dired.el eww.el Alex Coventry: changed files.el @@ -389,7 +389,7 @@ Artem Chuprina: changed message.el Artur Malabarba: wrote char-fold-tests.el faces-tests.el isearch-tests.el let-alist.el simple-tests.el sort-tests.el tabulated-list-test.el and changed package.el isearch.el lisp/char-fold.el files.el - tabulated-list.el package-test.el menu-bar.el replace.el bytecomp.el + tabulated-list.el package-tests.el menu-bar.el replace.el bytecomp.el faces.el files-x.el custom.el custom.texi help-fns.el let-alist-tests.el simple.el subr-tests.el align.el bindings.el cl-lib-tests.el cl-macs.el and 42 other files @@ -439,7 +439,9 @@ Bartosz Duszel: changed allout.el bib-mode.el cc-cmds.el hexl.el icon.el sendmail.el ses.el simple.el verilog-mode.el vi.el vip.el viper-cmd.el xscheme.el -Basil L. Contovounesios: changed message.el gnus-art.el man.el simple.el +Basil L. Contovounesios: changed message.el simple.el css-mode-tests.el + css-mode.el customize.texi gnus-art.el json-tests.el json.el man.el + shr-color.el Bastian Beischer: changed include.el mru-bookmark.el refs.el semantic/complete.el senator.el @@ -621,6 +623,8 @@ Caio Tiago Oliveira: changed ob-scala.el Caleb Deupree: changed w32-fns.el +Callum Cameron: changed term.el + Cameron Desautels: changed cus-edit.el custom.texi help.el regexp-opt.el ruby-mode.el @@ -665,9 +669,9 @@ Changwoo Ryu: changed files.el Chao-Hong Liu: changed TUTORIAL.cn TUTORIAL.zh Charles A. Roelli: changed nsterm.m nsfns.m nsterm.h org-clock.el DEBUG - INSTALL comint.el data.c diff-mode.el eldoc.el fill.el find-func.el - flymake.el frame.el macfont.m mouse-tests.el mouse.el nsmenu.m - progmodes/python.el simple.el speedbar.texi and 3 other files + INSTALL add-log.el anti.texi buffers.texi comint.el data.c diff-mode.el + display.texi eldoc.el fill.el find-func.el flymake.el frame.el + internals.texi macfont.m mouse-tests.el and 12 other files Charles Hannum: changed aix3-1.h aix3-2.h configure ibmrs6000.h keyboard.c netbsd.h pop.c sysdep.c systime.h systty.h xrdb.c @@ -693,7 +697,7 @@ and co-wrote longlines.el tango-dark-theme.el tango-theme.el and changed simple.el display.texi xdisp.c files.el frames.texi cus-edit.el files.texi custom.el subr.el text.texi faces.el keyboard.c startup.el package.el misc.texi emacs.texi modes.texi mouse.el - custom.texi image.c window.el and 936 other files + custom.texi image.c window.el and 935 other files Chris Chase: co-wrote idlw-shell.el idlwave.el @@ -916,11 +920,11 @@ Daniel Engeler: changed sysdep.c elisp.texi emacs.texi internals.texi Daniel Hackney: wrote package-tests.el and co-wrote package.el -and changed package-test.el package-x.el ange-ftp.el - automated/Makefile.in browse-url.el dbus.el dired-x.el ediff-diff.el - ediff-init.el ediff-merg.el ediff-mult.el ediff-util.el ediff-wind.el - ediff.el emacsclient.c emerge.el eudc.el eudcb-ldap.el eww.el finder.el - imap.el and 6 other files +and changed package-x.el ange-ftp.el automated/Makefile.in browse-url.el + dbus.el dired-x.el ediff-diff.el ediff-init.el ediff-merg.el + ediff-mult.el ediff-util.el ediff-wind.el ediff.el emacsclient.c + emerge.el eudc.el eudcb-ldap.el eww.el finder.el imap.el pcvs.el + and 5 other files Daniel Jensen: changed apropos.el @@ -1255,9 +1259,9 @@ Dmitry Gutov: wrote elisp-mode-tests.el jit-lock-tests.el json-tests.el vc-hg-tests.el xref-tests.el and changed ruby-mode.el xref.el vc-git.el elisp-mode.el etags.el ruby-mode-tests.el project.el js.el package.el vc-hg.el vc.el - symref/grep.el log-edit.el menu-bar.el package-test.el + symref/grep.el package-tests.el log-edit.el menu-bar.el progmodes/grep.el simple.el vc-svn.el eldoc.el find-func.el lisp.el - and 89 other files + and 88 other files Dmitry Kurochkin: changed isearch.el @@ -1338,10 +1342,10 @@ Eli Zaretskii: wrote [bidirectional display in xdisp.c] [tty menus in term.c] abbrev-tests.el bidi.c biditest.el chartab-tests.el coding-tests.el doc-tests.el etags-tests.el rxvt.el tty-colors.el -and changed xdisp.c msdos.c w32.c w32fns.c display.texi simple.el - files.el fileio.c w32proc.c keyboard.c w32term.c dispnew.c emacs.c - lisp.h dispextern.h files.texi process.c term.c window.c text.texi - INSTALL and 1103 other files +and changed xdisp.c msdos.c w32.c display.texi w32fns.c simple.el + files.el fileio.c w32proc.c keyboard.c w32term.c files.texi text.texi + dispnew.c emacs.c lisp.h dispextern.h frames.texi process.c term.c + window.c and 1110 other files Emanuele Giaquinta: changed configure.ac rxvt.el charset.c etags.c fontset.c frame.el gnus-faq.texi loadup.el lread.c sh-script.el @@ -1362,9 +1366,9 @@ and changed ada-stmt.el Era Eriksson: changed bibtex.el dired.el json.el ses.el ses.texi shell.el tramp.el tramp.texi -Eric Abrahamsen: changed nnimap.el registry.el eieio-base.el - gnus-registry.el files.el files.texi windows.texi eieio.el - gnus-start.el nnir.el buffers.texi eieio-test-persist.el files-tests.el +Eric Abrahamsen: changed eieio-base.el nnimap.el registry.el + gnus-registry.el files.el files.texi windows.texi eieio-test-persist.el + eieio.el gnus-start.el nnir.el buffers.texi files-tests.el gnus-bcklg.el gnus-group.el gnus-sum.el gnus.texi nnmairix.el org.el org.texi ox-html.el ox-latex.el @@ -1426,7 +1430,7 @@ and changed c.srt ede.texi info.el rmail.el speedbspec.el cedet.el ede-autoconf.srt ede-make.srt eieio.texi gud.el sb-dir-minus.xpm sb-dir-plus.xpm sb-dir.xpm sb-mail.xpm sb-pg-minus.xpm sb-pg-plus.xpm sb-pg.xpm sb-tag-gt.xpm sb-tag-minus.xpm sb-tag-plus.xpm - sb-tag-type.xpm and 34 other files + sb-tag-type.xpm and 33 other files Eric Schulte: wrote ob-asymptote.el ob-awk.el ob-calc.el ob-comint.el ob-coq.el ob-css.el ob-ditaa.el ob-dot.el ob-emacs-lisp.el ob-eval.el @@ -1726,7 +1730,7 @@ and changed configure.ac Makefile.in src/Makefile.in calendar.el diary-lib.el lisp/Makefile.in files.el rmail.el make-dist progmodes/f90.el bytecomp.el simple.el authors.el emacs.texi misc/Makefile.in admin.el startup.el lib-src/Makefile.in ack.texi - display.texi cal-menu.el and 1674 other files + display.texi cal-menu.el and 1678 other files Glynn Clements: wrote gamegrid.el snake.el tetris.el @@ -1870,7 +1874,7 @@ and changed message-utils.el Hong Xu: changed paren.el search.c editfns.c em-cmpl.el emacs-mime.texi files.texi flyspell.el maintaining.texi parse-time-tests.el parse-time.el progmodes/cpp.el progmodes/python.el programs.texi - python-tests.el vc.el + python-tests.el subr.el vc.el Hosoya Kei: changed TUTORIAL.ja @@ -2441,7 +2445,7 @@ Jorge A. Alfaro-Murillo: changed message.el Jorgen Schäfer: wrote erc-autoaway.el erc-goodies.el erc-spelling.el and changed erc.el erc-track.el erc-backend.el erc-match.el misc.el erc-stamp.el erc-button.el erc-fill.el erc-members.el erc-truncate.el - erc-compat.el package-test.el progmodes/python.el Makefile erc-dcc.el + erc-compat.el package-tests.el progmodes/python.el Makefile erc-dcc.el erc-ibuffer.el erc-macs.el erc-page.el erc-pcomplete.el erc-sound.el minibuffer.el and 15 other files @@ -2531,7 +2535,7 @@ Juri Linkov: wrote files-x.el misearch.el replace-tests.el and changed isearch.el info.el replace.el simple.el progmodes/grep.el dired-aux.el dired.el progmodes/compile.el startup.el faces.el files.el menu-bar.el bindings.el display.texi descr-text.el desktop.el comint.el - image-mode.el ispell.el man.el cus-edit.el and 358 other files + image-mode.el ispell.el man.el cus-edit.el and 357 other files Jussi Lahdenniemi: changed w32fns.c ms-w32.h msdos.texi w32.c w32.h w32console.c w32heap.c w32inevt.c w32term.h @@ -2553,7 +2557,7 @@ and co-wrote longlines.el tramp-sh.el tramp.el and changed message.el gnus-agent.el gnus-sum.el files.el nnmail.el tramp.texi nntp.el gnus.el simple.el ange-ftp.el dired.el paragraphs.el bindings.el files.texi gnus-art.el gnus-group.el man.el INSTALL - Makefile.in crisp.el fileio.c and 45 other files + Makefile.in crisp.el fileio.c and 43 other files Kailash C. Chowksey: changed HELLO ind-util.el kannada.el knd-util.el lisp/Makefile.in loadup.el @@ -2937,7 +2941,7 @@ Luc Teirlinck: wrote help-at-pt.el and changed files.el autorevert.el cus-edit.el subr.el simple.el frames.texi startup.el display.texi files.texi dired.el comint.el modes.texi custom.texi emacs.texi fns.c frame.el ielm.el minibuf.texi - variables.texi buffers.texi commands.texi and 213 other files + variables.texi buffers.texi commands.texi and 212 other files Ludovic Courtès: wrote nnregistry.el and changed configure.ac gnus.texi loadup.el @@ -3140,9 +3144,9 @@ Martin Neitzel: changed supercite.el Martin Pohlack: changed iimage.el pc-select.el Martin Rudalics: changed window.el window.c windows.texi frame.c - frames.texi w32fns.c xterm.c xdisp.c w32term.c frame.el xfns.c help.el - buffer.c cus-start.el display.texi dispnew.c frame.h mouse.el nsfns.m - window.h gtkutil.c and 192 other files + frames.texi w32fns.c xdisp.c xterm.c w32term.c frame.el xfns.c help.el + buffer.c display.texi cus-start.el dispnew.c frame.h mouse.el nsfns.m + window.h gtkutil.c and 201 other files Martin Stjernholm: wrote cc-bytecomp.el and co-wrote cc-align.el cc-cmds.el cc-compat.el cc-defs.el cc-engine.el @@ -3264,7 +3268,7 @@ and changed tramp.texi tramp-adb.el trampver.el trampver.texi dbusbind.c file-notify-tests.el ange-ftp.el files.el dbus.texi files.texi autorevert.el tramp-fish.el kqueue.c tramp-gw.el tramp-imap.el os.texi configure.ac lisp.h gfilenotify.c inotify.c keyboard.c - and 143 other files + and 216 other files Michael Ben-Gershon: changed acorn.h configure.ac riscix1-1.h riscix1-2.h unexec.c @@ -3297,8 +3301,8 @@ Michael Gschwind: wrote iso-cvt.el Michael Harnois: changed nnimap.el -Michael Heerdegen: changed control.texi dired.el easy-mmode.el eldoc.el - pcase.el shr.el wdired.el +Michael Heerdegen: changed subr-x.el control.texi dired.el easy-mmode.el + eldoc.el pcase.el shr.el subr-x-tests.el wdired.el Michael Hoffman: changed term.el xterm.el @@ -3330,7 +3334,7 @@ Michael Olson: changed erc.el erc-backend.el Makefile erc-track.el erc-log.el erc-stamp.el erc-autoaway.el erc-dcc.el erc-goodies.el erc-list.el erc-compat.el erc-identd.el erc.texi ERC-NEWS erc-bbdb.el erc-match.el erc-notify.el erc-ibuffer.el erc-services.el remember.el - erc-button.el and 56 other files + erc-button.el and 55 other files Michael Piotrowski: changed gnus-art.el gnus-sum.el ps-print.el @@ -3535,7 +3539,8 @@ Nick Alcock: changed control.texi customize.texi display.texi files.el Nick Dokos: changed org-table.el ox.el icalendar.el mh-search.el org-mobile.el org.el ox-ascii.el url-cache.el -Nick Helm: changed eldoc.el whitespace-tests.el whitespace.el +Nick Helm: changed eldoc.el help.el help.texi whitespace-tests.el + whitespace.el Nick Roberts: wrote gdb-mi.el t-mouse.el and changed gdb-ui.el gud.el building.texi tooltip.el speedbar.el @@ -3612,11 +3617,11 @@ and changed rsz-mini.el emacs-buffer.gdb comint.el files.el Makefile Noah Lavine: changed tramp.el -Noam Postavsky: changed progmodes/python.el lisp-mode.el - emacs-lisp/debug.el xdisp.c cl-macs.el data.c ert.el lisp-mode-tests.el - help-fns.el simple.el bytecomp.el elisp-mode.el ffap.el modes.texi - sh-script.el subr.el cl-preloaded.el cl-print.el eval.c org-src.el - search.c and 191 other files +Noam Postavsky: changed progmodes/python.el lisp-mode.el xdisp.c + cl-macs.el emacs-lisp/debug.el data.c ert.el lisp-mode-tests.el + simple.el help-fns.el subr.el bytecomp.el elisp-mode.el eval.c ffap.el + modes.texi sh-script.el term.el cl-preloaded.el cl-print.el org-src.el + and 220 other files Nobuyoshi Nakada: co-wrote ruby-mode.el @@ -3895,17 +3900,17 @@ Philipp Stephani: wrote checkdoc-tests.el ediff-diff-tests.el eval-tests.el ido-tests.el lread-tests.el mouse-tests.el xt-mouse-tests.el and changed emacs-module.c eval.c bytecomp.el emacs-module-tests.el - lread.c nsterm.m configure.ac editfns.c files.el mod-test.c alloc.c + files.el lread.c nsterm.m configure.ac editfns.c mod-test.c alloc.c electric.el gtkutil.c lisp.h electric-tests.el emacs.c macfont.m test/Makefile.in xt-mouse.el Makefile bytecomp-tests.el - and 94 other files + and 95 other files Phillip Lord: wrote ps-print-tests.el and changed lisp/Makefile.in undo.c simple.el test/Makefile.in Makefile Makefile.in viper-cmd.el elisp-mode-tests.el keyboard.c ldefs-clean.el loadup.el autoload.el automated/Makefile.in build-zips.sh cmds.c dired.el eieio-tests.el fileio.c htmlfontify.el - make-test-deps.emacs-lisp reftex-tests.el and 168 other files + make-test-deps.emacs-lisp package-tests.el and 167 other files Phil Sainty: changed derived.el easy-mmode.el lisp.el package.el progmodes/grep.el simple.el subword.el term.el @@ -3916,7 +3921,7 @@ Pierre Lorenzon: changed eieio-custom.el Pierre Poissinger: changed charset.c -Pierre Téchoueyres: changed tramp-cmds.el +Pierre Téchoueyres: changed eieio-test-persist.el tramp-cmds.el Pieter E.J. Pareit: wrote mixal-mode.el @@ -4100,7 +4105,7 @@ Robert Bihlmeyer: changed gnus-score.el gnus-util.el message.el Robert Brown: changed lisp-mode.el -Robert Cochran: changed checkdoc.el data.c map.el +Robert Cochran: changed bytecomp.el checkdoc.el data.c map.el Robert Fenk: changed desktop.el @@ -4121,9 +4126,11 @@ Roberto Rodríguez: changed ada-mode.texi glossary.texi widget.texi Robert P. Goldman: changed org.texi ob-exp.el org.el ox-latex.el -Robert Pluim: changed vc-git.el configure.ac gnus-demon.el gtkutil.c - ido.el org-agenda.el process.c progmodes/grep.el project.el - todo-mode.el +Robert Pluim: changed gtkutil.c misc.texi vc-git.el xfns.c xterm.c + configure.ac desktop.el dired-x.texi epa.texi gnus-agent.el + gnus-demon.el gnus.texi ido.el minibuf.c minibuf.texi org-agenda.el + process.c progmodes/grep.el project.el text.texi todo-mode.el + and 4 other files Robert Thorpe: changed cus-start.el indent.el @@ -4403,7 +4410,7 @@ Simen Heggestøyl: wrote color-tests.el css-mode-tests.el dom-tests.el ring-tests.el rot13-tests.el sql-tests.el and changed css-mode.el json-tests.el json.el sgml-mode.el css-mode.css scss-mode.scss ring.el rot13.el scheme.el sql.el color.el files.el - js.el less-css-mode.el less-css-mode.less + js.el less-css-mode.el less-css-mode.less maintaining.texi Simon Josefsson: wrote dig.el dns-mode.el flow-fill.el fringe.el imap.el mml-sec.el mml-smime.el password-cache.el rfc2104.el sieve-mode.el @@ -4502,7 +4509,7 @@ and changed todo-mode.texi diary-lib.el dired-tests.el doc-view.el files.el minibuffer.el dired.el frames.texi hl-line.el info.el menu-bar.el mouse.el otodo-mode.el subr.el .gitattributes allout.el artist.el compile.texi cus-start.el descr-text.el dframe.el - and 40 other files + and 39 other files Stephen C. Gilardi: changed configure.ac @@ -4635,7 +4642,7 @@ Takai Kousuke: changed ccl.el image/compface.el Takeshi Yamada: changed fns.c Tak Kunihiro: wrote pixel-scroll.el -and changed frames.texi mouse.el dired.el mwheel.el +and changed frames.texi mouse.el mwheel.el dired.el Tao Fang: changed url-http.el @@ -4668,7 +4675,7 @@ Teodor Zlatanov: wrote auth-source.el gnus-registry.el gnus-tests.el and changed spam.el gnus.el nnimap.el gnus.texi gnutls.c gnus-sum.el auth.texi cfengine.el gnus-sync.el gnus-util.el gnus-start.el netrc.el gnutls.h message.el spam-stat.el encrypt.el mail-source.el nnir.el - nnmail.el auth-source-tests.el configure.ac and 121 other files + nnmail.el auth-source-tests.el configure.ac and 120 other files Terje Rosten: changed xfns.c version.el xterm.c xterm.h @@ -4800,7 +4807,7 @@ and changed ibuffer.el dired-tests.el ibuf-ext.el dired.el dired-aux.el simple.el ibuffer-tests.el ls-lisp.el diff-mode.el ibuf-macs.el cl-seq.el dired-x.el dired.texi ediff-ptch.el em-ls.el files.el replace.el buff-menu.el cl.texi ediff-init.el files-tests.el - and 80 other files + and 82 other files Titus von der Malsburg: changed simple.el window.el commit 408bf21a8c8b5bf5a78785608255463ad1038871 Author: Robert Pluim Date: Tue Apr 3 11:06:01 2018 +0200 Ignore color fonts when using Xft * src/font.c (syms_of_font): New configuration variable xft-ignore-color-fonts, default t. * src/ftfont.c (ftfont_spec_pattern): Tell fontconfig to ignore color fonts if xft-ignore-color-fonts is t. (Bug#30874, Bug#30045) * etc/NEWS: Document xft-ignore-color-fonts. diff --git a/etc/NEWS b/etc/NEWS index a510c03956..7dc014707b 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -77,6 +77,12 @@ work right without some adjustment: * Changes in Emacs 27.1 +--- +** New variable 'xft-ignore-color-fonts'. +Default t means don't try to load color fonts when using Xft, as they +often cause crashes. Set it to nil if you really need those fonts. +(Bug#30874) + --- ** The new option 'tooltip-resize-echo-area' avoids truncating tooltip text on GUI frames when tooltips are displayed in the echo area. Instead, diff --git a/src/font.c b/src/font.c index a6d3f5d479..ef3f92b594 100644 --- a/src/font.c +++ b/src/font.c @@ -5473,6 +5473,13 @@ Disabling compaction of font caches might enlarge the Emacs memory footprint in sessions that use lots of different fonts. */); inhibit_compacting_font_caches = 0; + DEFVAR_BOOL ("xft-ignore-color-fonts", + Vxft_ignore_color_fonts, + doc: /* +Non-nil means don't query fontconfig for color fonts, since they often +cause Xft crashes. Only has an effect in Xft builds. */); + Vxft_ignore_color_fonts = 1; + #ifdef HAVE_WINDOW_SYSTEM #ifdef HAVE_FREETYPE syms_of_ftfont (); diff --git a/src/ftfont.c b/src/ftfont.c index c2e093e633..24a92dd52e 100644 --- a/src/ftfont.c +++ b/src/ftfont.c @@ -764,6 +764,13 @@ ftfont_spec_pattern (Lisp_Object spec, char *otlayout, struct OpenTypeSpec **ots if (scalable >= 0 && ! FcPatternAddBool (pattern, FC_SCALABLE, scalable ? FcTrue : FcFalse)) goto err; +#ifdef HAVE_XFT + /* We really don't like color fonts, they cause Xft crashes. See + Bug#30874. */ + if (Vxft_ignore_color_fonts + && ! FcPatternAddBool(pattern, FC_COLOR, FcFalse)) + goto err; +#endif goto finish; commit fbd03baddfdc65b1253db2d5e26feaaed98e93c0 Author: Nicolas Petton Date: Tue Apr 3 14:31:27 2018 +0200 * ChangeLog.3: Update diff --git a/ChangeLog.3 b/ChangeLog.3 index 2dbe6c4bdb..abaed02b32 100644 --- a/ChangeLog.3 +++ b/ChangeLog.3 @@ -1,3 +1,3032 @@ +2018-04-03 Michael Albinus + + Fix Bug#31022 + + * lisp/cus-start.el (temporary-file-directory): Suppress file name + handlers when calling `shell-command-to-string'. (Bug#31022) + +2018-04-03 Paul Eggert + + Update "Calendrical Calculations" cites + + * lisp/calendar/calendar.el: Update citations to the book + "Calendrical Calculations" and its predecessors. + +2018-04-02 Noam Postavsky + + Fix term.el rendering following a window resize (Bug#30544) + + * lisp/term.el (term-reset-size): Reset cached row and column values + before changing point. + +2018-04-02 Philipp Stephani + + * lisp/files.el (auto-save-visited-mode): Don't prompt for filenames. + +2018-04-01 Philipp Stephani + + Quote a few backticks in docstrings. + + * lisp/emacs-lisp/macroexp.el (macroexp-progn, macroexp-let*) + (macroexp-if): Quote backtick in docstrings. + +2018-04-01 Eli Zaretskii + + Minor copyedits of completion-at-point-functions documentation + + * lisp/minibuffer.el (completion-at-point-functions): + * doc/lispref/minibuf.texi (Completion in Buffers): Fix wording + and filling. + + (cherry picked from commit a8ddd05d7d32946b892b9faaba6c9736ed2ad847) + +2018-04-01 Stefan Monnier + + (completion-at-point-functions): Improve doc + + (cherry picked from commit b56c56f203f8b066dd71e6ae6a254121b3ac3f08) + +2018-04-01 Eli Zaretskii + + * lisp/net/shr.el (shr-browse-url): Doc fix. (Bug#30957) + +2018-03-31 Hong Xu + + Mention `key-description' as inverse of `kbd' (Bug#30942) + + * lisp/subr.el (kbd): Add `key-description' as inverse of `kbd' in the + doc. + +2018-03-31 Noam Postavsky + + Document return value of pcase (Bug#30425) + + * doc/lispref/control.texi (Pattern matching case statement): + * lisp/emacs-lisp/pcase.el (pcase): State that pcase returns nil if no + patterns match. + (pcase-exhaustive): State that an error is signaled if no patterns + match. + +2018-03-31 Paul Eggert + + * doc/emacs/macos.texi: Tweak grammar and capitalization. + +2018-03-31 Richard Stallman + + Distinguish free from non-free OSes + +2018-03-28 Glenn Morris + + * doc/emacs/misc.texi (Amusements): Avoid non-printing character. + +2018-03-28 Glenn Morris + + Fix xrefs in pdf Emacs manual + + * doc/emacs/fortran-xtra.texi (ForIndent Cont, ForIndent Num) + (Fortran Columns): + * doc/emacs/picture-xtra.texi (Rectangles in Picture): + Fix recent changes that neglected the splitting of the pdf manuals. + +2018-03-28 Michael Albinus + + * doc/misc/org.texi (Installation): Fix clone commands. + +2018-03-27 Rasmus + + Update Org to v9.1.9 + + Please note this is a bugfix release. See etc/ORG-NEWS for details. + +2018-03-27 Michael Heerdegen + + De-obsolete `if-let' and `when-let' + + For the following release it is planned to make `if-let*' and + `when-let*' aliases for `if-let' and `when-let'. For now we revert + declaring `if-let' and `when-let' obsolete and tweak the docstrings. + + * lisp/emacs-lisp/subr-x.el (if-let*, when-let*): Make docstrings + refer to those of `if-let' and `when-let'. + (if-let, when-let): De-obsolete. Rewrite documentation. + +2018-03-26 Glenn Morris + + * lisp/htmlfontify.el (hfy-begin-span-handler): Doc fix. + +2018-03-26 Eli Zaretskii + + * doc/lispref/functions.texi (Defining Functions): Improve indexing. + +2018-03-25 Aaron Jensen + + Fix crash after frame is freed on macOS (bug#30800) + + * src/nsterm.m (x_free_frame_resources): Clear represented_frame. + (bug#30800) + +2018-03-25 Michael Albinus + + More manual editing + + * doc/emacs/basic.texi: + * doc/emacs/calendar.texi: + * doc/emacs/display.texi: + * doc/emacs/mini.texi: + * doc/emacs/misc.texi: + * doc/emacs/picture-xtra.texi: + * doc/misc/info.texi: Prefer and over + and . Add missing @kindex entries. + + * doc/emacs/custom.texi (Function Keys): Fix and add missing + key symbols. + +2018-03-25 Michael Albinus + + Minor manual changes changes + + * doc/emacs/misc.texi (FFAP): Complete commands. + (Amusements): Add some @cindex entries. Add "M-x butterfly". + +2018-03-24 Glenn Morris + + * lisp/calculator.el (calculator-paste-decimals): Add version. + +2018-03-23 Eli Zaretskii + + More proofreading of the Emacs manual + + * doc/emacs/trouble.texi (DEL Does Not Delete): Improve wording. + (Screen Garbled): Mention the command name. + (Bug Criteria): Mention that problems in packages should first be + reported to the respective maintainers. + (Checklist): Fix wording. + (Contributing, Copyright Assignment): Minor copyedits. + * doc/emacs/misc.texi (Amusements): Remove Landmark. + * doc/emacs/picture-xtra.texi (Tabs in Picture): Improve wording. + (Rectangles in Picture): Add a cross-reference to "Registers". + * doc/emacs/misc.texi (Gnus Group Buffer, Gnus Summary Buffer): + Mention command names in parentheses. + (Gnus Summary Buffer): Document "M-r". + (Network Security): Document that current NSM works with TLS + encryption. Fix markup. + (Document View): Improve wording and fix a typo. + (DocView Conversion): Rephrase description of + doc-view-cache-directory. + (Single Shell): Mention variables that control when shell output + appears in the echo area. + (Shell Mode): Improve wording. + (Shell Prompts): Fix a typo. + (Shell Ring, Term Mode): Mention command names. + (History References): Add a cross-reference to "Rebinding". + (Remote Host): Mention SSH. + (TCP Emacs server): Improve wording. + (emacsclient Options): Minor improvements. + (PostScript): Fix wording. + (PostScript Variables): Mention that ps-font-size could be a cons. + (Sorting): Minor improvements. Suggested by Michael Albinus + in emacs-manual-bugs@gnu.org + +2018-03-23 Noam Postavsky + + * src/lisp.h (struct Lisp_Buffer_Local_Value): Update commentary. + + * doc/emacs/trouble.texi: Fix location of `emacs-version' index. + +2018-03-23 Noam Postavsky + + Explain more about (defvar foo) form (Bug#18059) + + * doc/lispref/variables.texi (Defining Variables) + (Using Lexical Binding): + * doc/lispref/compile.texi (Compiler Errors): Emphasize that omitting + VALUE for `defvar' marks the variable special only locally. + * doc/lispref/variables.texi (Using Lexical Binding): Add example of + using `defvar' without VALUE. + +2018-03-22 Charles A. Roelli + + * doc/lispref/buffers.texi (Buffer List): Fix grammar. + + * doc/lispref/anti.texi (Antinews): Fix grammar. + +2018-03-22 Glenn Morris + + * lisp/org/ob-lisp.el (org-babel-lisp-eval-fn): Tweak type. + + Avoids type mismatch when relevant library is not present/loaded. + +2018-03-22 Glenn Morris + + sql.el defcustom fixes + + * lisp/progmodes/sql.el (sql-login-params): Update. + Avoids type mismatch with postgres and sqlite login params. + (sql-postgres-login-params): Bump version. + +2018-03-22 Eli Zaretskii + + Document DEFUN attributes + + * doc/lispref/internals.texi (Writing Emacs Primitives): Document + specification of function attributes in DEFUN. + +2018-03-22 Nicolas Petton + + * etc/NEWS: Add an entry for auth-source-pass. + +2018-03-22 Eli Zaretskii + + Fix the MSDOS build + + * msdos/sed2v2.inp (HAVE_SBRK): Define to 1. + +2018-03-22 Eric Abrahamsen + + Improve warning and error messages + + * lisp/emacs-lisp/eieio-base.el (eieio-persistent-read, + (eieio-persistent-validate/fix-slot-value): Indicate exactly what + went wrong. + +2018-03-22 Eric Abrahamsen + + Adjust eieio persistence tests for expected failure + + * test/lisp/emacs-lisp/eieio-tests/eieio-test-persist.el + (eieio-test-persist-hash-and-vector, + eieio-test-persist-interior-lists): Persistence does not currently + handle deeply-nested objects. Expect current failures, and mark for + future fixes. + +2018-03-22 Eric Abrahamsen + + Let eieio-persistent-read read what object-write has written + + * lisp/emacs-lisp/eieio-base.el (eieio-persistent-validate/fix-slot-value): + `object-write' may quote lists inside hash tables and vectors, so + unquote those lists here. + + This patch allows the eieio-persistent write/restore process to + perform a clean round trip. It only handles a very specific and + limited range of object structures, but at least the write and read + procedures match. + +2018-03-22 Eric Abrahamsen + + Handle possible classtype values in eieio-persistent-read + + * lisp/emacs-lisp/eieio-base.el (eieio-persistent-validate/fix-slot-value): + The function `eieio-persistent-slot-type-is-class-p' could return + either a single class, or a list of classes. + +2018-03-22 Pierre Téchoueyres + + Add new tests for eieio persistence + + * test/lisp/emacs-lisp/eieio-tests/eieio-test-persist.el: + (hash-equal): New comparison test for hash-tables. + (persist-test-save-and-compare): Use test for hash-tables. + (eieio-test-persist-hash-and-vector, + eieio-test-persist-interior-lists): New tests. + +2018-03-22 Glenn Morris + + * lisp/gnus/gnus-cloud.el (gnus-cloud-synced-files): Fix doc & type. + + * lisp/ibuf-ext.el (ibuffer-never-search-content-mode): Fix type. + +2018-03-21 Glenn Morris + + * doc/lispref/windows.texi (Selecting Windows): Fix a typo. + +2018-03-21 Charles A. Roelli + + * doc/lispref/internals.texi (Writing Emacs Primitives): Fix grammar. + +2018-03-21 Alan Mackenzie + + Firm up documentation of generalized variables + + * doc/lispref/variables.texi (Generalized Variables) + (Setting Generalized Variables): Define a generalized variable as something + setf can write to. Remove the insinuation that hackers have poor memories. + State explicitly that the list of GVs given is complete. Remove the + suggestion that `setf' has superseded, or is in the process of superseding, + `setq'. Make minor corrections to the English. + +2018-03-21 Eli Zaretskii + + Improve documentation of Auto-Revert mode + + * doc/emacs/files.texi (Reverting): Mention that Aut-Revert + applies to Dired buffers as well. Suggested by Michael Albinus + in emacs-manual-bugs@gnu.org. + +2018-03-21 Eli Zaretskii + + Improvements in dired.texi + + * doc/emacs/dired.texi (Dired): Mention that Dired works with + remote directories. + (Dired Enter): ls-lisp is used on some remote systems as well. + (Dired Navigation): Mention and index the command names. + (Dired Deletion): Document the 'always' value of + dired-recursive-deletes. Mention the alternative deletion method. + (Marks vs Flags): Fix spelling of Auto-Revert mode. Document what + marking does on a subdirectory header line. + (Operating on Files): Document that 'Z' uses gzip or compress. + (Comparison in Dired): Mention ediff-files. + (Misc Dired Features): Fix a typo. Suggested by Michael Albinus + in emacs-manual-bugs@gnu.org. + +2018-03-21 Noam Postavsky + + Revert "Support all perl variable declarators and prefixes" + + It highlights normal variable names in perl programs (Bug#30812). + * lisp/progmodes/perl-mode.el (perl-imenu-generic-expression) + (perl-font-lock-keywords-2): Restore values prior to Bug#27613 fix. + + Don't merge to master, we will fix Bug#27613 properly there (it's too + close to release to do that on emacs-26). + +2018-03-20 Paul Eggert + + Port to 32-bit sparc64 + + Backport from master. + Problem reported by Ulrich Mueller; fix suggested by Eli Zaretskii + and Andreas Schwab (Bug#30855). + * src/alloc.c (mark_memory): Call mark_maybe_object only on + pointers that are properly aligned for Lisp_Object. + +2018-03-20 Robert Pluim + + Correct Info link markup + + * lisp/gnus/gnus-agent.el (gnus-agent-auto-agentize-methods): + Correct markup for Info link. + * src/minibuf.c (Fcompleting_read): Likewise. + +2018-03-20 Nick Helm + + Improve documentation of 'with-help-window' + + * doc/lispref/help.texi (Help Functions): Change variable name + to 'buffer-or-name'. + + * lisp/help.el (with-help-window): Change variable name to + 'buffer-or-name' and rewrite the doc string, adding reference + to 'help-window-setup'. (Bug#30792) + +2018-03-20 Eli Zaretskii + + Minor improvements in building.texi + + * doc/emacs/building.texi (Compilation Shell): Mention that this + section is for local compilation buffers. + (Compilation, Compilation Mode): Mention that 'g' is bound to + 'recompile' in compilation buffers. + (Grep Searching): Add a cross-reference to "Compilation Mode". + Suggested by Michael Albinus in + emacs-manual-bugs@gnu.org. + +2018-03-20 Alex Branham + + * lisp/textmodes/bibtex.el (bibtex-mark-entry): activate mark + +2018-03-19 Eli Zaretskii + + * doc/emacs/building.texi (Starting GUD): Mention 'guiler'. + +2018-03-19 Eli Zaretskii + + Yet more proofreading of the Emacs manual + + * doc/emacs/building.texi (Compilation, Grep Searching) + (Debuggers, GUD Customization, Source Buffers) + (Breakpoints Buffer, Threads Buffer): Minor fixes and updates. + Suggested by Michael Albinus in + emacs-manual-bugs@gnu.org. + +2018-03-19 Paul Eggert + + * doc/emacs/rmail.texi: Fix broken link. + +2018-03-19 Paul Eggert + + Fix recently-added POP doc glitch + + * doc/emacs/rmail.texi (Remote Mailboxes): + POP3 → POP, when talking about POP in general. + +2018-03-19 Eli Zaretskii + + More proofreading of the Emacs manual + + * doc/emacs/macos.texi (Mac / GNUstep Basics): Fix typos. Improve + indexing. + (Mac / GNUstep Basics, Mac / GNUstep Customization) + (Mac / GNUstep Events): Improve indexing. + + * doc/emacs/rmail.texi (Rmail): Mention Gnus. + (Rmail Basics, Rmail Scrolling): Improve cross-references and + indexing. + (Rmail Motion): Minor improvements. + (Rmail Inbox): Remove outdated text about Babyl format. + (Rmail Files): Formatting changes. Comment out + set-rmail-inbox-list in the table of commands, as it is commented + out in the text that follows. + (Rmail Output, Rmail Labels, Rmail Reply, Rmail Make Summary): + Minor copyedits. + (Rmail Summary Edit): Document + rmail-summary-scroll-between-messages. + (Rmail Editing): Improve indexing. + (Movemail): Fix typos. + (Remote Mailboxes): Use "POP3" rather than "POP". + +2018-03-19 Simen Heggestøyl + + Fix typo in the Emacs manual's VC chapter + + * doc/emacs/maintaining.texi (VC Directory Buffer): Fix a typo. + +2018-03-19 Basil L. Contovounesios + + Pass json-readtable-error data as a list (bug#30489) + + * lisp/json.el (json-readtable-dispatch): Fix error data. + * test/lisp/json-tests.el (test-json-read): Check error data is a + list. + +2018-03-17 Noam Postavsky + + Improve word motion docs (Bug#30815) + + * doc/lispref/positions.texi (Word Motion): Fix reference to + `char-script-table'. + * lisp/simple.el (backward-word): + * src/syntax.c (forward-word): Mention `char-script-table' and add + link to the 'Word Motion' manual section. + +2018-03-15 Michael Albinus + + Replace "carriage-return" by "carriage return" in manuals + + * doc/emacs/msdos.texi: + * doc/emacs/mule.texi: + * doc/emacs/screen.texi: + * doc/lispref/nonascii.texi: + * doc/misc/calc.texi: Replace "carriage-return" by "carriage + return". Suggested by Richard Stallman in + emacs-manual-bugs@gnu.org. + +2018-03-15 Eli Zaretskii + + Minor copyedits in mule.texi + + * doc/emacs/mule.texi (Recognize Coding, Fontsets): Minor changes + in wording. Suggested by Richard Stallman in + emacs-manual-bugs@gnu.org. + +2018-03-14 Eli Zaretskii + + Fix problems caused by fontconfig-2.13.0 + + * src/xterm.c (x_term_init): Call fixup_locale after + xg_initialize, to countermand the call to setlocale in some + versions of fontconfig. (Bug#30788) + +2018-03-13 Glenn Morris + + Fix some allout.el aliases + + * lisp/allout.el (allout-passphrase-verifier-string) + (allout-passphrase-hint-string): Fix alias. + +2018-03-13 Glenn Morris + + * lisp/progmodes/ada-mode.el (ada-clean-buffer-before-saving): Doc fix. + +2018-03-13 Glenn Morris + + Doc fixes re obsolete items + + * doc/emacs/mini.texi (Completion Commands): Small update re mouse. + * doc/misc/htmlfontify.texi (Customization): Replace obsolete alias. + +2018-03-13 Glenn Morris + + Replace an obsolete alias in tpu-mapper + + * lisp/obsolete/tpu-mapper.el (tpu-map-key, tpu-mapper): + Replace obsolete alias. + +2018-03-13 Glenn Morris + + Doc fixes re obsolete items + + * doc/emacs/maintaining.texi (VC Undo): + * doc/misc/efaq-w32.texi (Font names): Replace obsolete aliases. + * doc/misc/url.texi (Customization): + Don't mention url-temporary-directory, it essentially does nothing. + * lisp/hilit-chg.el + (highlight-changes-global-changes-existing-buffers): Doc fix. + +2018-03-13 Eli Zaretskii + + Minor changes in mule.texi + + * doc/emacs/mule.texi (International, Coding Systems) + (Bidirectional Editing): Minor wording changes and typo fixes. + Suggested by Michael Albinus in + emacs-manual-bugs@gnu.org. + +2018-03-13 Eli Zaretskii + + Avoid assertion violation under visual-order-cursor-movement + + * src/xdisp.c (Fmove_point_visually): Don't let point exceed the + BEGV..ZV range. Signal Beginning of buffer error when there's a + before-string at BEGV. (Bug#30787) + +2018-03-13 Glenn Morris + + Stop mentioning options.el in doc + + * doc/misc/calc.texi (Customizing Embedded Mode): + Remove mentions of the obsolete (since 22.1) options.el. + * lisp/progmodes/meta-mode.el: Comment fix. + +2018-03-12 Charles A. Roelli + + * lisp/vc/vc-dir.el (vc-dir-unmark): Fix documentation. + +2018-03-12 Eli Zaretskii + + * lisp/minibuffer.el (completion-cycle-threshold): Doc fix. + +2018-03-12 Eli Zaretskii + + Fix last change in Xref documentation + + * doc/emacs/maintaining.texi (Looking Up Identifiers): More + accurate wording for the description of xref-etags-mode. + +2018-03-11 Eli Zaretskii + + More changes in the Emacs manual + + * doc/emacs/text.texi (Words, Foldout, Table Conversion): Clarify + text. Reported by Gijs Hillenius in + emacs-manual-bugs@gnu.org. + + * doc/emacs/msdos.texi (Windows Keyboard): + * doc/emacs/msdos-xtra.texi (MS-DOS Keyboard): + * doc/emacs/macos.texi (Mac / GNUstep Basics): + * doc/emacs/glossary.texi (Glossary): + * doc/emacs/custom.texi (Function Keys, Init Syntax): + * doc/emacs/commands.texi (User Input): + * doc/emacs/basic.texi (Arguments): Fix capitalization of "Meta". + * doc/emacs/msdos.texi (Windows Keyboard): + * doc/emacs/dired.texi (Dired Updating): + * doc/emacs/custom.texi (Init Rebinding): Fix misuses of @key. + Suggested by Richard Stallman . + +2018-03-11 Eli Zaretskii + + Improve documentation of Xref + + * doc/emacs/maintaining.texi (Looking Up Identifiers): Document + xref-etags-mode. + +2018-03-11 Paul Eggert + + Fix create_process bug breaking eudc-expand-inline + + Problem reported by Thomas Fitzsimmons (Bug#30762). + * src/process.c (create_process) [HAVE_PTYS]: + Call setsid even if !PTY_FLAG. + +2018-03-10 Noam Postavsky + + Clarify that nil doesn't match itself as a cl-case clause (Bug#30749) + + * lisp/emacs-lisp/cl-macs.el (cl-case): Mention that the ATOM + => (ATOM) short form is only for non-nil ATOMs. + +2018-03-10 Charles A. Roelli + + Improve SVG documentation + + * doc/lispref/display.texi (ImageMagick Images): Remove an + outdated comment that references a fixed bug. + (SVG Images): Fix grammar, and call functions functions (there are + no commands in lisp/svg.el). + +2018-03-10 Eli Zaretskii + + Document the "URL" keyword in library headers + + * doc/lispref/tips.texi (Library Headers): "URL" is an alias for + "Homepage". Suggested by Peter Oliver . + (Bug#30571) + +2018-03-09 Glenn Morris + + * test/lisp/international/mule-tests.el: + Avoid local variables confusion. + +2018-03-09 Bill Wohler + + Add missing findex entries for recently removed kindex entries + + * doc/misc/mh-e.texi: + + (cherry picked from commit a56a3fc6849b89a71c9a00afcb088021ccbe94e5) + +2018-03-09 Glenn Morris + + Replace the obsolete process-kill-without-query in documentation + + * lisp/comint.el (comint-exec-hook): + * lisp/term.el (term-exec-hook): + * lisp/eshell/esh-proc.el (eshell-exec-hook): + Doc fixes re the obsolete process-kill-without-query. + +2018-03-08 Michael Albinus + + Minor change in the manual + + * doc/emacs/display.texi (Useless Whitespace): + Don't upcase "TAB" and "SPC" when alluding to characters. + +2018-03-08 Eli Zaretskii + + More minor changes in the manual + + * doc/emacs/display.texi (Useless Whitespace): Don't upcase "TAB" + and "SPC" when alluding to characters. Suggested by Richard + Stallman . + + * doc/emacs/buffers.texi (Misc Buffer): Clarify what "read-only" + means for buffers. + (Buffers): Define and describe "buffer contents". Suggested by + Richard Stallman . (Bug#30685) + +2018-03-07 Glenn Morris + + Replace some obsolete aliases in code + + * lisp/net/eudc-bob.el (eudc-bob-mail-keymap): + * lisp/textmodes/reftex-toc.el (reftex-make-separate-toc-frame): + Replace obsolete aliases. + +2018-03-07 Glenn Morris + + Replace some obsolete aliases in documentation + + * doc/misc/efaq-w32.texi (Incoming mail with Rmail): + * doc/misc/speedbar.texi (Major Display Modes): + * lisp/mh-e/mh-folder.el (mh-restore-desktop-buffer): + Doc fixes re obsolete aliases. + +2018-03-07 Eli Zaretskii + + Minor improvements in manuals + + * doc/lispref/variables.texi (Local Variables): Make more clear + that local bindings of 'let' are in effect only within the body. + Suggested by Marcin Borkowski , see + http://lists.gnu.org/archive/html/emacs-devel/2018-03/msg00217.html + for the details. + + * doc/emacs/programs.texi (Matching): Fix a typo. Reported by + Alex Branham in emacs-manual-bugs@gnu.org. + Improve indexing. + +2018-03-07 Eli Zaretskii + + Minor copyedits in display.texi + + * doc/emacs/display.texi (Highlight Interactively) + (Useless Whitespace, Line Truncation, Visual Line Mode): Minor + changes of wording and typo corrections. Suggested by Michael + Albinus in emacs-manual-bugs@gnu.org. + +2018-03-07 Glenn Morris + + Remove some unused spam.el variables + + * lisp/gnus/spam.el (spam-ifile-path, spam-ifile-database-path) + (spam-bogofilter-path, spam-bsfilter-path) + (spam-spamassassin-path, spam-sa-learn-path): + Remove variables that are described as obsolete, but are + really completely unused, and have been for years. + +2018-03-07 Glenn Morris + + Replace some obsolete aliases in code + + * lisp/emulation/viper.el (viper-set-hooks): + * lisp/epa-hook.el (auto-encryption-mode): + * lisp/term/pc-win.el (set-frame-font): Replace obsolete aliases. + * lisp/net/quickurl.el (quickurl--assoc-function): New. + (quickurl-assoc-function): Use it. + +2018-03-07 Glenn Morris + + Replace some obsolete aliases in documentation + + * doc/emacs/text.texi (Nroff Mode): + * doc/misc/efaq.texi (How to add fonts): + * lisp/gnus/nnheader.el (nnheader-insert-file-contents): + * lisp/progmodes/pascal.el (pascal-outline-mode): + Doc fixes re obsolete aliases. + +2018-03-06 Glenn Morris + + Obsolete eshell-cmpl-suffix-list + + * lisp/eshell/em-cmpl.el (eshell-cmpl-suffix-list): + Make obsolete, to match pcomplete-suffix-list. + +2018-03-06 Eli Zaretskii + + More minor changes in the Glossary of the Emacs manual + + * doc/emacs/glossary.texi (Glossary): Improve cross-references for + modifier keys. Fix typos. Suggested by Gijs Hillenius + in emacs-manual-bugs@gnu.org. + +2018-03-06 Michael Heerdegen + + Revert last commit + + This reverts commit af4697faa1f5b643f63a9ea61aa205a4c1432e23. It's + too late for this to be in the release. + +2018-03-06 Michael Heerdegen + + Define if-let* and derivatives as aliases for if-let etc + + This commit reverts declaring `if-let' and `when-let' obsolete in + favor of the new `if-let*' and `when-let*' versions because of the + compiler warning mess (Bug#30039). Instead we make foo-let* aliases + for foo-let. The old single-tuple variable spec case is still + supported for backward compatibility. + * lisp/emacs-lisp/subr-x.el (if-let, when-let): Don't declare + obsolete. Tweak edebug specs. + (and-let): Renamed from `and-let*' for compatibility with the names + `if-let' and `when-let'. + (if-let*, when-let*, and-let*): Define as aliases for `if-let', + `when-let' and `and-let'. + * test/lisp/emacs-lisp/subr-x-tests.el (if-let-single-tuple-case-test) + (when-let-single-tuple-case-test): New tests for the single-binding + tuple case. + In the whole file, prefer the names without "*". + +2018-03-05 Eli Zaretskii + + Minor fix in Emacs manual's Glossary + + * doc/emacs/glossary.texi (Glossary): Fix outdated text about + primary selection. Reported by Gijs Hillenius + in emacs-manual-bugs@gnu.org. + +2018-03-03 Juri Linkov + + * lisp/progmodes/grep.el (zrgrep): + + Let-bind grep-use-null-filename-separator to nil (bug#30559). + +2018-03-03 Eli Zaretskii + + Minor copyedits in doc/emacs/text.texi + + * doc/emacs/text.texi (TeX Mode): Use @code for command markup. + (HTML Mode): Add a note about "C-x C-v" binding in HTML mode. + +2018-03-03 Eli Zaretskii + + Remove outdated comment in syntax.el + + * lisp/emacs-lisp/syntax.el (syntax-ppss-toplevel-pos): Remove + outdated comment. (Bug#30617) + +2018-03-03 Eli Zaretskii + + Prevent Flyspell from changing unrelated words + + * lisp/textmodes/flyspell.el (flyspell-auto-correct-word): Avoid + using stale cached data from previous invocations of this command. + (Bug#30462) + +2018-03-03 Eli Zaretskii + + Avoid errors in flymake in builds --without-x + + * lisp/progmodes/flymake.el: Require 'mwheel'. (Bug#28732) + +2018-03-03 Eli Zaretskii + + More improvements of the Emacs manual + + * doc/emacs/rmail.texi (Rmail Reply, Rmail Sorting): Improve + wording. Suggested by Daniel Chakraborty + . + + * doc/emacs/glossary.texi (Glossary): Add cross-references. + Improve and clarify wording. Suggested by Gijs Hillenius + in emacs-manual-bugs@gnu.org. + + * doc/emacs/text.texi (Org Authoring): Add more supported formats + to the list. + (TeX Print): Improve wording. Slightly rearrange stuff. + (TeX Misc): Mention doctex-mode-hook. + (Two-Column): Minor rearrangement of text. Suggested by Michael + Albinus in emacs-manual-bugs@gnu.org. + + * doc/emacs/misc.texi (Saving Emacs Sessions): + * doc/emacs/programs.texi (Program Modes): Remove redundant text + and index entries. + +2018-03-03 Dmitry Gutov + + Backport: xref--next-error-function: Move xref's window point + + * lisp/progmodes/xref.el (xref--next-error-function): Move + xref's window point if it's visible. When we don't do that, + navigation can start looping after a while. + + (cherry picked from commit 108ce84432d597f92637ea74bd0a094224d157de) + +2018-03-02 Glenn Morris + + mwheel minor consistency fix + + * lisp/mwheel.el (mwheel-scroll-left-function) + (mwheel-scroll-right-function): + Change from defcustom to defvar, for consistency with pre-existing. + +2018-03-02 Eli Zaretskii + + * src/window.c (Frecenter): Improve commentary. + +2018-03-02 Eli Zaretskii + + Fix downloading non-text files in EWW + + * lisp/net/eww.el (eww-download-callback): Bind + coding-system-for-read to 'no-conversion', to avoid any code- or + EOL-conversions in downloaded files. (Bug#30664) + +2018-03-02 Tak Kunihiro + + Rename some mwheel options, for consistency + + * lisp/mwheel.el (mouse-wheel-tilt-scroll) + (mouse-wheel-flip-direction): Rename from mwheel-tilt-scroll-p, + mwheel-flip-direction. + (mwheel-scroll): Update for option renaming. + * doc/emacs/frames.texi (Mouse Commands): + Update for option renaming. + +2018-03-01 Glenn Morris + + * lisp/vc/add-log.el (add-change-log-entry): Replace obsolete alias. + +2018-03-01 Eli Zaretskii + + Improve the Emacs manual + + * doc/emacs/xresources.texi (Table of Resources): Mention that + some resources are ignored by toolkit builds. + * doc/emacs/custom.texi (Key Bindings): Improve indexing. + (Bug#30530) + +2018-03-01 Eli Zaretskii + + * lisp/dired-aux.el (dired-do-create-files): Doc fix. (Bug#30634) + +2018-03-01 Michael Albinus + + Further improvements on manuals + + * doc/emacs/xresources.texi: + * doc/lispref/display.texi: + * doc/lispref/keymaps.texi: + * doc/misc/dbus.texi: + * doc/misc/efaq-w32.texi: Use "GTK+" where applicable. + + * doc/emacs/xresources.texi (Resources): Mention several use + of "-xrm". + (Table of Resources) [verticalScrollBars]: Add reference to Scroll Bars. + +2018-03-01 Paul Eggert + + Require a larger stack size for threads on macOS (bug#30364) + + * src/systhread.c (sys_thread_create) + [THREADS_ENABLED && HAVE_PTHREAD && DARWIN_OS]: + Require at least 8MB stack size for x64 and 4MB for x86 on macOS. + Do not merge to master. + +2018-02-28 Glenn Morris + + * doc/lispref/streams.texi (Output Variables): Fix previous. + +2018-02-28 Michael Albinus + + Use "GTK+" where applicable in the manual + + * doc/emacs/display.texi (Standard Faces, Standard Faces): + * doc/emacs/emacs.texi (Top): + * doc/emacs/files.texi (Visiting): + * doc/emacs/frames.texi (Scroll Bars): + * doc/emacs/xresources.texi: Use "GTK+" where applicable. + +2018-02-28 Paul Eggert + + Document print-escape-control-characters + + * doc/lispref/streams.texi, etc/NEWS: Add doc. + +2018-02-27 Eli Zaretskii + + * doc/emacs/killing.texi (Rectangles): Don't use @key for characters. + +2018-02-27 Glenn Morris + + * lisp/emulation/viper.el: Unbreak it. + + Since 2017-03-19, M-x viper failed with function void cl-member-if. + Perhaps it isn't used much. + +2018-02-27 Eli Zaretskii + + More fixes in the Emacs manual + + * doc/emacs/xresources.texi (Table of Resources, Lucid Resources): + Sort the resources. + (Lucid Resources): Add cross-references. + (GTK Resource Basics): Fix wording. + (GTK styles): Add empty lines in a @table. Suggested by Michael + Albinus in emacs-manual-bugs@gnu.org. + +2018-02-27 Eli Zaretskii + + Avoid aborts in 'md5' + + * src/fns.c (extract_data_from_object): Don't crash if called with + an invalid object. (Bug#30627) + +2018-02-26 Michael Albinus + + Mark keys consistently in manuals + + * doc/emacs/killing.texi: + * doc/lispintro/emacs-lisp-intro.texi: + * doc/misc/calc.texi: + * doc/misc/cc-mode.texi: + * doc/misc/dired-x.texi: + * doc/misc/ede.texi: + * doc/misc/edt.texi: + * doc/misc/efaq.texi: + * doc/misc/erc.texi: + * doc/misc/eshell.texi: + * doc/misc/gnus-faq.texi: + * doc/misc/gnus-news.texi: + * doc/misc/idlwave.texi: + * doc/misc/ido.texi: + * doc/misc/mairix-el.texi: + * doc/misc/message.texi: + * doc/misc/mh-e.texi: + * doc/misc/newsticker.texi: + * doc/misc/org.texi: + * doc/misc/pcl-cvs.texi: + * doc/misc/ses.texi: + * doc/misc/sieve.texi: + * doc/misc/smtpmail.texi: + * doc/misc/speedbar.texi: + * doc/misc/srecode.texi: + * doc/misc/vhdl-mode.texi: + * doc/misc/vip.texi: + * doc/misc/viper.texi: Mark keys consistently. + +2018-02-26 Michael Albinus + + Remove @key{} markups from @kindex entries in manuals + + * doc/emacs/basic.texi: + * doc/emacs/buffers.texi: + * doc/emacs/building.texi: + * doc/emacs/calendar.texi: + * doc/emacs/custom.texi: + * doc/emacs/dired.texi: + * doc/emacs/display.texi: + * doc/emacs/files.texi: + * doc/emacs/frames.texi: + * doc/emacs/help.texi: + * doc/emacs/indent.texi: + * doc/emacs/killing.texi: + * doc/emacs/kmacro.texi: + * doc/emacs/mark.texi: + * doc/emacs/mini.texi: + * doc/emacs/misc.texi: + * doc/emacs/modes.texi: + * doc/emacs/msdos-xtra.texi: + * doc/emacs/msdos.texi: + * doc/emacs/mule.texi: + * doc/emacs/picture-xtra.texi: + * doc/emacs/programs.texi: + * doc/emacs/regs.texi: + * doc/emacs/rmail.texi: + * doc/emacs/screen.texi: + * doc/emacs/search.texi: + * doc/emacs/sending.texi: + * doc/emacs/text.texi: + * doc/emacs/trouble.texi: + * doc/misc/calc.texi: + * doc/misc/cc-mode.texi: + * doc/misc/ediff.texi: + * doc/misc/ert.texi: + * doc/misc/eww.texi: + * doc/misc/forms.texi: + * doc/misc/gnus.texi: + * doc/misc/idlwave.texi: + * doc/misc/info.texi: + * doc/misc/message.texi: + * doc/misc/mh-e.texi: + * doc/misc/newsticker.texi: + * doc/misc/org.texi: + * doc/misc/pcl-cvs.texi: + * doc/misc/rcirc.texi: + * doc/misc/reftex.texi: + * doc/misc/sc.texi: + * doc/misc/sieve.texi: + * doc/misc/vhdl-mode.texi: + * doc/misc/vip.texi: + * doc/misc/viper.texi: + * doc/misc/woman.texi: Remove @key{} markups from @kindex entries. + +2018-02-25 Eli Zaretskii + + * doc/emacs/display.texi (Standard Faces): Fix markup of index entry. + +2018-02-25 Michael Albinus + + Fix @kindex entries in manuals + + * doc/emacs/basic.texi: + * doc/emacs/buffers.texi: + * doc/emacs/building.texi: + * doc/emacs/calendar.texi: + * doc/emacs/custom.texi: + * doc/emacs/dired.texi: + * doc/emacs/display.texi: + * doc/emacs/files.texi: + * doc/emacs/frames.texi: + * doc/emacs/help.texi: + * doc/emacs/indent.texi: + * doc/emacs/killing.texi: + * doc/emacs/kmacro.texi: + * doc/emacs/mark.texi: + * doc/emacs/mini.texi: + * doc/emacs/misc.texi: + * doc/emacs/modes.texi: + * doc/emacs/msdos-xtra.texi: + * doc/emacs/msdos.texi: + * doc/emacs/mule.texi: + * doc/emacs/picture-xtra.texi: + * doc/emacs/programs.texi: + * doc/emacs/regs.texi: + * doc/emacs/rmail.texi: + * doc/emacs/screen.texi: + * doc/emacs/search.texi: + * doc/emacs/sending.texi: + * doc/emacs/text.texi: + * doc/emacs/trouble.texi: + * doc/lispref/files.texi: + * doc/misc/calc.texi: + * doc/misc/cc-mode.texi: + * doc/misc/ediff.texi: + * doc/misc/epa.texi: + * doc/misc/ert.texi: + * doc/misc/eww.texi: + * doc/misc/forms.texi: + * doc/misc/gnus.texi: + * doc/misc/info.texi: + * doc/misc/mairix-el.texi: + * doc/misc/message.texi: + * doc/misc/mh-e.texi: + * doc/misc/newsticker.texi: + * doc/misc/org.texi: + * doc/misc/pcl-cvs.texi: + * doc/misc/rcirc.texi: + * doc/misc/sc.texi: + * doc/misc/sieve.texi: + * doc/misc/vhdl-mode.texi: + * doc/misc/vip.texi: + * doc/misc/viper.texi: + * doc/misc/woman.texi: Fix @kindex entries. Mark keys consistently. + +2018-02-24 Michael Albinus + + Fix @cindex entries in manuals + + * doc/emacs/custom.texi: + * doc/emacs/dired.texi: + * doc/emacs/display.texi: + * doc/emacs/files.texi: + * doc/emacs/frames.texi: + * doc/emacs/killing.texi: + * doc/emacs/maintaining.texi: + * doc/emacs/misc.texi: + * doc/emacs/msdos-xtra.texi: + * doc/emacs/msdos.texi: + * doc/emacs/search.texi: + * doc/emacs/text.texi: + * doc/emacs/trouble.texi: + * doc/lispintro/emacs-lisp-intro.texi: + * doc/lispref/strings.texi: + * doc/lispref/text.texi: + * doc/misc/cc-mode.texi: + * doc/misc/efaq.texi: + * doc/misc/eieio.texi: + * doc/misc/emacs-mime.texi: + * doc/misc/gnus.texi: + * doc/misc/htmlfontify.texi: + * doc/misc/idlwave.texi: + * doc/misc/message.texi: + * doc/misc/mh-e.texi: + * doc/misc/sem-user.texi: + * doc/misc/ses.texi: + * doc/misc/tramp.texi: + * doc/misc/vhdl-mode.texi: Fix @cindex entries. + +2018-02-24 Michael Albinus + + Fix @cindex entries in org.texi + + * doc/misc/org.texi: Fix @cindex entries. Use consistently + @code{} for keywords. + +2018-02-24 Eli Zaretskii + + Document reserved keys + + * doc/emacs/custom.texi (Key Bindings): Mention keys reserved for + users. (Bug#30530) + +2018-02-24 Michael Albinus + + * doc/misc/ebrowse.texi: Use @key{} for keys. + +2018-02-24 Eli Zaretskii + + * src/keyboard.c (syms_of_keyboard): Doc fix. (Bug#30588) + +2018-02-24 Eli Zaretskii + + Improve documentation of X resources + + * doc/emacs/xresources.texi (Table of Resources): Add menu-related + resources. Add cross-references to "GTK Resources". + +2018-02-23 Glenn Morris + + * lisp/international/mule.el (keyboard-coding-system): Doc fix. + + Since multi-tty, this is always set. + +2018-02-23 Paul Eggert + + Minor doc fixes, mostly for timestamp issues + +2018-02-23 Eli Zaretskii + + * doc/emacs/mini.texi (Completion Styles): Improve indexing. + +2018-02-23 Michael Albinus + + Fix @findex and @vindex entries in manuals + + * doc/emacs/building.texi: + * doc/emacs/calendar.texi: + * doc/emacs/cmdargs.texi: + * doc/emacs/mini.texi: + * doc/emacs/misc.texi: + * doc/emacs/trouble.texi: + * doc/emacs/windows.texi: + * doc/lispintro/emacs-lisp-intro.texi: + * doc/lispref/edebug.texi: + * doc/lispref/frames.texi: + * doc/lispref/os.texi: + * doc/lispref/windows.texi: + * doc/misc/cc-mode.texi: + * doc/misc/dired-x.texi: + * doc/misc/ediff.texi: + * doc/misc/mh-e.texi: + * doc/misc/pcl-cvs.texi: + * doc/misc/reftex.texi: + * doc/misc/sc.texi: + * doc/misc/vhdl-mode.texi: + * doc/misc/viper.texi: Fix @findex and @vindex entries. + +2018-02-22 Alan Mackenzie + + Document, in the Elisp manual, how to get a character's raw syntax descriptor + + * doc/lispref/syntax.texi (Syntax Table internals): mention the use of `aref' + to get a character's raw syntax descriptor. + +2018-02-22 Eli Zaretskii + + Improvements in the Emacs manual + + * doc/emacs/custom.texi (Customization Groups) + (Changing a Variable, Browsing Custom, Customizing Faces): Fix + markup of keys. + (Changing a Variable, Saving Customizations): Update the + description of buttons in the Custom buffer. + (Face Customization): More accurate description. + (Specific Customization, Examining, Locals): Add blank lines in + the @table. Reported by Michael Albinus + in emacs-manual-bugs@gnu.org. + +2018-02-22 Glenn Morris + + Tiny doc/misc markup fixes + + * doc/misc/ediff.texi (Patch and Diff Programs): + * doc/misc/viper.texi (File and Buffer Handling): Fix markup typos. + +2018-02-22 Martin Rudalics + + Skip mouse-face overlap check when mouse-face is hidden (Bug#30519) + + * src/xdisp.c (note_mouse_highlight): Skip check whether + mouse-face highlighting overlay overlaps other mouse-face + overlays when mouse-face highlighting is hidden (Bug#30519). + +2018-02-22 Eli Zaretskii + + Fix capitalization of "Mail-Followup-To" + + * doc/emacs/sending.texi (Header Editing, Mail Headers): + Standardize on "Mail-Followup-To" as the capitalization. + +2018-02-21 Juri Linkov + + * lisp/progmodes/grep.el (grep-compute-defaults): + + Add grep-use-null-filename-separator to grep-host-defaults-alist. + (Bug#30559) + +2018-02-21 Charles A. Roelli + + Semantic manual fixes + + * doc/misc/semantic.texi (Tools): Fix wording and grammar, and + remove a reference to "document-vars.el" which, in the Emacs + repository, is part of lisp/cedet/srecode/document.el. + +2018-02-21 Eli Zaretskii + + More improvements in the Emacs manual + + * doc/emacs/help.texi (Misc Help): + * doc/emacs/m-x.texi (M-x): + * doc/emacs/mini.texi (Minibuffer File, Repetition): Prevent + breaking of command sequences between lines. Reported by Wojciech + Politarczyk in emacs-manual-bugs@gnu.org. + + * doc/emacs/sending.texi (Header Editing): Fix capitalization. + +2018-02-21 tino calancha + + * doc/misc/viper.texi (File and Buffer Handling): Add missing '@' + +2018-02-21 Eli Zaretskii + + Fix documentation of 'x-underline-at-descent-line' + + * doc/emacs/display.texi (Display Custom): + * src/nsterm.m (syms_of_nsterm): + * src/xterm.c (syms_of_xterm): + * src/w32term.c (syms_of_w32term): Mention the effect of + 'line-spacing' on the underline position. (Bug#30553) + +2018-02-21 Glenn Morris + + * lisp/textmodes/flyspell.el (flyspell-get-word): Doc fix. + +2018-02-20 Robert Pluim + + Correct variable markup in manuals + + * doc/lispref/minibuf.texi (Completion in Buffers): Fix markup. + * doc/lispref/text.texi (Filling): Likewise. + * doc/misc/dired-x.texi (Advanced Mark Commands): Likewise. + * doc/misc/epa.texi (Encrypting/decrypting gpg files): Likewise. + (Encrypting/decrypting gpg files): Likewise. + * doc/misc/tramp.texi (External methods): Likewise. + (Default Method): Likewise. + * doc/misc/viper.texi (Editing in Insert State): Likewise. + (File and Buffer Handling): Likewise. + * doc/misc/gnus.texi (Mail Source Customization): Likewise. + * doc/misc/url.texi (Customization): Likewise. Note obsolete + status of url-temporary-directory. + +2018-02-20 Eli Zaretskii + + Improve the "Sending Mail" chapter of Emacs manual + + * doc/emacs/sending.texi (Mail Format, Header Editing) + (Mail Aliases): Fix capitalization of mail headers. + (Mail Aliases): Use ~/.mailrc consistently. + (Mail Misc): More accurate description of disposition. Suggested + by Michael Albinus in + emacs-manual-bugs@gnu.org. + +2018-02-20 Eli Zaretskii + + Fix documentation of 'flyspell-auto-correct-word' + + * lisp/textmodes/flyspell.el (flyspell-get-word): Elaborate in the + doc string on how the function looks for the word to spell-check. + (flyspell-word, flyspell-auto-correct-word): Refer to + 'flyspell-get-word' for details about finding the word. + (Bug#30462) + +2018-02-19 Robert Pluim + + * doc/emacs/misc.texi (Saving Emacs Sessions): Fix markup. + +2018-02-19 Eli Zaretskii + + More changes in the Emacs manuals + + * doc/emacs/custom.texi (Customization Groups, Browsing Custom) + (Custom Themes, Keymaps, Prefix Keymaps, Modifier Keys) + (Function Keys, Named ASCII Chars, Mouse Buttons, Init Examples): + Fix punctuation. Suggested by Stefan Kamphausen + in emacs-manual-bugs@gnu.org. + + * doc/emacs/basic.texi (Arguments, Repeating): Avoid breaking + commands between lines. Reported by Wojciech Politarczyk + in emacs-manual-bugs@gnu.org. + + * doc/emacs/custom.texi (Init Rebinding): Move index entries about + rebinding keys from "Init File". (Bug#30528) + +2018-02-18 Eli Zaretskii + + More fixes in the Emacs manual + + * doc/emacs/abbrevs.texi (Defining Abbrevs, Expanding Abbrevs) + (Editing Abbrevs, Saving Abbrevs): Insert blank lines between + @item's. + (Expanding Abbrevs): Add 'unexpand-abbrev' to the list of + commands. Suggested by Michael Albinus + in emacs-manual-bugs@gnu.org. + +2018-02-18 Eli Zaretskii + + * src/data.c (Faref): Fix a typo in the doc string. (Bug#30510) + +2018-02-18 Michael Albinus + + Minor edit in tramp.texi + + * doc/misc/tramp.texi (Remote shell setup, Windows setup hints): + Improve @cindex entries. + +2018-02-17 Eli Zaretskii + + More improvements in the Emacs manual + + * doc/emacs/maintaining.texi (Xref Commands, Identifier Search) + (List Identifiers): Insert blank lines between @item's in a + @table. + (Etags Regexps): More accurate description of escape sequences. + (Select Tags Table): Prefer "~/emacs.d/init.el" to "~/.emacs". + Suggested by Michael Albinus in + emacs-manual-bugs@gnu.org. + +2018-02-17 Eli Zaretskii + + Improve documentation of 'electric-pair-mode' + + * lisp/elec-pair.el (electric-pair-mode): + * doc/emacs/programs.texi (Matching): Document the operation of + electric-pair-mode when there's an active region. (Bug#30502) + +2018-02-17 Charles A. Roelli + + lisp/vc/: documentation fixes + + * lisp/vc/vc.el (vc-region-history): Clarify documentation. + * lisp/vc/add-log.el (change-log-get-method-definition): + Indent documentation. + +2018-02-17 Robert Pluim + + Document 'desktop-files-not-to-save' + + * doc/emacs/misc.texi (Saving Emacs Sessions): Add description + of 'desktop-files-not-to-save'. + + * lisp/desktop.el (desktop-files-not-to-save): Explain that + the default value excludes buffers visiting remote files. + +2018-02-17 Eli Zaretskii + + Improve documentation of Profiling features + + * doc/lispref/debugging.texi (Profiling): Improve the description + of elp.el. Improve wording of the rest of the section. (Bug#30491) + + * lisp/emacs-lisp/elp.el (elp-instrument-list): Make the + interactive invocation work. Doc fix. + +2018-02-17 Eli Zaretskii + + Improve indexing of "performance" in ELisp manual + + * doc/lispref/debugging.texi (Profiling): + * doc/lispref/edebug.texi (Coverage Testing): Improve indexing of + features useful for performance analysis. (Bug#30490) + +2018-02-17 Eli Zaretskii + + Minor change in Emacs manual's VC chapter + + * doc/emacs/maintaining.texi (Log Buffer): Mention the "Summary" + header. Suggested by Michael Albinus in + emacs-manual-bugs@gnu.org. + +2018-02-17 Noam Postavsky + + Avoid memory corruption with specpdl overflow + edebug (Bug#30481) + + If grow_specpdl fails due to outgrowing max_specpdl_size, it will + signal an error *before* growing the specpdl array. Therefore, when + handling the signal, specpdl_ptr points past the end of the specpdl + array and any further use of of specpdl before unwinding (e.g., if + edebug binds signal-hook-function) will cause memory corruption. + * src/eval.c (signal_or_quit): Don't call `signal-hook-function' if + the specpdl_ptr is already past the end of the specpdl array. + * test/src/eval-tests.el (eval-tests--exceed-specbind-limit) + (eval-exceed-specbind-with-signal-hook): New test & helper function. + +2018-02-17 Noam Postavsky + + Document comment-fill-column in the manual (Bug#11636) + + * doc/emacs/programs.texi (Comment Commands) + (Options for Comments): Mention comment-fill-column. + +2018-02-17 Glenn Morris + + * doc/emacs/dired.texi (Marks vs Flags): Copyedits. + +2018-02-16 Eli Zaretskii + + More fixes for the Emacs manual + + * doc/emacs/vc1-xtra.texi (Customizing VC): Update the list of + backends. + * doc/emacs/maintaining.texi (Version Control): Add SRC to the + list of VCS. Remove the description of vc-state-refresh. + (Version Control Systems): Update the description of CVS. + (VC Change Log): Amend the list of VCS that don't support + vc0print-root-log. + (VCS Changesets, VCS Repositories, Advanced C-x v v) + (VC Change Log): Mention SRC with RCS where appropriate. + (VC Directory Commands): More accurate description of + vc-dir-hide-up-to-date. Suggested by Michael Albinus + in emacs-manual-bugs@gnu.org. + +2018-02-16 Robert Cochran + + Make 'byte-compile-error-on-warn' a safe file variable + + * lisp/emacs-lisp/bytecomp.el (byte-compile-error-on-warn): Mark + as a safe local variable for boolean values. + +2018-02-16 Eli Zaretskii + + Fix the doc string of flyspell-auto-correct-word + + * lisp/textmodes/flyspell.el (flyspell-auto-correct-word): Doc + fix. (Bug#30462) + +2018-02-16 Eli Zaretskii + + Improve the MS-Windows appendix of the Emacs manual + + * doc/emacs/msdos.texi (Windows Startup): Describe the pinned + shortcuts for starting Emacs. + (Text and Binary): Minor wording changes. + (Windows Files): Mention 'read-file-name-completion-ignore-case'. + (ls in Lisp): Update the list of supported 'ls' switches. + Document 'ls-lisp-use-string-collate' and + 'ls-lisp-UCA-like-collation'. + (Windows HOME): Mention warnings displayed at startup when + deprecated locations of HOME and/or deprecated names for init + files are used. + (Windows Keyboard): Mention delete-selection-mode. + +2018-02-16 Eli Zaretskii + + Fix 'vc-git--program-version' + + * lisp/vc/vc-git.el (vc-git--program-version): Fix the function to + work with Git for Windows. + +2018-02-16 Eli Zaretskii + + Fix typos and wording in the Emacs manual + + * doc/emacs/dired.texi (Marks vs Flags, Hiding Subdirectories): + * doc/emacs/maintaining.texi (Tag Syntax): + * doc/emacs/building.texi (Commands of GUD, Threads Buffer) + (Lisp Libraries): + * doc/emacs/windows.texi (Temporary Displays): Fix typos. + * doc/emacs/files.texi (Backup Copying): Fix wording. Reported by + Stefan Kamphausen in + emacs-manual-bugs@gnu.org. + +2018-02-16 Michael Albinus + + * doc/emacs/programs.texi (Semantic): Order programming languages. + +2018-02-15 Eli Zaretskii + + More improvements for the Emacs manual + + * doc/emacs/programs.texi (Basic Indent, Comment Commands): Fix + typos. + * doc/emacs/text.texi (TeX Print, HTML Mode, Enriched Faces): Fix + typos. + * doc/emacs/help.texi (Help Files): Improve @uref usage. Reported + by Stefan Kamphausen in + emacs-manual-bugs@gnu.org. + + * doc/emacs/fortran-xtra.texi (ForIndent Commands): Fix a typo. + (ForIndent Commands, Fortran Columns): Add empty lines between + @items in a @table. + (ForIndent Cont, ForIndent Num, Fortran Columns): Mention + 'column-number-indicator-zero-based'. + (ForIndent Vars): Fix a typo. + (Fortran Comments): Fix punctuation. + (ForIndent Cont, Fortran Autofill): Fix markup of keyboard input. + * doc/emacs/programs.texi (Comments): Fix a typo. + (Comment Commands): More accurate description of the commands. + (Options for Comments): Don't mention "hook". + (Man Page): Prefer "M-x man" if available. + (Hideshow): Fix the command key sequence. + (Semantic): Update supported languages. + (Semantic, Hungry Delete, Other C Commands): Fix markup of + commands. + (Misc for Programs): Fix a typo. + (Electric C, Hungry Delete): More accurate description of + mode-line lighters of CC submodes. + (Asm Mode): Add empty lines between @items in a @table. + * doc/emacs/programs.texi (Program Modes): Add a few more modes. + Reported by Michael Albinus in + emacs-manual-bugs@gnu.org. + + * doc/emacs/msdos.texi (Windows Misc): A minor rewording. + Suggested by Isaac Carter in + emacs-manual-bugs@gnu.org. + +2018-02-14 Eli Zaretskii + + Minor wording change in Emacs manual + + * doc/emacs/killing.texi (Accumulating Text): Fix spelling. + Reported by lyr3 in + emacs-manual-bugs@gnu.org. + +2018-02-14 Eli Zaretskii + + Another set of changes for the manual + + * doc/emacs/programs.texi (Program Indent): Add a cross-reference + to elisp's description of 'pp'. + (Program Modes): Add a few more programming modes. Add index + entries. + (Basic Indent, Multi-line Indent, C Indent, Comment Commands) + (Manipulating Comments): Fix markup of keyboard commands. + * doc/emacs/search.texi (Regexps): Add an example with non-ASCII + characters. Suggested by Michael Albinus + in emacs-manual-bugs@gnu.org. + + * doc/lispref/display.texi (Display Tables): Fix the description + of the 5th extra slot of the display table. (Bug#13473) + + * doc/emacs/regs.texi (Registers): Simplify wording. + + * doc/emacs/custom.texi (Init Non-ASCII): Remove outdated text + about perils of encoded keyboard input. + +2018-02-14 Michael Albinus + + Improvements on tramp.texi + + * doc/misc/tramp.texi: Use Tramp version in title. Further + improvements on user option indexing. Finish command examples + with @key{RET} where appropriate. + (Remote processes): Use 'M-&' for invocation of async shell. + (Frequently Asked Questions): Add example with simplified syntax. + +2018-02-13 Paul Eggert + + Tramp minor doc fixes + + * doc/misc/tramp.texi (Remote processes): Spelling fix and minor + wording improvement. + +2018-02-13 Eli Zaretskii + + More changes in the Emacs manual + + * doc/emacs/search.texi (Regexp Backslash): Say that + symbol-constituent characters are determined by the syntax table. + (Lax Search): Fix example of case-insensitive search. Fix a + typo. + (Unconditional Replace): Improve wording. + (Regexp Replace): More consistent wording. Reported by Michael + Albinus in emacs-manual-bugs@gnu.org. + + * doc/emacs/msdos.texi (Windows HOME): Avoid enumerating all the + Windows versions. Reported by Isaac Carter + in emacs-manual-bugs@gnu.org. + +2018-02-13 Andreas Schwab + + * lisp/vc/vc.el (vc-deduce-backend): Use ignore-errors. + +2018-02-13 Andreas Schwab + + Don't signal error in vc-deduce-backend + + * lisp/vc/vc.el (vc-deduce-backend): Return nil if + vc-responsible-backend signals an error. + +2018-02-13 Michael Albinus + + * doc/misc/tramp.texi: Index more user options. + +2018-02-13 Eli Zaretskii + + Minor change in the Emacs manual + + * doc/emacs/building.texi (Lisp Libraries): Explain why nil in + load-path is not a good idea. Suggested by James Yoo + in emacs-manual-bugs@gnu.org. + +2018-02-13 Eli Zaretskii + + NEWS update about 'string-trim' + + * etc/NEWS: Mention changes in string-trim family of functions. + (Bug#30442) + +2018-02-13 Noam Postavsky + + Clarify TRAMP process-environment interaction (Bug#30419) + + * doc/misc/tramp.texi (Remote processes): Index the + tramp-remote-process-environment description. Clarify the effects of + let-binding process-environment and the motivation for that behavior. + +2018-02-12 Juri Linkov + + * lisp/progmodes/grep.el (grep-num-matches-found): New variable. + + (grep-mode-line-matches): New defconst. + (grep-mode-font-lock-keywords): Update the regexp for “Grep finished” + to include the number of matches found. + (grep-process-setup): Set grep-num-matches-found to 0. + (grep-exit-message): New function with body moved from lambda + in grep-process-setup. Use grep-num-matches-found to return + the number of matches found. + (grep-filter): Increment grep-num-matches-found. + (grep-mode): Set compilation-mode-line-errors to grep-mode-line-matches. + (Bug#30397, bug#14017) + +2018-02-12 Eli Zaretskii + + Avoid aborts in cm.c due to too small TTY frame + + * src/frame.c (frame_windows_min_size): Limit TTY frames to a + minimum height large enough to allow for a menu bar, the mode + line, one text line and one echo-area line. This avoids aborts in + cm.c:cmcheckmagic. (Bug#30320) + +2018-02-12 Eli Zaretskii + + Another set of improvements in the Emacs manual + + * doc/emacs/msdos-xtra.texi (MS-DOS Keyboard): + * doc/emacs/msdos.texi (Windows Keyboard): + * doc/emacs/mark.texi (Using Region): + * doc/emacs/frames.texi (Menu Mouse Clicks): + * doc/emacs/macos.texi (Mac / GNUstep Basics): Fix spelling of + keys. Reported by Michael Albinus in + emacs-manual-bugs@gnu.org. + + * doc/emacs/glossary.texi (Glossary): Document that "c.f." is a + misspelling. Reported by Robert Pluim . + Various minor wording improvements. Suggested by Toon Claes + in emacs-manual-bugs@gnu.org. + More minor changes. Suggested by Michael Albinus + in emacs-manual-bugs@gnu.org. + + * doc/emacs/cmdargs.texi (Title X): Improve wording. + + * doc/emacs/building.texi (Grep Searching, Compilation): Avoid + passive tense. + + * doc/emacs/basic.texi (Moving Point): Move the description of the + bidi-related effects of the arrow keys from here ... + * doc/emacs/mule.texi (Bidirectional Editing): ... to here. + Explain the behavior of arrow keys between paragraphs. + +2018-02-12 Michael Albinus + + Fix help in mode-line-mode-menu + + * lisp/bindings.el (mode-line-mode-menu) [auto-revert-tail-mode]: + Fix help string. + +2018-02-11 Eli Zaretskii + + Improve documentation of desktop restoring + + * doc/emacs/misc.texi (Saving Emacs Sessions): Document + 'desktop-auto-save-timeout', 'desktop-load-locked-desktop', and + how to restore desktop in daemon mode. (Bug#30421) + +2018-02-11 Eli Zaretskii + + Improve the Emacs manual's chapter "Frames" + + * doc/emacs/frames.texi (Creating Frames): Add a cross-reference + to where frame visibility is described. + (Word and Line Mouse): Clarify wording. + (Scroll Bars): Qualify scroll-bar behavior. Reported by Dmitry + Gutov in emacs-manual-bugs@gnu.org. + +2018-02-10 Andreas Schwab + + Fix unbound mm-uu-entry in mm-uu + + * lisp/gnus/mm-uu.el (mm-uu-dissect): Rename entry to mm-uu-entry. + +2018-02-10 Eli Zaretskii + + Improve Emacs user manual in fixit.texi + + * doc/emacs/fixit.texi (Undo): Clarify inaccurate description of + repeated undo. + (Transpose): Describe explicitly what happens at EOL. + (Spelling): Use "spell-checking" consistently. Clarify wording. + Suggested by Toon Claes in + emacs-manual-bugs@gnu.org. + +2018-02-10 Eli Zaretskii + + Another minor change in the manual + + * doc/emacs/glossary.texi (Glossary): Add popular Latin + abbreviations, such as "e.g.". + +2018-02-10 Eli Zaretskii + + More minor changes in the Emacs manual + + * doc/emacs/xresources.texi (GTK resources): + * doc/emacs/trouble.texi (Contributing): + * doc/emacs/frames.texi (Fonts): Use HTTPS URLs instead of HTTP. + + * doc/emacs/docstyle.texi: Add a few @hyphenation directives, + based on reports in emacs-manual-bugs@gnu.org about incorrect + hyphenation. + +2018-02-10 Eli Zaretskii + + Avoid printing garbled error message from image.el + + * lisp/image.el (image--get-imagemagick-and-warn): Don't use + apostrophe in the error message, as that message is shown from a + unibyte buffer, and will run afoul of the default style of showing + quote characters. (Bug#30405) + +2018-02-09 Eli Zaretskii + + Doc string fix in latin-alt.el + + * lisp/leim/quail/latin-alt.el ("dutch"): Doc fix. Reported by + Robert Pluim . + +2018-02-09 Eli Zaretskii + + Minor improvements in package.texi + + * doc/emacs/package.texi (Package Menu): Minor wording change. + (Package Installation): Use HTTPS. A better @xref to GnuPG + manual. Suggested by Michael Albinus in + emacs-manual-bugs@gnu.org. + +2018-02-09 Eli Zaretskii + + Minor improvement in Emacs user manual + + * doc/emacs/files.texi (Directories): Document that + 'directory-free-space-program' and 'directory-free-space-args' are + only for local filesystems. Suggested by Michael Albinus + in emacs-manual-bugs@gnu.org. + +2018-02-09 Michael Albinus + + * doc/lispref/anti.texi (Antinews): Replace 25.2 with 25.3. + +2018-02-09 Eli Zaretskii + + Improve documentation of mini-window resizing + + * doc/lispref/minibuf.texi (Minibuffer Windows): Mention + 'message-truncate-lines' for preventing resizing of minibuffer + windows. (Bug#19045) + (Minibuffer Misc): Remove redundant description of + 'max-mini-window-height'. + * doc/lispref/display.texi (Echo Area Customization): Adjust + cross-reference. + +2018-02-09 Eli Zaretskii + + More changes in the Emacs manual + + * doc/emacs/fixit.texi (Undo): Mention 'revert-buffer'. + (Fixing Case): Fix punctuation. + (Spelling): Fix a typo. Suggested by Toon Claes + in emacs-manual-bugs@gnu.org. + + * doc/emacs/modes.texi (Major Modes): Break a long sentence into + 2. Reported by Stefan Kamphausen + in emacs-manual-bugs@gnu.org. + + * doc/emacs/indent.texi (Just Spaces): Yet another minor + rewording. + + * doc/emacs/building.texi (Watch Expressions): Improve wording. + (Multithreaded Debugging): Spell "tool bar" as 2 words. Reported + by Alberto Sartori in + emacs-manual-bugs@gnu.org. + (Grep Searching): Mention the effect of + 'compilation-mode-line-errors'. (Bug#30397) + + * doc/emacs/basic.texi (Moving Point): Minor reformatting and + rewording of what and do. + +2018-02-09 Noam Postavsky + + Clarify that text-quoting-style doesn't affect *Info* (Bug#24519) + + * src/doc.c (syms_of_doc) : Clarify that info + manual display is unaffected. + +2018-02-09 Noam Postavsky + + Mention that shell quoting of % on w32 may fail (Bug#19350) + + * doc/lispref/os.texi (Security Considerations): Mention that quoting + of '%' assumes no '^' in variable names. + * test/lisp/subr-tests.el (shell-quote-argument-%-on-w32): New test, + demonstrating what doesn't work. + +2018-02-09 Noam Postavsky + + Fix --no-build-details for w32 and macOS + + * src/w32term.c (w32_initialize_display_info): Handle nil system-name. + * lisp/term/ns-win.el (window-system-initialization): Don't pass nil + to `x-open-connection'. + +2018-02-09 Paul Eggert + + * doc/lispref/anti.texi (Antinews): Add some more antinews. + +2018-02-08 Paul Eggert + + Fix crashes when run with --no-build-details + + * src/xrdb.c (get_environ_db): + * src/xterm.c (same_x_server, x_term_init): + Don’t assume Fsystem_name returns a string. + +2018-02-08 Eli Zaretskii + + More changes for the manual + + * doc/emacs/anti.texi (Antinews): Replace 25.2 with 25.3. + Reported by Michael Albinus in + emacs-manual-bugs@gnu.org. + + * doc/emacs/custom.texi (Function Keys): Improve wording. + Suggested by clemens.radermacher@posteo.de in + emacs-manual-bugs@gnu.org. + + * doc/emacs/misc.texi (History References): Improve punctuation. + (Terminal emulator): Fix a typo. + (Term Mode): Remove redundant repeated text. + (Invoking emacsclient): Improve wording. Suggested by Alberto + Sartori in emacs-manual-bugs@gnu.org. + + * doc/emacs/files.texi (Visiting): Fix last change. + +2018-02-08 Noam Postavsky + + Doc fixes for process functions (Bug#30349) + + * doc/lispref/processes.texi (Asynchronous Processes): Explain what + the 'stopped' state means for a pipe process. + * src/process.c (Fmake_process, Fmake_pipe_process) + (Fmake_serial_process, Fmake_network_process): + * lisp/subr.el (start-process): + * lisp/net/tls.el (open-tls-stream): + * lisp/net/starttls.el (starttls-open-stream): + * lisp/net/gnutls.el (open-gnutls-stream): Remove meaningless phrase + "specify an output stream" phrase from docstring. + +2018-02-07 Basil L. Contovounesios + + Fix shr and CSS 4 color maps + + * lisp/net/shr-color.el (shr-color-html-colors-alist): Fix typos. + Add RebeccaPurple. + * lisp/textmodes/css-mode.el (css--color-map): Add fuchsia-magenta + and aqua-cyan aliases. + * test/lisp/textmodes/css-mode-tests.el (css-test-property-values): + Bump color count. + +2018-02-07 Eli Zaretskii + + Yet another round of improvements in the manual + + * doc/emacs/misc.texi (Document View): Improve wording. Reported + by lyr3 in emacs-manual-bugs@gnu.org. + + * doc/emacs/files.texi (Recover): Fix a typo. Reported by Jorge + in emacs-manual-bugs@gnu.org. + + * doc/emacs/anti.texi (Antinews): Fix typos. Reported by Justin + Heyes-Jones in emacs-manual-bugs@gnu.org. + + * doc/emacs/mini.texi (Basic Minibuffer): Clarify wording. + Reported by Vivishek Sudhir in + emacs-manual-bugs@gnu.org. + + * doc/emacs/cmdargs.texi (MS-Windows Registry): Improve wording + regarding registry keys. + + * doc/emacs/macos.texi (Mac OS / GNUstep): Sayu "NeXT Inc." + Reported by Cena Mayo in + emacs-manual-bugs@gnu.org. + + * doc/emacs/screen.texi (Screen): More accurate wording. + Suggested by Miloš Polakovič in + emacs-manual-bugs@gnu.org. + + * doc/emacs/indent.texi (Just Spaces): Minor wording change. + Suggested by David Bonnafous in + emacs-manual-bugs@gnu.org. + + * doc/emacs/text.texi (TeX Mode, TeX Editing): Improve and + simplify wording. Suggested by root@vxid.pw in + emacs-manual-bugs@gnu.org. + + * doc/emacs/cmdargs.texi (Window Size X): Minor wording change. + + * doc/emacs/display.texi (Highlight Interactively): Fill text. + (Optional Mode Line): Fix typos. Suggested by Alberto Sartori + in emacs-manual-bugs@gnu.org. + + * doc/emacs/building.texi (Debugger Operation): Clarify wording. + + * doc/emacs/files.texi (Directories, Comparing Files, Diff Mode) + (Remote Files, File Names, Visiting, Backup Deletion) + (Customize Save, Interlocking): Improve wording and accuracy of + the text. + * doc/emacs/maintaining.texi (VC With A Merging VCS): Don't say + "his". + * doc/emacs/arevert-xtra.texi (Auto Reverting Dired): Minor + wording changes. + (Supporting additional buffers): Moved to ... + * doc/lispref/backups.texi (Reverting): ... here. + * doc/emacs/emacs.texi (Top): Remove "Supporting additional + buffers" from master menu. + * doc/emacs/files.texi (Reverting): Mention use of file + notifications. Suggested by Michael Albinus + in emacs-manual-bugs@gnu.org. + + * doc/emacs/rmail.texi (Rmail Motion): Clarify what '-' does to + 'M-s'. Suggested by Arthur Milchior in + emacs-manual-bugs@gnu.org. + + * doc/emacs/cmdargs.texi (Initial Options): Capitalize "Emacs". + (Action Arguments): Fix a typo. + (Emacs Invocation): Replace em-dash with a comma. Suggested by + Justin Heyes-Jones in + emacs-manual-bugs@gnu.org. + + * doc/emacs/m-x.texi (M-x): Add an example. Suggested by Alberto + Sartori in emacs-manual-bugs@gnu.org. + + * doc/emacs/calendar.texi (Calendar/Diary, Calendar Unit Motion): + Minor wording changes. + +2018-02-04 Juri Linkov + + * lisp/vc/vc-git.el (vc-git-print-log): Restrict file scope to a single file + + when vc-git-print-log-follow is non-nil (bug#19045). + (vc-git-print-log-follow): Doc fix. + + * etc/NEWS: Mention 'vc-git-print-log-follow'. + +2018-02-04 Michael Albinus + + * doc/emacs/misc.texi (Interactive Shell): Refer to node "Minibuffer File" + + for hints how to type remote file names effectively. + +2018-02-04 Eli Zaretskii + + Yet another round of fixing the Emacs manual + + * doc/emacs/cmdargs.texi (Action Arguments): Rearrange text + describing what happens when Emacs is invoked with several file + arguments. Suggested by Grant Rettke in + emacs-manual-bugs@gnu.org. + + * doc/emacs/xresources.texi (GTK styles): + * doc/emacs/mini.texi (Passwords): + * doc/emacs/frames.texi (Scroll Bars): Use "cannot" instead of + "can not". + + * doc/emacs/macos.texi (Mac / GNUstep Basics): Clarify the effect + of ns-right-alternate-modifier when its value is 'none'. + Suggested by Wanderson Ferreira in + emacs-manual-bugs@gnu.org. + + * doc/emacs/calendar.texi (Importing Diary, Appointments): Now + sub-sections of Diary. + * doc/emacs/emacs.texi (Top): + * doc/emacs/calendar.texi (Diary): Adjust menus to the above + change. Suggested by Isaac Carter in + emacs-manual-bugs@gnu.org. + + * doc/emacs/anti.texi (Antinews): Fix grammar. + +2018-02-04 Alan Mackenzie + + * etc/NEWS: Expunge the solecism "allow(s)" + infinitive + +2018-02-04 Martin Rudalics + + Two minor fixes in Antinews + + * doc/emacs/anti.texi (Antinews): Two minor fixes. + +2018-02-03 Juri Linkov + + * etc/NEWS: Rename image-dired-thumb-job-limit + + to image-dired-queue-active-limit (bug#30279) + +2018-02-03 Basil L. Contovounesios + + * lisp/simple.el (async-shell-command, shell-command): Fix grammar + +2018-02-03 Basil L. Contovounesios + + Fix deferred display of async shell-command buffers + + * lisp/simple.el (shell-command): Display async shell buffer on + process output for every, not just first, command invocation. Check + buffer liveness, not name, before displaying. (bug#30213, bug#30280) + +2018-02-03 Eli Zaretskii + + Mention remote file name completion in Emacs manual + + * doc/emacs/mini.texi (Minibuffer File): Describe the behavior of + "//" with remote file names. (Bug#29149) + +2018-02-03 Eli Zaretskii + + Yest another round of manual copyedits + + * doc/emacs/fixit.texi (Transpose, Spelling): Minor stylistic + changes. Suggested by myq larson in + emacs-manual-bugs@gnu.org. + + * doc/emacs/calendar.texi (Appointments, Time Intervals): Mention + relevant Org features. Suggested by Alex Branham + in emacs-manual-bugs@gnu.org. + + * doc/emacs/dired.texi (Operating on Files) + (Shell Commands in Dired, Image-Dired): Minor stylistic edits. + Suggested by Francis Wright in + emacs-manual-bugs@gnu.org. + + * doc/emacs/commands.texi (User Input): Explain "C-M-a". + Suggested by Martin Luethi in + emacs-manual-bugs@gnu.org. + +2018-02-03 Eli Zaretskii + + Update xdisp.c commentary + + * src/xdisp.c: Update commentary regarding "asynchronous" entry + into redisplay. (Bug#30182) + +2018-02-03 Michael Albinus + + Fix Bug#30324 + + * lisp/net/rlogin.el (rlogin, rlogin-directory-tracking-mode): + Adapt to changed remote file name syntax. (Bug#30324) + +2018-02-03 Glenn Morris + + Recognize Org as builtin package (bug#30310) + + * lisp/org/org.el: Add Version header so detected as builtin package. + * test/lisp/org/org-tests.el: New file. + +2018-02-02 Eli Zaretskii + + Another round of manual fixups + + * doc/emacs/killing.texi (Killing by Lines): Clarify wording. + Reported by David Bonnafous in + emacs-manual-bugs@gnu.org. + + * doc/emacs/windows.texi (Other Window): Improve wording. + Reported by Rasmus Sjostrom in + emacs-manual-bugs@gnu.org. + + * doc/emacs/display.texi (Display Custom): Mention that line + numbers are not displayed in the minibuffer and tooltips. + + * doc/emacs/mini.texi (Basic Minibuffer): Improve wording. + * doc/emacs/regs.texi (Registers): More comma removal. Suggested + by "root@vxid.pw root@vxid.pw" in + emacs-manual-bugs@gnu.org. + + * doc/emacs/display.texi (Auto Scrolling): Fix a typo. Reported + by Kevin Foley in emacs-manual-bugs@gnu.org. + + * doc/emacs/display.texi (Scrolling): Fix grammar. + (Horizontal Scrolling): Mention reasonable limits for hscroll-step + float values. Suggested by Jerome Truong + in emacs-manual-bugs@gnu.org. + + * doc/emacs/mini.texi (Minibuffer Edit): Add a missing comma. + * doc/emacs/basic.texi (Position Info, Arguments, Repeating): + Remove redundant commas. Suggested by oldgaro + in emacs-manual-bugs@gnu.org. + + * doc/emacs/kmacro.texi (Save Keyboard Macro): Clarify wording. + Suggested by clemens.radermacher@posteo.de in + emacs-manual-bugs@gnu.org. + + * doc/emacs/building.texi (Compilation Mode): Improve and simplify + wording. Suggested by drone in + emacs-manual-bugs@gnu.org. + + * doc/emacs/dired.texi (Dired Enter): Clarify wording. + (Dired Deletion): Fix a typo. + (Marks vs Flags): Mention that M-DEL in Dired asks for the mark + character. Fix typos. + * doc/emacs/basic.texi (Moving Point, Erasing, Basic Undo) + (Arguments): Some additional information about keys. Reported by + Francis Wright in + emacs-manual-bugs@gnu.org. + +2018-02-02 Basil L. Contovounesios (tiny change) + + * doc/lispref/customize.texi (Custom Themes): Clarify .el preference. + + + https://lists.gnu.org/archive/html/emacs-devel/2018-01/msg00824.html. + +2018-02-02 Eli Zaretskii + + * doc/emacs/entering.texi (Entering Emacs): Another wording fix. + +2018-02-02 Noam Postavsky + + * doc/lispref/functions.texi (Inline Functions): Fix typo (Bug#30238). + + * lisp/imenu.el (imenu-generic-expression): Rephrase doc (Bug#30294). + +2018-02-01 Eli Zaretskii + + Fix last change of @key markup + + * doc/lispref/display.texi (Specified Space): + * doc/emacs/programs.texi (C Modes): + * doc/emacs/killing.texi (Rectangles): + * doc/emacs/emacs.texi (Top): + * doc/emacs/display.texi (Useless Whitespace): Don't use @key + markup for characters and commands, only for keys. + +2018-02-01 Eli Zaretskii + + * doc/emacs/entering.texi (Entering Emacs): Fix markup. + +2018-02-01 Michael Albinus + + Revert a1bbc49015 (Bug#30243), do not merge + + * lisp/files.el: + * test/lisp/net/tramp-tests.el: Revert a1bbc49015. (Bug#30243) + +2018-01-31 Michael Albinus + + Use @key{} where it is missing in the manuals + +2018-01-31 Eli Zaretskii + + Another round of manual fixes from proofreading + + * doc/emacs/search.texi (Incremental Search) + (Nonincremental Search): Mention the menu bar and fix typos. + Reported by David Bonnafous in + emacs-manual-bugs@gnu.org. + * doc/emacs/building.texi (Compilation): Improve wording. + Suggested by drone in + emacs-manual-bugs@gnu.org. + * doc/emacs/kmacro.texi (Basic Keyboard Macro): Clarify text. + Suggested by Robert Pluim in + emacs-manual-bugs@gnu.org. + * doc/emacs/display.texi (Highlight Interactively, Fringes): + Improve wording. Suggested by Justin Heyes-Jones + in emacs-manual-bugs@gnu.org. + * doc/emacs/commands.texi (User Input, Commands): Add missing + commas. + * doc/emacs/screen.texi (Menu Bar): Mention keyboard keys to + navigate menus. Suggested by oldgaro in + emacs-manual-bugs@gnu.org. + * doc/emacs/search.texi (Not Exiting Isearch): Fix a typo. + Reported by "Kocken, I.J. (Ilja)" in + emacs-manual-bugs@gnu.org. + * doc/emacs/basic.texi (Inserting Text): Mention one more label of + RET. Suggested by Francis Wright in + emacs-manual-bugs@gnu.org. + * doc/emacs/text.texi (Paragraphs): Clarify text. Reported by + Marcin Borkowski in emacs-manual-bugs@gnu.org. + * doc/emacs/maintaining.texi (Introduction to VC) + (Why Version Control?, VCS Merging): Fix typos and section + capitalization. Suggested by "R. P. Dillon" + in emacs-manual-bugs@gnu.org. + * doc/emacs/modes.texi (Major Modes, Choosing Modes): Fix typos. + Reported by clemens.radermacher@posteo.de in + emacs-manual-bugs@gnu.org. + +2018-01-31 Eli Zaretskii + + * doc/emacs/entering.texi (Entering Emacs): Fix last change. + +2018-01-31 Martin Rudalics + + Document 'window-at-side-p' in the Elisp manual + + * doc/lispref/windows.texi (Windows and Frames): Document + 'window-at-side-p'. + +2018-01-31 Noam Postavsky + + Document external-debugging-output in the Elisp Manual (Bug#24051) + + * doc/lispref/streams.texi (Output Streams): List + external-debugging-output. + * src/print.c (Fexternal_debugging_output): Quote `print' in + docstring. + +2018-01-31 Noam Postavsky + + Fix scroll-margin docstring (Bug#13791) + + * src/xdisp.c (syms_of_xdisp) : Explain that entering + the margin may trigger any sort of auto scrolling, not recentering + specifically. + +2018-01-31 Noam Postavsky + + Clarify that `ansi-term' is almost the same as `term' (Bug#18106) + + * lisp/term.el (ansi-term): Clarify that it's almost the same as `term'. + +2018-01-31 Noam Postavsky + + Update manual description of locate-file (Bug#23650) + + * doc/lispref/files.texi (Locating Files): Add example of predicate + when searching for a directory. + +2018-01-31 Noam Postavsky + + Clarify effect of print-gensym (Bug#27776) + + * src/print.c (syms_of_print) : Clarify that use of #N# + and #N= constructs depends on the value of `print-circle'. + +2018-01-31 Noam Postavsky + + * lisp/custom.el (defcustom): Fix docstring (Bug#27891). + +2018-01-31 Noam Postavsky + + Define cl-type-definition button type as needed (Bug#28899) + + * lisp/emacs-lisp/eieio-opt.el (eieio-help-constructor): Require + `cl-extra' before using the `cl-type-definition' button type. + +2018-01-31 Noam Postavsky + + Emphasize that GPG passphrase caching is temporary (Bug#29907) + + * doc/misc/epa.texi (Caching Passphrases): Clarify that caching is + temporary. + (GnuPG version compatibility): Fix typo. + +2018-01-30 Alan Mackenzie + + Fix @examples in cc-mode.info, where lines were getting glued together. + + This happened because of false @c's in macro lines. + + * doc/misc/cc-mode.texi (Line-up Functions): Remove the unneeded @c from + macros sssTBasicOffset, sssTsssTBasicOffset, and hereFn. + +2018-01-30 Eli Zaretskii + + Minor change in "Mode Line" section of Emacs manual + + * doc/emacs/screen.texi (Mode Line): Mention tooltips shown when + hovering the mouse over the mode line. Suggested by Eduardo + Mercovich in emacs-manual-bugs@gnu.org. + +2018-01-30 Eli Zaretskii + + More fixes in the Emacs manual + + * doc/emacs/screen.texi (Mode Line): Fix markup and + cross-references. + (Menu Bar): Correct inaccurate description. + * doc/emacs/macos.texi (Mac OS / GNUstep, Mac / GNUstep Events): + * doc/emacs/frames.texi (Scroll Bars): + * doc/emacs/emacs.texi (Top): + * doc/emacs/ack.texi (Acknowledgments): Fix spelling of "macOS". + * doc/emacs/misc.texi (Invoking emacsclient) + (emacsclient Options): Fix markup of 'emacsclient'. Suggested by + Michael Albinus in + emacs-manual-bugs@gnu.org. + +2018-01-30 Eli Zaretskii + + Minor copyedits in "Distribution" chapter of the Emacs manual + + * doc/emacs/emacs.texi (Distrib): Minor wording changes. + Suggested by oldgaro in + emacs-manual-bugs@gnu.org. + +2018-01-30 Eli Zaretskii + + Minor copyedits in "Entering" chapter of Emacs manual. + + * doc/emacs/entering.texi (Entering Emacs): Add a cross-reference + to MS-Windows startup procedures. Clarify wording. Suggested by + Francis Wright in emacs-manual-bugs@gnu.org. + +2018-01-30 Eli Zaretskii + + Minor wording change in the Emacs manual + + * doc/emacs/screen.texi (Screen): Minor wording change. Suggested + by Wesley Ellis in emacs-manual-bugs@gnu.org. + +2018-01-30 Eli Zaretskii + + Fix a typo in the Emacs manual + + * doc/emacs/custom.texi (Customization Groups): Fix a typo. + Reported by Jonathan Kyle Mitchell in + emacs-manual-bugs@gnu.org. + +2018-01-30 Eli Zaretskii + + Improve the "Basic" chapter of the Emacs manual + + * doc/emacs/basic.texi (Inserting Text): De-confuse text. + (Position Info): Add a cross-reference to where + display-line-numbers-mode is described. Reported by Joshua + Branson in emacs-manual-bugs@gnu.org. + +2018-01-30 Eli Zaretskii + + Resurrect lost text in lispref + + * doc/lispref/files.texi (File Attributes): Resurrect + inadvertently lost text. + +2018-01-30 Philipp Stephani + + * lisp/emacs-lisp/rx.el (rx): Fix the definition of 'blank'. + +2018-01-29 Paul Eggert + + Proofread os.texi and files.texi + +2018-01-29 Eli Zaretskii + + Minor improvements in the "International" chapter of Emacs manual + + * doc/emacs/mule.texi (File Name Coding): Stop enumerating all the + versions of MS-Windows. + (Modifying Fontsets, Unibyte Mode, Bidirectional Editing): Improve + wording. Reported by Francis Wright in + emacs-manual-bugs@gnu.org. + +2018-01-29 Eli Zaretskii + + Minor improvement in "Text" chapter of Emacs manual + + * doc/emacs/text.texi (Words): Improve wording. Reported by + Marcin Borkowski in + http://lists.gnu.org/archive/html/emacs-devel/2018-01/msg00784.html. + +2018-01-28 Martin Rudalics + + Fix some issues in the emacs/lispref manuals + + * doc/emacs/basic.texi (Continuation Lines): + * doc/emacs/building.texi (GDB User Interface Layout): + * doc/emacs/dired.texi (Misc Dired Features): + * doc/emacs/maintaining.texi (Identifier Search): + * doc/emacs/mark.texi (Using Region): + * doc/emacs/misc.texi (Document View, DocView Conversion): + * doc/emacs/modes.texi (Major Modes): + * doc/emacs/mule.texi (Input Methods, Unibyte Mode): + * doc/emacs/sending.texi (Mail Methods): Replace @code by + @kbd. + * doc/emacs/frames.texi (Text-Only Mouse): + * doc/lispref/maps.texi (Standard Keymaps): Replace @kbd by + @key. + * doc/lispref/compile.texi (Compiler Errors): Write + non-@code{nil} instead of non-nil. + * doc/lispref/debugging.texi (Internals of Debugger): + 'backtrace' is not a command. 'debugger-stack-frame-as-list' + is an option. + * doc/lispref/display.texi (Size of Displayed Text): + 'window-lines-pixel-dimensions' has a last argument 'left'. + * doc/lispref/display.texi (Attribute Functions): + 'set-face-underline' and 'set-face-inverse-video' are + commands. + (Tooltips): 'tooltip-frame-parameters' is an option. + (Bidirectional Display): 'bidi-paragraph-direction' is an + option. + * doc/lispref/frames.texi (Cursor Parameters): 'cursor-type' + is an option. + (Input Focus): Argument FRAME of 'x-focus-frame' is not + optional. + (Child Frames): Both arguments of 'frame-ancestor-p' are + non-optional. 'iconify-child-frame' is an option. + * doc/lispref/os.texi (Killing Emacs): + 'kill-emacs-query-functions' is an option. + * doc/lispref/windows.texi (Mouse Window Auto-selection): + 'mouse-autoselect-window' is an option. + +2018-01-28 Eli Zaretskii + + Fix multiple spaces in Emacs manual + + * doc/emacs/search.texi (Lax Search): Fix multiple consecutive + spaces in printed manual. + +2018-01-28 Eli Zaretskii + + * lisp/files.el (save-some-buffers): Doc fix. (Bug#30215) + +2018-01-28 Eli Zaretskii + + Adjudicate comments to "International" chapter of Emacs manual + + * doc/emacs/mule.texi (International Chars) + (Language Environments, Input Methods, Defining Fontsets) + (Modifying Fontsets): Minor wording changes and typo fixes. + Reported by Francis Wright in + emacs-manual-bugs@gnu.org. + +2018-01-28 Noam Postavsky + + Revert "Signal error for symbol names with strange quotes (Bug#2967)" + + That commit did not make the corresponding change to printing, thus + breaking the (eq (read (prin1-to-string SYM)) SYM) invariant for those + symbols. It's too late in the release cycle to change printing + behavior, therefore revert the reader change. + + Don't merge to master, the print function will be updated there (see + "Fix round tripping of read->print for symbols with strange quotes"). + +2018-01-27 Alan Mackenzie + + Allow read-passwd to hide characters inserted by C-y. (Security fix.) + + This fixes bug #30186. The with-silent-modifications was there to prevent + records of text property manipulations being put into buffer-undo-list. These + had been causing a significant slowdown in CC Mode with C-_ after a large + C-y. This CC Mode problem has since been solved by a different workaround. + + * lisp/subr.el (remove-yank-excluded-properties): Remove the invocation of + with-silent-modifications around the text property manipulations. + +2018-01-27 Eli Zaretskii + + * etc/PROBLEMS: Document issues with double-buffering. (Bug#30088) + +2018-01-27 Charles A. Roelli + + * lisp/window.el (window-largest-empty-rectangle): Fix grammar. + +2018-01-27 Eli Zaretskii + + Minor changes in the Emacs manual + + * doc/emacs/search.texi (Search Customizations): Minor wording + change. + * doc/emacs/files.texi (Customize Save): Add a cross-reference + for batch mode. + +2018-01-27 Eli Zaretskii + + Improve the "Files" chapter of the Emacs manual + + * doc/emacs/files.texi (File Shadowing): Rearrange text to explain + the notion of shadowing before describing the commands. Suggested + by Will Korteland in + emacs-manual-bugs@gnu.org. + +2018-01-27 Eli Zaretskii + + Improve the "Search" chapter of the Emacs manual + + * doc/emacs/search.texi (Regexps, Regexp Backslash): Improve and + clarify wording. + (Search Customizations): Fix a typo. Reported by Will Korteland + in emacs-manual-bugs@gnu.org. + +2018-01-27 Eli Zaretskii + + * src/indent.c (Findent_to): Doc fix. (Bug#30260) + +2018-01-27 Eli Zaretskii + + Improve documentation of 'edebug-defun' + + * doc/lispref/edebug.texi (Instrumenting): Document a workaround + for a failure to instrument due to unknown macros. (Bug#30243) + (Bug#10577) + +2018-01-27 Eli Zaretskii + + Mention crashes due to Noto Serif Kannada fonts + + * etc/PROBLEMS: Mention crashes due to Noto Serif Kannada fonts, + and the respective workarounds. (Bug#30193) + +2018-01-27 Noam Postavsky + + * doc/lispref/searching.texi: Document regexp repetition limit. + + * src/syntax.c (char-syntax): Warn about ignoring text properties (Bug#22765). + +2018-01-27 Noam Postavsky + + Load mm-util as needed for url-file and url-data (Bug#30258) + + * lisp/url/url-file.el (url-file): + * lisp/url/url-misc.el (url-data): Require `mm-util' before calling + `mm-disable-multibyte'. + * test/lisp/url/url-file-resources/file.txt: + * test/lisp/url/url-file-tests.el: + * test/lisp/url/url-misc-tests.el: New tests. + +2018-01-26 Eli Zaretskii + + Another minor copyedit in the manual's "Scroll Bars" + + * doc/emacs/frames.texi (Scroll Bars): Mention that up/down and + left/right buttons may be absent from the toolkit scroll bars. + Reported by Robert Pluim in + emacs-manual-bugs@gnu.org. + +2018-01-26 Eli Zaretskii + + Minor fix in documentation of 'equal' + + * doc/lispref/objects.texi (Equality Predicates): Correct the + conditions for equality of unibyte and multibyte strings. + (Bug#30218) + +2018-01-26 Eli Zaretskii + + * lisp/dired-x.el (dired-guess-shell-alist-user): Doc fix. (Bug#30192) + +2018-01-26 Eli Zaretskii + + Minor rewording in Emacs manual's "Help Mode" node + + * doc/emacs/help.texi (Help Mode): Minor rewording of description + of 'help-follow-symbol'. Suggested by Richard Stallman + in emacs-manual-bugs@gnu.org. + +2018-01-26 Eli Zaretskii + + Fixes for Emacs manual in frames.texi + + * doc/emacs/frames.texi (Scroll Bars, Mouse Commands) + (Window Dividers): Minor clarifications and spelling/markup + changes. Suggested by Robert Pluim in + emacs-manual-bugs@gnu.org. + +2018-01-24 Glenn Morris + + * doc/misc/cl.texi (Efficiency Concerns): Fix 2012-10-27 typo. + +2018-01-24 Robert Pluim + + Fix a few issues with latest GTK scaling changes + + * src/xfns.c (Fx_display_monitor_attributes_list): Call + gdk_screen_get_monitor_scale_factor only for GTK versions + 3.10..3.21. + * src/xterm.c (x_set_offset): Call xg_get_scale for GTK only. + +2018-01-24 Robert Pluim + + Use scaled coordinates when calling into GTK + + This is part two of a two part fix for the GTK scaling + problems. See the thread starting at + http://lists.gnu.org/archive/html/emacs-devel/2018-01/msg00372.html + for an explanation of why it has been added to Emacs 26. + + * src/gtkutil.c (xg_set_geometry): Scale down the coordinates that we + pass to gtk_window_move and to gtk_window_parse_geometry. + * src/xterm.c (x_set_offset): Likewise. + +2018-01-24 Robert Pluim + + Scale monitor dimensions obtained from GTK + + This is part one of a two part fix for the GTK scaling + problems. See the thread starting at + http://lists.gnu.org/archive/html/emacs-devel/2018-01/msg00372.html + for an explanation of why it has been added to Emacs 26. + + * src/xfns.c (Fx_display_monitor_attributes_list): Take scaling factor + into account when using GTK to query the monitor dimensions, which + allows frameset-restore to position frames correctly. + +2018-01-22 Rasmus + + Update Org to v9.1.6 + + Please note this is a bugfix release. See etc/ORG-NEWS for details. + +2018-01-22 Aaron Jensen + + Use text-pixels values only when saving framesets (Bug#30141) + + * lisp/frameset.el (frameset-persistent-filter-alist): Specify + that text-pixels values are by default only saved by framesets + so the parameter is not set when restoring (Bug#30141). + +2018-01-21 Eli Zaretskii + + Minor improvement in section "Pages" of the usere manual + + * doc/emacs/text.texi (Pages): Improve wording. Suggested by Will + Korteland in emacs-manual-bugs@gnu.org. + +2018-01-21 Eli Zaretskii + + Minor improvements in user manual + + * doc/emacs/trouble.texi (Emergency Escape, Contributing): Clarify + text. Suggested by Jonathan Kyle Mitchell + in emacs-manual-bugs@gnu.org + +2018-01-21 Eli Zaretskii + + Improve the "Mark" chapter of the user manual + + * doc/emacs/mark.texi (Setting Mark, Marking Objects): Improve and + clarify wording. Suggested by John Cummings + in emacs-manual-bugs@gnu.org. + +2018-01-21 Eli Zaretskii + + Improve the "Buffers" chapter of the user manual + + * doc/emacs/buffers.texi (Several Buffers): Correct description of + prefix arguments. Clarify "bury". + (Buffer Menus): Clarify wording. Reported by John Cummings + in emacs-manual-bugs@gnu.org. + +2018-01-21 tino calancha + + * lisp/term.el (term-send-input): Fix text duplication in docstring + +2018-01-20 Eli Zaretskii + + Improve "Buffers" in the user manual + + Suggested by John Cummings in + emacs-manual-bugs@gnu.org: + * doc/emacs/buffers.texi (Select Buffer): Add cross-references to + "Windows" and "Frames". + (Misc Buffer, Kill Buffer): Use BUFFER consistently in commands + that accept buffer names. + (Select Buffer): Improve description of "M-g M-g". Improve + wording. + (Misc Buffer, Kill Buffer): Improve wording. + (Kill Buffer): Fix the response required by kill-some-buffers. + Mention customizable options that control what clean-buffer-list + does. + (Several Buffers): More detail about + 'Buffer-menu-unmark-all-buffers'. + +2018-01-20 Eli Zaretskii + + Don't mention 'vc-stay-local' in the user manual + + * doc/emacs/vc1-xtra.texi (CVS Options): + * doc/emacs/maintaining.texi (VC Directory Buffer): Remove + references to 'vc-stay-local', which no longer exists. + (Bug#30138) + +2018-01-20 Eli Zaretskii + + Fix a typo in calendar.texi + + * doc/emacs/calendar.texi (Writing Calendar Files): Capitalize + "Filofax". Reported by Will Korteland + in emacs-manual-bugs@gnu.org. + +2018-01-20 Eli Zaretskii + + Minor improvement in wording of the Emacs manual + + * doc/emacs/killing.texi (CUA Bindings): Improve wording. + Suggested by Will Korteland in + emacs-manual-bugs@gnu.org. + +2018-01-20 Eli Zaretskii + + Revert "Fix tempfile creation when byte compiling" + + This reverts commit 4fd446e9f65e5531b18d4a0c5e08a6eeabc292d8: + * lisp/emacs-lisp/bytecomp.el (byte-compile-file): + Put tempfile next to the target file, as was the original intent. + +2018-01-19 Paul Eggert + + Fix tempfile creation when byte compiling + + This improves on the recent fix for master failing to build + on FreeBSD. Suggested by Stefan Monnier in: + https://lists.gnu.org/r/emacs-devel/2018-01/msg00600.html + * lisp/emacs-lisp/bytecomp.el (byte-compile-file): + Put tempfile next to the target file, as was the original intent. + +2018-01-19 Eli Zaretskii + + Improve the Emacs manual as suggested in emacs-manual-bugs + + * doc/emacs/killing.texi (Deletion and Killing): Add + cross-reference to "Kill Ring". + * doc/emacs/help.texi (Help Mode, Package Keywords): Improve + wording. Suggested by Will Korteland in + emacs-manual-bugs@gnu.org. + +2018-01-19 Stefan Monnier + + * lisp/emacs-lisp/bytecomp.el: Tweak last change + + (byte-compile-file): Move comment closer to the code it describes. + +2018-01-19 Eli Zaretskii + + Unbreak building Emacs on FreeBSD + + * lisp/emacs-lisp/bytecomp.el (byte-compile-file): Don't create + the temporary file under temporary-file-directory if the file + being compiled is specified by an absolute file name. This avoids + problems with ACL copying from temporary-file-directory on + FreeBSD. For the details, see + http://lists.gnu.org/archive/html/emacs-devel/2018-01/msg00513.html. + +2018-01-19 Eli Zaretskii + + Don't unnecessarily use non-ASCII characters in C sources + + * src/xwidget.c (webkit_javascript_finished_cb): + * src/gtkutil.c (xg_check_special_colors): + * src/emacs-module.c (module_make_string): + * src/alloc.c (SET_STACK_TOP_ADDRESS): Don't use non-ASCII quote + characters. + +2018-01-19 Eli Zaretskii + + Portability fixes in emacs-module-tests + + * test/Makefile.in (abs_top_srcdir): Add variable, needed by + CPPFLAGS. + * test/data/emacs-module/mod-test.c: Include . + (pT, pZ, T_TYPE, Z_TYPE): Compatibility macros, for systems that + don't support %td and %zu format specs. + (emacs_module_init): Use compatibility macros to make the error + messages print meaningful values (and avoid compiler warnings). + +2018-01-19 Noam Postavsky + + Add tests for term.el + + * lisp/term.el (term-mode): Add `name' attribute to + window-adjust-process-window-size-function value, so that it can be + removed easily by tests. + * test/lisp/term-tests.el: New tests. + +2018-01-19 Callum Cameron (tiny change) + + Handle split AnSiT messages for term.el (Bug#17231) + + Check to see if there is an incomplete command at the end of + term-emulate-terminal's input string, and, if so, save it so the whole + command can be processed when the next string arrives. + * lisp/term.el (term-partial-ansi-terminal-message): New variable. + (term-mode): Make it buffer local. + (term-handle-ansi-terminal-messages): Prepend it to the received + message, and set it if a partial message was received. + + + Do not merge to master, it will be solved differently there, see + "Switch term.el to lexical binding, and clean up code a bit". + +2018-01-19 Glenn Morris + + * configure.ac (emacs_config_features): Add threads. + +2018-01-18 Noam Postavsky + + Handle case-insensitive filenames for load-path shadows (Bug#5845) + + * lisp/emacs-lisp/shadow.el (load-path-shadows-find): Check for + shadowing with case-insensitive matching for files of case-insensitive + directories (as determined by `file-name-case-insensitive-p'). + * test/lisp/emacs-lisp/shadow-tests.el: New test. + * test/lisp/emacs-lisp/shadow-resources/p1/foo.el: + * test/lisp/emacs-lisp/shadow-resources/p2/FOO.el: New test files. + +2018-01-18 Alan Mackenzie + + CC Mode: stop distinguishing brace blocks from defun blocks by content. + + Don't merge to master; this is a quick fix for the emacs-26 branch. This is + essentially a reversion of the patch from 2017-11-10 which attempted to handle + C99's compound literals. + + The bug here was triggered when a defun block contained a declaration ending + in a comma, yet without a semicolon. + + * lisp/progmodes/cc-engine.el (c-guess-basic-syntax): At the CASE 9 test, + remove from the `or' form the test of a block's contents. + +2018-01-17 Philipp Stephani + + Use recommended long options syntax in man page + + * doc/man/emacs.1.in: Specify equals sign for long options, as + recommended in the manual. + +2018-01-17 Glenn Morris + + An overdue update of GNUstep emacs.tiff + + * nextstep/GNUstep/Emacs.base/Resources/emacs.tiff: + Update to the Emacs 25 icon. + Converted from hicolor/scalable/apps/emacs.svg using Gimp. + * nextstep/GNUstep/Emacs.base/Resources/README: Update. + +2018-01-17 Glenn Morris + + Add some test skip conditions + + * test/lisp/vc/vc-bzr-tests.el (vc-bzr-test-bug9726) + (vc-bzr-test-bug9781): Skip if bzr is faulty. + * test/src/thread-tests.el: Skip if not compiled with threads. + +2018-01-17 Lars Ingebrigtsen + + Add documentation to ecomplete.el + + * lisp/ecomplete.el: Add doc strings and document the format. + +2018-01-17 Glenn Morris + + * admin/authors.el (authors-aliases): Tighten more entries. + +2018-01-17 Glenn Morris + + Small startup fix for current-load-list + + * lisp/startup.el (command-line): + Avoid current-load-list being non-nil after startup ends. + +2018-01-17 Glenn Morris + + authors-aliases is based on regexps, not literals + + * admin/authors.el (authors-aliases): Replace overly-broad entries. + +2018-01-15 Charles A. Roelli + + Remove incorrect documentation in comint.el + + * lisp/comint.el (comint-interrupt-subjob, comint-kill-subjob) + (comint-quit-subjob, comint-stop-subjob): Remove incorrect + documentation. (Bug#30079) + +2018-01-15 Glenn Morris + + An overdue update of src/emacs-icon.h + + * src/emacs-icon.h: Update to the Emacs 25 icon. (Bug#30047) + Converted from hicolor/scalable/apps/emacs.svg using Gimp. + +2018-01-14 Eli Zaretskii + + Minor copyedit in ELisp manual + + * doc/lispref/variables.texi (File Local Variables): Improve + wording of last change. + +2018-01-14 Shuguang Sun + + Fix Bug#29149 in dired-aux.el + + * lisp/dired-aux.el (dired-shell-stuff-it): Handle remote + commands on w32 properly. (Bug#29149) + +2018-01-14 Michael Albinus + + Fix Bug#29149 in shell.el + + * lisp/shell.el (shell): Change order of `file-local-name' and + `expand-file-name' calls. Otherwise, the local file name + would be extended by a drive letter, even when it is a remote + file, seen from w32. (Bug#29149) + +2018-01-13 Stefan Monnier + + * doc/lispref/variables.texi (File Local Variables): Fix last change + +2018-01-13 Nicolas Petton + + * ChangeLog.3: Update + + Update etc/AUTHORS + +2018-01-13 Nicolas Petton + + Fix an entry in authors-aliases + + * admin/authors.el (authors-aliases): Replace regexp from "Max", which + is too broad, to an email address ("mu@magi.net.ru"). + 2018-01-13 Eli Zaretskii Mention trace.el facilities in the ELisp manual @@ -56130,7 +59159,7 @@ This file records repository revisions from commit 9d56a21e6a696ad19ac65c4b405aeca44785884a (exclusive) to -commit 5dd0e5c54d29e81c07798a124295c8c3f016d621 (inclusive). +commit 56794ac6c7fb1ca1dd1fd8dfb0ac40e20901f2c0 (inclusive). See ChangeLog.1 for earlier changes. ;; Local Variables: commit d88fed61f0d65a4231fa987ba12e3df55de31974 Author: Eli Zaretskii Date: Tue Apr 3 14:30:54 2018 +0300 Document custom-variable-history * etc/NEWS: * doc/lispref/minibuf.texi (Minibuffer History): Document 'custom-variable-history'. diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi index 1d1c93dd14..338e03ef74 100644 --- a/doc/lispref/minibuf.texi +++ b/doc/lispref/minibuf.texi @@ -634,6 +634,12 @@ A history list for arguments that are Lisp expressions to evaluate. A history list for arguments that are faces. @end defvar +@findex read-variable@r{, history list} +@defvar custom-variable-history +A history list for variable-name arguments read by +@code{read-variable}. +@end defvar + @c Less common: coding-system-history, input-method-history, @c command-history, grep-history, grep-find-history, @c read-envvar-name-history, setenv-history, yes-or-no-p-history. diff --git a/etc/NEWS b/etc/NEWS index b3fee089fa..a510c03956 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -474,6 +474,11 @@ depending on the new customizable variable 'read-answer-short'. Specifically, it puts the module name into 'load-history', prints loading messages if requested, and protects against recursive loads. ++++ +** The function 'read-variable' now uses its own history list. +The history of variable names read by 'read-variable' is recorded in +the new variable 'custom-variable-history'. + * Changes in Emacs 27.1 on Non-Free Operating Systems commit 56794ac6c7fb1ca1dd1fd8dfb0ac40e20901f2c0 Author: Michael Albinus Date: Tue Apr 3 09:51:01 2018 +0200 Fix Bug#31022 * lisp/cus-start.el (temporary-file-directory): Suppress file name handlers when calling `shell-command-to-string'. (Bug#31022) diff --git a/lisp/cus-start.el b/lisp/cus-start.el index dace6f7954..451e7f762f 100644 --- a/lisp/cus-start.el +++ b/lisp/cus-start.el @@ -277,9 +277,10 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of ((eq system-type 'darwin) (or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP") ;; See bug#7135. - (let ((tmp (ignore-errors - (shell-command-to-string - "getconf DARWIN_USER_TEMP_DIR")))) + (let* (file-name-handler-alist + (tmp (ignore-errors + (shell-command-to-string + "getconf DARWIN_USER_TEMP_DIR")))) (and (stringp tmp) (setq tmp (replace-regexp-in-string "\n\\'" "" tmp)) commit a231c33eabed7d2eb132b8cb45142c3012783f54 Author: Paul Eggert Date: Mon Apr 2 22:42:26 2018 -0700 Update "Calendrical Calculations" cites * lisp/calendar/calendar.el: Update citations to the book "Calendrical Calculations" and its predecessors. diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el index dae7b9dc00..85a5fc0c2b 100644 --- a/lisp/calendar/calendar.el +++ b/lisp/calendar/calendar.el @@ -76,20 +76,19 @@ ;; solar.el Sunrise/sunset, equinoxes/solstices ;; Technical details of all the calendrical calculations can be found in -;; ``Calendrical Calculations: The Millennium Edition'' by Edward M. Reingold -;; and Nachum Dershowitz, Cambridge University Press (2001). +;; "Calendrical Calculations: The Ultimate Edition" by Edward M. Reingold +;; and Nachum Dershowitz, Cambridge University Press (2018). -;; An earlier version of the technical details appeared in -;; ``Calendrical Calculations'' by Nachum Dershowitz and Edward M. Reingold, +;; An earlier version of the technical details appeared in "Calendrical +;; Calculations" by Nachum Dershowitz and Edward M. Reingold, ;; Software--Practice and Experience, Volume 20, Number 9 (September, 1990), -;; pages 899-928, and in ``Calendrical Calculations, Part II: Three Historical -;; Calendars'' by E. M. Reingold, N. Dershowitz, and S. M. Clamen, -;; Software--Practice and Experience, Volume 23, Number 4 (April, 1993), -;; pages 383-404. - -;; Hard copies of these two papers can be obtained by sending email to -;; reingold@cs.uiuc.edu with the SUBJECT "send-paper-cal" (no quotes) and -;; the message BODY containing your mailing address (snail). +;; pages 899-928 +;; , +;; and in "Calendrical Calculations, Part II: Three Historical Calendars" by +;; E. M. Reingold, N. Dershowitz, and S. M. Clamen, Software--Practice and +;; Experience, Volume 23, Number 4 (April, 1993), pages 383-404 +;; +;; ;; A note on free variables: @@ -1916,10 +1915,12 @@ use instead of point." The absolute date is the number of days elapsed since the (imaginary) Gregorian date Sunday, December 31, 1 BC. This function does not handle dates in years BC." - ;; See the footnote on page 384 of ``Calendrical Calculations, Part II: - ;; Three Historical Calendars'' by E. M. Reingold, N. Dershowitz, and S. M. - ;; Clamen, Software--Practice and Experience, Volume 23, Number 4 - ;; (April, 1993), pages 383-404 for an explanation. + ;; For an explanation, see the footnote on page 384 of "Calendrical + ;; Calculations, Part II: Three Historical Calendars" by + ;; E. M. Reingold, N. Dershowitz, and S. M. Clamen, + ;; Software--Practice and Experience, Volume 23, Number 4 (April, + ;; 1993), pages 383-404 + ;; . (let* ((d0 (1- date)) (n400 (/ d0 146097)) (d1 (% d0 146097)) commit 3cf4c8d9eb1e560e08a9c98d81f9640affdd9ce9 Author: Alan Mackenzie Date: Mon Apr 2 19:53:41 2018 +0000 * lisp/progmodes/cc-{defs,engine,langs,vars}.el: Comment the use of "a\\`" diff --git a/lisp/progmodes/cc-defs.el b/lisp/progmodes/cc-defs.el index ad9425a509..7ec57e03b3 100644 --- a/lisp/progmodes/cc-defs.el +++ b/lisp/progmodes/cc-defs.el @@ -81,7 +81,7 @@ (progn (require 'font-lock) (let (font-lock-keywords) - (font-lock-compile-keywords '("a\\`")) + (font-lock-compile-keywords '("a\\`")) ; doesn't match anything. font-lock-keywords)))) @@ -1775,7 +1775,7 @@ when it's needed. The default is the current language taken from (t re))) - ;; Produce a regexp that matches nothing. + ;; Produce a regexp that doesn't match anything. (if adorn "\\(a\\`\\)" "a\\`"))) diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index ac1b462ee2..d1380ff6f6 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -870,7 +870,7 @@ comment at the start of cc-engine.el for more info." stack ;; Regexp which matches "for", "if", etc. (cond-key (or c-opt-block-stmt-key - "a\\`")) ; Matches nothing. + "a\\`")) ; Doesn't match anything. ;; Return value. (ret 'same) ;; Positions of the last three sexps or bounds we've stopped at. @@ -8522,7 +8522,7 @@ comment at the start of cc-engine.el for more info." ;; Skip over type decl prefix operators. (Note similar code in ;; `c-forward-declarator'.) (if (and c-recognize-typeless-decls - (equal c-type-decl-prefix-key "a\\`")) + (equal c-type-decl-prefix-key "a\\`")) ; Regexp which doesn't match (when (eq (char-after) ?\() (progn (setq paren-depth (1+ paren-depth)) @@ -10154,7 +10154,7 @@ comment at the start of cc-engine.el for more info." ;; legal because it's part of a "compound keyword" like ;; "enum class". Of course, if c-after-brace-list-key ;; is nil, we can skip the test. - (or (equal c-after-brace-list-key "a\\`") + (or (equal c-after-brace-list-key "a\\`") ; Regexp which doesn't match (save-match-data (save-excursion (not diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el index 8fa253f304..8671e18e2d 100644 --- a/lisp/progmodes/cc-langs.el +++ b/lisp/progmodes/cc-langs.el @@ -1280,7 +1280,7 @@ operators." (c--set-difference (c-lang-const c-assignment-operators) '("=") :test 'string-equal))) - "a\\`")) + "a\\`")) ; Doesn't match anything. (c-lang-defvar c-assignment-op-regexp (c-lang-const c-assignment-op-regexp)) @@ -1503,7 +1503,7 @@ properly." ;; language) t (if (c-lang-const c-block-comment-ender) (regexp-quote (c-lang-const c-block-comment-ender)) - "a\\`")) + "a\\`")) ; Doesn't match anything. (c-lang-defvar c-block-comment-ender-regexp (c-lang-const c-block-comment-ender-regexp)) @@ -1522,7 +1522,7 @@ properly." ;; language) t (if (c-lang-const c-block-comment-starter) (regexp-quote (c-lang-const c-block-comment-starter)) - "a\\`")) + "a\\`")) ; Doesn't match anything. (c-lang-defvar c-block-comment-start-regexp (c-lang-const c-block-comment-start-regexp)) @@ -1531,7 +1531,7 @@ properly." ;; language; it does in all 7 CC Mode languages). t (if (c-lang-const c-line-comment-starter) (regexp-quote (c-lang-const c-line-comment-starter)) - "a\\`")) + "a\\`")) ; Doesn't match anything. (c-lang-defvar c-line-comment-start-regexp (c-lang-const c-line-comment-start-regexp)) @@ -1546,7 +1546,7 @@ properly." (c-lang-defconst c-doc-comment-start-regexp "Regexp to match the start of documentation comments." - t "a\\`" + t "a\\`" ; Doesn't match anything. ;; From font-lock.el: `doxygen' uses /*! while others use /**. (c c++ objc) "/\\*[*!]" java "/\\*\\*" @@ -3001,7 +3001,7 @@ Note that Java specific rules are currently applied to tell this from "Regexp matching a keyword that is followed by a colon, where the whole construct can precede a declaration. E.g. \"public:\" in C++." - t "a\\`" + t "a\\`" ; Doesn't match anything. c++ (c-make-keywords-re t (c-lang-const c-protection-kwds))) (c-lang-defvar c-decl-start-colon-kwd-re (c-lang-const c-decl-start-colon-kwd-re)) @@ -3379,7 +3379,7 @@ list." (c-lang-defconst c-pre-id-bracelist-key "A regexp matching tokens which, preceding an identifier, signify a bracelist. " - t "a\\`" + t "a\\`" ; Doesn't match anything. c++ "new\\([^[:alnum:]_$]\\|$\\)\\|&&?\\(\\S.\\|$\\)") (c-lang-defvar c-pre-id-bracelist-key (c-lang-const c-pre-id-bracelist-key)) @@ -3435,7 +3435,7 @@ the invalidity of the putative template construct." ;; before the '{' of the enum list, to avoid searching too far. "[^][{};/#=]*" "{") - "a\\`")) + "a\\`")) ; Doesn't match anything. (c-lang-defvar c-enum-clause-introduction-re (c-lang-const c-enum-clause-introduction-re)) @@ -3551,7 +3551,7 @@ i.e. before \":\". Only used if `c-recognize-colon-labels' is set." "Regexp matching things that can't occur two symbols before a colon in a label construct. This catches C++'s inheritance construct \"class foo : bar\". Only used if `c-recognize-colon-labels' is set." - t "a\\`" ; matches nothing + t "a\\`" ; Doesn't match anything. c++ (c-make-keywords-re t '("class"))) (c-lang-defvar c-nonlabel-token-2-key (c-lang-const c-nonlabel-token-2-key)) diff --git a/lisp/progmodes/cc-vars.el b/lisp/progmodes/cc-vars.el index fcb1cac099..047511406d 100644 --- a/lisp/progmodes/cc-vars.el +++ b/lisp/progmodes/cc-vars.el @@ -1647,6 +1647,7 @@ white space either before or after the operator, but not both." :type 'boolean :group 'c) +;; Initialize the next two to a regexp which never matches. (defvar c-noise-macro-with-parens-name-re "a\\`") (defvar c-noise-macro-name-re "a\\`") @@ -1677,7 +1678,7 @@ These are recognized by CC Mode only in declarations." ;; Convert `c-noise-macro-names' and `c-noise-macro-with-parens-names' into ;; `c-noise-macro-name-re' and `c-noise-macro-with-parens-name-re'. (setq c-noise-macro-with-parens-name-re - (cond ((null c-noise-macro-with-parens-names) "a\\`") + (cond ((null c-noise-macro-with-parens-names) "a\\`") ; Never matches. ((consp c-noise-macro-with-parens-names) (concat (regexp-opt c-noise-macro-with-parens-names t) "\\([^[:alnum:]_$]\\|$\\)")) @@ -1686,7 +1687,7 @@ These are recognized by CC Mode only in declarations." (t (error "c-make-noise-macro-regexps: \ c-noise-macro-with-parens-names is invalid: %s" c-noise-macro-with-parens-names)))) (setq c-noise-macro-name-re - (cond ((null c-noise-macro-names) "a\\`") + (cond ((null c-noise-macro-names) "a\\`") ; Never matches anything. ((consp c-noise-macro-names) (concat (regexp-opt c-noise-macro-names t) "\\([^[:alnum:]_$]\\|$\\)")) commit dfa922dd844c7af966a42b949aee32248ce4e8a2 Author: Paul Eggert Date: Mon Apr 2 12:19:00 2018 -0700 Clarify eq on floats * doc/lispref/objects.texi (Equality Predicates): Say that two floats with the same values might or might not be eq. diff --git a/doc/lispref/objects.texi b/doc/lispref/objects.texi index af740625ad..78a7dccc88 100644 --- a/doc/lispref/objects.texi +++ b/doc/lispref/objects.texi @@ -2083,6 +2083,10 @@ strings), two arguments with the same contents or elements are not necessarily @code{eq} to each other: they are @code{eq} only if they are the same object, meaning that a change in the contents of one will be reflected by the same change in the contents of the other. +For other types of objects whose contents cannot be changed (e.g., +floats), two arguments with the same contents might or might not be +the same object, and @code{eq} returns @code{t} or @code{nil} +depending on whether the Lisp interpreter created one object or two. @example @group @@ -2095,6 +2099,12 @@ be reflected by the same change in the contents of the other. @result{} t @end group +@group +(eq 3.0 3.0) + @result{} t @r{or} nil +;; @r{The result is implementation-dependent.} +@end group + @group (eq "asdf" "asdf") @result{} nil commit 1527235baf4675f66b1fff2a23d77df031b8c444 Author: Eli Zaretskii Date: Mon Apr 2 20:25:52 2018 +0300 ; * doc/lispref/compile.texi (Compilation Functions): Fix wording. diff --git a/doc/lispref/compile.texi b/doc/lispref/compile.texi index 51febaa7c1..6d21ca3e6a 100644 --- a/doc/lispref/compile.texi +++ b/doc/lispref/compile.texi @@ -161,7 +161,7 @@ function. @code{compile-defun} normally displays the result of evaluation in the echo area, but if @var{arg} is non-@code{nil}, it inserts the result -in the current buffer after the form it's compiled. +in the current buffer after the form it has compiled. @end deffn @deffn Command byte-compile-file filename &optional load commit e3525385a87c92fdca6b3cf929797a731c688a3f Author: Gemini Lasswell Date: Mon Apr 2 09:34:31 2018 -0700 Fix Testcover bug in handling of vectors containing dotted lists * lisp/emacs-lisp/testcover.el (testcover-analyze-coverage-compose): Handle dotted lists. Fix bug#30909. * test/lisp/emacs-lisp/testcover-resources/testcases.el: (dotted-list-in-vector-bug-30909): New test case. (quotes-within-backquotes-bug-25316, dotted-backquote) (quoted-backquote, backquoted-vector-bug-25316) (vector-in-macro-spec-bug, backquoted-dotted-alist): Change docstrings to mention analyzing code instead of reinstrumenting it. diff --git a/lisp/emacs-lisp/testcover.el b/lisp/emacs-lisp/testcover.el index e0d2797c0c..d48c79cd77 100644 --- a/lisp/emacs-lisp/testcover.el +++ b/lisp/emacs-lisp/testcover.el @@ -644,9 +644,11 @@ are 1value." "Analyze a list of FORMS for code coverage using FUNC. The list is 1valued if all of its constituent elements are also 1valued." (let ((result '1value)) - (dolist (form forms) - (let ((val (funcall func form))) - (setq result (testcover-coverage-combine result val)))) + (while (consp forms) + (setq result (testcover-coverage-combine result (funcall func (car forms)))) + (setq forms (cdr forms))) + (when forms + (setq result (testcover-coverage-combine result (funcall func forms)))) result)) (defun testcover-analyze-coverage-backquote (bq-list) diff --git a/test/lisp/emacs-lisp/testcover-resources/testcases.el b/test/lisp/emacs-lisp/testcover-resources/testcases.el index c9703b03de..69ef5b596b 100644 --- a/test/lisp/emacs-lisp/testcover-resources/testcases.el +++ b/test/lisp/emacs-lisp/testcover-resources/testcases.el @@ -226,7 +226,7 @@ (should-not (testcover-testcase-cc nil)) ;; ==== quotes-within-backquotes-bug-25316 ==== -"Forms to instrument are found within quotes within backquotes." +"Forms to analyze are found within quotes within backquotes." ;; ==== (defun testcover-testcase-make-list () (list 'defun 'defvar)) @@ -377,7 +377,7 @@ (should-error (testcover-testcase-thing 3)) ;; ==== dotted-backquote ==== -"Testcover correctly instruments dotted backquoted lists." +"Testcover can analyze code inside dotted backquoted lists." ;; ==== (defun testcover-testcase-dotted-bq (flag extras) (let* ((bq @@ -388,7 +388,7 @@ (should (equal '(a b c d e) (testcover-testcase-dotted-bq t '(d e)))) ;; ==== quoted-backquote ==== -"Testcover correctly instruments the quoted backquote symbol." +"Testcover correctly handles the quoted backquote symbol." ;; ==== (defun testcover-testcase-special-symbols () (list '\` '\, '\,@)) @@ -396,7 +396,7 @@ (should (equal '(\` \, \,@) (testcover-testcase-special-symbols))) ;; ==== backquoted-vector-bug-25316 ==== -"Testcover reinstruments within backquoted vectors." +"Testcover can analyze code within backquoted vectors." ;; ==== (defun testcover-testcase-vec (a b c) `[,a%%% ,(list b%%% c%%%)%%%]%%%) @@ -411,8 +411,15 @@ (should (equal '([[4 5] 6]) (testcover-testcase-vec-in-list 4 5 6))) (should (equal '([100]) (testcover-testcase-vec-arg 100))) +;; ==== dotted-list-in-vector-bug-30909 ==== +"Testcover can analyze dotted pairs within vectors." +;; ==== +(defun testcover-testcase-vectors-with-dotted-pairs () + (equal [(1 . "x")] [(1 2 . "y")])%%%) +(should-not (testcover-testcase-vectors-with-dotted-pairs)) + ;; ==== vector-in-macro-spec-bug-25316 ==== -"Testcover reinstruments within vectors." +"Testcover can analyze code inside vectors." ;; ==== (defmacro testcover-testcase-nth-case (arg vec) (declare (indent 1) @@ -466,7 +473,7 @@ regarding the odd-looking coverage result for the quoted form." (should (equal (testcover-testcase-use-thing) 15)) ;; ==== backquoted-dotted-alist ==== -"Testcover can instrument a dotted alist constructed with backquote." +"Testcover can analyze a dotted alist constructed with backquote." ;; ==== (defun testcover-testcase-make-alist (expr entries) `((0 . ,expr%%%) . ,entries%%%)%%%) commit b07decdf02bdea0c2cf7f0da1e8a961ec65bb6c1 Author: Tino Calancha Date: Tue Apr 3 00:43:25 2018 +0900 ; * doc/lispref/compile.texi (Compilation Functions): Fix typo diff --git a/doc/lispref/compile.texi b/doc/lispref/compile.texi index e665b84f9b..51febaa7c1 100644 --- a/doc/lispref/compile.texi +++ b/doc/lispref/compile.texi @@ -161,7 +161,7 @@ function. @code{compile-defun} normally displays the result of evaluation in the echo area, but if @var{arg} is non-@code{nil}, it inserts the result -in the current buffer after the form it compiled. +in the current buffer after the form it's compiled. @end deffn @deffn Command byte-compile-file filename &optional load commit d06c2e7a666fbc7aa0e7a9b134d9e373431d76bf Author: Charles A. Roelli Date: Mon Apr 2 16:18:23 2018 +0200 Add a history variable for `read-variable' * src/minibuf.c (Fread_variable): Use the history variable when calling Fcompleting_read. (syms_of_minibuf): New history variable, custom-variable-history. diff --git a/src/minibuf.c b/src/minibuf.c index 45cf15224a..5cb6919a0f 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -1090,7 +1090,8 @@ A user option, or customizable variable, is one for which name = Fcompleting_read (prompt, Vobarray, Qcustom_variable_p, Qt, - Qnil, Qnil, default_string, Qnil); + Qnil, Qcustom_variable_history, + default_string, Qnil); if (NILP (name)) return name; return Fintern (name, Qnil); @@ -1931,6 +1932,9 @@ syms_of_minibuf (void) staticpro (&last_minibuf_string); last_minibuf_string = Qnil; + DEFSYM (Qcustom_variable_history, "custom-variable-history"); + Fset (Qcustom_variable_history, Qnil); + DEFSYM (Qminibuffer_history, "minibuffer-history"); DEFSYM (Qbuffer_name_history, "buffer-name-history"); Fset (Qbuffer_name_history, Qnil); commit b393ecf8e288f1e1b6a8ac55006715fa1046a5d4 Author: Alan Mackenzie Date: Mon Apr 2 11:33:24 2018 +0000 Optimize c-syntactic-skip-backward, c-determine-limit for large comment blocks * lisp/progmodes/cc-engine.el (c-ssb-lit-begin): Remove. (c-syntactic-skip-backward): Remove the surrounding c-self-bind-state-cache. Use the standard function c-literal-start in place of the special purpose c-ssb-lit-begin. With a suitable skip-chars argument (the usual case), optimize by invoking c-backward-syntactic-ws to move back over comment blocks. (c-determine-limit-get-base): Inovke an early c-backward-syntactic-ws. (c-determine-limit): Use c-forward-comment whilst moving forward. Cope with an empty position stack whilst looking for non-literals (bug fix). In the recursive call, double try-size to prevent Lisp stack overflow. diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index 26ce2c919e..ac1b462ee2 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -4736,56 +4736,6 @@ comment at the start of cc-engine.el for more info." (defvar safe-pos-list) ; bound in c-syntactic-skip-backward -(defsubst c-ssb-lit-begin () - ;; Return the start of the literal point is in, or nil. - ;; We read and write the variables `safe-pos', `safe-pos-list', `state' - ;; bound in the caller. - - ;; Use `parse-partial-sexp' from a safe position down to the point to check - ;; if it's outside comments and strings. - (save-excursion - (let ((pos (point)) safe-pos state) - ;; Pick a safe position as close to the point as possible. - ;; - ;; FIXME: Consult `syntax-ppss' here if our cache doesn't give a good - ;; position. - - (while (and safe-pos-list - (> (car safe-pos-list) (point))) - (setq safe-pos-list (cdr safe-pos-list))) - (unless (setq safe-pos (car-safe safe-pos-list)) - (setq safe-pos (max (or (c-safe-position - (point) (c-parse-state)) - 0) - (point-min)) - safe-pos-list (list safe-pos))) - - ;; Cache positions along the way to use if we have to back up more. We - ;; cache every closing paren on the same level. If the paren cache is - ;; relevant in this region then we're typically already on the same - ;; level as the target position. Note that we might cache positions - ;; after opening parens in case safe-pos is in a nested list. That's - ;; both uncommon and harmless. - (while (progn - (setq state (parse-partial-sexp - safe-pos pos 0)) - (< (point) pos)) - (setq safe-pos (point) - safe-pos-list (cons safe-pos safe-pos-list))) - - ;; If the state contains the start of the containing sexp we cache that - ;; position too, so that parse-partial-sexp in the next run has a bigger - ;; chance of starting at the same level as the target position and thus - ;; will get more good safe positions into the list. - (if (elt state 1) - (setq safe-pos (1+ (elt state 1)) - safe-pos-list (cons safe-pos safe-pos-list))) - - (if (or (elt state 3) (elt state 4)) - ;; Inside string or comment. Continue search at the - ;; beginning of it. - (elt state 8))))) - (defun c-syntactic-skip-backward (skip-chars &optional limit paren-level) "Like `skip-chars-backward' but only look at syntactically relevant chars, i.e. don't stop at positions inside syntactic whitespace or string @@ -4802,108 +4752,110 @@ Non-nil is returned if the point moved, nil otherwise. Note that this function might do hidden buffer changes. See the comment at the start of cc-engine.el for more info." - - (c-self-bind-state-cache - (let ((start (point)) - ;; A list of syntactically relevant positions in descending - ;; order. It's used to avoid scanning repeatedly over - ;; potentially large regions with `parse-partial-sexp' to verify - ;; each position. Used in `c-ssb-lit-begin' - safe-pos-list + (let* ((start (point)) ;; The result from `c-beginning-of-macro' at the start position or the - ;; start position itself if it isn't within a macro. Evaluated on - ;; demand. - start-macro-beg + ;; start position itself if it isn't within a macro. + (start-macro-beg + (save-excursion + (goto-char start) + (c-beginning-of-macro limit) + (point))) + lit-beg ;; The earliest position after the current one with the same paren ;; level. Used only when `paren-level' is set. - lit-beg - (paren-level-pos (point))) + (paren-level-pos (point)) + ;; Whether we can optimize with an early `c-backward-syntactic-ws'. + (opt-ws (string-match "^\\^[^ \t\n\r]+$" skip-chars))) - (while - (progn - ;; The next loop "tries" to find the end point each time round, - ;; loops when it hasn't succeeded. - (while - (and - (let ((pos (point))) - (while (and - (< (skip-chars-backward skip-chars limit) 0) - ;; Don't stop inside a literal. - (when (setq lit-beg (c-ssb-lit-begin)) + ;; In the next while form, we only loop when `skip-chars' is something + ;; like "^/" and we've stopped at the end of a block comment. + (while + (progn + ;; The next loop "tries" to find the end point each time round, + ;; loops when it's ended up at the wrong level of nesting. + (while + (and + ;; Optimize for, in particular, large blocks of comments from + ;; `comment-region'. + (progn (when opt-ws + (c-backward-syntactic-ws) + (setq paren-level-pos (point))) + t) + ;; Move back to a candidate end point which isn't in a literal + ;; or in a macro we didn't start in. + (let ((pos (point)) + macro-start) + (while (and + (< (skip-chars-backward skip-chars limit) 0) + (or + (when (setq lit-beg (c-literal-start)) (goto-char lit-beg) - t))) - (< (point) pos)) - - (let ((pos (point)) state-2 pps-end-pos) - - (cond - ((and paren-level - (save-excursion - (setq state-2 (parse-partial-sexp - pos paren-level-pos -1) - pps-end-pos (point)) - (/= (car state-2) 0))) - ;; Not at the right level. - - (if (and (< (car state-2) 0) - ;; We stop above if we go out of a paren. - ;; Now check whether it precedes or is - ;; nested in the starting sexp. - (save-excursion - (setq state-2 - (parse-partial-sexp - pps-end-pos paren-level-pos - nil nil state-2)) - (< (car state-2) 0))) - - ;; We've stopped short of the starting position - ;; so the hit was inside a nested list. Go up - ;; until we are at the right level. - (condition-case nil - (progn - (goto-char (scan-lists pos -1 - (- (car state-2)))) - (setq paren-level-pos (point)) - (if (and limit (>= limit paren-level-pos)) - (progn - (goto-char limit) - nil) - t)) - (error - (goto-char (or limit (point-min))) - nil)) - - ;; The hit was outside the list at the start - ;; position. Go to the start of the list and exit. - (goto-char (1+ (elt state-2 1))) - nil)) - - ((c-beginning-of-macro limit) - ;; Inside a macro. - (if (< (point) - (or start-macro-beg - (setq start-macro-beg - (save-excursion - (goto-char start) - (c-beginning-of-macro limit) - (point))))) - t - - ;; It's inside the same macro we started in so it's - ;; a relevant match. - (goto-char pos) - nil)))))) - - (> (point) - (progn - ;; Skip syntactic ws afterwards so that we don't stop at the - ;; end of a comment if `skip-chars' is something like "^/". - (c-backward-syntactic-ws) - (point))))) + t) + ;; Don't stop inside a macro we didn't start in. + (when + (save-excursion + (and (c-beginning-of-macro limit) + (< (point) start-macro-beg) + (setq macro-start (point)))) + (goto-char macro-start)))) + (when opt-ws + (c-backward-syntactic-ws))) + (< (point) pos)) + + ;; Check whether we're at the wrong level of nesting (when + ;; `paren-level' is non-nil). + (let ((pos (point)) state-2 pps-end-pos) + (when + (and paren-level + (save-excursion + (setq state-2 (parse-partial-sexp + pos paren-level-pos -1) + pps-end-pos (point)) + (/= (car state-2) 0))) + ;; Not at the right level. + (if (and (< (car state-2) 0) + ;; We stop above if we go out of a paren. + ;; Now check whether it precedes or is + ;; nested in the starting sexp. + (save-excursion + (setq state-2 + (parse-partial-sexp + pps-end-pos paren-level-pos + nil nil state-2)) + (< (car state-2) 0))) + + ;; We've stopped short of the starting position + ;; so the hit was inside a nested list. Go up + ;; until we are at the right level. + (condition-case nil + (progn + (goto-char (scan-lists pos -1 + (- (car state-2)))) + (setq paren-level-pos (point)) + (if (and limit (>= limit paren-level-pos)) + (progn + (goto-char limit) + nil) + t)) + (error + (goto-char (or limit (point-min))) + nil)) + + ;; The hit was outside the list at the start + ;; position. Go to the start of the list and exit. + (goto-char (1+ (elt state-2 1))) + nil))))) + + (> (point) + (progn + ;; Skip syntactic ws afterwards so that we don't stop at the + ;; end of a comment if `skip-chars' is something like "^/". + (c-backward-syntactic-ws) + (point))))) - ;; We might want to extend this with more useful return values in - ;; the future. - (/= (point) start)))) + ;; We might want to extend this with more useful return values in + ;; the future. + (/= (point) start))) ;; The following is an alternative implementation of ;; `c-syntactic-skip-backward' that uses backward movement to keep @@ -5186,6 +5138,9 @@ comment at the start of cc-engine.el for more info." (defsubst c-determine-limit-get-base (start try-size) ;; Get a "safe place" approximately TRY-SIZE characters before START. ;; This defsubst doesn't preserve point. + (goto-char start) + (c-backward-syntactic-ws) + (setq start (point)) (let* ((pos (max (- start try-size) (point-min))) (s (c-state-semi-pp-to-literal pos)) (cand (or (car (cddr s)) pos))) @@ -5195,9 +5150,9 @@ comment at the start of cc-engine.el for more info." (point)))) (defun c-determine-limit (how-far-back &optional start try-size) - ;; Return a buffer position HOW-FAR-BACK non-literal characters from - ;; START (default point). The starting position, either point or - ;; START may not be in a comment or string. + ;; Return a buffer position approximately HOW-FAR-BACK non-literal + ;; characters from START (default point). The starting position, either + ;; point or START may not be in a comment or string. ;; ;; The position found will not be before POINT-MIN and won't be in a ;; literal. @@ -5215,6 +5170,12 @@ comment at the start of cc-engine.el for more info." (s (parse-partial-sexp pos pos)) ; null state. stack elt size (count 0)) + ;; Optimization for large blocks of comments, particularly those being + ;; created by `comment-region'. + (goto-char pos) + (forward-comment try-size) + (setq pos (point)) + (while (< pos start) ;; Move forward one literal each time round this loop. ;; Move forward to the start of a comment or string. @@ -5257,6 +5218,10 @@ comment at the start of cc-engine.el for more info." ;; Have we found enough yet? (cond + ((null elt) ; No non-literal characters found. + (if (> base (point-min)) + (c-determine-limit how-far-back base (* 2 try-size)) + (point-min))) ((>= count how-far-back) (+ (car elt) (- count how-far-back))) ((eq base (point-min)) @@ -5264,7 +5229,7 @@ comment at the start of cc-engine.el for more info." ((> base (- start try-size)) ; Can only happen if we hit point-min. (car elt)) (t - (c-determine-limit (- how-far-back count) base try-size)))))) + (c-determine-limit (- how-far-back count) base (* 2 try-size))))))) (defun c-determine-+ve-limit (how-far &optional start-pos) ;; Return a buffer position about HOW-FAR non-literal characters forward commit a64c11a3aa49121ceab79a2acc99c829d42417bd Author: Noam Postavsky Date: Mon Apr 2 06:55:29 2018 -0400 Fix term.el rendering following a window resize (Bug#30544) * lisp/term.el (term-reset-size): Reset cached row and column values before changing point. diff --git a/lisp/term.el b/lisp/term.el index f4a1299f27..0a5efa4abc 100644 --- a/lisp/term.el +++ b/lisp/term.el @@ -1166,6 +1166,11 @@ Entry to this mode runs the hooks on `term-mode-hook'." (setq term-current-row nil) (setq term-current-column nil) (term-set-scroll-region 0 height) + ;; `term-set-scroll-region' causes these to be set, we have to + ;; clear them again since we're changing point (Bug#30544). + (setq term-start-line-column nil) + (setq term-current-row nil) + (setq term-current-column nil) (goto-char point)))) ;; Recursive routine used to check if any string in term-kill-echo-list commit 1e6f09aa72fbdfc9246bcb85bc69a624c0efcfdf Author: Philipp Stephani Date: Sat Mar 31 12:26:30 2018 +0200 * files.el (auto-save-visited-mode): Don't prompt for filenames. diff --git a/lisp/files.el b/lisp/files.el index a10c067cf7..974d39ceee 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -436,8 +436,9 @@ and toggle it if ARG is `toggle'." auto-save-visited-interval :repeat #'save-some-buffers :no-prompt (lambda () - (not (and buffer-auto-save-file-name - auto-save-visited-file-name))))))) + (and buffer-file-name + (not (and buffer-auto-save-file-name + auto-save-visited-file-name)))))))) ;; The 'set' part is so we don't get a warning for using this variable ;; above, while still catching code that _sets_ the variable to get commit 956c39d11d871d1b6cdf4bc13217e9678d12fd76 Author: Simona Arizanova Date: Mon Apr 2 10:14:56 2018 +0200 Make help-for-help window searchable (Bug#19655) * lisp/help.el (help-map): Map C-s to new function search-forward-help-for-help. (help-for-help-internal): In doc-string add entry for C-s. (search-forward-help-for-help): New function. Copyright-paperwork-exempt: yes diff --git a/lisp/help.el b/lisp/help.el index 90be45777b..8e6604d2db 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -67,6 +67,7 @@ (define-key map "\C-n" 'view-emacs-news) (define-key map "\C-o" 'describe-distribution) (define-key map "\C-p" 'view-emacs-problems) + (define-key map "\C-s" 'search-forward-help-for-help) (define-key map "\C-t" 'view-emacs-todo) (define-key map "\C-w" 'describe-no-warranty) @@ -240,6 +241,7 @@ C-m How to order printed Emacs manuals. C-n News of recent Emacs changes. C-o Emacs ordering and distribution information. C-p Info about known Emacs problems. +C-s Search forward \"help window\". C-t Emacs TODO list. C-w Information on absence of warranty for GNU Emacs." help-map) @@ -965,6 +967,13 @@ documentation for the major and minor modes of that buffer." ;; For the sake of IELM and maybe others nil) +(defun search-forward-help-for-help () + "Search forward \"help window\"." + (interactive) + ;; Move cursor to the "help window". + (pop-to-buffer " *Metahelp*") + ;; Do incremental search forward. + (isearch-forward nil t)) (defun describe-minor-mode (minor-mode) "Display documentation of a minor mode given as MINOR-MODE. commit eb8b13fc01e9ec1471e473a7f3e9636de8542817 Author: Eli Zaretskii Date: Mon Apr 2 08:59:27 2018 +0300 ; * etc/NEWS: Improve the entry about pinentry.el removal. diff --git a/etc/NEWS b/etc/NEWS index 4adedfce1a..4f7bf31620 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1505,7 +1505,10 @@ library was useless, and we removed it. GnuPG 2.0 is no longer supported by the upstream project. To adapt to the change, you may need to set 'epa-pinentry-mode' to the -symbol 'loopback'. +symbol 'loopback'. Alternatively, leave 'epa-pinentry-mode' at its +default value of nil, and remove the 'allow-emacs-pinentry' setting +from your 'gpg-agent.conf' configuration file, usually found in the +'~/.gnupg' directory. Note that previously, it was said that passphrase input through minibuffer would be much less secure than other graphical pinentry commit 7228488effa78dcb75284cb6d247b24804e0e7f5 Author: Stefan Monnier Date: Mon Apr 2 00:23:20 2018 -0400 * lisp/emacs-lisp/debug.el (debug): Don't hang upon error in initial-frame. diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el index f3a927f31c..e8a3015b8f 100644 --- a/lisp/emacs-lisp/debug.el +++ b/lisp/emacs-lisp/debug.el @@ -145,9 +145,29 @@ You may call with no args, or you may pass nil as the first arg and any other args you like. In that case, the list of args after the first will be printed into the backtrace buffer." (interactive) - (if inhibit-redisplay - ;; Don't really try to enter debugger within an eval from redisplay. - debugger-value + (cond + (inhibit-redisplay + ;; Don't really try to enter debugger within an eval from redisplay. + debugger-value) + ((and (eq t (framep (selected-frame))) + (equal "initial_terminal" (terminal-name))) + ;; We're in the initial-frame (where `message' just outputs to stdout) so + ;; there's no tty or GUI frame to display the backtrace and interact with + ;; it: just dump a backtrace to stdout. + ;; This happens for example while handling an error in code from + ;; early-init.el with --debug-init. + (message "Error: %S" args) + (let ((print-escape-newlines t) + (print-escape-control-characters t) + (print-level 8) + (print-length 50) + (skip t)) ;Skip the first frame (i.e. the `debug' frame)! + (mapbacktrace (lambda (_evald func args _flags) + (if skip + (setq skip nil) + (message " %S" (cons func args)))) + 'debug))) + (t (unless noninteractive (message "Entering debugger...")) (let (debugger-value @@ -272,7 +292,7 @@ first will be printed into the backtrace buffer." (with-timeout-unsuspend debugger-with-timeout-suspend) (set-match-data debugger-outer-match-data))) (setq debug-on-next-call debugger-step-after-exit) - debugger-value))) + debugger-value)))) (defun debugger--print (obj &optional stream) (condition-case err commit 52501ec3f1e29d262844f69710a18e91f01f2326 Author: Philipp Stephani Date: Sun Apr 1 23:33:16 2018 +0200 Quote a few backticks in docstrings. * lisp/emacs-lisp/macroexp.el (macroexp-progn, macroexp-let*) (macroexp-if): Quote backtick in docstrings. diff --git a/lisp/emacs-lisp/macroexp.el b/lisp/emacs-lisp/macroexp.el index b2ac8be53c..93678bad7a 100644 --- a/lisp/emacs-lisp/macroexp.el +++ b/lisp/emacs-lisp/macroexp.el @@ -318,7 +318,7 @@ definitions to shadow the loaded ones for use in file byte-compilation." (cons (nreverse decls) body))) (defun macroexp-progn (exps) - "Return an expression equivalent to `(progn ,@EXPS)." + "Return an expression equivalent to \\=`(progn ,@EXPS)." (if (cdr exps) `(progn ,@exps) (car exps))) (defun macroexp-unprogn (exp) @@ -327,14 +327,14 @@ Never returns an empty list." (if (eq (car-safe exp) 'progn) (or (cdr exp) '(nil)) (list exp))) (defun macroexp-let* (bindings exp) - "Return an expression equivalent to `(let* ,bindings ,exp)." + "Return an expression equivalent to \\=`(let* ,bindings ,exp)." (cond ((null bindings) exp) ((eq 'let* (car-safe exp)) `(let* (,@bindings ,@(cadr exp)) ,@(cddr exp))) (t `(let* ,bindings ,exp)))) (defun macroexp-if (test then else) - "Return an expression equivalent to `(if ,TEST ,THEN ,ELSE)." + "Return an expression equivalent to \\=`(if ,TEST ,THEN ,ELSE)." (cond ((eq (car-safe else) 'if) (cond commit 7bedc8812bd7ca1d9cf36636322068b28b690a85 Author: Paul Eggert Date: Sun Apr 1 14:16:48 2018 -0700 Further improve advice in make-tarball.txt See comments by Glenn Morris in: https://lists.gnu.org/r/emacs-devel/2018-03/msg00968.html * admin/make-tarball.txt: Bring back refcard advice. diff --git a/admin/make-tarball.txt b/admin/make-tarball.txt index f9ad21709d..9b9c96425a 100644 --- a/admin/make-tarball.txt +++ b/admin/make-tarball.txt @@ -87,6 +87,11 @@ General steps (for each step, check for possible errors): make -C etc/refcards make -C etc/refcards clean + If etc/refcards does not build you may need to downgrade or + upgrade your TeX installation, or do that part of the build by + hand. For clues, search for the string "refcard" in the file + admin/release-process. + 5. Copy lisp/loaddefs.el to lisp/ldefs-boot.el. Commit ChangeLog.N, etc/AUTHORS, lisp/ldefs-boot.el, and the @@ -231,11 +236,16 @@ as follows: gzip --best --no-name <../info/elisp.info >info/elisp.info.gz gzip --best --no-name <../info/emacs.info >info/emacs.info.gz +Update the refcards/pdf/ and ps/ directories, and also +refcards/emacs-refcards.tar.gz (use make -C etc/refcards pdf ps dist). + FIXME: The above instructions are not quite complete, as they do not -specify how to copy the generated files in the 'manual' directory to -the corresponding web files. Also, they are missing some files, e.g., +specify the manual procuedure used to copy the generated files in the +'manual' directory to the corresponding web files, and to cvs remove +and add files as needed. Also, they are missing some files, e.g., they generate manual/html_mono/ada-mode.html but do not generate the -top-level ada-mode.html file for the one-node-per-page version. +top-level ada-mode.html file for the one-node-per-page version; this +is currently done by hand. Browsing is one way to check for any files that still need updating. commit 88843a45fe41c0e2312b774816bc815253751ab4 Author: Paul Eggert Date: Sun Apr 1 13:53:15 2018 -0700 Port make-dist to tar 1.27 and earlier Problem reported by Glenn Morris in: https://lists.gnu.org/r/emacs-devel/2018-03/msg00984.html * make-dist: Use --sort=name only if Tar supports it. diff --git a/admin/make-tarball.txt b/admin/make-tarball.txt index bdf7b8ce04..f9ad21709d 100644 --- a/admin/make-tarball.txt +++ b/admin/make-tarball.txt @@ -210,7 +210,8 @@ longer present. Tar up the generated html_node/emacs/ and elisp/ directories and update the files manual/elisp.html_node.tar.gz and emacs.html_node.tar.gz. -Use GNU Tar as follows so that the tarballs are reproducible: +Use GNU Tar 1.28 or later so that the tarballs are more reproducible, +as follows: cd manual tar='tar --numeric-owner --owner=0 --group=0 --mode=go+u,go-w --sort=name' diff --git a/make-dist b/make-dist index 48c7fb4fb7..d651e18b83 100755 --- a/make-dist +++ b/make-dist @@ -643,7 +643,9 @@ if [ "${make_tar}" = yes ]; then *) gzip_extension= ;; esac echo "Creating tar file" - taropt='--numeric-owner --owner=0 --group=0 --mode=go+u,go-w --sort=name' + taropt='--numeric-owner --owner=0 --group=0 --mode=go+u,go-w' + tar --sort=name -cf /dev/null $tempparent/$emacsname/src/lisp.h 2>/tmp/out && + taropt="$taropt --sort=name" [ "$verbose" = "yes" ] && taropt="$taropt --verbose" (cd ${tempparent} ; tar $taropt -cf - ${emacsname} ) \ commit 74dbce93bb9083cbcaf4ba7c3da7333786504b78 Author: Glenn Morris Date: Sun Apr 1 10:55:57 2018 -0700 * lisp/nxml/nxml-mode.el (nxml-sexp-element-flag): Set :version. diff --git a/lisp/nxml/nxml-mode.el b/lisp/nxml/nxml-mode.el index a9298be4fb..e2b51bc01a 100644 --- a/lisp/nxml/nxml-mode.el +++ b/lisp/nxml/nxml-mode.el @@ -58,6 +58,7 @@ The glyph is displayed in face `nxml-glyph'." (defcustom nxml-sexp-element-flag t "Non-nil means sexp commands treat an element as a single expression." + :version "27.1" ; nil -> t :group 'nxml :type 'boolean) commit aca7f2582aabd7f0eb5027ae7e6e1d1fbac81643 Merge: d46811eeb5 b87bd584a2 Author: Glenn Morris Date: Sun Apr 1 07:50:39 2018 -0700 ; Merge from origin/emacs-26 The following commits were skipped: b87bd58 (origin/emacs-26) ; Auto-commit of loaddefs files. 9fee1b8 Minor copyedits of completion-at-point-functions documentation 748f0fd (completion-at-point-functions): Improve doc commit d46811eeb5cca3d3de4a97f313c8485f54a55bfc Merge: e19fde9806 af1624f29b Author: Glenn Morris Date: Sun Apr 1 07:50:39 2018 -0700 Merge from origin/emacs-26 af1624f * lisp/net/shr.el (shr-browse-url): Doc fix. (Bug#30957) 3a451bd ; * doc/emacs/msdos.texi: Fix wording of last change. 3bc1e2f Mention `key-description' as inverse of `kbd' (Bug#30942) e50196e Document return value of pcase (Bug#30425) 8a2466f * doc/emacs/macos.texi: Tweak grammar and capitalization. 9db62bf Distinguish free from non-free OSes ff49d86 * doc/emacs/misc.texi (Amusements): Avoid non-printing charac... 5bab671 Fix xrefs in pdf Emacs manual commit e19fde9806999f273ea42a49904a35ed4d3b3a28 Author: Glenn Morris Date: Sun Apr 1 07:28:42 2018 -0400 ; Auto-commit of loaddefs files. diff --git a/lisp/ldefs-boot.el b/lisp/ldefs-boot.el index 4ad6b5c4eb..7e0bf00609 100644 --- a/lisp/ldefs-boot.el +++ b/lisp/ldefs-boot.el @@ -570,10 +570,6 @@ With value nil, inhibit any automatic allout-mode activation.") (put 'allout-layout 'safe-local-variable (lambda (x) (or (numberp x) (listp x) (memq x '(: * + -))))) -(put 'allout-passphrase-verifier-string 'safe-local-variable 'stringp) - -(put 'allout-passphrase-hint-string 'safe-local-variable 'stringp) - (autoload 'allout-mode-p "allout" "\ Return t if `allout-mode' is active in current buffer. @@ -2646,8 +2642,10 @@ used instead of `browse-url-new-window-flag'. (autoload 'browse-url-emacs "browse-url" "\ Ask Emacs to load URL into a buffer and show it in another window. +Optional argument SAME-WINDOW non-nil means show the URL in the +currently selected window instead. -\(fn URL &optional NEW-WINDOW)" t nil) +\(fn URL &optional SAME-WINDOW)" t nil) (autoload 'browse-url-gnome-moz "browse-url" "\ Ask Mozilla/Netscape to load URL via the GNOME program `gnome-moz-remote'. @@ -5233,11 +5231,6 @@ The function receives one argument, the name of the major mode of the compilation buffer. It should return a string. If nil, compute the name with `(concat \"*\" (downcase major-mode) \"*\")'.") -(defvar compilation-finish-function nil "\ -Function to call when a compilation process finishes. -It is called with two arguments: the compilation buffer, and a string -describing how the process finished.") - (defvar compilation-finish-functions nil "\ Functions to call when a compilation process finishes. Each function is called with two arguments: the compilation buffer, @@ -7195,14 +7188,6 @@ It returns t if a desktop file was loaded, nil otherwise. \(fn &optional DIRNAME)" t nil) -(autoload 'desktop-load-default "desktop" "\ -Load the `default' start-up library manually. -Also inhibit further loading of it. - -\(fn)" nil nil) - -(make-obsolete 'desktop-load-default 'desktop-save-mode '"22.1") - (autoload 'desktop-change-dir "desktop" "\ Change to desktop saved in DIRNAME. Kill the desktop as specified by variables `desktop-save-mode' and @@ -14921,8 +14906,6 @@ Use \\[describe-mode] for more info. ;;;### (autoloads nil "goto-addr" "net/goto-addr.el" (0 0 0 0)) ;;; Generated autoloads from net/goto-addr.el -(define-obsolete-function-alias 'goto-address-at-mouse 'goto-address-at-point "22.1") - (autoload 'goto-address-at-point "goto-addr" "\ Send to the e-mail address or load the URL at point. Send mail to address at point. See documentation for @@ -15012,7 +14995,7 @@ List of hook functions run by `grep-process-setup' (see `run-hooks').") (custom-autoload 'grep-setup-hook "grep" t) -(defconst grep-regexp-alist `((,(concat "^\\(?:" "\\(?1:[^\n]+\\)\\(?3:\\)\\(?2:[0-9]+\\):" "\\|" "\\(?1:[^\n:]+?[^\n/:]\\):[ ]*\\(?2:[1-9][0-9]*\\)[ ]*:" "\\)") 1 2 (,(lambda nil (when grep-highlight-matches (let* ((beg (match-end 0)) (end (save-excursion (goto-char beg) (line-end-position))) (mbeg (text-property-any beg end 'font-lock-face 'grep-match-face))) (when mbeg (- mbeg beg))))) \, (lambda nil (when grep-highlight-matches (let* ((beg (match-end 0)) (end (save-excursion (goto-char beg) (line-end-position))) (mbeg (text-property-any beg end 'font-lock-face 'grep-match-face)) (mend (and mbeg (next-single-property-change mbeg 'font-lock-face nil end)))) (when mend (- mend beg)))))) nil nil (3 '(face nil display ":"))) ("^Binary file \\(.+\\) matches$" 1 nil nil 0 1)) "\ +(defconst grep-regexp-alist `((,(concat "^\\(?:" "\\(?1:[^\0\n]+\\)\\(?3:\0\\)\\(?2:[0-9]+\\):" "\\|" "\\(?1:[^\n:]+?[^\n/:]\\):[\11 ]*\\(?2:[1-9][0-9]*\\)[\11 ]*:" "\\)") 1 2 (,(lambda nil (when grep-highlight-matches (let* ((beg (match-end 0)) (end (save-excursion (goto-char beg) (line-end-position))) (mbeg (text-property-any beg end 'font-lock-face 'grep-match-face))) (when mbeg (- mbeg beg))))) \, (lambda nil (when grep-highlight-matches (let* ((beg (match-end 0)) (end (save-excursion (goto-char beg) (line-end-position))) (mbeg (text-property-any beg end 'font-lock-face 'grep-match-face)) (mend (and mbeg (next-single-property-change mbeg 'font-lock-face nil end)))) (when mend (- mend beg)))))) nil nil (3 '(face nil display ":"))) ("^Binary file \\(.+\\) matches$" 1 nil nil 0 1)) "\ Regexp used to match grep hits. See `compilation-error-regexp-alist' for format details.") @@ -18664,7 +18647,7 @@ Key map for ispell menu.") (if ispell-menu-map-needed (progn (define-key ispell-menu-map [ispell-region] `(menu-item ,(purecopy "Spell-Check Region") ispell-region :enable mark-active :help ,(purecopy "Spell-check text in marked region"))) (define-key ispell-menu-map [ispell-message] `(menu-item ,(purecopy "Spell-Check Message") ispell-message :visible (eq major-mode 'mail-mode) :help ,(purecopy "Skip headers and included message text"))) (define-key ispell-menu-map [ispell-buffer] `(menu-item ,(purecopy "Spell-Check Buffer") ispell-buffer :help ,(purecopy "Check spelling of selected buffer"))) (fset 'ispell-menu-map (symbol-value 'ispell-menu-map)))) -(defvar ispell-skip-region-alist `((ispell-words-keyword forward-line) (ispell-dictionary-keyword forward-line) (ispell-pdict-keyword forward-line) (ispell-parsing-keyword forward-line) (,(purecopy "^---*BEGIN PGP [A-Z ]*--*") \, (purecopy "^---*END PGP [A-Z ]*--*")) (,(purecopy "^begin [0-9][0-9][0-9] [^ ]+$") \, (purecopy "\nend\n")) (,(purecopy "^%!PS-Adobe-[123].0") \, (purecopy "\n%%EOF\n")) (,(purecopy "^---* \\(Start of \\)?[Ff]orwarded [Mm]essage") \, (purecopy "^---* End of [Ff]orwarded [Mm]essage"))) "\ +(defvar ispell-skip-region-alist `((ispell-words-keyword forward-line) (ispell-dictionary-keyword forward-line) (ispell-pdict-keyword forward-line) (ispell-parsing-keyword forward-line) (,(purecopy "^---*BEGIN PGP [A-Z ]*--*") \, (purecopy "^---*END PGP [A-Z ]*--*")) (,(purecopy "^begin [0-9][0-9][0-9] [^ \11]+$") \, (purecopy "\nend\n")) (,(purecopy "^%!PS-Adobe-[123].0") \, (purecopy "\n%%EOF\n")) (,(purecopy "^---* \\(Start of \\)?[Ff]orwarded [Mm]essage") \, (purecopy "^---* End of [Ff]orwarded [Mm]essage"))) "\ Alist expressing beginning and end of regions not to spell check. The alist key must be a regular expression. Valid forms include: @@ -18673,7 +18656,7 @@ Valid forms include: (KEY REGEXP) - skip to end of REGEXP. REGEXP must be a string. (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) ("\\\\cref" 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]*}")))) "\ +(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) ("\\\\cref" 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[ \11\n]*{[ \11\n]*document[ \11\n]*}")) (("\\(figure\\|table\\)\\*?" ispell-tex-arg-end 0) ("list" ispell-tex-arg-end 2) ("program" . "\\\\end[ \11\n]*{[ \11\n]*program[ \11\n]*}") ("verbatim\\*?" . "\\\\end[ \11\n]*{[ \11\n]*verbatim\\*?[ \11\n]*}")))) "\ Lists of regions to be skipped in TeX mode. First list is used raw. Second list has key placed inside \\begin{}. @@ -18681,7 +18664,7 @@ Second list has key placed inside \\begin{}. 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]\\>[^>]*>" "") ("<[sS][cC][rR][iI][pP][tT]\\>[^>]*>" "") ("<[aA][pP][pP][lL][eE][tT]\\>[^>]*>" "") ("<[vV][eE][rR][bB]\\>[^>]*>" "<[vV][eE][rR][bB]\\>[^>]*>") ("<[tT][tT]/" "/") ("<[^ \n>]" ">") ("&[^ \n;]" "[; \n]")) "\ +(defconst ispell-html-skip-alists '(("<[cC][oO][dD][eE]\\>[^>]*>" "") ("<[sS][cC][rR][iI][pP][tT]\\>[^>]*>" "") ("<[aA][pP][pP][lL][eE][tT]\\>[^>]*>" "") ("<[vV][eE][rR][bB]\\>[^>]*>" "<[vV][eE][rR][bB]\\>[^>]*>") ("<[tT][tT]/" "/") ("<[^ \11\n>]" ">") ("&[^ \11\n;]" "[; \11\n]")) "\ 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 @@ -22448,7 +22431,7 @@ This command does not work if you use short group names. ;;;### (autoloads nil "nnimap" "gnus/nnimap.el" (0 0 0 0)) ;;; Generated autoloads from gnus/nnimap.el -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "nnimap" '("nnimap"))) +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "nnimap" '("nnimap-"))) ;;;*** @@ -22572,8 +22555,6 @@ Generate NOV databases in all nnml directories. ;;;### (autoloads nil "novice" "novice.el" (0 0 0 0)) ;;; 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.") @@ -22693,11 +22674,10 @@ The Emacs commands that normally operate on balanced expressions will operate on XML markup items. Thus \\[forward-sexp] will move forward across one markup item; \\[backward-sexp] will move backward across one markup item; \\[kill-sexp] will kill the following markup item; -\\[mark-sexp] will mark the following markup item. By default, each -tag each treated as a single markup item; to make the complete element -be treated as a single markup item, set the variable -`nxml-sexp-element-flag' to t. For more details, see the function -`nxml-forward-balanced-item'. +\\[mark-sexp] will mark the following markup item. By default, the +complete element is treated as a single markup item; to make each tag be +treated as a separate markup item, set the variable `nxml-sexp-element-flag' +to nil. For more details, see the function `nxml-forward-balanced-item'. \\[nxml-backward-up-element] and \\[nxml-down-element] move up and down the element structure. @@ -23254,7 +23234,7 @@ Coloring: ;;;### (autoloads nil "org" "org/org.el" (0 0 0 0)) ;;; Generated autoloads from org/org.el -(push (purecopy '(org 9 1 6)) package--builtin-versions) +(push (purecopy '(org 9 1 9)) package--builtin-versions) (autoload 'org-babel-do-load-languages "org" "\ Load the languages defined in `org-babel-load-languages'. @@ -23463,7 +23443,7 @@ information about your Org version and configuration. \(fn)" t nil) (autoload 'org-reload "org" "\ -Reload all org lisp files. +Reload all Org Lisp files. With prefix arg UNCOMPILED, load the uncompiled versions. \(fn &optional UNCOMPILED)" t nil) @@ -24403,13 +24383,17 @@ See the command `outline-mode' for more information on this mode. (push (purecopy '(package 1 1 0)) package--builtin-versions) (defvar package-enable-at-startup t "\ -Whether to activate installed packages when Emacs starts. -If non-nil, packages are activated after reading the init file -and before `after-init-hook'. Activation is not done if -`user-init-file' is nil (e.g. Emacs was started with \"-q\"). +Whether to make installed packages available when Emacs starts. +If non-nil, packages are made available before reading the init +file (but after reading the early init file). This means that if +you wish to set this variable, you must do so in the early init +file. Regardless of the value of this variable, packages are not +made available if `user-init-file' is nil (e.g. Emacs was started +with \"-q\"). Even if the value is nil, you can type \\[package-initialize] to -activate the package system at any time.") +make installed packages available at any time, or you can +call (package-initialize) in your init-file.") (custom-autoload 'package-enable-at-startup "package" t) @@ -24420,12 +24404,26 @@ If optional arg NO-ACTIVATE is non-nil, don't activate packages. If called as part of loading `user-init-file', set `package-enable-at-startup' to nil, to prevent accidentally loading packages twice. + It is not necessary to adjust `load-path' or `require' the individual packages after calling `package-initialize' -- this is taken care of by `package-initialize'. +If `package-initialize' is called twice during Emacs startup, +signal a warning, since this is a bad idea except in highly +advanced use cases. To suppress the warning, remove the +superfluous call to `package-initialize' from your init-file. If +you have code which must run before `package-initialize', put +that code in the early init-file. + \(fn &optional NO-ACTIVATE)" t nil) +(autoload 'package-activate-all "package" "\ +Activate all installed packages. +The variable `package-load-list' controls which packages to load. + +\(fn)" nil nil) + (autoload 'package-import-keyring "package" "\ Import keys from FILE. @@ -26828,7 +26826,7 @@ While this input method is active, the variable ;;;### (autoloads nil "quickurl" "net/quickurl.el" (0 0 0 0)) ;;; 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" "\ +(defconst quickurl-reread-hook-postfix "\n;; Local Variables:\n;; eval: (progn (require 'quickurl) (add-hook 'write-file-functions (lambda () (quickurl-read) nil) nil t))\n;; End:\n" "\ Example `quickurl-postfix' text that adds a local variable to the `quickurl-url-file' so that if you edit it by hand it will ensure that `quickurl-urls' is updated with the new URL list. @@ -29668,7 +29666,7 @@ instead of no action.") (custom-autoload 'mail-citation-hook "sendmail" t) -(defvar mail-citation-prefix-regexp (purecopy "\\([ ]*\\(\\w\\|[_.]\\)+>+\\|[ ]*[]>|]\\)+") "\ +(defvar mail-citation-prefix-regexp (purecopy "\\([ \11]*\\(\\w\\|[_.]\\)+>+\\|[ \11]*[]>|]\\)+") "\ Regular expression to match a citation prefix plus whitespace. It should match whatever sort of citation prefixes you want to handle, with whitespace before and after; it should also match just whitespace. @@ -34316,7 +34314,7 @@ Discard Tramp from loading remote files. (defvar tramp-archive-enabled (featurep 'dbusbind) "\ Non-nil when file archive support is available.") -(defconst tramp-archive-suffixes '("7z" "apk" "ar" "cab" "CAB" "cpio" "deb" "depot" "exe" "iso" "jar" "lzh" "LZH" "msu" "MSU" "mtree" "pax" "rar" "rpm" "shar" "tar" "tbz" "tgz" "tlz" "txz" "warc" "xar" "xpi" "xps" "zip" "ZIP") "\ +(defconst tramp-archive-suffixes '("7z" "apk" "ar" "cab" "CAB" "cpio" "deb" "depot" "exe" "iso" "jar" "lzh" "LZH" "msu" "MSU" "mtree" "odb" "odf" "odg" "odp" "ods" "odt" "pax" "rar" "rpm" "shar" "tar" "tbz" "tgz" "tlz" "txz" "warc" "xar" "xpi" "xps" "zip" "ZIP") "\ List of suffixes which indicate a file archive. It must be supported by libarchive(3).") @@ -38017,7 +38015,7 @@ Call `insert' with ARGS even if surrounding text is read only. \(fn &rest ARGS)" nil nil) -(defvar widget-keymap (let ((map (make-sparse-keymap))) (define-key map " " 'widget-forward) (define-key map " " 'widget-backward) (define-key map [(shift tab)] 'widget-backward) (put 'widget-backward :advertised-binding [(shift tab)]) (define-key map [backtab] 'widget-backward) (define-key map [down-mouse-2] 'widget-button-click) (define-key map [down-mouse-1] 'widget-button-click) (define-key map [(control 109)] 'widget-button-press) map) "\ +(defvar widget-keymap (let ((map (make-sparse-keymap))) (define-key map "\11" 'widget-forward) (define-key map "\33\11" 'widget-backward) (define-key map [(shift tab)] 'widget-backward) (put 'widget-backward :advertised-binding [(shift tab)]) (define-key map [backtab] 'widget-backward) (define-key map [down-mouse-2] 'widget-button-click) (define-key map [down-mouse-1] 'widget-button-click) (define-key map [(control 109)] 'widget-button-press) map) "\ Keymap containing useful binding for buffers containing widgets. Recommended as a parent keymap for modes using widgets. Note that such modes will need to require wid-edit.") commit b87bd584a2dd0617ce5278db31d98339d1119d8e Author: Glenn Morris Date: Sun Apr 1 06:25:39 2018 -0400 ; Auto-commit of loaddefs files. diff --git a/lisp/ldefs-boot.el b/lisp/ldefs-boot.el index 95d5be7734..c01d17a50e 100644 --- a/lisp/ldefs-boot.el +++ b/lisp/ldefs-boot.el @@ -22224,7 +22224,7 @@ QUALITY can be: ;;;### (autoloads nil "mwheel" "mwheel.el" (0 0 0 0)) ;;; Generated autoloads from mwheel.el -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "mwheel" '("mwheel-" "mouse-wheel-"))) +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "mwheel" '("mouse-wheel-" "mwheel-"))) ;;;*** @@ -23458,7 +23458,7 @@ Coloring: ;;;### (autoloads nil "org" "org/org.el" (0 0 0 0)) ;;; Generated autoloads from org/org.el -(push (purecopy '(org 9 1 6)) package--builtin-versions) +(push (purecopy '(org 9 1 9)) package--builtin-versions) (autoload 'org-babel-do-load-languages "org" "\ Load the languages defined in `org-babel-load-languages'. @@ -23667,7 +23667,7 @@ information about your Org version and configuration. \(fn)" t nil) (autoload 'org-reload "org" "\ -Reload all org lisp files. +Reload all Org Lisp files. With prefix arg UNCOMPILED, load the uncompiled versions. \(fn &optional UNCOMPILED)" t nil) @@ -24877,7 +24877,9 @@ two element list, binding its elements to symbols named `foo' and A significant difference from `cl-destructuring-bind' is that, if a pattern match fails, the next case is tried until either a -successful match is found or there are no more cases. +successful match is found or there are no more cases. The CODE +expression corresponding to the matching pattern determines the +return value. If there is no match the returned value is nil. Another difference is that pattern elements may be quoted, meaning they must match exactly: The pattern \\='(foo bar) @@ -24925,6 +24927,7 @@ Emacs Lisp manual for more information and examples. (autoload 'pcase-exhaustive "pcase" "\ The exhaustive version of `pcase' (which see). +If EXP fails to match any of the patterns in CASES, an error is signaled. \(fn EXP &rest CASES)" nil t) commit f759c5cfe4651af5f64fac2492fa362f8d383bd5 Author: Eli Zaretskii Date: Sun Apr 1 12:45:37 2018 +0300 Followup to last change * etc/NEWS: Mark nxml-sexp-element-flag entry as not needing documentation updates. * lisp/nxml/nxml-mode.el (nxml-mode, nxml-forward-balanced-item): Doc fixes. diff --git a/etc/NEWS b/etc/NEWS index b874bdf6f2..b3fee089fa 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -289,7 +289,8 @@ by default use the last buffer that navigated to the current buffer. ** nxml-mode -*** Changed default for variable 'nxml-sexp-element-flag' to true. +--- +*** The default value of 'nxml-sexp-element-flag' is now t. This means that pressing C-M-SPACE now selects the entire tree by default, and not just the opening element. diff --git a/lisp/nxml/nxml-mode.el b/lisp/nxml/nxml-mode.el index 554b5acfb2..a9298be4fb 100644 --- a/lisp/nxml/nxml-mode.el +++ b/lisp/nxml/nxml-mode.el @@ -471,11 +471,10 @@ The Emacs commands that normally operate on balanced expressions will operate on XML markup items. Thus \\[forward-sexp] will move forward across one markup item; \\[backward-sexp] will move backward across one markup item; \\[kill-sexp] will kill the following markup item; -\\[mark-sexp] will mark the following markup item. By default, each -tag each treated as a single markup item; to make the complete element -be treated as a single markup item, set the variable -`nxml-sexp-element-flag' to t. For more details, see the function -`nxml-forward-balanced-item'. +\\[mark-sexp] will mark the following markup item. By default, the +complete element is treated as a single markup item; to make each tag be +treated as a separate markup item, set the variable `nxml-sexp-element-flag' +to nil. For more details, see the function `nxml-forward-balanced-item'. \\[nxml-backward-up-element] and \\[nxml-down-element] move up and down the element structure. @@ -1510,17 +1509,18 @@ With ARG, do it that many times. Negative arg -N means move backward across N balanced expressions. This is the equivalent of `forward-sexp' for XML. -An element contains as items strings with no markup, tags, processing -instructions, comments, CDATA sections, entity references and -characters references. However, if the variable -`nxml-sexp-element-flag' is non-nil, then an element is treated as a -single markup item. A start-tag contains an element name followed by -one or more attributes. An end-tag contains just an element name. -An attribute value literals contains strings with no markup, entity -references and character references. A processing instruction -consists of a target and a content string. A comment or a CDATA -section contains a single string. An entity reference contains a -single name. A character reference contains a character number." +An element is by default treated as a single markup item. +However, if the variable `nxml-sexp-element-flag' is nil, then an +element contains as items strings with no markup, tags, +processing instructions, comments, CDATA sections, entity +references and character references. A start-tag contains an +element name followed by one or more attributes. An end-tag +contains just an element name. An attribute value literals +contains strings with no markup, entity references and character +references. A processing instruction consists of a target and a +content string. A comment or a CDATA section contains a single +string. An entity reference contains a single name. A character +reference contains a character number." (interactive "^p") (or arg (setq arg 1)) (cond ((> arg 0) commit 02e4b05c9d274e278581e811a4e935f922db402b Author: Jostein Kjønigsen Date: Tue Mar 20 07:15:17 2018 +0100 Change the default value of nxml-sexp-element-flag. * lisp/nxml/nxml-mode.el (nxml-sexp-element-flag): Default value is now t. diff --git a/etc/NEWS b/etc/NEWS index 9dddc90213..b874bdf6f2 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -286,6 +286,14 @@ defines the logic of finding a next-error capable buffer. It has an option to use a single such buffer on selected frame, or by default use the last buffer that navigated to the current buffer. + +** nxml-mode + +*** Changed default for variable 'nxml-sexp-element-flag' to true. +This means that pressing C-M-SPACE now selects the entire tree by +default, and not just the opening element. + + ** Eshell --- diff --git a/lisp/nxml/nxml-mode.el b/lisp/nxml/nxml-mode.el index 1df410e505..554b5acfb2 100644 --- a/lisp/nxml/nxml-mode.el +++ b/lisp/nxml/nxml-mode.el @@ -56,7 +56,7 @@ The glyph is displayed in face `nxml-glyph'." :group 'nxml :type 'boolean) -(defcustom nxml-sexp-element-flag nil +(defcustom nxml-sexp-element-flag t "Non-nil means sexp commands treat an element as a single expression." :group 'nxml :type 'boolean) commit 9fee1b8fb3395bde2d2e28e46c6690c36f730780 Author: Eli Zaretskii Date: Sun Apr 1 12:19:49 2018 +0300 Minor copyedits of completion-at-point-functions documentation * lisp/minibuffer.el (completion-at-point-functions): * doc/lispref/minibuf.texi (Completion in Buffers): Fix wording and filling. (cherry picked from commit a8ddd05d7d32946b892b9faaba6c9736ed2ad847) diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi index b01ebb26b6..1d1c93dd14 100644 --- a/doc/lispref/minibuf.texi +++ b/doc/lispref/minibuf.texi @@ -1877,10 +1877,11 @@ are used to compute a completion table for completing the text at point. It can be used by major modes to provide mode-specific completion tables (@pxref{Major Mode Conventions}). -When the command @code{completion-at-point} runs, it calls the functions in the -list one by one, without any argument. Each function should return @code{nil} -unless it can and wants to take responsibility for the completion data for the -text at point. Otherwise it should return a list of the form +When the command @code{completion-at-point} runs, it calls the +functions in the list one by one, without any argument. Each function +should return @code{nil} unless it can and wants to take +responsibility for the completion data for the text at point. +Otherwise it should return a list of the following form: @example (@var{start} @var{end} @var{collection} . @var{props}) @@ -1910,8 +1911,8 @@ next function in @code{completion-at-point-functions} instead of reporting a completion failure. @end table -The functions on this hook should generally return quickly, since they may be -called very often (e.g., from @code{post-command-hook}). +The functions on this hook should generally return quickly, since they +may be called very often (e.g., from @code{post-command-hook}). Supplying a function for @var{collection} is strongly recommended if generating the list of completions is an expensive operation. Emacs may internally call functions in @code{completion-at-point-functions} @@ -1934,10 +1935,11 @@ can defer generating completions until necessary. You can use (my-make-completions))))) @end smallexample -Additionally, the @var{collection} should generally not be pre-filtered based -on the current text between @var{start} and @var{end}, because that is the -responsibility of the caller of @code{completion-at-point-functions} to do that -according to the completion styles it decides to use. +Additionally, the @var{collection} should generally not be +pre-filtered based on the current text between @var{start} and +@var{end}, because that is the responsibility of the caller of +@code{completion-at-point-functions} to do that according to the +completion styles it decides to use. A function in @code{completion-at-point-functions} may also return a function instead of a list as described above. In that case, that diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index ced0ce64b5..7e7856f3a9 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -2078,10 +2078,11 @@ Currently supported properties are all the properties that can appear in As is the case with most hooks, the functions are responsible for preserving things like point and current buffer. -NOTE: These functions should be cheap to run since they're sometimes run from -`post-command-hook' and they should ideally only choose which kind of -completion table to use and not pre-filter it based on the current text between -START and END (e.g. that would not obey `completion-styles').") +NOTE: These functions should be cheap to run since they're sometimes +run from `post-command-hook'; and they should ideally only choose +which kind of completion table to use, and not pre-filter it based +on the current text between START and END (e.g., they should not +obey `completion-styles').") (defvar completion--capf-misbehave-funs nil "List of functions found on `completion-at-point-functions' that misbehave. commit 748f0fdd5a682d3bea79e3d30782686eae6d24df Author: Stefan Monnier Date: Tue Mar 27 16:01:30 2018 -0400 (completion-at-point-functions): Improve doc (cherry picked from commit b56c56f203f8b066dd71e6ae6a254121b3ac3f08) diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi index 0ef81858ea..b01ebb26b6 100644 --- a/doc/lispref/minibuf.texi +++ b/doc/lispref/minibuf.texi @@ -1877,10 +1877,10 @@ are used to compute a completion table for completing the text at point. It can be used by major modes to provide mode-specific completion tables (@pxref{Major Mode Conventions}). -When the command @code{completion-at-point} runs, it calls the -functions in the list one by one, without any argument. Each function -should return @code{nil} if it is unable to produce a completion table -for the text at point. Otherwise it should return a list of the form +When the command @code{completion-at-point} runs, it calls the functions in the +list one by one, without any argument. Each function should return @code{nil} +unless it can and wants to take responsibility for the completion data for the +text at point. Otherwise it should return a list of the form @example (@var{start} @var{end} @var{collection} . @var{props}) @@ -1910,6 +1910,8 @@ next function in @code{completion-at-point-functions} instead of reporting a completion failure. @end table +The functions on this hook should generally return quickly, since they may be +called very often (e.g., from @code{post-command-hook}). Supplying a function for @var{collection} is strongly recommended if generating the list of completions is an expensive operation. Emacs may internally call functions in @code{completion-at-point-functions} @@ -1932,11 +1934,16 @@ can defer generating completions until necessary. You can use (my-make-completions))))) @end smallexample +Additionally, the @var{collection} should generally not be pre-filtered based +on the current text between @var{start} and @var{end}, because that is the +responsibility of the caller of @code{completion-at-point-functions} to do that +according to the completion styles it decides to use. + A function in @code{completion-at-point-functions} may also return a function instead of a list as described above. In that case, that returned function is called, with no argument, and it is entirely responsible for performing the completion. We discourage this usage; -it is intended to help convert old code to using +it is only intended to help convert old code to using @code{completion-at-point}. The first function in @code{completion-at-point-functions} to return a diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index 7302fff458..ced0ce64b5 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -2076,7 +2076,12 @@ Currently supported properties are all the properties that can appear in match the text at point, then instead of reporting a completion failure, the completion should try the next completion function. As is the case with most hooks, the functions are responsible for -preserving things like point and current buffer.") +preserving things like point and current buffer. + +NOTE: These functions should be cheap to run since they're sometimes run from +`post-command-hook' and they should ideally only choose which kind of +completion table to use and not pre-filter it based on the current text between +START and END (e.g. that would not obey `completion-styles').") (defvar completion--capf-misbehave-funs nil "List of functions found on `completion-at-point-functions' that misbehave. commit a8ddd05d7d32946b892b9faaba6c9736ed2ad847 Author: Eli Zaretskii Date: Sun Apr 1 12:19:49 2018 +0300 Minor copyedits of completion-at-point-functions documentation * lisp/minibuffer.el (completion-at-point-functions): * doc/lispref/minibuf.texi (Completion in Buffers): Fix wording and filling. diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi index b01ebb26b6..1d1c93dd14 100644 --- a/doc/lispref/minibuf.texi +++ b/doc/lispref/minibuf.texi @@ -1877,10 +1877,11 @@ are used to compute a completion table for completing the text at point. It can be used by major modes to provide mode-specific completion tables (@pxref{Major Mode Conventions}). -When the command @code{completion-at-point} runs, it calls the functions in the -list one by one, without any argument. Each function should return @code{nil} -unless it can and wants to take responsibility for the completion data for the -text at point. Otherwise it should return a list of the form +When the command @code{completion-at-point} runs, it calls the +functions in the list one by one, without any argument. Each function +should return @code{nil} unless it can and wants to take +responsibility for the completion data for the text at point. +Otherwise it should return a list of the following form: @example (@var{start} @var{end} @var{collection} . @var{props}) @@ -1910,8 +1911,8 @@ next function in @code{completion-at-point-functions} instead of reporting a completion failure. @end table -The functions on this hook should generally return quickly, since they may be -called very often (e.g., from @code{post-command-hook}). +The functions on this hook should generally return quickly, since they +may be called very often (e.g., from @code{post-command-hook}). Supplying a function for @var{collection} is strongly recommended if generating the list of completions is an expensive operation. Emacs may internally call functions in @code{completion-at-point-functions} @@ -1934,10 +1935,11 @@ can defer generating completions until necessary. You can use (my-make-completions))))) @end smallexample -Additionally, the @var{collection} should generally not be pre-filtered based -on the current text between @var{start} and @var{end}, because that is the -responsibility of the caller of @code{completion-at-point-functions} to do that -according to the completion styles it decides to use. +Additionally, the @var{collection} should generally not be +pre-filtered based on the current text between @var{start} and +@var{end}, because that is the responsibility of the caller of +@code{completion-at-point-functions} to do that according to the +completion styles it decides to use. A function in @code{completion-at-point-functions} may also return a function instead of a list as described above. In that case, that diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index 6eded9c58f..f1cbdc0cc3 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -2074,10 +2074,11 @@ Currently supported properties are all the properties that can appear in As is the case with most hooks, the functions are responsible for preserving things like point and current buffer. -NOTE: These functions should be cheap to run since they're sometimes run from -`post-command-hook' and they should ideally only choose which kind of -completion table to use and not pre-filter it based on the current text between -START and END (e.g. that would not obey `completion-styles').") +NOTE: These functions should be cheap to run since they're sometimes +run from `post-command-hook'; and they should ideally only choose +which kind of completion table to use, and not pre-filter it based +on the current text between START and END (e.g., they should not +obey `completion-styles').") (defvar completion--capf-misbehave-funs nil "List of functions found on `completion-at-point-functions' that misbehave. commit af1624f29bc264fe0cff31c46b25b0b0c90e24bf Author: Eli Zaretskii Date: Sun Apr 1 12:09:54 2018 +0300 * lisp/net/shr.el (shr-browse-url): Doc fix. (Bug#30957) diff --git a/lisp/net/shr.el b/lisp/net/shr.el index a6b8693dd7..5582e29c52 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el @@ -934,8 +934,12 @@ size, and full-buffer size." (shr-browse-url)) (defun shr-browse-url (&optional external mouse-event) - "Browse the URL under point. -If EXTERNAL, browse the URL using `shr-external-browser'." + "Browse the URL at point using `browse-url'. +If EXTERNAL is non-nil (interactively, the prefix argument), browse +the URL using `shr-external-browser'. +If this function is invoked by a mouse click, it will browse the URL +at the position of the click. Optional argument MOUSE-EVENT describes +the mouse click event." (interactive (list current-prefix-arg last-nonmenu-event)) (mouse-set-point mouse-event) (let ((url (get-text-property (point) 'shr-url))) commit 320ecd3e564facaabdb6324f94c07c447f3175b9 Author: Eli Zaretskii Date: Sat Mar 31 20:41:32 2018 +0300 Support more separators in rmail-retry-failure * lisp/mail/rmail.el (mail-unsent-separator): Add a form of separator that confused rmail-retry-failure due to additional lines that start with a series of dashes. (Bug#30965) diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index f2fdcb6367..0f4bb1f64d 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el @@ -4126,6 +4126,7 @@ typically for purposes of moderating a list." "^ *---+ +Original message follows +---+ *$\\|" "^ *---+ +Your message follows +---+ *$\\|" "^|? *---+ +Message text follows: +---+ *|?$\\|" + "^ *---+ +This is a copy of \\w+ message, including all the headers.*---+ *\n *---+ +The body of the message is [0-9]+ characters long; only the first *\n *---+ +[0-9]+ or so are included here\\. *$\\|" "^ *---+ +This is a copy of \\w+ message, including all the headers.*---+ *$") "A regexp that matches the separator before the text of a failed message.") commit 3a451bd1e068092442f253291df643b0c02fee2d Author: Eli Zaretskii Date: Sat Mar 31 11:16:05 2018 +0300 ; * doc/emacs/msdos.texi: Fix wording of last change. diff --git a/doc/emacs/msdos.texi b/doc/emacs/msdos.texi index ceb203c1c7..9353f4b6e8 100644 --- a/doc/emacs/msdos.texi +++ b/doc/emacs/msdos.texi @@ -24,8 +24,8 @@ users the freedom that every computer user deserves. That is an injustice. For your freedom's sake, we urge you to switch to a free operating system. - We support GNU Emacs on these proprietary operating systems because -we hope this taste of freedom will inspire users to escape from them. + We support GNU Emacs on proprietary operating systems because we +hope this taste of freedom will inspire users to escape from them. The behavior of Emacs on MS-Windows is reasonably similar to what is documented in the rest of the manual, including support for long file commit 406cfd0a866778230dc40a0d803bb75f63e5c08c Author: Eli Zaretskii Date: Sat Mar 31 10:56:26 2018 +0300 ; * admin/make-tarball.txt: Fix whitespace. diff --git a/admin/make-tarball.txt b/admin/make-tarball.txt index 19edeb79e6..bdf7b8ce04 100644 --- a/admin/make-tarball.txt +++ b/admin/make-tarball.txt @@ -209,14 +209,14 @@ manual/html_node directory, delete any old manual pages that are no longer present. Tar up the generated html_node/emacs/ and elisp/ directories and update -the files manual/elisp.html_node.tar.gz and emacs.html_node.tar.gz. +the files manual/elisp.html_node.tar.gz and emacs.html_node.tar.gz. Use GNU Tar as follows so that the tarballs are reproducible: -cd manual -tar='tar --numeric-owner --owner=0 --group=0 --mode=go+u,go-w --sort=name' -gzip='gzip --best --no-name' -$tar -cf - html_node/emacs | $gzip >emacs.html_node.tar.gz -$tar -cf - html_node/elisp | $gzip >elisp.html_node.tar.gz + cd manual + tar='tar --numeric-owner --owner=0 --group=0 --mode=go+u,go-w --sort=name' + gzip='gzip --best --no-name' + $tar -cf - html_node/emacs | $gzip >emacs.html_node.tar.gz + $tar -cf - html_node/elisp | $gzip >elisp.html_node.tar.gz Use M-x make-manuals-dist from admin/admin.el to update the manual/*.tar files. @@ -224,11 +224,11 @@ manual/*.tar files. Add compressed copies of the main info pages from the tarfile to manual/info/ as follows: -cd manual -mkdir info -gzip --best --no-name <../info/eintr.info >info/eintr.info.gz -gzip --best --no-name <../info/elisp.info >info/elisp.info.gz -gzip --best --no-name <../info/emacs.info >info/emacs.info.gz + cd manual + mkdir info + gzip --best --no-name <../info/eintr.info >info/eintr.info.gz + gzip --best --no-name <../info/elisp.info >info/elisp.info.gz + gzip --best --no-name <../info/emacs.info >info/emacs.info.gz FIXME: The above instructions are not quite complete, as they do not specify how to copy the generated files in the 'manual' directory to commit 8f746914214f19fe7eaad15e03923aca8667b87f Merge: 6a2b940cb1 20fa40ddd3 Author: Eli Zaretskii Date: Sat Mar 31 10:53:56 2018 +0300 Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs commit 3bc1e2f0ac63fc4da6a67a619a333aa6e4529bf4 Author: Hong Xu Date: Sun Mar 25 14:35:51 2018 -0700 Mention `key-description' as inverse of `kbd' (Bug#30942) * lisp/subr.el (kbd): Add `key-description' as inverse of `kbd' in the doc. diff --git a/lisp/subr.el b/lisp/subr.el index 2de5b3766c..f8ac70edef 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -774,7 +774,9 @@ side-effects, and the argument LIST is not modified." KEYS should be a string in the format returned by commands such as `C-h k' (`describe-key'). This is the same format used for saving keyboard macros (see -`edmacro-mode')." +`edmacro-mode'). + +For an approximate inverse of this, see `key-description'." ;; Don't use a defalias, since the `pure' property is only true for ;; the calling convention of `kbd'. (read-kbd-macro keys)) commit e50196e8a96216f1fd69f9257cddd8d76ad2ac78 Author: Noam Postavsky Date: Sat Mar 31 00:40:43 2018 -0400 Document return value of pcase (Bug#30425) * doc/lispref/control.texi (Pattern matching case statement): * lisp/emacs-lisp/pcase.el (pcase): State that pcase returns nil if no patterns match. (pcase-exhaustive): State that an error is signaled if no patterns match. diff --git a/doc/lispref/control.texi b/doc/lispref/control.texi index f85ee94779..adec632da6 100644 --- a/doc/lispref/control.texi +++ b/doc/lispref/control.texi @@ -317,7 +317,8 @@ list of the form @code{(@var{pattern} @var{body-forms}@dots{})}. @var{pattern} of each clause, in textual order. If the value matches, the clause succeeds; @code{pcase} then evaluates its @var{body-forms}, and returns the value of the last of @var{body-forms}. Any remaining -@var{clauses} are ignored. +@var{clauses} are ignored. If no clauses match, then the @code{pcase} +form evaluates to @code{nil}. The @var{pattern} part of a clause can be of one of two types: @dfn{QPattern}, a pattern quoted with a backquote; or a diff --git a/lisp/emacs-lisp/pcase.el b/lisp/emacs-lisp/pcase.el index 6cfd074cf0..ce148c9e1a 100644 --- a/lisp/emacs-lisp/pcase.el +++ b/lisp/emacs-lisp/pcase.el @@ -118,7 +118,9 @@ two element list, binding its elements to symbols named `foo' and A significant difference from `cl-destructuring-bind' is that, if a pattern match fails, the next case is tried until either a -successful match is found or there are no more cases. +successful match is found or there are no more cases. The CODE +expression corresponding to the matching pattern determines the +return value. If there is no match the returned value is nil. Another difference is that pattern elements may be quoted, meaning they must match exactly: The pattern \\='(foo bar) @@ -211,7 +213,8 @@ Emacs Lisp manual for more information and examples." ;;;###autoload (defmacro pcase-exhaustive (exp &rest cases) - "The exhaustive version of `pcase' (which see)." + "The exhaustive version of `pcase' (which see). +If EXP fails to match any of the patterns in CASES, an error is signaled." (declare (indent 1) (debug pcase)) (let* ((x (gensym "x")) (pcase--dontwarn-upats (cons x pcase--dontwarn-upats))) commit 8a2466ff7240136c32b1cc21143225935d462cc6 Author: Paul Eggert Date: Fri Mar 30 19:07:48 2018 -0700 * doc/emacs/macos.texi: Tweak grammar and capitalization. diff --git a/doc/emacs/macos.texi b/doc/emacs/macos.texi index 00e52f26d5..ef2e944890 100644 --- a/doc/emacs/macos.texi +++ b/doc/emacs/macos.texi @@ -14,8 +14,8 @@ built either without window system support, with X11, or with the Cocoa interface; this section only applies to the Cocoa build. This does not support versions before macOS 10.6. - GNUstep is free software; MacOS is not. MacOS a non-free operating -system; that means it denies its users the freedom that every computer + GNUstep is free software; macOS is not. Because it is a non-free +operating system, macOS denies its users the freedom that every computer user deserves. That is an injustice. For your freedom's sake, we urge you to switch to a free operating system. commit 9db62bf993d746924a61cab5a532d99dfe2b0927 Author: Richard Stallman Date: Fri Mar 30 19:05:22 2018 -0700 Distinguish free from non-free OSes diff --git a/doc/emacs/macos.texi b/doc/emacs/macos.texi index e669eaa4cb..00e52f26d5 100644 --- a/doc/emacs/macos.texi +++ b/doc/emacs/macos.texi @@ -14,6 +14,14 @@ built either without window system support, with X11, or with the Cocoa interface; this section only applies to the Cocoa build. This does not support versions before macOS 10.6. + GNUstep is free software; MacOS is not. MacOS a non-free operating +system; that means it denies its users the freedom that every computer +user deserves. That is an injustice. For your freedom's sake, we +urge you to switch to a free operating system. + + We support GNU Emacs on proprietary operating systems because +we hope this taste of freedom will inspire users to escape from them. + For various historical and technical reasons, Emacs uses the term @samp{Nextstep} internally, instead of ``Cocoa'' or ``macOS''; for instance, most of the commands and variables described in this section diff --git a/doc/emacs/msdos.texi b/doc/emacs/msdos.texi index 90f0389a0e..ceb203c1c7 100644 --- a/doc/emacs/msdos.texi +++ b/doc/emacs/msdos.texi @@ -19,6 +19,13 @@ manual (@pxref{MS-DOS,,, emacs-xtra, Specialized Emacs Features}). section (@pxref{MS-DOS}). @end ifnottex + MS-Windows is a non-free operating system; that means it denies its +users the freedom that every computer user deserves. That is an +injustice. For your freedom's sake, we urge you to switch to a free +operating system. + + We support GNU Emacs on these proprietary operating systems because +we hope this taste of freedom will inspire users to escape from them. The behavior of Emacs on MS-Windows is reasonably similar to what is documented in the rest of the manual, including support for long file commit 20fa40ddd3e49b73cf2127a147d3b4ee03a3b5ba Author: Paul Eggert Date: Fri Mar 30 16:11:45 2018 -0700 Improve doc for web pages; reproducible tarballs * admin/make-tarball.txt: Make the tarballs more reproducible. Fix instructions for web pages as best I can (they are still incomplete). * make-dist (default_gzip): Add --no-name for gzip. (taropt): Add options to make the build more reproducible. diff --git a/admin/make-tarball.txt b/admin/make-tarball.txt index ac6d15d6ce..19edeb79e6 100644 --- a/admin/make-tarball.txt +++ b/admin/make-tarball.txt @@ -123,7 +123,7 @@ General steps (for each step, check for possible errors): 9. Decide what compression schemes to offer. For a release, at least gz and xz: - gzip --best -c emacs-NEW.tar > emacs-NEW.tar.gz + gzip --best --no-name -c emacs-NEW.tar > emacs-NEW.tar.gz xz -c emacs-NEW.tar > emacs-NEW.tar.xz For pretests, just xz is probably fine (saves bandwidth). @@ -197,7 +197,6 @@ The pages to update are: emacs.html (for a new major release, a more thorough update is needed) history.html -add the new NEWS file as news/NEWS.xx.y For every new release, a banner is displayed on top of the emacs.html page. Uncomment and the release banner in emacs.html. Keep it on the @@ -210,15 +209,32 @@ manual/html_node directory, delete any old manual pages that are no longer present. Tar up the generated html_node/emacs/ and elisp/ directories and update -the files manual/elisp.html_node.tar.gz and emacs.html_node.tar.gz. +the files manual/elisp.html_node.tar.gz and emacs.html_node.tar.gz. +Use GNU Tar as follows so that the tarballs are reproducible: -Use M-x make-manuals-dist from admin/admin.el to update the -manual/texi/ tarfiles. - -Add compressed copies of the main info pages from the tarfile to manual/info/. +cd manual +tar='tar --numeric-owner --owner=0 --group=0 --mode=go+u,go-w --sort=name' +gzip='gzip --best --no-name' +$tar -cf - html_node/emacs | $gzip >emacs.html_node.tar.gz +$tar -cf - html_node/elisp | $gzip >elisp.html_node.tar.gz -Update the refcards/pdf/ and ps/ directories, and also -refcards/emacs-refcards.tar.gz (use make -C etc/refcards pdf ps dist). +Use M-x make-manuals-dist from admin/admin.el to update the +manual/*.tar files. + +Add compressed copies of the main info pages from the tarfile to manual/info/ +as follows: + +cd manual +mkdir info +gzip --best --no-name <../info/eintr.info >info/eintr.info.gz +gzip --best --no-name <../info/elisp.info >info/elisp.info.gz +gzip --best --no-name <../info/emacs.info >info/emacs.info.gz + +FIXME: The above instructions are not quite complete, as they do not +specify how to copy the generated files in the 'manual' directory to +the corresponding web files. Also, they are missing some files, e.g., +they generate manual/html_mono/ada-mode.html but do not generate the +top-level ada-mode.html file for the one-node-per-page version. Browsing is one way to check for any files that still need updating. diff --git a/make-dist b/make-dist index 26247b37bc..48c7fb4fb7 100755 --- a/make-dist +++ b/make-dist @@ -639,14 +639,14 @@ if [ "${make_tar}" = yes ]; then case "${default_gzip}" in bzip2) gzip_extension=.bz2 ;; xz) gzip_extension=.xz ;; - gzip) gzip_extension=.gz ; default_gzip="gzip --best";; + gzip) gzip_extension=.gz ; default_gzip="gzip --best --no-name";; *) gzip_extension= ;; esac echo "Creating tar file" - taropt= - [ "$verbose" = "yes" ] && taropt=v + taropt='--numeric-owner --owner=0 --group=0 --mode=go+u,go-w --sort=name' + [ "$verbose" = "yes" ] && taropt="$taropt --verbose" - (cd ${tempparent} ; tar c${taropt}f - ${emacsname} ) \ + (cd ${tempparent} ; tar $taropt -cf - ${emacsname} ) \ | ${default_gzip} \ > ${emacsname}.tar${gzip_extension} fi commit 6c48146f46a443b1e11b58c52dd8f2e5d9feb21c Author: Paul Eggert Date: Fri Mar 30 14:25:33 2018 -0700 Do not assume --with-file-notification * src/fileio.c (report_file_notify_error) [!USE_FILE_NOTIFY]: Omit. diff --git a/src/fileio.c b/src/fileio.c index 52ca8b6297..2f8358f01b 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -224,6 +224,7 @@ report_file_error (char const *string, Lisp_Object name) report_file_errno (string, name, errno); } +#ifdef USE_FILE_NOTIFY /* Like report_file_error, but reports a file-notify-error instead. */ void @@ -238,6 +239,7 @@ report_file_notify_error (const char *string, Lisp_Object name) xsignal (Qfile_notify_error, Fcons (build_string (string), errdata)); } +#endif void close_file_unwind (int fd) commit 6f66a43d7ad6cada2b7dbb6d07efe36be1dc7ecb Author: Paul Eggert Date: Fri Mar 30 14:23:55 2018 -0700 Centralize Bug#30931 fix * src/marker.c (detach_marker): New function. * src/editfns.c (save_restriction_restore): * src/insdel.c (signal_before_change): Use it. diff --git a/src/editfns.c b/src/editfns.c index 84de679273..608304c09a 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -3899,12 +3899,9 @@ save_restriction_restore (Lisp_Object data) buf->clip_changed = 1; /* Remember that the narrowing changed. */ } - /* This isn’t needed anymore, so don’t wait for GC. Do not call - free_marker on XCAR (data) or XCDR (data), though, since - record_marker_adjustments may have put them on the buffer’s - undo list (Bug#30931). Just detach them instead. */ - Fset_marker (XCAR (data), Qnil, Qnil); - Fset_marker (XCDR (data), Qnil, Qnil); + /* Detach the markers, and free the cons instead of waiting for GC. */ + detach_marker (XCAR (data)); + detach_marker (XCDR (data)); free_cons (XCONS (data)); } else diff --git a/src/insdel.c b/src/insdel.c index 697395c507..173c243834 100644 --- a/src/insdel.c +++ b/src/insdel.c @@ -2148,13 +2148,10 @@ signal_before_change (ptrdiff_t start_int, ptrdiff_t end_int, FETCH_START, FETCH_END, Qnil); } - /* Detach the markers now that we're done with them. Don't directly - free them, since the change functions could have caused them to - be inserted into the undo list (Bug#30931). */ if (! NILP (start_marker)) - Fset_marker (start_marker, Qnil, Qnil); + detach_marker (start_marker); if (! NILP (end_marker)) - Fset_marker (end_marker, Qnil, Qnil); + detach_marker (end_marker); RESTORE_VALUE; unbind_to (count, Qnil); diff --git a/src/lisp.h b/src/lisp.h index f471b21658..c931d9c8f0 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -4104,7 +4104,8 @@ extern ptrdiff_t marker_byte_position (Lisp_Object); extern void clear_charpos_cache (struct buffer *); extern ptrdiff_t buf_charpos_to_bytepos (struct buffer *, ptrdiff_t); extern ptrdiff_t buf_bytepos_to_charpos (struct buffer *, ptrdiff_t); -extern void unchain_marker (struct Lisp_Marker *marker); +extern void detach_marker (Lisp_Object); +extern void unchain_marker (struct Lisp_Marker *); extern Lisp_Object set_marker_restricted (Lisp_Object, Lisp_Object, Lisp_Object); extern Lisp_Object set_marker_both (Lisp_Object, Lisp_Object, ptrdiff_t, ptrdiff_t); extern Lisp_Object set_marker_restricted_both (Lisp_Object, Lisp_Object, diff --git a/src/marker.c b/src/marker.c index 2a45ae636e..2d5b05cc2b 100644 --- a/src/marker.c +++ b/src/marker.c @@ -560,7 +560,7 @@ POSITION is nil, makes marker point nowhere so it no longer slows down editing in any buffer. Returns MARKER. */) (Lisp_Object marker, Lisp_Object position, Lisp_Object buffer) { - return set_marker_internal (marker, position, buffer, 0); + return set_marker_internal (marker, position, buffer, false); } /* Like the above, but won't let the position be outside the visible part. */ @@ -569,7 +569,7 @@ Lisp_Object set_marker_restricted (Lisp_Object marker, Lisp_Object position, Lisp_Object buffer) { - return set_marker_internal (marker, position, buffer, 1); + return set_marker_internal (marker, position, buffer, true); } /* Set the position of MARKER, specifying both the @@ -616,6 +616,15 @@ set_marker_restricted_both (Lisp_Object marker, Lisp_Object buffer, return marker; } +/* Detach a marker so that it no longer points anywhere and no longer + slows down editing. Do not free the marker, though, as a change + function could have inserted it into an undo list (Bug#30931). */ +void +detach_marker (Lisp_Object marker) +{ + Fset_marker (marker, Qnil, Qnil); +} + /* Remove MARKER from the chain of whatever buffer it is in, leaving it points to nowhere. This is called during garbage collection, so we must be careful to ignore and preserve commit 96b8747d5c5d747af13fd84d8fe0308ef2a0ea7a Author: Noam Postavsky Date: Fri Mar 30 16:44:24 2018 -0400 Fix another case of freed markers in the undo-list (Bug#30931) * src/alloc.c (free_marker): Remove. * src/editfns.c (save_restriction_restore): * src/insdel.c (signal_before_change): Detach the markers from the buffer when we're done with them instead of calling free_marker on them. * test/src/editfns-tests.el (delete-region-undo-markers-1) (delete-region-undo-markers-2): New tests. diff --git a/src/alloc.c b/src/alloc.c index 369592d70e..9fdcc7306a 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -3878,15 +3878,6 @@ build_marker (struct buffer *buf, ptrdiff_t charpos, ptrdiff_t bytepos) return obj; } -/* Put MARKER back on the free list after using it temporarily. */ - -void -free_marker (Lisp_Object marker) -{ - unchain_marker (XMARKER (marker)); - free_misc (marker); -} - /* Return a newly created vector or string with specified arguments as elements. If all the arguments are characters that can fit diff --git a/src/editfns.c b/src/editfns.c index 727f2d0080..84de679273 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -3899,10 +3899,12 @@ save_restriction_restore (Lisp_Object data) buf->clip_changed = 1; /* Remember that the narrowing changed. */ } - /* This isn’t needed anymore, so don’t wait for GC. - Do not call free_marker on XCAR (data) or XCDR (data), - though, since record_marker_adjustments may have put - them on the buffer’s undo list (Bug#30931). */ + /* This isn’t needed anymore, so don’t wait for GC. Do not call + free_marker on XCAR (data) or XCDR (data), though, since + record_marker_adjustments may have put them on the buffer’s + undo list (Bug#30931). Just detach them instead. */ + Fset_marker (XCAR (data), Qnil, Qnil); + Fset_marker (XCDR (data), Qnil, Qnil); free_cons (XCONS (data)); } else diff --git a/src/insdel.c b/src/insdel.c index 02e3f41bc9..697395c507 100644 --- a/src/insdel.c +++ b/src/insdel.c @@ -2148,10 +2148,13 @@ signal_before_change (ptrdiff_t start_int, ptrdiff_t end_int, FETCH_START, FETCH_END, Qnil); } + /* Detach the markers now that we're done with them. Don't directly + free them, since the change functions could have caused them to + be inserted into the undo list (Bug#30931). */ if (! NILP (start_marker)) - free_marker (start_marker); + Fset_marker (start_marker, Qnil, Qnil); if (! NILP (end_marker)) - free_marker (end_marker); + Fset_marker (end_marker, Qnil, Qnil); RESTORE_VALUE; unbind_to (count, Qnil); diff --git a/src/lisp.h b/src/lisp.h index b931d23bf3..f471b21658 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -3812,7 +3812,6 @@ extern Lisp_Object make_save_funcptr_ptr_obj (void (*) (void), void *, extern Lisp_Object make_save_memory (Lisp_Object *, ptrdiff_t); extern void free_save_value (Lisp_Object); extern Lisp_Object build_overlay (Lisp_Object, Lisp_Object, Lisp_Object); -extern void free_marker (Lisp_Object); extern void free_cons (struct Lisp_Cons *); extern void init_alloc_once (void); extern void init_alloc (void); diff --git a/test/src/editfns-tests.el b/test/src/editfns-tests.el index 442ad08937..2e20c9dd12 100644 --- a/test/src/editfns-tests.el +++ b/test/src/editfns-tests.el @@ -288,4 +288,55 @@ (buffer-string) "foo bar baz qux")))))) +(ert-deftest delete-region-undo-markers-1 () + "Make sure we don't end up with freed markers reachable from Lisp." + ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=30931#40 + (with-temp-buffer + (insert "1234567890") + (setq buffer-undo-list nil) + (narrow-to-region 2 5) + ;; `save-restriction' in a narrowed buffer creates two markers + ;; representing the current restriction. + (save-restriction + (widen) + ;; Any markers *within* the deleted region are put onto the undo + ;; list. + (delete-region 1 6)) + ;; (princ (format "%S" buffer-undo-list) #'external-debugging-output) + ;; `buffer-undo-list' is now + ;; (("12345" . 1) (# . -1) (# . 1)) + ;; + ;; If temp-marker1 or temp-marker2 are freed prematurely, calling + ;; `type-of' on them will cause Emacs to abort. Calling + ;; `garbage-collect' will also abort if it finds any reachable + ;; freed objects. + (should (eq (type-of (car (nth 1 buffer-undo-list))) 'marker)) + (should (eq (type-of (car (nth 2 buffer-undo-list))) 'marker)) + (garbage-collect))) + +(ert-deftest delete-region-undo-markers-2 () + "Make sure we don't end up with freed markers reachable from Lisp." + ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=30931#55 + (with-temp-buffer + (insert "1234567890") + (setq buffer-undo-list nil) + ;; signal_before_change creates markers delimiting a change + ;; region. + (let ((before-change-functions + (list (lambda (beg end) + (delete-region (1- beg) (1+ end)))))) + (delete-region 2 5)) + ;; (princ (format "%S" buffer-undo-list) #'external-debugging-output) + ;; `buffer-undo-list' is now + ;; (("678" . 1) ("12345" . 1) (# . -1) + ;; (# . -1) (# . -4)) + ;; + ;; If temp-marker1 or temp-marker2 are freed prematurely, calling + ;; `type-of' on them will cause Emacs to abort. Calling + ;; `garbage-collect' will also abort if it finds any reachable + ;; freed objects. + (should (eq (type-of (car (nth 3 buffer-undo-list))) 'marker)) + (should (eq (type-of (car (nth 4 buffer-undo-list))) 'marker)) + (garbage-collect))) + ;;; editfns-tests.el ends here commit 6a2b940cb17f22008e0868b1d0caee409a31c719 Author: Eli Zaretskii Date: Fri Mar 30 16:12:07 2018 +0300 Add Capital sharp s to 2 more Latin input methods * lisp/leim/quail/latin-pre.el ("latin-prefix"): * lisp/leim/quail/latin-post.el ("latin-postfix"): Support Capital sharp s. (Bug#30988) diff --git a/lisp/leim/quail/latin-post.el b/lisp/leim/quail/latin-post.el index e3691e728d..791152bd65 100644 --- a/lisp/leim/quail/latin-post.el +++ b/lisp/leim/quail/latin-post.el @@ -2186,6 +2186,7 @@ Doubling the postfix separates the letter and postfix: e.g. a\\='\\=' -> a\\=' ("R~" ?Ř) ("S'" ?Ś) ("S," ?Ş) + ("S/" ?ẞ) ("S^" ?Ŝ) ("S~" ?Š) ("T," ?Ţ) diff --git a/lisp/leim/quail/latin-pre.el b/lisp/leim/quail/latin-pre.el index ffa8fd72b8..ca5af94ad2 100644 --- a/lisp/leim/quail/latin-pre.el +++ b/lisp/leim/quail/latin-pre.el @@ -1176,6 +1176,7 @@ of characters from a single Latin-N charset. ("\"E" ?Ë) ("\"I" ?Ï) ("\"O" ?Ö) + ("\"S" ?ẞ) ("\"U" ?Ü) ("\"W" ?Ẅ) ("\"Y" ?Ÿ) commit 842b3d7412eaed6b2c9f90c3361abb4932ec0b1d Author: Eli Zaretskii Date: Fri Mar 30 15:57:57 2018 +0300 Fix C-p and C-n when wrap-prefix is too wide * src/xdisp.c (move_it_in_display_line_to): Avoid looping in previous/next-line when wrap-prefix is set to a too-wide stretch of whitespace. (Bug#30432) diff --git a/src/xdisp.c b/src/xdisp.c index df5335e4ac..50fd685778 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -9209,9 +9209,25 @@ move_it_in_display_line_to (struct it *it, prev_method = it->method; if (it->method == GET_FROM_BUFFER) prev_pos = IT_CHARPOS (*it); + + /* Detect overly-wide wrap-prefixes made of (space ...) display + properties. When such a wrap prefix reaches past the right + margin of the window, we need to avoid the call to + set_iterator_to_next below, so that it->line_wrap is left at + its TRUNCATE value wisely set by handle_line_prefix. + Otherwise, set_iterator_to_next will pop the iterator stack, + restore it->line_wrap, and we might miss the opportunity to + exit the loop and return. */ + bool overwide_wrap_prefix = + CONSP (it->object) && EQ (XCAR (it->object), Qspace) + && it->sp > 0 && it->method == GET_FROM_STRETCH + && it->current_x >= it->last_visible_x + && it->continuation_lines_width > 0 + && it->line_wrap == TRUNCATE && it->stack[0].line_wrap != TRUNCATE; /* The current display element has been consumed. Advance to the next. */ - set_iterator_to_next (it, true); + if (!overwide_wrap_prefix) + set_iterator_to_next (it, true); if (IT_CHARPOS (*it) < CHARPOS (this_line_min_pos)) SET_TEXT_POS (this_line_min_pos, IT_CHARPOS (*it), IT_BYTEPOS (*it)); if (IT_CHARPOS (*it) < to_charpos) commit 733279abedc598a927e66c6f6ac10d1bd9271e79 Author: Alan Third Date: Fri Mar 30 12:25:15 2018 +0100 Simplify represented filename handling (bug#30800) * src/nsfns.m (ns_set_represented_filename): Move function from nsterm.m and set represented filename directly. * src/nsterm.h (ns_set_represented_filename): Remove definition. * src/nsterm.m (ns_set_represented_filename): Move function to nsfns.m. (x_free_frame_resources): Remove references to represented_frame. (sendEvent): Don't set represented filename. diff --git a/src/nsfns.m b/src/nsfns.m index 6df54b4eb5..7cf45a54f9 100644 --- a/src/nsfns.m +++ b/src/nsfns.m @@ -463,6 +463,47 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side. ns_set_name_internal (f, name); } +static void +ns_set_represented_filename (struct frame *f) +{ + Lisp_Object filename, encoded_filename; + Lisp_Object buf = XWINDOW (f->selected_window)->contents; + NSAutoreleasePool *pool; + NSString *fstr; + NSView *view = FRAME_NS_VIEW (f); + + NSTRACE ("ns_set_represented_filename"); + + if (f->explicit_name || ! NILP (f->title)) + return; + + block_input (); + pool = [[NSAutoreleasePool alloc] init]; + filename = BVAR (XBUFFER (buf), filename); + + if (! NILP (filename)) + { + encoded_filename = ENCODE_UTF_8 (filename); + + fstr = [NSString stringWithUTF8String: SSDATA (encoded_filename)]; + if (fstr == nil) fstr = @""; + } + else + fstr = @""; + +#ifdef NS_IMPL_COCOA + /* Work around a bug observed on 10.3 and later where + setTitleWithRepresentedFilename does not clear out previous state + if given filename does not exist. */ + if (! [[NSFileManager defaultManager] fileExistsAtPath: fstr]) + [[view window] setRepresentedFilename: @""]; +#endif + [[view window] setRepresentedFilename: fstr]; + + [pool release]; + unblock_input (); +} + /* This function should be called when the user's lisp code has specified a name for the frame; the name will override any set by the diff --git a/src/nsterm.h b/src/nsterm.h index a9635374c7..a99b517fd5 100644 --- a/src/nsterm.h +++ b/src/nsterm.h @@ -1237,12 +1237,6 @@ struct input_event; extern void ns_init_events (struct input_event *); extern void ns_finish_events (void); -#ifdef __OBJC__ -/* Needed in nsfns.m. */ -extern void -ns_set_represented_filename (struct frame *f); - -#endif #ifdef NS_IMPL_GNUSTEP extern char gnustep_base_version[]; /* version tracking */ diff --git a/src/nsterm.m b/src/nsterm.m index 06ba2e1a4c..3c95fedadc 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -327,9 +327,6 @@ - (NSColor *)colorUsingDefaultColorSpace NULL, 0, 0 }; -static NSString *represented_filename = nil; -static struct frame *represented_frame = 0; - #ifdef NS_IMPL_COCOA /* * State for pending menu activation: @@ -472,40 +469,6 @@ - (NSColor *)colorUsingDefaultColorSpace ========================================================================== */ -void -ns_set_represented_filename (struct frame *f) -{ - Lisp_Object filename, encoded_filename; - Lisp_Object buf = XWINDOW (f->selected_window)->contents; - NSAutoreleasePool *pool; - NSString *fstr; - - NSTRACE ("ns_set_represented_filename"); - - if (f->explicit_name || ! NILP (f->title)) - return; - - block_input (); - pool = [[NSAutoreleasePool alloc] init]; - filename = BVAR (XBUFFER (buf), filename); - - if (! NILP (filename)) - { - encoded_filename = ENCODE_UTF_8 (filename); - - fstr = [NSString stringWithUTF8String: SSDATA (encoded_filename)]; - if (fstr == nil) fstr = @""; - } - else - fstr = @""; - - represented_filename = [fstr retain]; - represented_frame = f; - - [pool release]; - unblock_input (); -} - void ns_init_events (struct input_event *ev) { @@ -1783,10 +1746,6 @@ -(void)remove dpyinfo->x_highlight_frame = 0; if (f == hlinfo->mouse_face_mouse_frame) reset_mouse_highlight (hlinfo); - /* Ensure that sendEvent does not attempt to dereference a freed - frame. (bug#30800) */ - if (represented_frame == f) - represented_frame = NULL; if (f->output_data.ns->miniimage != nil) [f->output_data.ns->miniimage release]; @@ -5630,23 +5589,6 @@ - (void)sendEvent: (NSEvent *)theEvent } #endif - if (represented_filename != nil && represented_frame) - { - NSString *fstr = represented_filename; - NSView *view = FRAME_NS_VIEW (represented_frame); -#ifdef NS_IMPL_COCOA - /* Work around a bug observed on 10.3 and later where - setTitleWithRepresentedFilename does not clear out previous state - if given filename does not exist. */ - if (! [[NSFileManager defaultManager] fileExistsAtPath: fstr]) - [[view window] setRepresentedFilename: @""]; -#endif - [[view window] setRepresentedFilename: fstr]; - [represented_filename release]; - represented_filename = nil; - represented_frame = NULL; - } - if (type == NSEventTypeApplicationDefined) { switch ([theEvent data2]) commit ef0617888c452d1a62d354b3d866f17eea2e1ced Author: Michael Albinus Date: Fri Mar 30 12:36:07 2018 +0200 Improve Tramp test performance * lisp/net/tramp.el (tramp-backtrace): Improve performance. * test/lisp/net/tramp-tests.el (tramp-test03-file-name-host-rules): Skip for older Emacsen. (tramp-test39-utf8): Remove instrumentation. diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 43b5e77428..52ff021c50 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -1691,10 +1691,11 @@ applicable)." "Dump a backtrace into the debug buffer. If VEC-OR-PROC is nil, the buffer *debug tramp* is used. This function is meant for debugging purposes." - (if vec-or-proc - (tramp-message vec-or-proc 10 "\n%s" (with-output-to-string (backtrace))) - (if (>= tramp-verbose 10) - (with-output-to-temp-buffer "*debug tramp*" (backtrace))))) + (when (>= tramp-verbose 10) + (if vec-or-proc + (tramp-message + vec-or-proc 10 "\n%s" (with-output-to-string (backtrace))) + (with-output-to-temp-buffer "*debug tramp*" (backtrace))))) (defsubst tramp-error (vec-or-proc signal fmt-string &rest arguments) "Emit an error. diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index 5e79a4bce6..3ca401b2fa 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el @@ -1727,6 +1727,8 @@ handled properly. BODY shall not contain a timeout." "Check host name rules for host-less methods." (skip-unless (tramp--test-enabled)) (skip-unless (tramp--test-sh-p)) + ;; `user-error' has appeared in Emacs 24.3. + (skip-unless (fboundp 'user-error)) ;; Host names must match rules in case the command template of a ;; method doesn't use them. @@ -4687,8 +4689,7 @@ Use the `ls' command." (skip-unless (not (tramp--test-windows-nt-and-batch))) (skip-unless (not (tramp--test-windows-nt-and-pscp-psftp-p))) - (tramp--test-instrument-test-case 10 - (tramp--test-utf8))) + (tramp--test-utf8)) (ert-deftest tramp-test39-utf8-with-stat () "Check UTF8 encoding in file names and file contents. @@ -5117,6 +5118,7 @@ Since it unloads Tramp, it shall be the last test to run." ;; * file-name-case-insensitive-p ;; * Work on skipped tests. Make a comment, when it is impossible. +;; * Revisit expensive tests, once problems in tramp-error are solved. ;; * Fix `tramp-test05-expand-file-name-relative' in `expand-file-name'. ;; * Fix `tramp-test06-directory-file-name' for `ftp'. ;; * Investigate, why `tramp-test11-copy-file' and `tramp-test12-rename-file' commit 670f2ffae718046c0fb37313965a51c040ed096f Author: Paul Eggert Date: Thu Mar 29 23:00:23 2018 -0700 Fix CHECK_ALLOCATED_AND_LIVE abort during GC * src/editfns.c (save_restriction_restore): Wait for the GC to free the temporary markers (Bug#30931). diff --git a/src/editfns.c b/src/editfns.c index 7e35fe8797..727f2d0080 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -3899,9 +3899,10 @@ save_restriction_restore (Lisp_Object data) buf->clip_changed = 1; /* Remember that the narrowing changed. */ } - /* These aren't needed anymore, so don't wait for GC. */ - free_marker (XCAR (data)); - free_marker (XCDR (data)); + /* This isn’t needed anymore, so don’t wait for GC. + Do not call free_marker on XCAR (data) or XCDR (data), + though, since record_marker_adjustments may have put + them on the buffer’s undo list (Bug#30931). */ free_cons (XCONS (data)); } else commit 20b858ef13f8f71fae6cbce5cdac31c4dd130600 Author: Paul Eggert Date: Thu Mar 29 17:41:11 2018 -0700 Prefer \... to control chars in .el literals diff --git a/lisp/emacs-lisp/elint.el b/lisp/emacs-lisp/elint.el index eae0dacfd2..391d3fd0af 100644 --- a/lisp/emacs-lisp/elint.el +++ b/lisp/emacs-lisp/elint.el @@ -1095,7 +1095,7 @@ Marks the function with their arguments, and returns a list of variables." (set-buffer (get-buffer-create docbuf)) (insert-file-contents-literally (expand-file-name internal-doc-file-name doc-directory))) - (while (re-search-forward "\\([VF]\\)" nil t) + (while (re-search-forward "\^_\\([VF]\\)" nil t) (when (setq sym (intern-soft (buffer-substring (point) (line-end-position)))) (if (string-equal (match-string 1) "V") @@ -1104,7 +1104,7 @@ Marks the function with their arguments, and returns a list of variables." (if (boundp sym) (setq vars (cons sym vars))) ;; Function. (when (fboundp sym) - (when (re-search-forward "\\(^(fn.*)\\)?" nil t) + (when (re-search-forward "\\(^(fn.*)\\)?\^_" nil t) (backward-char 1) ;; FIXME distinguish no args from not found. (and (setq args (match-string 1)) diff --git a/lisp/emacs-lisp/nadvice.el b/lisp/emacs-lisp/nadvice.el index e2e6825057..4403e88706 100644 --- a/lisp/emacs-lisp/nadvice.el +++ b/lisp/emacs-lisp/nadvice.el @@ -41,13 +41,13 @@ '((:around "\300\301\302\003#\207" 5) (:before "\300\301\002\"\210\300\302\002\"\207" 4) (:after "\300\302\002\"\300\301\003\"\210\207" 5) - (:override "\300\301\"\207" 4) + (:override "\300\301\002\"\207" 4) (:after-until "\300\302\002\"\206\013\000\300\301\002\"\207" 4) (:after-while "\300\302\002\"\205\013\000\300\301\002\"\207" 4) (:before-until "\300\301\002\"\206\013\000\300\302\002\"\207" 4) (:before-while "\300\301\002\"\205\013\000\300\302\002\"\207" 4) - (:filter-args "\300\302\301!\"\207" 5) - (:filter-return "\301\300\302\"!\207" 5)) + (:filter-args "\300\302\301\003!\"\207" 5) + (:filter-return "\301\300\302\003\"!\207" 5)) "List of descriptions of how to add a function. Each element has the form (WHERE BYTECODE STACK) where: WHERE is a keyword indicating where the function is added. diff --git a/lisp/emacs-lisp/tcover-ses.el b/lisp/emacs-lisp/tcover-ses.el index 9c293117c6..21bc2ce6d4 100644 --- a/lisp/emacs-lisp/tcover-ses.el +++ b/lisp/emacs-lisp/tcover-ses.el @@ -39,464 +39,464 @@ ;;;Here are some macros that exercise SES. Set `pause' to t if you want the ;;;macros to pause after each step. (let* ((pause nil) - (x (if pause "q" "")) - (y "ses-test.ses\r<")) + (x (if pause "\^Xq" "")) + (y "\^X\^Fses-test.ses\r\^[<")) ;;Fiddle with the existing spreadsheet (fset 'ses-exercise-example - (concat "" data-directory "ses-example.ses\r<" - x "10" - x " " - x "" - x "pses-center\r" - x "p\r" - x "\t\t" - x "\r A9 B9\r" - x "" - x "\r 2\r" - x "" + (concat "\^X\^F" data-directory "ses-example.ses\r\^[<" + x "\^U10\^N" + x "\^K" + x "\^_" + x "\^P\^P\^Fpses-center\r" + x "\^Fp\r" + x "\^U\^P\t\t" + x "\r\^B A9 B9\r" + x "\^U\^N\^B\^B\^B" + x "\r\^A\^K2\r" + x "\^N\^N\^F" x "50\r" - x "4" - x " " - x "" - x "(+ o\0" - x "-1o \r" - x "" + x "\^U4\^_" + x "\^C\^[\^L" + x "\^_" + x "(+ \^Xo\^N\^N\^F\0\^F\^F" + x "\^U-1\^Xo\^C\^R \^C\^S\r\^B" + x "\^_" x)) ;;Create a new spreadsheet (fset 'ses-exercise-new (concat y - x "\"%.8g\"\r" + x "\^C\^P\"%.8g\"\r" x "2\r" - x "" - x "" - x "2" + x "\^O" + x "\^P" + x "\^U2\^O" x "\"Header\r" - x "(sqrt 1\r" - x "pses-center\r" + x "(sqrt 1\r\^B" + x "pses-center\r\^F" x "\t" - x "(+ A2 A3\r" - x "(* B2 A3\r" - x "2" - x "\rB3\r" - x "" + x "\^P(+ A2 A3\r" + x "\^F(* B2 A3\r" + x "\^U2\^C\^[\^H" + x "\r\^?\^?\^?B3\r" + x "\^X\^S" x)) ;;Basic cell display (fset 'ses-exercise-display - (concat y ":(revert-buffer t t)\r" - x "" - x "\"Very long\r" + (concat y "\^[:(revert-buffer t t)\r" + x "\^E" + x "\"Very long\r\^B" x "w3\r" x "w3\r" - x "(/ 1 0\r" - x "234567\r" - x "5w" - x "\t1\r" - x "" - x "234567\r" - x "\t" - x "" - x "345678\r" - x "3w" - x "\0>" - x "" - x "" - x "" - x "" - x "" - x "" - x "" - x "1\r" - x "" - x "" - x "\"1234567-1234567-1234567\r" - x "123\r" - x "2" - x "\"1234567-1234567-1234567\r" - x "123\r" - x "w8\r" - x "\"1234567\r" - x "w5\r" + x "(/ 1 0\r\^B" + x "234567\r\^B" + x "\^U5w" + x "\t1\r\^B" + x "\^B\^C\^C" + x "\^F234567\r\^B" + x "\t\^D\^B" + x "\^B\^C\^C" + x "345678\r\^B" + x "\^U3w" + x "\0\^[>" + x "\^C\^C" + x "\^X\^X" + x "\^E" + x "\^X\^X\^A" + x "\^E" + x "\^F\^E" + x "\^C\^C" + x "1\r\^B" + x "\^C\^C\^F" + x "\^E" + x "\^B\^B\^B\"1234567-1234567-1234567\r\^B" + x "123\r\^B" + x "\^U2\^O" + x "\^N\"1234567-1234567-1234567\r\^B" + x "123\r\^B" + x "\^F\^Fw8\r" + x "\^B\^B\"1234567\r" + x "\^N\^Bw5\r" x)) ;;Cell formulas (fset 'ses-exercise-formulas - (concat y ":(revert-buffer t t)\r" + (concat y "\^[:(revert-buffer t t)\r" x "\t\t" x "\t" - x "(* B1 B2 D1\r" - x "(* B2 B3\r" - x "(apply '+ (ses-range B1 B3)\r" - x "(apply 'ses+ (ses-range B1 B3)\r" - x "(apply 'ses+ (ses-range A2 A3)\r" - x "(mapconcat'number-to-string(ses-range B2 B4) \"-\"\r" - x "(apply 'concat (reverse (ses-range A3 D3))\r" - x "(* (+ A2 A3) (ses+ B2 B3)\r" - x "" - x "2" - x "5\t" - x "(apply 'ses+ (ses-range E1 E2)\r" - x "(apply 'ses+ (ses-range A5 B5)\r" - x "(apply 'ses+ (ses-range E1 F1)\r" - x "(apply 'ses+ (ses-range D1 E1)\r" + x "(* B1 B2 D1\r\^B" + x "(* B2 B3\r\^B" + x "\^N(apply '+ (ses-range B1 B3)\r\^B" + x "(apply 'ses+ (ses-range B1 B3)\r\^B" + x "\^N(apply 'ses+ (ses-range A2 A3)\r\^B" + x "\^N(mapconcat'number-to-string(ses-range B2 B4) \"-\"\r\^B" + x "\^B(apply 'concat (reverse (ses-range A3 D3))\r\^B" + x "\^B(* (+ A2 A3) (ses+ B2 B3)\r\^B" + x "\^N" + x "\^U2\^O" + x "\^U5\t" + x "\^P(apply 'ses+ (ses-range E1 E2)\r\^B" + x "\^P(apply 'ses+ (ses-range A5 B5)\r\^B" + x "\^P(apply 'ses+ (ses-range E1 F1)\r\^B" + x "\^P(apply 'ses+ (ses-range D1 E1)\r\^B" x "\t" - x "(ses-average (ses-range A2 A5)\r" - x "(apply 'ses+ (ses-range A5 A6)\r" - x "k" - x " " - x "" - x "2" - x "3 " - x "o" - x "2o" - x "3k" - x "(ses-average (ses-range B3 E3)\r" - x "k" - x "12345678\r" + x "(ses-average (ses-range A2 A5)\r\^B" + x "\^N(apply 'ses+ (ses-range A5 A6)\r\^B" + x "\^B\^B\^[k" + x "\^N\^N\^K" + x "\^P\^P\^P\^O" + x "\^N\^U2\^O" + x "\^P\^U3\^K" + x "\^B\^B\^B\^[o" + x "\^F\^U2\^[o" + x "\^B\^U3\^[k" + x "\^F(ses-average (ses-range B3 E3)\r\^B" + x "\^B\^[k" + x "\^N\^P12345678\r\^B" x)) ;;Recalculating and reconstructing (fset 'ses-exercise-recalc - (concat y ":(revert-buffer t t)\r" - x " " + (concat y "\^[:(revert-buffer t t)\r" + x "\^C\^[\^L" x "\t\t" - x "" - x "(/ 1 0\r" - x "" + x "\^C\^C" + x "(/ 1 0\r\^B" + x "\^C\^C" x "\n" - x "" - x "\"%.6g\"\r" - x " " - x ">nw" - x "\0>xdelete-region\r" - x " " - x "8" - x "\0>xdelete-region\r" - x " " - x "" - x " k" - x " " - x "\"Very long\r" - x "" - x "\r\r" - x "" - x "o" - x "" - x "\"Very long2\r" - x "o" - x "" - x "\rC3\r" - x "\rC2\r" - x "\0" - x "\rC4\r" - x "\rC2\r" - x "\0" - x "" - x "xses-mode\r" - x "<" - x "2k" + x "\^C\^C" + x "\^C\^P\"%.6g\"\r" + x "\^C\^[\^L" + x "\^[>\^Xnw\^F\^F\^F" + x "\0\^[>\^[xdelete-region\r" + x "\^C\^[\^L" + x "\^U8\^N" + x "\0\^[>\^[xdelete-region\r" + x "\^C\^[\^L" + x "\^C\^N" + x "\^N\^K\^B\^[k" + x "\^C\^L" + x "\^B\"Very long\r" + x "\^P\^C\^T" + x "\^B\r\r" + x "\^N\^C\^T" + x "\^F\^[o" + x "\^F\^C\^T" + x "\^B\^B\"Very long2\r" + x "\^B\^[o\^F" + x "\^C\^T" + x "\r\^?\^?\^?C3\r" + x "\^N\r\^?\^?\^?C2\r" + x "\^P\0\^N\^F\^C\^C" + x "\r\^?\^?C4\r" + x "\^N\^N\r\^?\^?\^?C2\r" + x "\^F\0\^B\^P\^P" + x "\^C\^C" + x "\^[xses-mode\r" + x "\^[<\^O" + x "\^U2\^[k" x)) ;;Header line (fset 'ses-exercise-header-row - (concat y ":(revert-buffer t t)\r" - x "<" - x ">" - x "6<" - x ">" - x "7<" - x ">" - x "8<" - x "2<" - x ">" - x "3w" - x "10<" - x ">" - x "2 " + (concat y "\^[:(revert-buffer t t)\r" + x "\^X<" + x "\^X>" + x "\^U6\^X<" + x "\^X>" + x "\^U7\^X<" + x "\^X>" + x "\^U8\^X<" + x "\^U2\^X<" + x "\^X>" + x "\^F\^U3w\^B" + x "\^U10\^X<" + x "\^X>" + x "\^U2\^K" x)) ;;Detecting unsafe formulas and printers (fset 'ses-exercise-unsafe - (concat y ":(revert-buffer t t)\r" + (concat y "\^[:(revert-buffer t t)\r" x "p(lambda (x) (delete-file x))\rn" x "p(lambda (x) (delete-file \"ses-nothing\"))\ry" - x "\0n" - x "(delete-file \"x\"\rn" - x "(delete-file \"ses-nothing\"\ry" - x "\0n" - x "(open-network-stream \"x\" nil \"localhost\" \"smtp\"\ry" - x "\0n" + x "\0\^F\^W\^Yn" + x "\^N(delete-file \"x\"\rn" + x "(delete-file \"ses-nothing\"\ry\^B" + x "\0\^F\^W\^Yn" + x "(open-network-stream \"x\" nil \"localhost\" \"smtp\"\ry\^B" + x "\0\^F\^W\^Yn" x)) ;;Inserting and deleting rows (fset 'ses-exercise-rows - (concat y ":(revert-buffer t t)\r" - x "" - x "\"%s=\"\r" - x "20" - x "p\"%s+\"\r" - x "" - x "123456789\r" - x "\021" - x "" - x " " - x "(not B25\r" - x "k" + (concat y "\^[:(revert-buffer t t)\r" + x "\^N\^F" + x "\^C\^P\"%s=\"\r" + x "\^U20\^O" + x "\^[p\"%s+\"\r" + x "\^N\^O" + x "123456789\r\^B" + x "\0\^U21\^N\^F" + x "\^C\^C" + x "\^[\^L" + x "\^P\^P(not B25\r\^B" + x "\^N\^[k" x "jA3\r" - x "19 " - x " " - x "100" ;Make this approx your CPU speed in MHz + x "\^U19\^K" + x "\^P\^F\^K" + x "\^U100\^O" ;Make this approx your CPU speed in MHz x)) ;;Inserting and deleting columns (fset 'ses-exercise-columns - (concat y ":(revert-buffer t t)\r" - x "\"%s@\"\r" - x "o" - x "" - x "o" - x " " - x "k" + (concat y "\^[:(revert-buffer t t)\r" + x "\^C\^P\"%s@\"\r" + x "\^[o" + x "\^O" + x "\^[o" + x "\^K" + x "\^[k" x "w8\r" - x "p\"%.7s*\"\r" - x "o" - x "" - x "2o" - x "3k" - x "\"%.6g\"\r" - x "26o" - x "\026\t" - x "26o" - x "0\r" - x "26\t" - x "400" - x "50k" - x "\0D" + x "\^[p\"%.7s*\"\r" + x "\^[o" + x "\^F" + x "\^U2\^[o" + x "\^U3\^[k" + x "\^C\^P\"%.6g\"\r" + x "\^U26\^[o" + x "\0\^U26\t" + x "\^U26\^[o" + x "\^C\^[\^H0\r" + x "\^U26\t" + x "\^U400\^B" + x "\^U50\^[k" + x "\0\^N\^N\^F\^F\^C\^[\^SD" x)) (fset 'ses-exercise-editing - (concat y ":(revert-buffer t t)\r" - x "1\r" - x "('x\r" - x "" - x "" + (concat y "\^[:(revert-buffer t t)\r" + x "\^N\^N\^N1\r\^B" + x "\^F(\^B'\^Fx\r\^B" + x "\^B\^P\^P\^P\^O" + x "\^_" x "\r\r" x "w9\r" - x "\r.5\r" - x "\r 10\r" + x "\^N\r\^B.5\r" + x "\^N\^F\r\^B 10\r" x "w12\r" - x "\r'\r" - x "\r\r" + x "\r\^A'\r" + x "\r\^A\^D\r" x "jA4\r" - x "(+ A2 100\r" - x "3\r" + x "(+ A2 100\r\^B" + x "\^P\^P3\r\^B" x "jB1\r" - x "(not A1\r" - x "\"Very long\r" - x "" - x "h" - x "H" - x "" - x ">\t" - x "" - x "" - x "2" - x "" - x "o" - x "h" - x "\0" - x "\"Also very long\r" - x "H" - x "\0'\r" - x "'Trial\r" - x "'qwerty\r" - x "(concat o<\0" - x "-1o\r" - x "(apply '+ o<\0-1o\r" - x "2" - x "-2" - x "-2" - x "2" - x " " - x "H" - x "\0" - x "\"Another long one\r" - x "H" - x "" - x "<" - x "" - x ">" - x "\0" + x "(not A1\r\^B" + x "\^B\"Very long\r\^B" + x "\^C\^C" + x "\^[h" + x "\^[H" + x "\^C\^C" + x "\^[>\t" + x "\^P\^P\^D" + x "\^P\^D" + x "\^F\^F\^U2\^?" + x "\^P\^?" + x "\^[o" + x "\^[h" + x "\0\^O\^F" + x "\"Also very long\r\^B" + x "\^N\^F\^[H" + x "\0'\r\^B" + x "'Trial\r\^B" + x "\^N\^B'qwerty\r\^B" + x "\^F(concat \^Xo\^[<\0\^N\^N" + x "\^U-1\^Xo\^C\^R\r\^B" + x "(apply '+ \^Xo\^[<\0\^N\^F\^U-1\^Xo\^C\^S\r\^B" + x "\^P\^U2\^?" + x "\^U-2\^?" + x "\^U-2\^D" + x "\^U2\^D" + x "\^B\^P\^P\^K" + x "\^N\^F\^[H" + x "\^B\^P\0\^O" + x "\"Another long one\r\^B" + x "\^N\^N\^F\^[H" + x "\^A\^P\^E" + x "\^C\^C\^[<" + x "\^N\^E" + x "\^[>\^P\^O" + x "\0\^E\^F\^E" x)) ;;Sorting of columns (fset 'ses-exercise-sort-column - (concat y ":(revert-buffer t t)\r" + (concat y "\^[:(revert-buffer t t)\r" x "\"Very long\r" - x "99\r" - x "o13\r" + x "\^F99\r" + x "\^F\^[o13\r" x "(+ A3 B3\r" x "7\r8\r(* A4 B4\r" - x "\0A\r" - x "\0B\r" - x "\0C\r" - x "o" - x "\0C\r" + x "\0\^P\^P\^P\^C\^[\^SA\r" + x "\^N\0\^P\^P\^P\^C\^[\^SB\r" + x "\^P\^P\^F\0\^N\^N\^F\^F\^C\^[\^SC\r" + x "\^F\^[o\^P\^O" + x "\^B\0\^N\^N\^N\^U\^C\^[\^SC\r" x)) ;;Simple cell printers (fset 'ses-exercise-cell-printers - (concat y ":(revert-buffer t t)\r" - x "\"4\t76\r" - x "\"4\n7\r" + (concat y "\^[:(revert-buffer t t)\r" + x "\^F\"4\^Q\t76\r\^B" + x "\"4\^Q\n7\r\^B" x "p\"{%S}\"\r" x "p(\"[%s]\")\r" x "p(\"<%s>\")\r" - x "\0" + x "\^B\0\^F\^F" x "p\r" x "pnil\r" x "pses-dashfill\r" - x "48\r" + x "48\r\^B" x "\t" - x "\0p\r" - x "p\r" + x "\^B\0\^Fp\r" + x "\^Fp\r" x "pses-dashfill\r" - x "\0pnil\r" - x "5\r" + x "\^B\0\^F\^Fpnil\r" + x "5\r\^B" x "pses-center\r" - x "\"%s\"\r" + x "\^C\^P\"%s\"\r" x "w8\r" - x "p\r" - x "p\"%.7g@\"\r" - x "\r" - x "\"%.6g#\"\r" - x "\"%.6g.\"\r" - x "\"%.6g.\"\r" - x "pidentity\r" - x "6\r" - x "\"UPCASE\r" - x "pdowncase\r" - x "(* 3 4\r" - x "p(lambda (x) '(\"Hi\"))\r" - x "p(lambda (x) '(\"Bye\"))\r" + x "\^[p\r" + x "\^[p\"%.7g@\"\r" + x "\^C\^P\r" + x "\^C\^P\"%.6g#\"\r" + x "\^C\^P\"%.6g.\"\r" + x "\^C\^P\"%.6g.\"\r" + x "\^[pidentity\r" + x "6\r\^B" + x "\^N\"UPCASE\r\^B" + x "\^[pdowncase\r" + x "(* 3 4\r\^B" + x "p(lambda\^Q (x)\^Q '(\"Hi\"))\r" + x "p(lambda\^Q (x)\^Q '(\"Bye\"))\r" x)) ;;Spanning cell printers (fset 'ses-exercise-spanning-printers - (concat y ":(revert-buffer t t)\r" - x "p\"%.6g*\"\r" + (concat y "\^[:(revert-buffer t t)\r" + x "\^[p\"%.6g*\"\r" x "pses-dashfill-span\r" - x "5\r" + x "5\r\^B" x "pses-tildefill-span\r" - x "\"4\r" - x "p\"$%s\"\r" - x "p(\"$%s\")\r" - x "8\r" - x "p(\"!%s!\")\r" - x "\t\"12345678\r" + x "\"4\r\^B" + x "\^[p\"$%s\"\r" + x "\^[p(\"$%s\")\r" + x "8\r\^B" + x "\^[p(\"!%s!\")\r" + x "\t\"12345678\r\^B" x "pses-dashfill-span\r" - x "\"23456789\r" + x "\"23456789\r\^B" x "\t" - x "(not t\r" - x "w6\r" - x "\"5\r" - x "o" - x "k" - x "k" + x "(not t\r\^B" + x "\^Bw6\r" + x "\"5\r\^B" + x "\^N\^F\^[o" + x "\^[k" + x "\^[k" x "\t" - x "" - x "o" - x "2k" - x "k" + x "\^B\^P\^C\^C" + x "\^[o" + x "\^N\^U2\^[k" + x "\^B\^B\^[k" x)) ;;Cut/copy/paste - within same buffer (fset 'ses-exercise-paste-1buf - (concat y ":(revert-buffer t t)\r" - x "\0w" - x "" - x "o" - x "\"middle\r" - x "\0" - x "w" - x "\0" - x "w" - x "" - x "" - x "2y" - x "y" - x "y" - x ">" - x "y" - x ">y" - x "<" + (concat y "\^[:(revert-buffer t t)\r" + x "\^N\0\^F\^[w" + x "\^C\^C\^P\^F\^Y" + x "\^N\^[o" + x "\"middle\r\^B" + x "\0\^F\^N\^F" + x "\^[w" + x "\^P\0\^F" + x "\^[w" + x "\^C\^C\^F\^N" + x "\^Y" + x "\^U2\^Yy" + x "\^F\^U\^Yy" + x "\^P\^P\^F\^U\^Yy" + x "\^[>" + x "\^Yy" + x "\^[>\^Yy" + x "\^[<" x "p\"<%s>\"\r" - x "pses-dashfill\r" - x "\0" - x "" - x "" - x "y" - x "\r\0w" - x "\r" - x "3(+ G2 H1\r" - x "\0w" - x ">" - x "" - x "8(ses-average (ses-range G2 H2)\r" - x "\0k" - x "7" - x "" - x "(ses-average (ses-range E7 E9)\r" - x "\0 " - x "" - x "(ses-average (ses-range E7 F7)\r" - x "\0k" - x "" - x "(ses-average (ses-range D6 E6)\r" - x "\0k" - x "" - x "2" - x "\"Line A\r" + x "\^Fpses-dashfill\r" + x "\^B\0\^F\^F\^F\^N\^N\^N" + x "\^W" + x "\^_" + x "\^U\^Yy" + x "\r\0\^B\^B\^B\^[w" + x "\r\^F\^Y" + x "\^U3\^P(+ G2 H1\r" + x "\0\^B\^[w" + x "\^C\^C\^[>\^B" + x "\^Y" + x "\^B\^U8\^P(ses-average (ses-range G2 H2)\r\^B" + x "\0\^F\^W\^[k" + x "\^U7\^N" + x "\^Y" + x "\^P\^B(ses-average (ses-range E7 E9)\r\^B" + x "\0\^F\^W\^K" + x "\^N\^Y" + x "\^B\^B\^P(ses-average (ses-range E7 F7)\r\^B" + x "\0\^F\^W\^[k" + x "\^F\^Y" + x "\^B\^B\^P(ses-average (ses-range D6 E6)\r\^B" + x "\0\^F\^W\^[k" + x "\^F\^Y" + x "\^A\^U2\^O" + x "\"Line A\r\^B" x "pses-tildefill-span\r" - x "\"Subline A(1)\r" + x "\^N\^F\"Subline A(1)\r\^B" x "pses-dashfill-span\r" - x "\0w" - x "" - x "" - x "\0w" - x "" + x "\^B\^P\0\^N\^N\^N\^[w\^C\^C" + x "\^A\^P\^P\^P\^P\^P\^P" + x "\^Y" + x "\0\^N\^F\^F\^[w\^C\^C" + x "\^F\^Y" x)) ;;Cut/copy/paste - between two buffers (fset 'ses-exercise-paste-2buf - (concat y ":(revert-buffer t t)\r" - x "o\"middle\r\0" - x "" - x "4bses-test.txt\r" - x " " - x "\"xxx\0" - x "wo" - x "" - x "" - x "o\"\0" - x "wo" - x "o123.45\0" - x "o" - x "o1 \0" - x "o" - x ">y" - x "o symb\0" - x "oy2y" - x "o1\t\0" - x "o" - x "w9\np\"<%s>\"\n" - x "o\n2\t\"3\nxxx\t5\n\0" - x "oy" + (concat y "\^[:(revert-buffer t t)\r" + x "\^F\^N\^[o\"middle\r\^B\0\^F\^N\^F" + x "\^W" + x "\^X4bses-test.txt\r" + x " \^A\^Y" + x "\^E\"xxx\0\^B\^B\^B\^B" + x "\^[w\^Xo" + x "\^_" + x "\^Y" + x "\^Xo\^E\"\0\^B\^B\^B\^B\^B" + x "\^[w\^Xo\^Y" + x "\^Xo123.45\0\^B\^B\^B\^B\^B\^B" + x "\^W\^Xo\^Y" + x "\^Xo1 \^B\^B\0\^F\^F\^F\^F\^F\^F\^F" + x "\^W\^Xo\^Y" + x "\^[>\^Yy" + x "\^F\^Xo symb\0\^B\^B\^B\^B" + x "\^W\^Xo\^U\^Y\^[y\^U2\^[y" + x "\^Xo1\t\0\^B\^B" + x "\^W\^Xo\^B\^Y" + x "w9\n\^[p\"<%s>\"\n" + x "\^Xo\n2\t\"3\nxxx\t5\n\0\^P\^P" + x "\^W\^Xo\^Yy" x)) ;;Export text, import it back (fset 'ses-exercise-import-export - (concat y ":(revert-buffer t t)\r" - x "\0xt" - x "4bses-test.txt\r" - x "\n-1o" - x "xTo-1o" - x "'crunch\r" - x "pses-center-span\r" - x "\0xT" - x "o\n-1o" - x "\0y" - x "\0xt" - x "\0y" - x "12345678\r" - x "'bunch\r" - x "\0xtxT" + (concat y "\^[:(revert-buffer t t)\r" + x "\^N\^N\^F\0\^Fxt" + x "\^X4bses-test.txt\r" + x "\n\^Y\^U-1\^Xo" + x "xT\^Xo\^Y\^U-1\^Xo" + x "\^C\^C\^F'crunch\r\^B" + x "\^P\^P\^Ppses-center-span\r" + x "\0\^N\^N\^N\^NxT" + x "\^Xo\n\^Y\^U-1\^Xo" + x "\0\^Yy" + x "\^F\0\^B\^P\^Pxt" + x "\^N\^N\0\^U\^Yy" + x "12345678\r\^B" + x "\^F\^F'bunch\r" + x "\0\^P\^PxtxT" x))) (defun ses-exercise-macros () @@ -565,10 +565,10 @@ spreadsheet files with invalid formatting." (let ((curcell '(A1 . A2))) (ses-check-curcell 'end)) (let ((curcell '(A1 . A2))) (ses-sort-column "B")) (let ((curcell '(C1 . D2))) (ses-sort-column "B")) - (execute-kbd-macro "jB10\n2") + (execute-kbd-macro "jB10\n\^U2\^D") (execute-kbd-macro [?j ?B ?9 ?\n ?\C-@ ?\C-f ?\C-f cut]) - (progn (kill-new "x") (execute-kbd-macro ">n")) - (execute-kbd-macro "\0w"))) + (progn (kill-new "x") (execute-kbd-macro "\^[>\^Yn")) + (execute-kbd-macro "\^B\0\^[w"))) (condition-case nil (progn (eval x) @@ -589,7 +589,7 @@ spreadsheet files with invalid formatting." (defun ses-exercise-invalid-spreadsheets () "Execute code paths that detect invalid spreadsheet files." ;;Detect invalid spreadsheets - (let ((p&d "\n\n \n(ses-cell A1 nil nil nil nil)\n\n") + (let ((p&d "\n\n\^L\n(ses-cell A1 nil nil nil nil)\n\n") (cw "(ses-column-widths [7])\n") (cp "(ses-column-printers [ses-center])\n") (dp "(ses-default-printer \"%.7g\")\n") @@ -603,12 +603,12 @@ spreadsheet files with invalid formatting." "(1 2 x)" "(1 2 -1)" "(3 1 1)" - "\n\n (2 1 1)" - "\n\n \n(ses-cell)(2 1 1)" - "\n\n \n(x)\n(2 1 1)" - "\n\n\n \n(ses-cell A2)\n(2 2 2)" - "\n\n\n \n(ses-cell B1)\n(2 2 2)" - "\n\n \n(ses-cell A1 nil nil nil nil)\n(2 1 1)" + "\n\n\^L(2 1 1)" + "\n\n\^L\n(ses-cell)(2 1 1)" + "\n\n\^L\n(x)\n(2 1 1)" + "\n\n\n\^L\n(ses-cell A2)\n(2 2 2)" + "\n\n\n\^L\n(ses-cell B1)\n(2 2 2)" + "\n\n\^L\n(ses-cell A1 nil nil nil nil)\n(2 1 1)" (concat p&d "(x)\n(x)\n(x)\n(x)\n" p11) (concat p&d "(ses-column-widths)(x)\n(x)\n(x)\n" p11) (concat p&d cw "(x)\n(x)\n(x)\n(2 1 1)") @@ -671,7 +671,7 @@ spreadsheet files with invalid formatting." (ses-exercise-invalid-spreadsheets) ;;Upgrade of old-style spreadsheet (with-temp-buffer - (insert " \n\n \n(ses-cell A1 nil nil nil nil)\n\n(ses-column-widths [7])\n(ses-column-printers [nil])\n(ses-default-printer \"%.7g\")\n\n( ;Global parameters (these are read first)\n 1 ;SES file-format\n 1 ;numrows\n 1 ;numcols\n)\n\n") + (insert " \n\n\^L\n(ses-cell A1 nil nil nil nil)\n\n(ses-column-widths [7])\n(ses-column-printers [nil])\n(ses-default-printer \"%.7g\")\n\n( ;Global parameters (these are read first)\n 1 ;SES file-format\n 1 ;numrows\n 1 ;numcols\n)\n\n") (ses-load)) ;;ses-vector-delete is always called from buffer-undo-list with the same ;;symbol as argument. We'll give it a different one here. diff --git a/lisp/erc/erc-services.el b/lisp/erc/erc-services.el index 62201b0e7c..ac49a3e12e 100644 --- a/lisp/erc/erc-services.el +++ b/lisp/erc/erc-services.el @@ -214,7 +214,7 @@ Example of use: "identify" nil nil nil) (Azzurra "NickServ!service@azzurra.org" - "/ns\\s-IDENTIFY\\s-password" + "\^B/ns\\s-IDENTIFY\\s-password\^B" "NickServ" "IDENTIFY" nil nil nil) (BitlBee @@ -223,7 +223,7 @@ Example of use: "identify" nil nil nil) (BRASnet "NickServ!services@brasnet.org" - "/NickServ\\s-IDENTIFY\\s-senha" + "\^B/NickServ\\s-IDENTIFY\\s-\^_senha\^_\^B" "NickServ" "IDENTIFY" nil "" nil) (DALnet @@ -262,7 +262,7 @@ Example of use: nil "NickServ" "IDENTIFY" nil nil - "You\\s-are\\s-successfully\\s-identified\\s-as\\s-") + "You\\s-are\\s-successfully\\s-identified\\s-as\\s-\^B") (Rizon "NickServ!service@rizon.net" "This\\s-nickname\\s-is\\s-registered\\s-and\\s-protected." @@ -275,7 +275,7 @@ Example of use: "auth" t nil nil) (SlashNET "NickServ!services@services.slashnet.org" - "/msg\\s-NickServ\\s-IDENTIFY\\s-password" + "/msg\\s-NickServ\\s-IDENTIFY\\s-\^_password" "NickServ@services.slashnet.org" "IDENTIFY" nil nil nil)) "Alist of NickServer details, sorted by network. diff --git a/lisp/gnus/nnmail.el b/lisp/gnus/nnmail.el index 9f068285e7..b2c86d35d1 100644 --- a/lisp/gnus/nnmail.el +++ b/lisp/gnus/nnmail.el @@ -723,7 +723,7 @@ If SOURCE is a directory spec, try to return the group name component." ;; Skip all the headers in case there are more "From "s... (or (search-forward "\n\n" nil t) (search-forward-regexp "^[^:]*\\( .*\\|\\)$" nil t) - (search-forward " ")) + (search-forward "\^_\^L")) (point))) ;; Unquote the ">From " line, if any. (goto-char (point-min)) @@ -763,7 +763,7 @@ If SOURCE is a directory spec, try to return the group name component." (if (or (= (+ (point) content-length) (point-max)) (save-excursion (goto-char (+ (point) content-length)) - (looking-at ""))) + (looking-at "\^_"))) (progn (goto-char (+ (point) content-length)) (setq do-search nil)) @@ -772,7 +772,7 @@ If SOURCE is a directory spec, try to return the group name component." ;; Go to the beginning of the next article - or to the end ;; of the buffer. (when do-search - (if (re-search-forward "^" nil t) + (if (re-search-forward "^\^_" nil t) (goto-char (match-beginning 0)) (goto-char (1- (point-max))))) (delete-char 1) ; delete ^_ diff --git a/lisp/help-fns.el b/lisp/help-fns.el index a592809de6..ec46a479ed 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -181,8 +181,8 @@ KIND should be `var' for a variable or `subr' for a subroutine." (expand-file-name internal-doc-file-name doc-directory))) (let ((file (catch 'loop (while t - (let ((pnt (search-forward (concat "" name "\n")))) - (re-search-backward "S\\(.*\\)") + (let ((pnt (search-forward (concat "\^_" name "\n")))) + (re-search-backward "\^_S\\(.*\\)") (let ((file (match-string 1))) (if (member file build-files) (throw 'loop file) @@ -1293,7 +1293,7 @@ BUFFER should be a buffer or a buffer name." ".AU Richard M. Stallman\n") (insert-file-contents file) (let (notfirst) - (while (search-forward "" nil 'move) + (while (search-forward "\^_" nil 'move) (if (= (following-char) ?S) (delete-region (1- (point)) (line-end-position)) (delete-char -1) @@ -1326,12 +1326,12 @@ BUFFER should be a buffer or a buffer name." (insert "@") (forward-char 1)) (goto-char (point-min)) - (while (search-forward "" nil t) + (while (search-forward "\^_" nil t) (when (/= (following-char) ?S) (setq type (char-after) name (buffer-substring (1+ (point)) (line-end-position)) doc (buffer-substring (line-beginning-position 2) - (if (search-forward "" nil 'move) + (if (search-forward "\^_" nil 'move) (1- (point)) (point))) alist (cons (list name type doc) alist)) diff --git a/lisp/kmacro.el b/lisp/kmacro.el index 76d2125c9d..0acb7fce8f 100644 --- a/lisp/kmacro.el +++ b/lisp/kmacro.el @@ -813,7 +813,7 @@ The ARG parameter is unused." (and (>= ch ?A) (<= ch ?Z)))) (setq key-seq (concat "\C-x\C-k" key-seq) ok t)))) - (when (and (not (equal key-seq "")) + (when (and (not (equal key-seq "\^G")) (or ok (not (setq cmd (key-binding key-seq))) (stringp cmd) diff --git a/lisp/org/org-ctags.el b/lisp/org/org-ctags.el index 792f3fe1a3..4898174375 100644 --- a/lisp/org/org-ctags.el +++ b/lisp/org/org-ctags.el @@ -236,7 +236,7 @@ buffer position where the tag is found." (with-current-buffer (get-file-buffer tags-file-name) (goto-char (point-min)) (cond - ((re-search-forward (format "^.*%s\\([0-9]+\\),\\([0-9]+\\)$" + ((re-search-forward (format "^.*\^?%s\^A\\([0-9]+\\),\\([0-9]+\\)$" (regexp-quote tag)) nil t) (let ((line (string-to-number (match-string 1))) (pos (string-to-number (match-string 2)))) @@ -261,7 +261,7 @@ Return the list." (visit-tags-table-buffer 'same) (with-current-buffer (get-file-buffer tags-file-name) (goto-char (point-min)) - (while (re-search-forward "^.*\\(.*\\)\\([0-9]+\\),\\([0-9]+\\)$" + (while (re-search-forward "^.*\^?\\(.*\\)\^A\\([0-9]+\\),\\([0-9]+\\)$" nil t) (push (substring-no-properties (match-string 1)) taglist))) taglist))) diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index 664f01012b..f42510932e 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el @@ -1994,7 +1994,7 @@ Key bindings: ;; since it's practically impossible to write a regexp that reliably ;; matches such a construct. Other tools are necessary. (defconst c-Java-defun-prompt-regexp - "^[ \t]*\\(\\(\\(public\\|protected\\|private\\|const\\|abstract\\|synchronized\\|final\\|static\\|threadsafe\\|transient\\|native\\|volatile\\)\\s-+\\)*\\(\\(\\([[a-zA-Z][][_$.a-zA-Z0-9]*[][_$.a-zA-Z0-9]+\\|[[a-zA-Z]\\)\\s-*\\)\\s-+\\)\\)?\\(\\([[a-zA-Z][][_$.a-zA-Z0-9]*\\s-+\\)\\s-*\\)?\\([_a-zA-Z][^][ \t:;.,{}()=]*\\|\\([_$a-zA-Z][_$.a-zA-Z0-9]*\\)\\)\\s-*\\(([^);{}]*)\\)?\\([] \t]*\\)\\(\\s-*\\\\s-*\\(\\([_$a-zA-Z][_$.a-zA-Z0-9]*\\)[, \t\n\r\f\v]*\\)+\\)?\\s-*") + "^[ \t]*\\(\\(\\(public\\|protected\\|private\\|const\\|abstract\\|synchronized\\|final\\|static\\|threadsafe\\|transient\\|native\\|volatile\\)\\s-+\\)*\\(\\(\\([[a-zA-Z][][_$.a-zA-Z0-9]*[][_$.a-zA-Z0-9]+\\|[[a-zA-Z]\\)\\s-*\\)\\s-+\\)\\)?\\(\\([[a-zA-Z][][_$.a-zA-Z0-9]*\\s-+\\)\\s-*\\)?\\([_a-zA-Z][^][ \t:;.,{}()\^?=]*\\|\\([_$a-zA-Z][_$.a-zA-Z0-9]*\\)\\)\\s-*\\(([^);{}]*)\\)?\\([] \t]*\\)\\(\\s-*\\\\s-*\\(\\([_$a-zA-Z][_$.a-zA-Z0-9]*\\)[, \t\n\r\f\v]*\\)+\\)?\\s-*") (easy-menu-define c-java-menu java-mode-map "Java Mode Commands" (cons "Java" (c-lang-const c-mode-menu java))) diff --git a/lisp/textmodes/texinfmt.el b/lisp/textmodes/texinfmt.el index d6f451a1ab..e89da6527c 100644 --- a/lisp/textmodes/texinfmt.el +++ b/lisp/textmodes/texinfmt.el @@ -2447,7 +2447,7 @@ Use only the FILENAME arg; for Info, ignore the other arguments to @image." (defun texinfo-format-option () "Insert \\=` ... \\=' around arg unless inside a table; in that case, no quotes." ;; `looking-at-backward' not available in v. 18.57, 20.2 - (if (not (search-backward "" ; searched-for character is a control-H + (if (not (search-backward "\^H" (line-beginning-position) t)) (insert "`" (texinfo-parse-arg-discard) "'") diff --git a/lisp/vc/pcvs.el b/lisp/vc/pcvs.el index 5515e0cd60..501666a499 100644 --- a/lisp/vc/pcvs.el +++ b/lisp/vc/pcvs.el @@ -700,7 +700,7 @@ OLD-FIS is the list of fileinfos on which the cvs command was applied and ;; because of the call to `process-send-eof'. (save-excursion (goto-char (point-min)) - (while (re-search-forward "^\\^D+" nil t) + (while (re-search-forward "^\\^D\^H+" nil t) (let ((inhibit-read-only t)) (delete-region (match-beginning 0) (match-end 0)))))) (let* ((fileinfos (cvs-parse-buffer 'cvs-parse-table dcd subdir)) diff --git a/lisp/woman.el b/lisp/woman.el index c83a04874a..eab97fb34b 100644 --- a/lisp/woman.el +++ b/lisp/woman.el @@ -1714,14 +1714,14 @@ Do not call directly!" ;; Interpret overprinting to indicate bold face: (goto-char (point-min)) - (while (re-search-forward "\\(.\\)\\(\\(+\\1\\)+\\)" nil t) + (while (re-search-forward "\\(.\\)\\(\\(\^H+\\1\\)+\\)" nil t) (woman-delete-match 2) (woman-set-face (1- (point)) (point) 'woman-bold)) ;; Interpret underlining to indicate italic face: ;; (Must be AFTER emboldening to interpret bold _ correctly!) (goto-char (point-min)) - (while (search-forward "_" nil t) + (while (search-forward "_\^H" nil t) (delete-char -2) (woman-set-face (point) (1+ (point)) 'woman-italic)) @@ -2071,14 +2071,14 @@ alist in `woman-buffer-alist' and return nil." ;;; Syntax and display tables: -(defconst woman-escaped-escape-char ? +(defconst woman-escaped-escape-char ?\^\\ ;; An arbitrary unused control character "Internal character representation of escaped escape characters.") (defconst woman-escaped-escape-string (char-to-string woman-escaped-escape-char) "Internal string representation of escaped escape characters.") -(defconst woman-unpadded-space-char ? +(defconst woman-unpadded-space-char ?\^] ;; An arbitrary unused control character "Internal character representation of unpadded space characters.") (defconst woman-unpadded-space-string commit 00c1f771f2a51ffa675ec5a07ea330f2605cd302 Author: Noam Postavsky Date: Thu Mar 29 19:17:34 2018 -0400 * src/xterm.c (x_make_frame_visible): Fix typo in previous change. diff --git a/src/xterm.c b/src/xterm.c index f8ac23e53b..6ab4a03002 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -11551,7 +11551,7 @@ x_make_frame_visible (struct frame *f) poll_for_input_1 (); poll_suppress_count = old_poll_suppress_count; #endif - if (FRAME_VISIBLE_P (f)) + if (! FRAME_VISIBLE_P (f)) x_wait_for_event (f, MapNotify); } } commit 2a192e21cf3b04b7f830b4971c1508c611e13a3c Author: Noam Postavsky Date: Thu Mar 29 19:11:47 2018 -0400 Don't wait for visible frames to become visible For discussion, see thread starting at https://lists.gnu.org/archive/html/emacs-devel/2018-03/msg00807.html. * src/xterm.c (x_make_frame_visible): Check FRAME_VISIBLE_P before calling x_wait_for_event. diff --git a/src/xterm.c b/src/xterm.c index 0fcd7ef7e2..f8ac23e53b 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -11551,7 +11551,8 @@ x_make_frame_visible (struct frame *f) poll_for_input_1 (); poll_suppress_count = old_poll_suppress_count; #endif - x_wait_for_event (f, MapNotify); + if (FRAME_VISIBLE_P (f)) + x_wait_for_event (f, MapNotify); } } commit c213f465ba8038ce93314b96fd53ec3e35d34609 Author: Paul Eggert Date: Thu Mar 29 11:01:38 2018 -0700 New experimental variable read-integer-overflow-as-float. Following a suggestion by Eli Zaretskii (Bug#30408#46). * etc/NEWS: Mention it. * src/lread.c (syms_of_lread): Add it. (read1): Treat out-of-range integers as floats if read-integer-overflow-as-float is non-nil. diff --git a/etc/NEWS b/etc/NEWS index 9161f2bd32..9dddc90213 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -356,8 +356,10 @@ implementation to format (Bug#30408). ** The Lisp reader now signals an overflow for plain decimal integers that do not end in '.' and are outside Emacs range. Formerly the Lisp reader silently converted them to floating-point numbers, and signaled -overflow only for integers with a radix that are outside machine range -(Bug#30408). +overflow only for integers with a radix that are outside machine range. +To get the old behavior, set the new, experimental variable +read-integer-overflow-as-float to t and please email +30408@debbugs.gnu.org if you need that. (Bug#30408). --- ** Some functions and variables obsolete since Emacs 22 have been removed: diff --git a/src/lread.c b/src/lread.c index a774524ee4..8fb61f5633 100644 --- a/src/lread.c +++ b/src/lread.c @@ -3502,7 +3502,9 @@ read1 (Lisp_Object readcharfun, int *pch, bool first_in_list) if (!quoted && !uninterned_symbol) { - Lisp_Object result = string_to_number (read_buffer, 10, 0); + int flags = (read_integer_overflow_as_float + ? S2N_OVERFLOW_TO_FLOAT : 0); + Lisp_Object result = string_to_number (read_buffer, 10, flags); if (! NILP (result)) return unbind_to (count, result); } @@ -4830,6 +4832,13 @@ were read in. */); doc: /* Non-nil means read recursive structures using #N= and #N# syntax. */); Vread_circle = Qt; + DEFVAR_BOOL ("read-integer-overflow-as-float", + read_integer_overflow_as_float, + doc: /* Non-nil means `read' quietly treats an out-of-range integer as floating point. +Nil (the default) means signal an overflow unless the integer ends in `.'. +This variable is experimental; email 30408@debbugs.gnu.org if you need it. */); + read_integer_overflow_as_float = false; + DEFVAR_LISP ("load-path", Vload_path, doc: /* List of directories to search for files to load. Each element is a string (directory file name) or nil (meaning commit 6b3d01dad415230ad0bd0d01a05351d7a8b0e8c3 Author: Paul Eggert Date: Thu Mar 29 10:16:29 2018 -0700 Lisp reader now checks for integer overflow * doc/lispref/numbers.texi (Integer Basics), etc/NEWS: Document this. * src/lisp.h (S2N_IGNORE_TRAILING, S2N_OVERFLOW_TO_FLOAT): New constants. * src/lread.c (string_to_number): Change trailing bool arg to integer argument with flags, to support S2N_OVERFLOW_TO_FLOAT. All uses changed. * test/src/editfns-tests.el (read-large-integer): New test. diff --git a/doc/lispref/numbers.texi b/doc/lispref/numbers.texi index c2cb6651d4..2fed2b642f 100644 --- a/doc/lispref/numbers.texi +++ b/doc/lispref/numbers.texi @@ -55,16 +55,13 @@ chapter assume the minimum integer width of 30 bits. The Lisp reader reads an integer as a nonempty sequence of decimal digits with optional initial sign and optional -final period. A decimal integer that is out of the -Emacs range is treated as a floating-point number. +final period. @example 1 ; @r{The integer 1.} 1. ; @r{The integer 1.} +1 ; @r{Also the integer 1.} -1 ; @r{The integer @minus{}1.} - 9000000000000000000 - ; @r{The floating-point number 9e18.} 0 ; @r{The integer 0.} -0 ; @r{The integer 0.} @end example @@ -94,6 +91,15 @@ For example: #24r1k @result{} 44 @end example + If an integer is outside the Emacs range, the Lisp reader ordinarily +signals an overflow. However, if a too-large plain integer ends in a +period, the Lisp reader treats it as a floating-point number instead. +This lets an Emacs Lisp program specify a large integer that is +quietly approximated by a floating-point number on machines with +limited word width. For example, @samp{536870912.} is a +floating-point number if Emacs integers are only 30 bits wide and is +an integer otherwise. + To understand how various functions work on integers, especially the bitwise operators (@pxref{Bitwise Operations}), it is often helpful to view the numbers in their binary form. diff --git a/etc/NEWS b/etc/NEWS index 046d71b0f2..9161f2bd32 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -352,6 +352,13 @@ as new-style, bind the new variable 'force-new-style-backquotes' to t. integer, Emacs now signals an error if the number is too large for the implementation to format (Bug#30408). ++++ +** The Lisp reader now signals an overflow for plain decimal integers +that do not end in '.' and are outside Emacs range. Formerly the Lisp +reader silently converted them to floating-point numbers, and signaled +overflow only for integers with a radix that are outside machine range +(Bug#30408). + --- ** Some functions and variables obsolete since Emacs 22 have been removed: archive-mouse-extract, assoc-ignore-case, assoc-ignore-representation, diff --git a/src/data.c b/src/data.c index a7fab1ef58..6f23a26757 100644 --- a/src/data.c +++ b/src/data.c @@ -2716,9 +2716,7 @@ present, base 10 is used. BASE must be between 2 and 16 (inclusive). If the base used is not 10, STRING is always parsed as an integer. */) (register Lisp_Object string, Lisp_Object base) { - register char *p; - register int b; - Lisp_Object val; + int b; CHECK_STRING (string); @@ -2732,11 +2730,12 @@ If the base used is not 10, STRING is always parsed as an integer. */) b = XINT (base); } - p = SSDATA (string); + char *p = SSDATA (string); while (*p == ' ' || *p == '\t') p++; - val = string_to_number (p, b, true); + int flags = S2N_IGNORE_TRAILING | S2N_OVERFLOW_TO_FLOAT; + Lisp_Object val = string_to_number (p, b, flags); return NILP (val) ? make_number (0) : val; } diff --git a/src/lisp.h b/src/lisp.h index f0c0c5a14a..b931d23bf3 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -3899,7 +3899,8 @@ LOADHIST_ATTACH (Lisp_Object x) } extern int openp (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object *, Lisp_Object, bool); -extern Lisp_Object string_to_number (char const *, int, bool); +enum { S2N_IGNORE_TRAILING = 1, S2N_OVERFLOW_TO_FLOAT = 2 }; +extern Lisp_Object string_to_number (char const *, int, int); extern void map_obarray (Lisp_Object, void (*) (Lisp_Object, Lisp_Object), Lisp_Object); extern void dir_warning (const char *, Lisp_Object); diff --git a/src/lread.c b/src/lread.c index 381f9cf20c..a774524ee4 100644 --- a/src/lread.c +++ b/src/lread.c @@ -2339,7 +2339,7 @@ character_name_to_code (char const *name, ptrdiff_t name_len) monstrosities like "U+-0000". */ Lisp_Object code = (name[0] == 'U' && name[1] == '+' - ? string_to_number (name + 1, 16, false) + ? string_to_number (name + 1, 16, 0) : call2 (Qchar_from_name, make_unibyte_string (name, name_len), Qt)); if (! RANGED_INTEGERP (0, code, MAX_UNICODE_CHAR) @@ -2693,7 +2693,7 @@ read_integer (Lisp_Object readcharfun, EMACS_INT radix) invalid_syntax (buf); } - return string_to_number (buf, radix, false); + return string_to_number (buf, radix, 0); } @@ -3502,7 +3502,7 @@ read1 (Lisp_Object readcharfun, int *pch, bool first_in_list) if (!quoted && !uninterned_symbol) { - Lisp_Object result = string_to_number (read_buffer, 10, false); + Lisp_Object result = string_to_number (read_buffer, 10, 0); if (! NILP (result)) return unbind_to (count, result); } @@ -3667,16 +3667,17 @@ substitute_in_interval (INTERVAL interval, void *arg) } -/* Convert STRING to a number, assuming base BASE. Return a fixnum if - STRING has integer syntax and fits in a fixnum, else return the - nearest float if STRING has either floating point or integer syntax - and BASE is 10, else return nil. If IGNORE_TRAILING, consider just - the longest prefix of STRING that has valid floating point syntax. - Signal an overflow if BASE is not 10 and the number has integer - syntax but does not fit. */ +/* Convert STRING to a number, assuming base BASE. When STRING has + floating point syntax and BASE is 10, return a nearest float. When + STRING has integer syntax, return a fixnum if the integer fits, and + signal an overflow otherwise (unless BASE is 10 and STRING ends in + period or FLAGS & S2N_OVERFLOW_TO_FLOAT is nonzero; in this case, + return a nearest float instead). Otherwise, return nil. If FLAGS + & S2N_IGNORE_TRAILING is nonzero, consider just the longest prefix + of STRING that has valid syntax. */ Lisp_Object -string_to_number (char const *string, int base, bool ignore_trailing) +string_to_number (char const *string, int base, int flags) { char const *cp = string; bool float_syntax = 0; @@ -3759,9 +3760,10 @@ string_to_number (char const *string, int base, bool ignore_trailing) || (state & ~INTOVERFLOW) == (LEAD_INT|E_EXP)); } - /* Return nil if the number uses invalid syntax. If IGNORE_TRAILING, accept - any prefix that matches. Otherwise, the entire string must match. */ - if (! (ignore_trailing + /* Return nil if the number uses invalid syntax. If FLAGS & + S2N_IGNORE_TRAILING, accept any prefix that matches. Otherwise, + the entire string must match. */ + if (! (flags & S2N_IGNORE_TRAILING ? ((state & LEAD_INT) != 0 || float_syntax) : (!*cp && ((state & ~(INTOVERFLOW | DOT_CHAR)) == LEAD_INT || float_syntax)))) @@ -3776,7 +3778,7 @@ string_to_number (char const *string, int base, bool ignore_trailing) /* Unfortunately there's no simple and accurate way to convert non-base-10 numbers that are out of C-language range. */ if (base != 10) - xsignal1 (Qoverflow_error, build_string (string)); + flags = 0; } else if (n <= (negative ? -MOST_NEGATIVE_FIXNUM : MOST_POSITIVE_FIXNUM)) { @@ -3785,6 +3787,9 @@ string_to_number (char const *string, int base, bool ignore_trailing) } else value = n; + + if (! (state & DOT_CHAR) && ! (flags & S2N_OVERFLOW_TO_FLOAT)) + xsignal1 (Qoverflow_error, build_string (string)); } /* Either the number uses float syntax, or it does not fit into a fixnum. diff --git a/src/process.c b/src/process.c index 2aaa238f60..ed2cab7b51 100644 --- a/src/process.c +++ b/src/process.c @@ -6842,7 +6842,7 @@ SIGCODE may be an integer, or a symbol whose name is a signal name. */) { Lisp_Object tem = Fget_process (process); if (NILP (tem)) - tem = string_to_number (SSDATA (process), 10, true); + tem = string_to_number (SSDATA (process), 10, S2N_OVERFLOW_TO_FLOAT); process = tem; } else if (!NUMBERP (process)) diff --git a/test/src/editfns-tests.el b/test/src/editfns-tests.el index 6e1f730166..442ad08937 100644 --- a/test/src/editfns-tests.el +++ b/test/src/editfns-tests.el @@ -142,27 +142,41 @@ (should (string-equal (format "%#05X" #x10) "0X010")) (should (string-equal (format "%#04x" 0) "0000"))) -;;; Test Bug#30408. + +;;; Tests for Bug#30408. + (ert-deftest format-%d-large-float () (should (string-equal (format "%d" 18446744073709551616.0) "18446744073709551616")) (should (string-equal (format "%d" -18446744073709551616.0) "-18446744073709551616"))) -;;; Another test for Bug#30408. ;;; Perhaps Emacs will be improved someday to return the correct ;;; answer for positive numbers instead of overflowing; in -;;; that case this test will need to be changed. In the meantime make +;;; that case these tests will need to be changed. In the meantime make ;;; sure Emacs is reporting the overflow correctly. (ert-deftest format-%x-large-float () (should-error (format "%x" 18446744073709551616.0) :type 'overflow-error)) +(ert-deftest read-large-integer () + (should-error (read (format "%d0" most-negative-fixnum)) + :type 'overflow-error) + (should-error (read (format "%+d" (* -8.0 most-negative-fixnum))) + :type 'overflow-error) + (should-error (read (substring (format "%d" most-negative-fixnum) 1)) + :type 'overflow-error) + (should-error (read (format "#x%x" most-negative-fixnum)) + :type 'overflow-error) + (should-error (read (format "#o%o" most-negative-fixnum)) + :type 'overflow-error) + (should-error (read (format "#32rG%x" most-positive-fixnum)) + :type 'overflow-error)) -;;; Another test for Bug#30408. (ert-deftest format-%o-invalid-float () (should-error (format "%o" -1e-37) :type 'overflow-error)) + ;;; Check format-time-string with various TZ settings. ;;; Use only POSIX-compatible TZ values, since the tests should work ;;; even if tzdb is not in use. commit 3409fe0362c52127c52f854a7300f4dde4b8fffe Author: Eli Zaretskii Date: Thu Mar 29 19:45:13 2018 +0300 Support Capital sharp S in German input methods * lisp/leim/quail/latin-post.el ("german-postfix"): * lisp/leim/quail/latin-pre.el ("german-prefix"): Add Capital sharp S. (Bug#30988) * etc/NEWS: Mention the support of Capital sharp S. diff --git a/etc/NEWS b/etc/NEWS index fd1d04b8a0..046d71b0f2 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -121,6 +121,9 @@ regular expression was previously invalid, but is now accepted: x\{32768\} +--- +** The German prefix and postfix input methods now support Capital sharp S. + * Editing Changes in Emacs 27.1 diff --git a/lisp/leim/quail/latin-post.el b/lisp/leim/quail/latin-post.el index de321d6419..e3691e728d 100644 --- a/lisp/leim/quail/latin-post.el +++ b/lisp/leim/quail/latin-post.el @@ -1103,6 +1103,7 @@ szz -> sz ("UE" ?Ü) ("ue" ?ü) ("sz" ?ß) + ("SZ" ?ẞ) ("AEE" ["AE"]) ("aee" ["ae"]) @@ -1111,6 +1112,7 @@ szz -> sz ("UEE" ["UE"]) ("uee" ["ue"]) ("szz" ["sz"]) + ("SZZ" ["SZ"]) ("ge" ["ge"]) ("eue" ["eue"]) ("Eue" ["Eue"]) diff --git a/lisp/leim/quail/latin-pre.el b/lisp/leim/quail/latin-pre.el index 38011d485b..ffa8fd72b8 100644 --- a/lisp/leim/quail/latin-pre.el +++ b/lisp/leim/quail/latin-pre.el @@ -361,13 +361,14 @@ Key translation rules are: "german-prefix" "German" "DE>" t "German (Deutsch) input method with prefix modifiers Key translation rules are: - \"A -> Ä -> \"O -> Ö \"U -> Ü \"s -> ß + \"A -> Ä -> \"O -> Ö \"S -> ẞ \"U -> Ü \"s -> ß " nil t nil nil nil nil nil nil nil nil t) (quail-define-rules ("\"A" ?Ä) ("\"O" ?Ö) ("\"U" ?Ü) + ("\"S" ?ẞ) ("\"a" ?ä) ("\"o" ?ö) ("\"u" ?ü) commit b9340aad7961c57fbd458d52e813b71f09aaa45f Author: Michael Albinus Date: Thu Mar 29 15:59:11 2018 +0200 Fix Bug#30946 * doc/misc/tramp.texi (Multi-hops): Mention host name checks. * lisp/net/tramp.el (tramp-set-syntax, tramp-dissect-file-name) (tramp-debug-message, tramp-handle-shell-command): * lisp/net/tramp-adb.el (tramp-adb-handle-shell-command): * lisp/net/tramp-archive.el (tramp-archive-file-name-handler) (tramp-archive-dissect-file-name): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler): Adapt callees. * lisp/net/tramp-compat.el (tramp-compat-user-error): Move defsubst --- * lisp/net/tramp-sh.el (tramp-compute-multi-hops): Check for proper host names in multi-hop. (Bug#30946) * lisp/net/tramp.el (tramp-user-error): ... here. Make it a defun. * test/lisp/net/tramp-tests.el (tramp-test03-file-name-host-rules): New test. diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index 3143904343..f0ea073ed0 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi @@ -1408,8 +1408,10 @@ Opening @file{@trampfn{sudo,randomhost.your.domain,}} first connects to @samp{randomhost.your.domain} via @code{ssh} under your account name, and then performs @code{sudo -u root} on that host. -It is key for the sudo method in the above example to be applied on -the host after reaching it and not on the local host. +It is key for the @option{sudo} method in the above example to be +applied on the host after reaching it and not on the local host. +@value{tramp} checks therefore, that the host name for such hops +matches the host name of the previous hop. @var{host}, @var{user} and @var{proxy} can also take Lisp forms. These forms when evaluated must return either a string or @code{nil}. diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el index fbf6196ca4..f8edb27c51 100644 --- a/lisp/net/tramp-adb.el +++ b/lisp/net/tramp-adb.el @@ -999,7 +999,7 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored." (when p (if (yes-or-no-p "A command is running. Kill it? ") (ignore-errors (kill-process p)) - (tramp-compat-user-error p "Shell command in progress"))) + (tramp-user-error p "Shell command in progress"))) (if current-buffer-p (progn diff --git a/lisp/net/tramp-archive.el b/lisp/net/tramp-archive.el index 0b8e8da976..448cfca2ca 100644 --- a/lisp/net/tramp-archive.el +++ b/lisp/net/tramp-archive.el @@ -311,7 +311,7 @@ pass to the OPERATION." (tramp-archive-run-real-handler operation args) ;; Now run the handler. (unless tramp-archive-enabled - (tramp-compat-user-error nil "Package `tramp-archive' not supported")) + (tramp-user-error nil "Package `tramp-archive' not supported")) (let ((tramp-methods (cons `(,tramp-archive-method) tramp-methods)) (tramp-gvfs-methods tramp-archive-all-gvfs-methods) ;; Set uid and gid. gvfsd-archive could do it, but it doesn't. @@ -398,7 +398,7 @@ hexified archive name as host, and the localname. The archive name is kept in slot `hop'" (save-match-data (unless (tramp-archive-file-name-p name) - (tramp-compat-user-error nil "Not an archive file name: \"%s\"" name)) + (tramp-user-error nil "Not an archive file name: \"%s\"" name)) (let* ((localname (tramp-archive-file-name-localname name)) (archive (file-truename (tramp-archive-file-name-archive name))) (vec (make-tramp-file-name diff --git a/lisp/net/tramp-compat.el b/lisp/net/tramp-compat.el index 4f564e6eb5..aa0c99bf9c 100644 --- a/lisp/net/tramp-compat.el +++ b/lisp/net/tramp-compat.el @@ -97,13 +97,6 @@ Add the extension of F, if existing." process-name)))) (setq result t))))))))) -;; `user-error' has appeared in Emacs 24.3. -(defsubst tramp-compat-user-error (vec-or-proc format &rest args) - "Signal a pilot error." - (apply - 'tramp-error vec-or-proc - (if (fboundp 'user-error) 'user-error 'error) format args)) - ;; `default-toplevel-value' has been declared in Emacs 24.4. (unless (fboundp 'default-toplevel-value) (defalias 'default-toplevel-value 'symbol-value)) diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el index d0385f3ba2..33af124458 100644 --- a/lisp/net/tramp-gvfs.el +++ b/lisp/net/tramp-gvfs.el @@ -751,7 +751,7 @@ Operations not mentioned here will be handled by the default Emacs primitives.") First arg specifies the OPERATION, second arg is a list of arguments to pass to the OPERATION." (unless tramp-gvfs-enabled - (tramp-compat-user-error nil "Package `tramp-gvfs' not supported")) + (tramp-user-error nil "Package `tramp-gvfs' not supported")) (let ((fn (assoc operation tramp-gvfs-file-name-handler-alist))) (if fn (save-match-data (apply (cdr fn) args)) diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 4cdc39e0b6..63275448ef 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -327,7 +327,6 @@ The string is used in `tramp-methods'.") (add-to-list 'tramp-methods `("plink" (tramp-login-program "plink") - ;; ("%h") must be a single element, see `tramp-compute-multi-hops'. (tramp-login-args (("-l" "%u") ("-P" "%p") ("-ssh") ("-t") ("%h") ("\"") (,(format @@ -4636,25 +4635,24 @@ Goes through the list `tramp-inline-compress-commands'." "Method `%s' is not supported for multi-hops." (tramp-file-name-method item))))) - ;; In case the host name is not used for the remote shell - ;; command, the user could be misguided by applying a random - ;; host name. - (let* ((v (car target-alist)) - (method (tramp-file-name-method v)) - (host (tramp-file-name-host v))) - (unless - (or - ;; There are multi-hops. - (cdr target-alist) - ;; The host name is used for the remote shell command. - (member '("%h") (tramp-get-method-parameter v 'tramp-login-args)) - ;; The host is local. We cannot use `tramp-local-host-p' - ;; here, because it opens a connection as well. - (string-match tramp-local-host-regexp host)) - (tramp-error - v 'file-error - "Host `%s' looks like a remote host, `%s' can only use the local host" - host method))) + ;; Some methods ("su", "sg", "sudo", "doas", "ksu") do not use the + ;; host name in their command template. In this case, the remote + ;; file name must use either a local host name (first hop), or a + ;; host name matching the previous hop. + (let ((previous-host tramp-local-host-regexp)) + (setq choices target-alist) + (while (setq item (pop choices)) + (let ((host (tramp-file-name-host item))) + (unless + (or + ;; The host name is used for the remote shell command. + (member + '("%h") (tramp-get-method-parameter item 'tramp-login-args)) + ;; The host name must match previous hop. + (string-match previous-host host)) + (tramp-user-error + item "Host name `%s' does not match `%s'" host previous-host)) + (setq previous-host (concat "^" (regexp-quote host) "$"))))) ;; Result. target-alist)) diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 4497802d77..43b5e77428 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -689,7 +689,7 @@ Used in user option `tramp-syntax'. There are further variables to be set, depending on VALUE." ;; Check allowed values. (unless (memq value (tramp-syntax-values)) - (tramp-compat-user-error "Wrong `tramp-syntax' %s" tramp-syntax)) + (tramp-user-error "Wrong `tramp-syntax' %s" tramp-syntax)) ;; Cleanup existing buffers. (unless (eq (symbol-value symbol) value) (tramp-cleanup-all-buffers)) @@ -1348,7 +1348,7 @@ to their default values. For the other file name parts, no default values are used." (save-match-data (unless (tramp-tramp-file-p name) - (tramp-compat-user-error nil "Not a Tramp file name: \"%s\"" name)) + (tramp-user-error nil "Not a Tramp file name: \"%s\"" name)) (if (not (string-match (nth 0 tramp-file-name-structure) name)) (error "`tramp-file-name-structure' didn't match!") (let ((method (match-string (nth 1 tramp-file-name-structure) name)) @@ -1608,12 +1608,12 @@ ARGUMENTS to actually emit the message (if applicable)." (regexp-opt '("tramp-backtrace" "tramp-compat-funcall" - "tramp-compat-user-error" "tramp-condition-case-unless-debug" "tramp-debug-message" "tramp-error" "tramp-error-with-buffer" - "tramp-message") + "tramp-message" + "tramp-user-error") t) "$") fn))) @@ -1753,6 +1753,31 @@ an input event arrives. The other arguments are passed to `tramp-error'." (when (tramp-file-name-equal-p vec (car tramp-current-connection)) (setcdr tramp-current-connection (current-time))))))) +;; We must make it a defun, because it is used earlier already. +(defun tramp-user-error (vec-or-proc fmt-string &rest arguments) + "Signal a pilot error." + (unwind-protect + (apply + 'tramp-error vec-or-proc + ;; `user-error' has appeared in Emacs 24.3. + (if (fboundp 'user-error) 'user-error 'error) fmt-string arguments) + ;; Save exit. + (when (and tramp-message-show-message + (not (zerop tramp-verbose)) + ;; Do not show when flagged from outside. + (not (tramp-completion-mode-p)) + ;; Show only when Emacs has started already. + (current-message)) + (let ((enable-recursive-minibuffers t)) + ;; `tramp-error' does not show messages. So we must do it ourselves. + (apply 'message fmt-string arguments) + (discard-input) + (sit-for 30) + ;; Reset timestamp. It would be wrong after waiting for a while. + (when + (tramp-file-name-equal-p vec-or-proc (car tramp-current-connection)) + (setcdr tramp-current-connection (current-time))))))) + (defmacro tramp-with-demoted-errors (vec-or-proc format &rest body) "Execute BODY while redirecting the error message to `tramp-message'. BODY is executed like wrapped by `with-demoted-errors'. FORMAT @@ -3503,7 +3528,7 @@ support symbolic links." (when p (if (yes-or-no-p "A command is running. Kill it? ") (ignore-errors (kill-process p)) - (tramp-compat-user-error p "Shell command in progress"))) + (tramp-user-error p "Shell command in progress"))) (if current-buffer-p (progn diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index dfb01126f7..5e79a4bce6 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el @@ -1722,6 +1722,28 @@ handled properly. BODY shall not contain a timeout." ;; Default values in tramp-smb.el. (should (string-equal (file-remote-p "/smb::" 'user) nil))) +;; The following test is inspired by Bug#30946. +(ert-deftest tramp-test03-file-name-host-rules () + "Check host name rules for host-less methods." + (skip-unless (tramp--test-enabled)) + (skip-unless (tramp--test-sh-p)) + + ;; Host names must match rules in case the command template of a + ;; method doesn't use them. + (dolist (m '("su" "sg" "sudo" "doas" "ksu")) + ;; Single hop. The host name must match `tramp-local-host-regexp'. + (should-error + (find-file (format "/%s:foo:" m)) + :type 'user-error) + ;; Multi hop. The host name must match the previous hop. + (should-error + (find-file + (format + "%s|%s:foo:" + (substring (file-remote-p tramp-test-temporary-file-directory) nil -1) + m)) + :type 'user-error))) + (ert-deftest tramp-test04-substitute-in-file-name () "Check `substitute-in-file-name'." (should (string-equal (substitute-in-file-name "/method:host:///foo") "/foo")) @@ -1836,6 +1858,7 @@ handled properly. BODY shall not contain a timeout." ;; Mark as failed until bug has been fixed. :expected-result :failed (skip-unless (tramp--test-enabled)) + ;; These are the methods the test doesn't fail. (when (or (tramp--test-adb-p) (tramp--test-gvfs-p) (tramp-smb-file-name-p tramp-test-temporary-file-directory)) commit 9ad3560db6b67777bc8f9b370e053b6a19a7501f Author: Stefan Monnier Date: Thu Mar 29 09:11:22 2018 -0400 * src/keyboard.c (record_char, read_key_sequence): Copy raw events diff --git a/src/keyboard.c b/src/keyboard.c index 044e3fac69..c0c863f0d3 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -3258,7 +3258,10 @@ record_char (Lisp_Object c) if (!recorded) { total_keys += total_keys < NUM_RECENT_KEYS; - ASET (recent_keys, recent_keys_index, c); + ASET (recent_keys, recent_keys_index, + /* Copy the event, in case it gets modified by side-effect + by some remapping function (bug#30955). */ + CONSP (c) ? Fcopy_sequence (c) : c); if (++recent_keys_index >= NUM_RECENT_KEYS) recent_keys_index = 0; } @@ -9296,7 +9299,10 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt, } GROW_RAW_KEYBUF; - ASET (raw_keybuf, raw_keybuf_count, key); + ASET (raw_keybuf, raw_keybuf_count, + /* Copy the event, in case it gets modified by side-effect + by some remapping function (bug#30955). */ + CONSP (key) ? Fcopy_sequence (key) : key); raw_keybuf_count++; } @@ -9343,9 +9349,6 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt, && BUFFERP (XWINDOW (window)->contents) && XBUFFER (XWINDOW (window)->contents) != current_buffer) { - GROW_RAW_KEYBUF; - ASET (raw_keybuf, raw_keybuf_count, key); - raw_keybuf_count++; keybuf[t] = key; mock_input = t + 1; commit 9ea56457f5a4bbc7551636023c4cd1cede590bc3 Author: Paul Eggert Date: Wed Mar 28 16:32:46 2018 -0700 Test notify handlers only if file notification * test/lisp/files-tests.el: (files-file-name-non-special-notify-handlers): Skip if file notification is not available. diff --git a/test/lisp/files-tests.el b/test/lisp/files-tests.el index d07df02877..1e6cd5eaba 100644 --- a/test/lisp/files-tests.el +++ b/test/lisp/files-tests.el @@ -553,6 +553,7 @@ be invoked with the right arguments." (should-not (file-newer-than-file-p nospecial nospecial)))) (ert-deftest files-file-name-non-special-notify-handlers () + (skip-unless file-notify--library) (files-tests--with-temp-non-special (tmpfile nospecial) (let ((watch (file-notify-add-watch nospecial '(change) #'ignore))) (should (file-notify-valid-p watch)) commit fde99c729c46c775dbdfe5bebf857c67138ae7f0 Author: Paul Eggert Date: Wed Mar 28 15:03:40 2018 -0700 Port recent org-clock fix to POSIX time_t * lisp/org/org-clock.el (org-clock-special-range): Don't assume support for time_t values less than 0, or less than -2**31 for that matter (Bug#27736). diff --git a/lisp/org/org-clock.el b/lisp/org/org-clock.el index ff32e28d1e..9be0d5bc1f 100644 --- a/lisp/org/org-clock.el +++ b/lisp/org/org-clock.el @@ -2239,8 +2239,18 @@ have priority." (let* ((start (pcase key (`interactive (org-read-date nil t nil "Range start? ")) ;; In theory, all clocks started after the dawn of - ;; humanity. - (`untilnow (encode-time 0 0 0 0 0 -50000)) + ;; humanity. However, the platform's clock + ;; support might not go back that far. Choose the + ;; POSIX timestamp -2**41 (approximately 68,000 + ;; BCE) if that works, otherwise -2**31 (1901) if + ;; that works, otherwise 0 (1970). Going back + ;; billions of years would loop forever on Mac OS + ;; X 10.6 with Emacs 26 and earlier (Bug#27736). + (`untilnow + (let ((old 0)) + (dolist (older '((-32768 0) (-33554432 0)) old) + (when (ignore-errors (decode-time older)) + (setq old older))))) (_ (encode-time 0 m h d month y)))) (end (pcase key (`interactive (org-read-date nil t nil "Range end? ")) commit e9bfd114a5e38842dd57929cc1afd1b3082a4c15 Author: Paul Eggert Date: Wed Mar 28 13:14:07 2018 -0700 Update from Gnulib This incorporates: 2018-03-28 time_rz: fix workaround for Mac OS X 10.6 infloop * m4/time_rz.m4: Copy from Gnulib. diff --git a/m4/time_rz.m4 b/m4/time_rz.m4 index af9fa02b57..5555706259 100644 --- a/m4/time_rz.m4 +++ b/m4/time_rz.m4 @@ -13,8 +13,8 @@ AC_DEFUN([gl_TIME_RZ], AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) AC_REQUIRE([AC_STRUCT_TIMEZONE]) - # Mac OS X 10.6 loops forever with some time_t values less - # than -67768038400665599. See Bug#27706, Bug#27736, and + # Mac OS X 10.6 loops forever with some time_t values. + # See Bug#27706, Bug#27736, and # https://lists.gnu.org/r/bug-gnulib/2017-07/msg00142.html AC_CACHE_CHECK([whether localtime loops forever near extrema], [gl_cv_func_localtime_infloop_bug], @@ -26,7 +26,7 @@ AC_DEFUN([gl_TIME_RZ], #include #include ]], [[ - time_t t = -67768038400665600; + time_t t = -67768038400666600; struct tm *tm; char *tz = getenv ("TZ"); if (! (tz && strcmp (tz, "QQQ0") == 0)) @@ -36,7 +36,8 @@ AC_DEFUN([gl_TIME_RZ], /* Use TM and *TM to suppress over-optimization. */ return tm && tm->tm_isdst; ]])], - [TZ=QQQ0 ./conftest$EXEEXT || gl_cv_func_localtime_infloop_bug=yes], + [(TZ=QQQ0 ./conftest$EXEEXT) >/dev/null 2>&1 || + gl_cv_func_localtime_infloop_bug=yes], [], [gl_cv_func_localtime_infloop_bug="guessing no"])]) if test "$gl_cv_func_localtime_infloop_bug" = yes; then commit b61b3c804cb7c1348097ccef18d26fa4bdd37117 Author: Alan Mackenzie Date: Wed Mar 28 19:39:30 2018 +0000 Handle C++17's constexpr keyword in if statements * lisp/progmodes/cc-engine.el (c-after-conditional): Test for matches to c-block-stmt-hangon-key. * lisp/progmodes/cc-langs.el (c-block-stmt-hangon-kwds): New lang const. (c-block-stmt-hangon-key): New lang const/var matching any element of the above. diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index 05926c48b0..26ce2c919e 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -9847,9 +9847,15 @@ comment at the start of cc-engine.el for more info." ;; This function might do hidden buffer changes. (save-excursion (and (zerop (c-backward-token-2 1 t lim)) + (if (looking-at c-block-stmt-hangon-key) + (zerop (c-backward-token-2 1 t lim)) + t) (or (looking-at c-block-stmt-1-key) (and (eq (char-after) ?\() (zerop (c-backward-token-2 1 t lim)) + (if (looking-at c-block-stmt-hangon-key) + (zerop (c-backward-token-2 1 t lim)) + t) (or (looking-at c-block-stmt-2-key) (looking-at c-block-stmt-1-2-key)))) (point)))) diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el index 98cfd2073d..8fa253f304 100644 --- a/lisp/progmodes/cc-langs.el +++ b/lisp/progmodes/cc-langs.el @@ -2587,6 +2587,17 @@ Keywords here should also be in `c-block-stmt-1-kwds'." (c-lang-const c-block-stmt-2-kwds)) :test 'string-equal)) +(c-lang-defconst c-block-stmt-hangon-kwds + "Keywords which may directly follow a member of `c-block-stmt-1/2-kwds'." + t nil + c++ '("constexpr")) + +(c-lang-defconst c-block-stmt-hangon-key + ;; Regexp matching a "hangon" keyword in a `c-block-stmt-1/2-kwds' + ;; construct. + t (c-make-keywords-re t (c-lang-const c-block-stmt-hangon-kwds))) +(c-lang-defvar c-block-stmt-hangon-key (c-lang-const c-block-stmt-hangon-key)) + (c-lang-defconst c-opt-block-stmt-key ;; Regexp matching the start of any statement that has a ;; substatement (except a bare block). Nil in languages that commit ff49d86b6419f88205ff9a5d8b1cc46fcda8371c Author: Glenn Morris Date: Wed Mar 28 15:00:58 2018 -0400 * doc/emacs/misc.texi (Amusements): Avoid non-printing character. ; Hey fellow kids, remember that gag from 2008? Emacs does. diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi index 28ff8a0adb..12ebfbf26a 100644 --- a/doc/emacs/misc.texi +++ b/doc/emacs/misc.texi @@ -3011,7 +3011,7 @@ is idle. @findex butterfly @cindex butterfly - Real Programmers™ deploy @kbd{M-x butterfly}, which uses butterflies + ``Real Programmers'' deploy @kbd{M-x butterfly}, which uses butterflies to flip a bit on the drive platter, see @uref{https://xkcd.com/378}. @findex doctor commit 3ccbe1f43f8c73b5dbf7051b91cd850959f2a79f Author: Alan Mackenzie Date: Wed Mar 28 18:53:32 2018 +0000 Replace faulty non-matching regexp "\\<\\>" with "a\\`" The regexp "\\<\\>", which is supposed never to match, actually matches, for instance, where a Chinese character is directly followed by an ASCII letter. So, replace it with "a\\`". * lisp/progmodes/cc-defs.el (cc-fix, c-make-keywords-re) * lisp/progmodes/cc-engine.el (c-beginning-of-statement-1) (c-forward-<>-arglist-recur, c-forward-decl-or-cast-1) (c-looking-at-decl-block) * lisp/progmodes/cc-langs.el (c-assignment-op-regexp) (c-block-comment-ender-regexp, c-block-comment-start-regexp) (c-line-comment-start-regexp, c-doc-comment-start-regexp) (c-decl-start-colon-kwd-re, c-type-decl-prefix-key) (c-type-decl-operator-prefix-key, c-pre-id-bracelist-key) (c-enum-clause-introduction-re, c-nonlabel-token-2-key) * lisp/progmodes/cc-vars.el (c-noise-macro-with-parens-name-re) (c-make-noise-macro-regexps): Replace "\\<\\>" by "a\\`". diff --git a/lisp/progmodes/cc-defs.el b/lisp/progmodes/cc-defs.el index 613e2b303d..ad9425a509 100644 --- a/lisp/progmodes/cc-defs.el +++ b/lisp/progmodes/cc-defs.el @@ -81,7 +81,7 @@ (progn (require 'font-lock) (let (font-lock-keywords) - (font-lock-compile-keywords '("\\<\\>")) + (font-lock-compile-keywords '("a\\`")) font-lock-keywords)))) @@ -1777,8 +1777,8 @@ when it's needed. The default is the current language taken from ;; Produce a regexp that matches nothing. (if adorn - "\\(\\<\\>\\)" - "\\<\\>"))) + "\\(a\\`\\)" + "a\\`"))) (put 'c-make-keywords-re 'lisp-indent-function 1) diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index 2290c9cbdd..05926c48b0 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -870,7 +870,7 @@ comment at the start of cc-engine.el for more info." stack ;; Regexp which matches "for", "if", etc. (cond-key (or c-opt-block-stmt-key - "\\<\\>")) ; Matches nothing. + "a\\`")) ; Matches nothing. ;; Return value. (ret 'same) ;; Positions of the last three sexps or bounds we've stopped at. @@ -7147,7 +7147,7 @@ comment at the start of cc-engine.el for more info." (progn (c-forward-syntactic-ws) (when (or (and c-record-type-identifiers all-types) - (not (equal c-inside-<>-type-key "\\(\\<\\>\\)"))) + (not (equal c-inside-<>-type-key "\\(a\\`\\)"))) (c-forward-syntactic-ws) (cond ((eq (char-after) ??) @@ -8557,7 +8557,7 @@ comment at the start of cc-engine.el for more info." ;; Skip over type decl prefix operators. (Note similar code in ;; `c-forward-declarator'.) (if (and c-recognize-typeless-decls - (equal c-type-decl-prefix-key "\\<\\>")) + (equal c-type-decl-prefix-key "a\\`")) (when (eq (char-after) ?\() (progn (setq paren-depth (1+ paren-depth)) @@ -10183,7 +10183,7 @@ comment at the start of cc-engine.el for more info." ;; legal because it's part of a "compound keyword" like ;; "enum class". Of course, if c-after-brace-list-key ;; is nil, we can skip the test. - (or (equal c-after-brace-list-key "\\<\\>") + (or (equal c-after-brace-list-key "a\\`") (save-match-data (save-excursion (not diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el index 9913c6feb2..98cfd2073d 100644 --- a/lisp/progmodes/cc-langs.el +++ b/lisp/progmodes/cc-langs.el @@ -1280,7 +1280,7 @@ operators." (c--set-difference (c-lang-const c-assignment-operators) '("=") :test 'string-equal))) - "\\<\\>")) + "a\\`")) (c-lang-defvar c-assignment-op-regexp (c-lang-const c-assignment-op-regexp)) @@ -1503,7 +1503,7 @@ properly." ;; language) t (if (c-lang-const c-block-comment-ender) (regexp-quote (c-lang-const c-block-comment-ender)) - "\\<\\>")) + "a\\`")) (c-lang-defvar c-block-comment-ender-regexp (c-lang-const c-block-comment-ender-regexp)) @@ -1522,7 +1522,7 @@ properly." ;; language) t (if (c-lang-const c-block-comment-starter) (regexp-quote (c-lang-const c-block-comment-starter)) - "\\<\\>")) + "a\\`")) (c-lang-defvar c-block-comment-start-regexp (c-lang-const c-block-comment-start-regexp)) @@ -1531,7 +1531,7 @@ properly." ;; language; it does in all 7 CC Mode languages). t (if (c-lang-const c-line-comment-starter) (regexp-quote (c-lang-const c-line-comment-starter)) - "\\<\\>")) + "a\\`")) (c-lang-defvar c-line-comment-start-regexp (c-lang-const c-line-comment-start-regexp)) @@ -1546,7 +1546,7 @@ properly." (c-lang-defconst c-doc-comment-start-regexp "Regexp to match the start of documentation comments." - t "\\<\\>" + t "a\\`" ;; From font-lock.el: `doxygen' uses /*! while others use /**. (c c++ objc) "/\\*[*!]" java "/\\*\\*" @@ -2990,7 +2990,7 @@ Note that Java specific rules are currently applied to tell this from "Regexp matching a keyword that is followed by a colon, where the whole construct can precede a declaration. E.g. \"public:\" in C++." - t "\\<\\>" + t "a\\`" c++ (c-make-keywords-re t (c-lang-const c-protection-kwds))) (c-lang-defvar c-decl-start-colon-kwd-re (c-lang-const c-decl-start-colon-kwd-re)) @@ -3171,7 +3171,7 @@ Identifier syntax is in effect when this is matched \(see t (if (c-lang-const c-type-modifier-kwds) (concat (regexp-opt (c-lang-const c-type-modifier-kwds) t) "\\>") ;; Default to a regexp that never matches. - "\\<\\>") + "a\\`") ;; Check that there's no "=" afterwards to avoid matching tokens ;; like "*=". (c objc) (concat "\\(" @@ -3209,7 +3209,7 @@ that might precede the identifier in a declaration, e.g. the as the end of the operator. Identifier syntax is in effect when this is matched \(see `c-identifier-syntax-table')." t ;; Default to a regexp that never matches. - "\\<\\>" + "a\\`" ;; Check that there's no "=" afterwards to avoid matching tokens ;; like "*=". (c objc) (concat "\\(\\*\\)" @@ -3368,7 +3368,7 @@ list." (c-lang-defconst c-pre-id-bracelist-key "A regexp matching tokens which, preceding an identifier, signify a bracelist. " - t "\\<\\>" + t "a\\`" c++ "new\\([^[:alnum:]_$]\\|$\\)\\|&&?\\(\\S.\\|$\\)") (c-lang-defvar c-pre-id-bracelist-key (c-lang-const c-pre-id-bracelist-key)) @@ -3424,7 +3424,7 @@ the invalidity of the putative template construct." ;; before the '{' of the enum list, to avoid searching too far. "[^][{};/#=]*" "{") - "\\<\\>")) + "a\\`")) (c-lang-defvar c-enum-clause-introduction-re (c-lang-const c-enum-clause-introduction-re)) @@ -3540,7 +3540,7 @@ i.e. before \":\". Only used if `c-recognize-colon-labels' is set." "Regexp matching things that can't occur two symbols before a colon in a label construct. This catches C++'s inheritance construct \"class foo : bar\". Only used if `c-recognize-colon-labels' is set." - t "\\<\\>" ; matches nothing + t "a\\`" ; matches nothing c++ (c-make-keywords-re t '("class"))) (c-lang-defvar c-nonlabel-token-2-key (c-lang-const c-nonlabel-token-2-key)) diff --git a/lisp/progmodes/cc-vars.el b/lisp/progmodes/cc-vars.el index ecf034846b..fcb1cac099 100644 --- a/lisp/progmodes/cc-vars.el +++ b/lisp/progmodes/cc-vars.el @@ -1647,8 +1647,8 @@ white space either before or after the operator, but not both." :type 'boolean :group 'c) -(defvar c-noise-macro-with-parens-name-re "\\<\\>") -(defvar c-noise-macro-name-re "\\<\\>") +(defvar c-noise-macro-with-parens-name-re "a\\`") +(defvar c-noise-macro-name-re "a\\`") (defcustom c-noise-macro-names nil "A list of names of macros which expand to nothing, or compiler extensions @@ -1677,7 +1677,7 @@ These are recognized by CC Mode only in declarations." ;; Convert `c-noise-macro-names' and `c-noise-macro-with-parens-names' into ;; `c-noise-macro-name-re' and `c-noise-macro-with-parens-name-re'. (setq c-noise-macro-with-parens-name-re - (cond ((null c-noise-macro-with-parens-names) "\\<\\>") + (cond ((null c-noise-macro-with-parens-names) "a\\`") ((consp c-noise-macro-with-parens-names) (concat (regexp-opt c-noise-macro-with-parens-names t) "\\([^[:alnum:]_$]\\|$\\)")) @@ -1686,7 +1686,7 @@ These are recognized by CC Mode only in declarations." (t (error "c-make-noise-macro-regexps: \ c-noise-macro-with-parens-names is invalid: %s" c-noise-macro-with-parens-names)))) (setq c-noise-macro-name-re - (cond ((null c-noise-macro-names) "\\<\\>") + (cond ((null c-noise-macro-names) "a\\`") ((consp c-noise-macro-names) (concat (regexp-opt c-noise-macro-names t) "\\([^[:alnum:]_$]\\|$\\)")) commit 5bab671521774ba646ab3dff642e7c33fdf98864 Author: Glenn Morris Date: Wed Mar 28 14:20:57 2018 -0400 Fix xrefs in pdf Emacs manual * doc/emacs/fortran-xtra.texi (ForIndent Cont, ForIndent Num) (Fortran Columns): * doc/emacs/picture-xtra.texi (Rectangles in Picture): Fix recent changes that neglected the splitting of the pdf manuals. diff --git a/doc/emacs/fortran-xtra.texi b/doc/emacs/fortran-xtra.texi index 859c613243..fa5a3e6eaf 100644 --- a/doc/emacs/fortran-xtra.texi +++ b/doc/emacs/fortran-xtra.texi @@ -208,7 +208,13 @@ line is a continuation of the previous line. We call this @dfn{fixed form}. (In GNU Emacs we always count columns from 0; but note that the Fortran standard counts from 1. You can customize the variable @code{column-number-indicator-zero-based} to make the column display -Fortran-like; @pxref{Optional Mode Line}.) The variable +@iftex +Fortran-like; @pxref{Optional Mode Line,,, emacs, the Emacs Manual}.) +@end iftex +@ifnottex +Fortran-like; @pxref{Optional Mode Line}.) +@end ifnottex +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 @@ -254,7 +260,13 @@ column 8 must consist of one tab character. indentation assumes it is a line number and moves it to columns 0 through 4. (Columns always count from 0 in Emacs, but setting @code{column-number-indicator-zero-based} to @code{nil} can change -that, @pxref{Optional Mode Line}.) +that, +@iftex +@pxref{Optional Mode Line,,, emacs, the Emacs Manual}.) +@end iftex +@ifnottex +@pxref{Optional Mode Line}.) +@end ifnottex @vindex fortran-line-number-indent Line numbers of four digits or less are normally indented one space. @@ -535,7 +547,13 @@ statement body. Column numbers appear above them. Note that the column numbers count from zero, as always in GNU Emacs (but customizing @code{column-number-indicator-zero-based} can change -column display to match that of Fortran; @pxref{Optional Mode Line}). +column display to match that of Fortran; +@iftex +@pxref{Optional Mode Line,,, emacs, the Emacs Manual}.) +@end iftex +@ifnottex +@pxref{Optional Mode Line}.) +@end ifnottex As a result, the numbers may be one less than those you are familiar with; but the positions they indicate in the line are standard for Fortran. diff --git a/doc/emacs/picture-xtra.texi b/doc/emacs/picture-xtra.texi index 288a6e89aa..9ebc78ec62 100644 --- a/doc/emacs/picture-xtra.texi +++ b/doc/emacs/picture-xtra.texi @@ -262,7 +262,14 @@ Clear out the region-rectangle with spaces text. @item C-c C-w @var{r} Similar, but save rectangle contents in register @var{r} first -(@code{picture-clear-rectangle-to-register}). @xref{Registers}. +(@code{picture-clear-rectangle-to-register}). +@iftex +@xref{Registers,,, emacs, the Emacs Manual}. +@end iftex +@ifnottex +@xref{Registers}. +@end ifnottex + @item C-c C-y Copy last killed rectangle into the buffer by overwriting, with upper left corner at point (@code{picture-yank-rectangle}). With argument, commit c77d9ea0e70e68be4742ed9962058a14f5391f6b Author: Michael Albinus Date: Wed Mar 28 19:06:42 2018 +0200 Remove unstable tags in Tramp * test/lisp/net/tramp-tests.el (tramp-test39-utf8) (tramp-test39-utf8-with-stat, tramp-test39-utf8-with-perl) (tramp-test39-utf8-with-ls): Remove :unstable tag. diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index b69a933db4..dfb01126f7 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el @@ -4658,7 +4658,6 @@ Use the `ls' command." (ert-deftest tramp-test39-utf8 () "Check UTF8 encoding in file names and file contents." - :tags '(:unstable) (skip-unless (tramp--test-enabled)) (skip-unless (not (tramp--test-docker-p))) (skip-unless (not (tramp--test-rsync-p))) @@ -4671,7 +4670,7 @@ Use the `ls' command." (ert-deftest tramp-test39-utf8-with-stat () "Check UTF8 encoding in file names and file contents. Use the `stat' command." - :tags '(:expensive-test :unstable) + :tags '(:expensive-test) (skip-unless (tramp--test-enabled)) (skip-unless (tramp--test-sh-p)) (skip-unless (not (tramp--test-docker-p))) @@ -4691,7 +4690,7 @@ Use the `stat' command." (ert-deftest tramp-test39-utf8-with-perl () "Check UTF8 encoding in file names and file contents. Use the `perl' command." - :tags '(:expensive-test :unstable) + :tags '(:expensive-test) (skip-unless (tramp--test-enabled)) (skip-unless (tramp--test-sh-p)) (skip-unless (not (tramp--test-docker-p))) @@ -4714,7 +4713,7 @@ Use the `perl' command." (ert-deftest tramp-test39-utf8-with-ls () "Check UTF8 encoding in file names and file contents. Use the `ls' command." - :tags '(:expensive-test :unstable) + :tags '(:expensive-test) (skip-unless (tramp--test-enabled)) (skip-unless (tramp--test-sh-p)) (skip-unless (not (tramp--test-docker-p))) commit 7d8234c0cb9daac31ae2f660f503a3ede7324549 Merge: e6bb547353 9bff405d09 Author: Glenn Morris Date: Wed Mar 28 09:38:22 2018 -0700 Merge from origin/emacs-26 9bff405 (origin/emacs-26) * doc/misc/org.texi (Installation): Fix clo... 613c9a5 Update Org to v9.1.9 1b075a9 ; Fix some tiny doc typos 441fe20 De-obsolete `if-let' and `when-let' 8696038 * lisp/htmlfontify.el (hfy-begin-span-handler): Doc fix. 930f7b1 * doc/lispref/functions.texi (Defining Functions): Improve in... 95ccf50 Fix crash after frame is freed on macOS (bug#30800) 45d0475 More manual editing 2acb9f0 Minor manual changes changes d481cba * lisp/calculator.el (calculator-paste-decimals): Add version. 7d6c7d0 ; Use GNU not Gnu in docs 1bc4def More proofreading of the Emacs manual Conflicts: doc/misc/org.texi etc/NEWS lisp/org/org-clock.el commit e6bb547353915b376b663fda32f88d1bf8f24d1f Author: Michael Albinus Date: Wed Mar 28 18:05:58 2018 +0200 Improve tramp--test-utf8 * test/lisp/net/tramp-tests.el (tramp--test-check-files): Encode string when testing environment variables. (tramp--test-utf8): Remove "TaiViet" test. diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index 5851840d00..b69a933db4 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el @@ -4484,6 +4484,7 @@ This requires restrictions of file name syntax." (when (and (tramp--test-expensive-test) (tramp--test-sh-p)) (dolist (elt files) (let ((envvar (concat "VAR_" (upcase (md5 elt)))) + (elt (encode-coding-string elt coding-system-for-read)) (default-directory tramp-test-temporary-file-directory) (process-environment process-environment)) (setenv envvar elt) @@ -4643,7 +4644,8 @@ Use the `ls' command." (setq x (eval (cdr (assoc 'sample-text x)))) (unless (or (null x) (unencodable-char-position - nil nil file-name-coding-system nil x)) + nil nil file-name-coding-system nil x) + (string-match "TaiViet" x)) (replace-regexp-in-string "[\n/]" "" x))) language-info-alist)) commit 4b3f1a95567127ee39a7a3e4704bb1faa34b5282 Author: Phillip Lord Date: Wed Mar 28 09:40:55 2018 +0100 Reduce parallelism to Windows build * admin/nt/dist-build/build-zips.sh: Reduce make parallelism to 2. diff --git a/admin/nt/dist-build/build-zips.sh b/admin/nt/dist-build/build-zips.sh index dc6f9dd2ca..ec41ec8c46 100755 --- a/admin/nt/dist-build/build-zips.sh +++ b/admin/nt/dist-build/build-zips.sh @@ -61,7 +61,7 @@ function build_zip { CFLAGS="-O2 -static -g3" fi - make -j 8 install \ + make -j 2 install \ prefix=$HOME/emacs-build/install/emacs-$VERSION/$ARCH cd $HOME/emacs-build/install/emacs-$VERSION/$ARCH cp $HOME/emacs-build/deps/libXpm/$ARCH/libXpm-noX4.dll bin commit 9bff405d09f6eeeb577e6e0111e49f35d3b95b52 Author: Michael Albinus Date: Wed Mar 28 10:38:26 2018 +0200 * doc/misc/org.texi (Installation): Fix clone commands. diff --git a/doc/misc/org.texi b/doc/misc/org.texi index 7583e2b88a..cf1c03772e 100644 --- a/doc/misc/org.texi +++ b/doc/misc/org.texi @@ -924,6 +924,7 @@ You can clone Org's repository and install Org like this: @example $ cd ~/src/ $ git clone https://code.orgmode.org/bzg/org-mode.git +$ cd org-mode/ $ make autoloads @end example commit 613c9a5c1f3237fbdc3a3db2341c7c59353d2aa2 Author: Rasmus Date: Tue Mar 27 23:34:41 2018 +0200 Update Org to v9.1.9 Please note this is a bugfix release. See etc/ORG-NEWS for details. diff --git a/doc/misc/org.texi b/doc/misc/org.texi index 216f43eb32..7583e2b88a 100644 --- a/doc/misc/org.texi +++ b/doc/misc/org.texi @@ -4,11 +4,11 @@ @settitle The Org Manual @include docstyle.texi -@set VERSION 9.1.6 -@set DATE 2018-01-03 +@set VERSION 9.1.9 +@set DATE 2018-03-22 @c Version and Contact Info -@set MAINTAINERSITE @uref{http://orgmode.org,maintainers web page} +@set MAINTAINERSITE @uref{https://orgmode.org,maintainers web page} @set AUTHOR Carsten Dominik @set MAINTAINER Carsten Dominik @set MAINTAINEREMAIL @email{carsten at orgmode dot org} @@ -856,7 +856,7 @@ platform. There is a website for Org which provides links to the newest version of Org, as well as additional information, frequently asked questions (FAQ), links to tutorials, etc. This page is located at -@uref{http://orgmode.org}. +@uref{https://orgmode.org}. @cindex print edition An earlier version (7.3) of this manual is available as a @@ -894,11 +894,11 @@ Otherwise autoload Org functions will mess up the installation. Then, to make sure your Org configuration is taken into account, initialize the package system with @code{(package-initialize)} in your Emacs init file before setting any Org option. If you want to use Org's package repository, -check out the @uref{http://orgmode.org/elpa.html, Org ELPA page}. +check out the @uref{https://orgmode.org/elpa.html, Org ELPA page}. @subsubheading Downloading Org as an archive -You can download Org latest release from @uref{http://orgmode.org/, Org's +You can download Org latest release from @uref{https://orgmode.org/, Org's website}. In this case, make sure you set the load-path correctly in your Emacs init file: @@ -923,7 +923,7 @@ You can clone Org's repository and install Org like this: @example $ cd ~/src/ -$ git clone git://orgmode.org/org-mode.git +$ git clone https://code.orgmode.org/bzg/org-mode.git $ make autoloads @end example @@ -939,7 +939,7 @@ install Org with @code{make install}. Please run @code{make help} to get the list of compilation/installation options. For more detailed explanations on Org's build system, please check the Org -Build System page on @uref{http://orgmode.org/worg/dev/org-build-system.html, +Build System page on @uref{https://orgmode.org/worg/dev/org-build-system.html, Worg}. @node Activation @@ -952,7 +952,7 @@ Worg}. @findex org-agenda @findex org-capture @findex org-store-link -@findex org-iswitchb +@findex org-switchb Org mode buffers need font-lock to be turned on: this is the default in Emacs@footnote{If you don't use font-lock globally, turn it on in Org buffer @@ -962,7 +962,7 @@ There are compatibility issues between Org mode and some other Elisp packages, please take the time to check the list (@pxref{Conflicts}). The four Org commands @command{org-store-link}, @command{org-capture}, -@command{org-agenda}, and @command{org-iswitchb} should be accessible through +@command{org-agenda}, and @command{org-switchb} should be accessible through global keys (i.e., anywhere in Emacs, not just in Org buffers). Here are suggested bindings for these keys, please modify the keys to your own liking. @@ -970,7 +970,7 @@ liking. (global-set-key "\C-cl" 'org-store-link) (global-set-key "\C-ca" 'org-agenda) (global-set-key "\C-cc" 'org-capture) -(global-set-key "\C-cb" 'org-iswitchb) +(global-set-key "\C-cb" 'org-switchb) @end lisp @cindex Org mode, turning on @@ -1902,7 +1902,7 @@ marker in square brackets, inside text. Markers always start with @example The Org homepage[fn:1] now looks a lot better than it used to. ... -[fn:1] The link is: http://orgmode.org +[fn:1] The link is: https://orgmode.org @end example Org mode extends the number-based syntax to @emph{named} footnotes and @@ -2032,7 +2032,7 @@ prefix is set, but folding/unfolding will work correctly. @cindex Org syntax A reference document providing a formal description of Org's syntax is -available as @uref{http://orgmode.org/worg/dev/org-syntax.html, a draft on +available as @uref{https://orgmode.org/worg/dev/org-syntax.html, a draft on Worg}, written and maintained by Nicolas Goaziou. It defines Org's core internal concepts such as @code{headlines}, @code{sections}, @code{affiliated keywords}, @code{(greater) elements} and @code{objects}. Each part of an Org @@ -2280,17 +2280,6 @@ format used by Orgtbl radio tables, see @ref{Translator functions}, for a detailed description. @end table -If you don't like the automatic table editor because it gets in your -way on lines which you would like to start with @samp{|}, you can turn -it off with - -@lisp -(setq org-enable-table-editor nil) -@end lisp - -@noindent Then the only table command that still works is -@kbd{C-c C-c} to do a manual re-align. - @node Column width and alignment @section Column width and alignment @cindex narrow columns in tables @@ -2950,7 +2939,7 @@ element of @code{R-LIST}. These three functions can be used to implement associative arrays, count matching cells, rank results, group data etc. For practical examples -see @uref{http://orgmode.org/worg/org-tutorials/org-lookups.html, this +see @uref{https://orgmode.org/worg/org-tutorials/org-lookups.html, this tutorial on Worg}. @node Editing and debugging formulas @@ -3284,7 +3273,7 @@ Further control over the labels, type, content, and appearance of plots can be exercised through the @code{#+PLOT:} lines preceding a table. See below for a complete list of Org-plot options. The @code{#+PLOT:} lines are optional. For more information and examples see the Org-plot tutorial at -@uref{http://orgmode.org/worg/org-tutorials/org-plot.html}. +@uref{https://orgmode.org/worg/org-tutorials/org-plot.html}. @subsubheading Plot Options @@ -5835,7 +5824,7 @@ An alternative way to capture and process property values into a table is provided by Eric Schulte's @file{org-collector.el} which is a contributed package@footnote{Contributed packages are not part of Emacs, but are distributed with the main distribution of Org (visit -@uref{http://orgmode.org}).}. It provides a general API to collect +@uref{https://orgmode.org}).}. It provides a general API to collect properties from entries in a certain scope, and arbitrary Lisp expressions to process these values before inserting them into a table or a dynamic block. @@ -7062,6 +7051,7 @@ through the customize interface. @table @kbd @orgkey{C-c c C} +@vindex org-capture-templates Customize the variable @code{org-capture-templates}. @end table @@ -7657,13 +7647,13 @@ The variable @code{org-protocol-project-alist} maps URLs to local file names, by stripping URL parameters from the end and replacing the @code{:base-url} with @code{:working-directory} and @code{:online-suffix} with @code{:working-suffix}. For example, assuming you own a local copy of -@url{http://orgmode.org/worg/} contents at @file{/home/user/worg}, you can +@url{https://orgmode.org/worg/} contents at @file{/home/user/worg}, you can set @code{org-protocol-project-alist} to the following @lisp (setq org-protocol-project-alist '(("Worg" - :base-url "http://orgmode.org/worg/" + :base-url "https://orgmode.org/worg/" :working-directory "/home/user/worg/" :online-suffix ".html" :working-suffix ".org"))) @@ -7671,7 +7661,7 @@ set @code{org-protocol-project-alist} to the following @noindent If you are now browsing -@url{http://orgmode.org/worg/org-contrib/org-protocol.html} and find a typo +@url{https://orgmode.org/worg/org-contrib/org-protocol.html} and find a typo or have an idea about how to enhance the documentation, simply click the bookmark and start editing. @@ -8024,7 +8014,7 @@ Remove current file from the list of agenda files. @orgcmd{C-',org-cycle-agenda-files} @itemx C-, Cycle through agenda file list, visiting one file after the other. -@item M-x org-iswitchb @key{RET} +@item M-x org-switchb @key{RET} Command to use an @code{iswitchb}-like interface to switch to and between Org buffers. @end table @@ -9984,7 +9974,7 @@ To turn off fontification for marked up text, you can set available markup syntax, you can customize @code{org-emphasis-alist}. To fine tune what characters are allowed before and after the markup characters, you can tweak @code{org-emphasis-regexp-components}. Beware that changing one of -the above variables will no take effect until you reload Org, for which you +the above variables will not take effect until you reload Org, for which you may need to restart Emacs. @node Horizontal rules @@ -11779,7 +11769,7 @@ to @code{} or @code{} tags. This example shows changing the link's @cindex @code{#+ATTR_HTML} @example #+ATTR_HTML: :title The Org mode homepage :style color:red; -[[http://orgmode.org]] +[[https://orgmode.org]] @end example @node Tables in HTML export @@ -12054,9 +12044,9 @@ program enhances large files in two different ways of viewing. One is an navigation can be done with the @kbd{n} and @kbd{p} keys (and some other keys as well, press @kbd{?} for an overview of the available keys). The second one has a @emph{folding} view, much like Org provides inside Emacs. The -script is available at @url{http://orgmode.org/org-info.js} and the -documentation at @url{http://orgmode.org/worg/code/org-info-js/}. The script -is hosted on @url{http://orgmode.org}, but for reliability, prefer installing +script is available at @url{https://orgmode.org/org-info.js} and the +documentation at @url{https://orgmode.org/worg/code/org-info-js/}. The script +is hosted on @url{https://orgmode.org}, but for reliability, prefer installing it on your own web server. To use this program, just add this line to the Org file: @@ -12073,7 +12063,7 @@ below: @example path: @r{The path to the script. The default grabs the script from} - @r{@url{http://orgmode.org/org-info.js}, but you might want to have} + @r{@url{https://orgmode.org/org-info.js}, but you might want to have} @r{a local copy and use a path like @samp{../scripts/org-info.js}.} view: @r{Initial view when the website is first shown. Possible values are:} info @r{Info-like interface with one section per page.} @@ -12993,10 +12983,10 @@ of these examples works: @subsubheading Embedding clickable images For clickable images, provide a link whose description is another link to an image file. For example, to embed an image @file{org-mode-unicorn.png} which -when clicked jumps to @uref{http://Orgmode.org} website, do the following +when clicked jumps to @uref{https://orgmode.org} website, do the following @example -[[http://orgmode.org][./org-mode-unicorn.png]] +[[https://orgmode.org][./org-mode-unicorn.png]] @end example @subsubheading Sizing and scaling of embedded images @@ -15512,7 +15502,7 @@ For more examples of header arguments for @code{#+CALL:} lines, The ``Library of Babel'' is a collection of code blocks. Like a function library, these code blocks can be called from other Org files. A collection of useful code blocks is available on -@uref{http://orgmode.org/worg/library-of-babel.html,Worg}. For remote code +@uref{https://orgmode.org/worg/library-of-babel.html,Worg}. For remote code block evaluation syntax, @pxref{Evaluating code blocks}. @kindex C-c C-v i @@ -15554,7 +15544,7 @@ Org supports the following languages for the @samp{src} code blocks: @end multitable Additional documentation for some languages are at -@uref{http://orgmode.org/worg/org-contrib/babel/languages.html}. +@uref{https://orgmode.org/worg/org-contrib/babel/languages.html}. @vindex org-babel-load-languages By default, only @code{emacs-lisp} is enabled for evaluation. To enable or @@ -15642,7 +15632,7 @@ Org expand @code{:noweb} references by default. Each language can have separate default header arguments by customizing the variable @code{org-babel-default-header-args:}, where @code{} is the name of the language. For details, see the language-specific online -documentation at @uref{http://orgmode.org/worg/org-contrib/babel}. +documentation at @uref{https://orgmode.org/worg/org-contrib/babel/}. @node Header arguments in Org mode properties @subsubheading Header arguments in Org mode properties @@ -18225,7 +18215,7 @@ Org. Org has a large number of hook variables for adding functionality. This appendix illustrates using a few. A complete list of hooks with documentation is maintained by the Worg project at -@uref{http://orgmode.org/worg/doc.html#hooks}. +@uref{https://orgmode.org/worg/doc.html#hooks}. @node Add-on packages @section Add-on packages @@ -18234,10 +18224,10 @@ documentation is maintained by the Worg project at Various authors wrote a large number of add-on packages for Org. These packages are not part of Emacs, but they are distributed as contributed -packages with the separate release available at @uref{http://orgmode.org}. +packages with the separate release available at @uref{https://orgmode.org}. See the @file{contrib/README} file in the source code directory for a list of contributed files. Worg page with more information is at: -@uref{http://orgmode.org/worg/org-contrib/}. +@uref{https://orgmode.org/worg/org-contrib/}. @node Adding hyperlink types @section Adding hyperlink types @@ -18358,7 +18348,7 @@ to an alist of export functions. This alist replaces the parent back-end functions. For complete documentation, see -@url{http://orgmode.org/worg/dev/org-export-reference.html, the Org Export +@url{https://orgmode.org/worg/dev/org-export-reference.html, the Org Export Reference on Worg}. @node Context-sensitive commands @@ -18869,7 +18859,7 @@ Disable tag inheritance for agendas: These options can be applied to selected agenda views. For more details about generation of agenda views, see the docstrings for the relevant -variables, and this @uref{http://orgmode.org/worg/agenda-optimization.html, +variables, and this @uref{https://orgmode.org/worg/agenda-optimization.html, dedicated Worg page} for agenda optimization. @node Extracting agenda information @@ -19213,7 +19203,7 @@ For a server to host files, consider options like @uref{http://dropbox.com,Dropbox.com} account@footnote{An alternative is to use webdav server. MobileOrg documentation has details of webdav server configuration. Additional help is at -@uref{http://orgmode.org/worg/org-faq.html#mobileorg_webdav, FAQ entry}.}. +@uref{https://orgmode.org/worg/org-faq.html#mobileorg_webdav, FAQ entry}.}. On first connection, MobileOrg creates a directory @file{MobileOrg/} on Dropbox. Pass its location to Emacs through an init file variable as follows: diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS index b9f3b0cdbe..013c7b1399 100644 --- a/etc/ORG-NEWS +++ b/etc/ORG-NEWS @@ -1,7 +1,7 @@ ORG NEWS -- history of user-visible changes. -*- mode: org; coding: utf-8 -*- -#+LINK: doc http://orgmode.org/worg/doc.html#%s -#+LINK: git http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=%s +#+LINK: doc https://orgmode.org/worg/doc.html#%s +#+LINK: git https://code.orgmode.org/bzg/org-mode/commit/%s Copyright (C) 2012-2018 Free Software Foundation, Inc. See the end of the file for license conditions. @@ -211,8 +211,8 @@ this ~:prologue "fpprintprec: 2; linel: 50;"~ for presenting Maxima results in a beamer presentation. **** PlantUML: add support for header arguments -[[http://plantuml.com/][Plantuml]] source blocks now support the [[http://orgmode.org/manual/prologue.html#prologue][~:prologue~]], [[http://orgmode.org/manual/epilogue.html#epilogue][~:epilogue~]] and -[[http://orgmode.org/manual/var.html#var][~:var~]] header arguments. +[[http://plantuml.com/][Plantuml]] source blocks now support the [[https://orgmode.org/manual/prologue.html#prologue][~:prologue~]], [[https://orgmode.org/manual/epilogue.html#epilogue][~:epilogue~]] and +[[https://orgmode.org/manual/var.html#var][~:var~]] header arguments. **** SQL: new engine added ~sqsh~ @@ -266,7 +266,7 @@ using ~:namespaces~: - ~:flags~ passes arguments to the compiler - ~:cmdline~ passes commandline arguments to the generated executable -Support for [[http://orgmode.org/manual/var.html#var][~:var~]] does not exist yet, also there is no [[http://orgmode.org/manual/session.html#session][~:session~]] +Support for [[https://orgmode.org/manual/var.html#var][~:var~]] does not exist yet, also there is no [[https://orgmode.org/manual/session.html#session][~:session~]] support because Vala is a compiled language. The Vala compiler binary can be changed via the ~defcustom~ @@ -436,9 +436,9 @@ Call ~org-agenda-set-restriction-lock~ from the agenda. The library-of-babel.org used to be accessible from the =doc/= directory, distributed with Org’s core. It is now accessible -from the Worg community-driven documentation [[http://orgmode.org/worg/library-of-babel.html][here]]. +from the Worg community-driven documentation [[https://orgmode.org/worg/library-of-babel.html][here]]. -If you want to contribute to it, please see [[http://orgmode.org/worg/org-contribute.html][how to contribute]]. +If you want to contribute to it, please see [[https://orgmode.org/worg/org-contribute.html][how to contribute]]. *** Allow multiple columns view @@ -798,7 +798,7 @@ Evaluating a Stan block can produce two different results. that does not end in ".stan". For more information and usage examples, visit -http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-stan.html +https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-stan.html **** Support for Oracle databases via ~sqlplus~ @@ -1966,7 +1966,7 @@ This allows to specify the names of automatic bookmarks. *** New option [[doc:org-agenda-ignore-drawer-properties][org-agenda-ignore-drawer-properties]] This allows more flexibility when optimizing the agenda generation. -See http://orgmode.org/worg/agenda-optimization.html for details. +See https://orgmode.org/worg/agenda-optimization.html for details. *** New option: [[doc:org-html-link-use-abs-url][org-html-link-use-abs-url]] to force using absolute URLs This is an export/publishing option, and should be used either within @@ -2050,7 +2050,7 @@ instructions: When in doubt, run =M-x org-version RET= and see if you have a mixed-up installation. -See http://orgmode.org/org.html#Installation for details. +See https://orgmode.org/org.html#Installation for details. ** Incompatible changes @@ -2063,7 +2063,7 @@ you will have to update them. Below is a list of changes for which you need to take action. -See http://orgmode.org/worg/org-8.0.html for the most recent version of +See https://orgmode.org/worg/org-8.0.html for the most recent version of this list and for detailed instructions on how to migrate. **** New export engine @@ -2085,7 +2085,7 @@ corresponding files start with the =ox-= prefix. If you customized an export back-end (like HTML or LaTeX), you will need to rename some options so that your customization is not lost. Typically, an option starting with =org-export-html-= is now named =org-html-=. See the -manual for details and check [[http://orgmode.org/worg/org-8.0.html][this Worg page]] for directions. +manual for details and check [[https://orgmode.org/worg/org-8.0.html][this Worg page]] for directions. **** New syntax for #+ATTR_HTML/LaTeX/... options @@ -2146,7 +2146,7 @@ manual for details and check [[http://orgmode.org/worg/org-8.0.html][this Worg p ~ox-taskjuggler.el~ by Nicolas Goaziou and others. Also, the Taskjuggler exporter now uses TJ3 by default. John Hendy - wrote [[http://orgmode.org/worg/org-tutorials/org-taskjuggler3.html][a tutorial on Worg]] for the TJ3 export. + wrote [[https://orgmode.org/worg/org-tutorials/org-taskjuggler3.html][a tutorial on Worg]] for the TJ3 export. ** New packages in core @@ -2192,7 +2192,7 @@ manual for details and check [[http://orgmode.org/worg/org-8.0.html][this Worg p Display bullets instead of stars for headlines. - Also see [[http://orgmode.org/worg/org-faq.html#sec-8-12][this updated FAQ]] on how to display another character than "*" + Also see [[https://orgmode.org/worg/org-faq.html#sec-8-12][this updated FAQ]] on how to display another character than "*" for starting headlines. *** ~org-favtable.el~ by Marc-Oliver Ihm @@ -2200,7 +2200,7 @@ manual for details and check [[http://orgmode.org/worg/org-8.0.html][this Worg p ~org-favtable.el~ helps you to create and update a table of favorite locations in org, keeping the most frequently visited lines right at the top. This table is called "favtable". See the documentation on - [[http://orgmode.org/worg/org-contrib/org-favtable.html][Worg]]. + [[https://orgmode.org/worg/org-contrib/org-favtable.html][Worg]]. *** ~ox-confluence.el~ by Sébastien Delafond @@ -2241,7 +2241,7 @@ manual for details and check [[http://orgmode.org/worg/org-8.0.html][this Worg p **** New export generic options -If you use Org exporter, we advise you to re-read [[http://orgmode.org/org.html#Exporting][the manual section about +If you use Org exporter, we advise you to re-read [[https://orgmode.org/org.html#Exporting][the manual section about it]]. It has been updated and includes new options. Among the new/updated export options, three are of particular importance: @@ -2616,7 +2616,7 @@ of those tags.) You can use group tags for sparse tree in an Org buffer, for creating agenda views, and for filtering. -See http://orgmode.org/org.html#Tag-groups for details. +See https://orgmode.org/org.html#Tag-groups for details. *** Links @@ -2624,7 +2624,7 @@ See http://orgmode.org/org.html#Tag-groups for details. Org knows how to store links from Org buffers, from info files and from other Emacs buffers. Org can be taught how to store links from any buffer -through new link protocols (see [[http://orgmode.org/org.html#Adding-hyperlink-types]["Adding hyperlink types"]] in the manual.) +through new link protocols (see [[https://orgmode.org/org.html#Adding-hyperlink-types]["Adding hyperlink types"]] in the manual.) Sometimes you want Org to ignore added link protocols and store the link as if the protocol was not known. @@ -2648,7 +2648,7 @@ with-description and without-description links when inserting them. When storing a link to a headline like -: * See [[http://orgmode.org][Org website]] +: * See [[https://orgmode.org][Org website]] [[doc:org-store-link][org-store-link]] used to convert the square brackets into curly brackets. It does not anymore, taking the link description or the link path, when @@ -2664,7 +2664,7 @@ those other formulas. **** You now use "nan" for empty fields in Calc formulas If empty fields are of interest, it is recommended to reread the section -[[http://orgmode.org/org.html#Formula-syntax-for-Calc][3.5.2 Formula syntax for Calc]] of the manual because the description for the +[[https://orgmode.org/org.html#Formula-syntax-for-Calc][3.5.2 Formula syntax for Calc]] of the manual because the description for the mode strings has been clarified and new examples have been added towards the end. @@ -2683,7 +2683,7 @@ There are now three lookup functions: - [[doc:org-loopup-last][org-loopup-last]] - [[doc:org-loopup-all][org-loopup-all]] -See [[http://orgmode.org/org.html#Lookup-functions][the manual]] for details. +See [[https://orgmode.org/org.html#Lookup-functions][the manual]] for details. *** Startup keywords These new startup keywords are now available: @@ -2814,7 +2814,7 @@ instead of requiring each Babel library one by one. David (and others) translated the Org compact guide in spanish: -You can read the [[http://orgmode.org/worg/orgguide/orgguide.es.pdf][PDF guide]]. +You can read the [[https://orgmode.org/worg/orgguide/orgguide.es.pdf][PDF guide]]. *** ~poporg.el~ and ~outorg.el~ @@ -2825,7 +2825,7 @@ Org-mode available. ~outorg.el~ comes together with ~outshine.el~ and ~navi-mode.el~, two more libraries by Thorsten Jolitz with the goal to give source-code buffers the /look & feel/ of Org-mode buffers while greatly improving navigation and structure editing. A detailed description can be -found here: http://orgmode.org/worg/org-tutorials/org-outside-org.html +found here: https://orgmode.org/worg/org-tutorials/org-outside-org.html Here are two screencasts demonstrating Thorsten's tools: @@ -2894,7 +2894,7 @@ in most environments. You can now add the Org ELPA repository like this: #+BEGIN_SRC emacs-lisp -(add-to-list 'package-archives '("org" . "http://orgmode.org/elpa/") t) +(add-to-list 'package-archives '("org" . "https://orgmode.org/elpa/") t) #+END_SRC It contains both the =org-*.tar= package (the core Org distribution, also @@ -2902,7 +2902,7 @@ available through https://elpa.gnu.org) and the =org-plus*.tar= package (the extended Org distribution, with non-GNU packages from the =contrib/= directory.) -See http://orgmode.org/elpa/ +See https://orgmode.org/elpa/ ** Overview of the new keybindings @@ -3085,7 +3085,7 @@ See http://orgmode.org/elpa/ **** New =todo-unblocked= and =nottodo-unblocked= skip conditions - See the [[http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=f426da][git commit]] for more explanations. + See the [[https://orgmode.org/cgit.cgi/org-mode.git/commit/?id=f426da][git commit]] for more explanations. **** Allow category filtering in the agenda @@ -3402,7 +3402,7 @@ See http://orgmode.org/elpa/ Thanks to Carsten for implementing this. **** ODT: Add support for ODT export in org-bbdb.el -**** ODT: Add support for indented tables (see [[http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=e9fd33][this commit]] for details) +**** ODT: Add support for indented tables (see [[https://orgmode.org/cgit.cgi/org-mode.git/commit/?id=e9fd33][this commit]] for details) **** ODT: Improve the conversion from ODT to other formats **** ASCII: Swap the level-1/level-2 characters to underline the headlines **** Support for Chinese, simplified Chinese, Russian, Ukrainian and Japanese @@ -3535,7 +3535,7 @@ that Calc formulas can operate on them. *** Emacs 21 support has been dropped - Do not use Org mode 7.xx with Emacs 21, use [[http://orgmode.org/org-6.36c.zip][version 6.36c]] instead. + Do not use Org mode 7.xx with Emacs 21, use [[https://orgmode.org/org-6.36c.zip][version 6.36c]] instead. *** XEmacs support requires the XEmacs development version @@ -3685,7 +3685,7 @@ that Calc formulas can operate on them. 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]]. + section [[https://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 @@ -3749,7 +3749,7 @@ that Calc formulas can operate on them. **** org-taskjuggler.el (Christian Egli) 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. + He also wrote a [[https://orgmode.org/worg/org-tutorials/org-taskjuggler.php][tutorial]] for it. **** org-ctags.el (Paul Sexton) @@ -3969,7 +3969,7 @@ that Calc formulas can operate on them. 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 + support to make richer presentations as well. See the [[https://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 diff --git a/etc/org/README b/etc/org/README index 048f84cdcc..7c175e3424 100644 --- a/etc/org/README +++ b/etc/org/README @@ -21,7 +21,7 @@ along with GNU Emacs. If not, see . Author: Jambunathan K Keywords: outlines, hypermedia, calendar, wp -Homepage: http://orgmode.org +Homepage: https://orgmode.org Commentary: diff --git a/etc/refcards/orgcard.tex b/etc/refcards/orgcard.tex index 1affe54852..91cc03f1f1 100644 --- a/etc/refcards/orgcard.tex +++ b/etc/refcards/orgcard.tex @@ -1,5 +1,5 @@ % Reference Card for Org Mode -\def\orgversionnumber{9.1.6} +\def\orgversionnumber{9.1.9} \def\versionyear{2018} % latest update \input emacsver.tex diff --git a/lisp/org/ob-C.el b/lisp/org/ob-C.el index 092354e9ca..ff5be34967 100644 --- a/lisp/org/ob-C.el +++ b/lisp/org/ob-C.el @@ -5,7 +5,7 @@ ;; Author: Eric Schulte ;; Thierry Banel ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. diff --git a/lisp/org/ob-J.el b/lisp/org/ob-J.el index 4aec293afc..87812213ee 100644 --- a/lisp/org/ob-J.el +++ b/lisp/org/ob-J.el @@ -4,7 +4,7 @@ ;; Author: Oleh Krehel ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. diff --git a/lisp/org/ob-R.el b/lisp/org/ob-R.el index 84bb89f6e0..d7e936eba0 100644 --- a/lisp/org/ob-R.el +++ b/lisp/org/ob-R.el @@ -5,7 +5,7 @@ ;; Author: Eric Schulte ;; Dan Davison ;; Keywords: literate programming, reproducible research, R, statistics -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. diff --git a/lisp/org/ob-asymptote.el b/lisp/org/ob-asymptote.el index 211eab7f29..84e2364809 100644 --- a/lisp/org/ob-asymptote.el +++ b/lisp/org/ob-asymptote.el @@ -4,7 +4,7 @@ ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. diff --git a/lisp/org/ob-awk.el b/lisp/org/ob-awk.el index 474111f263..1ee4552eb0 100644 --- a/lisp/org/ob-awk.el +++ b/lisp/org/ob-awk.el @@ -4,7 +4,7 @@ ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. diff --git a/lisp/org/ob-calc.el b/lisp/org/ob-calc.el index 4ed5dd4be0..387cba210a 100644 --- a/lisp/org/ob-calc.el +++ b/lisp/org/ob-calc.el @@ -4,7 +4,7 @@ ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. diff --git a/lisp/org/ob-clojure.el b/lisp/org/ob-clojure.el index 852fe08b93..890f60ada8 100644 --- a/lisp/org/ob-clojure.el +++ b/lisp/org/ob-clojure.el @@ -5,7 +5,7 @@ ;; Author: Joel Boehland, Eric Schulte, Oleh Krehel, Frederick Giasson ;; ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. diff --git a/lisp/org/ob-comint.el b/lisp/org/ob-comint.el index 32449753a6..e9c6f937b1 100644 --- a/lisp/org/ob-comint.el +++ b/lisp/org/ob-comint.el @@ -4,7 +4,7 @@ ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research, comint -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. diff --git a/lisp/org/ob-coq.el b/lisp/org/ob-coq.el index a52044e8ae..875c794b19 100644 --- a/lisp/org/ob-coq.el +++ b/lisp/org/ob-coq.el @@ -4,7 +4,7 @@ ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. diff --git a/lisp/org/ob-core.el b/lisp/org/ob-core.el index 0e2e78a671..5d5faaa6fd 100644 --- a/lisp/org/ob-core.el +++ b/lisp/org/ob-core.el @@ -5,7 +5,7 @@ ;; Authors: Eric Schulte ;; Dan Davison ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. @@ -980,13 +980,24 @@ with a prefix argument then this is passed on to (defmacro org-babel-do-in-edit-buffer (&rest body) "Evaluate BODY in edit buffer if there is a code block at point. Return t if a code block was found at point, nil otherwise." - `(let ((org-src-window-setup 'switch-invisibly)) - (when (and (org-babel-where-is-src-block-head) + (declare (debug (body))) + `(let* ((element (org-element-at-point)) + ;; This function is not supposed to move point. However, + ;; `org-edit-src-code' always moves point back into the + ;; source block. It is problematic if the point was before + ;; the code, e.g., on block's opening line. In this case, + ;; we want to restore this location after executing BODY. + (outside-position + (and (<= (line-beginning-position) + (org-element-property :post-affiliated element)) + (point-marker))) + (org-src-window-setup 'switch-invisibly)) + (when (and (org-babel-where-is-src-block-head element) (org-edit-src-code)) (unwind-protect (progn ,@body) - (org-edit-src-exit)) + (org-edit-src-exit) + (when outside-position (goto-char outside-position))) t))) -(def-edebug-spec org-babel-do-in-edit-buffer (body)) (defun org-babel-do-key-sequence-in-edit-buffer (key) "Read key sequence and execute the command in edit buffer. diff --git a/lisp/org/ob-css.el b/lisp/org/ob-css.el index 8c0b8d75a0..8cabf2bc78 100644 --- a/lisp/org/ob-css.el +++ b/lisp/org/ob-css.el @@ -4,7 +4,7 @@ ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. diff --git a/lisp/org/ob-ditaa.el b/lisp/org/ob-ditaa.el index 82cc89d022..9507630ba2 100644 --- a/lisp/org/ob-ditaa.el +++ b/lisp/org/ob-ditaa.el @@ -4,7 +4,7 @@ ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. diff --git a/lisp/org/ob-dot.el b/lisp/org/ob-dot.el index e72dd3cada..31e0a4f325 100644 --- a/lisp/org/ob-dot.el +++ b/lisp/org/ob-dot.el @@ -4,7 +4,7 @@ ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. diff --git a/lisp/org/ob-ebnf.el b/lisp/org/ob-ebnf.el index 4e96b21176..8c7c5415e6 100644 --- a/lisp/org/ob-ebnf.el +++ b/lisp/org/ob-ebnf.el @@ -4,7 +4,7 @@ ;; Author: Michael Gauland ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; Version: 1.00 ;; This file is part of GNU Emacs. diff --git a/lisp/org/ob-emacs-lisp.el b/lisp/org/ob-emacs-lisp.el index 2dc350629d..8ea2ec127a 100644 --- a/lisp/org/ob-emacs-lisp.el +++ b/lisp/org/ob-emacs-lisp.el @@ -4,7 +4,7 @@ ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. diff --git a/lisp/org/ob-eval.el b/lisp/org/ob-eval.el index 44972f9563..2bfaa08a60 100644 --- a/lisp/org/ob-eval.el +++ b/lisp/org/ob-eval.el @@ -4,7 +4,7 @@ ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research, comint -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. diff --git a/lisp/org/ob-exp.el b/lisp/org/ob-exp.el index d2c32fac81..264dc0ed06 100644 --- a/lisp/org/ob-exp.el +++ b/lisp/org/ob-exp.el @@ -5,7 +5,7 @@ ;; Authors: Eric Schulte ;; Dan Davison ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. diff --git a/lisp/org/ob-forth.el b/lisp/org/ob-forth.el index ed14b1873d..efd5759358 100644 --- a/lisp/org/ob-forth.el +++ b/lisp/org/ob-forth.el @@ -4,7 +4,7 @@ ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research, forth -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. diff --git a/lisp/org/ob-fortran.el b/lisp/org/ob-fortran.el index dad7eda0c7..49e960ff92 100644 --- a/lisp/org/ob-fortran.el +++ b/lisp/org/ob-fortran.el @@ -5,7 +5,7 @@ ;; Authors: Sergey Litvinov ;; Eric Schulte ;; Keywords: literate programming, reproducible research, fortran -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org/ob-gnuplot.el b/lisp/org/ob-gnuplot.el index 674627b8fa..b2f491331e 100644 --- a/lisp/org/ob-gnuplot.el +++ b/lisp/org/ob-gnuplot.el @@ -4,7 +4,7 @@ ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. diff --git a/lisp/org/ob-groovy.el b/lisp/org/ob-groovy.el index 4e10ecd6b1..565b09754b 100644 --- a/lisp/org/ob-groovy.el +++ b/lisp/org/ob-groovy.el @@ -4,7 +4,7 @@ ;; Author: Miro Bezjak ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. @@ -84,12 +84,12 @@ in BODY as elisp." (when session (error "Sessions are not (yet) supported for Groovy")) (pcase result-type (`output - (let ((src-file (org-babel-temp-file "groovy-"))) + (let ((src-file (org-babel-temp-file "groovy_"))) (progn (with-temp-file src-file (insert body)) (org-babel-eval (concat org-babel-groovy-command " " src-file) "")))) (`value - (let* ((src-file (org-babel-temp-file "groovy-")) + (let* ((src-file (org-babel-temp-file "groovy_")) (wrapper (format org-babel-groovy-wrapper-method body))) (with-temp-file src-file (insert wrapper)) (let ((raw (org-babel-eval diff --git a/lisp/org/ob-haskell.el b/lisp/org/ob-haskell.el index b19ee6d70f..e607ee0c55 100644 --- a/lisp/org/ob-haskell.el +++ b/lisp/org/ob-haskell.el @@ -4,7 +4,7 @@ ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. diff --git a/lisp/org/ob-hledger.el b/lisp/org/ob-hledger.el index 7158903470..727fb1f162 100644 --- a/lisp/org/ob-hledger.el +++ b/lisp/org/ob-hledger.el @@ -4,7 +4,7 @@ ;; Author: Simon Michael ;; Keywords: literate programming, reproducible research, plain text accounting -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. diff --git a/lisp/org/ob-io.el b/lisp/org/ob-io.el index 7c7d9df25a..4f407cc52c 100644 --- a/lisp/org/ob-io.el +++ b/lisp/org/ob-io.el @@ -4,7 +4,7 @@ ;; Author: Andrzej Lichnerowicz ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. diff --git a/lisp/org/ob-java.el b/lisp/org/ob-java.el index 1f25753183..d6301bff2d 100644 --- a/lisp/org/ob-java.el +++ b/lisp/org/ob-java.el @@ -4,7 +4,7 @@ ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. diff --git a/lisp/org/ob-js.el b/lisp/org/ob-js.el index 5aa2ed791d..38c8c39ac9 100644 --- a/lisp/org/ob-js.el +++ b/lisp/org/ob-js.el @@ -4,7 +4,7 @@ ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research, js -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. diff --git a/lisp/org/ob-keys.el b/lisp/org/ob-keys.el index 3d8e865a02..fc96df4756 100644 --- a/lisp/org/ob-keys.el +++ b/lisp/org/ob-keys.el @@ -4,7 +4,7 @@ ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. diff --git a/lisp/org/ob-latex.el b/lisp/org/ob-latex.el index 4654ba5d3a..6a963e52f2 100644 --- a/lisp/org/ob-latex.el +++ b/lisp/org/ob-latex.el @@ -4,7 +4,7 @@ ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. diff --git a/lisp/org/ob-ledger.el b/lisp/org/ob-ledger.el index 84f0599a41..2a1331441a 100644 --- a/lisp/org/ob-ledger.el +++ b/lisp/org/ob-ledger.el @@ -4,7 +4,7 @@ ;; Author: Eric S Fraga ;; Keywords: literate programming, reproducible research, accounting -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. diff --git a/lisp/org/ob-lilypond.el b/lisp/org/ob-lilypond.el index b4c4b9a90e..3d3cc07f13 100644 --- a/lisp/org/ob-lilypond.el +++ b/lisp/org/ob-lilypond.el @@ -4,7 +4,7 @@ ;; Author: Martyn Jago ;; Keywords: babel language, literate programming -;; Homepage: http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-lilypond.html +;; Homepage: https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-lilypond.html ;; This file is part of GNU Emacs. @@ -24,7 +24,7 @@ ;;; Commentary: ;; Installation, ob-lilypond documentation, and examples are available at -;; http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-lilypond.html +;; https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-lilypond.html ;; ;; Lilypond documentation can be found at ;; http://lilypond.org/manuals.html diff --git a/lisp/org/ob-lisp.el b/lisp/org/ob-lisp.el index d4a7c37133..b846138f7a 100644 --- a/lisp/org/ob-lisp.el +++ b/lisp/org/ob-lisp.el @@ -6,7 +6,7 @@ ;; Eric Schulte ;; David T. O'Toole ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. diff --git a/lisp/org/ob-lob.el b/lisp/org/ob-lob.el index f103a81185..6af6bf07e8 100644 --- a/lisp/org/ob-lob.el +++ b/lisp/org/ob-lob.el @@ -5,7 +5,7 @@ ;; Authors: Eric Schulte ;; Dan Davison ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. @@ -79,44 +79,54 @@ if so then run the appropriate source block from the Library." (org-babel-execute-src-block nil info) t))) -(defun org-babel-lob--src-info (name) - "Return internal representation for Babel data named NAME. -NAME is a string. This function looks into the current document +(defun org-babel-lob--src-info (ref) + "Return internal representation for Babel data referenced as REF. +REF is a string. This function looks into the current document for a Babel call or source block. If none is found, it looks -after NAME in the Library of Babel. Eventually, if that also -fails, it returns nil." - ;; During export, look into the pristine copy of the document being - ;; exported instead of the current one, which could miss some data. - (with-current-buffer (or org-babel-exp-reference-buffer (current-buffer)) - (org-with-wide-buffer - (goto-char (point-min)) - (catch :found - (let ((case-fold-search t) - (regexp (org-babel-named-data-regexp-for-name name))) - (while (re-search-forward regexp nil t) - (let ((element (org-element-at-point))) - (when (equal name (org-element-property :name element)) - (throw :found - (pcase (org-element-type element) - (`src-block (org-babel-get-src-block-info t element)) - (`babel-call (org-babel-lob-get-info element)) - ;; Non-executable data found. Since names are - ;; supposed to be unique throughout a document, - ;; bail out. - (_ nil)))))) - ;; No element named NAME in buffer. Try Library of Babel. - (cdr (assoc-string name org-babel-library-of-babel))))))) +after REF in the Library of Babel." + (let ((name ref) + (file nil)) + ;; Extract the remote file, if specified in the reference. + (when (string-match "\\`\\(.+\\):\\(.+\\)\\'" ref) + (setq file (match-string 1 ref)) + (setq name (match-string 2 ref))) + ;; During export, look into the pristine copy of the document + ;; being exported instead of the current one, which could miss + ;; some data. + (with-current-buffer (cond (file (find-file-noselect file t)) + (org-babel-exp-reference-buffer) + (t (current-buffer))) + (org-with-point-at 1 + (catch :found + (let ((case-fold-search t) + (regexp (org-babel-named-data-regexp-for-name name))) + (while (re-search-forward regexp nil t) + (let ((element (org-element-at-point))) + (when (equal name (org-element-property :name element)) + (throw :found + (pcase (org-element-type element) + (`src-block (org-babel-get-src-block-info t element)) + (`babel-call (org-babel-lob-get-info element)) + ;; Non-executable data found. Since names + ;; are supposed to be unique throughout + ;; a document, bail out. + (_ nil)))))) + (cdr (assoc-string ref org-babel-library-of-babel)))))))) ;;;###autoload (defun org-babel-lob-get-info (&optional datum) "Return internal representation for Library of Babel function call. -Consider DATUM, when provided, or element at point. Return nil -when not on an appropriate location. Otherwise return a list -compatible with `org-babel-get-src-block-info', which see." + +Consider DATUM, when provided, or element at point otherwise. + +Return nil when not on an appropriate location. Otherwise return +a list compatible with `org-babel-get-src-block-info', which +see." (let* ((context (or datum (org-element-context))) - (type (org-element-type context))) + (type (org-element-type context)) + (reference (org-element-property :call context))) (when (memq type '(babel-call inline-babel-call)) - (pcase (org-babel-lob--src-info (org-element-property :call context)) + (pcase (org-babel-lob--src-info reference) (`(,language ,body ,header ,_ ,_ ,_ ,coderef) (let ((begin (org-element-property (if (eq type 'inline-babel-call) :begin diff --git a/lisp/org/ob-lua.el b/lisp/org/ob-lua.el index ff9aae01fa..6ae72c7e56 100644 --- a/lisp/org/ob-lua.el +++ b/lisp/org/ob-lua.el @@ -4,7 +4,7 @@ ;; Authors: Dieter Schoen ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. diff --git a/lisp/org/ob-makefile.el b/lisp/org/ob-makefile.el index 692ebb6c92..4687037829 100644 --- a/lisp/org/ob-makefile.el +++ b/lisp/org/ob-makefile.el @@ -5,7 +5,7 @@ ;; Author: Eric Schulte ;; Thomas S. Dye ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. diff --git a/lisp/org/ob-matlab.el b/lisp/org/ob-matlab.el index da2eadc477..5baac77742 100644 --- a/lisp/org/ob-matlab.el +++ b/lisp/org/ob-matlab.el @@ -4,7 +4,7 @@ ;; Author: Dan Davison ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. diff --git a/lisp/org/ob-maxima.el b/lisp/org/ob-maxima.el index fc2471761a..b42a4b8afa 100644 --- a/lisp/org/ob-maxima.el +++ b/lisp/org/ob-maxima.el @@ -5,7 +5,7 @@ ;; Author: Eric S Fraga ;; Eric Schulte ;; Keywords: literate programming, reproducible research, maxima -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. diff --git a/lisp/org/ob-mscgen.el b/lisp/org/ob-mscgen.el index 8f8c8c5dce..b2c2443c8f 100644 --- a/lisp/org/ob-mscgen.el +++ b/lisp/org/ob-mscgen.el @@ -4,7 +4,7 @@ ;; Author: Juan Pechiar ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. diff --git a/lisp/org/ob-ocaml.el b/lisp/org/ob-ocaml.el index b8212b128b..90926b5c35 100644 --- a/lisp/org/ob-ocaml.el +++ b/lisp/org/ob-ocaml.el @@ -4,7 +4,7 @@ ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. diff --git a/lisp/org/ob-octave.el b/lisp/org/ob-octave.el index 7d72905506..c7339cf992 100644 --- a/lisp/org/ob-octave.el +++ b/lisp/org/ob-octave.el @@ -4,7 +4,7 @@ ;; Author: Dan Davison ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. diff --git a/lisp/org/ob-org.el b/lisp/org/ob-org.el index 310aaec3f3..7a495faaed 100644 --- a/lisp/org/ob-org.el +++ b/lisp/org/ob-org.el @@ -4,7 +4,7 @@ ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. diff --git a/lisp/org/ob-perl.el b/lisp/org/ob-perl.el index 2b96bf9cd5..85806fd533 100644 --- a/lisp/org/ob-perl.el +++ b/lisp/org/ob-perl.el @@ -5,7 +5,7 @@ ;; Authors: Dan Davison ;; Eric Schulte ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. diff --git a/lisp/org/ob-picolisp.el b/lisp/org/ob-picolisp.el index fd129b899b..cc2c8a8dff 100644 --- a/lisp/org/ob-picolisp.el +++ b/lisp/org/ob-picolisp.el @@ -5,7 +5,7 @@ ;; Authors: Thorsten Jolitz ;; Eric Schulte ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. diff --git a/lisp/org/ob-plantuml.el b/lisp/org/ob-plantuml.el index 53ba42ec36..9a9313e7be 100644 --- a/lisp/org/ob-plantuml.el +++ b/lisp/org/ob-plantuml.el @@ -4,7 +4,7 @@ ;; Author: Zhang Weize ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. diff --git a/lisp/org/ob-processing.el b/lisp/org/ob-processing.el index 83fcadd257..1a88930277 100644 --- a/lisp/org/ob-processing.el +++ b/lisp/org/ob-processing.el @@ -4,7 +4,7 @@ ;; Author: Jarmo Hurri (adapted from ob-asymptote.el written by Eric Schulte) ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. diff --git a/lisp/org/ob-python.el b/lisp/org/ob-python.el index 951e4d2a4b..9f1234bac5 100644 --- a/lisp/org/ob-python.el +++ b/lisp/org/ob-python.el @@ -5,7 +5,7 @@ ;; Authors: Eric Schulte ;; Dan Davison ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. diff --git a/lisp/org/ob-ref.el b/lisp/org/ob-ref.el index 872f7f9815..3efa17f960 100644 --- a/lisp/org/ob-ref.el +++ b/lisp/org/ob-ref.el @@ -5,7 +5,7 @@ ;; Authors: Eric Schulte ;; Dan Davison ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. diff --git a/lisp/org/ob-ruby.el b/lisp/org/ob-ruby.el index 6daf52b012..7686ac4e80 100644 --- a/lisp/org/ob-ruby.el +++ b/lisp/org/ob-ruby.el @@ -4,7 +4,7 @@ ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. diff --git a/lisp/org/ob-sass.el b/lisp/org/ob-sass.el index 5b179a6e8c..af55d763e3 100644 --- a/lisp/org/ob-sass.el +++ b/lisp/org/ob-sass.el @@ -4,7 +4,7 @@ ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. diff --git a/lisp/org/ob-scheme.el b/lisp/org/ob-scheme.el index cc78b574d0..0efe5f3467 100644 --- a/lisp/org/ob-scheme.el +++ b/lisp/org/ob-scheme.el @@ -5,7 +5,7 @@ ;; Authors: Eric Schulte ;; Michael Gauland ;; Keywords: literate programming, reproducible research, scheme -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. diff --git a/lisp/org/ob-screen.el b/lisp/org/ob-screen.el index 4fad849d02..fb7c8e2daa 100644 --- a/lisp/org/ob-screen.el +++ b/lisp/org/ob-screen.el @@ -4,7 +4,7 @@ ;; Author: Benjamin Andresen ;; Keywords: literate programming, interactive shell -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. diff --git a/lisp/org/ob-shell.el b/lisp/org/ob-shell.el index c53dd65e66..362dfd520f 100644 --- a/lisp/org/ob-shell.el +++ b/lisp/org/ob-shell.el @@ -4,7 +4,7 @@ ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. diff --git a/lisp/org/ob-shen.el b/lisp/org/ob-shen.el index 9308e5b38b..d81e7d60df 100644 --- a/lisp/org/ob-shen.el +++ b/lisp/org/ob-shen.el @@ -4,7 +4,7 @@ ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research, shen -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. diff --git a/lisp/org/ob-sql.el b/lisp/org/ob-sql.el index 524e9b73e1..959ede3dec 100644 --- a/lisp/org/ob-sql.el +++ b/lisp/org/ob-sql.el @@ -4,7 +4,7 @@ ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. diff --git a/lisp/org/ob-sqlite.el b/lisp/org/ob-sqlite.el index 4799896f63..42528a3871 100644 --- a/lisp/org/ob-sqlite.el +++ b/lisp/org/ob-sqlite.el @@ -4,7 +4,7 @@ ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. diff --git a/lisp/org/ob-stan.el b/lisp/org/ob-stan.el index 6fa9fe5c94..ffc2681884 100644 --- a/lisp/org/ob-stan.el +++ b/lisp/org/ob-stan.el @@ -4,7 +4,7 @@ ;; Author: Kyle Meyer ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. @@ -39,7 +39,7 @@ ;; that does not end in ".stan". ;; ;; For more information and usage examples, visit -;; http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-stan.html +;; https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-stan.html ;; ;; [1] http://mc-stan.org/ diff --git a/lisp/org/ob-table.el b/lisp/org/ob-table.el index 9ee0bcc24b..f6a5c88e47 100644 --- a/lisp/org/ob-table.el +++ b/lisp/org/ob-table.el @@ -4,7 +4,7 @@ ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. diff --git a/lisp/org/ob-tangle.el b/lisp/org/ob-tangle.el index 5fa59ac4d7..48eddb73a9 100644 --- a/lisp/org/ob-tangle.el +++ b/lisp/org/ob-tangle.el @@ -4,7 +4,7 @@ ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. diff --git a/lisp/org/ob-vala.el b/lisp/org/ob-vala.el index 02b3bab5b7..96c37e3ad0 100644 --- a/lisp/org/ob-vala.el +++ b/lisp/org/ob-vala.el @@ -4,7 +4,7 @@ ;; Author: Christian Garbs ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;;; License: diff --git a/lisp/org/ob.el b/lisp/org/ob.el index a029da861b..35f65ffa82 100644 --- a/lisp/org/ob.el +++ b/lisp/org/ob.el @@ -4,7 +4,7 @@ ;; Authors: Eric Schulte ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. diff --git a/lisp/org/org-agenda.el b/lisp/org/org-agenda.el index 9aaec33070..5bbf5e34ee 100644 --- a/lisp/org/org-agenda.el +++ b/lisp/org/org-agenda.el @@ -4,7 +4,7 @@ ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; ;; This file is part of GNU Emacs. ;; @@ -1644,9 +1644,10 @@ When nil, such items are sorted as 0 minutes effort." (tags . " %i %-12:c") (search . " %i %-12:c")) "Format specifications for the prefix of items in the agenda views. -An alist with five entries, each for the different agenda types. The -keys of the sublists are `agenda', `todo', `search' and `tags'. -The values are format strings. + +An alist with one entry per agenda type. The keys of the +sublists are `agenda', `todo', `search' and `tags'. The values +are format strings. This format works similar to a printf format, with the following meaning: @@ -2075,7 +2076,10 @@ works you probably want to add it to `org-agenda-custom-commands' for good." (defvar org-agenda-follow-mode nil) (defvar org-agenda-entry-text-mode nil) (defvar org-agenda-clockreport-mode nil) -(defvar org-agenda-show-log nil) +(defvar org-agenda-show-log nil + "When non-nil, show the log in the agenda. +Do not set this directly; instead use +`org-agenda-start-with-log-mode', which see.") (defvar org-agenda-redo-command nil) (defvar org-agenda-query-string nil) (defvar org-agenda-mode-hook nil @@ -2207,9 +2211,9 @@ The following commands are available: nil t) (unless org-agenda-keep-modes (setq org-agenda-follow-mode org-agenda-start-with-follow-mode - org-agenda-entry-text-mode org-agenda-start-with-entry-text-mode)) - (setq org-agenda-show-log org-agenda-start-with-log-mode) - (setq org-agenda-clockreport-mode org-agenda-start-with-clockreport-mode) + org-agenda-entry-text-mode org-agenda-start-with-entry-text-mode + org-agenda-show-log org-agenda-start-with-log-mode + org-agenda-clockreport-mode org-agenda-start-with-clockreport-mode)) (add-to-invisibility-spec '(org-filtered)) (add-to-invisibility-spec '(org-link)) (easy-menu-change @@ -6172,7 +6176,7 @@ scheduled items with an hour specification like [h]h:mm." ;; Nullify delay when a repeater triggered already ;; and the delay is of the form --Xd. ((and (string-match-p "--[0-9]+[hdwmy]" s) - (> current schedule)) + (> schedule (org-agenda--timestamp-to-absolute s))) 0) (suppress-delay (let ((org-scheduled-delay-days suppress-delay)) @@ -8177,7 +8181,6 @@ so that the date SD will be in that range." (interactive) (org-agenda-check-type t 'agenda) (setq org-agenda-clockreport-mode (not org-agenda-clockreport-mode)) - (setq org-agenda-start-with-clockreport-mode org-agenda-clockreport-mode) (org-agenda-set-mode-name) (org-agenda-redo) (message "Clocktable mode is %s" @@ -8201,7 +8204,6 @@ log items, nothing else." nil 'clockcheck)) (special '(closed clock state)) (t (not org-agenda-show-log)))) - (setq org-agenda-start-with-log-mode org-agenda-show-log) (org-agenda-set-mode-name) (org-agenda-redo) (message "Log mode is %s" (if org-agenda-show-log "on" "off"))) @@ -9895,32 +9897,33 @@ The prefix arg is passed through to the command if possible." (org-agenda-set-tags ,tag ,(if (eq action ?+) ''on ''off)))))) - (?s - (let ((time - (and (not arg) - (org-read-date nil nil nil "(Re)Schedule to" - org-overriding-default-time)))) + ((and (or ?s ?d) c) + (let* ((schedule? (eq c ?s)) + (prompt (if schedule? "(Re)Schedule to" "(Re)Set Deadline to")) + (time + (and (not arg) + (let ((new (org-read-date + nil nil nil prompt org-overriding-default-time))) + ;; A "double plus" answer applies to every + ;; scheduled time. Do not turn it into + ;; a fixed date yet. + (if (string-match-p "\\`[ \t]*\\+\\+" + org-read-date-final-answer) + org-read-date-final-answer + new))))) ;; Make sure to not prompt for a note when bulk - ;; rescheduling as Org cannot cope with simultaneous notes. - ;; Besides, it could be annoying depending on the number of - ;; items re-scheduled. + ;; rescheduling/resetting deadline as Org cannot cope with + ;; simultaneous notes. Besides, it could be annoying + ;; depending on the number of marked items. (setq cmd - `(lambda () - (let ((org-log-reschedule (and org-log-reschedule 'time))) - (org-agenda-schedule arg ,time)))))) - (?d - (let ((time - (and (not arg) - (org-read-date nil nil nil "(Re)Set Deadline to" - org-overriding-default-time)))) - ;; Make sure to not prompt for a note when bulk - ;; rescheduling as Org cannot cope with simultaneous - ;; notes. Besides, it could be annoying depending on the - ;; number of items re-scheduled. - (setq cmd - `(lambda () - (let ((org-log-redeadline (and org-log-redeadline 'time))) - (org-agenda-deadline arg ,time)))))) + (if schedule? + `(lambda () + (let ((org-log-reschedule + (and org-log-reschedule 'time))) + (org-agenda-schedule arg ,time))) + `(lambda () + (let ((org-log-redeadline (and org-log-redeadline 'time))) + (org-agenda-deadline arg ,time))))))) (?S (unless (org-agenda-check-type nil 'agenda 'todo) diff --git a/lisp/org/org-archive.el b/lisp/org/org-archive.el index 755de7fdac..e020ec2140 100644 --- a/lisp/org/org-archive.el +++ b/lisp/org/org-archive.el @@ -4,7 +4,7 @@ ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org/org-bbdb.el b/lisp/org/org-bbdb.el index 1d39efb88c..5d36379b5e 100644 --- a/lisp/org/org-bbdb.el +++ b/lisp/org/org-bbdb.el @@ -5,7 +5,7 @@ ;; Authors: Carsten Dominik ;; Thomas Baumann ;; Keywords: outlines, hypermedia, calendar, wp -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org/org-capture.el b/lisp/org/org-capture.el index cb1741f2f9..3de386c69d 100644 --- a/lisp/org/org-capture.el +++ b/lisp/org/org-capture.el @@ -4,7 +4,7 @@ ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; ;; This file is part of GNU Emacs. ;; @@ -51,8 +51,8 @@ (require 'org) (declare-function org-at-encrypted-entry-p "org-crypt" ()) -(declare-function org-datetree-find-date-create "org-datetree" - (date &optional keep-restriction)) +(declare-function org-clock-update-mode-line "org-clock" (&optional refresh)) +(declare-function org-datetree-find-date-create "org-datetree" (date &optional keep-restriction)) (declare-function org-decrypt-entry "org-crypt" ()) (declare-function org-encrypt-entry "org-crypt" ()) (declare-function org-table-analyze "org-table" ()) @@ -541,8 +541,8 @@ not-in-buffer: command not displayed in matching buffers If you define several checks, the agenda command will be accessible if there is at least one valid check. -You can also bind a key to another agenda custom command -depending on contextual rules. +You can also bind a key to another capture template depending on +contextual rules. \\='((\"c\" \"d\" ((in-mode . \"message-mode\")))) @@ -724,21 +724,24 @@ captured item after finalizing." ;; Did we start the clock in this capture buffer? (when (and org-capture-clock-was-started - org-clock-marker (marker-buffer org-clock-marker) - (equal (marker-buffer org-clock-marker) (buffer-base-buffer)) - (> org-clock-marker (point-min)) + org-clock-marker + (eq (marker-buffer org-clock-marker) (buffer-base-buffer)) + (>= org-clock-marker (point-min)) (< org-clock-marker (point-max))) - ;; Looks like the clock we started is still running. Clock out. - (when (not org-capture-clock-keep) (let (org-log-note-clock-out) (org-clock-out))) - (when (and (not org-capture-clock-keep) - (org-capture-get :clock-resume 'local) - (markerp (org-capture-get :interrupted-clock 'local)) - (buffer-live-p (marker-buffer - (org-capture-get :interrupted-clock 'local)))) - (let ((clock-in-task (org-capture-get :interrupted-clock 'local))) - (org-with-point-at clock-in-task - (org-clock-in))) - (message "Interrupted clock has been resumed"))) + ;; Looks like the clock we started is still running. + (if org-capture-clock-keep + ;; User may have completed clocked heading from the template. + ;; Refresh clock mode line. + (org-clock-update-mode-line t) + ;; Clock out. Possibly resume interrupted clock. + (let (org-log-note-clock-out) (org-clock-out)) + (when (and (org-capture-get :clock-resume 'local) + (markerp (org-capture-get :interrupted-clock 'local)) + (buffer-live-p (marker-buffer + (org-capture-get :interrupted-clock 'local)))) + (let ((clock-in-task (org-capture-get :interrupted-clock 'local))) + (org-with-point-at clock-in-task (org-clock-in))) + (message "Interrupted clock has been resumed")))) (let ((beg (point-min)) (end (point-max)) @@ -1118,7 +1121,7 @@ may have been stored before." (setq level (org-get-valid-level (if (org-at-heading-p) (org-outline-level) 1) 1)) - (if reversed? (outline-next-heading) (org-end-of-subtree t))) + (if reversed? (outline-next-heading) (org-end-of-subtree t t))) ;; Insert as a top-level entry at the beginning of the file. (reversed? (goto-char (point-min)) diff --git a/lisp/org/org-clock.el b/lisp/org/org-clock.el index 4c5fcc64b0..ff32e28d1e 100644 --- a/lisp/org/org-clock.el +++ b/lisp/org/org-clock.el @@ -4,7 +4,7 @@ ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; ;; This file is part of GNU Emacs. ;; @@ -430,7 +430,9 @@ This applies when using `org-clock-goto'." :type 'integer) (defcustom org-clock-display-default-range 'thisyear - "Default range when displaying clocks with `org-clock-display'." + "Default range when displaying clocks with `org-clock-display'. +Valid values are: `today', `yesterday', `thisweek', `lastweek', +`thismonth', `lastmonth', `thisyear', `lastyear' and `untilnow'." :group 'org-clock :type '(choice (const today) (const yesterday) @@ -441,7 +443,8 @@ This applies when using `org-clock-goto'." (const thisyear) (const lastyear) (const untilnow) - (const :tag "Select range interactively" interactive))) + (const :tag "Select range interactively" interactive)) + :safe #'symbolp) (defvar org-clock-in-prepare-hook nil "Hook run when preparing the clock. @@ -465,38 +468,6 @@ to add an effort property.") (defvar org-clock-stored-resume-clock nil "Clock to resume, saved by `org-clock-load'") -(defconst org-clock--oldest-date - (let* ((dichotomy - (lambda (min max pred) - (if (funcall pred min) min - (cl-incf min) - (while (> (- max min) 1) - (let ((mean (+ (ash min -1) (ash max -1) (logand min max 1)))) - (if (funcall pred mean) (setq max mean) (setq min mean))))) - max)) - (high - (funcall dichotomy - most-negative-fixnum - 0 - (lambda (m) - ;; libc in macOS 10.6 hangs when decoding times - ;; around year -2**31. Limit `high' not to go - ;; any earlier than that. - (unless (and (eq system-type 'darwin) - (string-match-p - "10\\.6\\.[[:digit:]]" - (shell-command-to-string - "sw_vers -productVersion")) - (<= m -1034058203135)) - (ignore-errors (decode-time (list m 0))))))) - (low - (funcall dichotomy - most-negative-fixnum - 0 - (lambda (m) (ignore-errors (decode-time (list high m))))))) - (list high low)) - "Internal time for oldest date representable on the system.") - ;;; The clock for measuring work time. (defvar org-mode-line-string "") @@ -542,6 +513,15 @@ cannot be translated." (assoc-string language org-clock-clocktable-language-setup t)) s)) +(defun org-clock--mode-line-heading () + "Return currently clocked heading, formatted for mode line." + (cond ((functionp org-clock-heading-function) + (funcall org-clock-heading-function)) + ((org-before-first-heading-p) "???") + (t (replace-regexp-in-string + org-bracket-link-analytic-regexp "\\5" + (org-no-properties (org-get-heading t t t t)))))) + (defun org-clock-menu () (interactive) (popup-menu @@ -690,19 +670,18 @@ If not, show simply the clocked time like 01:50." (if org-clock-effort (let* ((effort-in-minutes (org-duration-to-minutes org-clock-effort)) (work-done-str - (propertize - (org-duration-from-minutes clocked-time) - 'face (if (and org-clock-task-overrun (not org-clock-task-overrun-text)) - 'org-mode-line-clock-overrun 'org-mode-line-clock))) - (effort-str (org-duration-from-minutes effort-in-minutes)) - (clockstr (propertize - (concat " [%s/" effort-str - "] (" (replace-regexp-in-string "%" "%%" org-clock-heading) ")") - 'face 'org-mode-line-clock))) - (format clockstr work-done-str)) - (propertize (concat " [" (org-duration-from-minutes clocked-time) - "]" (format " (%s)" org-clock-heading)) - 'face 'org-mode-line-clock)))) + (propertize (org-duration-from-minutes clocked-time) + 'face + (if (and org-clock-task-overrun + (not org-clock-task-overrun-text)) + 'org-mode-line-clock-overrun + 'org-mode-line-clock))) + (effort-str (org-duration-from-minutes effort-in-minutes))) + (format (propertize " [%s/%s] (%s)" 'face 'org-mode-line-clock) + work-done-str effort-str org-clock-heading)) + (format (propertize " [%s] (%s)" 'face 'org-mode-line-clock) + (org-duration-from-minutes clocked-time) + org-clock-heading)))) (defun org-clock-get-last-clock-out-time () "Get the last clock-out time for the current subtree." @@ -712,10 +691,13 @@ If not, show simply the clocked time like 01:50." ".*\\]--\\(\\[[^]]+\\]\\)") end t) (org-time-string-to-time (match-string 1)))))) -(defun org-clock-update-mode-line () +(defun org-clock-update-mode-line (&optional refresh) + "Update mode line with clock information. +When optional argument is non-nil, refresh cached heading." (if org-clock-effort (org-clock-notify-once-if-expired) (setq org-clock-task-overrun nil)) + (when refresh (setq org-clock-heading (org-clock--mode-line-heading))) (setq org-mode-line-string (propertize (let ((clock-string (org-clock-get-clock-string)) @@ -1232,7 +1214,8 @@ the default behavior." (when (equal select '(64)) ;; Set start-time to `org-clock-out-time' (let ((org-clock-continuously t)) - (org-clock-in nil org-clock-out-time))) + (org-clock-in nil org-clock-out-time) + (throw 'abort nil))) (when (equal select '(4)) (setq selected-task (org-clock-select-task "Clock-in on task: ")) @@ -1298,15 +1281,7 @@ the default behavior." org-clock-in-switch-to-state "\\>")))) (org-todo org-clock-in-switch-to-state))) - (setq org-clock-heading - (cond ((and org-clock-heading-function - (functionp org-clock-heading-function)) - (funcall org-clock-heading-function)) - ((nth 4 (org-heading-components)) - (replace-regexp-in-string - "\\[\\[.*?\\]\\[\\(.*?\\)\\]\\]" "\\1" - (match-string-no-properties 4))) - (t "???"))) + (setq org-clock-heading (org-clock--mode-line-heading)) (org-clock-find-position org-clock-in-resume) (cond ((and org-clock-in-resume @@ -1442,7 +1417,7 @@ in particular CLOCK_MODELINE_TOTAL and the corresponding variable `org-clock-mode-line-total' and then decides which time to use. The time is always returned as UTC." - (let ((cmt (or (org-entry-get nil "CLOCK_MODELINE_TOTAL") + (let ((cmt (or (org-entry-get nil "CLOCK_MODELINE_TOTAL" 'selective) (symbol-name org-clock-mode-line-total))) (lr (org-entry-get nil "LAST_REPEAT"))) (cond @@ -1451,7 +1426,7 @@ The time is always returned as UTC." (current-time)) ((equal cmt "today") (setq org--msg-extra "showing today's task time.") - (let* ((dt (org-decode-time nil t)) + (let* ((dt (decode-time)) (hour (nth 2 dt)) (day (nth 3 dt))) (if (< hour org-extend-today-until) (setf (nth 3 dt) (1- day))) @@ -1784,6 +1759,7 @@ With prefix arg SELECT, offer recently clocked tasks for selection." (defvar-local org-clock-file-total-minutes nil "Holds the file total time in minutes, after a call to `org-clock-sum'.") +;;;###autoload (defun org-clock-sum-today (&optional headline-filter) "Sum the times for each subtree for today." (let ((range (org-clock-special-range 'today))) @@ -1929,37 +1905,36 @@ Use `\\[org-clock-remove-overlays]' to remove the subtree times." (prop (cond ((not arg) :org-clock-minutes-default) (todayp :org-clock-minutes-today) (customp :org-clock-minutes-custom) - (t :org-clock-minutes))) - time h m p) + (t :org-clock-minutes)))) (cond ((not arg) (org-clock-sum-custom nil org-clock-display-default-range prop)) (todayp (org-clock-sum-today)) (customp (org-clock-sum-custom nil arg)) (t (org-clock-sum))) - (unless (eq arg '(64)) + (unless (equal arg '(64)) (save-excursion (goto-char (point-min)) - (while (or (and (equal (setq p (point)) (point-min)) - (get-text-property p prop)) - (setq p (next-single-property-change - (point) prop))) - (goto-char p) - (when (setq time (get-text-property p prop)) - (org-clock-put-overlay time))) - (setq h (/ org-clock-file-total-minutes 60) - m (- org-clock-file-total-minutes (* 60 h))) + (let ((p nil)) + (while (or (and (equal (setq p (point)) (point-min)) + (get-text-property p prop)) + (setq p (next-single-property-change (point) prop))) + (goto-char p) + (let ((time (get-text-property p prop))) + (when time (org-clock-put-overlay time))))) ;; Arrange to remove the overlays upon next change. (when org-remove-highlights-with-change (add-hook 'before-change-functions 'org-clock-remove-overlays - nil 'local)))) - (message (concat (format "Total file time%s: " - (cond (todayp " for today") - (customp " (custom)") - (t ""))) - (org-duration-from-minutes - org-clock-file-total-minutes) - " (%d hours and %d minutes)") - h m))) + nil 'local)))) + (let* ((h (/ org-clock-file-total-minutes 60)) + (m (- org-clock-file-total-minutes (* 60 h)))) + (message (concat (format "Total file time%s: " + (cond (todayp " for today") + (customp " (custom)") + (t ""))) + (org-duration-from-minutes + org-clock-file-total-minutes) + " (%d hours and %d minutes)") + h m)))) (defvar-local org-clock-overlays nil) @@ -2051,27 +2026,32 @@ fontified, and then returned." ;;;###autoload (defun org-clock-report (&optional arg) - "Create a table containing a report about clocked time. -If the cursor is inside an existing clocktable block, then the table -will be updated. If not, a new clocktable will be inserted. The scope -of the new clock will be subtree when called from within a subtree, and -file elsewhere. - -When called with a prefix argument, move to the first clock table in the -buffer and update it." + "Update or create a table containing a report about clocked time. + +If point is inside an existing clocktable block, update it. +Otherwise, insert a new one. + +The new table inherits its properties from the variable +`org-clock-clocktable-default-properties'. The scope of the +clocktable, when not specified in the previous variable, is +`subtree' when the function is called from within a subtree, and +`file' elsewhere. + +When called with a prefix argument, move to the first clock table +in the buffer and update it." (interactive "P") (org-clock-remove-overlays) (when arg (org-find-dblock "clocktable") (org-show-entry)) - (if (org-in-clocktable-p) - (goto-char (org-in-clocktable-p)) - (let ((props (if (ignore-errors - (save-excursion (org-back-to-heading))) - (list :name "clocktable" :scope 'subtree) - (list :name "clocktable")))) - (org-create-dblock - (org-combine-plists org-clock-clocktable-default-properties props)))) + (pcase (org-in-clocktable-p) + (`nil + (org-create-dblock + (org-combine-plists + (list :scope (if (org-before-first-heading-p) 'file 'subtree)) + org-clock-clocktable-default-properties + '(:name "clocktable")))) + (start (goto-char start))) (org-update-dblock)) (defun org-day-of-week (day month year) @@ -2258,7 +2238,9 @@ have priority." ;; Format start and end times according to AS-STRINGS. (let* ((start (pcase key (`interactive (org-read-date nil t nil "Range start? ")) - (`untilnow org-clock--oldest-date) + ;; In theory, all clocks started after the dawn of + ;; humanity. + (`untilnow (encode-time 0 0 0 0 0 -50000)) (_ (encode-time 0 m h d month y)))) (end (pcase key (`interactive (org-read-date nil t nil "Range end? ")) @@ -2692,16 +2674,15 @@ LEVEL is an integer. Indent by two spaces per level above 1." (defun org-clocktable-steps (params) "Step through the range to make a number of clock tables." - (let* ((p1 (copy-sequence params)) - (ts (plist-get p1 :tstart)) - (te (plist-get p1 :tend)) - (ws (plist-get p1 :wstart)) - (ms (plist-get p1 :mstart)) - (step0 (plist-get p1 :step)) - (step (cdr (assoc step0 '((day . 86400) (week . 604800))))) - (stepskip0 (plist-get p1 :stepskip0)) - (block (plist-get p1 :block)) - cc step-time tsb) + (let* ((ts (plist-get params :tstart)) + (te (plist-get params :tend)) + (ws (plist-get params :wstart)) + (ms (plist-get params :mstart)) + (step0 (plist-get params :step)) + (step (cdr (assq step0 '((day . 86400) (week . 604800))))) + (stepskip0 (plist-get params :stepskip0)) + (block (plist-get params :block)) + cc tsb) (when block (setq cc (org-clock-special-range block nil t ws ms) ts (car cc) @@ -2724,37 +2705,37 @@ LEVEL is an integer. Indent by two spaces per level above 1." (setq tsb (if (eq step0 'week) (let ((dow (nth 6 (decode-time (seconds-to-time ts))))) - (if (< dow ws) ts + (if (<= dow ws) ts (- ts (* 86400 (- dow ws))))) ts)) - (setq p1 (plist-put p1 :header "")) - (setq p1 (plist-put p1 :step nil)) - (setq p1 (plist-put p1 :block nil)) (while (< tsb te) - (or (bolp) (insert "\n")) - (setq p1 (plist-put p1 :tstart (format-time-string - (org-time-stamp-format nil t) - (seconds-to-time (max tsb ts))))) - (cl-incf tsb (let ((dow (nth 6 (decode-time (seconds-to-time tsb))))) - (if (or (eq step0 'day) - (= dow ws)) - step - (* 86400 (- ws dow))))) - (setq p1 (plist-put p1 :tend (format-time-string - (org-time-stamp-format nil t) - (seconds-to-time (min te tsb))))) - (insert "\n" (if (eq step0 'day) "Daily report: " - "Weekly report starting on: ") - (plist-get p1 :tstart) "\n") - (setq step-time (org-dblock-write:clocktable p1)) - (re-search-forward "^[ \t]*#\\+END:") - (when (and (equal step-time 0) stepskip0) - ;; Remove the empty table - (delete-region (point-at-bol) - (save-excursion - (re-search-backward "^\\(Daily\\|Weekly\\) report" - nil t) - (point)))) + (unless (bolp) (insert "\n")) + (let ((start-time (seconds-to-time (max tsb ts)))) + (cl-incf tsb (let ((dow (nth 6 (decode-time (seconds-to-time tsb))))) + (if (or (eq step0 'day) + (= dow ws)) + step + (* 86400 (- ws dow))))) + (insert "\n" + (if (eq step0 'day) "Daily report: " + "Weekly report starting on: ") + (format-time-string (org-time-stamp-format nil t) start-time) + "\n") + (let ((table-begin (line-beginning-position 0)) + (step-time + (org-dblock-write:clocktable + (org-combine-plists + params + (list + :header "" :step nil :block nil + :tstart (format-time-string (org-time-stamp-format t t) + start-time) + :tend (format-time-string (org-time-stamp-format t t) + (seconds-to-time (min te tsb)))))))) + (re-search-forward "^[ \t]*#\\+END:") + (when (and stepskip0 (equal step-time 0)) + ;; Remove the empty table + (delete-region (line-beginning-position) table-begin)))) (end-of-line 0)))) (defun org-clock-get-table-data (file params) diff --git a/lisp/org/org-colview.el b/lisp/org/org-colview.el index 0d5a9827d5..cb5c091d0a 100644 --- a/lisp/org/org-colview.el +++ b/lisp/org/org-colview.el @@ -4,7 +4,7 @@ ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org/org-compat.el b/lisp/org/org-compat.el index f32fcd1783..1fd408de9e 100644 --- a/lisp/org/org-compat.el +++ b/lisp/org/org-compat.el @@ -4,7 +4,7 @@ ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; ;; This file is part of GNU Emacs. ;; @@ -61,12 +61,6 @@ (defalias 'format-message 'format) (defalias 'gui-get-selection 'x-get-selection)) -(defun org-decode-time (&optional time zone) - "Backward-compatible function for `decode-time'." - (if (< emacs-major-version 25) - (decode-time time) - (decode-time time zone))) - (unless (fboundp 'directory-name-p) (defun directory-name-p (name) "Return non-nil if NAME ends with a directory separator character." @@ -78,37 +72,6 @@ (and (memq system-type '(windows-nt ms-dos)) (= lastc ?\\)))))) -(unless (fboundp 'directory-files-recursively) - (defun directory-files-recursively (dir regexp &optional include-directories) - "Return list of all files under DIR that have file names matching REGEXP. -This function works recursively. Files are returned in \"depth first\" -order, and files from each directory are sorted in alphabetical order. -Each file name appears in the returned list in its absolute form. -Optional argument INCLUDE-DIRECTORIES non-nil means also include in the -output directories whose names match REGEXP." - (let ((result nil) - (files nil) - ;; When DIR is "/", remote file names like "/method:" could - ;; also be offered. We shall suppress them. - (tramp-mode (and tramp-mode (file-remote-p (expand-file-name dir))))) - (dolist (file (sort (file-name-all-completions "" dir) - 'string<)) - (unless (member file '("./" "../")) - (if (directory-name-p file) - (let* ((leaf (substring file 0 (1- (length file)))) - (full-file (expand-file-name leaf dir))) - ;; Don't follow symlinks to other directories. - (unless (file-symlink-p full-file) - (setq result - (nconc result (directory-files-recursively - full-file regexp include-directories)))) - (when (and include-directories - (string-match regexp leaf)) - (setq result (nconc result (list full-file))))) - (when (string-match regexp file) - (push (expand-file-name file dir) files))))) - (nconc result (nreverse files))))) - ;;; Obsolete aliases (remove them after the next major release). diff --git a/lisp/org/org-datetree.el b/lisp/org/org-datetree.el index a8162fe938..d00bad222c 100644 --- a/lisp/org/org-datetree.el +++ b/lisp/org/org-datetree.el @@ -4,7 +4,7 @@ ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org/org-docview.el b/lisp/org/org-docview.el index 57069b32ae..a467212d01 100644 --- a/lisp/org/org-docview.el +++ b/lisp/org/org-docview.el @@ -4,7 +4,7 @@ ;; Author: Jan Böcker ;; Keywords: outlines, hypermedia, calendar, wp -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org/org-element.el b/lisp/org/org-element.el index 9e5c4007bd..d9c6522e2f 100644 --- a/lisp/org/org-element.el +++ b/lisp/org/org-element.el @@ -22,7 +22,7 @@ ;;; Commentary: ;; -;; See for details about +;; See for details about ;; Org syntax. ;; ;; Lisp-wise, a syntax object can be represented as a list. @@ -3065,7 +3065,7 @@ Assume point is at the beginning of the link." (setq path (match-string-no-properties 1)) (setq contents-begin (match-beginning 1)) (setq contents-end (match-end 1))) - ;; Type 2: Standard link, i.e. [[http://orgmode.org][homepage]] + ;; Type 2: Standard link, i.e. [[https://orgmode.org][homepage]] ((looking-at org-bracket-link-regexp) (setq format 'bracket) (setq contents-begin (match-beginning 3)) @@ -3114,14 +3114,14 @@ Assume point is at the beginning of the link." (t (setq type "fuzzy") (setq path raw-link)))) - ;; Type 3: Plain link, e.g., http://orgmode.org + ;; Type 3: Plain link, e.g., https://orgmode.org ((looking-at org-plain-link-re) (setq format 'plain) (setq raw-link (match-string-no-properties 0)) (setq type (match-string-no-properties 1)) (setq link-end (match-end 0)) (setq path (match-string-no-properties 2))) - ;; Type 4: Angular link, e.g., . Unlike to + ;; Type 4: Angular link, e.g., . Unlike to ;; bracket links, follow RFC 3986 and remove any extra ;; whitespace in URI. ((looking-at org-angle-link-re) diff --git a/lisp/org/org-entities.el b/lisp/org/org-entities.el index 65c7d055e0..e291b521f9 100644 --- a/lisp/org/org-entities.el +++ b/lisp/org/org-entities.el @@ -5,7 +5,7 @@ ;; Author: Carsten Dominik , ;; Ulf Stegemann ;; Keywords: outlines, calendar, wp -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org/org-eww.el b/lisp/org/org-eww.el index 3d9dddcac0..1b6112adbb 100644 --- a/lisp/org/org-eww.el +++ b/lisp/org/org-eww.el @@ -4,7 +4,7 @@ ;; Author: Marco Wahl a ;; Keywords: link, eww -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. diff --git a/lisp/org/org-faces.el b/lisp/org/org-faces.el index 83871fb445..750ada1e9c 100644 --- a/lisp/org/org-faces.el +++ b/lisp/org/org-faces.el @@ -4,7 +4,7 @@ ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org/org-feed.el b/lisp/org/org-feed.el index c3491d5df7..fde19e632c 100644 --- a/lisp/org/org-feed.el +++ b/lisp/org/org-feed.el @@ -4,7 +4,7 @@ ;; ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; ;; This file is part of GNU Emacs. ;; @@ -276,14 +276,21 @@ have been saved." (defun org-feed-update-all () "Get inbox items from all feeds in `org-feed-alist'." (interactive) - (let ((nfeeds (length org-feed-alist)) - (nnew (apply '+ (mapcar 'org-feed-update org-feed-alist)))) - (message "%s from %d %s" - (cond ((= nnew 0) "No new entries") - ((= nnew 1) "1 new entry") - (t (format "%d new entries" nnew))) - nfeeds - (if (= nfeeds 1) "feed" "feeds")))) + (let ((entries 0) + (errors 0) + (total-feeds (length org-feed-alist))) + (dolist (feed org-feed-alist) + (let ((items (ignore-errors (org-feed-update feed)))) + (if items (cl-incf entries items) + (cl-incf errors)))) + (message "%s from %d %s%s" + (pcase entries + (0 "No new entries") + (1 "1 new entry") + (_ (format "%d new entries" entries))) + total-feeds + (if (= total-feeds 1) "feed" "feeds") + (if (= 0 errors) "" (format " (unavailable feeds: %d)" errors))))) ;;;###autoload (defun org-feed-update (feed &optional retrieve-only) diff --git a/lisp/org/org-footnote.el b/lisp/org/org-footnote.el index 4d3f154c25..c6376ca5dc 100644 --- a/lisp/org/org-footnote.el +++ b/lisp/org/org-footnote.el @@ -4,7 +4,7 @@ ;; ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org/org-gnus.el b/lisp/org/org-gnus.el index 0f2cdc28fb..a53b343efb 100644 --- a/lisp/org/org-gnus.el +++ b/lisp/org/org-gnus.el @@ -5,7 +5,7 @@ ;; Author: Carsten Dominik ;; Tassilo Horn ;; Keywords: outlines, hypermedia, calendar, wp -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; ;; This file is part of GNU Emacs. ;; @@ -42,6 +42,7 @@ (declare-function gnus-activate-group "gnus-start" (group &optional scan dont-check method dont-sub-check)) (declare-function gnus-find-method-for-group "gnus" (group &optional info)) +(declare-function gnus-article-show-summary "gnus-art" ()) (declare-function gnus-group-group-name "gnus-group") (declare-function gnus-group-jump-to-group "gnus-group" (group &optional prompt)) (declare-function gnus-group-read-group "gnus-group" (&optional all no-article group select-articles)) @@ -142,7 +143,14 @@ If `org-store-link' was called with a prefix arg the meaning of (save-excursion (nnir-article-group (gnus-summary-article-number)))) (_ gnus-newsgroup-name))) - (header (with-current-buffer gnus-summary-buffer + (header (if (eq major-mode 'gnus-article-mode) + ;; When in an article, first move to summary + ;; buffer, with point on the summary of the + ;; current article before extracting headers. + (save-window-excursion + (save-excursion + (gnus-article-show-summary) + (gnus-summary-article-header))) (gnus-summary-article-header))) (from (mail-header-from header)) (message-id (org-unbracket-string "<" ">" (mail-header-id header))) diff --git a/lisp/org/org-habit.el b/lisp/org/org-habit.el index 09f13129e1..375714e35e 100644 --- a/lisp/org/org-habit.el +++ b/lisp/org/org-habit.el @@ -4,7 +4,7 @@ ;; Author: John Wiegley ;; Keywords: outlines, hypermedia, calendar, wp -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org/org-id.el b/lisp/org/org-id.el index a230947c78..26b203ff06 100644 --- a/lisp/org/org-id.el +++ b/lisp/org/org-id.el @@ -4,7 +4,7 @@ ;; ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org/org-indent.el b/lisp/org/org-indent.el index ef68c3c4fa..84bac2aa79 100644 --- a/lisp/org/org-indent.el +++ b/lisp/org/org-indent.el @@ -4,7 +4,7 @@ ;; ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org/org-info.el b/lisp/org/org-info.el index db5d66ce76..6dde36ceba 100644 --- a/lisp/org/org-info.el +++ b/lisp/org/org-info.el @@ -4,7 +4,7 @@ ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org/org-inlinetask.el b/lisp/org/org-inlinetask.el index 1825b88cdf..08fc268d0d 100644 --- a/lisp/org/org-inlinetask.el +++ b/lisp/org/org-inlinetask.el @@ -4,7 +4,7 @@ ;; ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. diff --git a/lisp/org/org-list.el b/lisp/org/org-list.el index ad0030ffdf..1f51809f1c 100644 --- a/lisp/org/org-list.el +++ b/lisp/org/org-list.el @@ -5,7 +5,7 @@ ;; Author: Carsten Dominik ;; Bastien Guerry ;; Keywords: outlines, hypermedia, calendar, wp -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; ;; This file is part of GNU Emacs. ;; @@ -121,6 +121,7 @@ (declare-function org-element-set-element "org-element" (old new)) (declare-function org-element-type "org-element" (element)) (declare-function org-element-update-syntax "org-element" ()) +(declare-function org-end-of-meta-data "org" (&optional full)) (declare-function org-entry-get "org" (pom property &optional inherit literal-nil)) (declare-function org-export-create-backend "ox" (&rest rest) t) @@ -2356,27 +2357,23 @@ is an integer, 0 means `-', 1 means `+' etc. If WHICH is (defun org-toggle-checkbox (&optional toggle-presence) "Toggle the checkbox in the current line. -With prefix arg TOGGLE-PRESENCE, add or remove checkboxes. With -double prefix, set checkbox to [-]. + +With prefix argument TOGGLE-PRESENCE, add or remove checkboxes. +With a double prefix argument, set the checkbox to \"[-]\". When there is an active region, toggle status or presence of the first checkbox there, and make every item inside have the same status or presence, respectively. -If the cursor is in a headline, apply this to all checkbox items -in the text below the heading, taking as reference the first item -in subtree, ignoring drawers." +If point is on a headline, apply this to all checkbox items in +the text below the heading, taking as reference the first item in +subtree, ignoring planning line and any drawer following it." (interactive "P") (save-excursion (let* (singlep block-item lim-up lim-down - (keyword-re (concat "^[ \t]*\\<\\(" org-scheduled-string - "\\|" org-deadline-string - "\\|" org-closed-string - "\\|" org-clock-string "\\)" - " *[[<]\\([^]>]+\\)[]>]")) (orderedp (org-entry-get nil "ORDERED")) (_bounds ;; In a region, start at first item in region. @@ -2389,15 +2386,10 @@ in subtree, ignoring drawers." (error "No item in region")) (setq lim-down (copy-marker limit)))) ((org-at-heading-p) - ;; On an heading, start at first item after drawers and + ;; On a heading, start at first item after drawers and ;; time-stamps (scheduled, etc.). (let ((limit (save-excursion (outline-next-heading) (point)))) - (forward-line 1) - (while (or (looking-at org-drawer-regexp) - (looking-at keyword-re)) - (if (looking-at keyword-re) - (forward-line 1) - (re-search-forward "^[ \t]*:END:" limit nil))) + (org-end-of-meta-data t) (if (org-list-search-forward (org-item-beginning-re) limit t) (setq lim-up (point-at-bol)) (error "No item in subtree")) @@ -2656,8 +2648,8 @@ Return t if successful." (= top (point-at-bol)) (cdr (assq 'indent org-list-automatic-rules)) (if no-subtree - (error - "First item of list cannot move without its subtree") + (user-error + "At first item: use S-M- to move the whole list") t)))) ;; Determine begin and end points of zone to indent. If moving ;; more than one item, save them for subsequent moves. diff --git a/lisp/org/org-macro.el b/lisp/org/org-macro.el index 0fb0b8ad17..1033db2af4 100644 --- a/lisp/org/org-macro.el +++ b/lisp/org/org-macro.el @@ -130,7 +130,7 @@ Templates are stored in buffer-local variable function installs the following ones: \"property\", \"time\". and, if the buffer is associated to a file, \"input-file\" and \"modification-time\"." - (let* ((templates (org-macro--collect-macros)) + (let* ((templates nil) (update-templates (lambda (cell) (let ((old-template (assoc (car cell) templates))) @@ -164,7 +164,7 @@ function installs the following ones: \"property\", (org-macro--counter-initialize) (funcall update-templates (cons "n" "(eval (org-macro--counter-increment \"$1\" \"$2\"))")) - (setq org-macro-templates templates))) + (setq org-macro-templates (nconc (org-macro--collect-macros) templates)))) (defun org-macro-expand (macro templates) "Return expanded MACRO, as a string. diff --git a/lisp/org/org-macs.el b/lisp/org/org-macs.el index 79d09e3797..510ece1cb1 100644 --- a/lisp/org/org-macs.el +++ b/lisp/org/org-macs.el @@ -4,7 +4,7 @@ ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org/org-mhe.el b/lisp/org/org-mhe.el index 32a6ff11b9..e74a9ee59d 100644 --- a/lisp/org/org-mhe.el +++ b/lisp/org/org-mhe.el @@ -4,7 +4,7 @@ ;; Author: Thomas Baumann ;; Keywords: outlines, hypermedia, calendar, wp -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org/org-mobile.el b/lisp/org/org-mobile.el index 71914750f0..cbf169f407 100644 --- a/lisp/org/org-mobile.el +++ b/lisp/org/org-mobile.el @@ -3,7 +3,7 @@ ;; ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org/org-mouse.el b/lisp/org/org-mouse.el index ba38c058dd..5a10b59b1e 100644 --- a/lisp/org/org-mouse.el +++ b/lisp/org/org-mouse.el @@ -24,7 +24,7 @@ ;; ;; Org-mouse provides mouse support for org-mode. ;; -;; http://orgmode.org +;; https://orgmode.org ;; ;; Org mouse implements the following features: ;; * following links with the left mouse button diff --git a/lisp/org/org-pcomplete.el b/lisp/org/org-pcomplete.el index a7cc09def4..88a2e10d85 100644 --- a/lisp/org/org-pcomplete.el +++ b/lisp/org/org-pcomplete.el @@ -5,7 +5,7 @@ ;; Author: Carsten Dominik ;; John Wiegley ;; Keywords: outlines, hypermedia, calendar, wp -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org/org-plot.el b/lisp/org/org-plot.el index 6c74f3e658..ebd7af42a8 100644 --- a/lisp/org/org-plot.el +++ b/lisp/org/org-plot.el @@ -4,7 +4,7 @@ ;; ;; Author: Eric Schulte ;; Keywords: tables, plotting -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org/org-protocol.el b/lisp/org/org-protocol.el index 27c2bb28d0..33957ee326 100644 --- a/lisp/org/org-protocol.el +++ b/lisp/org/org-protocol.el @@ -184,10 +184,10 @@ Possible properties are: Example: (setq org-protocol-project-alist - \\='((\"http://orgmode.org/worg/\" + \\='((\"https://orgmode.org/worg/\" :online-suffix \".php\" :working-suffix \".org\" - :base-url \"http://orgmode.org/worg/\" + :base-url \"https://orgmode.org/worg/\" :working-directory \"/home/user/org/Worg/\") (\"http://localhost/org-notes/\" :online-suffix \".html\" @@ -688,7 +688,7 @@ the cdr of an element in `org-publish-project-alist', reuse (let ((working-dir (expand-file-name (or (plist-get project-plist :base-directory) default-directory))) - (base-url "http://orgmode.org/worg/") + (base-url "https://orgmode.org/worg/") (strip-suffix (or (plist-get project-plist :html-extension) ".html")) (working-suffix (if (plist-get project-plist :base-extension) (concat "." (plist-get project-plist :base-extension)) diff --git a/lisp/org/org-rmail.el b/lisp/org/org-rmail.el index be433f66d1..d50fd648b6 100644 --- a/lisp/org/org-rmail.el +++ b/lisp/org/org-rmail.el @@ -4,7 +4,7 @@ ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org/org-src.el b/lisp/org/org-src.el index 7c28acf9d8..829354c0d5 100644 --- a/lisp/org/org-src.el +++ b/lisp/org/org-src.el @@ -6,7 +6,7 @@ ;; Bastien Guerry ;; Dan Davison ;; Keywords: outlines, hypermedia, calendar, wp -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org/org-table.el b/lisp/org/org-table.el index 4bb5c91ce8..dcf7430363 100644 --- a/lisp/org/org-table.el +++ b/lisp/org/org-table.el @@ -4,7 +4,7 @@ ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; ;; This file is part of GNU Emacs. ;; @@ -135,7 +135,7 @@ the fixed string \"#+ORGTBL: SEND\", followed by instruction on how to convert the table into a data structure useful in the language of the buffer. Check the manual for the section on \"Translator functions\", and more generally check out -http://orgmode.org/manual/Tables-in-arbitrary-syntax.html#Tables-in-arbitrary-syntax +the Info node `(org)Tables in arbitrary syntax'. All occurrences of %n in a template will be replaced with the name of the table, obtained by prompting the user." @@ -387,16 +387,19 @@ portability of tables." (const :tag "Error on attempt to cross" error))) (defcustom org-table-formula-create-columns nil - "Non-nil means that evaluation of a field formula can add new -columns if an out-of-bounds field is being set." + "Non-nil means evaluation of formula can add new columns. +When non-nil, evaluating an out-of-bounds field can insert as +many columns as needed. When set to `warn', issue a warning when +doing so. When set to `prompt', ask user before creating a new +column. Otherwise, throw an error." :group 'org-table-calculation :version "26.1" :package-version '(Org . "8.3") :type '(choice - (const :tag "Setting an out-of-bounds field generates an error (default)" nil) - (const :tag "Setting an out-of-bounds field silently adds columns as needed" t) - (const :tag "Setting an out-of-bounds field adds columns as needed, but issues a warning message" warn) - (const :tag "When setting an out-of-bounds field, the user is prompted" prompt))) + (const :tag "Out-of-bounds field generates an error (default)" nil) + (const :tag "Out-of-bounds field silently adds columns as needed" t) + (const :tag "Out-of-bounds field adds columns, but issues a warning" warn) + (const :tag "Prompt user when setting an out-of-bounds field" prompt))) (defgroup org-table-import-export nil "Options concerning table import and export in Org mode." @@ -3327,7 +3330,9 @@ existing formula for column %s" t)) (and (eq org-table-formula-create-columns 'prompt) (yes-or-no-p - "Out-of-bounds formula. Add columns? "))))))) + "Out-of-bounds formula. Add columns? ")) + (user-error + "Missing columns in the table. Aborting")))))) (org-table-eval-formula nil formula t t t t)))) ;; Clean up markers and internal text property. (remove-text-properties (point-min) (point-max) '(org-untouchable t)) diff --git a/lisp/org/org-timer.el b/lisp/org/org-timer.el index 65e777b63e..d840944ef1 100644 --- a/lisp/org/org-timer.el +++ b/lisp/org/org-timer.el @@ -4,7 +4,7 @@ ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org/org-version.el b/lisp/org/org-version.el index 8ec120e9b2..132ad2b303 100644 --- a/lisp/org/org-version.el +++ b/lisp/org/org-version.el @@ -5,13 +5,13 @@ (defun org-release () "The release version of Org. Inserted by installing Org mode or when a release is made." - (let ((org-release "9.1.6")) + (let ((org-release "9.1.9")) org-release)) ;;;###autoload (defun org-git-version () "The Git version of Org mode. Inserted by installing Org or when a release is made." - (let ((org-git-version "release_9.1.6-50-g96b33f")) + (let ((org-git-version "release_9.1.9-65-g5e4542")) org-git-version)) (provide 'org-version) diff --git a/lisp/org/org-w3m.el b/lisp/org/org-w3m.el index 706619c5d2..9690c8e90c 100644 --- a/lisp/org/org-w3m.el +++ b/lisp/org/org-w3m.el @@ -4,7 +4,7 @@ ;; Author: Andy Stewart ;; Keywords: outlines, hypermedia, calendar, wp -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org/org.el b/lisp/org/org.el index a53553bfd8..1373861ad1 100644 --- a/lisp/org/org.el +++ b/lisp/org/org.el @@ -6,8 +6,8 @@ ;; Author: Carsten Dominik ;; Maintainer: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp -;; Homepage: http://orgmode.org -;; Version: 9.1.6 +;; Homepage: https://orgmode.org +;; Version: 9.1.9 ;; ;; This file is part of GNU Emacs. ;; @@ -49,7 +49,7 @@ ;; --------------------------- ;; See the corresponding sections in the manual at ;; -;; http://orgmode.org/org.html#Installation +;; https://orgmode.org/org.html#Installation ;; ;; Documentation ;; ------------- @@ -60,7 +60,7 @@ ;; in the doc/ directory. ;; ;; A list of recent changes can be found at -;; http://orgmode.org/Changes.html +;; https://orgmode.org/Changes.html ;; ;;; Code: @@ -1866,7 +1866,7 @@ See the manual for examples." (defcustom org-descriptive-links t "Non-nil means Org will display descriptive links. -E.g. [[http://orgmode.org][Org website]] will be displayed as +E.g. [[https://orgmode.org][Org website]] will be displayed as \"Org Website\", hiding the link itself and just displaying its description. When set to nil, Org will display the full links literally. @@ -3758,7 +3758,7 @@ This variable is populated from #+PROPERTY lines.") :group 'org) (defvar-local org-category nil - "Variable used by org files to set a category for agenda display. + "Variable used by Org files to set a category for agenda display. Such files should use a file variable to set it, for example # -*- mode: org; org-category: \"ELisp\" @@ -4040,7 +4040,7 @@ Place-holders only used by `:image-converter': (defcustom org-preview-latex-image-directory "ltximg/" "Path to store latex preview images. A relative path here creates many directories relative to the -processed org files paths. An absolute path puts all preview +processed Org files paths. An absolute path puts all preview images at the same place." :group 'org-latex :version "26.1" @@ -4238,9 +4238,9 @@ lines to the buffer: :type 'boolean) (defcustom org-hidden-keywords nil - "List of symbols corresponding to keywords to be hidden the org buffer. -For example, a value \\='(title) for this list will make the document's title -appear in the buffer without the initial #+TITLE: keyword." + "List of symbols corresponding to keywords to be hidden in the Org buffer. +For example, a value \\='(title) for this list makes the document's title +appear in the buffer without the initial \"#+TITLE:\" part." :group 'org-appearance :version "24.1" :type '(set (const :tag "#+AUTHOR" author) @@ -4903,6 +4903,18 @@ Support for group tags is controlled by the option (message "Groups tags support has been turned %s" (if org-group-tags "on" "off"))) +(defun org-tag-add-to-alist (alist1 alist2) + "Append ALIST1 elements to ALIST2 if they are not there yet." + (cond + ((null alist2) alist1) + ((null alist1) alist2) + (t (let ((alist2-cars (mapcar (lambda (x) (car-safe x)) alist2)) + to-add) + (dolist (i alist1) + (unless (member (car-safe i) alist2-cars) + (push i to-add))) + (append to-add alist2))))) + (defun org-set-regexps-and-options (&optional tags-only) "Precompute regular expressions used in the current buffer. When optional argument TAGS-ONLY is non-nil, only compute tags @@ -4931,10 +4943,11 @@ related expressions." (mapcar #'org-add-prop-inherited (cdr (assq 'filetags alist)))) (setq org-current-tag-alist - (append org-tag-persistent-alist - (let ((tags (cdr (assq 'tags alist)))) - (if tags (org-tag-string-to-alist tags) - org-tag-alist)))) + (org-tag-add-to-alist + org-tag-persistent-alist + (let ((tags (cdr (assq 'tags alist)))) + (if tags (org-tag-string-to-alist tags) + org-tag-alist)))) (setq org-tag-groups-alist (org-tag-alist-to-groups org-current-tag-alist)) (unless tags-only @@ -5249,7 +5262,7 @@ a string, summarizing TAGS, as a list of strings." (`(,(or :endgroup :endgrouptag)) (when (eq group-status 'append) (push (nreverse current-group) groups)) - (setq group-status nil)) + (setq group-status nil current-group nil)) (`(:grouptags) (setq group-status 'append)) ((and `(,tag . ,_) (guard group-status)) (if (eq group-status 'append) (push tag current-group) @@ -6052,17 +6065,21 @@ by a #." (defun org-fontify-macros (limit) "Fontify macros." - (when (re-search-forward "\\({{{\\).+?\\(}}}\\)" limit t) - (add-text-properties - (match-beginning 0) (match-end 0) - '(font-lock-fontified t face org-macro)) - (when org-hide-macro-markers - (add-text-properties (match-end 2) (match-beginning 2) - '(invisible t)) - (add-text-properties (match-beginning 1) (match-end 1) - '(invisible t))) - (org-remove-flyspell-overlays-in (match-beginning 0) (match-end 0)) - t)) + (when (re-search-forward "{{{\\([a-zA-Z][-a-zA-Z0-9_]*\\)" limit t) + (let ((begin (match-beginning 0)) + (opening-end (match-beginning 1))) + (when (and (re-search-forward "\n[ \t]*\n\\|\\(}}}\\)" limit t) + (match-string 1)) + (let ((end (match-end 1)) + (closing-start (match-beginning 1))) + (add-text-properties + begin end + '(font-lock-multiline t font-lock-fontified t face org-macro)) + (org-remove-flyspell-overlays-in begin end) + (when org-hide-macro-markers + (add-text-properties begin opening-end '(invisible t)) + (add-text-properties closing-start end '(invisible t))) + t))))) (defun org-activate-footnote-links (limit) "Add text properties for footnotes." @@ -8459,7 +8476,7 @@ This is a short-hand for marking the subtree and then cutting it." (org-copy-subtree n 'cut)) (defun org-copy-subtree (&optional n cut force-store-markers nosubtrees) - "Copy the current subtree it in the clipboard. + "Copy the current subtree into the clipboard. With prefix arg N, copy this many sequential subtrees. This is a short-hand for marking the subtree and then copying it. If CUT is non-nil, actually cut the subtree. @@ -8532,7 +8549,6 @@ When REMOVE is non-nil, remove the subtree from the clipboard." (org-with-limited-levels (let* ((visp (not (org-invisible-p))) (txt tree) - (^re_ "\\(\\*+\\)[ \t]*") (old-level (if (string-match org-outline-regexp-bol txt) (- (match-end 0) (match-beginning 0) 1) -1)) @@ -8549,7 +8565,7 @@ When REMOVE is non-nil, remove the subtree from the clipboard." (condition-case nil (progn (outline-previous-visible-heading 1) - (if (looking-at ^re_) + (if (looking-at org-outline-regexp-bol) (- (match-end 0) (match-beginning 0) 1) 1)) (error 1)))) @@ -8558,7 +8574,7 @@ When REMOVE is non-nil, remove the subtree from the clipboard." (progn (or (looking-at org-outline-regexp) (outline-next-visible-heading 1)) - (if (looking-at ^re_) + (if (looking-at org-outline-regexp-bol) (- (match-end 0) (match-beginning 0) 1) 1)) (error 1)))) @@ -9680,7 +9696,8 @@ active region." (cdr (assoc-string (completing-read "Which function for creating the link? " - (mapcar #'car results-alist) nil t name) + (mapcar #'car results-alist) + nil t (symbol-name name)) results-alist))) t)))) (setq link (plist-get org-store-link-plist :link)) @@ -14124,7 +14141,7 @@ headlines matching this string." 'org-todo-regexp org-todo-regexp 'org-complex-heading-regexp org-complex-heading-regexp 'help-echo - (format "mouse-2 or RET jump to org file %s" + (format "mouse-2 or RET jump to Org file %S" (abbreviate-file-name (or (buffer-file-name (buffer-base-buffer)) (buffer-name (buffer-base-buffer))))))) @@ -14320,10 +14337,12 @@ instead of the agenda files." (mapcar (lambda (file) (set-buffer (find-file-noselect file)) - (mapcar (lambda (x) - (and (stringp (car-safe x)) - (list (car-safe x)))) - (or org-current-tag-alist (org-get-buffer-tags)))) + (org-tag-add-to-alist + (org-get-buffer-tags) + (mapcar (lambda (x) + (and (stringp (car-safe x)) + (list (car-safe x)))) + org-current-tag-alist))) (if (car-safe files) files (org-agenda-files)))))))) @@ -14350,9 +14369,9 @@ See also `org-scan-tags'." ;; Get a new match request, with completion against the global ;; tags table and the local tags in current buffer. (let ((org-last-tags-completion-table - (org-uniquify - (delq nil (append (org-get-buffer-tags) - (org-global-tags-completion-table)))))) + (org-tag-add-to-alist + (org-get-buffer-tags) + (org-global-tags-completion-table)))) (setq match (completing-read "Match: " @@ -14534,7 +14553,7 @@ When DOWNCASE is non-nil, expand downcased TAGS." (tag (match-string 2 return-match)) (tag (if downcased (downcase tag) tag))) (unless (or (get-text-property 0 'grouptag (match-string 2 return-match)) - (member tag work-already-expanded)) + (member tag tags-already-expanded)) (setq tags-in-group (assoc tag taggroups)) (push tag work-already-expanded) ;; Recursively expand each tag in the group, if the tag hasn't @@ -14802,36 +14821,28 @@ Assume point is on a headline." (org-set-tags arg just-align)))) (defun org-set-tags-to (data) - "Set the tags of the current entry to DATA, replacing the current tags. -DATA may be a tags string like :aa:bb:cc:, or a list of tags. -If DATA is nil or the empty string, any tags will be removed." + "Set the tags of the current entry to DATA, replacing current tags. +DATA may be a tags string like \":aa:bb:cc:\", or a list of tags. +If DATA is nil or the empty string, all tags are removed." (interactive "sTags: ") - (setq data - (cond - ((eq data nil) "") - ((equal data "") "") - ((stringp data) - (concat ":" (mapconcat 'identity (org-split-string data ":+") ":") - ":")) - ((listp data) - (concat ":" (mapconcat 'identity data ":") ":")))) - (when data - (save-excursion - (org-back-to-heading t) - (when (let ((case-fold-search nil)) - (looking-at org-complex-heading-regexp)) - (if (match-end 5) - (progn - (goto-char (match-beginning 5)) - (insert data) - (delete-region (point) (point-at-eol)) - (org-set-tags nil 'align)) - (goto-char (point-at-eol)) - (insert " " data) - (org-set-tags nil 'align))) - (beginning-of-line 1) - (when (looking-at ".*?\\([ \t]+\\)$") - (delete-region (match-beginning 1) (match-end 1)))))) + (let ((data + (pcase (if (stringp data) (org-trim data) data) + ((or `nil "") nil) + ((pred listp) (format ":%s:" (mapconcat #'identity data ":"))) + ((pred stringp) + (format ":%s:" + (mapconcat #'identity (org-split-string data ":+") ":"))) + (_ (error "Invalid tag specification: %S" data))))) + (org-with-wide-buffer + (org-back-to-heading t) + (let ((case-fold-search nil)) (looking-at org-complex-heading-regexp)) + (when (or (match-end 5) data) + (goto-char (or (match-beginning 5) (line-end-position))) + (skip-chars-backward " \t") + (delete-region (point) (line-end-position)) + (when data + (insert " " data) + (org-set-tags nil 'align)))))) (defun org-align-all-tags () "Align the tags in all headings." @@ -14874,27 +14885,16 @@ When JUST-ALIGN is non-nil, only align tags." (if just-align current ;; Get a new set of tags from the user. (save-excursion - (let* ((seen) - (table + (let* ((table (setq org-last-tags-completion-table - ;; Uniquify tags in alists, yet preserve - ;; structure (i.e., keywords). - (delq nil - (mapcar - (lambda (pair) - (let ((head (car pair))) - (cond ((symbolp head) pair) - ((member head seen) nil) - (t (push head seen) - pair)))) - (append - (or org-current-tag-alist - (org-get-buffer-tags)) - (and - org-complete-tags-always-offer-all-agenda-tags - (org-global-tags-completion-table - (org-agenda-files)))))))) + (org-tag-add-to-alist + (and + org-complete-tags-always-offer-all-agenda-tags + (org-global-tags-completion-table + (org-agenda-files))) + (or org-current-tag-alist + (org-get-buffer-tags))))) (current-tags (org-split-string current ":")) (inherited-tags (nreverse (nthcdr (length current-tags) @@ -14973,9 +14973,9 @@ This works in the agenda, and also in an Org buffer." (list (region-beginning) (region-end) (let ((org-last-tags-completion-table (if (derived-mode-p 'org-mode) - (org-uniquify - (delq nil (append (org-get-buffer-tags) - (org-global-tags-completion-table)))) + (org-tag-add-to-alist + (org-get-buffer-tags) + (org-global-tags-completion-table)) (org-global-tags-completion-table)))) (completing-read "Tag: " 'org-tags-completion-function nil nil nil @@ -16510,7 +16510,7 @@ a priority cookie and tags in the standard locations." (move-marker (make-marker) (match-beginning 0)))))))) (defun org-find-exact-heading-in-directory (heading &optional dir) - "Find Org node headline HEADING in all .org files in directory DIR. + "Find Org node headline HEADING in all \".org\" files in directory DIR. When the target headline is found, return a marker to this location." (let ((files (directory-files (or dir default-directory) t "\\`[^.#].*\\.org\\'")) @@ -16633,10 +16633,18 @@ non-nil." (defun org-time-stamp-inactive (&optional arg) "Insert an inactive time stamp. + An inactive time stamp is enclosed in square brackets instead of angle brackets. It is inactive in the sense that it does not trigger agenda entries, does not link to the calendar and cannot be changed with the S-cursor keys. -So these are more for recording a certain time/date." +So these are more for recording a certain time/date. + +If the user specifies a time like HH:MM or if this command is called with +at least one prefix argument, the time stamp contains the date and the time. +Otherwise, only the date is included. + +When called with two universal prefix arguments, insert an active time stamp +with the current time without prompting the user." (interactive "P") (org-time-stamp arg 'inactive)) @@ -18230,7 +18238,7 @@ Prompt for confirmation when there are unsaved changes. Be sure you know what you are doing before letting this function overwrite your changes. -This function is useful in a setup where one tracks org files +This function is useful in a setup where one tracks Org files with a version control system, to revert on one machine after pulling changes from another. I believe the procedure must be like this: @@ -18552,9 +18560,9 @@ When a buffer is unmodified, it is just killed. When modified, it is saved (setq org-todo-keyword-alist-for-agenda (append org-todo-keyword-alist-for-agenda org-todo-key-alist)) (setq org-tag-alist-for-agenda - (org-uniquify - (append org-tag-alist-for-agenda - org-current-tag-alist))) + (org-tag-add-to-alist + org-tag-alist-for-agenda + org-current-tag-alist)) ;; Merge current file's tag groups into global ;; `org-tag-groups-alist-for-agenda'. (when org-group-tags @@ -20988,9 +20996,12 @@ Use `\\[org-edit-special]' to edit table.el tables")) "Abort storing current note, or call `outline-show-branches'." (interactive) (if (not org-finish-function) - (progn - (outline-hide-subtree) - (call-interactively 'outline-show-branches)) + (save-excursion + (save-restriction + (org-narrow-to-subtree) + (org-flag-subtree t) + (call-interactively 'outline-show-branches) + (org-hide-archived-subtrees (point-min) (point-max)))) (let ((org-note-abort t)) (funcall org-finish-function)))) @@ -21104,7 +21115,13 @@ object (e.g., within a comment). In these case, you need to use (delete-and-extract-region (point) (line-end-position)))) (newline-and-indent) (save-excursion (insert trailing-data)))) - (t (if indent (newline-and-indent) (newline)))))) + (t + ;; Do not auto-fill when point is in an Org property drawer. + (let ((auto-fill-function (and (not (org-at-property-p)) + auto-fill-function))) + (if indent + (newline-and-indent) + (newline))))))) (defun org-return-indent () "Goto next table row or insert a newline and indent. @@ -21573,7 +21590,7 @@ such private information before sending the email.") "Remember to cover the basics, that is, what you expected to happen and what in fact did happen. You don't know how to make a good report? See - http://orgmode.org/manual/Feedback.html#Feedback + https://orgmode.org/manual/Feedback.html#Feedback Your bug report will be posted to the Org mailing list. ------------------------------------------------------------------------") @@ -21613,7 +21630,7 @@ Your bug report will be posted to the Org mailing list. ;;;###autoload (defun org-reload (&optional uncompiled) - "Reload all org lisp files. + "Reload all Org Lisp files. With prefix arg UNCOMPILED, load the uncompiled versions." (interactive "P") (require 'loadhist) diff --git a/lisp/org/ox-html.el b/lisp/org/ox-html.el index 83f6479bd4..39f7d83e14 100644 --- a/lisp/org/ox-html.el +++ b/lisp/org/ox-html.el @@ -465,7 +465,7 @@ customize `org-html-head-include-default-style'.") ;;;; Handle infojs (defvar org-html-infojs-opts-table - '((path PATH "http://orgmode.org/org-info.js") + '((path PATH "https://orgmode.org/org-info.js") (view VIEW "info") (toc TOC :with-toc) (ftoc FIXED_TOC "0") @@ -1324,7 +1324,7 @@ like that: \"%%\"." :type 'string) (defcustom org-html-creator-string - (format "Emacs %s (Org mode %s)" + (format "Emacs %s (Org mode %s)" emacs-version (if (fboundp 'org-version) (org-version) "unknown version")) "Information about the creator of the HTML document. @@ -1452,13 +1452,13 @@ done, timestamp, timestamp-kwd, tag, target. For example, a valid value would be: If you want to refer to an external style, use something like diff --git a/lisp/org/ox-icalendar.el b/lisp/org/ox-icalendar.el index a87970eb3f..7d7c850047 100644 --- a/lisp/org/ox-icalendar.el +++ b/lisp/org/ox-icalendar.el @@ -5,7 +5,7 @@ ;; Author: Carsten Dominik ;; Nicolas Goaziou ;; Keywords: outlines, hypermedia, calendar, wp -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. diff --git a/lisp/org/ox-latex.el b/lisp/org/ox-latex.el index c32aa29804..5aaaf991fd 100644 --- a/lisp/org/ox-latex.el +++ b/lisp/org/ox-latex.el @@ -920,15 +920,14 @@ using customize, or with (add-to-list \\='org-latex-packages-alist \\='(\"newfloat\" \"minted\")) In addition, it is necessary to install pygments -\(http://pygments.org), and to configure the variable +\(URL `http://pygments.org>'), and to configure the variable `org-latex-pdf-process' so that the -shell-escape option is passed to pdflatex. The minted choice has possible repercussions on the preview of latex fragments (see `org-preview-latex-fragment'). If you run into previewing problems, please consult - - http://orgmode.org/worg/org-tutorials/org-latex-preview.html" +URL `https://orgmode.org/worg/org-tutorials/org-latex-preview.html'." :group 'org-export-latex :type '(choice (const :tag "Use listings" t) @@ -1719,7 +1718,7 @@ holding export options." ;; Table of contents. (let ((depth (plist-get info :with-toc))) (when depth - (concat (when (wholenump depth) + (concat (when (integerp depth) (format "\\setcounter{tocdepth}{%d}\n" depth)) (plist-get info :latex-toc-command)))) ;; Document's body. diff --git a/lisp/org/ox-odt.el b/lisp/org/ox-odt.el index cdee568fc8..a1145a9821 100644 --- a/lisp/org/ox-odt.el +++ b/lisp/org/ox-odt.el @@ -4,7 +4,7 @@ ;; Author: Jambunathan K ;; Keywords: outlines, hypermedia, calendar, wp -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. diff --git a/lisp/org/ox-publish.el b/lisp/org/ox-publish.el index 5deb7c54e7..8901dba34c 100644 --- a/lisp/org/ox-publish.el +++ b/lisp/org/ox-publish.el @@ -405,11 +405,9 @@ definition." (defun org-publish--expand-file-name (file project) "Return full file name for FILE in PROJECT. When FILE is a relative file name, it is expanded according to -project base directory. Always return the true name of the file, -ignoring symlinks." - (file-truename - (if (file-name-absolute-p file) file - (expand-file-name file (org-publish-property :base-directory project))))) +project base directory." + (if (file-name-absolute-p file) file + (expand-file-name file (org-publish-property :base-directory project)))) (defun org-publish-expand-projects (projects-alist) "Expand projects in PROJECTS-ALIST. @@ -436,10 +434,32 @@ This splices all the components into the list." (match (if (eq extension 'any) "" (format "^[^\\.].*\\.\\(%s\\)$" extension))) (base-files - (cl-remove-if #'file-directory-p - (if (org-publish-property :recursive project) - (directory-files-recursively base-dir match) - (directory-files base-dir t match t))))) + (cond ((not (file-exists-p base-dir)) nil) + ((not (org-publish-property :recursive project)) + (cl-remove-if #'file-directory-p + (directory-files base-dir t match t))) + (t + ;; Find all files recursively. Unlike to + ;; `directory-files-recursively', we follow symlinks + ;; to other directories. + (letrec ((files nil) + (walk-tree + (lambda (dir depth) + (when (> depth 100) + (error "Apparent cycle of symbolic links for %S" + base-dir)) + (dolist (f (file-name-all-completions "" dir)) + (pcase f + ((or "./" "../") nil) + ((pred directory-name-p) + (funcall walk-tree + (expand-file-name f dir) + (1+ depth))) + ((pred (string-match match)) + (push (expand-file-name f dir) files)) + (_ nil))) + files))) + (funcall walk-tree base-dir 0)))))) (org-uniquify (append ;; Files from BASE-DIR. Apply exclusion filter before adding @@ -468,13 +488,13 @@ This splices all the components into the list." "Return a project that FILENAME belongs to. When UP is non-nil, return a meta-project (i.e., with a :components part) publishing FILENAME." - (let* ((filename (file-truename filename)) + (let* ((filename (expand-file-name filename)) (project (cl-some (lambda (p) ;; Ignore meta-projects. (unless (org-publish-property :components p) - (let ((base (file-truename + (let ((base (expand-file-name (org-publish-property :base-directory p)))) (cond ;; Check if FILENAME is explicitly included in one @@ -499,9 +519,7 @@ publishing FILENAME." ;; Check if FILENAME belong to project's base ;; directory, or some of its sub-directories ;; if :recursive in non-nil. - ((org-publish-property :recursive p) - (and (file-in-directory-p filename base) p)) - ((file-equal-p base (file-name-directory filename)) p) + ((member filename (org-publish-get-base-files p)) p) (t nil))))) org-publish-project-alist))) (cond @@ -1260,25 +1278,21 @@ the file including them will be republished as well." (with-current-buffer buf (goto-char (point-min)) (while (re-search-forward "^[ \t]*#\\+INCLUDE:" nil t) - (let* ((element (org-element-at-point)) - (included-file - (and (eq (org-element-type element) 'keyword) - (let ((value (org-element-property :value element))) - (and value - (string-match - "\\`\\(\".+?\"\\|\\S-+\\)\\(?:\\s-+\\|$\\)" - value) - (let ((m (match-string 1 value))) - (org-unbracket-string - "\"" "\"" - ;; Ignore search suffix. - (if (string-match "::.*?\"?\\'" m) - (substring m 0 (match-beginning 0)) - m)))))))) - (when included-file - (push (org-publish-cache-ctime-of-src - (expand-file-name included-file)) - included-files-ctime))))) + (let ((element (org-element-at-point))) + (when (eq 'keyword (org-element-type element)) + (let* ((value (org-element-property :value element)) + (filename + (and (string-match "\\`\\(\".+?\"\\|\\S-+\\)" value) + (let ((m (org-unbracket-string + "\"" "\"" (match-string 1 value)))) + ;; Ignore search suffix. + (if (string-match "::.*?\\'" m) + (substring m 0 (match-beginning 0)) + m))))) + (when filename + (push (org-publish-cache-ctime-of-src + (expand-file-name filename)) + included-files-ctime))))))) (unless visiting (kill-buffer buf))))) (or (null pstamp) (let ((ctime (org-publish-cache-ctime-of-src filename))) diff --git a/lisp/org/ox.el b/lisp/org/ox.el index 7bdac4f290..ea7d1dc81f 100644 --- a/lisp/org/ox.el +++ b/lisp/org/ox.el @@ -66,7 +66,7 @@ ;; Eventually, a dispatcher (`org-export-dispatch') is provided in the ;; last one. ;; -;; See for +;; See for ;; more information. ;;; Code: @@ -714,12 +714,15 @@ frequently in plain text." (defcustom org-export-with-toc t "Non-nil means create a table of contents in exported files. -The TOC contains headlines with levels up -to`org-export-headline-levels'. When an integer, include levels -up to N in the toc, this may then be different from -`org-export-headline-levels', but it will not be allowed to be -larger than the number of headline levels. When nil, no table of -contents is made. +The table of contents contains headlines with levels up to +`org-export-headline-levels'. + +When this variable is set to an integer N, include levels up to +N in the table of contents. Although it may then be different +from `org-export-headline-levels', it is cannot be larger than +the number of headline levels. + +When nil, no table of contents is created. This option can also be set with the OPTIONS keyword, e.g. \"toc:nil\" or \"toc:3\"." @@ -728,8 +731,9 @@ e.g. \"toc:nil\" or \"toc:3\"." (const :tag "No Table of Contents" nil) (const :tag "Full Table of Contents" t) (integer :tag "TOC to level")) - :safe (lambda (x) (or (booleanp x) - (integerp x)))) + :safe (lambda (x) + (or (booleanp x) + (integerp x)))) (defcustom org-export-with-tables t "Non-nil means export tables. @@ -1777,7 +1781,8 @@ for a footnotes section." "List headlines and inlinetasks with a select tag in their tree. DATA is parsed data as returned by `org-element-parse-buffer'. INFO is a plist holding export options." - (let ((select (plist-get info :select-tags))) + (let ((select (cl-mapcan (lambda (tag) (org-tags-expand tag t)) + (plist-get info :select-tags)))) (if (cl-some (lambda (tag) (member tag select)) (plist-get info :filetags)) ;; If FILETAGS contains a select tag, every headline or ;; inlinetask is returned. @@ -1811,11 +1816,13 @@ INFO is a plist holding export options." (funcall walk-data data nil) selected-trees)))) -(defun org-export--skip-p (datum options selected) +(defun org-export--skip-p (datum options selected excluded) "Non-nil when element or object DATUM should be skipped during export. OPTIONS is the plist holding export options. SELECTED, when non-nil, is a list of headlines or inlinetasks belonging to -a tree with a select tag." +a tree with a select tag. EXCLUDED is a list of tags, as +strings. Any headline or inlinetask marked with one of those is +not exported." (cl-case (org-element-type datum) ((comment comment-block) ;; Skip all comments and comment blocks. Make to keep maximum @@ -1854,8 +1861,7 @@ a tree with a select tag." (and (eq (org-element-type datum) 'inlinetask) (not (plist-get options :with-inlinetasks))) ;; Ignore subtrees with an exclude tag. - (cl-loop for k in (plist-get options :exclude-tags) - thereis (member k tags)) + (cl-some (lambda (tag) (member tag excluded)) tags) ;; When a select tag is present in the buffer, ignore any tree ;; without it. (and selected (not (memq datum selected))) @@ -2709,6 +2715,9 @@ from tree." (letrec ((ignore nil) ;; First find trees containing a select tag, if any. (selected (org-export--selected-trees data info)) + ;; List tags that prevent export of headlines. + (excluded (cl-mapcan (lambda (tag) (org-tags-expand tag t)) + (plist-get info :exclude-tags))) (walk-data (lambda (data) ;; Prune non-exportable elements and objects from tree. @@ -2717,7 +2726,7 @@ from tree." ;; accessed during export. (when data (let ((type (org-element-type data))) - (if (org-export--skip-p data info selected) + (if (org-export--skip-p data info selected excluded) (if (memq type '(table-cell table-row)) (push data ignore) (org-element-extract-element data)) (if (and (eq type 'headline) @@ -4264,7 +4273,7 @@ A search cell follows the pattern (TYPE . SEARCH) where - target's or radio-target's name as a list of strings if TYPE is `target'. - - NAME affiliated keyword is TYPE is `other'. + - NAME affiliated keyword if TYPE is `other'. A search cell is the internal representation of a fuzzy link. It ignores white spaces and statistics cookies, if applicable." commit 1b075a9e38ca6812417f95ed2272e61d875d9e86 Author: Glenn Morris Date: Tue Mar 27 17:02:04 2018 -0400 ; Fix some tiny doc typos diff --git a/lisp/emacs-lisp/map.el b/lisp/emacs-lisp/map.el index f2fa806153..1f6f1ffbcd 100644 --- a/lisp/emacs-lisp/map.el +++ b/lisp/emacs-lisp/map.el @@ -207,7 +207,7 @@ MAP can be a list, hash-table or array." (defun map-do (function map) "Apply FUNCTION to each element of MAP and return nil. -FUNCTION.is called with two arguments, the key and the value." +FUNCTION is called with two arguments, the key and the value." (funcall (map--dispatch map :list #'map--do-alist :hash-table #'maphash diff --git a/lisp/progmodes/ebrowse.el b/lisp/progmodes/ebrowse.el index ca64af5c91..c955790019 100644 --- a/lisp/progmodes/ebrowse.el +++ b/lisp/progmodes/ebrowse.el @@ -457,7 +457,7 @@ members." (defsubst ebrowse-extern-c-p (member) - "Value is non-nil if MEMBER.is `extern \"C\"'." + "Value is non-nil if MEMBER is `extern \"C\"'." (ebrowse-member-bit-set-p member 256)) commit c8e8d16810ec09139c560c77572d3372a2edd8d2 Author: Paul Eggert Date: Tue Mar 27 13:48:13 2018 -0700 Avoid using unportable integer in org-clock * lisp/org/org-clock.el (org-clock--oldest-date): Avoid use of an integer outside portable Emacs range. Go back to using a simple check, since decode-time should no longer infloop. diff --git a/lisp/org/org-clock.el b/lisp/org/org-clock.el index 4c5fcc64b0..c124abd391 100644 --- a/lisp/org/org-clock.el +++ b/lisp/org/org-clock.el @@ -478,17 +478,7 @@ to add an effort property.") (funcall dichotomy most-negative-fixnum 0 - (lambda (m) - ;; libc in macOS 10.6 hangs when decoding times - ;; around year -2**31. Limit `high' not to go - ;; any earlier than that. - (unless (and (eq system-type 'darwin) - (string-match-p - "10\\.6\\.[[:digit:]]" - (shell-command-to-string - "sw_vers -productVersion")) - (<= m -1034058203135)) - (ignore-errors (decode-time (list m 0))))))) + (lambda (m) (ignore-errors (decode-time (list m 0)))))) (low (funcall dichotomy most-negative-fixnum commit 72fad885b68617db85901a8e810211b557a31f99 Author: Paul Eggert Date: Tue Mar 27 13:30:50 2018 -0700 Update from Gnulib This incorporates: 2018-03-26 time_rz: work around Mac OS X 10.6 infloop 2018-03-20 euidaccess: Port to native Windows. * lib/euidaccess.c, lib/time_rz.c, m4/time_rz.m4: Copy from Gnulib. diff --git a/lib/euidaccess.c b/lib/euidaccess.c index aee693571c..4f512f5af5 100644 --- a/lib/euidaccess.c +++ b/lib/euidaccess.c @@ -29,8 +29,11 @@ #include #include #include - -#include "root-uid.h" +#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# include +#else +# include "root-uid.h" +#endif #if HAVE_LIBGEN_H # include @@ -84,7 +87,9 @@ euidaccess (const char *file, int mode) return accessx (file, mode, ACC_SELF); #elif HAVE_EACCESS /* FreeBSD */ return eaccess (file, mode); -#else /* Mac OS X, NetBSD, OpenBSD, HP-UX, Solaris, Cygwin, mingw, BeOS */ +#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* mingw */ + return _access (file, mode); +#else /* Mac OS X, NetBSD, OpenBSD, HP-UX, Solaris, Cygwin, BeOS */ uid_t uid = getuid (); gid_t gid = getgid (); diff --git a/lib/time_rz.c b/lib/time_rz.c index c1eca888f2..5293c7cf8d 100644 --- a/lib/time_rz.c +++ b/lib/time_rz.c @@ -286,6 +286,21 @@ revert_tz (timezone_t tz) struct tm * localtime_rz (timezone_t tz, time_t const *t, struct tm *tm) { +#ifdef HAVE_LOCALTIME_INFLOOP_BUG + /* The -67768038400665599 comes from: + https://lists.gnu.org/r/bug-gnulib/2017-07/msg00142.html + On affected platforms the greatest POSIX-compatible time_t value + that could return nonnull is 67768036191766798 (when + TZ="XXX24:59:59" it resolves to the year 2**31 - 1 + 1900, on + 12-31 at 23:59:59), so test for that too while we're in the + neighborhood. */ + if (! (-67768038400665599 <= *t && *t <= 67768036191766798)) + { + errno = EOVERFLOW; + return NULL; + } +#endif + if (!tz) return gmtime_r (t, tm); else diff --git a/m4/time_rz.m4 b/m4/time_rz.m4 index 4378148978..af9fa02b57 100644 --- a/m4/time_rz.m4 +++ b/m4/time_rz.m4 @@ -13,6 +13,38 @@ AC_DEFUN([gl_TIME_RZ], AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) AC_REQUIRE([AC_STRUCT_TIMEZONE]) + # Mac OS X 10.6 loops forever with some time_t values less + # than -67768038400665599. See Bug#27706, Bug#27736, and + # https://lists.gnu.org/r/bug-gnulib/2017-07/msg00142.html + AC_CACHE_CHECK([whether localtime loops forever near extrema], + [gl_cv_func_localtime_infloop_bug], + [gl_cv_func_localtime_infloop_bug=no + AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [[#include + #include + #include + #include + ]], [[ + time_t t = -67768038400665600; + struct tm *tm; + char *tz = getenv ("TZ"); + if (! (tz && strcmp (tz, "QQQ0") == 0)) + return 0; + alarm (2); + tm = localtime (&t); + /* Use TM and *TM to suppress over-optimization. */ + return tm && tm->tm_isdst; + ]])], + [TZ=QQQ0 ./conftest$EXEEXT || gl_cv_func_localtime_infloop_bug=yes], + [], + [gl_cv_func_localtime_infloop_bug="guessing no"])]) + if test "$gl_cv_func_localtime_infloop_bug" = yes; then + AC_DEFINE([HAVE_LOCALTIME_INFLOOP_BUG], 1, + [Define if localtime-like functions can loop forever on + extreme arguments.]) + fi + AC_CHECK_TYPES([timezone_t], [], [], [[#include ]]) if test "$ac_cv_type_timezone_t" = yes; then HAVE_TIMEZONE_T=1 commit 7bc31c1cd4b6a6eac0d29e31dbe3d208e2258ccf Author: Stefan Monnier Date: Tue Mar 27 16:19:40 2018 -0400 (benchmark-run-compiled): Make it work like 'benchmark-run' again * lisp/emacs-lisp/benchmark.el (benchmark-run): Add special case for nil repetitions. diff --git a/etc/NEWS b/etc/NEWS index 04774c13e5..fd1d04b8a0 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -326,6 +326,7 @@ names" in the Tramp manual for full documentation of these facilities. * Incompatible Lisp Changes in Emacs 27.1 +** The 'repetitions' argument of 'benchmark-run' can now also be a variable. ** The FILENAME argument to 'file-name-base' is now mandatory and no longer defaults to 'buffer-file-name'. diff --git a/lisp/emacs-lisp/benchmark.el b/lisp/emacs-lisp/benchmark.el index 2f4e38fe35..e062a1867a 100644 --- a/lisp/emacs-lisp/benchmark.el +++ b/lisp/emacs-lisp/benchmark.el @@ -50,7 +50,7 @@ Return a list of the total elapsed time for execution, the number of garbage collections that ran, and the time taken by garbage collection. See also `benchmark-run-compiled'." (declare (indent 1) (debug t)) - (unless (or (natnump repetitions) (symbolp repetitions)) + (unless (or (natnump repetitions) (and repetitions (symbolp repetitions))) (setq forms (cons repetitions forms) repetitions 1)) (let ((i (make-symbol "i")) @@ -74,7 +74,7 @@ This is like `benchmark-run', but what is timed is a funcall of the byte code obtained by wrapping FORMS in a `lambda' and compiling the result. The overhead of the `lambda's is accounted for." (declare (indent 1) (debug t)) - (unless (natnump repetitions) + (unless (or (natnump repetitions) (and repetitions (symbolp repetitions))) (setq forms (cons repetitions forms) repetitions 1)) (let ((i (make-symbol "i")) @@ -84,7 +84,7 @@ result. The overhead of the `lambda's is accounted for." (lambda-code (byte-compile `(lambda ())))) `(let ((,gc gc-elapsed) (,gcs gcs-done)) - (list ,(if (> repetitions 1) + (list ,(if (or (symbolp repetitions) (> repetitions 1)) ;; Take account of the loop overhead. `(- (benchmark-elapse (dotimes (,i ,repetitions) (funcall ,code))) diff --git a/test/lisp/emacs-lisp/benchmark-tests.el b/test/lisp/emacs-lisp/benchmark-tests.el index cba53aefc9..26bd3ff08a 100644 --- a/test/lisp/emacs-lisp/benchmark-tests.el +++ b/test/lisp/emacs-lisp/benchmark-tests.el @@ -28,18 +28,24 @@ (should (consp (benchmark-run 1 (setq m (1+ 0))))) (should (stringp (benchmark nil (1+ 0)))) (should (stringp (benchmark 1 (1+ 0)))) - (should (consp (benchmark-run-compiled nil (1+ 0)))) + (should (consp (benchmark-run-compiled (1+ 0)))) (should (consp (benchmark-run-compiled 1 (1+ 0)))) ;; First test is heavier, must need longer time. - (should (> (car (benchmark-run nil + (let ((count1 0) + (count2 0) + (repeat 2)) + (ignore (benchmark-run (setq count1 (1+ count1)))) + (ignore (benchmark-run repeat (setq count2 (1+ count2)))) + (should (> count2 count1))) + (should (> (car (benchmark-run (let ((n 100000)) (while (> n 1) (setq n (1- n)))))) - (car (benchmark-run nil (setq m (1+ 0)))))) - (should (> (car (benchmark-run nil + (car (benchmark-run (setq m (1+ 0)))))) + (should (> (car (benchmark-run (let ((n 100000)) (while (> n 1) (setq n (1- n)))))) - (car (benchmark-run nil (setq m (1+ 0)))))) - (should (> (car (benchmark-run-compiled nil + (car (benchmark-run (setq m (1+ 0)))))) + (should (> (car (benchmark-run-compiled (let ((n 100000)) (while (> n 1) (setq n (1- n)))))) - (car (benchmark-run-compiled nil (1+ 0))))) + (car (benchmark-run-compiled (1+ 0))))) (setq str (benchmark nil '(let ((n 100000)) (while (> n 1) (setq n (1- n)))))) (string-match "Elapsed time: \\([0-9.]+\\)" str) (setq t-long (string-to-number (match-string 1 str))) commit b56c56f203f8b066dd71e6ae6a254121b3ac3f08 Author: Stefan Monnier Date: Tue Mar 27 16:01:30 2018 -0400 (completion-at-point-functions): Improve doc diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi index 0ef81858ea..b01ebb26b6 100644 --- a/doc/lispref/minibuf.texi +++ b/doc/lispref/minibuf.texi @@ -1877,10 +1877,10 @@ are used to compute a completion table for completing the text at point. It can be used by major modes to provide mode-specific completion tables (@pxref{Major Mode Conventions}). -When the command @code{completion-at-point} runs, it calls the -functions in the list one by one, without any argument. Each function -should return @code{nil} if it is unable to produce a completion table -for the text at point. Otherwise it should return a list of the form +When the command @code{completion-at-point} runs, it calls the functions in the +list one by one, without any argument. Each function should return @code{nil} +unless it can and wants to take responsibility for the completion data for the +text at point. Otherwise it should return a list of the form @example (@var{start} @var{end} @var{collection} . @var{props}) @@ -1910,6 +1910,8 @@ next function in @code{completion-at-point-functions} instead of reporting a completion failure. @end table +The functions on this hook should generally return quickly, since they may be +called very often (e.g., from @code{post-command-hook}). Supplying a function for @var{collection} is strongly recommended if generating the list of completions is an expensive operation. Emacs may internally call functions in @code{completion-at-point-functions} @@ -1932,11 +1934,16 @@ can defer generating completions until necessary. You can use (my-make-completions))))) @end smallexample +Additionally, the @var{collection} should generally not be pre-filtered based +on the current text between @var{start} and @var{end}, because that is the +responsibility of the caller of @code{completion-at-point-functions} to do that +according to the completion styles it decides to use. + A function in @code{completion-at-point-functions} may also return a function instead of a list as described above. In that case, that returned function is called, with no argument, and it is entirely responsible for performing the completion. We discourage this usage; -it is intended to help convert old code to using +it is only intended to help convert old code to using @code{completion-at-point}. The first function in @code{completion-at-point-functions} to return a diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index 3227917494..6eded9c58f 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -2072,7 +2072,12 @@ Currently supported properties are all the properties that can appear in match the text at point, then instead of reporting a completion failure, the completion should try the next completion function. As is the case with most hooks, the functions are responsible for -preserving things like point and current buffer.") +preserving things like point and current buffer. + +NOTE: These functions should be cheap to run since they're sometimes run from +`post-command-hook' and they should ideally only choose which kind of +completion table to use and not pre-filter it based on the current text between +START and END (e.g. that would not obey `completion-styles').") (defvar completion--capf-misbehave-funs nil "List of functions found on `completion-at-point-functions' that misbehave. commit c13cd74322be25293e78412b8957fe639f560c54 Author: Stefan Monnier Date: Tue Mar 27 15:26:02 2018 -0400 (read_key_sewuence): Use POSN in second event when needed (bug#30955) * src/keyboard.c (active_maps): Add arg 'second_event'. (read_key_sequence): Pass it. * lisp/mouse.el (mouse--click-1-maybe-follows-link): Modify event in place. diff --git a/lisp/mouse.el b/lisp/mouse.el index 66b8a852e7..95aada9b15 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -131,7 +131,12 @@ Expects to be bound to `(double-)mouse-1' in `key-translation-map'." (unless (get newup 'event-kind) (put newup 'event-kind (get (car last-input-event) 'event-kind))) - (vector (cons newup (cdr last-input-event))))))))) + ;; Modify the event in-place, otherwise we can get a prefix + ;; added again, so a click on the header-line turns + ;; into a [header-line header-line mouse-2] :-(. + ;; See fake_prefixed_keys in src/keyboard.c's. + (setf (car last-input-event) newup) + (vector last-input-event))))))) (define-key key-translation-map [down-mouse-1] #'mouse--down-1-maybe-follows-link) diff --git a/src/keyboard.c b/src/keyboard.c index 9b8d275d0f..044e3fac69 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -8701,10 +8701,19 @@ follow_key (Lisp_Object keymap, Lisp_Object key) } static Lisp_Object -active_maps (Lisp_Object first_event) +active_maps (Lisp_Object first_event, Lisp_Object second_event) { Lisp_Object position - = CONSP (first_event) ? CAR_SAFE (XCDR (first_event)) : Qnil; + = EVENT_HAS_PARAMETERS (first_event) ? EVENT_START (first_event) : Qnil; + /* The position of a click can be in the second event if the first event + is a fake_prefixed_key like `header-line` or `mode-line`. */ + if (SYMBOLP (first_event) + && EVENT_HAS_PARAMETERS (second_event) + && EQ (first_event, POSN_POSN (EVENT_START (second_event)))) + { + eassert (NILP (position)); + position = EVENT_START (second_event); + } return Fcons (Qkeymap, Fcurrent_active_maps (Qt, position)); } @@ -9016,13 +9025,14 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt, starting_buffer = current_buffer; first_unbound = bufsize + 1; Lisp_Object first_event = mock_input > 0 ? keybuf[0] : Qnil; + Lisp_Object second_event = mock_input > 1 ? keybuf[1] : Qnil; /* Build our list of keymaps. If we recognize a function key and replace its escape sequence in keybuf with its symbol, or if the sequence starts with a mouse click and we need to switch buffers, we jump back here to rebuild the initial keymaps from the current buffer. */ - current_binding = active_maps (first_event); + current_binding = active_maps (first_event, second_event); /* Start from the beginning in keybuf. */ t = 0; @@ -9282,7 +9292,7 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt, && (XBUFFER (XWINDOW (selected_window)->contents) != current_buffer)) Fset_buffer (XWINDOW (selected_window)->contents); - current_binding = active_maps (first_event); + current_binding = active_maps (first_event, Qnil); } GROW_RAW_KEYBUF; commit 7eac1a57ce680b0523503e99e719e9fa2f7f400a Author: Stefan Monnier Date: Tue Mar 27 15:22:42 2018 -0400 * lisp/mouse.el: Remove redundant ':group's. diff --git a/lisp/mouse.el b/lisp/mouse.el index 6a98ee7353..66b8a852e7 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -41,8 +41,7 @@ (defcustom mouse-yank-at-point nil "If non-nil, mouse yank commands yank at point instead of at click." - :type 'boolean - :group 'mouse) + :type 'boolean) (defcustom mouse-drag-copy-region nil "If non-nil, copy to kill-ring upon mouse adjustments of the region. @@ -50,8 +49,7 @@ This affects `mouse-save-then-kill' (\\[mouse-save-then-kill]) in addition to mouse drags." :type 'boolean - :version "24.1" - :group 'mouse) + :version "24.1") (defcustom mouse-1-click-follows-link 450 "Non-nil means that clicking Mouse-1 on a link follows the link. @@ -83,8 +81,7 @@ packages. See `mouse-on-link-p' for details." :type '(choice (const :tag "Disabled" nil) (const :tag "Double click" double) (number :tag "Single click time limit" :value 450) - (other :tag "Single click" t)) - :group 'mouse) + (other :tag "Single click" t))) (defcustom mouse-1-click-in-non-selected-windows t "If non-nil, a Mouse-1 click also follows links in non-selected windows. @@ -93,8 +90,7 @@ If nil, a Mouse-1 click on a link in a non-selected window performs the normal mouse-1 binding, typically selects the window and sets point at the click position." :type 'boolean - :version "22.1" - :group 'mouse) + :version "22.1") (defvar mouse--last-down nil) @@ -921,7 +917,6 @@ Nil means keep point at the position clicked (region end); non-nil means move point to beginning of region." :type '(choice (const :tag "Don't move point" nil) (const :tag "Move point to beginning of region" t)) - :group 'mouse :version "26.1") (defun mouse-set-point (event &optional promote-to-region) @@ -1027,8 +1022,7 @@ this many seconds between scroll steps. Scrolling stops when you move the mouse back into the window, or release the button. This variable's value may be non-integral. Setting this to zero causes Emacs to scroll as fast as it can." - :type 'number - :group 'mouse) + :type 'number) (defcustom mouse-scroll-min-lines 1 "The minimum number of lines scrolled by dragging mouse out of window. @@ -1037,8 +1031,7 @@ scrolling repeatedly. The number of lines scrolled per repetition is normally equal to the number of lines beyond the window edge that the mouse has moved. However, it always scrolls at least the number of lines specified by this variable." - :type 'integer - :group 'mouse) + :type 'integer) (defun mouse-scroll-subr (window jump &optional overlay start) "Scroll the window WINDOW, JUMP lines at a time, until new input arrives. @@ -1945,8 +1938,7 @@ When there is no region, this function does nothing." "Number of buffers in one pane (submenu) of the buffer menu. If we have lots of buffers, divide them into groups of `mouse-buffer-menu-maxlen' and make a pane (or submenu) for each one." - :type 'integer - :group 'mouse) + :type 'integer) (defcustom mouse-buffer-menu-mode-mult 4 "Group the buffers by the major mode groups on \\[mouse-buffer-menu]? @@ -1956,7 +1948,6 @@ will split the buffer menu by the major modes (see Set to 1 (or even 0!) if you want to group by major mode always, and to a large number if you prefer a mixed multitude. The default is 4." :type 'integer - :group 'mouse :version "20.3") (defvar mouse-buffer-menu-mode-groups @@ -2354,8 +2345,7 @@ region, text is copied instead of being cut." modifier)) '(alt super hyper shift control meta)) (other :tag "Enable dragging the region" t)) - :version "26.1" - :group 'mouse) + :version "26.1") (defcustom mouse-drag-and-drop-region-cut-when-buffers-differ nil "If non-nil, cut text also when source and destination buffers differ. @@ -2364,8 +2354,7 @@ the text in the source buffer alone when dropping it in a different buffer. If this is non-nil, it will cut the text just as it does when dropping text in the source buffer." :type 'boolean - :version "26.1" - :group 'mouse) + :version "26.1") (defcustom mouse-drag-and-drop-region-show-tooltip 256 "If non-nil, text is shown by a tooltip in a graphic display. @@ -2375,8 +2364,7 @@ tooltip. If this is an integer (as with the default value of 256), it will show that many characters of the dragged text in a tooltip." :type 'integer - :version "26.1" - :group 'mouse) + :version "26.1") (defcustom mouse-drag-and-drop-region-show-cursor t "If non-nil, move point with mouse cursor during dragging. @@ -2385,16 +2373,14 @@ Otherwise, it will move point together with the mouse cursor and, in addition, temporarily highlight the original region with the `mouse-drag-and-drop-region' face." :type 'boolean - :version "26.1" - :group 'mouse) + :version "26.1") (defface mouse-drag-and-drop-region '((t :inherit region)) "Face to highlight original text during dragging. This face is used by `mouse-drag-and-drop-region' to temporarily highlight the original region when `mouse-drag-and-drop-region-show-cursor' is non-nil." - :version "26.1" - :group 'mouse) + :version "26.1") (defun mouse-drag-and-drop-region (event) "Move text in the region to point where mouse is dragged to. commit 43f96927285002552dac90d8f8764719770d3994 Author: Glenn Morris Date: Mon Mar 26 21:56:33 2018 -0400 * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-test-featurep-warnings): New. diff --git a/test/lisp/emacs-lisp/bytecomp-tests.el b/test/lisp/emacs-lisp/bytecomp-tests.el index 7330c67614..7c5aa9abed 100644 --- a/test/lisp/emacs-lisp/bytecomp-tests.el +++ b/test/lisp/emacs-lisp/bytecomp-tests.el @@ -27,6 +27,7 @@ (require 'ert) (require 'cl-lib) +(require 'bytecomp) ;;; Code: (defconst byte-opt-testsuite-arith-data @@ -571,6 +572,38 @@ literals (Bug#20852)." (goto-char (point-min)) (should-not (search-forward "Warning" nil t)))) +(ert-deftest bytecomp-test-featurep-warnings () + (let ((byte-compile-log-buffer (generate-new-buffer " *Compile-Log*"))) + (unwind-protect + (progn + (with-temp-buffer + (insert "\ +\(defun foo () + (an-undefined-function)) + +\(defun foo1 () + (if (featurep 'xemacs) + (some-undefined-function-if))) + +\(defun foo2 () + (and (featurep 'xemacs) + (some-undefined-function-and))) + +\(defun foo3 () + (if (not (featurep 'emacs)) + (some-undefined-function-not))) + +\(defun foo4 () + (or (featurep 'emacs) + (some-undefined-function-or))) +") + (byte-compile-from-buffer (current-buffer))) + (with-current-buffer byte-compile-log-buffer + (should (search-forward "an-undefined-function" nil t)) + (should-not (search-forward "some-undefined-function" nil t)))) + (if (buffer-live-p byte-compile-log-buffer) + (kill-buffer byte-compile-log-buffer))))) + ;; Local Variables: ;; no-byte-compile: t ;; End: commit c7d2a0dd76fbfaedb4caedac261bd0a8944281a8 Author: Stefan Monnier Date: Mon Mar 26 21:07:35 2018 -0400 * lisp/emacs-lisp/benchmark.el (benchmark-run): Allow variable. (benchmark-run): Allow `repetitions` to be a variable rather than a constant. diff --git a/lisp/emacs-lisp/benchmark.el b/lisp/emacs-lisp/benchmark.el index b86b56b81e..2f4e38fe35 100644 --- a/lisp/emacs-lisp/benchmark.el +++ b/lisp/emacs-lisp/benchmark.el @@ -50,7 +50,7 @@ Return a list of the total elapsed time for execution, the number of garbage collections that ran, and the time taken by garbage collection. See also `benchmark-run-compiled'." (declare (indent 1) (debug t)) - (unless (natnump repetitions) + (unless (or (natnump repetitions) (symbolp repetitions)) (setq forms (cons repetitions forms) repetitions 1)) (let ((i (make-symbol "i")) @@ -58,7 +58,7 @@ See also `benchmark-run-compiled'." (gc (make-symbol "gc"))) `(let ((,gc gc-elapsed) (,gcs gcs-done)) - (list ,(if (> repetitions 1) + (list ,(if (or (symbolp repetitions) (> repetitions 1)) ;; Take account of the loop overhead. `(- (benchmark-elapse (dotimes (,i ,repetitions) ,@forms)) @@ -101,7 +101,7 @@ the command prompts for the form to benchmark. For non-interactive use see also `benchmark-run' and `benchmark-run-compiled'." (interactive "p\nxForm: ") - (let ((result (eval `(benchmark-run ,repetitions ,form)))) + (let ((result (eval `(benchmark-run ,repetitions ,form) t))) (if (zerop (nth 1 result)) (message "Elapsed time: %fs" (car result)) (message "Elapsed time: %fs (%fs in %d GCs)" (car result) commit 66b771890189c8da2eabad7f2957a2dd0b2717f6 Author: Paul Eggert Date: Mon Mar 26 17:03:54 2018 -0700 Fix constant folding of overflows This suppresses some byte-code optimizations that were invalid in the presence of integer overflows, because they meant that .elc files assumed the runtime behavior of the compiling platform, as opposed to the runtime platform. Problem reported by Pip Cet in: https://lists.gnu.org/r/emacs-devel/2018-03/msg00753.html * lisp/emacs-lisp/byte-opt.el (byte-opt--portable-max) (byte-opt--portable-min): New constants. (byte-opt--portable-numberp, byte-opt--arith-reduce) (byte-optimize-1+, byte-optimize-1-): New functions. (byte-optimize-plus, byte-optimize-minus, byte-optimize-multiply) (byte-optimize-divide): Avoid invalid optimizations. (1+, 1-): Use new optimizers. (byte-optimize-or, byte-optimize-cond): Simplify by using remq instead of delq and copy-sequence. diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el index 004f58cc12..3bc4c438d6 100644 --- a/lisp/emacs-lisp/byte-opt.el +++ b/lisp/emacs-lisp/byte-opt.el @@ -678,59 +678,134 @@ (apply (car form) constants)) form))) +;; Portable Emacs integers fall in this range. +(defconst byte-opt--portable-max #x1fffffff) +(defconst byte-opt--portable-min (- -1 byte-opt--portable-max)) + +;; True if N is a number that works the same on all Emacs platforms. +;; Portable Emacs fixnums are exactly representable as floats on all +;; Emacs platforms, and (except for -0.0) any floating-point number +;; that equals one of these integers must be the same on all +;; platforms. Although other floating-point numbers such as 0.5 are +;; also portable, it can be tricky to characterize them portably so +;; they are not optimized. +(defun byte-opt--portable-numberp (n) + (and (numberp n) + (<= byte-opt--portable-min n byte-opt--portable-max) + (= n (floor n)) + (not (and (floatp n) (zerop n) + (condition-case () (< (/ n) 0) (error)))))) + +;; Use OP to reduce any leading prefix of portable numbers in the list +;; (cons ACCUM ARGS) down to a single portable number, and return the +;; resulting list A of arguments. The idea is that applying OP to A +;; is equivalent to (but likely more efficient than) applying OP to +;; (cons ACCUM ARGS), on any Emacs platform. Do not make any special +;; provision for (- X) or (/ X); for example, it is the caller’s +;; responsibility that (- 1 0) should not be "optimized" to (- 1). +(defun byte-opt--arith-reduce (op accum args) + (when (byte-opt--portable-numberp accum) + (let (accum1) + (while (and (byte-opt--portable-numberp (car args)) + (byte-opt--portable-numberp + (setq accum1 (condition-case () + (funcall op accum (car args)) + (error)))) + (= accum1 (funcall op (float accum) (car args)))) + (setq accum accum1) + (setq args (cdr args))))) + (cons accum args)) + (defun byte-optimize-plus (form) - (if (memq 0 form) (setq form (delq 0 (copy-sequence form)))) - ;; For (+ constants...), byte-optimize-predicate does the work. - (when (memq nil (mapcar 'numberp (cdr form))) + (let ((args (remq 0 (byte-opt--arith-reduce #'+ 0 (cdr form))))) (cond + ;; (+) -> 0 + ((null args) 0) + ;; (+ n) -> n, where n is a number + ((and (null (cdr args)) (numberp (car args))) (car args)) ;; (+ x 1) --> (1+ x) and (+ x -1) --> (1- x). - ((and (= (length form) 3) - (or (memq (nth 1 form) '(1 -1)) - (memq (nth 2 form) '(1 -1)))) - (let (integer other) - (if (memq (nth 1 form) '(1 -1)) - (setq integer (nth 1 form) other (nth 2 form)) - (setq integer (nth 2 form) other (nth 1 form))) - (setq form - (list (if (eq integer 1) '1+ '1-) other)))))) - (byte-optimize-predicate form)) + ((and (null (cddr args)) (or (memq 1 args) (memq -1 args))) + (let* ((arg1 (car args)) (arg2 (cadr args)) + (integer-is-first (memq arg1 '(1 -1))) + (integer (if integer-is-first arg1 arg2)) + (other (if integer-is-first arg2 arg1))) + (list (if (eq integer 1) '1+ '1-) other))) + ;; not further optimized + ((equal args (cdr form)) form) + (t (cons '+ args))))) (defun byte-optimize-minus (form) - ;; Remove zeros. - (when (and (nthcdr 3 form) - (memq 0 (cddr form))) - (setq form (nconc (list (car form) (cadr form)) - (delq 0 (copy-sequence (cddr form))))) - ;; After the above, we must turn (- x) back into (- x 0). - (or (cddr form) - (setq form (nconc form (list 0))))) - ;; For (- constants...), byte-optimize-predicate does the work. - (when (memq nil (mapcar 'numberp (cdr form))) - (cond - ;; (- x 1) --> (1- x) - ((equal (nthcdr 2 form) '(1)) - (setq form (list '1- (nth 1 form)))) - ;; (- x -1) --> (1+ x) - ((equal (nthcdr 2 form) '(-1)) - (setq form (list '1+ (nth 1 form)))))) - (byte-optimize-predicate form)) + (let ((args (cdr form))) + (if (and (cdr args) + (null (cdr (setq args (byte-opt--arith-reduce + #'- (car args) (cdr args))))) + (numberp (car args))) + ;; The entire argument list reduced to a constant; return it. + (car args) + ;; Remove non-leading zeros, except for (- x 0). + (when (memq 0 (cdr args)) + (setq args (cons (car args) (or (remq 0 (cdr args)) (list 0))))) + (cond + ;; (- x 1) --> (1- x) + ((equal (cdr args) '(1)) + (list '1- (car args))) + ;; (- x -1) --> (1+ x) + ((equal (cdr args) '(-1)) + (list '1+ (car args))) + ;; (- n) -> -n, where n and -n are portable numbers. + ;; This must be done separately since byte-opt--arith-reduce + ;; is not applied to (- n). + ((and (null (cdr args)) + (byte-opt--portable-numberp (car args)) + (byte-opt--portable-numberp (- (car args)))) + (- (car args))) + ;; not further optimized + ((equal args (cdr form)) form) + (t (cons '- args)))))) + +(defun byte-optimize-1+ (form) + (let ((args (cdr form))) + (when (null (cdr args)) + (let ((n (car args))) + (when (and (byte-opt--portable-numberp n) + (byte-opt--portable-numberp (1+ n))) + (setq form (1+ n)))))) + form) + +(defun byte-optimize-1- (form) + (let ((args (cdr form))) + (when (null (cdr args)) + (let ((n (car args))) + (when (and (byte-opt--portable-numberp n) + (byte-opt--portable-numberp (1- n))) + (setq form (1- n)))))) + form) (defun byte-optimize-multiply (form) - (if (memq 1 form) (setq form (delq 1 (copy-sequence form)))) - ;; For (* integers..), byte-optimize-predicate does the work. - (byte-optimize-predicate form)) + (let* ((args (remq 1 (byte-opt--arith-reduce #'* 1 (cdr form))))) + (cond + ;; (*) -> 1 + ((null args) 1) + ;; (* n) -> n, where n is a number + ((and (null (cdr args)) (numberp (car args))) (car args)) + ;; not further optimized + ((equal args (cdr form)) form) + (t (cons '* args))))) (defun byte-optimize-divide (form) - ;; Remove 1s. - (when (and (nthcdr 3 form) - (memq 1 (cddr form))) - (setq form (nconc (list (car form) (cadr form)) - (delq 1 (copy-sequence (cddr form))))) - ;; After the above, we must turn (/ x) back into (/ x 1). - (or (cddr form) - (setq form (nconc form (list 1))))) - (byte-optimize-predicate form)) - + (let ((args (cdr form))) + (if (and (cdr args) + (null (cdr (setq args (byte-opt--arith-reduce + #'/ (car args) (cdr args))))) + (numberp (car args))) + ;; The entire argument list reduced to a constant; return it. + (car args) + ;; Remove non-leading 1s, except for (/ x 1). + (when (memq 1 (cdr args)) + (setq args (cons (car args) (or (remq 1 (cdr args)) (list 1))))) + (if (equal args (cdr form)) + form + (cons '/ args))))) (defun byte-optimize-binary-predicate (form) (cond @@ -800,8 +875,8 @@ (put '> 'byte-optimizer 'byte-optimize-predicate) (put '<= 'byte-optimizer 'byte-optimize-predicate) (put '>= 'byte-optimizer 'byte-optimize-predicate) -(put '1+ 'byte-optimizer 'byte-optimize-predicate) -(put '1- 'byte-optimizer 'byte-optimize-predicate) +(put '1+ 'byte-optimizer 'byte-optimize-1+) +(put '1- 'byte-optimizer 'byte-optimize-1-) (put 'not 'byte-optimizer 'byte-optimize-predicate) (put 'null 'byte-optimizer 'byte-optimize-predicate) (put 'consp 'byte-optimizer 'byte-optimize-predicate) @@ -854,8 +929,7 @@ ;; Throw away nil's, and simplify if less than 2 args. ;; If there is a literal non-nil constant in the args to `or', throw away all ;; following forms. - (if (memq nil form) - (setq form (delq nil (copy-sequence form)))) + (setq form (remq nil form)) (let ((rest form)) (while (cdr (setq rest (cdr rest))) (if (byte-compile-trueconstp (car rest)) @@ -872,9 +946,8 @@ (let (rest) ;; This must be first, to reduce (cond (t ...) (nil)) to (progn t ...) (while (setq rest (assq nil (cdr form))) - (setq form (delq rest (copy-sequence form)))) - (if (memq nil (cdr form)) - (setq form (delq nil (copy-sequence form)))) + (setq form (remq rest form))) + (setq form (remq nil form)) (setq rest form) (while (setq rest (cdr rest)) (cond ((byte-compile-trueconstp (car-safe (car rest))) commit 441fe201ea129709ac9807b9b6b30caa45bbd293 Author: Michael Heerdegen Date: Sat Mar 10 16:39:41 2018 +0100 De-obsolete `if-let' and `when-let' For the following release it is planned to make `if-let*' and `when-let*' aliases for `if-let' and `when-let'. For now we revert declaring `if-let' and `when-let' obsolete and tweak the docstrings. * lisp/emacs-lisp/subr-x.el (if-let*, when-let*): Make docstrings refer to those of `if-let' and `when-let'. (if-let, when-let): De-obsolete. Rewrite documentation. diff --git a/etc/NEWS b/etc/NEWS index f5da6870b7..4adedfce1a 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1305,12 +1305,8 @@ current buffer or the self-insertion takes place within a comment. ** The alist 'ucs-names' is now a hash table. --- -** 'if-let' and 'when-let' are subsumed by 'if-let*' and 'when-let*'. -The incumbent 'if-let' and 'when-let' are now marked obsolete. -'if-let*' and 'when-let*' do not accept the single tuple special case. -New macro 'and-let*' is an implementation of the Scheme SRFI-2 syntax -of the same name. 'if-let*' and 'when-let*' now accept the same -binding syntax as 'and-let*'. +** 'if-let' and 'when-let' now support binding lists as defined by the +SRFI-2 (Scheme Request for Implementation 2). --- ** 'C-up', 'C-down', 'C-left' and 'C-right' are now defined in term diff --git a/lisp/emacs-lisp/subr-x.el b/lisp/emacs-lisp/subr-x.el index 21dba377bf..7fab9083e8 100644 --- a/lisp/emacs-lisp/subr-x.el +++ b/lisp/emacs-lisp/subr-x.el @@ -123,15 +123,8 @@ If ELT is of the form ((EXPR)), listify (EXPR) with a dummy symbol." (defmacro if-let* (varlist then &rest else) "Bind variables according to VARLIST and eval THEN or ELSE. -Each binding is evaluated in turn, and evaluation stops if a -binding value is nil. If all are non-nil, the value of THEN is -returned, or the last form in ELSE is returned. - -Each element of VARLIST is a list (SYMBOL VALUEFORM) which binds -SYMBOL to the value of VALUEFORM. An element can additionally -be of the form (VALUEFORM), which is evaluated and checked for -nil; i.e. SYMBOL can be omitted if only the test result is of -interest." +This is like `if-let' but doesn't handle a VARLIST of the form +\(SYMBOL SOMETHING) specially." (declare (indent 2) (debug ((&rest [&or symbolp (symbolp form) (form)]) form body))) @@ -144,11 +137,8 @@ interest." (defmacro when-let* (varlist &rest body) "Bind variables according to VARLIST and conditionally eval BODY. -Each binding is evaluated in turn, and evaluation stops if a -binding value is nil. If all are non-nil, the value of the last -form in BODY is returned. - -VARLIST is the same as in `if-let*'." +This is like `when-let' but doesn't handle a VARLIST of the form +\(SYMBOL SOMETHING) specially." (declare (indent 1) (debug if-let*)) (list 'if-let* varlist (macroexp-progn body))) @@ -168,12 +158,25 @@ are non-nil, then the result is non-nil." (defmacro if-let (spec then &rest else) "Bind variables according to SPEC and eval THEN or ELSE. -Like `if-let*' except SPEC can have the form (SYMBOL VALUEFORM)." +Each binding is evaluated in turn, and evaluation stops if a +binding value is nil. If all are non-nil, the value of THEN is +returned, or the last form in ELSE is returned. + +Each element of SPEC is a list (SYMBOL VALUEFORM) which binds +SYMBOL to the value of VALUEFORM. An element can additionally be +of the form (VALUEFORM), which is evaluated and checked for nil; +i.e. SYMBOL can be omitted if only the test result is of +interest. It can also be of the form SYMBOL, then the binding of +SYMBOL is checked for nil. + +As a special case, a SPEC of the form \(SYMBOL SOMETHING) is +interpreted like \((SYMBOL SOMETHING)). This exists for backward +compatibility with the old syntax that accepted only one +binding." (declare (indent 2) (debug ([&or (&rest [&or symbolp (symbolp form) (form)]) (symbolp form)] - form body)) - (obsolete "use `if-let*' instead." "26.1")) + form body))) (when (and (<= (length spec) 2) (not (listp (car spec)))) ;; Adjust the single binding case @@ -182,9 +185,12 @@ Like `if-let*' except SPEC can have the form (SYMBOL VALUEFORM)." (defmacro when-let (spec &rest body) "Bind variables according to SPEC and conditionally eval BODY. -Like `when-let*' except SPEC can have the form (SYMBOL VALUEFORM)." - (declare (indent 1) (debug if-let) - (obsolete "use `when-let*' instead." "26.1")) +Each binding is evaluated in turn, and evaluation stops if a +binding value is nil. If all are non-nil, the value of the last +form in BODY is returned. + +The variable list SPEC is the same as in `if-let'." + (declare (indent 1) (debug if-let)) (list 'if-let spec (macroexp-progn body))) (defsubst hash-table-empty-p (hash-table) commit 86960383cf8bd709e08aac483a7f60be2f8c2dcf Author: Glenn Morris Date: Mon Mar 26 16:12:51 2018 -0400 * lisp/htmlfontify.el (hfy-begin-span-handler): Doc fix. diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index c179ffcafd..d1119e1090 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -4173,7 +4173,7 @@ Return a list of the form ((TEST . VAR) ((VALUE BODY) ...))" ;; to be non-nil for generating tags for all cases. Since ;; `byte-compile-depth' will increase by at most 1 after compiling ;; all of the clause (which is further enforced by cl-assert below) - ;; it should be safe to preserve it's value. + ;; it should be safe to preserve its value. (let ((byte-compile-depth byte-compile-depth)) (byte-compile-goto 'byte-goto default-tag)) @@ -4191,7 +4191,7 @@ Return a list of the form ((TEST . VAR) ((VALUE BODY) ...))" (let ((byte-compile-depth byte-compile-depth) (init-depth byte-compile-depth)) ;; Since `byte-compile-body' might increase `byte-compile-depth' - ;; by 1, not preserving it's value will cause it to potentially + ;; by 1, not preserving its value will cause it to potentially ;; increase by one for every clause body compiled, causing ;; depth/tag conflicts or violating asserts down the road. ;; To make sure `byte-compile-body' itself doesn't violate this, diff --git a/lisp/htmlfontify.el b/lisp/htmlfontify.el index dfa6bde297..6ddbbc99f9 100644 --- a/lisp/htmlfontify.el +++ b/lisp/htmlfontify.el @@ -1623,8 +1623,8 @@ invisible text. TEXT-BLOCK is a string that identifies a single chunk of visible or invisible text of which the current position is a part. For -visible portions, it's value is \"nil\". For invisible portions, -it's value is computed as part of `hfy-invisible-name'. +visible portions, its value is \"nil\". For invisible portions, +its value is computed as part of `hfy-invisible-name'. TEXT-ID marks a unique position within a block. It is set to value of `point' at the current buffer position. commit c23f2b5d9e75ca0a8861043ec3d4114c89047b95 Author: Stefan Monnier Date: Mon Mar 26 14:29:49 2018 -0400 Trivial fixes for last changes to package.el and marker.c * lisp/emacs-lisp/package.el (package-quickstart): Add missing version. * src/marker.c (verify_bytepos): Fix typo. diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index b9fdf732ef..94d98178c4 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -3460,19 +3460,21 @@ The list is displayed in a buffer named `*Packages*'." ;; package.el). ;; Other than speeding things up, this also offers a bootstrap feature: -;; it lets us activate packages according to package-load-list and -;; package-user-dir even before those vars are set. +;; it lets us activate packages according to `package-load-list' and +;; `package-user-dir' even before those vars are set. (defcustom package-quickstart nil "Precompute activation actions to speed up startup. This requires the use of `package-quickstart-refresh' every time the activations need to be changed, such as when `package-load-list' is modified." - :type 'boolean) + :type 'boolean + :version "27.1") (defcustom package-quickstart-file (locate-user-emacs-file "package-quickstart.el") "Location of the file used to speed up activation of packages at startup." - :type 'file) + :type 'file + :version "27.1") (defun package--quickstart-maybe-refresh () (if package-quickstart diff --git a/src/marker.c b/src/marker.c index eaae8ff6a9..2a45ae636e 100644 --- a/src/marker.c +++ b/src/marker.c @@ -775,7 +775,7 @@ ptrdiff_t verify_bytepos (ptrdiff_t charpos) { ptrdiff_t below = BEG; - ptrdiff_t below_byte = BYTE_BEG; + ptrdiff_t below_byte = BEG_BYTE; while (below != charpos) { commit 6247a904e6c5a68e21a4af79b52ab22a90d6c389 Author: Paul Eggert Date: Mon Mar 26 09:29:42 2018 -0700 ; Spelling fix diff --git a/src/marker.c b/src/marker.c index 9933d957a5..eaae8ff6a9 100644 --- a/src/marker.c +++ b/src/marker.c @@ -151,7 +151,7 @@ CHECK_MARKER (Lisp_Object x) worst case and it was rarely slower and never by much. The asymptotic behavior is still poor, tho, so in largish buffers with many - overlays (e.g. 300KB and 30K overlays), it can still be a bottlneck. */ + overlays (e.g. 300KB and 30K overlays), it can still be a bottleneck. */ #define BYTECHAR_DISTANCE_INITIAL 50 #define BYTECHAR_DISTANCE_INCREMENT 50 commit 930f7b10b3ee7cff1cbae56a5d38badedb69d6ff Author: Eli Zaretskii Date: Mon Mar 26 18:58:20 2018 +0300 * doc/lispref/functions.texi (Defining Functions): Improve indexing. diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi index 854dd33030..78372a8a10 100644 --- a/doc/lispref/functions.texi +++ b/doc/lispref/functions.texi @@ -611,6 +611,8 @@ Here are some examples: @end group @end example +@cindex override existing functions +@cindex redefine existing functions Be careful not to redefine existing functions unintentionally. @code{defun} redefines even primitive functions such as @code{car} without any hesitation or notification. Emacs does not prevent you commit e7eb5a2eedb2f127288b5e0b3fa7d407a0f6f046 Merge: f5834c9ba0 6dfdf0c9e8 Author: Michael Albinus Date: Mon Mar 26 16:44:01 2018 +0200 Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs commit 6dfdf0c9e8e4aca77b148db8d009c862389c64d3 Author: Stefan Monnier Date: Mon Mar 26 09:41:30 2018 -0400 * lisp/emacs-lisp/package.el: New quickstart feature (package--quickstart-pkgs): New var. (package-activate-1): Obey and fill it. (package-activate-all): New function. (package-initialize): Call it. Set package-initialized before activating the packages. (package-installed-p): Make it work before package.el is initialized in the case where min-version is not specified. (package-install, package-delete): Refresh the quickstart if applicable. (package-quickstart, package-quickstart-file): New vars. (package--quickstart-maybe-refresh, package-quickstart-refresh): New functions. * lisp/startup.el (command-line): Use package-activate-all rather than package-initialize. * doc/lispref/package.texi (Packaging Basics): * doc/emacs/package.texi (Package Installation): * doc/lispref/os.texi (Startup Summary): Refer to package-activate-all. diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi index a69888cdbd..c3cfaabb8d 100644 --- a/doc/emacs/custom.texi +++ b/doc/emacs/custom.texi @@ -2602,17 +2602,16 @@ Type @kbd{C-q}, followed by the key you want to bind, to insert @var{char}. @cindex early init file Most customizations for Emacs can be put in the normal init file, -@file{.emacs} or @file{~/.emacs.d/init.el}. However, it is sometimes -desirable to have customizations that take effect during Emacs startup -earlier than the normal init file is processed. Such customizations -can be put in the early init file, @file{~/.emacs.d/early-init.el}. -This file is loaded before the package system is initialized, so in it -you can customize variables that affect the package initialization -process, such as @code{package-enable-at-startup}, -@code{package-load-list}, and @code{package-user-dir}. Note that -variables like @code{package-archives} which only affect the -installation of new packages, and not the process of making -already-installed packages available, may be customized in the regular +@file{.emacs} or @file{~/.emacs.d/init.el}. However, it is sometimes desirable +to have customizations that take effect during Emacs startup earlier than the +normal init file is processed. Such customizations can be put in the early +init file, @file{~/.emacs.d/early-init.el}. This file is loaded before the +package system and GUI is initialized, so in it you can customize variables +that affect frame appearance as well as the package initialization process, +such as @code{package-enable-at-startup}, @code{package-load-list}, and +@code{package-user-dir}. Note that variables like @code{package-archives} +which only affect the installation of new packages, and not the process of +making already-installed packages available, may be customized in the regular init file. @xref{Package Installation}. For more information on the early init file, @pxref{Init File,,, diff --git a/doc/emacs/package.texi b/doc/emacs/package.texi index be74934872..43f5a8497d 100644 --- a/doc/emacs/package.texi +++ b/doc/emacs/package.texi @@ -263,13 +263,13 @@ startup, change the variable @code{package-enable-at-startup} to is read before loading the regular init file. Currently this variable cannot be set via Customize. -@findex package-initialize +@findex package-activate-all If you have set @code{package-enable-at-startup} to @code{nil}, you can still make packages available either during or after startup. To make installed packages available during startup, call the function -@code{package-initialize} in your init file. To make installed -packages available after startup, invoke the command @kbd{M-x -package-initialize}. +@code{package-activate-all} in your init file. To make installed +packages available after startup, invoke the command @kbd{M-: +(package-activate-all) RET}. @vindex package-load-list For finer control over which packages are made available at startup, diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi index 0e30ad519a..77ecb667f4 100644 --- a/doc/lispref/os.texi +++ b/doc/lispref/os.texi @@ -103,12 +103,12 @@ was specified, Emacs looks for the init file in that user's home directory instead. @item -It calls the function @code{package-initialize} to activate any +It calls the function @code{package-activate-all} to activate any optional Emacs Lisp package that has been installed. @xref{Packaging -Basics}. However, Emacs doesn't initialize packages when +Basics}. However, Emacs doesn't activate the packages when @code{package-enable-at-startup} is @code{nil} or when it's started with one of the options @samp{-q}, @samp{-Q}, or @samp{--batch}. To -initialize packages in the latter case, @code{package-initialize} +activate the packages in the latter case, @code{package-activate-all} should be called explicitly (e.g., via the @samp{--funcall} option). @vindex initial-window-system@r{, and startup} diff --git a/doc/lispref/package.texi b/doc/lispref/package.texi index 7e7a8cd9bc..37c1ee6697 100644 --- a/doc/lispref/package.texi +++ b/doc/lispref/package.texi @@ -105,16 +105,15 @@ adds the package's content directory to @code{load-path}, and evaluates the autoload definitions in @file{@var{name}-autoloads.el}. Whenever Emacs starts up, it automatically calls the function -@code{package-initialize} to make installed packages available to the +@code{package-activate-all} to make installed packages available to the current session. This is done after loading the early init file, but before loading the regular init file (@pxref{Startup Summary}). Packages are not automatically made available if the user option @code{package-enable-at-startup} is set to @code{nil} in the early init file. -@deffn Command package-initialize &optional no-activate -This function initializes Emacs' internal record of which packages are -installed, and makes the packages available to the current session. +@defun package-activate-all +This function makes the packages available to the current session. The user option @code{package-load-list} specifies which packages to make available; by default, all installed packages are made available. If called during startup, this function also sets @@ -122,15 +121,20 @@ If called during startup, this function also sets evaluating package autoloads more than once. @xref{Package Installation,,, emacs, The GNU Emacs Manual}. -The optional argument @var{no-activate}, if non-@code{nil}, causes -Emacs to update its record of installed packages without actually -making them available; it is for internal use only. - -In most cases, you should not need to call @code{package-initialize}, +In most cases, you should not need to call @code{package-activate-all}, as this is done automatically during startup. Simply make sure to put -any code that should run before @code{package-initialize} in the early +any code that should run before @code{package-activate-all} in the early init file, and any code that should run after it in the primary init file (@pxref{Init File,,, emacs, The GNU Emacs Manual}). +@end defun + +@deffn Command package-initialize &optional no-activate +This function initializes Emacs' internal record of which packages are +installed, and then calls @code{package-activate-all}. + +The optional argument @var{no-activate}, if non-@code{nil}, causes +Emacs to update its record of installed packages without actually +making them available. @end deffn @node Simple Packages diff --git a/etc/NEWS b/etc/NEWS index 2f43125cef..04774c13e5 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -59,14 +59,20 @@ package system is initialized given that initialization now happens before loading the regular init file (see below). +++ -** Emacs now calls 'package-initialize' before loading the init file. +** Installed packages are now activated *before* loading the init file. This is part of a change intended to eliminate the behavior of package.el inserting a call to 'package-initialize' into the init file, which was previously done when Emacs was started. As a result of this change, it is no longer necessary to call 'package-initialize' -in your init file. However, if your init file changes the values of -'package-load-list' or 'package-user-dir', then that code needs to be -moved to the early init file (see above). +in your init file. + +However, if your init file changes the values of 'package-load-list' or +'package-user-dir', or sets 'package-enable-at-startup' to nil then it won't +work right without some adjustment: +- you can move that code to the early init file (see above), so those settings + apply before Emacs tries to activate the packages. +- you can use the new 'package-quickstart` so activation of packages does not + need to pay attention to 'package-load-list' or 'package-user-dir' any more. * Changes in Emacs 27.1 @@ -149,6 +155,17 @@ for abbrevs that have them. It now treats the optional 2nd argument to mean that the URL should be shown in the currently selected window. +** Package +*** New 'package-quickstart' feature +When 'package-quickstart' is non-nil, package.el precomputes a big autoloads +file so that activation of packages can be done much faster, which can speed up +your startup significantly. +It also causes variables like package-user-dir and package-load-list to be +consulted when 'package-quickstart-refresh' is run rather than at startup so +you don't need to set them in your early init file. + +*** New function 'package-activate-all'. + ** Ecomplete *** The ecomplete sorting has changed to a decay-based algorithm. This can be controlled by the new `ecomplete-sort-predicate' variable. diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 67533679b9..b9fdf732ef 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -681,6 +681,9 @@ PKG-DESC is a `package-desc' object." (defvar Info-directory-list) (declare-function info-initialize "info" ()) +(defvar package--quickstart-pkgs t + "If set to a list, we're computing the set of pkgs to activate.") + (defun package--load-files-for-activation (pkg-desc reload) "Load files for activating a package given by PKG-DESC. Load the autoloads file, and ensure `load-path' is setup. If @@ -723,7 +726,10 @@ correspond to previously loaded files (those returned by (message "Unable to activate package `%s'.\nRequired package `%s-%s' is unavailable" name (car req) (package-version-join (cadr req))) (throw 'exit nil)))) - (package--load-files-for-activation pkg-desc reload) + (if (listp package--quickstart-pkgs) + ;; We're only collecting the set of packages to activate! + (push pkg-desc package--quickstart-pkgs) + (package--load-files-for-activation pkg-desc reload)) ;; Add info node. (when (file-exists-p (expand-file-name "dir" pkg-dir)) ;; FIXME: not the friendliest, but simple. @@ -1463,18 +1469,34 @@ that code in the early init-file." (setq package-enable-at-startup nil) (package-load-all-descriptors) (package-read-all-archive-contents) + (setq package--initialized t) (unless no-activate + (package-activate-all)) + ;; This uses `package--mapc' so it must be called after + ;; `package--initialized' is t. + (package--build-compatibility-table)) + +(defvar package-quickstart-file) + +;;;###autoload +(defun package-activate-all () + "Activate all installed packages. +The variable `package-load-list' controls which packages to load." + (setq package-enable-at-startup nil) + (if (file-readable-p package-quickstart-file) + ;; Skip load-source-file-function which would slow us down by a factor + ;; 2 (this assumes we were careful to save this file so it doesn't need + ;; any decoding). + (let ((load-source-file-function nil)) + (load package-quickstart-file)) + (unless package--initialized + (package-initialize t)) (dolist (elt package-alist) (condition-case err (package-activate (car elt)) ;; Don't let failure of activation of a package arbitrarily stop ;; activation of further packages. - (error (message "%s" (error-message-string err)))))) - (setq package--initialized t) - ;; This uses `package--mapc' so it must be called after - ;; `package--initialized' is t. - (package--build-compatibility-table)) - + (error (message "%s" (error-message-string err))))))) ;;;; Populating `package-archive-contents' from archives ;; This subsection populates the variables listed above from the @@ -1856,18 +1878,26 @@ If PACKAGE is a symbol, it is the package name and MIN-VERSION should be a version list. If PACKAGE is a `package-desc' object, MIN-VERSION is ignored." - (unless package--initialized (error "package.el is not yet initialized!")) - (if (package-desc-p package) - (let ((dir (package-desc-dir package))) + (cond + ((package-desc-p package) + (let ((dir (package-desc-dir package))) (and (stringp dir) - (file-exists-p dir))) + (file-exists-p dir)))) + ((and (not package--initialized) + (null min-version) + package-activated-list) + ;; We used the quickstart: make it possible to use package-installed-p + ;; even before package is fully initialized. + (memq package package-activated-list)) + ((not package--initialized) (error "package.el is not yet initialized!")) + (t (or (let ((pkg-descs (cdr (assq package package-alist)))) (and pkg-descs (version-list-<= min-version (package-desc-version (car pkg-descs))))) ;; Also check built-in packages. - (package-built-in-p package min-version)))) + (package-built-in-p package min-version))))) (defun package-download-transaction (packages) "Download and install all the packages in PACKAGES. @@ -1918,7 +1948,9 @@ to install it but still mark it as selected." (package-compute-transaction (list pkg) (package-desc-reqs pkg))) (package-compute-transaction () (list (list pkg)))))) - (package-download-transaction transaction) + (progn + (package-download-transaction transaction) + (package--quickstart-maybe-refresh)) (message "`%s' is already installed" name)))) (defun package-strip-rcs-id (str) @@ -2090,7 +2122,9 @@ If NOSAVE is non-nil, the package is not removed from (delete pkg-desc pkgs) (unless (cdr pkgs) (setq package-alist (delq pkgs package-alist)))) - (message "Package `%s' deleted." (package-desc-full-name pkg-desc)))))) + (package--quickstart-maybe-refresh) + (message "Package `%s' deleted." + (package-desc-full-name pkg-desc)))))) ;;;###autoload (defun package-reinstall (pkg) @@ -3415,6 +3449,95 @@ The list is displayed in a buffer named `*Packages*'." (interactive) (list-packages t)) +;;;; Quickstart: precompute activation actions for faster start up. + +;; Activating packages via `package-initialize' is costly: for N installed +;; packages, it needs to read all N -pkg.el files first to decide +;; which packages to activate, and then again N -autoloads.el files. +;; To speed this up, we precompute a mega-autoloads file which is the +;; concatenation of all those -autoloads.el, so we can activate +;; all packages by loading this one file (and hence without initializing +;; package.el). + +;; Other than speeding things up, this also offers a bootstrap feature: +;; it lets us activate packages according to package-load-list and +;; package-user-dir even before those vars are set. + +(defcustom package-quickstart nil + "Precompute activation actions to speed up startup. +This requires the use of `package-quickstart-refresh' every time the +activations need to be changed, such as when `package-load-list' is modified." + :type 'boolean) + +(defcustom package-quickstart-file + (locate-user-emacs-file "package-quickstart.el") + "Location of the file used to speed up activation of packages at startup." + :type 'file) + +(defun package--quickstart-maybe-refresh () + (if package-quickstart + ;; FIXME: Delay refresh in case we're installing/deleting + ;; several packages! + (package-quickstart-refresh) + (delete-file package-quickstart-file))) + +(defun package-quickstart-refresh () + "(Re)Generate the `package-quickstart-file'." + (interactive) + (package-initialize 'no-activate) + (require 'info) + (let ((package--quickstart-pkgs ()) + ;; Pretend we haven't activated anything yet! + (package-activated-list ()) + ;; Make sure we can load this file without load-source-file-function. + (coding-system-for-write 'emacs-internal) + (Info-directory-list '(""))) + (dolist (elt package-alist) + (condition-case err + (package-activate (car elt)) + ;; Don't let failure of activation of a package arbitrarily stop + ;; activation of further packages. + (error (message "%s" (error-message-string err))))) + (setq package--quickstart-pkgs (nreverse package--quickstart-pkgs)) + (with-temp-file package-quickstart-file + (emacs-lisp-mode) ;For `syntax-ppss'. + (insert ";;; Quickstart file to activate all packages at startup -*- lexical-binding:t -*-\n") + (insert ";; ¡¡ This file is autogenerated by `package-quickstart-refresh', DO NOT EDIT !!\n\n") + (dolist (pkg package--quickstart-pkgs) + (let* ((file + ;; Prefer uncompiled files (and don't accept .so files). + (let ((load-suffixes '(".el" ".elc"))) + (locate-library (package--autoloads-file-name pkg)))) + (pfile (prin1-to-string file))) + (insert "(let ((load-file-name " pfile "))\n") + (insert-file-contents file) + ;; Fixup the special #$ reader form and throw away comments. + (while (re-search-forward "#\\$\\|^;\\(.*\n\\)" nil 'move) + (unless (nth 8 (syntax-ppss)) + (replace-match (if (match-end 1) "" pfile) t t))) + (unless (bolp) (insert "\n")) + (insert ")\n"))) + (pp `(setq package-activated-list + (append ',(mapcar #'package-desc-name package--quickstart-pkgs) + package-activated-list)) + (current-buffer)) + (let ((info-dirs (butlast Info-directory-list))) + (when info-dirs + (pp `(progn (require 'info) + (info-initialize) + (setq Info-directory-list + (append ',info-dirs Info-directory-list))) + (current-buffer)))) + ;; Use `\s' instead of a space character, so this code chunk is not + ;; mistaken for an actual file-local section of package.el. + (insert " +;; Local\sVariables: +;; version-control: never +;; no-byte-compile: t +;; no-update-autoloads: t +;; End: +")))) + (provide 'package) ;;; package.el ends here diff --git a/lisp/files.el b/lisp/files.el index bad2639fa6..1491f6049c 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -3627,7 +3627,8 @@ local variables, but directory-local variables may still be applied." (push (cons (if (eq var 'eval) 'eval (indirect-variable var)) - val) result)))))) + val) + result)))))) (forward-line 1)))))))) ;; Now we've read all the local variables. ;; If HANDLE-MODE is t, return whether the mode was specified. diff --git a/lisp/startup.el b/lisp/startup.el index 2669342eda..1faeabf23b 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -1185,7 +1185,7 @@ please check its value") (package--description-file subdir) subdir)))) (throw 'package-dir-found t))))))) - (package-initialize)) + (package-activate-all)) ;; Make sure window system's init file was loaded in loadup.el if ;; using a window system. commit b300052fb4ef1261519b0fd57f5eb186c2d10295 Author: Stefan Monnier Date: Mon Mar 26 09:01:30 2018 -0400 * src/marker.c: Try and speed up byte<->char conversion with many markers. When considering markers (to find a starting point for the conversion), typically one of the two bounds is nearby (coming from cached_(byte|char)pos) but the other is far (point-min or point-max), so change the exit condition so we stop as soon as *one* of the bounds is near. (BYTECHAR_DISTANCE_INITIAL, BYTECHAR_DISTANCE_INCREMENT): New constants. (buf_charpos_to_bytepos, buf_bytepos_to_charpos): Use them to try and reduce the number of markers we consider. diff --git a/src/marker.c b/src/marker.c index 7773c4fce0..9933d957a5 100644 --- a/src/marker.c +++ b/src/marker.c @@ -90,7 +90,7 @@ clear_charpos_cache (struct buffer *b) #define CONSIDER(CHARPOS, BYTEPOS) \ { \ ptrdiff_t this_charpos = (CHARPOS); \ - bool changed = 0; \ + bool changed = false; \ \ if (this_charpos == charpos) \ { \ @@ -105,14 +105,14 @@ clear_charpos_cache (struct buffer *b) { \ best_above = this_charpos; \ best_above_byte = (BYTEPOS); \ - changed = 1; \ + changed = true; \ } \ } \ else if (this_charpos > best_below) \ { \ best_below = this_charpos; \ best_below_byte = (BYTEPOS); \ - changed = 1; \ + changed = true; \ } \ \ if (changed) \ @@ -133,6 +133,28 @@ CHECK_MARKER (Lisp_Object x) CHECK_TYPE (MARKERP (x), Qmarkerp, x); } +/* When converting bytes from/to chars, we look through the list of + markers to try and find a good starting point (since markers keep + track of both bytepos and charpos at the same time). + But if there are many markers, it can take too much time to find a "good" + marker from which to start. Worse yet: if it takes a long time and we end + up finding a nearby markers, we won't add a new marker to cache this + result, so next time around we'll have to go through this same long list + to (re)find this best marker. So the further down the list of + markers we go, the less demanding we are w.r.t what is a good marker. + + The previous code used INITIAL=50 and INCREMENT=0 and this lead to + really poor performance when there are many markers. + I haven't tried to tweak INITIAL, but experiments on my trusty Thinkpad + T61 using various artificial test cases seem to suggest that INCREMENT=50 + might be "the best compromise": it significantly improved the + worst case and it was rarely slower and never by much. + + The asymptotic behavior is still poor, tho, so in largish buffers with many + overlays (e.g. 300KB and 30K overlays), it can still be a bottlneck. */ +#define BYTECHAR_DISTANCE_INITIAL 50 +#define BYTECHAR_DISTANCE_INCREMENT 50 + /* Return the byte position corresponding to CHARPOS in B. */ ptrdiff_t @@ -141,6 +163,7 @@ buf_charpos_to_bytepos (struct buffer *b, ptrdiff_t charpos) struct Lisp_Marker *tail; ptrdiff_t best_above, best_above_byte; ptrdiff_t best_below, best_below_byte; + ptrdiff_t distance = BYTECHAR_DISTANCE_INITIAL; eassert (BUF_BEG (b) <= charpos && charpos <= BUF_Z (b)); @@ -180,8 +203,11 @@ buf_charpos_to_bytepos (struct buffer *b, ptrdiff_t charpos) /* If we are down to a range of 50 chars, don't bother checking any other markers; scan the intervening chars directly now. */ - if (best_above - best_below < 50) + if (best_above - charpos < distance + || charpos - best_below < distance) break; + else + distance += BYTECHAR_DISTANCE_INCREMENT; } /* We get here if we did not exactly hit one of the known places. @@ -248,7 +274,7 @@ buf_charpos_to_bytepos (struct buffer *b, ptrdiff_t charpos) #define CONSIDER(BYTEPOS, CHARPOS) \ { \ ptrdiff_t this_bytepos = (BYTEPOS); \ - int changed = 0; \ + int changed = false; \ \ if (this_bytepos == bytepos) \ { \ @@ -263,14 +289,14 @@ buf_charpos_to_bytepos (struct buffer *b, ptrdiff_t charpos) { \ best_above = (CHARPOS); \ best_above_byte = this_bytepos; \ - changed = 1; \ + changed = true; \ } \ } \ else if (this_bytepos > best_below_byte) \ { \ best_below = (CHARPOS); \ best_below_byte = this_bytepos; \ - changed = 1; \ + changed = true; \ } \ \ if (changed) \ @@ -293,6 +319,7 @@ buf_bytepos_to_charpos (struct buffer *b, ptrdiff_t bytepos) struct Lisp_Marker *tail; ptrdiff_t best_above, best_above_byte; ptrdiff_t best_below, best_below_byte; + ptrdiff_t distance = BYTECHAR_DISTANCE_INITIAL; eassert (BUF_BEG_BYTE (b) <= bytepos && bytepos <= BUF_Z_BYTE (b)); @@ -323,8 +350,11 @@ buf_bytepos_to_charpos (struct buffer *b, ptrdiff_t bytepos) /* If we are down to a range of 50 chars, don't bother checking any other markers; scan the intervening chars directly now. */ - if (best_above - best_below < 50) + if (best_above - bytepos < distance + || bytepos - best_below < distance) break; + else + distance += BYTECHAR_DISTANCE_INCREMENT; } /* We get here if we did not exactly hit one of the known places. @@ -744,8 +774,8 @@ count_markers (struct buffer *buf) ptrdiff_t verify_bytepos (ptrdiff_t charpos) { - ptrdiff_t below = 1; - ptrdiff_t below_byte = 1; + ptrdiff_t below = BEG; + ptrdiff_t below_byte = BYTE_BEG; while (below != charpos) { commit f5834c9ba06529bcd0a6da464f0a808e1be53c5c Author: Michael Albinus Date: Mon Mar 26 14:33:24 2018 +0200 Fix problem with trailing slash in Tramp * lisp/net/tramp.el (tramp-handle-file-truename): * lisp/net/tramp-adb.el (tramp-adb-handle-file-truename): * lisp/net/tramp-sh.el (tramp-sh-handle-file-truename): Fix problem with trailing slash. * test/lisp/net/tramp-tests.el (tramp-test21-file-links): Test also quoted directories. diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el index 7a0ea71aee..fbf6196ca4 100644 --- a/lisp/net/tramp-adb.el +++ b/lisp/net/tramp-adb.el @@ -278,13 +278,16 @@ pass to the OPERATION." ;; code could be shared? (defun tramp-adb-handle-file-truename (filename) "Like `file-truename' for Tramp files." - (format - "%s%s" + ;; Preserve trailing "/". + (funcall + (if (string-equal (file-name-nondirectory filename) "") + 'file-name-as-directory 'identity) (with-parsed-tramp-file-name (expand-file-name filename) nil (tramp-make-tramp-file-name v (with-tramp-file-property v localname "file-truename" - (let ((result nil)) ; result steps in reverse order + (let ((result nil) ; result steps in reverse order + (quoted (tramp-compat-file-name-quoted-p localname))) (tramp-message v 4 "Finding true name for `%s'" filename) (let* ((steps (split-string localname "/" 'omit)) (localnamedir (tramp-run-real-handler @@ -354,11 +357,19 @@ pass to the OPERATION." (not (string= (substring result -1) "/")))) (setq result (concat result "/")))) + ;; Detect cycle. + (when (and (file-symlink-p filename) + (string-equal result localname)) + (tramp-error + v 'file-error + "Apparent cycle of symbolic links for %s" filename)) + ;; If the resulting localname looks remote, we must quote it + ;; for security reasons. + (when (or quoted (file-remote-p result)) + (let (file-name-handler-alist) + (setq result (tramp-compat-file-name-quote result)))) (tramp-message v 4 "True name of `%s' is `%s'" localname result) - result)))) - - ;; Preserve trailing "/". - (if (string-equal (file-name-nondirectory filename) "") "/" ""))) + result)))))) (defun tramp-adb-handle-file-attributes (filename &optional id-format) "Like `file-attributes' for Tramp files." diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 4d7359a4c9..4cdc39e0b6 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -1128,8 +1128,10 @@ component is used as the target of the symlink." (defun tramp-sh-handle-file-truename (filename) "Like `file-truename' for Tramp files." - (format - "%s%s" + ;; Preserve trailing "/". + (funcall + (if (string-equal (file-name-nondirectory filename) "") + 'file-name-as-directory 'identity) (with-parsed-tramp-file-name (expand-file-name filename) nil (tramp-make-tramp-file-name method user domain host port @@ -1233,10 +1235,7 @@ component is used as the target of the symlink." (let (file-name-handler-alist) (setq result (tramp-compat-file-name-quote result)))) (tramp-message v 4 "True name of `%s' is `%s'" localname result) - result)))) - - ;; Preserve trailing "/". - (if (string-equal (file-name-nondirectory filename) "") "/" ""))) + result)))))) ;; Basic functions. diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 255c58e48f..4497802d77 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -3208,17 +3208,18 @@ User is always nil." (defun tramp-handle-file-truename (filename) "Like `file-truename' for Tramp files." - (let ((result (expand-file-name filename)) - (numchase 0) - ;; Don't make the following value larger than - ;; necessary. People expect an error message in a - ;; timely fashion when something is wrong; - ;; otherwise they might think that Emacs is hung. - ;; Of course, correctness has to come first. - (numchase-limit 20) - symlink-target) - (format - "%s%s" + ;; Preserve trailing "/". + (funcall + (if (string-equal (file-name-nondirectory filename) "") + 'file-name-as-directory 'identity) + (let ((result (expand-file-name filename)) + (numchase 0) + ;; Don't make the following value larger than necessary. + ;; People expect an error message in a timely fashion when + ;; something is wrong; otherwise they might think that Emacs + ;; is hung. Of course, correctness has to come first. + (numchase-limit 20) + symlink-target) (with-parsed-tramp-file-name result v1 (with-tramp-file-property v1 v1-localname "file-truename" (while (and (setq symlink-target (file-symlink-p result)) @@ -3243,10 +3244,7 @@ User is always nil." (tramp-error v1 'file-error "Maximum number (%d) of symlinks exceeded" numchase-limit))) - (directory-file-name result))) - - ;; Preserve trailing "/". - (if (string-equal (file-name-nondirectory filename) "") "/" "")))) + (directory-file-name result)))))) (defun tramp-handle-find-backup-file-name (filename) "Like `find-backup-file-name' for Tramp files." diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index 8e21f5220f..5851840d00 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el @@ -3117,13 +3117,15 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." (delete-file tmp-name1) (delete-file tmp-name2))) - ;; `file-truename' shall preserve trailing link of directories. - (unless (file-symlink-p tramp-test-temporary-file-directory) - (let* ((dir1 (directory-file-name tramp-test-temporary-file-directory)) - (dir2 (file-name-as-directory dir1))) - (should (string-equal (file-truename dir1) (expand-file-name dir1))) - (should - (string-equal (file-truename dir2) (expand-file-name dir2)))))))) + ;; `file-truename' shall preserve trailing slash of directories. + (let* ((dir1 + (directory-file-name + (funcall + (if quoted 'tramp-compat-file-name-quote 'identity) + tramp-test-temporary-file-directory))) + (dir2 (file-name-as-directory dir1))) + (should (string-equal (file-truename dir1) (expand-file-name dir1))) + (should (string-equal (file-truename dir2) (expand-file-name dir2))))))) (ert-deftest tramp-test22-file-times () "Check `set-file-times' and `file-newer-than-file-p'." commit 9c1176247b107fd6e1845618b78ad56b5d57ddd9 (refs/remotes/origin/feature/deps-download) Author: Phillip Lord Date: Mon Mar 26 12:49:50 2018 +0100 Remove architecture dependent source downloads * admin/nt/dist-build/build-dep-zips.py: diff --git a/admin/nt/dist-build/build-dep-zips.py b/admin/nt/dist-build/build-dep-zips.py index 493a128c09..e6c1ce8ff3 100755 --- a/admin/nt/dist-build/build-dep-zips.py +++ b/admin/nt/dist-build/build-dep-zips.py @@ -35,9 +35,9 @@ ## Packages to fiddle with SKIP_PKGS=["mingw-w64-gcc-libs"] MUNGE_PKGS ={"mingw-w64-libwinpthread-git":"mingw-w64-winpthreads-git"} -ARCH_PKGS=["mingw-w64-mpc", - "mingw-w64-termcap", - "mingw-w64-xpm-nox"] + +## Currently no packages seem to require this! +ARCH_PKGS=[] SRC_REPO="https://sourceforge.net/projects/msys2/files/REPOS/MINGW/Sources" @@ -49,6 +49,7 @@ def check_output_maybe(*args,**kwargs): def extract_deps(): + print( "Extracting deps" ) # This list derives from the features we want Emacs to compile with. PKG_REQ='''mingw-w64-x86_64-giflib mingw-w64-x86_64-gnutls commit 95ccf50e37dc5a55ea19283ef208e4fd3aad5ff8 Author: Aaron Jensen Date: Wed Mar 21 22:30:08 2018 -0700 Fix crash after frame is freed on macOS (bug#30800) * src/nsterm.m (x_free_frame_resources): Clear represented_frame. (bug#30800) diff --git a/src/nsterm.m b/src/nsterm.m index 3d58cd5ec6..c8ae31abc0 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -1692,6 +1692,10 @@ -(void)remove dpyinfo->x_highlight_frame = 0; if (f == hlinfo->mouse_face_mouse_frame) reset_mouse_highlight (hlinfo); + /* Ensure that sendEvent does not attempt to dereference a freed + frame. (bug#30800) */ + if (represented_frame == f) + represented_frame = NULL; if (f->output_data.ns->miniimage != nil) [f->output_data.ns->miniimage release]; commit 1be6a21fd8b5ade67f7f69f964331aa570623683 Author: Eric Skoglund Date: Fri Mar 16 14:49:56 2018 +0100 Make eshell/kill handle - and - (Bug#29156) * lisp/eshell/esh-proc.el (eshell/kill): Handle the argument parsing and numeric conversion in function in order to parse -signal and -SIGNALNAME correctly. * doc/misc/eshell.texi (kill): Update docs to reflect new function behaviour. * etc/NEWS: Mention new eshell/kill behaviour. diff --git a/doc/misc/eshell.texi b/doc/misc/eshell.texi index 80077e5ccd..bda6159488 100644 --- a/doc/misc/eshell.texi +++ b/doc/misc/eshell.texi @@ -330,7 +330,7 @@ List subprocesses of the Emacs process, if any, using the function @item kill @cmindex kill Kill processes. Takes a PID or a process object and an optional -signal specifier. +signal specifier which can either be a number or a signal name. @item listify @cmindex listify diff --git a/etc/NEWS b/etc/NEWS index d1db830afa..2f43125cef 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -278,6 +278,11 @@ To restore the old behavior, use *** The function 'shell-uniquify-list' has been renamed from 'eshell-uniqify-list'. +*** The function eshell/kill is now able to handle signal switches. +Previously eshell/kill would fail if provided a kill signal to send to the +process. It now accepts signals specified either by name or by its number. + + ** Pcomplete *** The function 'pcomplete-uniquify-list' has been renamed from 'pcomplete-uniqify-list'. diff --git a/lisp/eshell/esh-proc.el b/lisp/eshell/esh-proc.el index b3bd7a7245..a7855d81db 100644 --- a/lisp/eshell/esh-proc.el +++ b/lisp/eshell/esh-proc.el @@ -167,7 +167,8 @@ The signals which will cause this to happen are matched by (defun eshell/kill (&rest args) "Kill processes. Usage: kill [-] | ... -Accepts PIDs and process objects." +Accepts PIDs and process objects. Optionally accept signals +and signal names." ;; If the first argument starts with a dash, treat it as the signal ;; specifier. (let ((signum 'SIGINT)) @@ -178,12 +179,12 @@ Accepts PIDs and process objects." ((string-match "\\`-[[:digit:]]+\\'" arg) (setq signum (abs (string-to-number arg)))) ((string-match "\\`-\\([[:upper:]]+\\|[[:lower:]]+\\)\\'" arg) - (setq signum (abs (string-to-number arg))))) + (setq signum (intern (substring arg 1))))) (setq args (cdr args)))) (while args (let ((arg (if (eshell-processp (car args)) (process-id (car args)) - (car args)))) + (string-to-number (car args))))) (when arg (cond ((null arg) @@ -198,6 +199,8 @@ Accepts PIDs and process objects." (setq args (cdr args)))) nil) +(put 'eshell/kill 'eshell-no-numeric-conversions t) + (defun eshell-read-process-name (prompt) "Read the name of a process from the minibuffer, using completion. The prompt will be set to PROMPT." commit 45d04754e718846b1a2a84a1eac6b5a54f3ade16 Author: Michael Albinus Date: Sun Mar 25 15:15:20 2018 +0200 More manual editing * doc/emacs/basic.texi: * doc/emacs/calendar.texi: * doc/emacs/display.texi: * doc/emacs/mini.texi: * doc/emacs/misc.texi: * doc/emacs/picture-xtra.texi: * doc/misc/info.texi: Prefer and over and . Add missing @kindex entries. * doc/emacs/custom.texi (Function Keys): Fix and add missing key symbols. diff --git a/doc/emacs/basic.texi b/doc/emacs/basic.texi index 3fec5f44de..f911c673bf 100644 --- a/doc/emacs/basic.texi +++ b/doc/emacs/basic.texi @@ -285,12 +285,18 @@ displays, @kbd{C-@key{END}} does the same. @item C-v @itemx @key{PageDown} @itemx @key{next} +@kindex C-v +@kindex PageDown +@kindex next Scroll the display one screen forward, and move point onscreen if necessary (@code{scroll-up-command}). @xref{Scrolling}. @item M-v @itemx @key{PageUp} @itemx @key{prior} +@kindex M-v +@kindex PageUp +@kindex prior Scroll one screen backward, and move point onscreen if necessary (@code{scroll-down-command}). @xref{Scrolling}. diff --git a/doc/emacs/calendar.texi b/doc/emacs/calendar.texi index c6a84b5ab1..7021146e69 100644 --- a/doc/emacs/calendar.texi +++ b/doc/emacs/calendar.texi @@ -246,9 +246,11 @@ Scroll calendar one month forward (@code{calendar-scroll-left}). @item < Scroll calendar one month backward (@code{calendar-scroll-right}). @item C-v +@itemx @key{PageDown} @itemx @key{next} Scroll forward by three months (@code{calendar-scroll-left-three-months}). @item M-v +@itemx @key{PageUp} @itemx @key{prior} Scroll backward by three months (@code{calendar-scroll-right-three-months}). @end table @@ -264,8 +266,12 @@ calendar contents one month forward in time. @kbd{<} scrolls the contents one month backwards in time. @kindex C-v @r{(Calendar mode)} +@kindex PageDown @r{(Calendar mode)} +@kindex next @r{(Calendar mode)} @findex calendar-scroll-left-three-months @kindex M-v @r{(Calendar mode)} +@kindex PageUp @r{(Calendar mode)} +@kindex prior @r{(Calendar mode)} @findex calendar-scroll-right-three-months The commands @kbd{C-v} and @kbd{M-v} scroll the calendar by an entire screenful---three months---in analogy with the usual meaning of @@ -275,8 +281,9 @@ repeat count; in particular, since @kbd{C-u} multiplies the next command by four, typing @kbd{C-u C-v} scrolls the calendar forward by a year and typing @kbd{C-u M-v} scrolls the calendar backward by a year. - The function keys @key{next} and @key{prior} are equivalent to -@kbd{C-v} and @kbd{M-v}, just as they are in other modes. + The function keys @key{PageDown} (or @key{next}) and @key{PageUp} +(or @key{prior}) are equivalent to @kbd{C-v} and @kbd{M-v}, just as +they are in other modes. @node Counting Days @section Counting Days diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi index ee4b6a1b88..e64686fe8b 100644 --- a/doc/emacs/custom.texi +++ b/doc/emacs/custom.texi @@ -1852,10 +1852,10 @@ the corresponding Lisp symbol. Here are the conventional Lisp names for common function keys: @table @asis -@item @code{LEFT}, @code{UP}, @code{RIGHT}, @code{DOWN} +@item @code{left}, @code{up}, @code{right}, @code{down} Cursor arrow keys. -@item @code{Begin}, @code{End}, @code{Home}, @code{next}, @code{prior} +@item @code{begin}, @code{end}, @code{home}, @code{next}, @code{prior} Other cursor repositioning keys. @item @code{select}, @code{print}, @code{execute}, @code{backtab} @@ -1869,6 +1869,9 @@ Numbered function keys (across the top of the keyboard). @item @code{kp-add}, @code{kp-subtract}, @code{kp-multiply}, @code{kp-divide} @itemx @code{kp-backtab}, @code{kp-space}, @code{kp-tab}, @code{kp-enter} @itemx @code{kp-separator}, @code{kp-decimal}, @code{kp-equal} +@itemx @code{kp-prior}, @code{kp-next}, @code{kp-end}, @code{kp-home} +@itemx @code{kp-left}, @code{kp-up}, @code{kp-right}, @code{kp-down} +@itemx @code{kp-insert }, @code{kp-delete} Keypad keys (to the right of the regular keyboard), with names or punctuation. @item @code{kp-0}, @code{kp-1}, @dots{} @code{kp-9} diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi index 42a5227983..c60cf64914 100644 --- a/doc/emacs/display.texi +++ b/doc/emacs/display.texi @@ -68,21 +68,21 @@ Scrolling}). You can also scroll explicitly with these commands: @table @kbd @item C-v -@itemx @key{next} @itemx @key{PageDown} +@itemx @key{next} Scroll forward by nearly a full window (@code{scroll-up-command}). @item M-v -@itemx @key{prior} @itemx @key{PageUp} +@itemx @key{prior} Scroll backward (@code{scroll-down-command}). @end table @kindex C-v @kindex M-v -@kindex next -@kindex prior @kindex PageDown @kindex PageUp +@kindex next +@kindex prior @findex scroll-up-command @findex scroll-down-command @kbd{C-v} (@code{scroll-up-command}) scrolls forward by nearly the @@ -90,10 +90,10 @@ whole window height. The effect is to take the two lines at the bottom of the window and put them at the top, followed by lines that were not previously visible. If point was in the text that scrolled off the top, it ends up on the window's new topmost line. The -@key{next} (or @key{PageDown}) key is equivalent to @kbd{C-v}. +@key{PageDown} (or @key{next}) key is equivalent to @kbd{C-v}. @kbd{M-v} (@code{scroll-down-command}) scrolls backward in a similar -way. The @key{prior} (or @key{PageUp}) key is equivalent to +way. The @key{PageUp} (or @key{prior}) key is equivalent to @kbd{M-v}. @vindex next-screen-context-lines diff --git a/doc/emacs/mini.texi b/doc/emacs/mini.texi index b4ebb7d241..e180d1d185 100644 --- a/doc/emacs/mini.texi +++ b/doc/emacs/mini.texi @@ -216,9 +216,9 @@ window automatically. The default value is 0.25. The @kbd{C-M-v} command in the minibuffer scrolls the help text from commands that display help text of any sort in another window. You -can also scroll the help text with @kbd{M-@key{prior}} and -@kbd{M-@key{next}} (or, equivalently, @kbd{M-@key{PageUp}} and -@kbd{M-@key{PageDown}}). This is especially useful with long lists of +can also scroll the help text with @kbd{M-@key{PageUp}} and +@kbd{M-@key{PageDown}} (or, equivalently, @kbd{M-@key{prior}} and +@kbd{M-@key{next}}). This is especially useful with long lists of possible completions. @xref{Other Window}. @vindex enable-recursive-minibuffers @@ -812,7 +812,7 @@ File ‘foo.el’ exists; overwrite? (y or n) Because this query does not actually use the minibuffer, the usual minibuffer editing commands cannot be used. However, you can perform some window scrolling operations while the query is active: @kbd{C-l} -recenters the selected window; @kbd{C-v} (or @key{PageDown} or +recenters the selected window; @kbd{C-v} (or @key{PageDown}, or @key{next}) scrolls forward; @kbd{M-v} (or @key{PageUp}, or @key{prior}) scrolls backward; @kbd{C-M-v} scrolls forward in the next window; and @kbd{C-M-S-v} scrolls backward in the next window. Typing diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi index ba90904ff3..28ff8a0adb 100644 --- a/doc/emacs/misc.texi +++ b/doc/emacs/misc.texi @@ -492,12 +492,16 @@ displays the next page if you are at the end of the current page. @findex doc-view-previous-page @kindex n @r{(DocView mode)} @kindex p @r{(DocView mode)} +@kindex PageDown @r{(DocView mode)} +@kindex PageUp @r{(DocView mode)} +@kindex next @r{(DocView mode)} +@kindex prior @r{(DocView mode)} @kindex C-x ] @r{(DocView mode)} @kindex C-x [ @r{(DocView mode)} - You can also display the next page by typing @kbd{n}, @key{next} or -@kbd{C-x ]} (@code{doc-view-next-page}). To display the previous -page, type @kbd{p}, @key{prior} or @kbd{C-x [} -(@code{doc-view-previous-page}). + You can also display the next page by typing @kbd{n}, +@key{PageDown}, @key{next} or @kbd{C-x ]} (@code{doc-view-next-page}). +To display the previous page, type @kbd{p}, @key{PageUp}, @key{prior} +or @kbd{C-x [} (@code{doc-view-previous-page}). @findex doc-view-scroll-up-or-next-page @findex doc-view-scroll-down-or-previous-page diff --git a/doc/emacs/picture-xtra.texi b/doc/emacs/picture-xtra.texi index 8a9dbcfd11..288a6e89aa 100644 --- a/doc/emacs/picture-xtra.texi +++ b/doc/emacs/picture-xtra.texi @@ -136,13 +136,23 @@ Picture}). @findex picture-movement-sw @findex picture-movement-se @kindex C-c < @r{(Picture mode)} +@kindex C-c LEFT @r{(Picture mode)} @kindex C-c > @r{(Picture mode)} +@kindex C-c RIGHT @r{(Picture mode)} @kindex C-c ^ @r{(Picture mode)} +@kindex C-c UP @r{(Picture mode)} @kindex C-c . @r{(Picture mode)} +@kindex C-c DOWN @r{(Picture mode)} @kindex C-c ` @r{(Picture mode)} +@kindex C-c Home @r{(Picture mode)} @kindex C-c ' @r{(Picture mode)} +@kindex C-c PageUp @r{(Picture mode)} +@kindex C-c prior @r{(Picture mode)} @kindex C-c / @r{(Picture mode)} +@kindex C-c End @r{(Picture mode)} @kindex C-c \ @r{(Picture mode)} +@kindex C-c PageDown @r{(Picture mode)} +@kindex C-c next @r{(Picture mode)} Since self-inserting characters in Picture mode overwrite and move point, there is no essential restriction on how point should be moved. Normally point moves right, but you can specify any of the eight @@ -166,6 +176,7 @@ Move down after insertion (@code{picture-movement-down}). @itemx C-c @key{Home} Move up and left (``northwest'') after insertion (@code{picture-movement-nw}). @item C-c ' +@itemx C-c @key{PageUp} @itemx C-c @key{prior} Move up and right (``northeast'') after insertion (@code{picture-movement-ne}). @@ -174,6 +185,7 @@ Move up and right (``northeast'') after insertion Move down and left (``southwest'') after insertion @*(@code{picture-movement-sw}). @item C-c \ +@itemx C-c @key{PageDown} @itemx C-c @key{next} Move down and right (``southeast'') after insertion @*(@code{picture-movement-se}). diff --git a/doc/misc/info.texi b/doc/misc/info.texi index 964a6c6912..3e871936d2 100644 --- a/doc/misc/info.texi +++ b/doc/misc/info.texi @@ -363,13 +363,15 @@ the menu, one by one. Once you reach the end of a node, and have seen all of its subnodes, @key{SPC} takes you to the next node or to the parent's next node. -@kindex PAGEUP @r{(Info mode)} -@kindex PAGEDOWN @r{(Info mode)} +@kindex PageUp @r{(Info mode)} +@kindex PageDown @r{(Info mode)} +@kindex prior @r{(Info mode)} +@kindex next @r{(Info mode)} Many keyboards nowadays have two scroll keys labeled @samp{PageUp} -and @samp{PageDown} (or maybe @samp{Prior} and @samp{Next}). If your +and @samp{PageDown} (or maybe @samp{prior} and @samp{next}). If your keyboard has these keys, you can use them to move forward and backward through the text of one node, like @key{SPC} and @key{BACKSPACE} (or -@key{DEL}). However, @key{PAGEUP} and @key{PAGEDOWN} keys never +@key{DEL}). However, @key{PageUp} and @key{PageDown} keys never scroll beyond the beginning or the end of the current node. @kindex C-l @r{(Info mode)} commit 1d47d777ef24c0be9153b0a1c8ba21918fa1025a Author: Noam Postavsky Date: Sat Jan 20 11:27:23 2018 -0500 Allow `&rest' or `&optional' without following variable (Bug#29165) This is sometimes convenient when writing macros, so that the empty variable case doesn't need to be handled specially. Older versions of Emacs accepted this in some cases (especially the interpreter in Emacs 25 and below was very accepting). | interpreted/compiled | | arglist | 25 & earlier | 26 | 27 | |---------------------------+--------------+-----+-----| | (&rest) | y/n | n/n | y/y | | (&rest &rest) | y/n | n/n | n/n | | (&rest &rest x) | y/n | n/n | n/n | | (&rest x &rest) | y/n | n/n | n/n | | (&rest x &rest y) | y/n | n/n | n/n | |---------------------------+--------------+-----+-----| | (&optional) | y/n | n/n | y/y | | (&optional &optional) | y/n | n/n | n/n | | (&optional x &optional) | y/n | n/n | n/n | | (&optional x &optional y) | y/y | n/n | n/n | |---------------------------+--------------+-----+-----| | (&optional &rest) | y/n | n/n | y/y | | (&optional x &rest) | y/n | n/n | y/y | | (&optional &rest y) | y/y | n/n | y/y | |---------------------------+--------------+-----+-----| | (&rest &optional) | y/n | n/n | n/n | | (&rest &optional y) | y/n | n/n | n/n | | (&rest x &optional y) | y/n | n/n | n/n | The values in the table above can be produced with the following code: (with-current-buffer (get-buffer-create "*ck-args*") (erase-buffer) (dolist (arglist '((&rest) (&rest &rest) (&rest &rest x) (&rest x &rest) (&rest x &rest y) (&optional) (&optional &optional) (&optional x &optional) (&optional x &optional y) (&optional &rest) (&optional x &rest) (&optional &rest y) (&rest &optional) (&rest &optional y) (&rest x &optional y))) (insert (format "%c/%c\n" (condition-case err (progn (funcall `(lambda ,arglist 'ok)) ?y) (error ?n)) (condition-case err (progn (byte-compile-check-lambda-list arglist) ?y) (error ?n)))) (display-buffer (current-buffer)))) * src/eval.c (funcall_lambda): * lisp/emacs-lisp/bytecomp.el (byte-compile-check-lambda-list): Don't check for missing variables after `&rest' and `&optional'. * test/src/eval-tests.el (eval-tests--bugs-24912-and-24913) (eval-tests-accept-empty-optional-rest): Update tests accordingly. * etc/NEWS: Update announcement accordingly. * doc/lispref/functions.texi (Argument List): Update manual to indicate that variable names are optional. diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi index db59463235..2d3d9d7992 100644 --- a/doc/lispref/functions.texi +++ b/doc/lispref/functions.texi @@ -371,8 +371,8 @@ keyword @code{&rest} before one final argument. @example @group (@var{required-vars}@dots{} - @r{[}&optional @var{optional-vars}@dots{}@r{]} - @r{[}&rest @var{rest-var}@r{]}) + @r{[}&optional @r{[}@var{optional-vars}@dots{}@r{]}@r{]} + @r{[}&rest @r{[}@var{rest-var}@r{]}@r{]}) @end group @end example diff --git a/etc/NEWS b/etc/NEWS index 99f3f27486..d1db830afa 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -380,6 +380,13 @@ backslash. For example: (read "‘smart") => (invalid-read-syntax "strange quote" "‘") (read "\\‘smart") == (intern "‘smart") ++++ +** Omitting variables after '&optional' and '&rest' is now allowed. +For example (defun foo (&optional)) is no longer an error. This is +sometimes convenient when writing macros. See the ChangeLog entry +titled "Allow `&rest' or `&optional' without following variable" for a +full listing of which arglists are accepted across versions. + ** Internal parsing commands now use syntax-ppss and disregard open-paren-in-column-0-is-defun-start. This affects mostly things like forward-comment, scan-sexps, and forward-sexp when parsing backward. diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 07476f1ac9..78d3071b16 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -2737,15 +2737,12 @@ If FORM is a lambda or a macro, byte-compile it as a function." (macroexp--const-symbol-p arg t)) (error "Invalid lambda variable %s" arg)) ((eq arg '&rest) - (unless (cdr list) - (error "&rest without variable name")) (when (cddr list) - (error "Garbage following &rest VAR in lambda-list"))) + (error "Garbage following &rest VAR in lambda-list")) + (when (memq (cadr list) '(&optional &rest)) + (error "%s following &rest in lambda-list" (cadr list)))) ((eq arg '&optional) - (when (or (null (cdr list)) - (memq (cadr list) '(&optional &rest))) - (error "Variable name missing after &optional")) - (when (memq '&optional (cddr list)) + (when (memq '&optional (cdr list)) (error "Duplicate &optional"))) ((memq arg vars) (byte-compile-warn "repeated variable %s in lambda-list" arg)) diff --git a/src/eval.c b/src/eval.c index 08a73b1e4a..a6e1d86c4a 100644 --- a/src/eval.c +++ b/src/eval.c @@ -3035,7 +3035,6 @@ funcall_lambda (Lisp_Object fun, ptrdiff_t nargs, emacs_abort (); i = optional = rest = 0; - bool previous_optional_or_rest = false; for (; CONSP (syms_left); syms_left = XCDR (syms_left)) { maybe_quit (); @@ -3046,17 +3045,15 @@ funcall_lambda (Lisp_Object fun, ptrdiff_t nargs, if (EQ (next, Qand_rest)) { - if (rest || previous_optional_or_rest) + if (rest) xsignal1 (Qinvalid_function, fun); rest = 1; - previous_optional_or_rest = true; } else if (EQ (next, Qand_optional)) { - if (optional || rest || previous_optional_or_rest) + if (optional || rest) xsignal1 (Qinvalid_function, fun); optional = 1; - previous_optional_or_rest = true; } else { @@ -3080,11 +3077,10 @@ funcall_lambda (Lisp_Object fun, ptrdiff_t nargs, else /* Dynamically bind NEXT. */ specbind (next, arg); - previous_optional_or_rest = false; } } - if (!NILP (syms_left) || previous_optional_or_rest) + if (!NILP (syms_left)) xsignal1 (Qinvalid_function, fun); else if (i < nargs) xsignal2 (Qwrong_number_of_arguments, fun, make_number (nargs)); diff --git a/test/src/eval-tests.el b/test/src/eval-tests.el index e68fd13611..59da6b7cc3 100644 --- a/test/src/eval-tests.el +++ b/test/src/eval-tests.el @@ -37,8 +37,7 @@ (ert-deftest eval-tests--bugs-24912-and-24913 () "Check that Emacs doesn't accept weird argument lists. Bug#24912 and Bug#24913." - (dolist (args '((&optional) (&rest) (&optional &rest) (&rest &optional) - (&optional &rest a) (&optional a &rest) + (dolist (args '((&rest &optional) (&rest a &optional) (&rest &optional a) (&optional &optional) (&optional &optional a) (&optional a &optional b) @@ -47,7 +46,22 @@ Bug#24912 and Bug#24913." (should-error (eval `(funcall (lambda ,args)) t) :type 'invalid-function) (should-error (byte-compile-check-lambda-list args)) (let ((byte-compile-debug t)) - (should-error (eval `(byte-compile (lambda ,args)) t))))) + (ert-info ((format "bytecomp: args = %S" args)) + (should-error (eval `(byte-compile (lambda ,args)) t)))))) + +(ert-deftest eval-tests-accept-empty-optional-rest () + "Check that Emacs accepts empty &optional and &rest arglists. +Bug#24912." + (dolist (args '((&optional) (&rest) (&optional &rest) + (&optional &rest a) (&optional a &rest))) + (let ((fun `(lambda ,args 'ok))) + (ert-info ("eval") + (should (eq (funcall (eval fun t)) 'ok))) + (ert-info ("byte comp check") + (byte-compile-check-lambda-list args)) + (ert-info ("bytecomp") + (let ((byte-compile-debug t)) + (should (eq (funcall (byte-compile fun)) 'ok))))))) (dolist (form '(let let*)) commit 2acb9f01b99dd28e51e9a6b7096c50e12ce02be3 Author: Michael Albinus Date: Sun Mar 25 12:18:09 2018 +0200 Minor manual changes changes * doc/emacs/misc.texi (FFAP): Complete commands. (Amusements): Add some @cindex entries. Add "M-x butterfly". diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi index fed2e48924..ba90904ff3 100644 --- a/doc/emacs/misc.texi +++ b/doc/emacs/misc.texi @@ -2871,33 +2871,33 @@ functionality in Rmail, Gnus and VM article buffers. @kindex C-x C-f @r{(FFAP)} Find @var{filename}, guessing a default from text around point (@code{find-file-at-point}). -@item C-x C-r +@item C-x C-r @var{filename} @key{RET} @kindex C-x C-r @r{(FFAP)} @code{ffap-read-only}, analogous to @code{find-file-read-only}. -@item C-x C-v +@item C-x C-v @var{filename} @key{RET} @kindex C-x C-v @r{(FFAP)} @code{ffap-alternate-file}, analogous to @code{find-alternate-file}. @item C-x d @var{directory} @key{RET} @kindex C-x d @r{(FFAP)} Start Dired on @var{directory}, defaulting to the directory at point (@code{dired-at-point}). -@item C-x C-d +@item C-x C-d @var{directory} @key{RET} @code{ffap-list-directory}, analogous to @code{list-directory}. -@item C-x 4 f +@item C-x 4 f @var{filename} @key{RET} @kindex C-x 4 f @r{(FFAP)} @code{ffap-other-window}, analogous to @code{find-file-other-window}. -@item C-x 4 r +@item C-x 4 r @var{filename} @key{RET} @code{ffap-read-only-other-window}, analogous to @code{find-file-read-only-other-window}. -@item C-x 4 d +@item C-x 4 d @var{directory} @key{RET} @code{ffap-dired-other-window}, like @code{dired-other-window}. -@item C-x 5 f +@item C-x 5 f @var{filename} @key{RET} @kindex C-x 5 f @r{(FFAP)} @code{ffap-other-frame}, analogous to @code{find-file-other-frame}. -@item C-x 5 r +@item C-x 5 r @var{filename} @key{RET} @code{ffap-read-only-other-frame}, analogous to @code{find-file-read-only-other-frame}. -@item C-x 5 d +@item C-x 5 d @var{directory} @key{RET} @code{ffap-dired-other-frame}, analogous to @code{dired-other-frame}. @item M-x ffap-next Search buffer for next file name or URL, then find that file or URL. @@ -2914,6 +2914,7 @@ find the one you select (@code{ffap-menu}). @node Amusements @section Games and Other Amusements @cindex boredom +@cindex games @findex animate-birthday-present @cindex animate @@ -2932,6 +2933,7 @@ guess---to guess a value, type a letter and then the digit you think it stands for. The aim of @code{5x5} is to fill in all the squares. @findex bubbles +@cindex bubbles @kbd{M-x bubbles} is a game in which the object is to remove as many bubbles as you can in the smallest number of moves. @@ -2956,6 +2958,7 @@ character. Keep dissociwords out of your documentation, if you want it to be well userenced and properbose. @findex dunnet +@cindex dunnet @kbd{M-x dunnet} runs a text-based adventure game. @findex gomoku @@ -2998,9 +3001,15 @@ implementations of the well-known Pong, Snake and Tetris games. across other pegs. @findex zone +@cindex zone The command @kbd{M-x zone} plays games with the display when Emacs is idle. +@findex butterfly +@cindex butterfly + Real Programmers™ deploy @kbd{M-x butterfly}, which uses butterflies +to flip a bit on the drive platter, see @uref{https://xkcd.com/378}. + @findex doctor @cindex Eliza Finally, if you find yourself frustrated, try describing your commit d73d1384aa6d647a930b4dfe3e91505da4ffee21 Author: Vibhav Pant Date: Sun Mar 25 11:22:50 2018 +0530 Fix byte-optimize-memq incorrectly optimizing some memq forms. * lisp/emacs-lisp/byte-opt.el (byte-optimize-memq): Call byte-optimize-and only for memq forms that can be optimized, use byte-optimize-predicate to optimize the final form. diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el index 54421e01be..004f58cc12 100644 --- a/lisp/emacs-lisp/byte-opt.el +++ b/lisp/emacs-lisp/byte-opt.el @@ -774,10 +774,11 @@ (when (and (eq (car-safe list) 'quote) (listp (setq list (cadr list))) (= (length list) 1)) - (setq form `(and ,(byte-optimize-predicate - `(eq ,(nth 1 form) ',(nth 0 list))) - ',list)))) - (byte-optimize-and form))) + (setq form (byte-optimize-and + `(and ,(byte-optimize-predicate + `(eq ,(nth 1 form) ',(nth 0 list))) + ',list))))) + (byte-optimize-predicate form))) (put 'identity 'byte-optimizer 'byte-optimize-identity) (put 'memq 'byte-optimizer 'byte-optimize-memq) commit a140513acb4ce27bd2b3472ee7a6ecb92676a8e9 Author: Vibhav Pant Date: Sun Mar 25 00:38:01 2018 +0530 Optimize certain memq forms during byte-compilation. * lisp/emacs-lisp/byte-opt.el (byte-optimize-memq): New function. Set the byte optimizer function for memq to byte-optimize-memq. diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el index a5e0e21964..54421e01be 100644 --- a/lisp/emacs-lisp/byte-opt.el +++ b/lisp/emacs-lisp/byte-opt.el @@ -764,7 +764,23 @@ (if (= 1 (length (cdr form))) "" "s")) form)) +(defun byte-optimize-memq (form) + ;; (memq foo '(bar)) => (and (eq foo 'bar) '(bar)) + (if (/= (length (cdr form)) 2) + (byte-compile-warn "memq called with %d arg%s, but requires 2" + (length (cdr form)) + (if (= 1 (length (cdr form))) "" "s")) + (let ((list (nth 2 form))) + (when (and (eq (car-safe list) 'quote) + (listp (setq list (cadr list))) + (= (length list) 1)) + (setq form `(and ,(byte-optimize-predicate + `(eq ,(nth 1 form) ',(nth 0 list))) + ',list)))) + (byte-optimize-and form))) + (put 'identity 'byte-optimizer 'byte-optimize-identity) +(put 'memq 'byte-optimizer 'byte-optimize-memq) (put '+ 'byte-optimizer 'byte-optimize-plus) (put '* 'byte-optimizer 'byte-optimize-multiply) @@ -787,7 +803,6 @@ (put '1- 'byte-optimizer 'byte-optimize-predicate) (put 'not 'byte-optimizer 'byte-optimize-predicate) (put 'null 'byte-optimizer 'byte-optimize-predicate) -(put 'memq 'byte-optimizer 'byte-optimize-predicate) (put 'consp 'byte-optimizer 'byte-optimize-predicate) (put 'listp 'byte-optimizer 'byte-optimize-predicate) (put 'symbolp 'byte-optimizer 'byte-optimize-predicate) @@ -805,7 +820,6 @@ (put 'car-safe 'byte-optimizer 'byte-optimize-predicate) (put 'cdr-safe 'byte-optimizer 'byte-optimize-predicate) - ;; I'm not convinced that this is necessary. Doesn't the optimizer loop ;; take care of this? - Jamie ;; I think this may some times be necessary to reduce ie (quote 5) to 5, commit 198de458f9fb4746199062e21ee89874c4f2b739 Author: Phillip Lord Date: Sat Mar 24 17:34:19 2018 +0000 Reduce build load * admin/nt/dist-build/build-zips.sh: Reduce parallelism to 8 diff --git a/admin/nt/dist-build/build-zips.sh b/admin/nt/dist-build/build-zips.sh index ce72fc4fc9..dc6f9dd2ca 100755 --- a/admin/nt/dist-build/build-zips.sh +++ b/admin/nt/dist-build/build-zips.sh @@ -61,7 +61,7 @@ function build_zip { CFLAGS="-O2 -static -g3" fi - make -j 16 -l 16 install \ + make -j 8 install \ prefix=$HOME/emacs-build/install/emacs-$VERSION/$ARCH cd $HOME/emacs-build/install/emacs-$VERSION/$ARCH cp $HOME/emacs-build/deps/libXpm/$ARCH/libXpm-noX4.dll bin commit 4cfd2a2a92e2890af76bcd8375f966ce67ef2482 Author: Glenn Morris Date: Fri Mar 23 20:55:51 2018 -0400 * lisp/emulation/viper.el (viper-set-hooks): Replace obsolete func. diff --git a/lisp/emulation/viper.el b/lisp/emulation/viper.el index c8eca30e88..8604020b98 100644 --- a/lisp/emulation/viper.el +++ b/lisp/emulation/viper.el @@ -937,8 +937,13 @@ Two differences: (if (and (eq viper-current-state 'vi-state) ;; Do not use called-interactively-p here. XEmacs does not have it ;; and interactive-p is just fine. - ;; (called-interactively-p 'interactive)) - (interactive-p)) + (if (featurep 'xemacs) + (interactive-p) + ;; Respect the spirit of the above comment, though it + ;; seems pointless, since XE doesn't have advice-add or + ;; lexical binding or any other of the newer features + ;; this file uses. + (called-interactively-p 'interactive))) (beep 1) (apply orig-fun args)))) commit 0ef87d60054fc1660413772cfb5598d2fb8a5fe5 Author: Glenn Morris Date: Fri Mar 23 20:31:53 2018 -0400 * lisp/vc/vc.el (vc-initial-comment): Remove var unused since 23.2. diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 7646af075f..cceca71795 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -729,13 +729,6 @@ "Emacs interface to version control systems." :group 'tools) -(defcustom vc-initial-comment nil - "If non-nil, prompt for initial comment when a file is registered." - :type 'boolean - :group 'vc) - -(make-obsolete-variable 'vc-initial-comment "it has no effect." "23.2") - (defcustom vc-checkin-switches nil "A string or list of strings specifying extra switches for checkin. These are passed to the checkin program by \\[vc-checkin]." commit e7172a42e20ea4f92270aefab507bb7f55f3fb06 Author: Glenn Morris Date: Fri Mar 23 20:01:26 2018 -0400 Remove some unused gnus-registry variables * lisp/gnus/gnus-registry.el (gnus-registry-clean-empty) (gnus-registry-use-long-group-names) (gnus-registry-max-track-groups, gnus-registry-entry-caching) (gnus-registry-trim-articles-without-groups): Remove variables labeled as obsolete since 23.4 that do nothing. diff --git a/lisp/gnus/gnus-registry.el b/lisp/gnus/gnus-registry.el index 643b8f1165..229d057946 100644 --- a/lisp/gnus/gnus-registry.el +++ b/lisp/gnus/gnus-registry.el @@ -166,12 +166,7 @@ nnmairix groups are specifically excluded because they are ephemeral." (defvar gnus-registry-misc-menus nil) ; ugly way to keep the menus -(make-obsolete-variable 'gnus-registry-clean-empty nil "23.4") -(make-obsolete-variable 'gnus-registry-use-long-group-names nil "23.4") -(make-obsolete-variable 'gnus-registry-max-track-groups nil "23.4") -(make-obsolete-variable 'gnus-registry-entry-caching nil "23.4") -(make-obsolete-variable 'gnus-registry-trim-articles-without-groups nil "23.4") -;; FIXME it was simply deleted. +;; It was simply deleted. (make-obsolete-variable 'gnus-registry-max-pruned-entries nil "25.1") (defcustom gnus-registry-track-extra '(subject sender recipient) commit 8a3263877ebfdae14f19661cd3f29c8bcc2d4a96 Author: Glenn Morris Date: Fri Mar 23 19:52:09 2018 -0400 Remove variables labeled as obsolete that do nothing * lisp/allout.el (allout-passphrase-verifier-string) (allout-passphrase-hint-string): * lisp/w32-vars.el (w32-list-proportional-fonts): Remove variables that are unused since Emacs 23.x. diff --git a/lisp/allout.el b/lisp/allout.el index af71ea75ce..26e7f6b56c 100644 --- a/lisp/allout.el +++ b/lisp/allout.el @@ -1506,41 +1506,6 @@ wrapped within allout's automatic `fill-prefix' setting.") (make-variable-buffer-local 'allout-outside-normal-auto-fill-function) ;;;_ = prevent redundant activation by desktop mode: (add-to-list 'desktop-minor-mode-handlers '(allout-mode . nil)) -;;;_ = allout-passphrase-verifier-string -(defvar allout-passphrase-verifier-string nil - "Setting used to test solicited encryption passphrases against the one -already associated with a file. - -It consists of an encrypted random string useful only to verify that a -passphrase entered by the user is effective for decryption. The passphrase -itself is *not* recorded in the file anywhere, and the encrypted contents -are random binary characters to avoid exposing greater susceptibility to -search attacks. - -The verifier string is retained as an Emacs file variable, as well as in -the Emacs buffer state, if file variable adjustments are enabled. See -`allout-enable-file-variable-adjustment' for details about that.") -(make-variable-buffer-local 'allout-passphrase-verifier-string) -(make-obsolete-variable 'allout-passphrase-verifier-string - "it is no longer used." "23.3") -;;;###autoload -(put 'allout-passphrase-verifier-string 'safe-local-variable 'stringp) -;;;_ = allout-passphrase-hint-string -(defvar allout-passphrase-hint-string "" - "Variable used to retain reminder string for file's encryption passphrase. - -See the description of `allout-passphrase-hint-handling' for details about how -the reminder is deployed. - -The hint is retained as an Emacs file variable, as well as in the Emacs buffer -state, if file variable adjustments are enabled. See -`allout-enable-file-variable-adjustment' for details about that.") -(make-variable-buffer-local 'allout-passphrase-hint-string) -(setq-default allout-passphrase-hint-string "") -(make-obsolete-variable 'allout-passphrase-hint-string - "it is no longer used." "23.3") -;;;###autoload -(put 'allout-passphrase-hint-string 'safe-local-variable 'stringp) ;;;_ = allout-after-save-decrypt (defvar allout-after-save-decrypt nil "Internal variable, is nil or has the value of two points: diff --git a/lisp/w32-vars.el b/lisp/w32-vars.el index 3531b94f15..44f9b7670d 100644 --- a/lisp/w32-vars.el +++ b/lisp/w32-vars.el @@ -47,10 +47,6 @@ after changing the value of this variable." (setq mouse-appearance-menu-map nil)) :group 'w32) -(defvar w32-list-proportional-fonts nil - "Include proportional fonts in the default font dialog.") -(make-obsolete-variable 'w32-list-proportional-fonts "no longer used." "23.1") - (unless (eq system-type 'cygwin) (defcustom w32-allow-system-shell nil "Disable startup warning when using \"system\" shells." commit d481cba23a34b2714e6d578cd7ad36b4f5021406 Author: Glenn Morris Date: Fri Mar 23 19:49:28 2018 -0400 * lisp/calculator.el (calculator-paste-decimals): Add version. diff --git a/lisp/calculator.el b/lisp/calculator.el index 02b9e5272f..b6959af795 100644 --- a/lisp/calculator.el +++ b/lisp/calculator.el @@ -162,7 +162,7 @@ floats, otherwise the Emacs reader will fail on them." :type 'boolean :group 'calculator) (make-obsolete-variable 'calculator-paste-decimals - "it is no longer used." nil) + "it is no longer used." "26.1") (defcustom calculator-copy-displayer nil "If non-nil, this is any value that can be used for commit 7b371f0b600870848e427eb8224d689de7eff38e Author: Phillip Lord Date: Fri Mar 23 23:11:13 2018 +0000 Limit build load * admin/nt/dist-build/build-zips.sh: Limit build load. diff --git a/admin/nt/dist-build/build-zips.sh b/admin/nt/dist-build/build-zips.sh index 3d28279885..ce72fc4fc9 100755 --- a/admin/nt/dist-build/build-zips.sh +++ b/admin/nt/dist-build/build-zips.sh @@ -61,7 +61,7 @@ function build_zip { CFLAGS="-O2 -static -g3" fi - make -j 16 install \ + make -j 16 -l 16 install \ prefix=$HOME/emacs-build/install/emacs-$VERSION/$ARCH cd $HOME/emacs-build/install/emacs-$VERSION/$ARCH cp $HOME/emacs-build/deps/libXpm/$ARCH/libXpm-noX4.dll bin commit 40fde7a75d4b036f597a0e8e768a7428875fc8fc Author: Phillip Lord Date: Fri Mar 23 22:01:08 2018 +0000 Ensure configure is running if necessary * admin/nt/dist-build/build-zips.sh: Check for missing Makefile. diff --git a/admin/nt/dist-build/build-zips.sh b/admin/nt/dist-build/build-zips.sh index 01c237152a..3d28279885 100755 --- a/admin/nt/dist-build/build-zips.sh +++ b/admin/nt/dist-build/build-zips.sh @@ -49,8 +49,9 @@ function build_zip { export PKG_CONFIG_PATH=$PKG ## Running configure forces a rebuild of the C core which takes - ## time that is not always needed - if (($CONFIG)) + ## time that is not always needed, so do not do it unless we have + ## to. + if [ ! -f Makefile ] || (($CONFIG)) then echo [build] Configuring Emacs $ARCH ../../../git/$BRANCH/configure \ commit cc8bc2a272da7c801df2cff51d31d72032acf9b4 Author: Glenn Morris Date: Fri Mar 23 17:09:51 2018 -0400 * lisp/progmodes/cc-langs.el: Silence compiler. diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el index f1ef89a76a..9913c6feb2 100644 --- a/lisp/progmodes/cc-langs.el +++ b/lisp/progmodes/cc-langs.el @@ -208,9 +208,9 @@ the evaluated constant value at compile time." ;; Suppress "might not be defined at runtime" warning. ;; This file is only used when compiling other cc files. -;; These are defined in cl as aliases to the cl- versions. -;(declare-function delete-duplicates "cl-seq" (cl-seq &rest cl-keys) t) -;(declare-function mapcan "cl-extra" (cl-func cl-seq &rest cl-rest) t) +(declare-function cl-delete-duplicates "cl-seq" (cl-seq &rest cl-keys)) +(declare-function cl-intersection "cl-seq" (cl-list1 cl-list2 &rest cl-keys)) +(declare-function cl-set-difference "cl-seq" (cl-list1 cl-list2 &rest cl-keys)) (eval-and-compile ;; Some helper functions used when building the language constants. commit 7a00aa02229c0cc0447b07fe6d4a8207f369d830 Author: Glenn Morris Date: Fri Mar 23 17:05:01 2018 -0400 Quieten lisp/obsolete compilation * lisp/obsolete/vi.el (vi-mark-region): * lisp/obsolete/vip.el (vip-delete-backward-char): Silence compiler. diff --git a/lisp/obsolete/vi.el b/lisp/obsolete/vi.el index a7a98d0ca5..7d44f561d4 100644 --- a/lisp/obsolete/vi.el +++ b/lisp/obsolete/vi.el @@ -1386,7 +1386,7 @@ l(ines)." (interactive "p\nc") (cond ((char-equal region ?d) (mark-defun)) ((char-equal region ?s) (mark-sexp arg)) - ((char-equal region ?b) (mark-whole-buffer)) + ((char-equal region ?b) (with-no-warnings (mark-whole-buffer))) ((char-equal region ?p) (mark-paragraph)) ((char-equal region ?P) (mark-page arg)) ((char-equal region ?f) (c-mark-function)) diff --git a/lisp/obsolete/vip.el b/lisp/obsolete/vip.el index c0779acc5e..1d1eccbf24 100644 --- a/lisp/obsolete/vip.el +++ b/lisp/obsolete/vip.el @@ -1858,7 +1858,7 @@ STRING. Search will be forward if FORWARD, otherwise backward." (+ vip-use-register 32) (point) (+ (point) val)) (copy-to-register vip-use-register (point) (+ (point) val) nil)) (setq vip-use-register nil))) - (delete-backward-char val t))) + (with-no-warnings (delete-backward-char val t)))) ;; join lines. commit 1f2602cc5d9f2a2e94073839f2dbfa7c529c9b59 Author: Paul Eggert Date: Fri Mar 23 13:49:58 2018 -0700 Clarify syntax of radixed integers * doc/lispref/numbers.texi (Integer Basics): Specify what digits are allowed in radixed integers, and that there is no initial sign or final period. diff --git a/doc/lispref/numbers.texi b/doc/lispref/numbers.texi index f1180cf754..c2cb6651d4 100644 --- a/doc/lispref/numbers.texi +++ b/doc/lispref/numbers.texi @@ -75,14 +75,17 @@ Emacs range is treated as a floating-point number. @cindex hex numbers @cindex octal numbers @cindex reading numbers in hex, octal, and binary - The syntax for integers in bases other than 10 uses @samp{#} -followed by a letter that specifies the radix: @samp{b} for binary, -@samp{o} for octal, @samp{x} for hex, or @samp{@var{radix}r} to -specify radix @var{radix}. Case is not significant for the letter -that specifies the radix. Thus, @samp{#b@var{integer}} reads + The syntax for integers in bases other than 10 consists of @samp{#} +followed by a radix indication followed by one or more digits. The +radix indications are @samp{b} for binary, @samp{o} for octal, +@samp{x} for hex, and @samp{@var{radix}r} for radix @var{radix}. +Thus, @samp{#b@var{integer}} reads @var{integer} in binary, and @samp{#@var{radix}r@var{integer}} reads @var{integer} in radix @var{radix}. Allowed values of @var{radix} run -from 2 to 36. For example: +from 2 to 36, and allowed digits are the first @var{radix} characters +taken from @samp{0}--@samp{9}, @samp{A}--@samp{Z}. +Letter case is ignored and there is no initial sign or final period. +For example: @example #b101100 @result{} 44 commit 582f46cbe2d53a09388e96e1c069524460f7105f Author: Glenn Morris Date: Fri Mar 23 16:28:24 2018 -0400 Remove some declare-function stub definitions * lisp/emulation/viper-cmd.el, lisp/emulation/viper-keym.el: * lisp/emulation/viper-util.el, lisp/net/newst-plainview.el: * lisp/net/newst-treeview.el, lisp/ps-def.el, lisp/vc/ediff.el: * lisp/vc/ediff-util.el, lisp/vc/ediff-wind.el: Remove stub declare-function definitions. It exists since Emacs 22.2, released 10 years ago. Most of these files are using even newer features, such as lexical-binding and cl-lib anyway, making the stubs pointless. diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el index 224ce5802c..3c66abe3e5 100644 --- a/lisp/emulation/viper-cmd.el +++ b/lisp/emulation/viper-cmd.el @@ -45,8 +45,6 @@ (defvar undo-beg-posn) (defvar undo-end-posn) -(eval-and-compile - (unless (fboundp 'declare-function) (defmacro declare-function (&rest _)))) ;; end pacifier diff --git a/lisp/emulation/viper-keym.el b/lisp/emulation/viper-keym.el index e72842232e..5196ca6ac3 100644 --- a/lisp/emulation/viper-keym.el +++ b/lisp/emulation/viper-keym.el @@ -32,8 +32,6 @@ (defvar viper-ex-style-editing) (defvar viper-ex-style-motion) -(eval-and-compile - (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) ;; end pacifier (require 'viper-util) diff --git a/lisp/emulation/viper-util.el b/lisp/emulation/viper-util.el index 9fd68b7a61..2e759bc13b 100644 --- a/lisp/emulation/viper-util.el +++ b/lisp/emulation/viper-util.el @@ -42,9 +42,6 @@ (require 'ring) -(eval-and-compile - (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) - ;; end pacifier (require 'viper-init) diff --git a/lisp/net/newst-plainview.el b/lisp/net/newst-plainview.el index 1e37276a24..889404ef09 100644 --- a/lisp/net/newst-plainview.el +++ b/lisp/net/newst-plainview.el @@ -562,7 +562,6 @@ This does NOT start the retrieval timers." (newsticker--debug-msg "Getting news for %s" (symbol-name feed)) (newsticker-get-news (symbol-name feed))))) -(unless (fboundp 'declare-function) (defmacro declare-function (&rest r))) (declare-function w3m-toggle-inline-image "ext:w3m" (&optional force no-cache)) (defun newsticker-w3m-show-inline-images () diff --git a/lisp/net/newst-treeview.el b/lisp/net/newst-treeview.el index b2997d71b1..59a57293ee 100644 --- a/lisp/net/newst-treeview.el +++ b/lisp/net/newst-treeview.el @@ -259,7 +259,6 @@ their id stays constant." ;; ====================================================================== -(unless (fboundp 'declare-function) (defmacro declare-function (&rest _))) (declare-function w3m-toggle-inline-images "ext:w3m" (&optional force no-cache)) (defvar w3m-fill-column) (defvar w3-maximum-line-length) diff --git a/lisp/ps-def.el b/lisp/ps-def.el index f34473bbb6..d0cd7625a4 100644 --- a/lisp/ps-def.el +++ b/lisp/ps-def.el @@ -31,9 +31,6 @@ ;;; Code: -(eval-and-compile - (unless (fboundp 'declare-function) (defmacro declare-function (&rest _r)))) - (declare-function ps-plot-with-face "ps-print" (from to face)) (declare-function ps-plot-string "ps-print" (string)) diff --git a/lisp/vc/ediff-util.el b/lisp/vc/ediff-util.el index 1158b7146e..104a578268 100644 --- a/lisp/vc/ediff-util.el +++ b/lisp/vc/ediff-util.el @@ -39,9 +39,6 @@ (defvar ediff-after-quit-hook-internal nil) -(eval-and-compile - (unless (fboundp 'declare-function) (defmacro declare-function (&rest _r)))) - ;; end pacifier diff --git a/lisp/vc/ediff-wind.el b/lisp/vc/ediff-wind.el index 67e9bf2d9d..0535aa6725 100644 --- a/lisp/vc/ediff-wind.el +++ b/lisp/vc/ediff-wind.el @@ -38,10 +38,6 @@ (defvar frame-icon-title-format) (defvar ediff-diff-status) -;; declare-function does not exist in XEmacs -(eval-and-compile - (unless (fboundp 'declare-function) (defmacro declare-function (&rest _r)))) - (require 'ediff-init) (require 'ediff-help) ;; end pacifier diff --git a/lisp/vc/ediff.el b/lisp/vc/ediff.el index a5e8022f1c..32a6820fe7 100644 --- a/lisp/vc/ediff.el +++ b/lisp/vc/ediff.el @@ -112,10 +112,6 @@ (provide 'ediff) -;; Compiler pacifier -(eval-and-compile - (unless (fboundp 'declare-function) (defmacro declare-function (&rest _r)))) - (require 'ediff-util) ;; end pacifier commit c5a363080cd29742454aeaebb09d5da06babd4e3 Author: Glenn Morris Date: Fri Mar 23 16:14:26 2018 -0400 Replace some uses of cl with cl-lib * lisp/progmodes/idlw-toolbar.el: No need for cl. * lisp/progmodes/antlr-mode.el, lisp/progmodes/idlw-shell.el: * lisp/progmodes/idlwave.el: Replace cl with cl-lib. diff --git a/lisp/progmodes/antlr-mode.el b/lisp/progmodes/antlr-mode.el index 1d4fd4f2bc..775fd87872 100644 --- a/lisp/progmodes/antlr-mode.el +++ b/lisp/progmodes/antlr-mode.el @@ -82,8 +82,7 @@ ;;; Code: -(eval-when-compile - (require 'cl)) +(eval-when-compile (require 'cl-lib)) (require 'easymenu) (require 'cc-mode) @@ -1066,7 +1065,7 @@ Used for `antlr-slow-syntactic-context'.") (buffer-syntactic-context-depth) nil) :EMACS -;;; (incf antlr-statistics-inval) +;;; (cl-incf antlr-statistics-inval) (setq antlr-slow-context-cache nil)) (defunx antlr-syntactic-context () @@ -1096,9 +1095,9 @@ WARNING: this may alter `match-data'." (if (>= orig antlr-slow-cache-diff-threshold) (beginning-of-defun) (goto-char (point-min))) -;;; (cond ((and diff (< diff 0)) (incf antlr-statistics-full-neg)) -;;; ((and diff (>= diff 3000)) (incf antlr-statistics-full-diff)) -;;; (t (incf antlr-statistics-full-other))) +;;; (cond ((and diff (< diff 0)) (cl-incf antlr-statistics-full-neg)) +;;; ((and diff (>= diff 3000)) (cl-incf antlr-statistics-full-diff)) +;;; (t (cl-incf antlr-statistics-full-other))) (setq state (parse-partial-sexp (point) orig))) (goto-char orig) (if antlr-slow-context-cache @@ -1110,12 +1109,12 @@ WARNING: this may alter `match-data'." ((nth 4 state) 'comment) ; block-comment? -- we don't care (t (car state))))) -;;; (incf (aref antlr-statistics 2)) +;;; (cl-incf (aref antlr-statistics 2)) ;;; (unless (and (eq (current-buffer) ;;; (caar antlr-slow-context-cache)) ;;; (eq (buffer-modified-tick) ;;; (cdar antlr-slow-context-cache))) -;;; (incf (aref antlr-statistics 1)) +;;; (cl-incf (aref antlr-statistics 1)) ;;; (setq antlr-slow-context-cache nil)) ;;; (let* ((orig (point)) ;;; (base (cadr antlr-slow-context-cache)) @@ -1124,7 +1123,7 @@ WARNING: this may alter `match-data'." ;;; ((eq orig (car base)) (cdr base)))) ;;; diff diff2) ;;; (unless state -;;; (incf (aref antlr-statistics 3)) +;;; (cl-incf (aref antlr-statistics 3)) ;;; (when curr ;;; (if (< (setq diff (abs (- orig (car curr)))) ;;; (setq diff2 (abs (- orig (car base))))) @@ -1137,7 +1136,7 @@ WARNING: this may alter `match-data'." ;;; (setq state ;;; (parse-partial-sexp (car state) orig nil nil (cdr state))) ;;; (if (>= orig 3000) (beginning-of-defun) (goto-char (point-min))) -;;; (incf (aref antlr-statistics 4)) +;;; (cl-incf (aref antlr-statistics 4)) ;;; (setq cw (list orig (point) base curr)) ;;; (setq state (parse-partial-sexp (point) orig))) ;;; (goto-char orig) @@ -1348,10 +1347,10 @@ is non-nil, move to beginning of the rule." (antlr-skip-exception-part skip-comment)) (antlr-skip-file-prelude skip-comment)) (if (< arg 0) - (unless (and (< (point) pos) (zerop (incf arg))) + (unless (and (< (point) pos) (zerop (cl-incf arg))) ;; if we have moved backward, we already moved one defun backward (goto-char beg) ; rewind (to ";" / point) - (while (and arg (<= (incf arg) 0)) + (while (and arg (<= (cl-incf arg) 0)) (if (antlr-search-backward ";") (setq beg (point)) (when (>= arg -1) @@ -1368,9 +1367,9 @@ is non-nil, move to beginning of the rule." (antlr-skip-exception-part skip-comment))) (if (<= (point) pos) ; moved backward? (goto-char pos) ; rewind - (decf arg)) ; already moved one defun forward + (cl-decf arg)) ; already moved one defun forward (unless (zerop arg) - (while (>= (decf arg) 0) + (while (>= (cl-decf arg) 0) (antlr-search-forward ";")) (antlr-skip-exception-part skip-comment))))) @@ -1465,7 +1464,7 @@ If non-nil, TRANSFORM is used on literals instead of `downcase-region'." (antlr-invalidate-context-cache) (while (antlr-re-search-forward "\"\\(\\sw\\(\\sw\\|-\\)*\\)\"" nil) (funcall transform (match-beginning 0) (match-end 0)) - (incf literals)))) + (cl-incf literals)))) (message "Transformed %d literals" literals))) (defun antlr-upcase-literals () @@ -2131,7 +2130,7 @@ its export vocabulary is used as an import vocabulary." (or (null ivocab) (member ivocab import-vocabs) (push ivocab import-vocabs))))) (if classes - (list* (file-name-nondirectory buffer-file-name) + (cl-list* (file-name-nondirectory buffer-file-name) (cons (nreverse classes) (nreverse superclasses)) (cons (nreverse export-vocabs) (nreverse import-vocabs)) antlr-language)))) @@ -2277,7 +2276,7 @@ command `antlr-show-makefile-rules' for detail." (dolist (dep deps) (let ((supers (cdadr dep)) (lang (cdr (assoc (cdddr dep) antlr-file-formats-alist)))) - (if n (incf n)) + (if n (cl-incf n)) (antlr-makefile-insert-variable n "" " =") (if supers (insert " " @@ -2313,7 +2312,7 @@ command `antlr-show-makefile-rules' for detail." (if n (let ((i 0)) (antlr-makefile-insert-variable nil "" " =") - (while (<= (incf i) n) + (while (<= (cl-incf i) n) (antlr-makefile-insert-variable i " $(" ")")) (insert "\n" (car antlr-makefile-specification)))) (if (string-equal (car antlr-makefile-specification) "\n") @@ -2442,8 +2441,8 @@ to a lesser extent, `antlr-tab-offset-alist'." (goto-char boi) (unless (symbolp syntax) ; direct indentation ;;(antlr-invalidate-context-cache) - (incf indent (antlr-syntactic-context)) - (and (> indent 0) (looking-at antlr-indent-item-regexp) (decf indent)) + (cl-incf indent (antlr-syntactic-context)) + (and (> indent 0) (looking-at antlr-indent-item-regexp) (cl-decf indent)) (setq indent (* indent c-basic-offset))) ;; the usual major-mode indent stuff --------------------------------- (setq orig (- (point-max) orig)) diff --git a/lisp/progmodes/idlw-shell.el b/lisp/progmodes/idlw-shell.el index 1b72eea09e..dcb81f5a94 100644 --- a/lisp/progmodes/idlw-shell.el +++ b/lisp/progmodes/idlw-shell.el @@ -92,7 +92,7 @@ (require 'comint) (require 'idlwave) -(eval-when-compile (require 'cl)) +(eval-when-compile (require 'cl-lib)) (defvar idlwave-shell-have-new-custom nil) @@ -2261,12 +2261,12 @@ overlays." (defun idlwave-shell-stack-up () "Display the source code one step up the calling stack." (interactive) - (incf idlwave-shell-calling-stack-index) + (cl-incf idlwave-shell-calling-stack-index) (idlwave-shell-display-level-in-calling-stack 'hide)) (defun idlwave-shell-stack-down () "Display the source code one step down the calling stack." (interactive) - (decf idlwave-shell-calling-stack-index) + (cl-decf idlwave-shell-calling-stack-index) (idlwave-shell-display-level-in-calling-stack 'hide)) (defun idlwave-shell-goto-frame (&optional frame) @@ -3597,7 +3597,7 @@ Existing overlays are recycled, in order to minimize consumption." (if ov-alist (while (setq ov-list (pop ov-alist)) (while (setq ov (pop (cdr ov-list))) - (pushnew (overlay-buffer ov) old-buffers) + (cl-pushnew (overlay-buffer ov) old-buffers) (delete-overlay ov)))) (setq ov-alist idlwave-shell-bp-overlays diff --git a/lisp/progmodes/idlw-toolbar.el b/lisp/progmodes/idlw-toolbar.el index 7595db9823..75f5582793 100644 --- a/lisp/progmodes/idlw-toolbar.el +++ b/lisp/progmodes/idlw-toolbar.el @@ -34,8 +34,6 @@ ;;; Code: -(eval-when-compile (require 'cl)) - (defun idlwave-toolbar-make-button (image) (if (featurep 'xemacs) (toolbar-make-button-list image) diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el index a1ea6db64f..540931c9f2 100644 --- a/lisp/progmodes/idlwave.el +++ b/lisp/progmodes/idlwave.el @@ -151,7 +151,7 @@ ;;; Code: -(eval-when-compile (require 'cl)) +(eval-when-compile (require 'cl-lib)) (require 'idlw-help) ;; For XEmacs @@ -3898,7 +3898,7 @@ Buffers containing unsaved changes require confirmation before they are killed." (and (or (memq t reasons) (memq (cdr entry) reasons)) (kill-buffer (car entry)) - (incf cnt) + (cl-incf cnt) (setq idlwave-outlawed-buffers (delq entry idlwave-outlawed-buffers))) (setq idlwave-outlawed-buffers @@ -4104,14 +4104,14 @@ blank lines." (idlwave-sint-classes 10 10)))) ;; Make sure these are lists - (loop for entry in entries + (cl-loop for entry in entries for var = (car entry) do (if (not (consp (symbol-value var))) (set var (list nil)))) ;; Reset the system & library hash (when (or (eq what t) (eq what 'syslib) (null (cdr idlwave-sint-routines))) - (loop for entry in entries + (cl-loop for entry in entries for var = (car entry) for size = (nth 1 entry) do (setcdr (symbol-value var) (make-hash-table ':size size ':test 'equal))) @@ -4121,7 +4121,7 @@ blank lines." ;; Reset the buffer & shell hash (when (or (eq what t) (eq what 'bufsh) (null (car idlwave-sint-routines))) - (loop for entry in entries + (cl-loop for entry in entries for var = (car entry) for size = (nth 1 entry) do (setcar (symbol-value var) (make-hash-table ':size size ':test 'equal)))))) @@ -4680,7 +4680,7 @@ Gets set in cached XML rinfo, or `idlw-rinfo.el'.") (setq pref-list (if (match-string 1 kwd) '("X" "Y" "Z") '("X" "Y")) kwd (substring kwd (match-end 0))) - (loop for x in pref-list do + (cl-loop for x in pref-list do (push (list (concat x kwd) klink) kwds))) (push (list kwd klink) kwds))) @@ -4701,7 +4701,7 @@ Gets set in cached XML rinfo, or `idlw-rinfo.el'.") (cons (substring name 1) link) (if extra-kws (setq kwds (nconc kwds extra-kws))) (setq kwds (idlwave-rinfo-group-keywords kwds link)) - (loop for idx from 0 to 1 do + (cl-loop for idx from 0 to 1 do (if (aref syntax-vec idx) (push (append (list name (if (eq idx 0) 'pro 'fun) class '(system) @@ -4736,7 +4736,7 @@ Gets set in cached XML rinfo, or `idlw-rinfo.el'.") ;; Clean up the syntax of routines which are actually aliases by ;; removing the "OR" from the statements (let (syntax entry) - (loop for x in aliases do + (cl-loop for x in aliases do (setq entry (assoc x idlwave-system-routines)) (when entry (while (string-match " +or +" (setq syntax (nth 4 entry))) @@ -4746,7 +4746,7 @@ Gets set in cached XML rinfo, or `idlw-rinfo.el'.") ;; Duplicate and trim original routine aliases from rinfo list ;; This if for, e.g. OPENR/OPENW/OPENU (let (alias remove-list new parts all-parts) - (loop for x in aliases do + (cl-loop for x in aliases do (when (setq parts (split-string (cdr x) "/")) (setq new (assoc (cdr x) all-parts)) (unless new @@ -4755,30 +4755,30 @@ Gets set in cached XML rinfo, or `idlw-rinfo.el'.") (setcdr new (delete (car x) (cdr new))))) ;; Add any missing aliases (separate by slashes) - (loop for x in all-parts do + (cl-loop for x in all-parts do (if (cdr x) (push (cons (nth 1 x) (car x)) aliases))) - (loop for x in aliases do + (cl-loop for x in aliases do (when (setq alias (assoc (cdr x) idlwave-system-routines)) (unless (memq alias remove-list) (push alias remove-list)) (setq alias (copy-sequence alias)) (setcar alias (car x)) (push alias idlwave-system-routines))) - (loop for x in remove-list do + (cl-loop for x in remove-list do (delq x idlwave-system-routines)))) (defun idlwave-convert-xml-clean-sysvar-aliases (aliases) ;; Duplicate and trim original routine aliases from rinfo list ;; This if for, e.g. !X, !Y, !Z. (let (alias remove-list) - (loop for x in aliases do + (cl-loop for x in aliases do (when (setq alias (assoc (cdr x) idlwave-system-variables-alist)) (unless (memq alias remove-list) (push alias remove-list)) (setq alias (copy-sequence alias)) (setcar alias (car x)) (push alias idlwave-system-variables-alist))) - (loop for x in remove-list do + (cl-loop for x in remove-list do (delq x idlwave-system-variables-alist)))) @@ -4875,7 +4875,7 @@ Cache to disk for quick recovery." (while rinfo (setq elem (car rinfo) rinfo (cdr rinfo)) - (incf elem-cnt) + (cl-incf elem-cnt) (when (listp elem) (setq type (car elem) props (car (cdr elem))) @@ -5106,7 +5106,7 @@ Cache to disk for quick recovery." "Return the class alist - make it if necessary." (or idlwave-class-alist (let (class) - (loop for x in idlwave-routines do + (cl-loop for x in idlwave-routines do (when (and (setq class (nth 2 x)) (not (assq class idlwave-class-alist))) (push (list class) idlwave-class-alist))) @@ -6223,7 +6223,7 @@ If yes, return the index (>=1)." (let (file (cnt 0)) (catch 'exit (while entries - (incf cnt) + (cl-incf cnt) (setq file (idlwave-routine-source-file (nth 3 (car entries)))) (if (and file (idlwave-syslib-p file)) (throw 'exit cnt) @@ -6520,7 +6520,7 @@ ARROW: Location of the arrow" (progn (up-list -1) t) (error nil)) (setq pos (point)) - (incf cnt) + (cl-incf cnt) (when (and (= (following-char) ?\() (re-search-backward "\\(::\\|\\<\\)\\([a-zA-Z][a-zA-Z0-9$_]*\\)[ \t]*\\=" @@ -8190,7 +8190,7 @@ demand _EXTRA in the keyword list." (while (setq re (pop regexps)) (if (string-match re name) (throw 'exit t)))))) - (loop for entry in (idlwave-routines) do + (cl-loop for entry in (idlwave-routines) do (and (nth 2 entry) ; non-nil class (memq (nth 2 entry) super-classes) ; an inherited class (eq (nth 1 entry) type) ; correct type @@ -8399,7 +8399,7 @@ If we do not know about MODULE, just return KEYWORD literally." "") (if (> total 1) "- " "")) entry props) - (incf cnt) + (cl-incf cnt) (when (and all (> cnt idlwave-rinfo-max-source-lines)) ;; No more source lines, please (insert (format @@ -8707,7 +8707,7 @@ can be used to detect possible name clashes during this process." (> (idlwave-count-memq 'lib (nth 2 (car dtwins))) 1) (> (idlwave-count-memq 'user (nth 2 (car dtwins))) 1) (> (idlwave-count-memq 'buffer (nth 2 (car dtwins))) 1)) - (incf cnt) + (cl-incf cnt) (insert (format "\n%s%s" (idlwave-make-full-name (nth 2 routine) (car routine)) @@ -8776,7 +8776,7 @@ routines, and may have been scanned." (cnt 0) source type type-cons file alist syslibp key) (while (setq entry (pop entries)) - (incf cnt) + (cl-incf cnt) (setq source (nth 3 entry) type (car source) type-cons (cons type (nth 3 source)) commit 07e340daaf34504db5f5f71f88505eb524006819 Author: Glenn Morris Date: Fri Mar 23 16:13:55 2018 -0400 Replace cl in some obsolete files * lisp/obsolete/assoc.el, lisp/obsolete/fast-lock.el: * lisp/obsolete/mouse-sel.el: No need for cl. * lisp/obsolete/lazy-lock.el, lisp/obsolete/pgg-gpg.el: * lisp/obsolete/pgg-parse.el, lisp/obsolete/pgg-pgp.el: * lisp/obsolete/pgg-pgp5.el, lisp/obsolete/pgg.el: * lisp/obsolete/sregex.el: Replace cl with cl-lib. diff --git a/lisp/obsolete/assoc.el b/lisp/obsolete/assoc.el index 899c9d7a56..66cf67713d 100644 --- a/lisp/obsolete/assoc.el +++ b/lisp/obsolete/assoc.el @@ -27,7 +27,6 @@ ;; fetching off key-value pairs in association lists. ;;; Code: -(eval-when-compile (require 'cl)) (defun asort (alist-symbol key) "Move a specified key-value pair to the head of an alist. diff --git a/lisp/obsolete/fast-lock.el b/lisp/obsolete/fast-lock.el index e15dfd631c..41e48c3eaf 100644 --- a/lisp/obsolete/fast-lock.el +++ b/lisp/obsolete/fast-lock.el @@ -190,10 +190,6 @@ (defvar font-lock-face-list) (eval-when-compile - ;; - ;; We don't do this at the top-level as we only use non-autoloaded macros. - (require 'cl) - ;; ;; We use this to preserve or protect things when modifying text properties. (defmacro save-buffer-state (varlist &rest body) "Bind variables according to VARLIST and eval BODY restoring buffer state." diff --git a/lisp/obsolete/lazy-lock.el b/lisp/obsolete/lazy-lock.el index 010b7ae0f3..54dc799c1f 100644 --- a/lisp/obsolete/lazy-lock.el +++ b/lisp/obsolete/lazy-lock.el @@ -267,11 +267,9 @@ ;;; Code: (require 'font-lock) +(eval-when-compile (require 'cl-lib)) (eval-when-compile - ;; We don't do this at the top-level as we only use non-autoloaded macros. - (require 'cl) - ;; ;; We use this to preserve or protect things when modifying text properties. (defmacro save-buffer-state (varlist &rest body) "Bind variables according to VARLIST and eval BODY restoring buffer state." @@ -977,7 +975,7 @@ verbosity is controlled via the variable `lazy-lock-stealth-verbose'." (while (setq beg (text-property-any beg (point-max) 'lazy-lock t)) (setq next (or (text-property-any beg (point-max) 'lazy-lock nil) (point-max))) - (incf size (- next beg)) + (cl-incf size (- next beg)) (setq beg next)) ;; Float because using integer multiplication will frequently overflow. (truncate (* (/ (float size) (point-max)) 100))))) diff --git a/lisp/obsolete/mouse-sel.el b/lisp/obsolete/mouse-sel.el index 6caaea217d..52e84f2117 100644 --- a/lisp/obsolete/mouse-sel.el +++ b/lisp/obsolete/mouse-sel.el @@ -135,9 +135,6 @@ (require 'mouse) (require 'thingatpt) -(eval-when-compile - (require 'cl)) - ;;=== User Variables ====================================================== (defgroup mouse-sel nil diff --git a/lisp/obsolete/pgg-gpg.el b/lisp/obsolete/pgg-gpg.el index 1bc23cad46..3b890727d1 100644 --- a/lisp/obsolete/pgg-gpg.el +++ b/lisp/obsolete/pgg-gpg.el @@ -27,8 +27,7 @@ ;;; Code: -(eval-when-compile - (require 'cl)) +(eval-when-compile (require 'cl-lib)) (require 'pgg) @@ -303,7 +302,7 @@ passphrase cache or user." (defun pgg-gpg-select-matching-key (message-keys secret-keys) "Choose a key from MESSAGE-KEYS that matches one of the keys in SECRET-KEYS." - (loop for message-key in message-keys + (cl-loop for message-key in message-keys for message-key-id = (and (equal (car message-key) 1) (cdr (assq 'key-identifier (cdr message-key)))) diff --git a/lisp/obsolete/pgg-parse.el b/lisp/obsolete/pgg-parse.el index e29dfce43f..34ec96ec12 100644 --- a/lisp/obsolete/pgg-parse.el +++ b/lisp/obsolete/pgg-parse.el @@ -35,10 +35,7 @@ ;;; Code: -(eval-when-compile - ;; For Emacs <22.2 and XEmacs. - (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))) - (require 'cl)) +(eval-when-compile (require 'cl-lib)) (defgroup pgg-parse () "OpenPGP packet parsing." @@ -229,7 +226,7 @@ (list content-tag packet-bytes header-bytes))) (defun pgg-parse-packet (ptag) - (case (car ptag) + (cl-case (car ptag) (1 ;Public-Key Encrypted Session Key Packet (pgg-parse-public-key-encrypted-session-key-packet ptag)) (2 ;Signature Packet @@ -282,7 +279,7 @@ (1+ (cdr length-type))))) (defun pgg-parse-signature-subpacket (ptag) - (case (car ptag) + (cl-case (car ptag) (2 ;signature creation time (cons 'creation-time (let ((bytes (pgg-read-bytes 4))) diff --git a/lisp/obsolete/pgg-pgp.el b/lisp/obsolete/pgg-pgp.el index 7f9e764959..ae75377783 100644 --- a/lisp/obsolete/pgg-pgp.el +++ b/lisp/obsolete/pgg-pgp.el @@ -25,8 +25,7 @@ ;;; Code: -(eval-when-compile - (require 'cl)) +(eval-when-compile (require 'cl-lib)) (require 'pgg) diff --git a/lisp/obsolete/pgg-pgp5.el b/lisp/obsolete/pgg-pgp5.el index c6294f4368..af8205525f 100644 --- a/lisp/obsolete/pgg-pgp5.el +++ b/lisp/obsolete/pgg-pgp5.el @@ -25,8 +25,7 @@ ;;; Code: -(eval-when-compile - (require 'cl)) +(eval-when-compile (require 'cl-lib)) (require 'pgg) diff --git a/lisp/obsolete/pgg.el b/lisp/obsolete/pgg.el index 57e9197a91..fd35f7d333 100644 --- a/lisp/obsolete/pgg.el +++ b/lisp/obsolete/pgg.el @@ -29,11 +29,7 @@ (require 'pgg-parse) (autoload 'run-at-time "timer") -;; Don't merge these two `eval-when-compile's. -(eval-when-compile - ;; For Emacs <22.2 and XEmacs. - (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))) - (require 'cl)) +(eval-when-compile (require 'cl-lib)) ;;; @ utility functions ;;; @@ -258,7 +254,7 @@ regulate cache behavior." (defmacro pgg-convert-lbt-region (start end lbt) `(let ((pgg-conversion-end (set-marker (make-marker) ,end))) (goto-char ,start) - (case ,lbt + (cl-case ,lbt (CRLF (while (progn (end-of-line) diff --git a/lisp/obsolete/sregex.el b/lisp/obsolete/sregex.el index 6ff5133ca0..1099b878e6 100644 --- a/lisp/obsolete/sregex.el +++ b/lisp/obsolete/sregex.el @@ -240,7 +240,7 @@ ;;; Code: -(eval-when-compile (require 'cl)) +(eval-when-compile (require 'cl-lib)) ;; Compatibility code for when we didn't have shy-groups (defvar sregex--current-sregex nil) @@ -487,7 +487,7 @@ has one of the following forms: (concat "\\(?:" (regexp-quote exp) "\\)") (regexp-quote exp))) ((symbolp exp) - (ecase exp + (cl-ecase exp (any ".") (bol "^") (eol "$") commit 3a34c076b9986b1b09fa8c56e9dbda19819da381 Author: Glenn Morris Date: Fri Mar 23 16:13:40 2018 -0400 cedet: replace cl with cl-lib * lisp/cedet/ede/linux.el, lisp/cedet/semantic/decorate/mode.el: * lisp/cedet/semantic/wisent/comp.el: Replace cl with cl-lib. * lisp/cedet/cedet.el, lisp/cedet/mode-local.el: * lisp/cedet/ede/dired.el, lisp/cedet/ede/pmake.el: * lisp/cedet/ede/proj-comp.el, lisp/cedet/ede/proj-misc.el: * lisp/cedet/ede/proj-obj.el, lisp/cedet/ede/proj-prog.el: * lisp/cedet/ede/speedbar.el, lisp/cedet/semantic/analyze.el: * lisp/cedet/semantic/complete.el: * lisp/cedet/semantic/mru-bookmark.el, lisp/cedet/semantic/debug.el: * lisp/cedet/semantic/wisent/python.el: * lisp/cedet/srecode/compile.el, lisp/cedet/srecode/dictionary.el: * lisp/cedet/srecode/srt.el: No need for cl. diff --git a/lisp/cedet/cedet.el b/lisp/cedet/cedet.el index 216b0edeb6..34a4d99276 100644 --- a/lisp/cedet/cedet.el +++ b/lisp/cedet/cedet.el @@ -30,9 +30,6 @@ ;; load them all by doing (require 'cedet). This is mostly for ;; compatibility with the upstream, stand-alone CEDET distribution. -(eval-when-compile - (require 'cl)) - (declare-function inversion-find-version "inversion") (defconst cedet-version "2.0" diff --git a/lisp/cedet/ede/dired.el b/lisp/cedet/ede/dired.el index 4c21cf44ef..33afc7e547 100644 --- a/lisp/cedet/ede/dired.el +++ b/lisp/cedet/ede/dired.el @@ -27,12 +27,13 @@ ;; This provides a dired interface to EDE, allowing users to modify ;; their project file by adding files (or whatever) directly from a ;; dired buffer. -(eval-when-compile (require 'cl)) + +;;; Code: + (require 'easymenu) (require 'dired) (require 'ede) -;;; Code: (defvar ede-dired-keymap (let ((map (make-sparse-keymap))) (define-key map ".a" 'ede-dired-add-to-target) diff --git a/lisp/cedet/ede/linux.el b/lisp/cedet/ede/linux.el index 84ce7ee6ef..cb5e739717 100644 --- a/lisp/cedet/ede/linux.el +++ b/lisp/cedet/ede/linux.el @@ -34,7 +34,7 @@ (require 'ede) (require 'ede/make) -(eval-when-compile (require 'cl)) +(eval-when-compile (require 'cl-lib)) (declare-function semanticdb-file-table-object "semantic/db") (declare-function semanticdb-needs-refresh-p "semantic/db") @@ -115,7 +115,7 @@ If DIR has not been used as a build directory, fall back to ;; detected build on source directory (and (file-exists-p (expand-file-name ".config" dir)) dir) ;; use configuration - (case project-linux-build-directory-default + (cl-case project-linux-build-directory-default (same dir) (ask (read-directory-name "Select Linux' build directory: " dir))))) @@ -164,7 +164,7 @@ Uses `ede-linux--detect-architecture' for the auto-detection. If the result is `ask', let the user choose from architectures found in DIR." (let ((arch (ede-linux--detect-architecture bdir))) - (case arch + (cl-case arch (ask (completing-read "Select target architecture: " (ede-linux--get-archs dir))) @@ -175,7 +175,7 @@ in DIR." "Returns a list with include directories. Returned directories might not exist, since they are not created until Linux is built for the first time." - (map 'list + (cl-map 'list (lambda (elem) (format (concat (car elem) "/" (cdr elem)) arch)) ;; XXX: taken from the output of "make V=1" (list (cons dir "arch/%s/include") diff --git a/lisp/cedet/ede/pmake.el b/lisp/cedet/ede/pmake.el index 22aa25a4a7..f0f07e9043 100644 --- a/lisp/cedet/ede/pmake.el +++ b/lisp/cedet/ede/pmake.el @@ -43,7 +43,6 @@ ;; 1) Insert distribution source variables for targets ;; 2) Insert user requested rules -(eval-when-compile (require 'cl)) (require 'ede/proj) (require 'ede/proj-obj) (require 'ede/proj-comp) diff --git a/lisp/cedet/ede/proj-comp.el b/lisp/cedet/ede/proj-comp.el index 3d390bda46..fc7205f940 100644 --- a/lisp/cedet/ede/proj-comp.el +++ b/lisp/cedet/ede/proj-comp.el @@ -44,7 +44,6 @@ ;; To write a method that inserts a variable or rule for a compiler ;; based object, wrap the body of your call in `ede-compiler-only-once' -(eval-when-compile (require 'cl)) (require 'ede) ;source object (require 'ede/autoconf-edit) diff --git a/lisp/cedet/ede/proj-misc.el b/lisp/cedet/ede/proj-misc.el index 7bc02facca..d1a8fce78f 100644 --- a/lisp/cedet/ede/proj-misc.el +++ b/lisp/cedet/ede/proj-misc.el @@ -26,7 +26,6 @@ ;; This misc target lets the user link in custom makefiles to an EDE ;; project. -(eval-when-compile (require 'cl)) (require 'ede/pmake) (require 'ede/proj-comp) diff --git a/lisp/cedet/ede/proj-obj.el b/lisp/cedet/ede/proj-obj.el index b087c29cfe..c6c52ed474 100644 --- a/lisp/cedet/ede/proj-obj.el +++ b/lisp/cedet/ede/proj-obj.el @@ -26,7 +26,6 @@ ;; Handles a superclass of target types which create object code in ;; and EDE Project file. -(eval-when-compile (require 'cl)) (require 'ede/proj) (declare-function ede-pmake-varname "ede/pmake") diff --git a/lisp/cedet/ede/proj-prog.el b/lisp/cedet/ede/proj-prog.el index ce1978c618..215b7914a5 100644 --- a/lisp/cedet/ede/proj-prog.el +++ b/lisp/cedet/ede/proj-prog.el @@ -25,7 +25,6 @@ ;; ;; Handle building programs from object files in and EDE Project file. -(eval-when-compile (require 'cl)) (require 'ede/pmake) (require 'ede/proj-obj) diff --git a/lisp/cedet/ede/speedbar.el b/lisp/cedet/ede/speedbar.el index 99fe4a5562..353bec2357 100644 --- a/lisp/cedet/ede/speedbar.el +++ b/lisp/cedet/ede/speedbar.el @@ -28,7 +28,6 @@ ;;; Code: -(eval-when-compile (require 'cl)) (require 'speedbar) (require 'eieio-speedbar) (require 'ede) diff --git a/lisp/cedet/mode-local.el b/lisp/cedet/mode-local.el index 7f175f2d57..1cd306b89b 100644 --- a/lisp/cedet/mode-local.el +++ b/lisp/cedet/mode-local.el @@ -46,8 +46,6 @@ ;;; Code: -(eval-when-compile (require 'cl)) - (require 'find-func) ;; For find-function-regexp-alist. It is tempting to replace this ;; ‘require’ by (defvar find-function-regexp-alist) and diff --git a/lisp/cedet/semantic/analyze.el b/lisp/cedet/semantic/analyze.el index 625982f2c7..2c50722813 100644 --- a/lisp/cedet/semantic/analyze.el +++ b/lisp/cedet/semantic/analyze.el @@ -63,7 +63,6 @@ ;; constant. These need to be returned as there would be no ;; other possible completions. -(eval-when-compile (require 'cl)) (require 'semantic) (require 'semantic/format) (require 'semantic/ctxt) diff --git a/lisp/cedet/semantic/complete.el b/lisp/cedet/semantic/complete.el index baea2261e5..eb25f11427 100644 --- a/lisp/cedet/semantic/complete.el +++ b/lisp/cedet/semantic/complete.el @@ -106,7 +106,6 @@ ;; `semantic-complete-inline-tag-engine' will complete text in ;; a buffer. -(eval-when-compile (require 'cl)) (require 'semantic) (require 'eieio-opt) (require 'semantic/analyze) diff --git a/lisp/cedet/semantic/debug.el b/lisp/cedet/semantic/debug.el index 4f05e59979..3c71c20957 100644 --- a/lisp/cedet/semantic/debug.el +++ b/lisp/cedet/semantic/debug.el @@ -36,7 +36,6 @@ ;; Each parser must implement the interface and override any methods as needed. ;; -(eval-when-compile (require 'cl)) (require 'semantic) (require 'eieio) (require 'cl-generic) diff --git a/lisp/cedet/semantic/decorate/mode.el b/lisp/cedet/semantic/decorate/mode.el index ea3d63d21b..100e221ce3 100644 --- a/lisp/cedet/semantic/decorate/mode.el +++ b/lisp/cedet/semantic/decorate/mode.el @@ -35,7 +35,7 @@ ;; ;;; Code: -(eval-when-compile (require 'cl)) +(eval-when-compile (require 'cl-lib)) (require 'semantic) (require 'semantic/decorate) (require 'semantic/tag-ls) @@ -82,13 +82,13 @@ add items to this list." (defsubst semantic-decoration-set-property (deco property value) "Set the DECO decoration's PROPERTY to VALUE. Return DECO." - (assert (semantic-decoration-p deco)) + (cl-assert (semantic-decoration-p deco)) (semantic-overlay-put deco property value) deco) (defsubst semantic-decoration-get-property (deco property) "Return the DECO decoration's PROPERTY value." - (assert (semantic-decoration-p deco)) + (cl-assert (semantic-decoration-p deco)) (semantic-overlay-get deco property)) (defsubst semantic-decoration-set-face (deco face) @@ -103,7 +103,7 @@ Return DECO." (defsubst semantic-decoration-set-priority (deco priority) "Set the priority of the decoration DECO to PRIORITY. Return DECO." - (assert (natnump priority)) + (cl-assert (natnump priority)) (semantic-decoration-set-property deco 'priority priority)) (defsubst semantic-decoration-priority (deco) @@ -113,7 +113,7 @@ Return DECO." (defsubst semantic-decoration-move (deco begin end) "Move the decoration DECO on the region between BEGIN and END. Return DECO." - (assert (semantic-decoration-p deco)) + (cl-assert (semantic-decoration-p deco)) (semantic-overlay-move deco begin end) deco) @@ -135,7 +135,7 @@ Return the overlay that makes up the new decoration." (defun semantic-decorate-clear-tag (tag &optional deco) "Remove decorations from TAG. If optional argument DECO is non-nil, remove only that decoration." - (assert (or (null deco) (semantic-decoration-p deco))) + (cl-assert (or (null deco) (semantic-decoration-p deco))) ;; Clear primary decorations. ;; For now, just unhighlight the tag. How to deal with other ;; primary decorations like invisibility, etc. ? Maybe just diff --git a/lisp/cedet/semantic/mru-bookmark.el b/lisp/cedet/semantic/mru-bookmark.el index 80844494c4..ad63014890 100644 --- a/lisp/cedet/semantic/mru-bookmark.el +++ b/lisp/cedet/semantic/mru-bookmark.el @@ -45,7 +45,6 @@ ;;; Code: -(eval-when-compile (require 'cl)) (require 'semantic) (require 'eieio-base) (require 'ring) diff --git a/lisp/cedet/semantic/wisent/comp.el b/lisp/cedet/semantic/wisent/comp.el index 1902006ee5..837222ad4b 100644 --- a/lisp/cedet/semantic/wisent/comp.el +++ b/lisp/cedet/semantic/wisent/comp.el @@ -41,7 +41,7 @@ ;;; Code: (require 'semantic/wisent) -(eval-when-compile (require 'cl)) +(eval-when-compile (require 'cl-lib)) ;;;; ------------------- ;;;; Misc. useful things @@ -2906,7 +2906,7 @@ references found in BODY, and XBODY is BODY expression with (progn (if (wisent-check-$N body n) ;; Accumulate $i symbol - (pushnew body found :test #'equal)) + (cl-pushnew body found :test #'equal)) (cons found body)) ;; BODY is a list, expand inside it (let (xbody sexpr) @@ -2926,7 +2926,7 @@ references found in BODY, and XBODY is BODY expression with ;; $i symbol ((wisent-check-$N sexpr n) ;; Accumulate $i symbol - (pushnew sexpr found :test #'equal)) + (cl-pushnew sexpr found :test #'equal)) ) ;; Accumulate expanded forms (setq xbody (nconc xbody (list sexpr)))) diff --git a/lisp/cedet/semantic/wisent/python.el b/lisp/cedet/semantic/wisent/python.el index db2d7c9608..f7944fe539 100644 --- a/lisp/cedet/semantic/wisent/python.el +++ b/lisp/cedet/semantic/wisent/python.el @@ -41,9 +41,6 @@ (require 'semantic/ctxt) (require 'semantic/format) -(eval-when-compile - (require 'cl)) - ;;; Customization ;; @@ -358,7 +355,7 @@ Set attributes for constructors, special, private and static methods." ;; + first argument is self (when (and (> (length (semantic-tag-function-arguments tag)) 0) (string= (semantic-tag-name - (first (semantic-tag-function-arguments tag))) + (car (semantic-tag-function-arguments tag))) "self")) (semantic-tag-put-attribute tag :parent "dummy")) diff --git a/lisp/cedet/srecode/compile.el b/lisp/cedet/srecode/compile.el index 69282c1a0d..a0a53a6473 100644 --- a/lisp/cedet/srecode/compile.el +++ b/lisp/cedet/srecode/compile.el @@ -31,7 +31,6 @@ ;; The output are a series of EIEIO objects which represent the ;; templates in a way that could be inserted later. -(eval-when-compile (require 'cl)) (require 'semantic) (require 'eieio) (require 'cl-generic) diff --git a/lisp/cedet/srecode/dictionary.el b/lisp/cedet/srecode/dictionary.el index f1287f6802..a2410becb0 100644 --- a/lisp/cedet/srecode/dictionary.el +++ b/lisp/cedet/srecode/dictionary.el @@ -28,7 +28,6 @@ ;;; CLASSES -(eval-when-compile (require 'cl)) (require 'eieio) (require 'cl-generic) (require 'srecode) diff --git a/lisp/cedet/srecode/srt.el b/lisp/cedet/srecode/srt.el index 3bae20e355..fdabdc4c8e 100644 --- a/lisp/cedet/srecode/srt.el +++ b/lisp/cedet/srecode/srt.el @@ -25,7 +25,6 @@ ;;; Code: -(eval-when-compile (require 'cl)) (require 'eieio) (require 'srecode/dictionary) (require 'srecode/insert) commit 4a05f85f5a0cde3d21fb40d2617c944b09a977cd Author: Glenn Morris Date: Fri Mar 23 16:13:09 2018 -0400 gnus: replace cl with cl-lib * lisp/gnus/gnus-agent.el, lisp/gnus/gnus-art.el: * lisp/gnus/gnus-async.el, lisp/gnus/gnus-cache.el: * lisp/gnus/gnus-demon.el, lisp/gnus/gnus-group.el: * lisp/gnus/gnus-icalendar.el, lisp/gnus/gnus-logic.el: * lisp/gnus/gnus-msg.el, lisp/gnus/gnus-picon.el: * lisp/gnus/gnus-registry.el, lisp/gnus/gnus-salt.el: * lisp/gnus/gnus-score.el, lisp/gnus/gnus-spec.el: * lisp/gnus/gnus-srvr.el, lisp/gnus/gnus-start.el: * lisp/gnus/gnus-sum.el, lisp/gnus/gnus-topic.el: * lisp/gnus/gnus-util.el, lisp/gnus/gnus-uu.el, lisp/gnus/gnus-win.el: * lisp/gnus/mail-source.el, lisp/gnus/mm-decode.el: * lisp/gnus/mm-encode.el, lisp/gnus/mm-url.el, lisp/gnus/mm-view.el: * lisp/gnus/mml-smime.el, lisp/gnus/mml.el, lisp/gnus/mml2015.el: * lisp/gnus/nnbabyl.el, lisp/gnus/nndoc.el, lisp/gnus/nneething.el: * lisp/gnus/nnheader.el, lisp/gnus/nnimap.el, lisp/gnus/nnmail.el: * lisp/gnus/nnmaildir.el, lisp/gnus/nnoo.el, lisp/gnus/nnrss.el: * lisp/gnus/nnspool.el, lisp/gnus/nntp.el, lisp/gnus/nnvirtual.el: * lisp/gnus/nnweb.el, lisp/gnus/spam.el: Replace cl with cl-lib. * lisp/gnus/canlock.el, lisp/gnus/gnus-bcklg.el: * lisp/gnus/gnus-cite.el, lisp/gnus/gnus-cloud.el: * lisp/gnus/gnus-draft.el, lisp/gnus/gnus-dup.el: * lisp/gnus/gnus-fun.el, lisp/gnus/gnus-html.el: * lisp/gnus/gnus-int.el, lisp/gnus/gnus-kill.el, lisp/gnus/gnus-ml.el: * lisp/gnus/gnus-mlspl.el, lisp/gnus/gnus-range.el: * lisp/gnus/gnus-undo.el, lisp/gnus/gnus-vm.el: * lisp/gnus/mm-partial.el, lisp/gnus/mm-uu.el, lisp/gnus/mml1991.el: * lisp/gnus/nnagent.el, lisp/gnus/nndiary.el, lisp/gnus/nndir.el: * lisp/gnus/nndraft.el, lisp/gnus/nnfolder.el, lisp/gnus/nngateway.el: * lisp/gnus/nnmairix.el, lisp/gnus/nnmbox.el, lisp/gnus/nnmh.el: * lisp/gnus/nnml.el, lisp/gnus/score-mode.el, lisp/gnus/smiley.el: No need for cl. diff --git a/lisp/gnus/canlock.el b/lisp/gnus/canlock.el index 7c657ead78..0bd47cdde9 100644 --- a/lisp/gnus/canlock.el +++ b/lisp/gnus/canlock.el @@ -41,9 +41,6 @@ ;;; Code: -(eval-when-compile - (require 'cl)) - (require 'sha1) (defvar mail-header-separator) diff --git a/lisp/gnus/gnus-agent.el b/lisp/gnus/gnus-agent.el index 628c9430c9..532fd7e7b8 100644 --- a/lisp/gnus/gnus-agent.el +++ b/lisp/gnus/gnus-agent.el @@ -31,8 +31,7 @@ (require 'gnus-srvr) (require 'gnus-util) (require 'timer) -(eval-when-compile - (require 'cl)) +(eval-when-compile (require 'cl-lib)) (autoload 'gnus-server-update-server "gnus-srvr") (autoload 'gnus-agent-customize-category "gnus-cus") @@ -332,9 +331,9 @@ manipulated as follows: `(progn (defmacro ,name (category) (list 'cdr (list 'assq '',prop-name category))) - (defsetf ,name (category) (value) - (list 'gnus-agent-cat-set-property - category '',prop-name value)))) + (gv-define-setter ,name (value category) + (list 'gnus-agent-cat-set-property + category '',prop-name value)))) ) (defmacro gnus-agent-cat-name (category) @@ -361,11 +360,7 @@ manipulated as follows: (gnus-agent-cat-defaccessor gnus-agent-cat-enable-undownloaded-faces agent-enable-undownloaded-faces) - -;; This form may expand to code that uses CL functions at run-time, -;; but that's OK since those functions will only ever be called from -;; something like `setf', so only when CL is loaded anyway. -(defsetf gnus-agent-cat-groups gnus-agent-set-cat-groups) +(gv-define-simple-setter gnus-agent-cat-groups gnus-agent-set-cat-groups) (defun gnus-agent-set-cat-groups (category groups) (unless (eq groups 'ignore) @@ -2180,7 +2175,7 @@ article counts for each of the method's subscribed groups." 'gnus-agent-file-loading-local 'gnus-agent-read-and-cache-local)) (when gnus-agent-article-local-times - (incf gnus-agent-article-local-times))) + (cl-incf gnus-agent-article-local-times))) gnus-agent-article-local)) (defun gnus-agent-read-and-cache-local (file) @@ -3353,9 +3348,9 @@ missing NOV entry. Run gnus-agent-regenerate-group to restore it."))) (let* ((file-name (nnheader-concat dir (number-to-string article-number))) (size (float (nth 7 (file-attributes file-name))))) - (incf bytes-freed size) - (incf size-files-deleted size) - (incf files-deleted) + (cl-incf bytes-freed size) + (cl-incf size-files-deleted size) + (cl-incf files-deleted) (delete-file file-name)) (push "expired cached article" actions)) (setf (nth 1 entry) nil) @@ -3368,13 +3363,13 @@ missing NOV entry. Run gnus-agent-regenerate-group to restore it."))) marker (- marker position-offset))) - (incf nov-entries-deleted) + (cl-incf nov-entries-deleted) (let* ((from (point-at-bol)) (to (progn (forward-line 1) (point))) (freed (- to from))) - (incf bytes-freed freed) - (incf position-offset freed) + (cl-incf bytes-freed freed) + (cl-incf position-offset freed) (delete-region from to))) ;; If considering all articles is set, I can only @@ -3431,9 +3426,9 @@ expiration tests failed." decoded article-number) (when (boundp 'gnus-agent-expire-stats) (let ((stats gnus-agent-expire-stats)) - (incf (nth 2 stats) bytes-freed) - (incf (nth 1 stats) files-deleted) - (incf (nth 0 stats) nov-entries-deleted))) + (cl-incf (nth 2 stats) bytes-freed) + (cl-incf (nth 1 stats) files-deleted) + (cl-incf (nth 0 stats) nov-entries-deleted))) (gnus-agent-update-files-total-fetched-for group (- size-files-deleted))))))) @@ -4110,7 +4105,7 @@ agent has fetched." (let ((sum 0.0) file) (while (setq file (pop delta)) - (incf sum (float (or (nth 7 (file-attributes + (cl-incf sum (float (or (nth 7 (file-attributes (nnheader-concat path (if (numberp file) @@ -4122,11 +4117,11 @@ agent has fetched." path nil "^-?[0-9]+$" t)) file) (while (setq file (pop info)) - (incf sum (float (or (nth 8 file) 0)))) + (cl-incf sum (float (or (nth 8 file) 0)))) (setq delta sum)))) (setq gnus-agent-need-update-total-fetched-for t) - (incf (nth 2 entry) delta)))))) + (cl-incf (nth 2 entry) delta)))))) (defun gnus-agent-update-view-total-fetched-for (group agent-over &optional method path) diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index f23b910ed2..595ae58c81 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -24,8 +24,7 @@ ;;; Code: -(eval-when-compile - (require 'cl)) +(eval-when-compile (require 'cl-lib)) (defvar tool-bar-map) (defvar w3m-minor-mode-map) @@ -1798,7 +1797,7 @@ Initialized from `text-mode-syntax-table'.") (if (looking-at (car list)) (setq list nil) (setq list (cdr list)) - (incf i))) + (cl-incf i))) i)) (defun article-hide-headers (&optional _arg _delete) @@ -2221,7 +2220,7 @@ This only works if the article in question is HTML." (w3m-toggle-inline-images) (dolist (region (gnus-find-text-property-region (point-min) (point-max) 'image-displayer)) - (destructuring-bind (start end function) region + (cl-destructuring-bind (start end function) region (funcall function (get-text-property start 'image-url) start end))))))) @@ -8211,7 +8210,7 @@ url is put as the `gnus-button-url' overlay property on the button." (defun gnus-button-handle-news (url) "Fetch a news URL." - (destructuring-bind (_scheme server port group message-id _articles) + (cl-destructuring-bind (_scheme server port group message-id _articles) (gnus-parse-news-url url) (cond (message-id diff --git a/lisp/gnus/gnus-async.el b/lisp/gnus/gnus-async.el index 7003aef24f..ad25f805ca 100644 --- a/lisp/gnus/gnus-async.el +++ b/lisp/gnus/gnus-async.el @@ -24,7 +24,7 @@ ;;; Code: -(eval-when-compile (require 'cl)) +(eval-when-compile (require 'cl-lib)) (require 'gnus) (require 'gnus-sum) @@ -183,7 +183,7 @@ that was fetched." d) (while (and (setq d (pop data)) (if (numberp n) - (natnump (decf n)) + (natnump (cl-decf n)) n)) (unless (or (gnus-async-prefetched-article-entry group (setq article (gnus-data-number d))) @@ -290,7 +290,7 @@ that was fetched." ;; should check time-since-last-output, which ;; needs to be done in nntp.el. (while (eq article gnus-async-current-prefetch-article) - (incf tries) + (cl-incf tries) (when (nntp-accept-process-output proc) (setq tries 0)) (when (and (not nntp-have-messaged) diff --git a/lisp/gnus/gnus-bcklg.el b/lisp/gnus/gnus-bcklg.el index 8afc31327d..95cb1ca5ec 100644 --- a/lisp/gnus/gnus-bcklg.el +++ b/lisp/gnus/gnus-bcklg.el @@ -24,8 +24,6 @@ ;;; Code: -(eval-when-compile (require 'cl)) - (require 'gnus) ;;; diff --git a/lisp/gnus/gnus-cache.el b/lisp/gnus/gnus-cache.el index 1cdfea625f..6afc52c0fc 100644 --- a/lisp/gnus/gnus-cache.el +++ b/lisp/gnus/gnus-cache.el @@ -24,7 +24,7 @@ ;;; Code: -(eval-when-compile (require 'cl)) +(eval-when-compile (require 'cl-lib)) (require 'gnus) (require 'gnus-sum) @@ -863,11 +863,11 @@ supported." (while (setq file (pop files)) (setq attrs (file-attributes file)) (unless (nth 0 attrs) - (incf size (float (nth 7 attrs))))))) + (cl-incf size (float (nth 7 attrs))))))) (setq gnus-cache-need-update-total-fetched-for t) - (incf (nth 1 entry) (if subtract (- size) size)))))) + (cl-incf (nth 1 entry) (if subtract (- size) size)))))) (defun gnus-cache-update-overview-total-fetched-for (group file) (when gnus-cache-total-fetched-hashtb diff --git a/lisp/gnus/gnus-cite.el b/lisp/gnus/gnus-cite.el index 07a8494026..64d3a396f3 100644 --- a/lisp/gnus/gnus-cite.el +++ b/lisp/gnus/gnus-cite.el @@ -23,8 +23,6 @@ ;;; Code: -(eval-when-compile (require 'cl)) - (require 'gnus) (require 'gnus-range) (require 'gnus-art) diff --git a/lisp/gnus/gnus-cloud.el b/lisp/gnus/gnus-cloud.el index 86cd399ff1..16bd80dbfa 100644 --- a/lisp/gnus/gnus-cloud.el +++ b/lisp/gnus/gnus-cloud.el @@ -28,7 +28,6 @@ ;;; Code: -(eval-when-compile (require 'cl)) (require 'parse-time) (require 'nnimap) diff --git a/lisp/gnus/gnus-demon.el b/lisp/gnus/gnus-demon.el index 72b0f5cecf..2405c70565 100644 --- a/lisp/gnus/gnus-demon.el +++ b/lisp/gnus/gnus-demon.el @@ -24,7 +24,7 @@ ;;; Code: -(eval-when-compile (require 'cl)) +(eval-when-compile (require 'cl-lib)) (require 'gnus) (require 'gnus-int) @@ -101,7 +101,7 @@ If not, and a TIME is given, restart a new idle timer, so FUNC can be called at the next opportunity. Such a special idle run is marked with SPECIAL." (unless gnus-inhibit-demon - (block run-callback + (cl-block run-callback (when (eq idle t) (setq idle 0.001)) (cond (special @@ -117,7 +117,7 @@ marked with SPECIAL." (run-with-idle-timer idle nil 'gnus-demon-run-callback func idle time t)))) - (return-from run-callback))) + (cl-return-from run-callback))) (with-local-quit (ignore-errors (funcall func)))))) diff --git a/lisp/gnus/gnus-draft.el b/lisp/gnus/gnus-draft.el index 7a37a86fb6..7d4be47e41 100644 --- a/lisp/gnus/gnus-draft.el +++ b/lisp/gnus/gnus-draft.el @@ -30,7 +30,6 @@ (require 'gnus-msg) (require 'nndraft) (require 'gnus-agent) -(eval-when-compile (require 'cl)) ;;; Draft minor mode diff --git a/lisp/gnus/gnus-dup.el b/lisp/gnus/gnus-dup.el index d1335fc8c1..a03c6c140c 100644 --- a/lisp/gnus/gnus-dup.el +++ b/lisp/gnus/gnus-dup.el @@ -29,8 +29,6 @@ ;;; Code: -(eval-when-compile (require 'cl)) - (require 'gnus) (require 'gnus-art) diff --git a/lisp/gnus/gnus-fun.el b/lisp/gnus/gnus-fun.el index 40c6d51111..f1fd51d550 100644 --- a/lisp/gnus/gnus-fun.el +++ b/lisp/gnus/gnus-fun.el @@ -24,9 +24,6 @@ ;;; Code: -(eval-when-compile - (require 'cl)) - (require 'mm-util) (require 'gnus-util) (require 'gnus) diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index 4dd5fec6df..10d203408a 100644 --- a/lisp/gnus/gnus-group.el +++ b/lisp/gnus/gnus-group.el @@ -1901,7 +1901,7 @@ If FIRST-TOO, the current line is also eligible as a target." (insert-char gnus-process-mark 1 t))) (unless no-advance (gnus-group-next-group 1)) - (decf n)) + (cl-decf n)) (gnus-group-position-point) n)) @@ -3924,7 +3924,7 @@ yanked) a list of yanked groups is returned." (interactive "p") (setq arg (or arg 1)) (let (info group prev out) - (while (>= (decf arg) 0) + (while (>= (cl-decf arg) 0) (when (not (setq info (pop gnus-list-of-killed-groups))) (error "No more newsgroups to yank")) (push (setq group (nth 1 info)) out) diff --git a/lisp/gnus/gnus-html.el b/lisp/gnus/gnus-html.el index 5d07a823f6..f097028cb3 100644 --- a/lisp/gnus/gnus-html.el +++ b/lisp/gnus/gnus-html.el @@ -28,8 +28,6 @@ ;;; Code: -(eval-when-compile (require 'cl)) - (require 'gnus-art) (eval-when-compile (require 'mm-decode)) diff --git a/lisp/gnus/gnus-icalendar.el b/lisp/gnus/gnus-icalendar.el index 48cffdb738..3365c826e1 100644 --- a/lisp/gnus/gnus-icalendar.el +++ b/lisp/gnus/gnus-icalendar.el @@ -40,7 +40,7 @@ (require 'gnus-sum) (require 'gnus-art) -(eval-when-compile (require 'cl)) +(eval-when-compile (require 'cl-lib)) (defun gnus-icalendar-find-if (pred seq) (catch 'found @@ -238,7 +238,7 @@ "\\\\n" "\n" (substring-no-properties value)))))) (accumulate-args (mapping) - (destructuring-bind (slot . ical-property) mapping + (cl-destructuring-bind (slot . ical-property) mapping (setq args (append (list (intern (concat ":" (symbol-name slot))) (map-property ical-property)) @@ -443,7 +443,7 @@ Return nil for non-recurring EVENT." ;; A 0:0 - A .:. -> A 0:0-.:. (default 1) ;; A 0:0 - A+n .:. -> A - A+n .:. ((and start-at-midnight - (plusp start-end-date-diff)) (format "<%s>--<%s %s>" start-date end-date end-time)) + (cl-plusp start-end-date-diff)) (format "<%s>--<%s %s>" start-date end-date end-time)) ;; default ;; A .:. - A .:. -> A .:.-.:. ;; A .:. - B .:. diff --git a/lisp/gnus/gnus-int.el b/lisp/gnus/gnus-int.el index a17741b577..5d5f9ebb67 100644 --- a/lisp/gnus/gnus-int.el +++ b/lisp/gnus/gnus-int.el @@ -24,8 +24,6 @@ ;;; Code: -(eval-when-compile (require 'cl)) - (require 'gnus) (require 'message) (require 'gnus-range) diff --git a/lisp/gnus/gnus-kill.el b/lisp/gnus/gnus-kill.el index fd5935b87f..60732c11d5 100644 --- a/lisp/gnus/gnus-kill.el +++ b/lisp/gnus/gnus-kill.el @@ -25,8 +25,6 @@ ;;; Code: -(eval-when-compile (require 'cl)) - (require 'gnus) (require 'gnus-art) (require 'gnus-range) diff --git a/lisp/gnus/gnus-logic.el b/lisp/gnus/gnus-logic.el index e0dba06d39..2076d8aebe 100644 --- a/lisp/gnus/gnus-logic.el +++ b/lisp/gnus/gnus-logic.el @@ -24,7 +24,7 @@ ;;; Code: -(eval-when-compile (require 'cl)) +(eval-when-compile (require 'cl-lib)) (require 'gnus) (require 'gnus-score) diff --git a/lisp/gnus/gnus-ml.el b/lisp/gnus/gnus-ml.el index f78efdee65..1c67f5ffba 100644 --- a/lisp/gnus/gnus-ml.el +++ b/lisp/gnus/gnus-ml.el @@ -28,7 +28,6 @@ (require 'gnus) (require 'gnus-msg) -(eval-when-compile (require 'cl)) ;;; Mailing list minor mode diff --git a/lisp/gnus/gnus-mlspl.el b/lisp/gnus/gnus-mlspl.el index eeb65e67e8..fb45007c12 100644 --- a/lisp/gnus/gnus-mlspl.el +++ b/lisp/gnus/gnus-mlspl.el @@ -24,7 +24,6 @@ ;;; Code: -(eval-when-compile (require 'cl)) (require 'gnus) (require 'gnus-sum) (require 'gnus-group) diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el index effbe2cc5f..04661ec948 100644 --- a/lisp/gnus/gnus-msg.el +++ b/lisp/gnus/gnus-msg.el @@ -25,7 +25,7 @@ ;;; Code: -(eval-when-compile (require 'cl)) +(eval-when-compile (require 'cl-lib)) (require 'gnus) (require 'message) @@ -1113,11 +1113,11 @@ If SILENT, don't prompt the user." ((and (eq gnus-post-method 'current) (not (memq (car group-method) gnus-discouraged-post-methods)) (gnus-get-function group-method 'request-post t)) - (assert (not arg)) + (cl-assert (not arg)) group-method) ;; Use gnus-post-method. ((listp gnus-post-method) ;A method... - (assert (not (listp (car gnus-post-method)))) ;... not a list of methods. + (cl-assert (not (listp (car gnus-post-method)))) ;... not a list of methods. gnus-post-method) ;; Use the normal select method (nil or native). (t gnus-select-method)))) diff --git a/lisp/gnus/gnus-picon.el b/lisp/gnus/gnus-picon.el index 8f3efa4167..b6bb5c9c2b 100644 --- a/lisp/gnus/gnus-picon.el +++ b/lisp/gnus/gnus-picon.el @@ -37,7 +37,7 @@ ;; ;;; Code: -(eval-when-compile (require 'cl)) +(eval-when-compile (require 'cl-lib)) (require 'gnus) (require 'gnus-art) @@ -211,7 +211,7 @@ replacement is added." (gnus-article-goto-header header) (mail-header-narrow-to-field) - (case gnus-picon-style + (cl-case gnus-picon-style (right (when (= (length addresses) 1) (setq len (apply '+ (mapcar (lambda (x) diff --git a/lisp/gnus/gnus-range.el b/lisp/gnus/gnus-range.el index 32433816e4..dd3793593e 100644 --- a/lisp/gnus/gnus-range.el +++ b/lisp/gnus/gnus-range.el @@ -24,8 +24,6 @@ ;;; Code: -(eval-when-compile (require 'cl)) - ;;; List and range functions (defsubst gnus-range-normalize (range) diff --git a/lisp/gnus/gnus-registry.el b/lisp/gnus/gnus-registry.el index 7ae81b02a2..643b8f1165 100644 --- a/lisp/gnus/gnus-registry.el +++ b/lisp/gnus/gnus-registry.el @@ -76,7 +76,7 @@ ;;; Code: -(eval-when-compile (require 'cl)) +(eval-when-compile (require 'cl-lib)) (eval-when-compile (require 'subr-x)) (require 'gnus) @@ -373,7 +373,7 @@ This is not required after changing `gnus-registry-cache-file'." (grouphashtb (registry-lookup-secondary db 'group)) (old-size (registry-size db))) (registry-reindex db) - (loop for k being the hash-keys of grouphashtb + (cl-loop for k being the hash-keys of grouphashtb using (hash-values v) when (gnus-registry-ignore-group-p k) do (registry-delete db v nil)) @@ -444,14 +444,14 @@ This is not required after changing `gnus-registry-cache-file'." (sender ,sender) (recipient ,@recipients) (subject ,subject))) - (when (second kv) - (let ((new (or (assq (first kv) entry) - (list (first kv))))) + (when (cadr kv) + (let ((new (or (assq (car kv) entry) + (list (car kv))))) (dolist (toadd (cdr kv)) (unless (member toadd new) (setq new (append new (list toadd))))) (setq entry (cons new - (assq-delete-all (first kv) entry)))))) + (assq-delete-all (car kv) entry)))))) (gnus-message 10 "Gnus registry: new entry for %s is %S" id entry) @@ -505,7 +505,7 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details." :subject subject :log-agent "Gnus registry fancy splitting with parent"))) -(defun* gnus-registry--split-fancy-with-parent-internal +(cl-defun gnus-registry--split-fancy-with-parent-internal (&rest spec &key references refstr sender subject recipients log-agent &allow-other-keys) @@ -525,7 +525,7 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details." log-agent refstr) (dolist (reference (nreverse references)) (gnus-message 9 "%s is looking up %s" log-agent reference) - (loop for group in (gnus-registry-get-id-key reference 'group) + (cl-loop for group in (gnus-registry-get-id-key reference 'group) when (gnus-registry-follow-group-p group) do (progn @@ -548,7 +548,7 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details." (gnus-registry-get-id-key reference 'group)) (registry-lookup-secondary-value db 'subject subject))))) (setq found - (loop for group in groups + (cl-loop for group in groups when (gnus-registry-follow-group-p group) do (gnus-message ;; warn more if gnus-registry-track-extra @@ -575,7 +575,7 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details." (gnus-registry-get-id-key reference 'group)) (registry-lookup-secondary-value db 'sender sender))))) (setq found - (loop for group in groups + (cl-loop for group in groups when (gnus-registry-follow-group-p group) do (gnus-message ;; warn more if gnus-registry-track-extra @@ -605,7 +605,7 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details." (registry-lookup-secondary-value db 'recipient recp))))) (setq found - (loop for group in groups + (cl-loop for group in groups when (gnus-registry-follow-group-p group) do (gnus-message ;; warn more if gnus-registry-track-extra @@ -641,7 +641,7 @@ possible. Uses `gnus-registry-split-strategy'." out chosen) ;; the strategy can be nil, in which case chosen is nil (setq chosen - (case gnus-registry-split-strategy + (cl-case gnus-registry-split-strategy ;; default, take only one-element lists into chosen ((nil) (and (= (length groups) 1) @@ -693,7 +693,7 @@ possible. Uses `gnus-registry-split-strategy'." 10 "%s: stripped group %s to %s" log-agent group short-name)) - (pushnew short-name out :test #'equal)) + (cl-pushnew short-name out :test #'equal)) ;; else... (gnus-message 7 @@ -1086,7 +1086,7 @@ only the last one's marks are returned." (expected (length old)) entry) (while (car-safe old) - (incf count) + (cl-incf count) ;; don't use progress reporters for backwards compatibility (when (and (< 0 expected) (= 0 (mod count 100))) @@ -1096,7 +1096,7 @@ only the last one's marks are returned." old (cdr-safe old)) (let* ((id (car-safe entry)) (rest (cdr-safe entry)) - (groups (loop for p in rest + (groups (cl-loop for p in rest when (stringp p) collect p)) extra-cell key val) @@ -1232,7 +1232,7 @@ from your existing entries." (when extra (let ((db gnus-registry-db)) (registry-reindex db) - (loop for k being the hash-keys of (oref db data) + (cl-loop for k being the hash-keys of (oref db data) using (hash-value v) do (let ((newv (delq nil (mapcar #'(lambda (entry) (unless (member (car entry) extra) diff --git a/lisp/gnus/gnus-salt.el b/lisp/gnus/gnus-salt.el index a80bb5b703..aff841760a 100644 --- a/lisp/gnus/gnus-salt.el +++ b/lisp/gnus/gnus-salt.el @@ -24,7 +24,7 @@ ;;; Code: -(eval-when-compile (require 'cl)) +(eval-when-compile (require 'cl-lib)) (require 'gnus) (require 'gnus-sum) @@ -131,7 +131,7 @@ It accepts the same format specs that `gnus-summary-line-format' does." (defvar gnus-pick-line-number 1) (defun gnus-pick-line-number () "Return the current line number." - (incf gnus-pick-line-number)) + (cl-incf gnus-pick-line-number)) (defun gnus-pick-start-reading (&optional catch-up) "Start reading the picked articles. @@ -552,7 +552,7 @@ Two predefined functions are available: (not (one-window-p))) (let ((windows 0) tot-win-height) - (walk-windows (lambda (_window) (incf windows))) + (walk-windows (lambda (_window) (cl-incf windows))) (setq tot-win-height (- (frame-height) (* window-min-height (1- windows)) @@ -734,7 +734,7 @@ it in the environment specified by BINDINGS." (insert (make-string len ? ))))) (defsubst gnus-tree-forward-line (n) - (while (>= (decf n) 0) + (while (>= (cl-decf n) 0) (unless (zerop (forward-line 1)) (end-of-line) (insert "\n"))) @@ -784,7 +784,7 @@ it in the environment specified by BINDINGS." (progn (goto-char (point-min)) (end-of-line) - (incf gnus-tmp-indent)) + (cl-incf gnus-tmp-indent)) ;; Recurse downwards in all children of this article. (while thread (gnus-generate-vertical-tree diff --git a/lisp/gnus/gnus-score.el b/lisp/gnus/gnus-score.el index ad11ff4a5c..4192381700 100644 --- a/lisp/gnus/gnus-score.el +++ b/lisp/gnus/gnus-score.el @@ -25,7 +25,7 @@ ;;; Code: -(eval-when-compile (require 'cl)) +(eval-when-compile (require 'cl-lib)) (require 'gnus) (require 'gnus-sum) @@ -3077,7 +3077,7 @@ If ADAPT, return the home adaptive file instead." (setq score (or (nth 1 kill) gnus-score-interactive-default-score) n times) - (while (natnump (decf n)) + (while (natnump (cl-decf n)) (setq score (funcall gnus-decay-score-function score))) (setcdr kill (cons score (cdr (cdr kill))))))))) diff --git a/lisp/gnus/gnus-spec.el b/lisp/gnus/gnus-spec.el index 082ebf1552..379a7f2b5c 100644 --- a/lisp/gnus/gnus-spec.el +++ b/lisp/gnus/gnus-spec.el @@ -24,7 +24,7 @@ ;;; Code: -(eval-when-compile (require 'cl)) +(eval-when-compile (require 'cl-lib)) (defvar gnus-newsrc-file-version) (require 'gnus) @@ -285,15 +285,15 @@ Return a list of updated types." ;; Find the start position. (while (and (< seek length) (< wseek start)) - (incf wseek (char-width (aref string seek))) - (incf seek)) + (cl-incf wseek (char-width (aref string seek))) + (cl-incf seek)) (setq wstart seek) ;; Find the end position. (while (and (<= seek length) (or (not end) (<= wseek end))) - (incf wseek (char-width (aref string seek))) - (incf seek)) + (cl-incf wseek (char-width (aref string seek))) + (cl-incf seek)) (setq wend seek) (substring string wstart (1- wend)))) diff --git a/lisp/gnus/gnus-srvr.el b/lisp/gnus/gnus-srvr.el index 6c6c3b7e30..94fd21b920 100644 --- a/lisp/gnus/gnus-srvr.el +++ b/lisp/gnus/gnus-srvr.el @@ -24,7 +24,7 @@ ;;; Code: -(eval-when-compile (require 'cl)) +(eval-when-compile (require 'cl-lib)) (require 'gnus) (require 'gnus-start) @@ -969,7 +969,7 @@ how new groups will be entered into the group buffer." (not (eobp)) (gnus-browse-unsubscribe-group) (zerop (gnus-browse-next-group ward))) - (decf arg)) + (cl-decf arg)) (gnus-group-position-point) (when (/= 0 arg) (gnus-message 7 "No more newsgroups")) diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el index 2a7a303408..bae01aca87 100644 --- a/lisp/gnus/gnus-start.el +++ b/lisp/gnus/gnus-start.el @@ -36,8 +36,7 @@ (autoload 'gnus-agent-save-local "gnus-agent") (autoload 'gnus-agent-possibly-alter-active "gnus-agent") -(eval-when-compile - (require 'cl)) +(eval-when-compile (require 'cl-lib)) (defvar gnus-agent-covered-methods) (defvar gnus-agent-file-loading-local) @@ -1231,14 +1230,14 @@ for new groups, and subscribe the new groups as zombies." (let ((do-sub (gnus-matches-options-n group))) (cond ((eq do-sub 'subscribe) - (incf groups) + (cl-incf groups) (gnus-sethash group group gnus-killed-hashtb) (gnus-call-subscribe-functions gnus-subscribe-options-newsgroup-method group)) ((eq do-sub 'ignore) nil) (t - (incf groups) + (cl-incf groups) (gnus-sethash group group gnus-killed-hashtb) (if gnus-subscribe-hierarchical-interactive (push group new-newsgroups) @@ -1700,7 +1699,7 @@ backend check whether the group actually exists." ;; aren't equal (and that need extension; i.e., they are async). (let ((methods nil)) (dolist (elem type-cache) - (destructuring-bind (method method-type infos dummy) elem + (cl-destructuring-bind (method method-type infos dummy) elem (let ((gnus-opened-servers methods)) (when (and (gnus-similar-server-opened method) (gnus-check-backend-function @@ -1723,7 +1722,7 @@ backend check whether the group actually exists." ;; Clear out all the early methods. (dolist (elem type-cache) - (destructuring-bind (method method-type infos dummy) elem + (cl-destructuring-bind (method method-type infos dummy) elem (when (and method infos (gnus-check-backend-function @@ -1740,7 +1739,7 @@ backend check whether the group actually exists." (let ((done-methods nil) sanity-spec) (dolist (elem type-cache) - (destructuring-bind (method method-type infos dummy) elem + (cl-destructuring-bind (method method-type infos dummy) elem (setq sanity-spec (list (car method) (cadr method))) (when (and method infos (not (gnus-method-denied-p method))) @@ -1771,7 +1770,7 @@ backend check whether the group actually exists." ;; Do the rest of the retrieval. (dolist (elem type-cache) - (destructuring-bind (method method-type infos early-data) elem + (cl-destructuring-bind (method method-type infos early-data) elem (when (and method infos (not (gnus-method-denied-p method))) (let ((updatep (gnus-check-backend-function @@ -1795,11 +1794,11 @@ backend check whether the group actually exists." ;; are in the secondary select list. ((eq type 'secondary) (let ((i 2)) - (block nil - (dolist (smethod gnus-secondary-select-methods) + (cl-block nil + (cl-dolist (smethod gnus-secondary-select-methods) (when (equal method smethod) - (return i)) - (incf i)) + (cl-return i)) + (cl-incf i)) i))) ;; Just say that all foreign groups have the same rank. (t diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index a5756b1a20..4d95a6442d 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -3809,7 +3809,7 @@ the thread are to be displayed." 1) (t 0)))) (when (and level (zerop level) gnus-tmp-new-adopts) - (incf number + (cl-incf number (apply '+ (mapcar 'gnus-summary-number-of-articles-in-thread gnus-tmp-new-adopts)))) @@ -4411,7 +4411,7 @@ Returns HEADER if it was entered in the DEPENDENCIES. Returns nil otherwise." (setq end (1+ (point))) (when (search-backward "<" nil t) (setq new-child (buffer-substring (point) end)) - (push (list (incf generation) + (push (list (cl-incf generation) child (setq child new-child) subject date) relations))) @@ -4432,7 +4432,7 @@ Returns HEADER if it was entered in the DEPENDENCIES. Returns nil otherwise." (push gnus-reffed-article-number gnus-newsgroup-sparse) (push (cons gnus-reffed-article-number gnus-sparse-mark) gnus-newsgroup-reads) - (decf gnus-reffed-article-number))) + (cl-decf gnus-reffed-article-number))) (gnus-message 7 "Making sparse threads...done"))) (defun gnus-build-old-threads () @@ -4725,7 +4725,7 @@ If LINE, insert the rebuilt thread starting on line LINE." (setq parent (gnus-parent-id references))) (car (gnus-id-to-thread parent)) nil)) - (decf generation)) + (cl-decf generation)) (and (not (eq headers in-headers)) headers))) @@ -5469,7 +5469,7 @@ or a straight list of headers." (nthcdr 1 thread)) stack)) (push (if (nth 1 thread) 1 0) tree-stack) - (incf gnus-tmp-level) + (cl-incf gnus-tmp-level) (setq threads (if thread-end nil (cdar thread))) (if gnus-summary-display-while-building (if building-count @@ -6117,7 +6117,7 @@ If SELECT-ARTICLES, only select those articles from GROUP." (let ((i 5)) (while (and (> i 2) (not (nth i info))) - (when (nthcdr (decf i) info) + (when (nthcdr (cl-decf i) info) (setcdr (nthcdr i info) nil))))))) (defun gnus-set-mode-line (where) @@ -6657,7 +6657,7 @@ current article will be taken into consideration." (if backward (gnus-summary-find-prev nil article) (gnus-summary-find-next nil article))) - (decf n))) + (cl-decf n))) (nreverse articles))) ((and (and transient-mark-mode mark-active) (mark)) (message "region active") @@ -8761,7 +8761,7 @@ If ALL, mark even excluded ticked and dormants as read." (let ((num 0)) (while threads (when (memq (mail-header-number (caar threads)) gnus-newsgroup-limit) - (incf num)) + (cl-incf num)) (pop threads)) (< num 2))) @@ -8893,7 +8893,7 @@ fetch-old-headers verbiage, and so on." gnus-summary-expunge-below)) ;; We increase the expunge-tally here, but that has ;; nothing to do with the limits, really. - (incf gnus-newsgroup-expunged-tally) + (cl-incf gnus-newsgroup-expunged-tally) ;; We also mark as read here, if that's wanted. (when (and gnus-summary-mark-below (< score gnus-summary-mark-below)) @@ -8918,7 +8918,7 @@ fetch-old-headers verbiage, and so on." (defun gnus-expunge-thread (thread) "Mark all articles in THREAD as read." (let* ((number (mail-header-number (car thread)))) - (incf gnus-newsgroup-expunged-tally) + (cl-incf gnus-newsgroup-expunged-tally) ;; We also mark as read here, if that's wanted. (setq gnus-newsgroup-unreads (delq number gnus-newsgroup-unreads)) @@ -8970,7 +8970,7 @@ The difference between N and the number of articles fetched is returned." (gnus-message 1 "No references in article %d" (gnus-summary-article-number)) (setq error t)) - (decf n)) + (cl-decf n)) (gnus-summary-position-point) n)) @@ -8986,7 +8986,7 @@ Return the number of articles fetched." (error "No References in the current article") ;; For each Message-ID in the References header... (while (string-match "<[^>]*>" ref) - (incf n) + (cl-incf n) ;; ... fetch that article. (gnus-summary-refer-article (prog1 (match-string 0 ref) @@ -11148,7 +11148,7 @@ If NO-EXPIRE, auto-expiry will be inhibited." (re-search-backward "[\n\r]" (point-at-bol) 'move-to-limit) (when forward (when (looking-at "\r") - (incf forward)) + (cl-incf forward)) (when (<= (+ forward (point)) (point-max)) ;; Go to the right position on the line. (goto-char (+ forward (point))) @@ -11728,7 +11728,7 @@ will not be hidden." (let ((end nil) (count 0)) (while (not end) - (incf count) + (cl-incf count) (when (zerop (mod count 1000)) (message "Hiding all threads... %d" count)) (when (or (not predicate) @@ -11800,7 +11800,7 @@ If SILENT, don't output messages." (n (abs n))) (while (and (> n 0) (gnus-summary-go-to-next-thread backward)) - (decf n)) + (cl-decf n)) (unless silent (gnus-summary-position-point)) (when (and (not silent) (/= 0 n)) @@ -12371,7 +12371,7 @@ If REVERSE, save parts that do not match TYPE." (cdr gnus-article-current) gnus-summary-save-parts-counter)))) dir))) - (incf gnus-summary-save-parts-counter) + (cl-incf gnus-summary-save-parts-counter) (unless (file-exists-p file) (mm-save-part-to-file handle file)))))) @@ -12544,7 +12544,7 @@ If REVERSE, save parts that do not match TYPE." ;; article numbers for this article. (mail-header-set-number header gnus-reffed-article-number)) (with-current-buffer gnus-summary-buffer - (decf gnus-reffed-article-number) + (cl-decf gnus-reffed-article-number) (gnus-remove-header (mail-header-number header)) (push header gnus-newsgroup-headers) (setq gnus-current-headers header) @@ -13019,7 +13019,7 @@ If ALL is a number, fetch this number of articles." gnus-newsgroup-highest i) (while (> i old-high) (push i new) - (decf i)) + (cl-decf i)) (if (not new) (message "No gnus is bad news") (gnus-summary-insert-articles new) diff --git a/lisp/gnus/gnus-topic.el b/lisp/gnus/gnus-topic.el index ddaace9a24..111f2ae28a 100644 --- a/lisp/gnus/gnus-topic.el +++ b/lisp/gnus/gnus-topic.el @@ -25,7 +25,7 @@ ;;; Code: -(eval-when-compile (require 'cl)) +(eval-when-compile (require 'cl-lib)) (require 'gnus) (require 'gnus-group) @@ -128,7 +128,7 @@ See Info node `(gnus)Formatting Variables'." number) (while entries (when (numberp (setq number (car (pop entries)))) - (incf total number))) + (cl-incf total number))) total)) (defun gnus-group-topic (group) @@ -304,7 +304,7 @@ If RECURSIVE is t, return groups in its subtopics too." (while (and (not (zerop num)) (setq topic (funcall way topic))) (when (gnus-topic-goto-topic topic) - (decf num))) + (cl-decf num))) (unless (zerop num) (goto-char (point-max))) num)) @@ -510,7 +510,7 @@ articles in the topic and its subtopics." info entry end active tick) ;; Insert any sub-topics. (while topicl - (incf unread + (cl-incf unread (gnus-topic-prepare-topic (pop topicl) (1+ level) list-level predicate (not visiblep) lowest regexp))) @@ -564,7 +564,7 @@ articles in the topic and its subtopics." (car entry) (gnus-info-method info))))) (when (and (listp entry) (numberp (car entry))) - (incf unread (car entry))) + (cl-incf unread (car entry))) (when (listp entry) (setq tick t)))) (goto-char beg) @@ -730,10 +730,10 @@ articles in the topic and its subtopics." (cdr gnus-group-list-mode))) entry) (while children - (incf unread (gnus-topic-unread (caar (pop children))))) + (cl-incf unread (gnus-topic-unread (caar (pop children))))) (while (setq entry (pop entries)) (when (numberp (car entry)) - (incf unread (car entry)))) + (cl-incf unread (car entry)))) (gnus-topic-insert-topic-line topic t t (car (gnus-topic-find-topology topic)) nil unread))) @@ -774,10 +774,10 @@ articles in the topic and its subtopics." (if reads (setq unread (- (gnus-group-topic-unread) reads)) (while children - (incf unread (gnus-topic-unread (caar (pop children))))) + (cl-incf unread (gnus-topic-unread (caar (pop children))))) (while (setq entry (pop entries)) (when (numberp (car entry)) - (incf unread (car entry))))) + (cl-incf unread (car entry))))) (setq old-unread (gnus-group-topic-unread)) ;; Insert the topic line. (gnus-topic-insert-topic-line diff --git a/lisp/gnus/gnus-undo.el b/lisp/gnus/gnus-undo.el index 8144e0cadc..d487262c93 100644 --- a/lisp/gnus/gnus-undo.el +++ b/lisp/gnus/gnus-undo.el @@ -43,8 +43,6 @@ ;;; Code: -(eval-when-compile (require 'cl)) - (require 'gnus-util) (require 'gnus) diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el index 8983132bfb..932ae5b541 100644 --- a/lisp/gnus/gnus-util.el +++ b/lisp/gnus/gnus-util.el @@ -32,8 +32,7 @@ ;;; Code: -(eval-when-compile - (require 'cl)) +(eval-when-compile (require 'cl-lib)) (require 'time-date) @@ -1408,7 +1407,7 @@ SPEC is a predicate specifier that contains stuff like `or', `and', (symbol-value history) collection)) filtered-choices) (dolist (x choices) - (setq filtered-choices (adjoin x filtered-choices))) + (setq filtered-choices (cl-adjoin x filtered-choices))) (nreverse filtered-choices)))))) (unwind-protect (progn diff --git a/lisp/gnus/gnus-uu.el b/lisp/gnus/gnus-uu.el index f660b861f7..a171a38595 100644 --- a/lisp/gnus/gnus-uu.el +++ b/lisp/gnus/gnus-uu.el @@ -26,7 +26,7 @@ ;;; Code: -(eval-when-compile (require 'cl)) +(eval-when-compile (require 'cl-lib)) (require 'gnus) (require 'gnus-art) @@ -2047,7 +2047,7 @@ If no file has been included, the user will be asked for a file." (setq length (count-lines (point-min) (point-max))) (setq parts (/ length gnus-uu-post-length)) (unless (< (% length gnus-uu-post-length) 4) - (incf parts))) + (cl-incf parts))) (when gnus-uu-post-separate-description (forward-line -1)) @@ -2106,7 +2106,7 @@ If no file has been included, the user will be asked for a file." (insert-buffer-substring uubuf beg end) (insert beg-line "\n") (setq beg end) - (incf i) + (cl-incf i) (goto-char (point-min)) (re-search-forward (concat "^" (regexp-quote mail-header-separator) "$") nil t) diff --git a/lisp/gnus/gnus-vm.el b/lisp/gnus/gnus-vm.el index 4b4152fd5d..24235d9c71 100644 --- a/lisp/gnus/gnus-vm.el +++ b/lisp/gnus/gnus-vm.el @@ -34,9 +34,6 @@ (require 'gnus) (require 'gnus-msg) -(eval-when-compile - (require 'cl)) - (defvar gnus-vm-inhibit-window-system nil "Inhibit loading `win-vm' if using a window-system. Has to be set before gnus-vm is loaded.") diff --git a/lisp/gnus/gnus-win.el b/lisp/gnus/gnus-win.el index fd0c718195..ff3073a679 100644 --- a/lisp/gnus/gnus-win.el +++ b/lisp/gnus/gnus-win.el @@ -24,7 +24,7 @@ ;;; Code: -(eval-when-compile (require 'cl)) +(eval-when-compile (require 'cl-lib)) (require 'gnus) (require 'gnus-util) @@ -312,7 +312,7 @@ See the Gnus manual for an explanation of the syntax used.") ;; Select the frame in question and do more splits there. (select-frame frame) (setq fresult (or (gnus-configure-frame (elt subs i)) fresult)) - (incf i)) + (cl-incf i)) ;; Select the frame that has the selected buffer. (when fresult (select-frame (window-frame fresult))))) @@ -344,7 +344,7 @@ See the Gnus manual for an explanation of the syntax used.") ((eq type 'vertical) (setq s (max s window-min-height)))) (setcar (cdar comp-subs) s) - (incf total s))) + (cl-incf total s))) ;; Take care of the "1.0" spec. (if rest (setcar (cdr rest) (- len total)) diff --git a/lisp/gnus/mail-source.el b/lisp/gnus/mail-source.el index d2850f4cee..51f76a4a2e 100644 --- a/lisp/gnus/mail-source.el +++ b/lisp/gnus/mail-source.el @@ -26,7 +26,7 @@ (require 'format-spec) (eval-when-compile - (require 'cl) + (require 'cl-lib) (require 'imap)) (autoload 'auth-source-search "auth-source") (autoload 'pop3-movemail "pop3") @@ -439,7 +439,7 @@ the `mail-source-keyword-map' variable." ;; the msname is the mail-source parameter (dolist (msname '(:server :user :port)) ;; the asname is the auth-source parameter - (let* ((asname (case msname + (let* ((asname (cl-case msname (:server :host) ; auth-source uses :host (t msname))) ;; this is the mail-source default @@ -786,7 +786,7 @@ Deleting old (> %s day(s)) incoming mail file `%s'." diff bfile) (when (and (file-regular-p file) (funcall predicate file) (mail-source-movemail file mail-source-crash-box)) - (incf found (mail-source-callback callback file)) + (cl-incf found (mail-source-callback callback file)) (mail-source-run-script postscript (format-spec-make ?t path)) (mail-source-delete-crash-box))) found))) @@ -1041,7 +1041,7 @@ This only works when `display-time' is enabled." (insert "\001\001\001\001\n")) (delete-file file) nil)))) - (incf found (mail-source-callback callback file)) + (cl-incf found (mail-source-callback callback file)) (mail-source-delete-crash-box))))) found))) @@ -1116,7 +1116,7 @@ This only works when `display-time' is enabled." (replace-match ">From ")) (goto-char (point-max)))) (nnheader-ms-strip-cr)) - (incf found (mail-source-callback callback server)) + (cl-incf found (mail-source-callback callback server)) (mail-source-delete-crash-box) (when (and remove fetchflag) (setq remove (nreverse remove)) diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el index 372b6da44b..6fb376fa7c 100644 --- a/lisp/gnus/mm-decode.el +++ b/lisp/gnus/mm-decode.el @@ -25,7 +25,7 @@ (require 'mail-parse) (require 'mm-bodies) -(eval-when-compile (require 'cl)) +(eval-when-compile (require 'cl-lib)) (autoload 'gnus-map-function "gnus-util") diff --git a/lisp/gnus/mm-encode.el b/lisp/gnus/mm-encode.el index 2eec32b9ac..361e85fbe1 100644 --- a/lisp/gnus/mm-encode.el +++ b/lisp/gnus/mm-encode.el @@ -23,7 +23,7 @@ ;;; Code: -(eval-when-compile (require 'cl)) +(eval-when-compile (require 'cl-lib)) (require 'mail-parse) (autoload 'mailcap-extension-to-mime "mailcap") (autoload 'mm-body-7-or-8 "mm-bodies") @@ -204,7 +204,7 @@ This is either `base64' or `quoted-printable'." (goto-char (point-min)) (skip-chars-forward "\x20-\x7f\r\n\t" limit) (while (< (point) limit) - (incf n8bit) + (cl-incf n8bit) (forward-char 1) (skip-chars-forward "\x20-\x7f\r\n\t" limit)) (if (or (< (* 6 n8bit) (- limit (point-min))) diff --git a/lisp/gnus/mm-partial.el b/lisp/gnus/mm-partial.el index b380fae766..51dc8b89e3 100644 --- a/lisp/gnus/mm-partial.el +++ b/lisp/gnus/mm-partial.el @@ -24,8 +24,6 @@ ;;; Code: -(eval-when-compile (require 'cl)) - (require 'gnus-sum) (require 'mm-util) (require 'mm-decode) diff --git a/lisp/gnus/mm-url.el b/lisp/gnus/mm-url.el index 1715097d4f..1008c60a17 100644 --- a/lisp/gnus/mm-url.el +++ b/lisp/gnus/mm-url.el @@ -28,7 +28,7 @@ ;;; Code: -(eval-when-compile (require 'cl)) +(eval-when-compile (require 'cl-lib)) (require 'mm-util) (require 'gnus) @@ -318,7 +318,7 @@ If FOLLOW-REFRESH is non-nil, redirect refresh url in META." (done nil) (first t) result) - (while (and (not (zerop (decf times))) + (while (and (not (zerop (cl-decf times))) (not done)) (with-timeout (mm-url-timeout) (unless first diff --git a/lisp/gnus/mm-uu.el b/lisp/gnus/mm-uu.el index e15eba7592..cf6d6d17ed 100644 --- a/lisp/gnus/mm-uu.el +++ b/lisp/gnus/mm-uu.el @@ -24,7 +24,6 @@ ;;; Code: -(eval-when-compile (require 'cl)) (require 'mail-parse) (require 'nnheader) (require 'mm-decode) diff --git a/lisp/gnus/mm-view.el b/lisp/gnus/mm-view.el index c11af7060b..75786cd71b 100644 --- a/lisp/gnus/mm-view.el +++ b/lisp/gnus/mm-view.el @@ -22,7 +22,7 @@ ;;; Code: -(eval-when-compile (require 'cl)) +(eval-when-compile (require 'cl-lib)) (require 'mail-parse) (require 'mailcap) (require 'mm-bodies) @@ -561,7 +561,7 @@ If MODE is not set, try to find mode automatically." (error "Could not identify PKCS#7 type"))))) (defun mm-view-pkcs7 (handle &optional from) - (case (mm-view-pkcs7-get-type handle) + (cl-case (mm-view-pkcs7-get-type handle) (enveloped (mm-view-pkcs7-decrypt handle from)) (signed (mm-view-pkcs7-verify handle)) (otherwise (error "Unknown or unimplemented PKCS#7 type")))) diff --git a/lisp/gnus/mml-smime.el b/lisp/gnus/mml-smime.el index f91aa140e7..9df33d0937 100644 --- a/lisp/gnus/mml-smime.el +++ b/lisp/gnus/mml-smime.el @@ -24,7 +24,7 @@ ;;; Code: -(eval-when-compile (require 'cl)) +(eval-when-compile (require 'cl-lib)) (require 'smime) (require 'mm-decode) @@ -238,7 +238,7 @@ Whether the passphrase is cached at all is controlled by ;; todo: try dns/ldap automatically first, before prompting user (let (certs done) (while (not done) - (ecase (read (gnus-completing-read + (cl-ecase (read (gnus-completing-read "Fetch certificate from" '("dns" "ldap" "file") t nil nil "ldap")) diff --git a/lisp/gnus/mml.el b/lisp/gnus/mml.el index 38be0dc4e4..9fd72a93d5 100644 --- a/lisp/gnus/mml.el +++ b/lisp/gnus/mml.el @@ -27,7 +27,7 @@ (require 'mm-encode) (require 'mm-decode) (require 'mml-sec) -(eval-when-compile (require 'cl)) +(eval-when-compile (require 'cl-lib)) (eval-when-compile (require 'url)) (autoload 'message-make-message-id "message") @@ -798,12 +798,12 @@ be \"related\" or \"alternate\"." (if (setq recipients (cdr (assq 'recipients cont))) (message-options-set 'message-recipients recipients)) (let ((style (mml-signencrypt-style - (first (or sign-item encrypt-item))))) + (car (or sign-item encrypt-item))))) ;; check if: we're both signing & encrypting, both methods ;; are the same (why would they be different?!), and that ;; the signencrypt style allows for combined operation. - (if (and sign-item encrypt-item (equal (first sign-item) - (first encrypt-item)) + (if (and sign-item encrypt-item (equal (car sign-item) + (car encrypt-item)) (equal style 'combined)) (funcall (nth 1 encrypt-item) cont t) ;; otherwise, revert to the old behavior. @@ -815,7 +815,7 @@ be \"related\" or \"alternate\"." (defun mml-compute-boundary (cont) "Return a unique boundary that does not exist in CONT." (let ((mml-boundary (funcall mml-boundary-function - (incf mml-multipart-number)))) + (cl-incf mml-multipart-number)))) (unless mml-inhibit-compute-boundary ;; This function tries again and again until it has found ;; a unique boundary. @@ -835,7 +835,7 @@ be \"related\" or \"alternate\"." (when (re-search-forward (concat "^--" (regexp-quote mml-boundary)) nil t) (setq mml-boundary (funcall mml-boundary-function - (incf mml-multipart-number))) + (cl-incf mml-multipart-number))) (throw 'not-unique nil)))) ((eq (car cont) 'multipart) (mapc 'mml-compute-boundary-1 (cddr cont)))) diff --git a/lisp/gnus/mml1991.el b/lisp/gnus/mml1991.el index 4198f2c0c5..93b1b5049a 100644 --- a/lisp/gnus/mml1991.el +++ b/lisp/gnus/mml1991.el @@ -25,9 +25,7 @@ ;;; Code: -(eval-when-compile - (require 'cl) - (require 'mm-util)) +(eval-when-compile (require 'mm-util)) (require 'mm-encode) (require 'mml-sec) diff --git a/lisp/gnus/mml2015.el b/lisp/gnus/mml2015.el index b220a96098..5980ddb38f 100644 --- a/lisp/gnus/mml2015.el +++ b/lisp/gnus/mml2015.el @@ -27,7 +27,7 @@ ;;; Code: -(eval-when-compile (require 'cl)) +(eval-when-compile (require 'cl-lib)) (require 'mm-decode) (require 'mm-util) (require 'mml) @@ -237,7 +237,7 @@ If set, it overrides the setting of `mml2015-sign-with-sender'." (setq result (concat result - (case n-slice + (cl-case n-slice (1 slice) (otherwise (concat " " slice)))))) result)) diff --git a/lisp/gnus/nnagent.el b/lisp/gnus/nnagent.el index 44b010c29b..1b2b13ebe4 100644 --- a/lisp/gnus/nnagent.el +++ b/lisp/gnus/nnagent.el @@ -26,7 +26,6 @@ (require 'nnheader) (require 'nnoo) -(eval-when-compile (require 'cl)) (require 'gnus-agent) (require 'nnml) diff --git a/lisp/gnus/nnbabyl.el b/lisp/gnus/nnbabyl.el index faa797aae4..9f80a75571 100644 --- a/lisp/gnus/nnbabyl.el +++ b/lisp/gnus/nnbabyl.el @@ -35,7 +35,7 @@ 5 "Ignore rmail errors from this file, you don't have rmail"))) (require 'nnmail) (require 'nnoo) -(eval-when-compile (require 'cl)) +(eval-when-compile (require 'cl-lib)) (nnoo-declare nnbabyl) @@ -103,7 +103,7 @@ (insert ".\n")) (and (numberp nnmail-large-newsgroup) (> number nnmail-large-newsgroup) - (zerop (% (incf count) 20)) + (zerop (% (cl-incf count) 20)) (nnheader-message 5 "nnbabyl: Receiving headers... %d%%" (floor (* count 100.0) number)))) diff --git a/lisp/gnus/nndiary.el b/lisp/gnus/nndiary.el index 04bb3b5653..609d90b107 100644 --- a/lisp/gnus/nndiary.el +++ b/lisp/gnus/nndiary.el @@ -83,7 +83,6 @@ (require 'nnoo) (require 'nnheader) (require 'nnmail) -(eval-when-compile (require 'cl)) (require 'gnus-start) (require 'gnus-sum) diff --git a/lisp/gnus/nndir.el b/lisp/gnus/nndir.el index 28c903cb91..0506bb20ee 100644 --- a/lisp/gnus/nndir.el +++ b/lisp/gnus/nndir.el @@ -28,7 +28,6 @@ (require 'nnmh) (require 'nnml) (require 'nnoo) -(eval-when-compile (require 'cl)) (nnoo-declare nndir nnml nnmh) diff --git a/lisp/gnus/nndoc.el b/lisp/gnus/nndoc.el index 53864d1bc1..fa3117ae2f 100644 --- a/lisp/gnus/nndoc.el +++ b/lisp/gnus/nndoc.el @@ -33,7 +33,7 @@ (require 'nnoo) (require 'gnus-util) (require 'mm-util) -(eval-when-compile (require 'cl)) +(eval-when-compile (require 'cl-lib)) (nnoo-declare nndoc) @@ -788,7 +788,7 @@ from the document.") (setq blk (nndoc-oe-dbx-decode-block))) (while (and blk (> (car blk) 0) (or (zerop (nth 3 blk)) (> (nth 3 blk) p))) - (push (list (incf i) p nil nil nil 0) nndoc-dissection-alist) + (push (list (cl-incf i) p nil nil nil 0) nndoc-dissection-alist) (while (and (> (car blk) 0) (> (nth 3 blk) p)) (goto-char (1+ (nth 3 blk))) (setq blk (nndoc-oe-dbx-decode-block))) @@ -927,7 +927,7 @@ from the document.") (and (re-search-backward nndoc-file-end nil t) (beginning-of-line))))) (setq body-end (point)) - (push (list (incf i) head-begin head-end body-begin body-end + (push (list (cl-incf i) head-begin head-end body-begin body-end (count-lines body-begin body-end)) nndoc-dissection-alist))))) (setq nndoc-dissection-alist (nreverse nndoc-dissection-alist)))) @@ -1040,7 +1040,7 @@ PARENT is the message-ID of the parent summary line, or nil for none." (replace-match line t t summary-insert) (concat summary-insert line))))) ;; Generate dissection information for this entity. - (push (list (incf nndoc-mime-split-ordinal) + (push (list (cl-incf nndoc-mime-split-ordinal) head-begin head-end body-begin body-end (count-lines body-begin body-end) article-insert summary-insert) @@ -1078,7 +1078,7 @@ PARENT is the message-ID of the parent summary line, or nil for none." part-begin part-end article-insert (concat position (and position ".") - (format "%d" (incf part-counter))) + (format "%d" (cl-incf part-counter))) message-id))))))))) ;;;###autoload diff --git a/lisp/gnus/nndraft.el b/lisp/gnus/nndraft.el index e984bcb382..cee7c92b3f 100644 --- a/lisp/gnus/nndraft.el +++ b/lisp/gnus/nndraft.el @@ -31,7 +31,6 @@ (require 'nnmh) (require 'nnoo) (require 'mm-util) -(eval-when-compile (require 'cl)) ;; The nnoo-import at the end, I think. (declare-function nndraft-request-list "nndraft" (&rest args) t) diff --git a/lisp/gnus/nneething.el b/lisp/gnus/nneething.el index 9b6a92f10e..abd17c5508 100644 --- a/lisp/gnus/nneething.el +++ b/lisp/gnus/nneething.el @@ -25,7 +25,7 @@ ;;; Code: -(eval-when-compile (require 'cl)) +(eval-when-compile (require 'cl-lib)) (require 'mailcap) (require 'nnheader) @@ -101,7 +101,7 @@ included.") (nneething-insert-head file) (insert ".\n")) - (incf count) + (cl-incf count) (and large (zerop (% count 20)) diff --git a/lisp/gnus/nnfolder.el b/lisp/gnus/nnfolder.el index 565c985605..826fd8d855 100644 --- a/lisp/gnus/nnfolder.el +++ b/lisp/gnus/nnfolder.el @@ -32,7 +32,6 @@ (require 'message) (require 'nnmail) (require 'nnoo) -(eval-when-compile (require 'cl)) (require 'gnus) (require 'gnus-util) (require 'gnus-range) diff --git a/lisp/gnus/nngateway.el b/lisp/gnus/nngateway.el index b05c4e8807..8b7898c189 100644 --- a/lisp/gnus/nngateway.el +++ b/lisp/gnus/nngateway.el @@ -24,7 +24,6 @@ ;;; Code: -(eval-when-compile (require 'cl)) (require 'nnoo) (require 'message) diff --git a/lisp/gnus/nnheader.el b/lisp/gnus/nnheader.el index 77afb09a2a..34b4137e93 100644 --- a/lisp/gnus/nnheader.el +++ b/lisp/gnus/nnheader.el @@ -26,7 +26,7 @@ ;;; Code: -(eval-when-compile (require 'cl)) +(eval-when-compile (require 'cl-lib)) (defvar nnmail-extra-headers) (defvar gnus-newsgroup-name) @@ -237,7 +237,7 @@ on your system, you could say something like: (format "fake+none+%s+%d" gnus-newsgroup-name number) (format "fake+none+%s+%s" gnus-newsgroup-name - (int-to-string (incf nnheader-fake-message-id))))) + (int-to-string (cl-incf nnheader-fake-message-id))))) (defsubst nnheader-fake-message-id-p (id) (save-match-data ; regular message-id's are <.*> @@ -612,7 +612,7 @@ the line could be found." (while (and (eq nnheader-head-chop-length (nth 1 (mm-insert-file-contents file nil beg - (incf beg nnheader-head-chop-length)))) + (cl-incf beg nnheader-head-chop-length)))) ;; CRLF or CR might be used for the line-break code. (prog1 (not (re-search-forward "\n\r?\n\\|\r\r" nil t)) (goto-char (point-max))) @@ -784,7 +784,7 @@ If FULL, translate everything." (when (setq trans (cdr (assq (aref leaf i) nnheader-file-name-translation-alist))) (aset leaf i trans)) - (incf i)) + (cl-incf i)) (concat path leaf)))) (defun nnheader-report (backend &rest args) @@ -973,7 +973,7 @@ find-file-hook, etc. (defun nnheader-find-file-noselect (&rest args) "Open a file with some variables bound. See `find-file-noselect' for the arguments." - (letf* ((format-alist nil) + (cl-letf* ((format-alist nil) (auto-mode-alist (mm-auto-mode-alist)) ((default-value 'major-mode) 'fundamental-mode) (enable-local-variables nil) diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index cab1513a16..ffe1a47e93 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el @@ -27,7 +27,7 @@ ;;; Code: (eval-when-compile - (require 'cl) + (require 'cl-lib) (require 'subr-x)) (require 'nnheader) @@ -144,7 +144,7 @@ textual parts.") (defvar nnimap-keepalive-timer nil) (defvar nnimap-process-buffers nil) -(defstruct nnimap +(cl-defstruct nnimap group process commands capabilities select-result newlinep server last-command-time greeting examined stream-type initial-resync) @@ -212,12 +212,12 @@ textual parts.") (defun nnimap-transform-headers () (goto-char (point-min)) (let (article lines size string labels) - (block nil + (cl-block nil (while (not (eobp)) (while (not (looking-at "\\* [0-9]+ FETCH")) (delete-region (point) (progn (forward-line 1) (point))) (when (eobp) - (return))) + (cl-return))) (goto-char (match-end 0)) ;; Unfold quoted {number} strings. (while (re-search-forward @@ -381,7 +381,7 @@ textual parts.") (setq nnimap-stream 'ssl)) (let ((stream (if (eq nnimap-stream 'undecided) - (loop for type in '(ssl network) + (cl-loop for type in '(ssl network) for stream = (let ((nnimap-stream type)) (nnimap-open-connection-1 buffer)) while (eq stream 'no-connect) @@ -794,7 +794,7 @@ textual parts.") (equal id "1") (string-match nnimap-fetch-partial-articles type)) (push id parts)))) - (incf num))) + (cl-incf num))) (nreverse parts))) (deffoo nnimap-request-group (group &optional server dont-check info) @@ -1145,7 +1145,7 @@ If LIMIT, first try to limit the search to the N last articles." ;; Just send all the STORE commands without waiting for ;; response. If they're successful, they're successful. (dolist (action actions) - (destructuring-bind (range action marks) action + (cl-destructuring-bind (range action marks) action (let ((flags (nnimap-marks-to-flags marks))) (when flags (setq sequence (nnimap-send-command @@ -1408,7 +1408,7 @@ If LIMIT, first try to limit the search to the N last articles." (if (and active uidvalidity unexist) ;; Fetch the last 100 flags. (setq start (max 1 (- (cdr active) 100))) - (incf (nnimap-initial-resync nnimap-object)) + (cl-incf (nnimap-initial-resync nnimap-object)) (setq start 1)) (push (list (nnimap-send-command "%s %S" command (utf7-encode group t)) @@ -1472,7 +1472,7 @@ If LIMIT, first try to limit the search to the N last articles." (nnimap-update-info info marks))))) (defun nnimap-update-info (info marks) - (destructuring-bind (existing flags high low uidnext start-article + (cl-destructuring-bind (existing flags high low uidnext start-article permanent-flags uidvalidity vanished highestmodseq) marks (cond @@ -1725,7 +1725,7 @@ If LIMIT, first try to limit the search to the N last articles." (let (start end articles groups uidnext elems permanent-flags uidvalidity vanished highestmodseq) (dolist (elem sequences) - (destructuring-bind (group-sequence flag-sequence totalp group command) + (cl-destructuring-bind (group-sequence flag-sequence totalp group command) elem (setq start (point)) (when (and @@ -1869,7 +1869,7 @@ Return the server's response to the SELECT or EXAMINE command." (get-buffer-process (current-buffer)) (nnimap-log-command (format "%d %s%s\n" - (incf nnimap-sequence) + (cl-incf nnimap-sequence) (apply #'format args) (if (nnimap-newlinep nnimap-object) "" @@ -2166,7 +2166,7 @@ Return the server's response to the SELECT or EXAMINE command." (let ((specs nil) entry) (dolist (elem list) - (destructuring-bind (article spec) elem + (cl-destructuring-bind (article spec) elem (dolist (group (delete nil (mapcar #'car spec))) (unless (setq entry (assoc group specs)) (push (setq entry (list group)) specs)) @@ -2178,12 +2178,12 @@ Return the server's response to the SELECT or EXAMINE command." (defun nnimap-transform-split-mail () (goto-char (point-min)) (let (article bytes) - (block nil + (cl-block nil (while (not (eobp)) (while (not (looking-at "\\* [0-9]+ FETCH.+UID \\([0-9]+\\)")) (delete-region (point) (progn (forward-line 1) (point))) (when (eobp) - (return))) + (cl-return))) (setq article (match-string 1) bytes (nnimap-get-length)) (delete-region (line-beginning-position) (line-end-position)) diff --git a/lisp/gnus/nnmail.el b/lisp/gnus/nnmail.el index 1462578ec2..9f068285e7 100644 --- a/lisp/gnus/nnmail.el +++ b/lisp/gnus/nnmail.el @@ -24,7 +24,7 @@ ;;; Code: -(eval-when-compile (require 'cl)) +(eval-when-compile (require 'cl-lib)) (require 'gnus) ; for macro gnus-kill-buffer, at least (require 'nnheader) @@ -781,7 +781,7 @@ If SOURCE is a directory spec, try to return the group name component." (narrow-to-region start (point)) (goto-char (point-min)) (nnmail-check-duplication message-id func artnum-func) - (incf count) + (cl-incf count) (setq end (point-max)))) (goto-char end)) count)) @@ -927,7 +927,7 @@ If SOURCE is a directory spec, try to return the group name component." (save-restriction (narrow-to-region start (point)) (goto-char (point-min)) - (incf count) + (cl-incf count) (nnmail-check-duplication message-id func artnum-func) (setq end (point-max)))) (goto-char end))) @@ -980,7 +980,7 @@ If SOURCE is a directory spec, try to return the group name component." (save-restriction (narrow-to-region start (point)) (goto-char (point-min)) - (incf count) + (cl-incf count) (nnmail-check-duplication message-id func artnum-func junk-func) (setq end (point-max)))) (goto-char end) @@ -1836,8 +1836,8 @@ be called once per group or once for all groups." ((error quit) (message "Mail source %s failed: %s" source cond) 0))) - (incf total new) - (incf i))) + (cl-incf total new) + (cl-incf i))) ;; If we did indeed read any incoming spools, we save all info. (if (zerop total) (when mail-source-plugged diff --git a/lisp/gnus/nnmaildir.el b/lisp/gnus/nnmaildir.el index dc97b32f0b..d5cfa27c21 100644 --- a/lisp/gnus/nnmaildir.el +++ b/lisp/gnus/nnmaildir.el @@ -68,8 +68,7 @@ (require 'message) (require 'nnmail) -(eval-when-compile - (require 'cl)) +(eval-when-compile (require 'cl-lib)) (defconst nnmaildir-version "Gnus") @@ -165,14 +164,14 @@ This variable is set by `nnmaildir-request-article'.") (defmacro nnmaildir--nov-set-mtime (nov value) `(aset ,nov 3 ,value)) (defmacro nnmaildir--nov-set-extra (nov value) `(aset ,nov 4 ,value)) -(defstruct nnmaildir--art +(cl-defstruct nnmaildir--art (prefix nil :type string) ;; "time.pid.host" (suffix nil :type string) ;; ":2,flags" (num nil :type natnum) ;; article number (msgid nil :type string) ;; "" (nov nil :type vector)) ;; cached nov structure, or nil -(defstruct nnmaildir--grp +(cl-defstruct nnmaildir--grp (name nil :type string) ;; "group.name" (new nil :type list) ;; new/ modtime (cur nil :type list) ;; cur/ modtime @@ -186,7 +185,7 @@ This variable is set by `nnmaildir-request-article'.") (mmth nil :type vector)) ;; obarray mapping mark name->dir modtime ; ("Mark Mod Time Hash") -(defstruct nnmaildir--srv +(cl-defstruct nnmaildir--srv (address nil :type string) ;; server address string (method nil :type list) ;; (nnmaildir "address" ...) (prefix nil :type string) ;; "nnmaildir+address:" @@ -856,7 +855,7 @@ This variable is set by `nnmaildir-request-article'.") ;; then look in marks directories (not (file-exists-p (concat cdir prefix))) (file-exists-p (concat ndir prefix))) - (incf num))))) + (cl-incf num))))) (setf (nnmaildir--grp-cache group) (make-vector num nil)) (let ((inhibit-quit t)) (set (intern gname groups) group)) @@ -1732,7 +1731,7 @@ This variable is set by `nnmaildir-request-article'.") (setq ranges (car action) todo-marks (caddr action)) (dolist (mark todo-marks) - (pushnew mark all-marks :test #'equal)) + (cl-pushnew mark all-marks :test #'equal)) (if (numberp (cdr ranges)) (setq ranges (list ranges))) (nnmaildir--nlist-iterate nlist ranges (cond ((eq 'del (cadr action)) del-action) diff --git a/lisp/gnus/nnmairix.el b/lisp/gnus/nnmairix.el index 3a0035a311..24188f5c74 100644 --- a/lisp/gnus/nnmairix.el +++ b/lisp/gnus/nnmairix.el @@ -134,8 +134,6 @@ ;;; Code: -(eval-when-compile (require 'cl)) ;For (pop (cdr ogroup)). - (require 'nnoo) (require 'gnus-group) (require 'gnus-sum) diff --git a/lisp/gnus/nnmbox.el b/lisp/gnus/nnmbox.el index 57d8d2125f..05342dae00 100644 --- a/lisp/gnus/nnmbox.el +++ b/lisp/gnus/nnmbox.el @@ -33,7 +33,6 @@ (require 'nnmail) (require 'nnoo) (require 'gnus-range) -(eval-when-compile (require 'cl)) (nnoo-declare nnmbox) diff --git a/lisp/gnus/nnmh.el b/lisp/gnus/nnmh.el index b8dd383552..ea07ad7519 100644 --- a/lisp/gnus/nnmh.el +++ b/lisp/gnus/nnmh.el @@ -33,7 +33,6 @@ (require 'nnmail) (require 'gnus-start) (require 'nnoo) -(eval-when-compile (require 'cl)) (nnoo-declare nnmh) diff --git a/lisp/gnus/nnml.el b/lisp/gnus/nnml.el index a1b7d417ab..6307e13218 100644 --- a/lisp/gnus/nnml.el +++ b/lisp/gnus/nnml.el @@ -35,7 +35,6 @@ (require 'nnheader) (require 'nnmail) (require 'nnoo) -(eval-when-compile (require 'cl)) ;; FIXME first is unused in this file. (autoload 'gnus-article-unpropagatable-p "gnus-sum") diff --git a/lisp/gnus/nnoo.el b/lisp/gnus/nnoo.el index 6a61d3d09f..1e69af65a3 100644 --- a/lisp/gnus/nnoo.el +++ b/lisp/gnus/nnoo.el @@ -25,7 +25,7 @@ ;;; Code: (require 'nnheader) -(eval-when-compile (require 'cl)) +(eval-when-compile (require 'cl-lib)) (defvar nnoo-definition-alist nil) (defvar nnoo-state-alist nil) @@ -142,7 +142,7 @@ (if (numberp (nth i (cdr m))) (push `(nth ,i args) margs) (push (nth i (cdr m)) margs)) - (incf i)) + (cl-incf i)) (eval `(deffoo ,(nnoo-symbol backend (nnoo-rest-symbol (car m))) (&rest args) (nnoo-parent-function ',backend ',(car m) diff --git a/lisp/gnus/nnrss.el b/lisp/gnus/nnrss.el index a04ede6784..c38f7eb79b 100644 --- a/lisp/gnus/nnrss.el +++ b/lisp/gnus/nnrss.el @@ -24,7 +24,7 @@ ;;; Code: -(eval-when-compile (require 'cl)) +(eval-when-compile (require 'cl-lib)) (require 'gnus) (require 'nnoo) @@ -355,8 +355,8 @@ for decoding when the cdr that the data specify is not available.") (with-current-buffer nntp-server-buffer (erase-buffer) (dolist (elem nnrss-group-alist) - (if (third elem) - (insert (car elem) "\t" (third elem) "\n")))) + (if (nth 2 elem) + (insert (car elem) "\t" (nth 2 elem) "\n")))) t) (deffoo nnrss-retrieve-groups (groups &optional server) @@ -645,7 +645,7 @@ which RSS 2.0 allows." nnrss-directory)))) (setq xml (nnrss-fetch file t)) (setq url (or (nth 2 (assoc group nnrss-server-data)) - (second (assoc group nnrss-group-alist)))) + (cadr (assoc group nnrss-group-alist)))) (unless url (setq url (cdr @@ -691,7 +691,7 @@ which RSS 2.0 allows." (if (and len (integerp (setq len (string-to-number len)))) ;; actually already in `ls-lisp-format-file-size' but ;; probably not worth to require it for one function - (do ((size (/ len 1.0) (/ size 1024.0)) + (cl-do ((size (/ len 1.0) (/ size 1024.0)) (post-fixes (list "" "k" "M" "G" "T" "P" "E") (cdr post-fixes))) ((< size 1024) @@ -705,7 +705,7 @@ which RSS 2.0 allows." (setq enclosure (list url name len type)))) (push (list - (incf nnrss-group-max) + (cl-incf nnrss-group-max) (current-time) url (and subject (nnrss-mime-encode-string subject)) @@ -792,7 +792,7 @@ It is useful when `(setq nnrss-use-local t)'." (insert "RSSDIR='" (expand-file-name nnrss-directory) "'\n") (dolist (elem nnrss-server-data) (let ((url (or (nth 2 elem) - (second (assoc (car elem) nnrss-group-alist))))) + (cadr (assoc (car elem) nnrss-group-alist))))) (insert "$WGET -q -O \"$RSSDIR\"/'" (nnrss-translate-file-chars (concat (car elem) ".xml")) "' '" url "'\n")))) diff --git a/lisp/gnus/nnspool.el b/lisp/gnus/nnspool.el index c3fc25047b..128ce7cac6 100644 --- a/lisp/gnus/nnspool.el +++ b/lisp/gnus/nnspool.el @@ -29,7 +29,7 @@ (require 'nnheader) (require 'nntp) (require 'nnoo) -(eval-when-compile (require 'cl)) +(eval-when-compile (require 'cl-lib)) ;; Probably this entire thing should be obsolete. ;; It's only used to init nnspool-spool-directory, so why not just @@ -172,7 +172,7 @@ there.") (delete-region (point) (point-max))) (and do-message - (zerop (% (incf count) 20)) + (zerop (% (cl-incf count) 20)) (nnheader-message 5 "nnspool: Receiving headers... %d%%" (floor (* count 100.0) number)))) diff --git a/lisp/gnus/nntp.el b/lisp/gnus/nntp.el index d0d1384937..5291919bab 100644 --- a/lisp/gnus/nntp.el +++ b/lisp/gnus/nntp.el @@ -33,7 +33,7 @@ (nnoo-declare nntp) -(eval-when-compile (require 'cl)) +(eval-when-compile (require 'cl-lib)) (autoload 'auth-source-search "auth-source") @@ -565,7 +565,7 @@ retried once before actually displaying the error report." (nntp-find-connection-buffer nntp-server-buffer))) (nntp-encode-text) ;; Make sure we did not forget to encode some of the content. - (assert (save-excursion (goto-char (point-min)) + (cl-assert (save-excursion (goto-char (point-min)) (not (re-search-forward "[^\000-\377]" nil t)))) (mm-disable-multibyte) (process-send-region (nntp-find-connection nntp-server-buffer) @@ -701,7 +701,7 @@ command whose response triggered the error." ;; `articles' is either a list of article numbers ;; or a list of article IDs. article)) - (incf count) + (cl-incf count) ;; Every 400 requests we have to read the stream in ;; order to avoid deadlocks. (when (or (null articles) ;All requests have been sent. @@ -713,7 +713,7 @@ command whose response triggered the error." ;; Count replies. (while (nntp-next-result-arrived-p) (setq last-point (point)) - (incf received)) + (cl-incf received)) (< received count)) ;; If number of headers is greater than 100, give ;; informative messages. @@ -786,7 +786,7 @@ command whose response triggered the error." "^[.]" "^[0-9]") nil t) - (incf received)) + (cl-incf received)) (setq last-point (point)) (< received count))) (nntp-accept-response)) @@ -851,7 +851,7 @@ command whose response triggered the error." (throw 'done nil)) ;; Send the command to the server. (nntp-send-command nil command (pop groups)) - (incf count) + (cl-incf count) ;; Every 400 requests we have to read the stream in ;; order to avoid deadlocks. (when (or (null groups) ;All requests have been sent. @@ -865,7 +865,7 @@ command whose response triggered the error." (goto-char last-point) ;; Count replies. (while (re-search-forward "^[0-9]" nil t) - (incf received)) + (cl-incf received)) (setq last-point (point)) (< received count))) (nntp-accept-response)))) @@ -937,7 +937,7 @@ command whose response triggered the error." ;; `articles' is either a list of article numbers ;; or a list of article IDs. article)) - (incf count) + (cl-incf count) ;; Every 400 requests we have to read the stream in ;; order to avoid deadlocks. (when (or (null articles) ;All requests have been sent. @@ -950,7 +950,7 @@ command whose response triggered the error." (while (nntp-next-result-arrived-p) (aset map received (cons (aref map received) (point))) (setq last-point (point)) - (incf received)) + (cl-incf received)) (< received count)) ;; If number of headers is greater than 100, give ;; informative messages. @@ -1572,7 +1572,7 @@ If SEND-IF-FORCE, only send authinfo to the server if the ;; Count replies. (while (re-search-forward "^\\([0-9][0-9][0-9]\\) .*\n" nil t) - (incf received) + (cl-incf received) (setq status (match-string 1)) (if (string-match "^[45]" status) (setq status 'error) diff --git a/lisp/gnus/nnvirtual.el b/lisp/gnus/nnvirtual.el index 397d44ee2a..777c5c1bbe 100644 --- a/lisp/gnus/nnvirtual.el +++ b/lisp/gnus/nnvirtual.el @@ -38,7 +38,7 @@ (require 'gnus-start) (require 'gnus-sum) (require 'gnus-msg) -(eval-when-compile (require 'cl)) +(eval-when-compile (require 'cl-lib)) (nnoo-declare nnvirtual) @@ -774,13 +774,13 @@ based on the marks on the component groups." ;; We need to convert the unreads to reads. We compress the ;; sequence as we go, otherwise it could be huge. - (while (and (<= (incf i) nnvirtual-mapping-len) + (while (and (<= (cl-incf i) nnvirtual-mapping-len) unreads) (if (= i (car unreads)) (setq unreads (cdr unreads)) ;; try to get a range. (setq beg i) - (while (and (<= (incf i) nnvirtual-mapping-len) + (while (and (<= (cl-incf i) nnvirtual-mapping-len) (not (= i (car unreads))))) (setq i (- i 1)) (if (= i beg) diff --git a/lisp/gnus/nnweb.el b/lisp/gnus/nnweb.el index cac2dae8eb..3b63e71dcd 100644 --- a/lisp/gnus/nnweb.el +++ b/lisp/gnus/nnweb.el @@ -24,7 +24,7 @@ ;;; Code: -(eval-when-compile (require 'cl)) +(eval-when-compile (require 'cl-lib)) (require 'nnoo) (require 'message) @@ -33,9 +33,7 @@ (require 'nnmail) (require 'mm-util) (require 'mm-url) -(eval-and-compile - (ignore-errors - (require 'url))) +(require 'url) (nnoo-declare nnweb) @@ -362,11 +360,11 @@ Valid types include `google', `dejanews', and `gmane'.") (current-time-string))) (setq From (match-string 4))) (widen) - (incf i) + (cl-incf i) (unless (nnweb-get-hashtb url) (push (list - (incf (cdr active)) + (cl-incf (cdr active)) (make-full-mail-header (cdr active) (if Newsgroups (concat "(" Newsgroups ") " Subject) @@ -398,7 +396,7 @@ Valid types include `google', `dejanews', and `gmane'.") (nconc nnweb-articles (nnweb-google-parse-1))) ;; Check if there are more articles to fetch (goto-char (point-min)) - (incf i 100) + (cl-incf i 100) (if (or (not (re-search-forward "]+href=\"\n?\\([^>\" \n\t]+\\)[^<]*]+src=[^>]+next" nil t)) @@ -478,7 +476,7 @@ Valid types include `google', `dejanews', and `gmane'.") (rfc2047-encode-string subject)) (unless (nnweb-get-hashtb (mail-header-xref header)) - (mail-header-set-number header (incf (cdr active))) + (mail-header-set-number header (cl-incf (cdr active))) (push (list (mail-header-number header) header) map) (nnweb-set-hashtb (cadar map) (car map)))))) (forward-line 1))) diff --git a/lisp/gnus/score-mode.el b/lisp/gnus/score-mode.el index 0ac56a9a3d..9bceb4ead9 100644 --- a/lisp/gnus/score-mode.el +++ b/lisp/gnus/score-mode.el @@ -24,7 +24,6 @@ ;;; Code: -(eval-when-compile (require 'cl)) (require 'mm-util) ; for mm-universal-coding-system (require 'gnus-util) ; for gnus-pp, gnus-run-mode-hooks diff --git a/lisp/gnus/smiley.el b/lisp/gnus/smiley.el index 389ae67d1a..226a4cecdc 100644 --- a/lisp/gnus/smiley.el +++ b/lisp/gnus/smiley.el @@ -47,7 +47,6 @@ ;;; Code: -(eval-when-compile (require 'cl)) (require 'nnheader) (require 'gnus-art) diff --git a/lisp/gnus/spam.el b/lisp/gnus/spam.el index 97e63404c4..710e0e83cf 100644 --- a/lisp/gnus/spam.el +++ b/lisp/gnus/spam.el @@ -38,8 +38,6 @@ ;;{{{ compilation directives and autoloads/requires -(eval-when-compile (require 'cl)) - (require 'message) ;for the message-fetch-field functions (require 'gnus-sum) (require 'gnus-uu) ; because of key prefix issues @@ -51,6 +49,8 @@ ;; for nnimap-split-download-body-default (eval-when-compile (require 'nnimap)) +(eval-when-compile (require 'cl-lib)) + ;; autoload query-dig (autoload 'query-dig "dig") @@ -1164,12 +1164,12 @@ backends)." (defun spam-article-sort-by-spam-status (h1 h2) "Sort articles by score." (let (result) - (dolist (header (spam-necessary-extra-headers)) + (cl-dolist (header (spam-necessary-extra-headers)) (let ((s1 (spam-summary-score h1 header)) (s2 (spam-summary-score h2 header))) (unless (= s1 s2) (setq result (< s1 s2)) - (return)))) + (cl-return)))) result)) (defvar spam-spamassassin-score-regexp @@ -1205,14 +1205,14 @@ Note this has to be fast." With SPECIFIC-HEADER, returns only that header's score. Will not return a nil score." (let (score) - (dolist (header + (cl-dolist (header (if specific-header (list specific-header) (spam-necessary-extra-headers))) (setq score (spam-extra-header-to-number header headers)) (when score - (return))) + (cl-return))) (or score 0))) (defun spam-generic-score (&optional recheck) @@ -1661,10 +1661,10 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details." article-cannot-be-faked) - (dolist (backend methods) + (cl-dolist (backend methods) (when (spam-backend-statistical-p backend) (setq article-cannot-be-faked t) - (return))) + (cl-return))) (when (memq 'default methods) (setq article-cannot-be-faked t)) @@ -1749,7 +1749,7 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details." ;; eliminate duplicates (dolist (article (copy-sequence ulist)) (when (memq article rlist) - (incf delcount) + (cl-incf delcount) (setq rlist (delq article rlist)) (setq ulist (delq article ulist)))) @@ -2299,10 +2299,10 @@ With a non-nil REMOVE, remove the ADDRESSES." (when (stringp from) (spam-filelist-build-cache type) (let (found) - (dolist (address (gethash type spam-caches)) + (cl-dolist (address (gethash type spam-caches)) (when (and address (string-match address from)) (setq found t) - (return))) + (cl-return))) found))) ;;; returns t if the sender is in the whitelist, nil or commit aa83340fd43bf70f8bc2159310e18c3d0a2182a2 Author: Glenn Morris Date: Fri Mar 23 16:12:13 2018 -0400 * lisp/gnus/gnus-vm.el (vm-mode, vm-save-message): Declare rather than autoload. diff --git a/lisp/gnus/gnus-vm.el b/lisp/gnus/gnus-vm.el index f0c48db10d..4b4152fd5d 100644 --- a/lisp/gnus/gnus-vm.el +++ b/lisp/gnus/gnus-vm.el @@ -37,9 +37,6 @@ (eval-when-compile (require 'cl)) -(autoload 'vm-mode "vm") -(autoload 'vm-save-message "vm") - (defvar gnus-vm-inhibit-window-system nil "Inhibit loading `win-vm' if using a window-system. Has to be set before gnus-vm is loaded.") @@ -49,6 +46,8 @@ Has to be set before gnus-vm is loaded.") (when window-system (require 'win-vm)))) +(declare-function vm-mode "ext:vm" (&optional read-only)) + (defun gnus-vm-make-folder (&optional buffer) (require 'vm) (let ((article (or buffer (current-buffer))) @@ -81,6 +80,8 @@ save those articles instead." (let ((gnus-default-article-saver 'gnus-summary-save-in-vm)) (gnus-summary-save-article arg))) +(declare-function vm-save-message "ext:vm-save" (folder &optional count)) + (defun gnus-summary-save-in-vm (&optional folder) (interactive) (require 'vm) commit 901f13122f7d605b5610adeb778973a2e3e80907 Author: Paul Eggert Date: Fri Mar 23 13:14:06 2018 -0700 * src/process.c (Fsignal_process): Simplify. diff --git a/src/process.c b/src/process.c index 11d914aab2..2aaa238f60 100644 --- a/src/process.c +++ b/src/process.c @@ -6842,12 +6842,7 @@ SIGCODE may be an integer, or a symbol whose name is a signal name. */) { Lisp_Object tem = Fget_process (process); if (NILP (tem)) - { - Lisp_Object process_number - = string_to_number (SSDATA (process), 10, true); - if (NUMBERP (process_number)) - tem = process_number; - } + tem = string_to_number (SSDATA (process), 10, true); process = tem; } else if (!NUMBERP (process)) commit f92c6dd6cd09991c2ab4c0612574064ca061d927 Author: Paul Eggert Date: Fri Mar 23 13:10:14 2018 -0700 Fix too-large integer in Hg backend * lisp/vc/vc-hg.el (vc-hg-state-fast): Don’t assume that 2**32 - 1 is representable as a fixnum. diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el index 9dafaef7aa..14df9d8b67 100644 --- a/lisp/vc/vc-hg.el +++ b/lisp/vc/vc-hg.el @@ -1016,8 +1016,8 @@ hg binary." (not (vc-hg--requirements-understood-p repo)) ;; Dirstate too small to be valid (< (nth 7 dirstate-attr) 40) - ;; We want to store 32-bit unsigned values in fixnums - (< most-positive-fixnum 4294967295) + ;; We want to store 32-bit unsigned values in fixnums. + (zerop (lsh -1 32)) (progn (setf repo-relative-filename (file-relative-name truename repo)) commit 7d6c7d0b461705fd67f7df1096b6f6376931f140 Author: Glenn Morris Date: Fri Mar 23 16:01:12 2018 -0400 ; Use GNU not Gnu in docs diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi index df644b9587..f97a758f32 100644 --- a/doc/emacs/emacs.texi +++ b/doc/emacs/emacs.texi @@ -1185,7 +1185,7 @@ Reporting Bugs Contributing to Emacs Development -* Coding Standards:: Gnu Emacs coding standards. +* Coding Standards:: GNU Emacs coding standards. * Copyright Assignment:: Assigning copyright to the FSF. Command Line Arguments for Emacs Invocation diff --git a/doc/emacs/trouble.texi b/doc/emacs/trouble.texi index 26deeb78fa..37a7304167 100644 --- a/doc/emacs/trouble.texi +++ b/doc/emacs/trouble.texi @@ -698,7 +698,7 @@ include a valid reply email address, in case we need to ask you for more information about your report. Submissions are moderated, so there may be a delay before your report appears. -You do not need to know how the Gnu Bug Tracker works in order to +You do not need to know how the GNU Bug Tracker works in order to report a bug, but if you want to, you can read the tracker's online documentation to see the various features you can use. @@ -713,7 +713,7 @@ If your data is more than 500,000 bytes, please don't include it directly in the bug report; instead, offer to send it on request, or make it available online and say where. -The Gnu Bug Tracker will assign a bug number to your report; please +The GNU Bug Tracker will assign a bug number to your report; please use it in the following discussions. To enable maintainers to investigate a bug, your report @@ -1246,7 +1246,7 @@ implement a new feature, and submit a patch. @item develop a package that works with Emacs, and publish it on your own -or in Gnu ELPA (@url{https://elpa.gnu.org/}). +or in GNU ELPA (@url{https://elpa.gnu.org/}). @item port Emacs to a new platform, but that is not common nowadays. @@ -1335,7 +1335,7 @@ the Emacs Lisp Reference Manual @end itemize @menu -* Coding Standards:: Gnu Emacs coding standards +* Coding Standards:: GNU Emacs coding standards * Copyright Assignment:: assigning copyright to the FSF @end menu diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index 2ac89ba970..1743a977ec 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi @@ -6968,7 +6968,7 @@ The glyph for the end of a truncated screen line (the default for this is @samp{$}). @xref{Glyphs}. On graphical terminals, Emacs by default uses arrows in the fringes to indicate truncation, so the display table has no effect, unless you disable the fringes -(@pxref{Fringes,, Window Fringes, emacs, the Gnu Emacs Manual}). +(@pxref{Fringes,, Window Fringes, emacs, the GNU Emacs Manual}). @item 1 The glyph for the end of a continued line (the default is @samp{\}). diff --git a/doc/misc/ada-mode.texi b/doc/misc/ada-mode.texi index 67d46fae5a..4a4dbd56a9 100644 --- a/doc/misc/ada-mode.texi +++ b/doc/misc/ada-mode.texi @@ -71,7 +71,7 @@ modify this GNU manual.'' The Emacs mode for programming in Ada helps the user in understanding existing code and facilitates writing new code. -When the Gnu Ada compiler GNAT is used, the cross-reference +When the GNU Ada compiler GNAT is used, the cross-reference information output by the compiler is used to provide powerful code navigation (jump to definition, find all uses, etc.). @@ -221,7 +221,7 @@ is beyond the scope of this manual; see the current definitions in @node Other compiler @section Other compiler -By default, Ada mode is configured to use the Gnu Ada compiler GNAT. +By default, Ada mode is configured to use the GNU Ada compiler GNAT. To use a different Ada compiler, you must specify the command lines used to run that compiler, either in lisp variables or in Emacs diff --git a/doc/misc/dired-x.texi b/doc/misc/dired-x.texi index 60e978c9d9..a502667ab8 100644 --- a/doc/misc/dired-x.texi +++ b/doc/misc/dired-x.texi @@ -338,7 +338,7 @@ inside your @code{dired-mode-hook} to have omitting initially turned on in To enable omitting automatically only in certain directories you can add a directory local setting -(@pxref{Directory Variables,,,emacs,The Gnu Emacs manual}) for Dired mode +(@pxref{Directory Variables,,,emacs,The GNU Emacs manual}) for Dired mode @example ((dired-mode . ((dired-omit-mode . t)))) @@ -487,7 +487,7 @@ in your @code{dired-mode-hook}. @noindent This Dired-X feature is obsolete as of Emacs 24.1. The standard Emacs directory local variables mechanism (@pxref{Directory -Variables,,,emacs,The Gnu Emacs manual}) replaces it. For an example of +Variables,,,emacs,The GNU Emacs manual}) replaces it. For an example of the new mechanisms, @pxref{Omitting Variables}. When Dired visits a directory, it looks for a file whose name is the diff --git a/doc/misc/org.texi b/doc/misc/org.texi index c6d603cd60..216f43eb32 100644 --- a/doc/misc/org.texi +++ b/doc/misc/org.texi @@ -2060,7 +2060,7 @@ You can check syntax in your documents using @code{org-lint} command. Org comes with a fast and intuitive table editor. Spreadsheet-like calculations are supported using the Emacs @file{calc} package -(@pxref{Top, Calc, , calc, Gnu Emacs Calculator Manual}). +(@pxref{Top, Calc, , calc, GNU Emacs Calculator Manual}). @menu * Built-in table editor:: Simple tables diff --git a/lisp/cedet/cedet-global.el b/lisp/cedet/cedet-global.el index ad05af241d..a0e88136e2 100644 --- a/lisp/cedet/cedet-global.el +++ b/lisp/cedet/cedet-global.el @@ -105,7 +105,7 @@ SCOPE is the scope of the search, such as 'project or 'subdirs." (defun cedet-gnu-global-expand-filename (filename) "Expand the FILENAME with GNU Global. Return a list of absolute filenames or nil if none found. -Signal an error if Gnu global not available." +Signal an error if GNU global not available." (interactive "sFile: ") (let ((ans (with-current-buffer (cedet-gnu-global-call (list "-Pa" filename)) (goto-char (point-min)) diff --git a/lisp/cedet/ede/locate.el b/lisp/cedet/ede/locate.el index fbc8dc8f8f..c1c4851048 100644 --- a/lisp/cedet/ede/locate.el +++ b/lisp/cedet/ede/locate.el @@ -246,7 +246,7 @@ variable `cedet-global-command'.") (cl-defmethod ede-locate-file-in-project-impl ((loc ede-locate-global) filesubstring) - "Locate occurrences of FILESUBSTRING in LOC, using Gnu Global." + "Locate occurrences of FILESUBSTRING in LOC, using GNU Global." (require 'cedet-global) (let ((default-directory (oref loc root))) (cedet-gnu-global-expand-filename filesubstring))) diff --git a/lisp/files.el b/lisp/files.el index 46d4b0c368..a10c067cf7 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -2538,7 +2538,7 @@ since only a single case-insensitive search through the alist is made." ("\\.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 + '(("\\.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) diff --git a/lisp/progmodes/cc-defs.el b/lisp/progmodes/cc-defs.el index 02b96517eb..613e2b303d 100644 --- a/lisp/progmodes/cc-defs.el +++ b/lisp/progmodes/cc-defs.el @@ -1247,7 +1247,7 @@ remains unchanged." -char-)) (delete-extent ext))) nil ,from ,to ,value nil -property-)) - ;; Gnu Emacs + ;; GNU Emacs `(c-clear-char-property-with-value-on-char-function ,from ,to ,property ,value ,char))) diff --git a/lisp/progmodes/inf-lisp.el b/lisp/progmodes/inf-lisp.el index f0e052feb8..55e5d0ecdc 100644 --- a/lisp/progmodes/inf-lisp.el +++ b/lisp/progmodes/inf-lisp.el @@ -108,8 +108,8 @@ mode. Default is whitespace followed by 0 or 1 single-letter colon-keyword ;;; These commands augment Lisp mode, so you can process Lisp code in ;;; the source files. -(define-key lisp-mode-map "\M-\C-x" 'lisp-eval-defun) ; Gnu convention -(define-key lisp-mode-map "\C-x\C-e" 'lisp-eval-last-sexp) ; Gnu convention +(define-key lisp-mode-map "\M-\C-x" 'lisp-eval-defun) ; GNU convention +(define-key lisp-mode-map "\C-x\C-e" 'lisp-eval-last-sexp) ; GNU convention (define-key lisp-mode-map "\C-c\C-e" 'lisp-eval-defun) (define-key lisp-mode-map "\C-c\C-r" 'lisp-eval-region) (define-key lisp-mode-map "\C-c\C-n" 'lisp-eval-form-and-next) diff --git a/lisp/vc/ediff-diff.el b/lisp/vc/ediff-diff.el index f2944e5708..34410923ad 100644 --- a/lisp/vc/ediff-diff.el +++ b/lisp/vc/ediff-diff.el @@ -909,7 +909,7 @@ delimiter regions")) (defun ediff-get-diff3-group (file) ;; This save-excursion allows ediff-get-diff3-group to be called for the ;; various groups of lines (1, 2, 3) in any order, and for the lines to - ;; appear in any order. The reason this is necessary is that Gnu diff3 + ;; appear in any order. The reason this is necessary is that GNU diff3 ;; can produce the groups in the order 1, 2, 3 or 1, 3, 2. (save-excursion (re-search-forward diff --git a/lisp/vc/emerge.el b/lisp/vc/emerge.el index 3f945bbb2b..0da14d07fd 100644 --- a/lisp/vc/emerge.el +++ b/lisp/vc/emerge.el @@ -832,7 +832,7 @@ This is *not* a user option, since Emerge uses it for its own processing.") (defun emerge-get-diff3-group (file) ;; This save-excursion allows emerge-get-diff3-group to be called for the ;; various groups of lines (1, 2, 3) in any order, and for the lines to - ;; appear in any order. The reason this is necessary is that Gnu diff3 + ;; appear in any order. The reason this is necessary is that GNU diff3 ;; can produce the groups in the order 1, 2, 3 or 1, 3, 2. (save-excursion (re-search-forward commit 42e7e267e5487f60f4d72e1b5c5cba001ba4d704 Author: Paul Eggert Date: Fri Mar 23 12:57:39 2018 -0700 Avoid Fortran-style floating-point optimization When optimizing arithmetic operations, avoid optimizations that are valid for mathematical numbers but invalid for floating-point. For example, do not optimize (+ 1 v 0.5) to (+ v 1.5), as they may not be the same due to rounding errors. In general, floating-point numbers cannot be constant-folded, since that would make .elc files platform-dependent. * lisp/emacs-lisp/byte-opt.el (byte-optimize-associative-math): Do not optimize floats. (byte-optimize-nonassociative-math, byte-optimize-approx-equal) (byte-optimize-delay-constants-math, byte-compile-butlast) (byte-optimize-logmumble): Remove; no longer used. (byte-optimize-minus): Do not optimize (- 0 x) to (- x). (byte-optimize-multiply): Do not optimize (* -1 x) to (- x). (byte-optimize-divide): Do not optimize (/ x -1) to (- x). (logand, logior, logxor): Optimize with byte-optimize-predicate instead of with byte-optimize-logmumble. * test/lisp/emacs-lisp/bytecomp-tests.el: (byte-opt-testsuite-arith-data): Add a couple of test cases. diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el index 55343e1e3a..a5e0e21964 100644 --- a/lisp/emacs-lisp/byte-opt.el +++ b/lisp/emacs-lisp/byte-opt.el @@ -656,15 +656,15 @@ ((not (symbolp form)) nil) ((null form)))) -;; If the function is being called with constant numeric args, +;; If the function is being called with constant integer args, ;; evaluate as much as possible at compile-time. This optimizer -;; assumes that the function is associative, like + or *. +;; assumes that the function is associative, like min or max. (defun byte-optimize-associative-math (form) (let ((args nil) (constants nil) (rest (cdr form))) (while rest - (if (numberp (car rest)) + (if (integerp (car rest)) (setq constants (cons (car rest) constants)) (setq args (cons (car rest) args))) (setq rest (cdr rest))) @@ -678,82 +678,7 @@ (apply (car form) constants)) form))) -;; If the function is being called with constant numeric args, -;; evaluate as much as possible at compile-time. This optimizer -;; assumes that the function satisfies -;; (op x1 x2 ... xn) == (op ...(op (op x1 x2) x3) ...xn) -;; like - and /. -(defun byte-optimize-nonassociative-math (form) - (if (or (not (numberp (car (cdr form)))) - (not (numberp (car (cdr (cdr form)))))) - form - (let ((constant (car (cdr form))) - (rest (cdr (cdr form)))) - (while (numberp (car rest)) - (setq constant (funcall (car form) constant (car rest)) - rest (cdr rest))) - (if rest - (cons (car form) (cons constant rest)) - constant)))) - -;;(defun byte-optimize-associative-two-args-math (form) -;; (setq form (byte-optimize-associative-math form)) -;; (if (consp form) -;; (byte-optimize-two-args-left form) -;; form)) - -;;(defun byte-optimize-nonassociative-two-args-math (form) -;; (setq form (byte-optimize-nonassociative-math form)) -;; (if (consp form) -;; (byte-optimize-two-args-right form) -;; form)) - -(defun byte-optimize-approx-equal (x y) - (<= (* (abs (- x y)) 100) (abs (+ x y)))) - -;; Collect all the constants from FORM, after the STARTth arg, -;; and apply FUN to them to make one argument at the end. -;; For functions that can handle floats, that optimization -;; can be incorrect because reordering can cause an overflow -;; that would otherwise be avoided by encountering an arg that is a float. -;; We avoid this problem by (1) not moving float constants and -;; (2) not moving anything if it would cause an overflow. -(defun byte-optimize-delay-constants-math (form start fun) - ;; Merge all FORM's constants from number START, call FUN on them - ;; and put the result at the end. - (let ((rest (nthcdr (1- start) form)) - (orig form) - ;; t means we must check for overflow. - (overflow (memq fun '(+ *)))) - (while (cdr (setq rest (cdr rest))) - (if (integerp (car rest)) - (let (constants) - (setq form (copy-sequence form) - rest (nthcdr (1- start) form)) - (while (setq rest (cdr rest)) - (cond ((integerp (car rest)) - (setq constants (cons (car rest) constants)) - (setcar rest nil)))) - ;; If necessary, check now for overflow - ;; that might be caused by reordering. - (if (and overflow - ;; We have overflow if the result of doing the arithmetic - ;; on floats is not even close to the result - ;; of doing it on integers. - (not (byte-optimize-approx-equal - (apply fun (mapcar 'float constants)) - (float (apply fun constants))))) - (setq form orig) - (setq form (nconc (delq nil form) - (list (apply fun (nreverse constants))))))))) - form)) - -(defsubst byte-compile-butlast (form) - (nreverse (cdr (reverse form)))) - (defun byte-optimize-plus (form) - ;; Don't call `byte-optimize-delay-constants-math' (bug#1334). - ;;(setq form (byte-optimize-delay-constants-math form 1 '+)) (if (memq 0 form) (setq form (delq 0 (copy-sequence form)))) ;; For (+ constants...), byte-optimize-predicate does the work. (when (memq nil (mapcar 'numberp (cdr form))) @@ -767,26 +692,19 @@ (setq integer (nth 1 form) other (nth 2 form)) (setq integer (nth 2 form) other (nth 1 form))) (setq form - (list (if (eq integer 1) '1+ '1-) other)))) - ;; Here, we could also do - ;; (+ x y ... 1) --> (1+ (+ x y ...)) - ;; (+ x y ... -1) --> (1- (+ x y ...)) - ;; The resulting bytecode is smaller, but is it faster? -- cyd - )) + (list (if (eq integer 1) '1+ '1-) other)))))) (byte-optimize-predicate form)) (defun byte-optimize-minus (form) - ;; Don't call `byte-optimize-delay-constants-math' (bug#1334). - ;;(setq form (byte-optimize-delay-constants-math form 2 '+)) ;; Remove zeros. (when (and (nthcdr 3 form) (memq 0 (cddr form))) (setq form (nconc (list (car form) (cadr form)) (delq 0 (copy-sequence (cddr form))))) - ;; After the above, we must turn (- x) back into (- x 0) + ;; After the above, we must turn (- x) back into (- x 0). (or (cddr form) (setq form (nconc form (list 0))))) - ;; For (- constants..), byte-optimize-predicate does the work. + ;; For (- constants...), byte-optimize-predicate does the work. (when (memq nil (mapcar 'numberp (cdr form))) (cond ;; (- x 1) --> (1- x) @@ -794,71 +712,25 @@ (setq form (list '1- (nth 1 form)))) ;; (- x -1) --> (1+ x) ((equal (nthcdr 2 form) '(-1)) - (setq form (list '1+ (nth 1 form)))) - ;; (- 0 x) --> (- x) - ((and (eq (nth 1 form) 0) - (= (length form) 3)) - (setq form (list '- (nth 2 form)))) - ;; Here, we could also do - ;; (- x y ... 1) --> (1- (- x y ...)) - ;; (- x y ... -1) --> (1+ (- x y ...)) - ;; The resulting bytecode is smaller, but is it faster? -- cyd - )) + (setq form (list '1+ (nth 1 form)))))) (byte-optimize-predicate form)) (defun byte-optimize-multiply (form) - (setq form (byte-optimize-delay-constants-math form 1 '*)) - ;; For (* constants..), byte-optimize-predicate does the work. - (when (memq nil (mapcar 'numberp (cdr form))) - ;; After `byte-optimize-predicate', if there is a INTEGER constant - ;; in FORM, it is in the last element. - (let ((last (car (reverse (cdr form))))) - (cond - ;; Would handling (* ... 0) here cause floating point errors? - ;; See bug#1334. - ((eq 1 last) (setq form (byte-compile-butlast form))) - ((eq -1 last) - (setq form (list '- (if (nthcdr 3 form) - (byte-compile-butlast form) - (nth 1 form)))))))) + (if (memq 1 form) (setq form (delq 1 (copy-sequence form)))) + ;; For (* integers..), byte-optimize-predicate does the work. (byte-optimize-predicate form)) (defun byte-optimize-divide (form) - (setq form (byte-optimize-delay-constants-math form 2 '*)) - ;; After `byte-optimize-predicate', if there is a INTEGER constant - ;; in FORM, it is in the last element. - (let ((last (car (reverse (cdr (cdr form)))))) - (cond - ;; Runtime error (leave it intact). - ((or (null last) - (eq last 0) - (memql 0.0 (cddr form)))) - ;; No constants in expression - ((not (numberp last))) - ;; For (* constants..), byte-optimize-predicate does the work. - ((null (memq nil (mapcar 'numberp (cdr form))))) - ;; (/ x y.. 1) --> (/ x y..) - ((and (eq last 1) (nthcdr 3 form)) - (setq form (byte-compile-butlast form))) - ;; (/ x -1), (/ x .. -1) --> (- x), (- (/ x ..)) - ((eq last -1) - (setq form (list '- (if (nthcdr 3 form) - (byte-compile-butlast form) - (nth 1 form))))))) + ;; Remove 1s. + (when (and (nthcdr 3 form) + (memq 1 (cddr form))) + (setq form (nconc (list (car form) (cadr form)) + (delq 1 (copy-sequence (cddr form))))) + ;; After the above, we must turn (/ x) back into (/ x 1). + (or (cddr form) + (setq form (nconc form (list 1))))) (byte-optimize-predicate form)) -(defun byte-optimize-logmumble (form) - (setq form (byte-optimize-delay-constants-math form 1 (car form))) - (byte-optimize-predicate - (cond ((memq 0 form) - (setq form (if (eq (car form) 'logand) - (cons 'progn (cdr form)) - (delq 0 (copy-sequence form))))) - ((and (eq (car-safe form) 'logior) - (memq -1 form)) - (cons 'progn (cdr form))) - (form)))) - (defun byte-optimize-binary-predicate (form) (cond @@ -923,9 +795,9 @@ (put 'string< 'byte-optimizer 'byte-optimize-predicate) (put 'string-lessp 'byte-optimizer 'byte-optimize-predicate) -(put 'logand 'byte-optimizer 'byte-optimize-logmumble) -(put 'logior 'byte-optimizer 'byte-optimize-logmumble) -(put 'logxor 'byte-optimizer 'byte-optimize-logmumble) +(put 'logand 'byte-optimizer 'byte-optimize-predicate) +(put 'logior 'byte-optimizer 'byte-optimize-predicate) +(put 'logxor 'byte-optimizer 'byte-optimize-predicate) (put 'lognot 'byte-optimizer 'byte-optimize-predicate) (put 'car 'byte-optimizer 'byte-optimize-predicate) diff --git a/test/lisp/emacs-lisp/bytecomp-tests.el b/test/lisp/emacs-lisp/bytecomp-tests.el index 6ae7cdb9f9..7330c67614 100644 --- a/test/lisp/emacs-lisp/bytecomp-tests.el +++ b/test/lisp/emacs-lisp/bytecomp-tests.el @@ -38,8 +38,7 @@ (let ((a 3) (b 2) (c 1.0)) (/ a b c)) (let ((a (+ 1 (expt 2 -64))) (b (expt 2 -65))) (+ a -1 b)) (let ((a (+ 1 (expt 2 -64))) (b (expt 2 -65))) (- a 1 (- b))) - ;; This fails. Should it be a bug? - ;; (let ((a (expt 2 -1074)) (b 0.125)) (* a 8 b)) + (let ((a (expt 2 -1074)) (b 0.125)) (* a 8 b)) (let ((a 1.0)) (* a 0)) (let ((a 1.0)) (* a 2.0 0)) (let ((a 1.0)) (/ 0 a)) @@ -244,6 +243,9 @@ (let ((a 3) (b 2) (c 1.0)) (/ a b c 0)) (let ((a 3) (b 2) (c 1.0)) (/ a b c 1)) (let ((a 3) (b 2) (c 1.0)) (/ a b c -1)) + + (let ((a t)) (logand 0 a)) + ;; Test switch bytecode (let ((a 3)) (cond ((eq a 1) 'one) ((eq a 2) 'two) ((eq a 3) 'three) (t t))) (let ((a 'three)) (cond ((eq a 'one) 1) ((eq a 2) 'two) ((eq a 'three) 3) commit d0881374734310eb77526823c0acad1fe556f41b Author: Michael Albinus Date: Fri Mar 23 17:39:29 2018 +0100 Instrument tramp-test39-utf8 * test/lisp/net/tramp-tests.el (tramp--test-expensive-test): Add the test name to the template. (tramp-test39-utf8): Instrument test. diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index 70c9002ab3..8e21f5220f 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el @@ -133,7 +133,8 @@ being the result.") "Whether expensive tests are run." (ert-select-tests (ert--stats-selector ert--current-run-stats) - (list (make-ert-test :body nil :tags '(:expensive-test))))) + (list (make-ert-test :name (ert-test-name (ert-running-test)) + :body nil :tags '(:expensive-test))))) (defun tramp--test-make-temp-name (&optional local quoted) "Return a temporary file name for test. @@ -4660,7 +4661,8 @@ Use the `ls' command." (skip-unless (not (tramp--test-windows-nt-and-batch))) (skip-unless (not (tramp--test-windows-nt-and-pscp-psftp-p))) - (tramp--test-utf8)) + (tramp--test-instrument-test-case 10 + (tramp--test-utf8))) (ert-deftest tramp-test39-utf8-with-stat () "Check UTF8 encoding in file names and file contents. commit 1bc4def8ca6d9bf9096af8ea3185c428f36b2c5a Author: Eli Zaretskii Date: Fri Mar 23 19:08:32 2018 +0300 More proofreading of the Emacs manual * doc/emacs/trouble.texi (DEL Does Not Delete): Improve wording. (Screen Garbled): Mention the command name. (Bug Criteria): Mention that problems in packages should first be reported to the respective maintainers. (Checklist): Fix wording. (Contributing, Copyright Assignment): Minor copyedits. * doc/emacs/misc.texi (Amusements): Remove Landmark. * doc/emacs/picture-xtra.texi (Tabs in Picture): Improve wording. (Rectangles in Picture): Add a cross-reference to "Registers". * doc/emacs/misc.texi (Gnus Group Buffer, Gnus Summary Buffer): Mention command names in parentheses. (Gnus Summary Buffer): Document "M-r". (Network Security): Document that current NSM works with TLS encryption. Fix markup. (Document View): Improve wording and fix a typo. (DocView Conversion): Rephrase description of doc-view-cache-directory. (Single Shell): Mention variables that control when shell output appears in the echo area. (Shell Mode): Improve wording. (Shell Prompts): Fix a typo. (Shell Ring, Term Mode): Mention command names. (History References): Add a cross-reference to "Rebinding". (Remote Host): Mention SSH. (TCP Emacs server): Improve wording. (emacsclient Options): Minor improvements. (PostScript): Fix wording. (PostScript Variables): Mention that ps-font-size could be a cons. (Sorting): Minor improvements. Suggested by Michael Albinus in emacs-manual-bugs@gnu.org diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi index 60986347a7..fed2e48924 100644 --- a/doc/emacs/misc.texi +++ b/doc/emacs/misc.texi @@ -132,7 +132,8 @@ sessions. @kindex SPC @r{(Gnus Group mode)} @findex gnus-group-read-group @item @key{SPC} -Switch to the summary buffer for the group on the current line. +Switch to the summary buffer for the group on the current line +(@code{gnus-group-read-group}). @kindex l @r{(Gnus Group mode)} @kindex A s @r{(Gnus Group mode)} @@ -140,7 +141,8 @@ Switch to the summary buffer for the group on the current line. @item l @itemx A s In the group buffer, list only the groups to which you subscribe and -which contain unread articles (this is the default listing). +which contain unread articles (@code{gnus-group-list-groups}; this is +the default listing). @kindex L @r{(Gnus Group mode)} @kindex A u @r{(Gnus Group mode)} @@ -148,24 +150,25 @@ which contain unread articles (this is the default listing). @item L @itemx A u List all subscribed and unsubscribed groups, but not killed or zombie -groups. +groups (@code{gnus-group-list-all-groups}). @kindex A k @r{(Gnus Group mode)} @findex gnus-group-list-killed @item A k -List killed groups. +List killed groups (@code{gnus-group-list-killed}). @kindex A z @r{(Gnus Group mode)} @findex gnus-group-list-zombies @item A z -List zombie groups. +List zombie groups (@code{gnus-group-list-zombies}). @kindex u @r{(Gnus Group mode)} @findex gnus-group-unsubscribe-current-group @cindex subscribe groups @cindex unsubscribe groups @item u -Toggle the subscription status of the group on the current line +Toggle the subscription status of the group +(@code{gnus-group-unsubscribe-current-group}) on the current line (i.e., turn a subscribed group into an unsubscribed group, or vice versa). Invoking this on a killed or zombie group turns it into an unsubscribed group. @@ -173,28 +176,31 @@ unsubscribed group. @kindex C-k @r{(Gnus Group mode)} @findex gnus-group-kill-group @item C-k -Kill the group on the current line. Killed groups are not recorded in -the @file{.newsrc} file, and they are not shown in the @kbd{l} or -@kbd{L} listings. +Kill the group on the current line (@code{gnus-group-kill-group}). +Killed groups are not recorded in the @file{.newsrc} file, and they +are not shown in the @kbd{l} or @kbd{L} listings. @kindex DEL @r{(Gnus Group mode)} @item @key{DEL} -Move point to the previous group containing unread articles. +Move point to the previous group containing unread articles +(@code{gnus-group-prev-unread-group}.) @kindex n @r{(Gnus Group mode)} @findex gnus-group-next-unread-group @item n -Move point to the next unread group. +Move point to the next unread group +(@code{gnus-group-next-unread-group}). @kindex p @r{(Gnus Group mode)} @findex gnus-group-prev-unread-group @item p -Move point to the previous unread group. +Move point to the previous unread group +(@code{gnus-group-prev-unread-group}). @kindex q @r{(Gnus Group mode)} @findex gnus-group-exit @item q -Update your Gnus settings, and quit Gnus. +Update your Gnus settings, and quit Gnus (@code{gnus-group-exit}). @end table @node Gnus Summary Buffer @@ -209,7 +215,7 @@ Update your Gnus settings, and quit Gnus. If there is no article selected, select the article on the current line and display its article buffer. Otherwise, try scrolling the selected article buffer in its window; on reaching the end of the -buffer, select the next unread article. +buffer, select the next unread article (@code{gnus-summary-next-page}). Thus, you can read through all articles by repeatedly typing @key{SPC}. @@ -217,33 +223,44 @@ Thus, you can read through all articles by repeatedly typing @kindex DEL @r{(Gnus Summary mode)} @findex gnus-summary-prev-page @item @key{DEL} -Scroll the text of the article backwards. +Scroll the text of the article backwards +(@code{gnus-summary-prev-page}). @kindex n @r{(Gnus Summary mode)} @findex gnus-summary-next-unread-article @item n -Select the next unread article. +Select the next unread article +(@code{gnus-summary-next-unread-article}). @kindex p @r{(Gnus Summary mode)} @findex gnus-summary-prev-unread-article @item p -Select the previous unread article. +Select the previous unread article +(@code{gnus-summary-prev-unread-article}). @kindex s @r{(Gnus Summary mode)} @findex gnus-summary-isearch-article @item s -Do an incremental search on the selected article buffer, as if you -switched to the buffer and typed @kbd{C-s} (@pxref{Incremental -Search}). +Do an incremental search on the selected article buffer +(@code{gnus-summary-isearch-article}), as if you switched to the +buffer and typed @kbd{C-s} (@pxref{Incremental Search}). @kindex M-s @r{(Gnus Summary mode)} @findex gnus-summary-search-article-forward @item M-s @var{regexp} @key{RET} -Search forward for articles containing a match for @var{regexp}. +Search forward for articles containing a match for @var{regexp} +(@code{gnus-summary-search-article-forward}). + +@kindex M-r @r{(Gnus Summary mode)} +@findex gnus-summary-search-article-backward +@item M-r @var{regexp} @key{RET} +Search back for articles containing a match for @var{regexp} +(@code{gnus-summary-search-article-backward}). @kindex q @r{(Gnus Summary mode)} @item q -Exit the summary buffer and return to the group buffer. +Exit the summary buffer and return to the group buffer +(@code{gnus-summary-exit}). @end table @node Host Security @@ -273,12 +290,14 @@ Emacs as part of a larger application. @cindex encryption @cindex SSL @cindex TLS +@cindex Transport Layer Security @cindex STARTTLS Whenever Emacs establishes any network connection, it passes the established connection to the @dfn{Network Security Manager} (@acronym{NSM}). @acronym{NSM} is responsible for enforcing the -network security under your control. +network security under your control. Currently, this works by using +the Transport Layer Security (@acronym{TLS}) features. @vindex network-security-level The @code{network-security-level} variable determines the security @@ -381,7 +400,8 @@ By default, host names will not be saved for non-@code{STARTTLS} connections. Instead a host/port hash is used to identify connections. This means that one can't casually read the settings file to see what servers the user has connected to. If this variable is @code{t}, -@acronym{NSM} will also save host names in the nsm-settings-file. +@acronym{NSM} will also save host names in the +@code{nsm-settings-file}. @end table @@ -411,7 +431,7 @@ is needed. For OpenDocument and Microsoft Office documents, the @findex doc-view-toggle-display @findex doc-view-minor-mode When you visit a document file that can be displayed with DocView -mode, Emacs automatically uses DocView mode @footnote{The needed +mode, Emacs automatically uses that mode @footnote{The needed external tools for the document type must be available, and Emacs must be running in a graphical frame and have PNG image support. If these requirements is not fulfilled, Emacs falls back to another major @@ -426,7 +446,7 @@ underlying file contents. @findex doc-view-open-text When you visit a file which would normally be handled by DocView mode but some requirement is not met (e.g., you operate in a terminal -frame or emacs has no PNG support), you are queried if you want to +frame or Emacs has no PNG support), you are queried if you want to view the document's contents as plain text. If you confirm, the buffer is put in text mode and DocView minor mode is activated. Thus, by typing @kbd{C-c C-c} you switch to the fallback mode. With another @@ -574,7 +594,7 @@ including its entire margins. @vindex doc-view-cache-directory @findex doc-view-clear-cache For efficiency, DocView caches the images produced by @command{gs}. -The name of this directory is given by the variable +The name of the directory where it caches images is given by the variable @code{doc-view-cache-directory}. You can clear the cache directory by typing @kbd{M-x doc-view-clear-cache}. @@ -660,7 +680,9 @@ for that command. Standard input for the command comes from the null device. If the shell command produces any output, the output appears either in the echo area (if it is short), or in an Emacs buffer named @file{*Shell Command Output*}, displayed in another window (if the -output is long). +output is long). The variables @code{resize-mini-windows} and +@code{max-mini-window-height} (@pxref{Minibuffer Edit}) control when +the output is considered too long for the echo area. For instance, one way to decompress a file named @file{foo.gz} is to type @kbd{M-! gunzip foo.gz @key{RET}}. That shell command normally @@ -872,11 +894,12 @@ line---but after @kbd{C-c @key{SPC}} the process mark may be in a previous line.) @item C-c @key{SPC} -Accumulate multiple lines of input, then send them together. This -command inserts a newline before point, but does not send the preceding -text as input to the subshell---at least, not yet. Both lines, the one -before this newline and the one after, will be sent together (along with -the newline that separates them), when you type @key{RET}. +Accumulate multiple lines of input, then send them together +(@code{comint-accumulate}). This command inserts a newline before +point, but does not send the preceding text as input to the +subshell---at least, not yet. Both lines, the one before this newline +and the one after, will be sent together (along with the newline that +separates them), when you type @key{RET}. @item C-c C-u @kindex C-c C-u @r{(Shell mode)} @@ -936,7 +959,7 @@ of the window; also move the cursor there (@code{comint-show-output}). @item C-c C-e @kindex C-c C-e @r{(Shell mode)} @findex comint-show-maximum-output -Scroll to put the end of the buffer at the bottom of the window +Scroll to put the last line of the buffer at the bottom of the window (@code{comint-show-maximum-output}). @item C-c C-f @@ -1027,9 +1050,9 @@ specializations of Shell mode. @cindex prompt, shell A prompt is text output by a program to show that it is ready to accept new user input. Normally, Comint mode (and thus Shell mode) -automatically figures out part of the buffer is a prompt, based on the -output of the subprocess. (Specifically, it assumes that any received -output line which doesn't end with a newline is a prompt.) +automatically figures out which part of the buffer is a prompt, based +on the output of the subprocess. (Specifically, it assumes that any +received output line which doesn't end with a newline is a prompt.) Comint mode divides the buffer into two types of @dfn{fields}: input fields (where user input is typed) and output fields (everywhere @@ -1082,28 +1105,32 @@ resubmit them or copy them to the end. Or you can use a @kindex M-p @r{(Shell mode)} @item M-p @itemx C-@key{UP} -Fetch the next earlier old shell command. +Fetch the next earlier old shell command +(@code{comint-previous-input}). @kindex M-n @r{(Shell mode)} @findex comint-next-input @item M-n @itemx C-@key{DOWN} -Fetch the next later old shell command. +Fetch the next later old shell command (@code{comint-next-input}). @kindex M-r @r{(Shell mode)} @findex comint-history-isearch-backward-regexp @item M-r -Begin an incremental regexp search of old shell commands. +Begin an incremental regexp search of old shell commands +(@code{comint-history-isearch-backward-regexp}). @item C-c C-x @kindex C-c C-x @r{(Shell mode)} @findex comint-get-next-from-history -Fetch the next subsequent command from the history. +Fetch the next subsequent command from the history +(@code{comint-get-next-from-history}). @item C-c . @kindex C-c . @r{(Shell mode)} @findex comint-input-previous-argument -Fetch one argument from an old shell command. +Fetch one argument from an old shell command +(@code{comint-input-previous-argument}). @item C-c C-l @kindex C-c C-l @r{(Shell mode)} @@ -1231,7 +1258,7 @@ typing @key{RET}. when you send them to the shell. To request this, set the variable @code{comint-input-autoexpand} to @code{input}. You can make @key{SPC} perform history expansion by binding @key{SPC} to the -command @code{comint-magic-space}. +command @code{comint-magic-space}. @xref{Rebinding}. Shell mode recognizes history references when they follow a prompt. @xref{Shell Prompts}, for how Shell mode recognizes prompts. @@ -1419,9 +1446,6 @@ examining your input. But some shells can tell Term what the current directory is. This is done automatically by @code{bash} version 1.15 and later. - - - @node Term Mode @subsection Term Mode @cindex Term mode @@ -1448,7 +1472,8 @@ char mode. @table @kbd @item C-c C-c -Send a literal @kbd{C-c} to the sub-shell. +Send a literal @kbd{C-c} to the sub-shell +(@code{term-interrupt-subjob}). @item C-c @var{char} This is equivalent to @kbd{C-x @var{char}} in normal Emacs. For @@ -1464,13 +1489,13 @@ output pause at the end of each screenful: @kindex C-c C-q @r{(Term mode)} @findex term-pager-toggle @item C-c C-q -Toggle the page-at-a-time feature. This command works in both line -and char modes. When the feature is enabled, the mode-line displays -the word @samp{page}, and each time Term receives more than a -screenful of output, it pauses and displays @samp{**MORE**} in the -mode-line. Type @key{SPC} to display the next screenful of output, or -@kbd{?} to see your other options. The interface is similar to the -@code{more} program. +Toggle the page-at-a-time feature (@code{term-pager-toggle}). This +command works in both line and char modes. When the feature is +enabled, the mode-line displays the word @samp{page}, and each time +Term receives more than a screenful of output, it pauses and displays +@samp{**MORE**} in the mode-line. Type @key{SPC} to display the next +screenful of output, or @kbd{?} to see your other options. The +interface is similar to the @code{more} program. @end table @node Remote Host @@ -1481,8 +1506,8 @@ mode-line. Type @key{SPC} to display the next screenful of output, or @cindex Rlogin You can login to a remote computer, using whatever commands you -would from a regular terminal (e.g., using the @code{telnet} or -@code{rlogin} commands), from a Term window. +would from a regular terminal (e.g., using the @code{ssh} or +@code{telnet} or @code{rlogin} commands), from a Term window. A program that asks you for a password will normally suppress echoing of the password, so the password will not show up in the @@ -1621,7 +1646,7 @@ name, using the @samp{-s} option (@pxref{emacsclient Options}). you can give each daemon its own server name like this: @example - emacs --eval "(setq server-name \"foo\")" --daemon + emacs --daemon=foo @end example @findex server-eval-at @@ -1656,7 +1681,7 @@ not support local sockets. @vindex server-host @vindex server-port - If the Emacs server is set to use TCP, it will by default listen to + If the Emacs server is set to use TCP, it will by default listen on a random port on the localhost interface. This can be changed to another interface and/or a fixed port using the variables @code{server-host} and @code{server-port}. @@ -1848,7 +1873,7 @@ evaluate, @emph{not} as a list of files to visit. Specify a server file (@pxref{TCP Emacs server}) for connecting to an Emacs server via TCP. Alternatively, you can set the @env{EMACS_SERVER_FILE} environment variable to point to the server -file. +file. (The command-line option overrides the environment variable.) An Emacs server usually uses a local socket to listen for connections, but also supports connections over TCP. To connect to a TCP Emacs @@ -1904,14 +1929,15 @@ terminal. @item -T @var{tramp-prefix} @itemx --tramp-prefix=@var{tramp-prefix} Set the prefix to add to filenames for Emacs to locate files on remote -machines using TRAMP (@pxref{Top, The Tramp Manual,, tramp, The Tramp -Manual}). This is mostly useful in combination with using the Emacs -server over TCP (@pxref{TCP Emacs server}). By ssh-forwarding the -listening port and making the @var{server-file} available on a remote -machine, programs on the remote machine can use @command{emacsclient} -as the value for the @env{EDITOR} and similar environment variables, -but instead of talking to an Emacs server on the remote machine, the -files will be visited in the local Emacs session using TRAMP. +machines (@pxref{Remote Files}) using TRAMP (@pxref{Top, The Tramp +Manual,, tramp, The Tramp Manual}). This is mostly useful in +combination with using the Emacs server over TCP (@pxref{TCP Emacs +server}). By ssh-forwarding the listening port and making the +@var{server-file} available on a remote machine, programs on the +remote machine can use @command{emacsclient} as the value for the +@env{EDITOR} and similar environment variables, but instead of talking +to an Emacs server on the remote machine, the files will be visited in +the local Emacs session using TRAMP. @vindex EMACSCLIENT_TRAMP@r{, environment variable} Setting the environment variable @env{EMACSCLIENT_TRAMP} has the same @@ -2068,8 +2094,8 @@ buffer; the other, just the region. The commands @code{ps-print-region-with-faces} behave similarly, but use PostScript features to show the faces (fonts and colors) of the buffer text. - Interactively, when you use a prefix argument (@kbd{C-u}), the command -prompts the user for a file name, and saves the PostScript image in that file + Interactively, when you use a prefix argument (@kbd{C-u}), these commands +prompt the user for a file name, and save the PostScript image in that file instead of sending it to the printer. @findex ps-spool-region @@ -2161,7 +2187,9 @@ default is 1. for printing ordinary text. Legitimate values include @code{Courier}, @code{Helvetica}, @code{NewCenturySchlbk}, @code{Palatino} and @code{Times}. The variable @code{ps-font-size} specifies the size of -the font for ordinary text. It defaults to 8.5 points. +the font for ordinary text and defaults to 8.5 points. The value of +@code{ps-font-size} can also be a cons of 2 floats: one for landscape +mode, the other for portrait mode. @vindex ps-multibyte-buffer @cindex Intlfonts for PostScript printing @@ -2229,7 +2257,8 @@ into the order determined by the sort keys. The records are ordered so that their keys are in alphabetical order, or, for numeric sorting, in numeric order. In alphabetic sorting, all upper-case letters @samp{A} through @samp{Z} come before lower-case @samp{a}, in accordance with the -@acronym{ASCII} character sequence. +@acronym{ASCII} character sequence (but @code{sort-fold-case}, +described below, can change that). The various sort commands differ in how they divide the text into sort records and in which part of each record is used as the sort key. Most of @@ -2267,10 +2296,11 @@ in a line constitutes field 1, the second such run constitutes field 2, etc. Specify which field to sort by with a numeric argument: 1 to sort by -field 1, etc. A negative argument means count fields from the right -instead of from the left; thus, minus 1 means sort by the last field. -If several lines have identical contents in the field being sorted, they -keep the same relative order that they had in the original buffer. +field 1, etc.; the default is 1. A negative argument means count +fields from the right instead of from the left; thus, minus 1 means +sort by the last field. If several lines have identical contents in +the field being sorted, they keep the same relative order that they +had in the original buffer. @item M-x sort-numeric-fields Like @kbd{M-x sort-fields} except the specified field is converted @@ -2943,13 +2973,6 @@ bored, try an argument of 9. Sit back and watch. @cindex Life @kbd{M-x life} runs Conway's Game of Life cellular automaton. -@findex landmark -@cindex landmark game - @kbd{M-x landmark} runs a relatively non-participatory game in which -a robot attempts to maneuver towards a tree at the center of the -window based on unique olfactory cues from each of the four -directions. - @findex morse-region @findex unmorse-region @findex nato-region diff --git a/doc/emacs/picture-xtra.texi b/doc/emacs/picture-xtra.texi index 39c353b0ff..8a9dbcfd11 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 prefix 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 @@ -250,7 +250,7 @@ Clear out the region-rectangle with spaces text. @item C-c C-w @var{r} Similar, but save rectangle contents in register @var{r} first -(@code{picture-clear-rectangle-to-register}). +(@code{picture-clear-rectangle-to-register}). @xref{Registers}. @item C-c C-y Copy last killed rectangle into the buffer by overwriting, with upper left corner at point (@code{picture-yank-rectangle}). With argument, diff --git a/doc/emacs/trouble.texi b/doc/emacs/trouble.texi index fc9a64d375..26deeb78fa 100644 --- a/doc/emacs/trouble.texi +++ b/doc/emacs/trouble.texi @@ -185,8 +185,8 @@ command @kbd{M-x normal-erase-is-backspace-mode}. This toggles between the two modes that Emacs supports for handling @key{DEL}, so if Emacs starts in the wrong mode, this should switch to the right mode. On a text terminal, if you want to ask for help when @key{BS} -is treated as @key{DEL}, use @key{F1}; @kbd{C-?} may also work, if it -sends character code 127. +is treated as @key{DEL}, use @key{F1} instead of @kbd{C-h}; @kbd{C-?} +may also work, if it sends character code 127. To fix the problem in every Emacs session, put one of the following lines into your initialization file (@pxref{Init File}). For the @@ -233,10 +233,10 @@ top-level}. @xref{Recursive Edit}. @cindex screen display, wrong If the text on a text terminal looks wrong, the first thing to do is -see whether it is wrong in the buffer. Type @kbd{C-l} to redisplay -the entire screen. If the screen appears correct after this, the -problem was entirely in the previous screen update. (Otherwise, see -the following section.) +see whether it is wrong in the buffer. Type @kbd{C-l} +(@code{recenter-top-bottom}) to redisplay the entire screen. If the +screen appears correct after this, the problem was entirely in the +previous screen update. (Otherwise, see the following section.) Display updating problems often result from an incorrect terminfo entry for the terminal you are using. The file @file{etc/TERMS} in @@ -251,16 +251,17 @@ bug in Emacs that appears for certain terminal types. @cindex garbled text @cindex buffer text garbled - If @kbd{C-l} shows that the text is wrong, first type @kbd{C-h l} to -see what commands you typed to produce the observed results. Then try -undoing the changes step by step using @kbd{C-x u}, until it gets back -to a state you consider correct. + If @kbd{C-l} shows that the text is wrong, first type @kbd{C-h l} +(@code{view-lossage}) to see what commands you typed to produce the +observed results. Then try undoing the changes step by step using +@kbd{C-x u} (@code{undo}), until it gets back to a state you consider +correct. If a large portion of text appears to be missing at the beginning or end of the buffer, check for the word @samp{Narrow} in the mode line. If it appears, the text you don't see is probably still present, but temporarily off-limits. To make it accessible again, type @kbd{C-x n -w}. @xref{Narrowing}. +w} (@code{widen}). @xref{Narrowing}. @node Memory Full @subsection Running out of Memory @@ -268,12 +269,13 @@ w}. @xref{Narrowing}. @cindex out of memory If you get the error message @samp{Virtual memory exceeded}, save -your modified buffers with @kbd{C-x s}. This method of saving them -has the smallest need for additional memory. Emacs keeps a reserve of -memory which it makes available when this error happens; that should -be enough to enable @kbd{C-x s} to complete its work. When the -reserve has been used, @samp{!MEM FULL!} appears at the beginning of -the mode line, indicating there is no more reserve. +your modified buffers with @kbd{C-x s} (@code{save-some-buffers}). +This method of saving them has the smallest need for additional +memory. Emacs keeps a reserve of memory which it makes available when +this error happens; that should be enough to enable @kbd{C-x s} to +complete its work. When the reserve has been used, @samp{!MEM FULL!} +appears at the beginning of the mode line, indicating there is no more +reserve. Once you have saved your modified buffers, you can exit this Emacs session and start another, or you can use @kbd{M-x kill-some-buffers} @@ -589,6 +591,9 @@ important to report documentation bugs as program bugs. If the built-in documentation for a function or variable disagrees with the manual, one of them must be wrong; that is a bug. + For problems with packages that are not part of Emacs, it is better +to begin by reporting them to the package developers. + @node Understanding Bug Reporting @subsection Understanding Bug Reporting @cindex bug reporting @@ -706,7 +711,10 @@ tracker. If your data is more than 500,000 bytes, please don't include it directly in the bug report; instead, offer to send it on request, or -make it available by ftp and say where. +make it available online and say where. + +The Gnu Bug Tracker will assign a bug number to your report; please +use it in the following discussions. To enable maintainers to investigate a bug, your report should include all these things: @@ -770,20 +778,21 @@ customizations. @cindex dribble file @cindex logging keystrokes One way to record the input to Emacs precisely is to write a dribble -file. To start the file, use the @kbd{M-x open-dribble-file -@key{RET}} command. From then on, Emacs copies all your input to the -specified dribble file until the Emacs process is killed. Be aware -that sensitive information (such as passwords) may end up recorded in -the dribble file. +file. To start the file, use the @kbd{M-x open-dribble-file} command. +From then on, Emacs copies all your input to the specified dribble +file until the Emacs process is killed. Be aware that sensitive +information (such as passwords) may end up recorded in the dribble +file. @item @findex open-termscript @cindex termscript file @vindex TERM@r{, environment variable, and display bugs} -For possible display bugs, the terminal type (the value of environment -variable @env{TERM}), the complete termcap entry for the terminal from -@file{/etc/termcap} (since that file is not identical on all machines), -and the output that Emacs actually sent to the terminal. +For possible display bugs on text-mode terminals, the terminal type +(the value of environment variable @env{TERM}), the complete termcap +entry for the terminal from @file{/etc/termcap} (since that file is +not identical on all machines), and the output that Emacs actually +sent to the terminal. The way to collect the terminal output is to execute the Lisp expression @@ -926,13 +935,13 @@ However, you need to think when you collect the additional information if you want it to show what causes the bug. @cindex backtrace for bug reports -For example, many people send just a backtrace, but that is not very -useful by itself. A simple backtrace with arguments often conveys -little about what is happening inside GNU Emacs, because most of the -arguments listed in the backtrace are pointers to Lisp objects. The -numeric values of these pointers have no significance whatever; all that -matters is the contents of the objects they point to (and most of the -contents are themselves pointers). +For example, many people send just a C-level backtrace, but that is +not very useful by itself. A simple backtrace with arguments often +conveys little about what is happening inside GNU Emacs, because most +of the arguments listed in the backtrace are pointers to Lisp objects. +The numeric values of these pointers have no significance whatever; +all that matters is the contents of the objects they point to (and +most of the contents are themselves pointers). @findex debug_print To provide useful information, you need to show the values of Lisp @@ -1217,8 +1226,8 @@ answer questions on the Emacs user mailing list @url{https://lists.gnu.org/mailman/listinfo/help-gnu-emacs}. @item -write documentation, either on the wiki, or in the Emacs source -repository (@pxref{Sending Patches}). +write documentation, either on the @uref{https://www.emacswiki.org/, +wiki}, or in the Emacs source repository (@pxref{Sending Patches}). @item check if existing bug reports are fixed in newer versions of Emacs @@ -1283,7 +1292,7 @@ downloaded the repository source, you should read the file from a normal build). If you would like to make more extensive contributions, see the -@file{./CONTRIBUTE} file in the Emacs distribution for information on +@file{CONTRIBUTE} file in the Emacs distribution for information on how to be an Emacs developer. For documentation on Emacs (to understand how to implement your @@ -1385,9 +1394,10 @@ The FSF is a nonprofit with a worldwide mission to promote computer user freedom and to defend the rights of all free software users. For general information, see the website @url{https://www.fsf.org/}. -Generally speaking, for non-trivial contributions to GNU Emacs we -require that the copyright be assigned to the FSF@. For the reasons -behind this, see @url{https://www.gnu.org/licenses/why-assign.html}. +Generally speaking, for non-trivial contributions to GNU Emacs and +packages stored in GNU ELPA, we require that the copyright be assigned +to the FSF@. For the reasons behind this, see +@url{https://www.gnu.org/licenses/why-assign.html}. Copyright assignment is a simple process. Residents of some countries can do it entirely electronically. We can help you get started, and commit 02f4802623db6ab74e0809841007fa1e41207b44 Author: Glenn Morris Date: Thu Mar 22 14:31:33 2018 -0400 sql.el defcustom fixes * lisp/progmodes/sql.el (sql-login-params): Update. Avoids type mismatch with postgres and sqlite login params. (sql-postgres-login-params): Bump version. diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el index 9bb2cf4bdf..f907a01d8c 100644 --- a/lisp/progmodes/sql.el +++ b/lisp/progmodes/sql.el @@ -26,10 +26,10 @@ ;;; Commentary: ;; Please send bug reports and bug fixes to the mailing list at -;; help-gnu-emacs@gnu.org. If you want to subscribe to the mailing -;; list, see the web page at -;; https://lists.gnu.org/mailman/listinfo/help-gnu-emacs for -;; instructions. I monitor this list actively. If you send an e-mail +;; bug-gnu-emacs@gnu.org. +;; See also the general help list at +;; https://lists.gnu.org/mailman/listinfo/help-gnu-emacs +;; I monitor this list actively. If you send an e-mail ;; to Alex Schroeder it usually makes it to me when Alex has a chance ;; to forward them along (Thanks, Alex). @@ -292,6 +292,9 @@ file. Since that is a plaintext file, this could be dangerous." ;; Login parameter type +;; This seems too prescriptive. It probably fails to match some of +;; the possible combinations. It would probably be better to just use +;; plist for most of it. (define-widget 'sql-login-params 'lazy "Widget definition of the login parameters list" :tag "Login Parameters" @@ -331,13 +334,17 @@ file. Since that is a plaintext file, this could be dangerous." (list :tag "file" (const :format "" database) (const :format "" :file) - regexp) + (choice (const nil) regexp) + (const :format "" :must-match) + (symbol :tag ":must-match")) (list :tag "completion" (const :format "" database) + (const :format "" :default) + (string :tag ":default") (const :format "" :completion) + (sexp :tag ":completion") (const :format "" :must-match) - (restricted-sexp - :match-alternatives (listp stringp)))) + (symbol :tag ":must-match"))) (const port))) ;; SQL Product support @@ -1088,7 +1095,7 @@ add your name with a \"-U\" prefix (such as \"-Umark\") to the list." server) "List of login parameters needed to connect to Postgres." :type 'sql-login-params - :version "24.1" + :version "26.1" :group 'SQL) (defun sql-postgres-list-databases () commit 3ddff080341580eb6fc18d907181e9cc2301f62d Author: Stefan Monnier Date: Fri Mar 23 11:29:06 2018 -0400 Fix bug#30846, along with misc cleanups found along the way * test/src/data-tests.el (data-tests-kill-all-local-variables): New test. * src/buffer.c (swap_out_buffer_local_variables): Remove. Fuse the body of its loop into that of reset_buffer_local_variables. (Fkill_buffer, Fkill_all_local_variables): Don't call it any more. (reset_buffer_local_variables): Make sure the buffer's local binding is swapped out before removing it from the alist (bug#30846). Call watchers before actually killing the var. * src/data.c (Fmake_local_variable): Simplify. Use swap_in_global_binding to swap out any local binding, instead of a mix of find_symbol_value followed by messing with where&found. Don't call swap_in_symval_forwarding since the currently swapped binding is never one we've modified. (Fkill_local_variable): Use swap_in_global_binding rather than messing with where&found to try and trick find_symbol_value into doing the same. * src/alloc.c (mark_localized_symbol): 'where' can't be a frame any more. diff --git a/src/alloc.c b/src/alloc.c index 5eaf7cbc1c..369592d70e 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -6342,12 +6342,8 @@ mark_localized_symbol (struct Lisp_Symbol *ptr) { struct Lisp_Buffer_Local_Value *blv = SYMBOL_BLV (ptr); Lisp_Object where = blv->where; - /* If the value is set up for a killed buffer or deleted - frame, restore its global binding. If the value is - forwarded to a C variable, either it's not a Lisp_Object - var, or it's staticpro'd already. */ - if ((BUFFERP (where) && !BUFFER_LIVE_P (XBUFFER (where))) - || (FRAMEP (where) && !FRAME_LIVE_P (XFRAME (where)))) + /* If the value is set up for a killed buffer restore its global binding. */ + if ((BUFFERP (where) && !BUFFER_LIVE_P (XBUFFER (where)))) swap_in_global_binding (ptr); mark_object (blv->where); mark_object (blv->valcell); diff --git a/src/buffer.c b/src/buffer.c index f8c57a74b4..14837372d3 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -108,7 +108,6 @@ int last_per_buffer_idx; static void call_overlay_mod_hooks (Lisp_Object list, Lisp_Object overlay, bool after, Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3); -static void swap_out_buffer_local_variables (struct buffer *b); static void reset_buffer_local_variables (struct buffer *, bool); /* Alist of all buffer names vs the buffers. This used to be @@ -991,10 +990,29 @@ reset_buffer_local_variables (struct buffer *b, bool permanent_too) else { Lisp_Object tmp, last = Qnil; + Lisp_Object buffer; + XSETBUFFER (buffer, b); + for (tmp = BVAR (b, local_var_alist); CONSP (tmp); tmp = XCDR (tmp)) { Lisp_Object local_var = XCAR (XCAR (tmp)); Lisp_Object prop = Fget (local_var, Qpermanent_local); + Lisp_Object sym = local_var; + + /* Watchers are run *before* modifying the var. */ + if (XSYMBOL (local_var)->u.s.trapped_write == SYMBOL_TRAPPED_WRITE) + notify_variable_watchers (local_var, Qnil, + Qmakunbound, Fcurrent_buffer ()); + + eassert (XSYMBOL (sym)->u.s.redirect == SYMBOL_LOCALIZED); + /* Need not do anything if some other buffer's binding is + now cached. */ + if (EQ (SYMBOL_BLV (XSYMBOL (sym))->where, buffer)) + { + /* Symbol is set up for this buffer's old local value: + swap it out! */ + swap_in_global_binding (XSYMBOL (sym)); + } if (!NILP (prop)) { @@ -1034,10 +1052,6 @@ reset_buffer_local_variables (struct buffer *b, bool permanent_too) bset_local_var_alist (b, XCDR (tmp)); else XSETCDR (last, XCDR (tmp)); - - if (XSYMBOL (local_var)->u.s.trapped_write == SYMBOL_TRAPPED_WRITE) - notify_variable_watchers (local_var, Qnil, - Qmakunbound, Fcurrent_buffer ()); } } @@ -1867,7 +1881,6 @@ cleaning up all windows currently displaying the buffer to be killed. */) won't be protected from GC. They would be protected if they happened to remain cached in their symbols. This gets rid of them for certain. */ - swap_out_buffer_local_variables (b); reset_buffer_local_variables (b, 1); bset_name (b, Qnil); @@ -2737,11 +2750,6 @@ the normal hook `change-major-mode-hook'. */) { run_hook (Qchange_major_mode_hook); - /* Make sure none of the bindings in local_var_alist - remain swapped in, in their symbols. */ - - swap_out_buffer_local_variables (current_buffer); - /* Actually eliminate all local bindings of this buffer. */ reset_buffer_local_variables (current_buffer, 0); @@ -2753,31 +2761,6 @@ the normal hook `change-major-mode-hook'. */) return Qnil; } -/* Make sure no local variables remain set up with buffer B - for their current values. */ - -static void -swap_out_buffer_local_variables (struct buffer *b) -{ - Lisp_Object oalist, alist, buffer; - - XSETBUFFER (buffer, b); - oalist = BVAR (b, local_var_alist); - - for (alist = oalist; CONSP (alist); alist = XCDR (alist)) - { - Lisp_Object sym = XCAR (XCAR (alist)); - eassert (XSYMBOL (sym)->u.s.redirect == SYMBOL_LOCALIZED); - /* Need not do anything if some other buffer's binding is - now cached. */ - if (EQ (SYMBOL_BLV (XSYMBOL (sym))->where, buffer)) - { - /* Symbol is set up for this buffer's old local value: - swap it out! */ - swap_in_global_binding (XSYMBOL (sym)); - } - } -} /* Find all the overlays in the current buffer that contain position POS. Return the number found, and store them in a vector in *VEC_PTR. diff --git a/src/data.c b/src/data.c index 06308c62c4..a7fab1ef58 100644 --- a/src/data.c +++ b/src/data.c @@ -1188,7 +1188,7 @@ swap_in_global_binding (struct Lisp_Symbol *symbol) /* Indicate that the global binding is set up now. */ set_blv_where (blv, Qnil); - set_blv_found (blv, 0); + set_blv_found (blv, false); } /* Set up the buffer-local symbol SYMBOL for validity in the current buffer. @@ -1257,7 +1257,6 @@ find_symbol_value (Lisp_Object symbol) swap_in_symval_forwarding (sym, blv); return blv->fwd ? do_symval_forwarding (blv->fwd) : blv_value (blv); } - /* FALLTHROUGH */ case SYMBOL_FORWARDED: return do_symval_forwarding (SYMBOL_FWD (sym)); default: emacs_abort (); @@ -1366,7 +1365,7 @@ set_internal (Lisp_Object symbol, Lisp_Object newval, Lisp_Object where, tem1 = assq_no_quit (symbol, BVAR (XBUFFER (where), local_var_alist)); set_blv_where (blv, where); - blv->found = 1; + blv->found = true; if (NILP (tem1)) { @@ -1381,7 +1380,7 @@ set_internal (Lisp_Object symbol, Lisp_Object newval, Lisp_Object where, if (bindflag || !blv->local_if_set || let_shadows_buffer_binding_p (sym)) { - blv->found = 0; + blv->found = false; tem1 = blv->defcell; } /* If it's a local_if_set, being set not bound, @@ -1796,7 +1795,7 @@ make_blv (struct Lisp_Symbol *sym, bool forwarded, blv->local_if_set = 0; set_blv_defcell (blv, tem); set_blv_valcell (blv, tem); - set_blv_found (blv, 0); + set_blv_found (blv, false); return blv; } @@ -1945,30 +1944,17 @@ Instead, use `add-hook' and specify t for the LOCAL argument. */) CALLN (Fmessage, format, SYMBOL_NAME (variable)); } - /* Swap out any local binding for some other buffer, and make - sure the current value is permanently recorded, if it's the - default value. */ - find_symbol_value (variable); + if (BUFFERP (blv->where) && current_buffer == XBUFFER (blv->where)) + /* Make sure the current value is permanently recorded, if it's the + default value. */ + swap_in_global_binding (sym); bset_local_var_alist (current_buffer, Fcons (Fcons (variable, XCDR (blv->defcell)), BVAR (current_buffer, local_var_alist))); - - /* Make sure symbol does not think it is set up for this buffer; - force it to look once again for this buffer's value. */ - if (current_buffer == XBUFFER (blv->where)) - set_blv_where (blv, Qnil); - set_blv_found (blv, 0); } - /* If the symbol forwards into a C variable, then load the binding - for this buffer now. If C code modifies the variable before we - load the binding in, then that new value will clobber the default - binding the next time we unload it. */ - if (blv->fwd) - swap_in_symval_forwarding (sym, blv); - return variable; } @@ -2030,11 +2016,7 @@ From now on the default value will apply in this buffer. Return VARIABLE. */) { Lisp_Object buf; XSETBUFFER (buf, current_buffer); if (EQ (buf, blv->where)) - { - set_blv_where (blv, Qnil); - blv->found = 0; - find_symbol_value (variable); - } + swap_in_global_binding (sym); } return variable; diff --git a/src/lisp.h b/src/lisp.h index aefdaeaf12..f0c0c5a14a 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -2679,18 +2679,15 @@ struct Lisp_Buffer_Objfwd in the buffer structure itself. They are handled differently, using struct Lisp_Buffer_Objfwd.) - The `realvalue' slot holds the variable's current value, or a - forwarding pointer to where that value is kept. This value is the - one that corresponds to the loaded binding. To read or set the - variable, you must first make sure the right binding is loaded; - then you can access the value in (or through) `realvalue'. - - `where' is the buffer for which the loaded binding was found. If - it has changed, to make sure the right binding is loaded it is + The `valcell' slot holds the variable's current value (unless `fwd' + is set). This value is the one that corresponds to the loaded binding. + To read or set the variable, you must first make sure the right binding + is loaded; then you can access the value in (or through) `valcell'. + + `where' is the buffer for which the loaded binding was found. + If it has changed, to make sure the right binding is loaded it is necessary to find which binding goes with the current buffer, then - load it. To load it, first unload the previous binding, then copy - the value of the new binding into `realvalue' (or through it). - Also update LOADED-BINDING to point to the newly loaded binding. + load it. To load it, first unload the previous binding. `local_if_set' indicates that merely setting the variable creates a local binding for the current buffer. Otherwise the latter, setting diff --git a/test/src/data-tests.el b/test/src/data-tests.el index 33b00d6c9a..3cd537859f 100644 --- a/test/src/data-tests.el +++ b/test/src/data-tests.el @@ -1,4 +1,4 @@ -;;; data-tests.el --- tests for src/data.c +;;; data-tests.el --- tests for src/data.c -*- lexical-binding:t -*- ;; Copyright (C) 2013-2018 Free Software Foundation, Inc. @@ -499,3 +499,20 @@ comparing the subr with a much slower lisp implementation." (remove-variable-watcher 'data-tests-lvar collect-watch-data) (setq data-tests-lvar 6) (should (null watch-data))))) + +(ert-deftest data-tests-kill-all-local-variables () ;bug#30846 + (with-temp-buffer + (setq-local data-tests-foo1 1) + (setq-local data-tests-foo2 2) + (setq-local data-tests-foo3 3) + (let ((oldfoo2 nil)) + (add-variable-watcher 'data-tests-foo2 + (lambda (&rest _) + (setq oldfoo2 (bound-and-true-p data-tests-foo2)))) + (kill-all-local-variables) + (should (equal oldfoo2 '2)) ;Watcher is run before changing the var. + (should (not (or (bound-and-true-p data-tests-foo1) + (bound-and-true-p data-tests-foo2) + (bound-and-true-p data-tests-foo3))))))) + +;;; data-tests.el ends here commit cf3164523b32f01dbaad2c1364ecf2dcf8f22aa5 Author: Stefan Monnier Date: Fri Mar 23 11:09:54 2018 -0400 * src/alloc.c: Avoid O(N²) complexity when unchaining markers (bug#24548). Unchain all dead markers with a single scan of the markers list, instead of calling the O(N) 'unchain_marker' N times. (unchain_dead_markers): New function. (sweep_buffers): Use it. (gc_sweep): Sweep buffers before markers. (sweep_misc): Check that markers have been unchained when reclaiming them. diff --git a/src/alloc.c b/src/alloc.c index da01173fba..5eaf7cbc1c 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -7095,7 +7095,9 @@ sweep_misc (void) if (!mblk->markers[i].m.u_any.gcmarkbit) { if (mblk->markers[i].m.u_any.type == Lisp_Misc_Marker) - unchain_marker (&mblk->markers[i].m.u_marker); + /* Make sure markers have been unchained from their buffer + in sweep_buffer before we collect them. */ + eassert (!mblk->markers[i].m.u_marker.buffer); else if (mblk->markers[i].m.u_any.type == Lisp_Misc_Finalizer) unchain_finalizer (&mblk->markers[i].m.u_finalizer); #ifdef HAVE_MODULES @@ -7142,6 +7144,23 @@ sweep_misc (void) total_free_markers = num_free; } +/* Remove BUFFER's markers that are due to be swept. This is needed since + we treat BUF_MARKERS and markers's `next' field as weak pointers. */ +static void +unchain_dead_markers (struct buffer *buffer) +{ + struct Lisp_Marker *this, **prev = &BUF_MARKERS (buffer); + + while ((this = *prev)) + if (this->gcmarkbit) + prev = &this->next; + else + { + this->buffer = NULL; + *prev = this->next; + } +} + NO_INLINE /* For better stack traces */ static void sweep_buffers (void) @@ -7160,6 +7179,7 @@ sweep_buffers (void) VECTOR_UNMARK (buffer); /* Do not use buffer_(set|get)_intervals here. */ buffer->text->intervals = balance_intervals (buffer->text->intervals); + unchain_dead_markers (buffer); total_buffers++; bprev = &buffer->next; } @@ -7179,8 +7199,8 @@ gc_sweep (void) sweep_floats (); sweep_intervals (); sweep_symbols (); - sweep_misc (); sweep_buffers (); + sweep_misc (); sweep_vectors (); check_string_bytes (!noninteractive); } commit 6695c1be51bd8a1e208ae02505b2a6fa64c85e68 Merge: 8e5ab342aa b8ebf5fb64 Author: Stefan Monnier Date: Fri Mar 23 11:01:31 2018 -0400 Merge from origin/emacs-26 b8ebf5fb64 * src/lisp.h (struct Lisp_Buffer_Local_Value): Update comm... 8c92a37cb4 * doc/emacs/trouble.texi: Fix location of `emacs-version' ... 10b1f2fdd5 Explain more about (defvar foo) form (Bug#18059) 68c2f336b1 * doc/lispref/buffers.texi (Buffer List): Fix grammar. 7e720c6851 * doc/lispref/anti.texi (Antinews): Fix grammar. a6a821d29b * lisp/org/ob-lisp.el (org-babel-lisp-eval-fn): Tweak type. commit 8e5ab342aac11ccc54fdcdc9593e989b562f7ae7 Merge: 31ce174a72 7c993c34b0 Author: Stefan Monnier Date: Fri Mar 23 11:01:31 2018 -0400 ; Merge from origin/emacs-26 The following commit was skipped: 7c993c34b0 sql.el defcustom fixes commit b8ebf5fb64dbf261315bfdb281a8b0a119e7cc2b Author: Noam Postavsky Date: Fri Mar 23 04:51:53 2018 -0400 * src/lisp.h (struct Lisp_Buffer_Local_Value): Update commentary. diff --git a/src/lisp.h b/src/lisp.h index 57e4f4b985..a8963b7f3c 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -2593,13 +2593,12 @@ struct Lisp_Buffer_Objfwd variable, you must first make sure the right binding is loaded; then you can access the value in (or through) `realvalue'. - `buffer' and `frame' are the buffer and frame for which the loaded - binding was found. If those have changed, to make sure the right - binding is loaded it is necessary to find which binding goes with - the current buffer and selected frame, then load it. To load it, - first unload the previous binding, then copy the value of the new - binding into `realvalue' (or through it). Also update - LOADED-BINDING to point to the newly loaded binding. + `where' is the buffer for which the loaded binding was found. If + it has changed, to make sure the right binding is loaded it is + necessary to find which binding goes with the current buffer, then + load it. To load it, first unload the previous binding, then copy + the value of the new binding into `realvalue' (or through it). + Also update LOADED-BINDING to point to the newly loaded binding. `local_if_set' indicates that merely setting the variable creates a local binding for the current buffer. Otherwise the latter, setting @@ -2615,14 +2614,14 @@ struct Lisp_Buffer_Local_Value bool_bf found : 1; /* If non-NULL, a forwarding to the C var where it should also be set. */ union Lisp_Fwd *fwd; /* Should never be (Buffer|Kboard)_Objfwd. */ - /* The buffer or frame for which the loaded binding was found. */ + /* The buffer for which the loaded binding was found. */ Lisp_Object where; /* A cons cell that holds the default value. It has the form (SYMBOL . DEFAULT-VALUE). */ Lisp_Object defcell; /* The cons cell from `where's parameter alist. It always has the form (SYMBOL . VALUE) - Note that if `forward' is non-nil, VALUE may be out of date. + Note that if `fwd' is non-NULL, VALUE may be out of date. Also if the currently loaded binding is the default binding, then this is `eq'ual to defcell. */ Lisp_Object valcell; commit 8c92a37cb4dd8e2d0adf1ce19f74c372e0ad2e42 Author: Noam Postavsky Date: Thu Mar 15 07:42:40 2018 -0400 * doc/emacs/trouble.texi: Fix location of `emacs-version' index. diff --git a/doc/emacs/trouble.texi b/doc/emacs/trouble.texi index c0dc3d472e..fc9a64d375 100644 --- a/doc/emacs/trouble.texi +++ b/doc/emacs/trouble.texi @@ -594,7 +594,6 @@ with the manual, one of them must be wrong; that is a bug. @cindex bug reporting @cindex report an Emacs bug, how to -@findex emacs-version When you decide that there is a bug, it is important to report it and to report it in a way which is useful. What is most useful is an exact description of what commands you type, starting with the shell @@ -717,6 +716,7 @@ should include all these things: The version number of Emacs. Without this, we won't know whether there is any point in looking for the bug in the current version of GNU Emacs. +@findex emacs-version @kbd{M-x report-emacs-bug} includes this information automatically, but if you are not using that command for your report you can get the version number by typing @kbd{M-x emacs-version @key{RET}}. If that commit 10b1f2fdd5465407766790131b2ead3500d0798c Author: Noam Postavsky Date: Sat Feb 10 14:06:05 2018 -0500 Explain more about (defvar foo) form (Bug#18059) * doc/lispref/variables.texi (Defining Variables) (Using Lexical Binding): * doc/lispref/compile.texi (Compiler Errors): Emphasize that omitting VALUE for `defvar' marks the variable special only locally. * doc/lispref/variables.texi (Using Lexical Binding): Add example of using `defvar' without VALUE. diff --git a/doc/lispref/compile.texi b/doc/lispref/compile.texi index 0e39866d34..e665b84f9b 100644 --- a/doc/lispref/compile.texi +++ b/doc/lispref/compile.texi @@ -500,7 +500,8 @@ You can tell the compiler that a function is defined using @item Likewise, you can tell the compiler that a variable is defined using @code{defvar} with no initial value. (Note that this marks the -variable as special, i.e.@: dynamically bound.) @xref{Defining +variable as special, i.e.@: dynamically bound, but only within the +current lexical scope, or file if at top-level.) @xref{Defining Variables}. @end itemize diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi index b80bc88a58..4d04335d83 100644 --- a/doc/lispref/variables.texi +++ b/doc/lispref/variables.texi @@ -443,9 +443,13 @@ dynamically bound value; @pxref{Void Variables}), then @var{value} is evaluated and @var{symbol} is set to the result. But if @var{symbol} is not void, @var{value} is not evaluated, and @var{symbol}'s value is left unchanged. If @var{value} is omitted, the value of @var{symbol} -is not changed in any case. Using @code{defvar} with no value is one -method of suppressing byte compilation warnings, see @ref{Compiler -Errors}. +is not changed in any case. + +Note that specifying a value, even @code{nil}, marks the variable as +special permanently. Whereas if @var{value} is omitted then the +variable is only marked special locally (i.e.@: within the current +lexical scope, or file if at the top-level). This can be useful for +suppressing byte compilation warnings, see @ref{Compiler Errors}. If @var{symbol} has a buffer-local binding in the current buffer, @code{defvar} acts on the default value, which is buffer-independent, @@ -489,6 +493,9 @@ it a documentation string: The @code{defvar} form returns @var{symbol}, but it is normally used at top level in a file where its value does not matter. + +For a more elaborate example of using @code{defvar} without a value, +see @ref{Local defvar example}. @end defspec @cindex constant variables @@ -1165,6 +1172,32 @@ variables}. Every variable that has been defined with @code{defvar}, (@pxref{Defining Variables}). All other variables are subject to lexical binding. +@anchor{Local defvar example} +Using @code{defvar} without a value, it is possible to bind a variable +dynamically just in one file, or in just one part of a file while +still binding it lexically elsewhere. For example: + +@example +@group +(let (_) + (defvar x) ; @r{Let-bindings of @code{x} will be dynamic within this let.} + (let ((x -99)) ; @r{This is a dynamic binding of @code{x}.} + (defun get-dynamic-x () + x))) + +(let ((x 'lexical)) ; @r{This is a lexical binding of @code{x}.} + (defun get-lexical-x () + x)) + +(let (_) + (defvar x) + (let ((x 'dynamic)) + (list (get-lexical-x) + (get-dynamic-x)))) + @result{} (lexical dynamic) +@end group +@end example + @defun special-variable-p symbol This function returns non-@code{nil} if @var{symbol} is a special variable (i.e., it has a @code{defvar}, @code{defcustom}, or commit 31ce174a7228499eb2264e701fd8d16bd291c25f Author: Robert Pluim Date: Thu Mar 22 09:06:44 2018 +0100 Make update_autogen work in git worktrees * admin/update_autogen: Make it work in a git worktree diff --git a/admin/update_autogen b/admin/update_autogen index d211867479..f4c2c39825 100755 --- a/admin/update_autogen +++ b/admin/update_autogen @@ -47,7 +47,7 @@ cd $PD cd ../ [ -d admin ] || die "Could not locate admin directory" -[ -d .git ] || die "No .git directory" +[ -d .git ] || git rev-parse --git-dir > /dev/null 2>&1 || die "Not in a git repository" usage () { commit dfea6d5a4aac5fd1679a917c5e84ce17a6c6a3d8 Author: Glenn Morris Date: Thu Mar 22 21:40:24 2018 -0700 Quieten cl-lib related compiler warnings * lisp/completion.el (cl-set-difference): * lisp/files.el (map-merge-with, map-merge): * lisp/emacs-lisp/radix-tree.el (map-apply): Declare. * lisp/emacs-lisp/thunk.el: Load cl-lib at run-time, not cl-macs at compile. * lisp/gnus/gnus-group.el: Load cl-lib at run-time, not cl at compile. * lisp/emacs-lisp/checkdoc.el, lisp/emacs-lisp/package.el * lisp/gnus/gnus-sum.el, lisp/gnus/message.el, lisp/net/shr.el: Load cl-lib at run-time. * lisp/gnus/mml-sec.el (mml-signencrypt-style) (mml-secure-cust-record-keys): Replace cl with cl-lib, and load it at run-time. * lisp/cedet/ede/linux.el, lisp/vc/vc-hg.el: Reorder requires. diff --git a/lisp/cedet/ede/linux.el b/lisp/cedet/ede/linux.el index 862a9e597a..84ce7ee6ef 100644 --- a/lisp/cedet/ede/linux.el +++ b/lisp/cedet/ede/linux.el @@ -32,10 +32,9 @@ ;; * Add texinfo lookup options. ;; * Add website -(eval-when-compile (require 'cl)) - (require 'ede) (require 'ede/make) +(eval-when-compile (require 'cl)) (declare-function semanticdb-file-table-object "semantic/db") (declare-function semanticdb-needs-refresh-p "semantic/db") diff --git a/lisp/completion.el b/lisp/completion.el index 9666ca60b0..ff94294086 100644 --- a/lisp/completion.el +++ b/lisp/completion.el @@ -2225,6 +2225,8 @@ TYPE is the type of the wrapper to be added. Can be :before or :under." (modify-syntax-entry char "_" table)) table)) +(declare-function cl-set-difference "cl-seq" (cl-list1 cl-list2 &rest cl-keys)) + (defun completion-lisp-mode-hook () (require 'cl-lib) (setq completion-syntax-table completion-lisp-syntax-table) diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el index 59b7831fb5..300a3908c1 100644 --- a/lisp/emacs-lisp/checkdoc.el +++ b/lisp/emacs-lisp/checkdoc.el @@ -171,7 +171,7 @@ (defvar checkdoc-version "0.6.1" "Release version of checkdoc you are currently running.") -(eval-when-compile (require 'cl-lib)) +(require 'cl-lib) (require 'help-mode) ;; for help-xref-info-regexp (require 'thingatpt) ;; for handy thing-at-point-looking-at diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 1edc06d024..67533679b9 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -143,8 +143,8 @@ ;;; Code: +(require 'cl-lib) (eval-when-compile (require 'subr-x)) -(eval-when-compile (require 'cl-lib)) (eval-when-compile (require 'epg)) ;For setf accessors. (require 'seq) diff --git a/lisp/emacs-lisp/radix-tree.el b/lisp/emacs-lisp/radix-tree.el index 8946560d3b..e3c5800efb 100644 --- a/lisp/emacs-lisp/radix-tree.el +++ b/lisp/emacs-lisp/radix-tree.el @@ -235,6 +235,8 @@ PREFIX is only used internally." (radix-tree-iter-mappings tree (lambda (_k _v) (setq i (1+ i)))) i)) +(declare-function map-apply "map" (function map)) + (defun radix-tree-from-map (map) ;; Aka (cl-defmethod map-into (map (type (eql radix-tree)))) ...) (require 'map) diff --git a/lisp/emacs-lisp/thunk.el b/lisp/emacs-lisp/thunk.el index bbdd7d61f6..823d4960aa 100644 --- a/lisp/emacs-lisp/thunk.el +++ b/lisp/emacs-lisp/thunk.el @@ -48,7 +48,7 @@ ;;; Code: -(eval-when-compile (require 'cl-macs)) +(require 'cl-lib) (defmacro thunk-delay (&rest body) "Delay the evaluation of BODY." diff --git a/lisp/files.el b/lisp/files.el index 46a105a36f..bad2639fa6 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -4012,6 +4012,9 @@ This function returns either: ;; No cache entry. locals-dir))) +(declare-function map-merge-with "map" (type function &rest maps)) +(declare-function map-merge "map" (type &rest maps)) + (defun dir-locals-read-from-dir (dir) "Load all variables files in DIR and register a new class and instance. DIR is the absolute name of a directory which must contain at diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index 3e655cc56c..4dd5fec6df 100644 --- a/lisp/gnus/gnus-group.el +++ b/lisp/gnus/gnus-group.el @@ -24,10 +24,7 @@ ;;; Code: -(eval-when-compile - (require 'cl)) -(defvar tool-bar-mode) - +(require 'cl-lib) (require 'gnus) (require 'gnus-start) (require 'nnmail) @@ -46,6 +43,8 @@ (unless (boundp 'gnus-cache-active-hashtb) (defvar gnus-cache-active-hashtb nil))) +(defvar tool-bar-mode) + (autoload 'gnus-agent-total-fetched-for "gnus-agent") (autoload 'gnus-cache-total-fetched-for "gnus-cache") diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 468f2b195e..a5756b1a20 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -24,7 +24,7 @@ ;;; Code: -(eval-when-compile (require 'cl)) +(require 'cl-lib) (defvar tool-bar-mode) (defvar gnus-tmp-header) diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index e452c80e26..37b994de99 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -28,8 +28,7 @@ ;;; Code: -(eval-when-compile (require 'cl-lib)) - +(require 'cl-lib) (require 'mailheader) (require 'gmm-utils) (require 'mail-utils) diff --git a/lisp/gnus/mml-sec.el b/lisp/gnus/mml-sec.el index dc10763da8..9a64853edf 100644 --- a/lisp/gnus/mml-sec.el +++ b/lisp/gnus/mml-sec.el @@ -23,7 +23,7 @@ ;;; Code: -(eval-when-compile (require 'cl)) +(require 'cl-lib) (require 'gnus-util) (require 'epg) @@ -167,9 +167,9 @@ You can also customize or set `mml-signencrypt-style-alist' instead." (if (or (eq style 'separate) (eq style 'combined)) ;; valid style setting? - (setf (second style-item) style) + (setf (cadr style-item) style) ;; otherwise, just return the current value - (second style-item)) + (cadr style-item)) (message "Warning, attempt to set invalid signencrypt style")))) ;;; Security functions @@ -554,7 +554,7 @@ customized in this variable." "For CONTEXT, USAGE, and NAME record fingerprint(s) of KEYS. If optional SAVE is not nil, save customized fingerprints. Return keys." - (assert keys) + (cl-assert keys) (let* ((usage-prefs (mml-secure-cust-usage-lookup context usage)) (curr-fprs (cdr (assoc name (cdr usage-prefs)))) (key-fprs (mapcar 'mml-secure-fingerprint keys)) diff --git a/lisp/net/shr.el b/lisp/net/shr.el index a6b8693dd7..69063abf03 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el @@ -30,7 +30,7 @@ ;;; Code: -(eval-when-compile (require 'cl-lib)) +(require 'cl-lib) (eval-when-compile (require 'url)) ;For url-filename's setf handler. (require 'browse-url) (eval-when-compile (require 'subr-x)) diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el index ad817fd9b9..9dafaef7aa 100644 --- a/lisp/vc/vc-hg.el +++ b/lisp/vc/vc-hg.el @@ -101,12 +101,12 @@ ;;; Code: +(require 'cl-lib) + (eval-when-compile (require 'vc) (require 'vc-dir)) -(require 'cl-lib) - (declare-function vc-compilation-mode "vc-dispatcher" (backend)) ;;; Customization options commit 97b7e58c4d34722e8b0eb73b3ed315fdc9671264 Author: Stefan Monnier Date: Thu Mar 22 18:18:26 2018 -0400 Try and fix the more obvious sources of bug#30635 * lisp/files.el (dir-locals-read-from-dir): Handle the easy cases without loading `map`. * lisp/emacs-lisp/bytecomp.el: Don't require cl-lib at run-time. (byte-compile-and-folded): Avoid cl-every. diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index b3ea9300b0..07476f1ac9 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -124,17 +124,10 @@ (require 'backquote) (require 'macroexp) (require 'cconv) -(require 'cl-lib) - -;; During bootstrap, cl-loaddefs.el is not created yet, so loading cl-lib -;; doesn't setup autoloads for things like cl-every, which is why we have to -;; require cl-extra as well (bug#18804). -(or (fboundp 'cl-every) - (require 'cl-extra)) - -(or (fboundp 'defsubst) - ;; This really ought to be loaded already! - (load "byte-run")) +;; Refrain from using cl-lib at run-time here, since it otherwise prevents +;; us from emitting warnings when compiling files which use cl-lib without +;; requiring it! (bug#30635) +(eval-when-compile (require 'cl-lib)) ;; The feature of compiling in a specific target Emacs version ;; has been turned off because compile time options are a bad idea. @@ -3582,7 +3575,8 @@ These implicitly `and' together a bunch of two-arg bytecodes." (cond ((< l 3) (byte-compile-form `(progn ,(nth 1 form) t))) ((= l 3) (byte-compile-two-args form)) - ((cl-every #'macroexp-copyable-p (nthcdr 2 form)) + ;; Don't use `cl-every' here (see comment where we require cl-lib). + ((not (memq nil (mapcar #'macroexp-copyable-p (nthcdr 2 form)))) (byte-compile-form `(and (,(car form) ,(nth 1 form) ,(nth 2 form)) (,(car form) ,@(nthcdr 2 form))))) (t (byte-compile-normal-call form))))) diff --git a/lisp/files.el b/lisp/files.el index 8ec2bde588..46a105a36f 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -4018,7 +4018,6 @@ DIR is the absolute name of a directory which must contain at least one dir-local file (which is a file holding variables to apply). Return the new class name, which is a symbol named DIR." - (require 'map) (let* ((class-name (intern dir)) (files (dir-locals--all-files dir)) (read-circle nil) @@ -4033,12 +4032,19 @@ Return the new class name, which is a symbol named DIR." (setq latest file-time))) (with-temp-buffer (insert-file-contents file) - (condition-case-unless-debug nil - (setq variables + (let ((newvars + (condition-case-unless-debug nil + (read (current-buffer)) + (end-of-file nil)))) + (setq variables + ;; Try and avoid loading `map' since that also loads cl-lib + ;; which then might hamper bytecomp warnings (bug#30635). + (if (not (and newvars variables)) + (or newvars variables) + (require 'map) (map-merge-with 'list (lambda (a b) (map-merge 'list a b)) variables - (read (current-buffer)))) - (end-of-file nil)))) + newvars)))))) (setq success latest)) (dir-locals-set-class-variables class-name variables) (dir-locals-set-directory-class dir class-name success) commit 68c2f336b196b29ee0452668b44857b3450a72ac Author: Charles A. Roelli Date: Thu Mar 22 20:43:42 2018 +0100 * doc/lispref/buffers.texi (Buffer List): Fix grammar. diff --git a/doc/lispref/buffers.texi b/doc/lispref/buffers.texi index f64d6f1600..45e90669b7 100644 --- a/doc/lispref/buffers.texi +++ b/doc/lispref/buffers.texi @@ -891,7 +891,7 @@ This function operates on each frame's @code{buffer-list} parameter as well as the fundamental buffer list; therefore, the buffer that you bury will come last in the value of @code{(buffer-list @var{frame})} and in the value of @code{(buffer-list)}. In addition, it also puts the buffer -at the end of the list of buffer of the selected window (@pxref{Window +at the end of the list of buffers of the selected window (@pxref{Window History}) provided it is shown in that window. If @var{buffer-or-name} is @code{nil} or omitted, this means to bury the commit 7e720c685121ea78b09789fc5d82533caa5f9d98 Author: Charles A. Roelli Date: Thu Mar 22 20:40:02 2018 +0100 * doc/lispref/anti.texi (Antinews): Fix grammar. diff --git a/doc/lispref/anti.texi b/doc/lispref/anti.texi index ef28415d59..556203b69f 100644 --- a/doc/lispref/anti.texi +++ b/doc/lispref/anti.texi @@ -164,9 +164,10 @@ come, and learning to use yet another API is a burden. @item The function @code{read-multiple-choice} is also gone, in recognition -of the fact that nothing makes Emacs Lisp hacker rejoice more than the -need to sit down and write yet another interactive question-and-answer -function, and make it optimal for each specific case. +of the fact that nothing makes Emacs Lisp hackers rejoice more than +the need to sit down and write yet another interactive +question-and-answer function, and make it optimal for each specific +case. @item The function @code{add-variable-watcher} and the corresponding commit 86d6417bf15b7ad5717dec2112f8616f67b2c9d3 Author: Charles A. Roelli Date: Thu Mar 22 20:33:45 2018 +0100 Add new command vc-git-stash-delete * lisp/vc/vc-git.el (vc-git-stash-delete): New command, in line with vc-git-stash-delete-at-point. (vc-git-extra-menu-map): Add menu entry. diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index bf1b050342..88052d7749 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -1388,6 +1388,9 @@ This requires git 1.8.4 or later, for the \"-L\" option of \"git log\"." (define-key map [git-grep] '(menu-item "Git grep..." vc-git-grep :help "Run the `git grep' command")) + (define-key map [git-ds] + '(menu-item "Delete Stash..." vc-git-stash-delete + :help "Delete a stash")) (define-key map [git-sn] '(menu-item "Stash a Snapshot" vc-git-stash-snapshot :help "Stash the current state of the tree and keep the current state")) @@ -1518,6 +1521,12 @@ This command shares argument histories with \\[rgrep] and \\[grep]." (vc-git-command "*vc-git-stash*" 0 nil "stash" "pop" "-q" name) (vc-resynch-buffer (vc-git-root default-directory) t t)) +(defun vc-git-stash-delete (name) + "Delete stash NAME." + (interactive (list (vc-git-stash-read "Delete stash: "))) + (vc-git-command "*vc-git-stash*" 0 nil "stash" "drop" "-q" name) + (vc-resynch-buffer (vc-git-root default-directory) t t)) + (defun vc-git-stash-snapshot () "Create a stash with the current tree state." (interactive) commit a6a821d29bda3e45fb26289e6119359ea3b91ebb Author: Glenn Morris Date: Thu Mar 22 14:37:45 2018 -0400 * lisp/org/ob-lisp.el (org-babel-lisp-eval-fn): Tweak type. Avoids type mismatch when relevant library is not present/loaded. diff --git a/lisp/org/ob-lisp.el b/lisp/org/ob-lisp.el index c156ca34a7..d4a7c37133 100644 --- a/lisp/org/ob-lisp.el +++ b/lisp/org/ob-lisp.el @@ -54,7 +54,7 @@ Valid values include `slime-eval' and `sly-eval'." :group 'org-babel :version "26.1" :package-version '(Org . "9.0") - :type 'function) + :type 'symbol) (defcustom org-babel-lisp-dir-fmt "(let ((*default-pathname-defaults* #P%S\n)) %%s\n)" commit 7c993c34b048dbdcb2e79d8989935cce05c34ce2 Author: Glenn Morris Date: Thu Mar 22 14:31:33 2018 -0400 sql.el defcustom fixes * lisp/progmodes/sql.el (sql-login-params): Update. Avoids type mismatch with postgres and sqlite login params. (sql-postgres-login-params): Bump version. diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el index d20c579f66..e4db6cc38a 100644 --- a/lisp/progmodes/sql.el +++ b/lisp/progmodes/sql.el @@ -26,10 +26,10 @@ ;;; Commentary: ;; Please send bug reports and bug fixes to the mailing list at -;; help-gnu-emacs@gnu.org. If you want to subscribe to the mailing -;; list, see the web page at -;; https://lists.gnu.org/mailman/listinfo/help-gnu-emacs for -;; instructions. I monitor this list actively. If you send an e-mail +;; bug-gnu-emacs@gnu.org. +;; See also the general help list at +;; https://lists.gnu.org/mailman/listinfo/help-gnu-emacs +;; I monitor this list actively. If you send an e-mail ;; to Alex Schroeder it usually makes it to me when Alex has a chance ;; to forward them along (Thanks, Alex). @@ -292,6 +292,9 @@ file. Since that is a plaintext file, this could be dangerous." ;; Login parameter type +;; This seems too prescriptive. It probably fails to match some of +;; the possible combinations. It would probably be better to just use +;; plist for most of it. (define-widget 'sql-login-params 'lazy "Widget definition of the login parameters list" :tag "Login Parameters" @@ -331,13 +334,17 @@ file. Since that is a plaintext file, this could be dangerous." (list :tag "file" (const :format "" database) (const :format "" :file) - regexp) + (choice (const nil) regexp) + (const :format "" :must-match) + (symbol :tag ":must-match")) (list :tag "completion" (const :format "" database) + (const :format "" :default) + (string :tag ":default") (const :format "" :completion) + (sexp :tag ":completion") (const :format "" :must-match) - (restricted-sexp - :match-alternatives (listp stringp)))) + (symbol :tag ":must-match"))) (const port))) ;; SQL Product support @@ -1088,7 +1095,7 @@ add your name with a \"-U\" prefix (such as \"-Umark\") to the list." server) "List of login parameters needed to connect to Postgres." :type 'sql-login-params - :version "24.1" + :version "26.1" :group 'SQL) (defun sql-postgres-list-databases () commit 311bb33218b860413af699ac84e50fccfc1469c0 Author: Paul Eggert Date: Thu Mar 22 11:25:42 2018 -0700 Fix byte-opt lists of pure functions etc. This fixes a bug where a byte-compiler running on 64-bit Emacs optimized (lsh -1 -1) to #x1fffffffffffffff, an optimization that is incorrect for .elc files intended for either 32- or 64-bit Emacs. While I was in the neighborhood, I noticed other glitches in the lists of pure and side-effect-free functions, and fixed the errors that I found. * lisp/emacs-lisp/byte-opt.el (side-effect-free-fns): Move some functions here from side-effect-and-error-free-fns, since they can now signal errors. The affected functions are current-time-string, current-time-zone, line-beginning-position, line-end-position. Rename langinfo to locale-info. Add logcount. Remove string-to-int. (side-effect-and-error-free-fns): Remove minibuffer-window, a function that can signal errors, and that is already in side-effect-free-fns. (pure-fns): Remove ash, lsh, and logb, since they are platform-dependent and .elc files should be platform-independent. Add %, logand, logcount. Sort. Clarify what is meant by “pure”. diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el index a316364761..55343e1e3a 100644 --- a/lisp/emacs-lisp/byte-opt.el +++ b/lisp/emacs-lisp/byte-opt.el @@ -1186,6 +1186,7 @@ char-equal char-to-string char-width compare-strings compare-window-configurations concat coordinates-in-window-p copy-alist copy-sequence copy-marker cos count-lines + current-time-string current-time-zone decode-char decode-time default-boundp default-value documentation downcase elt encode-char exp expt encode-time error-message-string @@ -1199,8 +1200,9 @@ hash-table-count int-to-string intern-soft keymap-parent - length local-variable-if-set-p local-variable-p log log10 logand - logb logior lognot logxor lsh langinfo + length line-beginning-position line-end-position + local-variable-if-set-p local-variable-p locale-info + log log10 logand logb logcount logior lognot logxor lsh make-list make-string make-symbol marker-buffer max member memq min minibuffer-selected-window minibuffer-window mod multibyte-char-to-unibyte next-window nth nthcdr number-to-string @@ -1210,7 +1212,7 @@ radians-to-degrees rassq rassoc read-from-string regexp-quote region-beginning region-end reverse round sin sqrt string string< string= string-equal string-lessp string-to-char - string-to-int string-to-number substring + string-to-number substring sxhash sxhash-equal sxhash-eq sxhash-eql symbol-function symbol-name symbol-plist symbol-value string-make-unibyte string-make-multibyte string-as-multibyte string-as-unibyte @@ -1240,7 +1242,6 @@ charsetp commandp cons consp current-buffer current-global-map current-indentation current-local-map current-minor-mode-maps current-time - current-time-string current-time-zone eobp eolp eq equal eventp floatp following-char framep get-largest-window get-lru-window @@ -1248,9 +1249,9 @@ identity ignore integerp integer-or-marker-p interactive-p invocation-directory invocation-name keymapp keywordp - line-beginning-position line-end-position list listp + list listp make-marker mark mark-marker markerp max-char - memory-limit minibuffer-window + memory-limit mouse-movement-p natnump nlistp not null number-or-marker-p numberp one-window-p overlayp @@ -1275,16 +1276,24 @@ nil) -;; pure functions are side-effect free functions whose values depend -;; only on their arguments. For these functions, calls with constant -;; arguments can be evaluated at compile time. This may shift run time -;; errors to compile time. +;; Pure functions are side-effect free functions whose values depend +;; only on their arguments, not on the platform. For these functions, +;; calls with constant arguments can be evaluated at compile time. +;; This may shift runtime errors to compile time. For example, logand +;; is pure since its results are machine-independent, whereas ash is +;; not pure because (ash 1 29)'s value depends on machine word size. +;; +;; When deciding whether a function is pure, do not worry about +;; mutable strings or markers, as they are so unlikely in real code +;; that they are not worth worrying about. Thus string-to-char is +;; pure even though it might return different values if a string is +;; changed, and logand is pure even though it might return different +;; values if a marker is moved. (let ((pure-fns - '(concat symbol-name regexp-opt regexp-quote string-to-syntax - string-to-char - ash lsh logb lognot logior logxor - ceiling floor))) + '(% concat logand logcount logior lognot logxor + regexp-opt regexp-quote + string-to-char string-to-syntax symbol-name))) (while pure-fns (put (car pure-fns) 'pure t) (setq pure-fns (cdr pure-fns))) commit 011186279c1041e790b81af72981547d623d9b29 Author: Paul Eggert Date: Thu Mar 22 09:32:50 2018 -0700 Port emacs-module-tests to 32-bit Emacs Fix a portability bug when emacs-module-tests.el is byte-compiled with a 32-bit Emacs (where #x20000000 evaluates to a floating-point number) and then is run on a 64-bit Emacs (where the floating-point number causes a test failure). * test/src/emacs-module-tests.el (mod-test-sum-test): Don’t assume #x20000000 can be represented as an Emacs integer. diff --git a/test/src/emacs-module-tests.el b/test/src/emacs-module-tests.el index 4751638968..8b6328d35a 100644 --- a/test/src/emacs-module-tests.el +++ b/test/src/emacs-module-tests.el @@ -66,7 +66,7 @@ (when (< #x1fffffff most-positive-fixnum) (should (= (mod-test-sum 1 #x1fffffff) (1+ #x1fffffff))) - (should (= (mod-test-sum -1 #x20000000) + (should (= (mod-test-sum -1 (1+ #x1fffffff)) #x1fffffff))) (should-error (mod-test-sum 1 most-positive-fixnum) :type 'overflow-error) commit 2849477af22a1e20a86da7743562495e00b3a1b7 Author: Michael Albinus Date: Thu Mar 22 16:52:58 2018 +0100 ; Fix last commit in tramp.el diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 7371d38cba..255c58e48f 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -3564,8 +3564,8 @@ support symbolic links." (setq filename (substitute-in-file-name localname)) (setq filename (concat (file-remote-p filename) - (tramp-drop-volume-letter - (substitute-in-file-name localname))))))) + (tramp-run-real-handler + 'substitute-in-file-name (list localname))))))) ;; "/m:h:~" does not work for completion. We use "/m:h:~/". (if (and (stringp localname) (string-equal "~" localname)) (concat filename "/") commit 0afb436eeb9b87dbd13b012e3b13d51fc6745f0d Merge: 081c39beb0 8ac621bb55 Author: Glenn Morris Date: Thu Mar 22 07:50:37 2018 -0700 Merge from origin/emacs-26 8ac621b (origin/emacs-26) Document DEFUN attributes 16d0cc7 * etc/NEWS: Add an entry for auth-source-pass. cc1702f Fix the MSDOS build daa9e85 Improve warning and error messages 7612dd1 Adjust eieio persistence tests for expected failure f0cf4dc Let eieio-persistent-read read what object-write has written 40ad1ff Handle possible classtype values in eieio-persistent-read 4ec935d Add new tests for eieio persistence 47917d8 * lisp/gnus/gnus-cloud.el (gnus-cloud-synced-files): Fix doc ... e32f352 * lisp/ibuf-ext.el (ibuffer-never-search-content-mode): Fix t... 5268f30 * doc/lispref/windows.texi (Selecting Windows): Fix a typo. 143b485 * doc/lispref/internals.texi (Writing Emacs Primitives): Fix ... 4ab4551 Firm up documentation of generalized variables a5bf099 Improve documentation of Auto-Revert mode ed05eaa Improvements in dired.texi Conflicts: etc/NEWS commit 081c39beb0340f5d6084dc90796ba726a52c928e Merge: bbcd5787cb f8cad16bb3 Author: Glenn Morris Date: Thu Mar 22 07:50:37 2018 -0700 ; Merge from origin/emacs-26 The following commits were skipped: f8cad16 Revert "Support all perl variable declarators and prefixes" d09c488 Port to 32-bit sparc64 commit 8ac621bb5594786c66cc724864e6037c8c650774 Author: Eli Zaretskii Date: Thu Mar 22 14:57:43 2018 +0200 Document DEFUN attributes * doc/lispref/internals.texi (Writing Emacs Primitives): Document specification of function attributes in DEFUN. diff --git a/doc/lispref/internals.texi b/doc/lispref/internals.texi index 6d25eb14df..398ea8de85 100644 --- a/doc/lispref/internals.texi +++ b/doc/lispref/internals.texi @@ -735,7 +735,7 @@ Lisp form. For example: @example @group -DEFUN ("foo", Ffoo, Sfoo, 0, UNEVALLED, +DEFUN ("foo", Ffoo, Sfoo, 0, UNEVALLED, 0 "(list (read-char-by-name \"Insert character: \")\ (prefix-numeric-value current-prefix-arg)\ t))", @@ -761,6 +761,43 @@ arguments. All the usual rules for documentation strings in Lisp code (@pxref{Documentation Tips}) apply to C code documentation strings too. + +The documentation string can be followed by a list of C function +attributes for the C function that implements the primitive, like +this: + +@example +@group +DEFUN ("bar", Fbar, Sbar, 0, UNEVALLED, 0 + doc: /* @dots{} /* + attributes: @var{attr1} @var{attr2} @dots{}) +@end group +@end example + +@noindent +You can specify more than a single attribute, one after the other. +Currently, only the following attributes are recognized: + +@table @code +@item noreturn +Declares the C function as one that never returns. This corresponds +to the C11 keyword @code{_Noreturn} and to @w{@code{__attribute__ +((__noreturn__))}} attribute of GCC (@pxref{Function Attributes,,, +gcc, Using the GNU Compiler Collection}). + +@item const +Declares that the function does not examine any values except its +arguments, and has no effects except the return value. This +corresponds to @w{@code{__attribute__ ((__const__))}} attribute of +GCC. + +@item noinline +This corresponds to @w{@code{__attribute__ ((__noinline__))}} +attribute of GCC, which prevents the function from being considered +for inlining. This might be needed, e.g., to countermand effects of +link-time optimizations on stack-based variables. +@end table + @end table After the call to the @code{DEFUN} macro, you must write the commit 16d0cc73f2bc11777eb2884594b0832abd5f30a4 Author: Nicolas Petton Date: Thu Mar 22 11:55:15 2018 +0100 * etc/NEWS: Add an entry for auth-source-pass. diff --git a/etc/NEWS b/etc/NEWS index eded00e655..f5da6870b7 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1274,6 +1274,10 @@ specialized for editing freedesktop.org desktop entries. ** New major mode 'less-css-mode' (a minor variant of 'css-mode') for editing Less files. ++++ +** New package 'auth-source-pass' integrates 'auth-source' with the +password manager password-store (http://passwordstore.org). + * Incompatible Lisp Changes in Emacs 26.1 commit cc1702f790443cac70f93661d2a5552caf986769 Author: Eli Zaretskii Date: Thu Mar 22 11:15:23 2018 +0200 Fix the MSDOS build * msdos/sed2v2.inp (HAVE_SBRK): Define to 1. diff --git a/msdos/sed2v2.inp b/msdos/sed2v2.inp index d18242eac3..ea75356f99 100644 --- a/msdos/sed2v2.inp +++ b/msdos/sed2v2.inp @@ -32,6 +32,7 @@ /^#undef DOS_NT *$/s/^.*$/#define DOS_NT/ /^#undef FLOAT_CHECK_DOMAIN *$/s/^.*$/#define FLOAT_CHECK_DOMAIN/ /^#undef HAVE_ALLOCA *$/s/^.*$/#define HAVE_ALLOCA 1/ +/^#undef HAVE_SBRK *$/s/^.*$/#define HAVE_SBRK 1/ /^#undef HAVE_SETITIMER *$/s/^.*$/#define HAVE_SETITIMER 1/ /^#undef HAVE_STRUCT_UTIMBUF *$/s/^.*$/#define HAVE_STRUCT_UTIMBUF 1/ /^#undef LOCALTIME_CACHE *$/s/^.*$/#define LOCALTIME_CACHE 1/ commit bbcd5787cb077f8b6c4eba5c1704ad953a298fd7 Author: Michael Albinus Date: Thu Mar 22 09:58:56 2018 +0100 Fix commit c24c5dc4a4 * lisp/net/tramp.el (tramp-handle-substitute-in-file-name): Drop volume letter of localname substitution. Reported by Chris Zheng . diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 5930bcdd4f..7371d38cba 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -3564,7 +3564,8 @@ support symbolic links." (setq filename (substitute-in-file-name localname)) (setq filename (concat (file-remote-p filename) - (substitute-in-file-name localname)))))) + (tramp-drop-volume-letter + (substitute-in-file-name localname))))))) ;; "/m:h:~" does not work for completion. We use "/m:h:~/". (if (and (stringp localname) (string-equal "~" localname)) (concat filename "/") commit aeb107b63022824c9844b0658cfe22de2c4c0ecd Author: Michael Albinus Date: Thu Mar 22 09:43:44 2018 +0100 Tag tramp-test39-utf8* as :unstable * test/lisp/net/tramp-tests.el (tramp-test39-utf8) (tramp-test39-utf8-with-stat, tramp-test39-utf8-with-perl) (tramp-test39-utf8-with-ls): Tag the tests as :unstable. diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index 519c98a89f..70c9002ab3 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el @@ -4653,6 +4653,7 @@ Use the `ls' command." (ert-deftest tramp-test39-utf8 () "Check UTF8 encoding in file names and file contents." + :tags '(:unstable) (skip-unless (tramp--test-enabled)) (skip-unless (not (tramp--test-docker-p))) (skip-unless (not (tramp--test-rsync-p))) @@ -4664,7 +4665,7 @@ Use the `ls' command." (ert-deftest tramp-test39-utf8-with-stat () "Check UTF8 encoding in file names and file contents. Use the `stat' command." - :tags '(:expensive-test) + :tags '(:expensive-test :unstable) (skip-unless (tramp--test-enabled)) (skip-unless (tramp--test-sh-p)) (skip-unless (not (tramp--test-docker-p))) @@ -4684,7 +4685,7 @@ Use the `stat' command." (ert-deftest tramp-test39-utf8-with-perl () "Check UTF8 encoding in file names and file contents. Use the `perl' command." - :tags '(:expensive-test) + :tags '(:expensive-test :unstable) (skip-unless (tramp--test-enabled)) (skip-unless (tramp--test-sh-p)) (skip-unless (not (tramp--test-docker-p))) @@ -4707,7 +4708,7 @@ Use the `perl' command." (ert-deftest tramp-test39-utf8-with-ls () "Check UTF8 encoding in file names and file contents. Use the `ls' command." - :tags '(:expensive-test) + :tags '(:expensive-test :unstable) (skip-unless (tramp--test-enabled)) (skip-unless (tramp--test-sh-p)) (skip-unless (not (tramp--test-docker-p))) commit 0a53c71fe27a61b7c8cc576d570bf82ca650247d Author: Michael Albinus Date: Thu Mar 22 09:37:48 2018 +0100 Fix Bug#30904 * lisp/net/tramp.el (tramp-dissect-file-name): Adapt docstring. (Bug#30904) diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index fe9f197694..5930bcdd4f 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -1339,11 +1339,13 @@ This is HOST, if non-nil. Otherwise, it is `tramp-default-host'." tramp-default-host)) (defun tramp-dissect-file-name (name &optional nodefault) - "Return a `tramp-file-name' structure. -The structure consists of remote method, remote user, remote host, -localname (file name on remote host) and hop. If NODEFAULT is -non-nil, the file name parts are not expanded to their default -values." + "Return a `tramp-file-name' structure of NAME, a remote file name. +The structure consists of method, user, domain, host, port, +localname (file name on remote host), and hop. + +Unless NODEFAULT is non-nil, method, user and host are expanded +to their default values. For the other file name parts, no +default values are used." (save-match-data (unless (tramp-tramp-file-p name) (tramp-compat-user-error nil "Not a Tramp file name: \"%s\"" name)) commit daa9e853bd6de90e0fc0b13e30eb261c5a45774e Author: Eric Abrahamsen Date: Sat Mar 10 16:26:38 2018 +0800 Improve warning and error messages * lisp/emacs-lisp/eieio-base.el (eieio-persistent-read, (eieio-persistent-validate/fix-slot-value): Indicate exactly what went wrong. diff --git a/lisp/emacs-lisp/eieio-base.el b/lisp/emacs-lisp/eieio-base.el index 5ff8574d9a..cba6cab1d4 100644 --- a/lisp/emacs-lisp/eieio-base.el +++ b/lisp/emacs-lisp/eieio-base.el @@ -219,7 +219,7 @@ for CLASS. Optional ALLOW-SUBCLASS says that it is ok for `eieio-persistent-read' to load in subclasses of class instead of being pedantic." (unless class - (message "Unsafe call to `eieio-persistent-read'.")) + (warn "`eieio-persistent-read' called without specifying a class")) (when class (cl-check-type class class)) (let ((ret nil) (buffstr nil)) @@ -234,13 +234,16 @@ being pedantic." ;; the current buffer will work. (setq ret (read buffstr)) (when (not (child-of-class-p (car ret) 'eieio-persistent)) - (error "Corrupt object on disk: Unknown saved object")) + (error + "Invalid object: %s is not a subclass of `eieio-persistent'" + (car ret))) (when (and class - (not (or (eq (car ret) class ) ; same class - (and allow-subclass - (child-of-class-p (car ret) class)) ; subclasses - ))) - (error "Corrupt object on disk: Invalid saved class")) + (not (or (eq (car ret) class) ; same class + (and allow-subclass ; subclass + (child-of-class-p (car ret) class))))) + (error + "Invalid object: %s is not an object of class %s nor a subclass" + (car ret) class)) (setq ret (eieio-persistent-convert-list-to-object ret)) (oset ret file filename)) (kill-buffer " *tmp eieio read*")) @@ -332,7 +335,8 @@ Second, any text properties will be stripped from strings." ;; We have a predicate, but it doesn't satisfy the predicate? (dolist (PV (cdr proposed-value)) (unless (child-of-class-p (car PV) (car classtype)) - (error "Corrupt object on disk"))) + (error "Invalid object: slot member %s does not match class %s" + (car PV) (car classtype)))) ;; We have a list of objects here. Lets load them ;; in. commit 7612dd14b60317b0d216112acdc169724aa0b464 Author: Eric Abrahamsen Date: Sat Dec 30 10:12:22 2017 -0800 Adjust eieio persistence tests for expected failure * test/lisp/emacs-lisp/eieio-tests/eieio-test-persist.el (eieio-test-persist-hash-and-vector, eieio-test-persist-interior-lists): Persistence does not currently handle deeply-nested objects. Expect current failures, and mark for future fixes. diff --git a/test/lisp/emacs-lisp/eieio-tests/eieio-test-persist.el b/test/lisp/emacs-lisp/eieio-tests/eieio-test-persist.el index ff4aaf7aeb..eae69c89eb 100644 --- a/test/lisp/emacs-lisp/eieio-tests/eieio-test-persist.el +++ b/test/lisp/emacs-lisp/eieio-tests/eieio-test-persist.el @@ -291,10 +291,14 @@ persistent class.") (puthash "Bob" bob (slot-value class 'students)) (aset (slot-value class 'random-vector) 0 (make-instance 'persistent-random-class)) - (aset (car (slot-value class 'janitor)) 1 hans) - (aset (nth 1 (slot-value class 'janitor)) 1 dierdre) (unwind-protect (persist-test-save-and-compare class) + (delete-file (oref class file))) + (aset (car (slot-value class 'janitors)) 1 hans) + (aset (nth 1 (slot-value class 'janitors)) 1 dierdre) + (unwind-protect + ;; FIXME: This should not error. + (should-error (persist-test-save-and-compare class)) (delete-file (oref class file))))) ;; Extra quotation of lists inside other objects (Gnus registry), also @@ -322,13 +326,17 @@ persistent class.") (alexie (make-instance 'person :name "Alexie")) (alst '(("first" (one two three)) ("second" (four five six))))) - (setf (nth 2 (cadar alst)) john - (nth 2 (cadadr alst)) alexie) (setf (slot-value thing 'alist) alst) (puthash "alst" alst (slot-value thing 'htab)) (aset (slot-value thing 'vec) 0 alst) (unwind-protect (persist-test-save-and-compare thing) + (delete-file (slot-value thing 'file))) + (setf (nth 2 (cadar alst)) john + (nth 2 (cadadr alst)) alexie) + (unwind-protect + ;; FIXME: Should not error. + (should-error (persist-test-save-and-compare thing)) (delete-file (slot-value thing 'file))))) ;;; eieio-test-persist.el ends here commit f0cf4dc62918a5acd2c6bbade78909cfa73ca9c8 Author: Eric Abrahamsen Date: Thu Dec 28 18:14:47 2017 -0800 Let eieio-persistent-read read what object-write has written * lisp/emacs-lisp/eieio-base.el (eieio-persistent-validate/fix-slot-value): `object-write' may quote lists inside hash tables and vectors, so unquote those lists here. This patch allows the eieio-persistent write/restore process to perform a clean round trip. It only handles a very specific and limited range of object structures, but at least the write and read procedures match. diff --git a/lisp/emacs-lisp/eieio-base.el b/lisp/emacs-lisp/eieio-base.el index af240794e3..5ff8574d9a 100644 --- a/lisp/emacs-lisp/eieio-base.el +++ b/lisp/emacs-lisp/eieio-base.el @@ -360,19 +360,28 @@ Second, any text properties will be stripped from strings." ((hash-table-p proposed-value) (maphash (lambda (key value) - (when (class-p (car-safe value)) - (setf (gethash key proposed-value) - (eieio-persistent-convert-list-to-object - value)))) + (cond ((class-p (car-safe value)) + (setf (gethash key proposed-value) + (eieio-persistent-convert-list-to-object + value))) + ((and (consp value) + (eq (car value) 'quote)) + (setf (gethash key proposed-value) + (cadr value))))) proposed-value) proposed-value) ((vectorp proposed-value) (dotimes (i (length proposed-value)) - (when (class-p (car-safe (aref proposed-value i))) - (aset proposed-value i - (eieio-persistent-convert-list-to-object - (aref proposed-value i))))) + (let ((val (aref proposed-value i))) + (cond ((class-p (car-safe val)) + (aset proposed-value i + (eieio-persistent-convert-list-to-object + (aref proposed-value i)))) + ((and (consp val) + (eq (car val) 'quote)) + (aset proposed-value i + (cadr val)))))) proposed-value) ((stringp proposed-value) commit 40ad1ff327616721ce060ea774631b54e3ba26ca Author: Eric Abrahamsen Date: Tue Dec 19 14:56:13 2017 -0800 Handle possible classtype values in eieio-persistent-read * lisp/emacs-lisp/eieio-base.el (eieio-persistent-validate/fix-slot-value): The function `eieio-persistent-slot-type-is-class-p' could return either a single class, or a list of classes. diff --git a/lisp/emacs-lisp/eieio-base.el b/lisp/emacs-lisp/eieio-base.el index f0fed17b7d..af240794e3 100644 --- a/lisp/emacs-lisp/eieio-base.el +++ b/lisp/emacs-lisp/eieio-base.el @@ -349,7 +349,7 @@ Second, any text properties will be stripped from strings." (seq-some (lambda (elt) (child-of-class-p (car proposed-value) elt)) - classtype)) + (if (listp classtype) classtype (list classtype)))) (eieio-persistent-convert-list-to-object proposed-value)) (t commit 4ec935dc5bc5d6e6ad5c9eb8027412b333b4b9ea Author: Pierre Téchoueyres Date: Fri Dec 15 21:42:21 2017 +0100 Add new tests for eieio persistence * test/lisp/emacs-lisp/eieio-tests/eieio-test-persist.el: (hash-equal): New comparison test for hash-tables. (persist-test-save-and-compare): Use test for hash-tables. (eieio-test-persist-hash-and-vector, eieio-test-persist-interior-lists): New tests. diff --git a/test/lisp/emacs-lisp/eieio-tests/eieio-test-persist.el b/test/lisp/emacs-lisp/eieio-tests/eieio-test-persist.el index a3ab383489..ff4aaf7aeb 100644 --- a/test/lisp/emacs-lisp/eieio-tests/eieio-test-persist.el +++ b/test/lisp/emacs-lisp/eieio-tests/eieio-test-persist.el @@ -1,4 +1,4 @@ -;;; eieio-persist.el --- Tests for eieio-persistent class +;;; eieio-test-persist.el --- Tests for eieio-persistent class ;; Copyright (C) 2011-2018 Free Software Foundation, Inc. @@ -40,6 +40,17 @@ This is usually a symbol that starts with `:'." (car tuple) nil))) +(defun hash-equal (hash1 hash2) + "Compare two hash tables to see whether they are equal." + (and (= (hash-table-count hash1) + (hash-table-count hash2)) + (catch 'flag + (maphash (lambda (x y) + (or (equal (gethash x hash2) y) + (throw 'flag nil))) + hash1) + (throw 'flag t)))) + (defun persist-test-save-and-compare (original) "Compare the object ORIGINAL against the one read fromdisk." @@ -49,8 +60,8 @@ This is usually a symbol that starts with `:'." (class (eieio-object-class original)) (fromdisk (eieio-persistent-read file class)) (cv (cl--find-class class)) - (slots (eieio--class-slots cv)) - ) + (slots (eieio--class-slots cv))) + (unless (object-of-class-p fromdisk class) (error "Persistent class %S != original class %S" (eieio-object-class fromdisk) @@ -62,18 +73,24 @@ This is usually a symbol that starts with `:'." (origvalue (eieio-oref original oneslot)) (fromdiskvalue (eieio-oref fromdisk oneslot)) (initarg-p (eieio--attribute-to-initarg - (cl--find-class class) oneslot)) - ) + (cl--find-class class) oneslot))) (if initarg-p - (unless (equal origvalue fromdiskvalue) + (unless + (cond ((and (hash-table-p origvalue) (hash-table-p fromdiskvalue)) + (hash-equal origvalue fromdiskvalue)) + (t (equal origvalue fromdiskvalue))) (error "Slot %S Original Val %S != Persistent Val %S" oneslot origvalue fromdiskvalue)) ;; Else !initarg-p - (unless (equal (cl--slot-descriptor-initform slot) fromdiskvalue) + (let ((origval (cl--slot-descriptor-initform slot)) + (diskval fromdiskvalue)) + (unless + (cond ((and (hash-table-p origval) (hash-table-p diskval)) + (hash-equal origval diskval)) + (t (equal origval diskval))) (error "Slot %S Persistent Val %S != Default Value %S" - oneslot fromdiskvalue (cl--slot-descriptor-initform slot)))) - )))) + oneslot diskval origvalue)))))))) ;;; Simple Case ;; @@ -205,13 +222,16 @@ persistent class.") ((slot1 :initarg :slot1 :type (or persistent-random-class null persist-not-persistent)) (slot2 :initarg :slot2 - :type (or persist-not-persistent persist-random-class null)))) + :type (or persist-not-persistent persistent-random-class null)) + (slot3 :initarg :slot3 + :type persistent-random-class))) (ert-deftest eieio-test-multiple-class-slot () (let ((persist (persistent-multiclass-slot "random string" :slot1 (persistent-random-class) :slot2 (persist-not-persistent) + :slot3 (persistent-random-class) :file (concat default-directory "test-ps5.pt")))) (unwind-protect (persist-test-save-and-compare persist) @@ -238,4 +258,77 @@ persistent class.") (persist-test-save-and-compare persist-wols) (delete-file (oref persist-wols file)))) +;;; Tests targeted at popular libraries in the wild. + +;; Objects inside hash tables and vectors (pcache), see bug#29220. +(defclass person () + ((name :type string :initarg :name))) + +(defclass classy (eieio-persistent) + ((teacher + :type person + :initarg :teacher) + (students + :initarg :students :initform (make-hash-table :test 'equal)) + (janitors + :type list + :initarg :janitors) + (random-vector + :type vector + :initarg :random-vector))) + +(ert-deftest eieio-test-persist-hash-and-vector () + (let* ((jane (make-instance 'person :name "Jane")) + (bob (make-instance 'person :name "Bob")) + (hans (make-instance 'person :name "Hans")) + (dierdre (make-instance 'person :name "Dierdre")) + (class (make-instance 'classy + :teacher jane + :janitors (list [tuesday nil] + [friday nil]) + :random-vector [nil] + :file (concat default-directory "classy-" emacs-version ".eieio")))) + (puthash "Bob" bob (slot-value class 'students)) + (aset (slot-value class 'random-vector) 0 + (make-instance 'persistent-random-class)) + (aset (car (slot-value class 'janitor)) 1 hans) + (aset (nth 1 (slot-value class 'janitor)) 1 dierdre) + (unwind-protect + (persist-test-save-and-compare class) + (delete-file (oref class file))))) + +;; Extra quotation of lists inside other objects (Gnus registry), also +;; bug#29220. + +(defclass eieio-container (eieio-persistent) + ((alist + :initarg :alist + :type list) + (vec + :initarg :vec + :type vector) + (htab + :initarg :htab + :type hash-table))) + +(ert-deftest eieio-test-persist-interior-lists () + (let* ((thing (make-instance + 'eieio-container + :vec [nil] + :htab (make-hash-table :test #'equal) + :file (concat default-directory + "container-" emacs-version ".eieio"))) + (john (make-instance 'person :name "John")) + (alexie (make-instance 'person :name "Alexie")) + (alst '(("first" (one two three)) + ("second" (four five six))))) + (setf (nth 2 (cadar alst)) john + (nth 2 (cadadr alst)) alexie) + (setf (slot-value thing 'alist) alst) + (puthash "alst" alst (slot-value thing 'htab)) + (aset (slot-value thing 'vec) 0 alst) + (unwind-protect + (persist-test-save-and-compare thing) + (delete-file (slot-value thing 'file))))) + ;;; eieio-test-persist.el ends here commit 47917d8f4dbb711435fe46765fd0290e1f4a16b3 Author: Glenn Morris Date: Wed Mar 21 20:47:28 2018 -0400 * lisp/gnus/gnus-cloud.el (gnus-cloud-synced-files): Fix doc & type. diff --git a/lisp/gnus/gnus-cloud.el b/lisp/gnus/gnus-cloud.el index 284fdca494..d5970f3126 100644 --- a/lisp/gnus/gnus-cloud.el +++ b/lisp/gnus/gnus-cloud.el @@ -48,10 +48,14 @@ "~/.authinfo.gpg" "~/.gnus.el" (:directory "~/News" :match ".*.SCORE\\'")) - "List of file regexps that should be kept up-to-date via the cloud." + "List of files that should be kept up-to-date via the cloud. +Each element may be either a string or a property list. +The latter should have a :directory element whose value is a string, +and a :match element whose value is a regular expression to match +against the basename of files in said directory." :group 'gnus-cloud - ;; FIXME this type does not match the default. Nor does the documentation. - :type '(repeat regexp)) + :type '(repeat (choice (string :tag "File") + (plist :tag "Property list")))) (defcustom gnus-cloud-storage-method (if (featurep 'epg) 'epg 'base64-gzip) "Storage method for cloud data, defaults to EPG if that's available." @@ -290,6 +294,8 @@ Use old data if FORCE-OLDER is not nil." (dolist (elem gnus-cloud-synced-files) (cond ((stringp elem) + ;; This seems fragile. String comparison, with no + ;; expand-file-name to resolve ~, etc. (when (equal elem file-name) (setq matched t))) ((consp elem) commit e32f3525ea3aabad0801874b24869b181535c104 Author: Glenn Morris Date: Wed Mar 21 19:38:44 2018 -0400 * lisp/ibuf-ext.el (ibuffer-never-search-content-mode): Fix type. diff --git a/lisp/ibuf-ext.el b/lisp/ibuf-ext.el index 2023165b2a..a3143e5e29 100644 --- a/lisp/ibuf-ext.el +++ b/lisp/ibuf-ext.el @@ -114,7 +114,7 @@ Buffers whose name matches a regexp in this list, are not searched." "A list of major modes ignored by `ibuffer-mark-by-content-regexp'. Buffers whose major mode is in this list, are not searched." :version "26.1" - :type '(repeat regexp) + :type '(repeat (symbol :tag "Major mode")) :require 'ibuf-ext :group 'ibuffer) commit cae9e0fa0358d6323b57a288b5661dc72d36356d Author: Paul Eggert Date: Wed Mar 21 16:08:27 2018 -0700 Port data-tests-popcnt to 32-bit Emacs * test/src/data-tests.el (data-tests-popcnt): Don’t assume Emacs integers can represent 32-bit quantities. Change to a simple and straightforward approach, since runtime performance is not important here. diff --git a/test/src/data-tests.el b/test/src/data-tests.el index 3b88dbca9a..33b00d6c9a 100644 --- a/test/src/data-tests.el +++ b/test/src/data-tests.el @@ -111,9 +111,9 @@ "Calculate the Hamming weight of BYTE." (if (< byte 0) (setq byte (lognot byte))) - (setq byte (- byte (logand (lsh byte -1) #x55555555))) - (setq byte (+ (logand byte #x33333333) (logand (lsh byte -2) #x33333333))) - (lsh (* (logand (+ byte (lsh byte -4)) #x0f0f0f0f) #x01010101) -24)) + (if (zerop byte) + 0 + (+ (logand byte 1) (data-tests-popcnt (lsh byte -1))))) (ert-deftest data-tests-logcount () (should (cl-loop for n in (number-sequence -255 255) commit 3b42c083b658649a300594a5499db73b0a49152f Author: Glenn Morris Date: Wed Mar 21 17:10:41 2018 -0400 * lisp/play/fortune.el (fortune-in-buffer): Revert previous nonsense. diff --git a/lisp/play/fortune.el b/lisp/play/fortune.el index e6c9c227c4..740f436711 100644 --- a/lisp/play/fortune.el +++ b/lisp/play/fortune.el @@ -283,9 +283,8 @@ and choose the directory as the fortune-file." ;;; Display fortune (defun fortune-in-buffer (_interactive &optional file) "Put a fortune cookie in the *fortune* buffer. -Optional argument FILE, when supplied, specifies the file to -choose the fortune from." - (declare (advertised-calling-convention (&optional file) "27.1")) +INTERACTIVE is ignored. Optional argument FILE, when supplied, +specifies the file to choose the fortune from." (let ((fortune-buffer (or (get-buffer fortune-buffer-name) (generate-new-buffer fortune-buffer-name))) (fort-file (expand-file-name commit 5268f3059db7638caa6d387d35e27870fbcb976c Author: Glenn Morris Date: Wed Mar 21 16:58:11 2018 -0400 * doc/lispref/windows.texi (Selecting Windows): Fix a typo. diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi index 75651b99fd..8d8877bdfd 100644 --- a/doc/lispref/windows.texi +++ b/doc/lispref/windows.texi @@ -1772,7 +1772,7 @@ raise the frame or make sure input focus is directed to that frame. @end defun @cindex select window hook -@cindex running a hook when a windows gets selected +@cindex running a hook when a window gets selected For historical reasons, Emacs does not run a separate hook whenever a window gets selected. Applications and internal routines often temporarily select a window to perform a few actions on it. They do commit 61dfc2c283f83f17bd9c757d5b953099d09e8f8c Author: Charles A. Roelli Date: Wed Mar 21 21:16:18 2018 +0100 Provide completion in vc-git-stash-* commands * lisp/vc/vc-git.el (vc-git-stash-read-history) (vc-git-stash-read): New history variable and function. (vc-git-stash-show, vc-git-stash-apply, vc-git-stash-pop): Update their interactive specifications. diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 5456467815..bf1b050342 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -1481,9 +1481,24 @@ This command shares argument histories with \\[rgrep] and \\[grep]." (vc-git--call nil "stash" "save" name) (vc-resynch-buffer root t t)))) +(defvar vc-git-stash-read-history nil + "History for `vc-git-stash-read'.") + +(defun vc-git-stash-read (prompt) + "Read a Git stash. PROMPT is a string to prompt with." + (let ((stash (completing-read + prompt + (split-string + (or (vc-git--run-command-string nil "stash" "list") "") "\n") + nil :require-match nil 'vc-git-stash-read-history))) + (if (string-equal stash "") + (user-error "Not a stash") + (string-match "^stash@{[[:digit:]]+}" stash) + (match-string 0 stash)))) + (defun vc-git-stash-show (name) "Show the contents of stash NAME." - (interactive "sStash name: ") + (interactive (list (vc-git-stash-read "Show stash: "))) (vc-setup-buffer "*vc-git-stash*") (vc-git-command "*vc-git-stash*" 'async nil "stash" "show" "-p" name) (set-buffer "*vc-git-stash*") @@ -1493,13 +1508,13 @@ This command shares argument histories with \\[rgrep] and \\[grep]." (defun vc-git-stash-apply (name) "Apply stash NAME." - (interactive "sApply stash: ") + (interactive (list (vc-git-stash-read "Apply stash: "))) (vc-git-command "*vc-git-stash*" 0 nil "stash" "apply" "-q" name) (vc-resynch-buffer (vc-git-root default-directory) t t)) (defun vc-git-stash-pop (name) "Pop stash NAME." - (interactive "sPop stash: ") + (interactive (list (vc-git-stash-read "Pop stash: "))) (vc-git-command "*vc-git-stash*" 0 nil "stash" "pop" "-q" name) (vc-resynch-buffer (vc-git-root default-directory) t t)) commit 143b485029f8d438001aa6e989954a92c4b2a60b Author: Charles A. Roelli Date: Wed Mar 21 20:52:35 2018 +0100 * doc/lispref/internals.texi (Writing Emacs Primitives): Fix grammar. diff --git a/doc/lispref/internals.texi b/doc/lispref/internals.texi index 8bf9abfc61..6d25eb14df 100644 --- a/doc/lispref/internals.texi +++ b/doc/lispref/internals.texi @@ -843,7 +843,7 @@ defined with @code{DEFVAR_BOOL} are automatically added to the list @code{byte-boolean-vars} used by the byte compiler. @cindex defining customization variables in C - If you want to make a Lisp variables that is defined in C behave + If you want to make a Lisp variable that is defined in C behave like one declared with @code{defcustom}, add an appropriate entry to @file{cus-start.el}. commit e70d0c9e66d7a8609450b2889869d16aeb0363b5 Author: Paul Eggert Date: Wed Mar 21 12:10:11 2018 -0700 Add tests for Bug#30408 * test/src/editfns-tests.el (format-%d-large-float) (format-%x-large-float, format-%o-invalid-float): New tests. diff --git a/test/src/editfns-tests.el b/test/src/editfns-tests.el index 69ea6f5cc8..6e1f730166 100644 --- a/test/src/editfns-tests.el +++ b/test/src/editfns-tests.el @@ -142,6 +142,27 @@ (should (string-equal (format "%#05X" #x10) "0X010")) (should (string-equal (format "%#04x" 0) "0000"))) +;;; Test Bug#30408. +(ert-deftest format-%d-large-float () + (should (string-equal (format "%d" 18446744073709551616.0) + "18446744073709551616")) + (should (string-equal (format "%d" -18446744073709551616.0) + "-18446744073709551616"))) + +;;; Another test for Bug#30408. +;;; Perhaps Emacs will be improved someday to return the correct +;;; answer for positive numbers instead of overflowing; in +;;; that case this test will need to be changed. In the meantime make +;;; sure Emacs is reporting the overflow correctly. +(ert-deftest format-%x-large-float () + (should-error (format "%x" 18446744073709551616.0) + :type 'overflow-error)) + +;;; Another test for Bug#30408. +(ert-deftest format-%o-invalid-float () + (should-error (format "%o" -1e-37) + :type 'overflow-error)) + ;;; Check format-time-string with various TZ settings. ;;; Use only POSIX-compatible TZ values, since the tests should work ;;; even if tzdb is not in use. commit 56487467569713f8cee2285855bdcc26bfe9b517 Author: Glenn Morris Date: Wed Mar 21 14:13:53 2018 -0400 Quieten eieio-test compilation * test/lisp/emacs-lisp/eieio-tests/eieio-test-methodinvoke.el: * test/lisp/emacs-lisp/eieio-tests/eieio-test-persist.el: * test/lisp/emacs-lisp/eieio-tests/eieio-tests.el: Remove obsolete name args where not being explicitly tested. diff --git a/test/lisp/emacs-lisp/eieio-tests/eieio-test-methodinvoke.el b/test/lisp/emacs-lisp/eieio-tests/eieio-test-methodinvoke.el index c6da9e15fa..52014aea01 100644 --- a/test/lisp/emacs-lisp/eieio-tests/eieio-test-methodinvoke.el +++ b/test/lisp/emacs-lisp/eieio-tests/eieio-test-methodinvoke.el @@ -326,7 +326,7 @@ ) (ert-deftest eieio-test-method-order-list-9 () - (should (eitest-Jd "test"))) + (should (eitest-Jd))) ;;; call-next-method with replacement arguments across a simple class hierarchy. ;; @@ -372,7 +372,7 @@ (ert-deftest eieio-test-method-order-list-10 () (let ((eieio-test-call-next-method-arguments nil)) - (CNM-M (CNM-2 "") '(INIT)) + (CNM-M (CNM-2) '(INIT)) (should (equal (eieio-test-arguments-for 'CNM-0) '(CNM-1-1 CNM-2 INIT))) (should (equal (eieio-test-arguments-for 'CNM-1-1) diff --git a/test/lisp/emacs-lisp/eieio-tests/eieio-test-persist.el b/test/lisp/emacs-lisp/eieio-tests/eieio-test-persist.el index a3ab383489..b485972078 100644 --- a/test/lisp/emacs-lisp/eieio-tests/eieio-test-persist.el +++ b/test/lisp/emacs-lisp/eieio-tests/eieio-test-persist.el @@ -90,7 +90,7 @@ This is usually a symbol that starts with `:'." (ert-deftest eieio-test-persist-simple-1 () (let ((persist-simple-1 - (persist-simple "simple 1" :slot1 'goose :slot2 "testing" + (persist-simple :slot1 'goose :slot2 "testing" :file (concat default-directory "test-ps1.pt")))) (should persist-simple-1) @@ -124,7 +124,7 @@ Assume SLOTVALUE is a symbol of some sort." (ert-deftest eieio-test-persist-printer () (let ((persist-:printer-1 - (persist-:printer "persist" :slot1 'goose :slot2 "testing" + (persist-:printer :slot1 'goose :slot2 "testing" :file (concat default-directory "test-ps2.pt")))) (should persist-:printer-1) (persist-test-save-and-compare persist-:printer-1) @@ -161,8 +161,7 @@ persistent class.") (ert-deftest eieio-test-non-persistent-as-slot () (let ((persist-wos (persistent-with-objs-slot - "persist wos 1" - :pnp (persist-not-persistent "pnp 1" :slot1 3) + :pnp (persist-not-persistent :slot1 3) :file (concat default-directory "test-ps3.pt")))) (persist-test-save-and-compare persist-wos) @@ -188,8 +187,7 @@ persistent class.") (ert-deftest eieio-test-non-persistent-as-slot-child () (let ((persist-woss (persistent-with-objs-slot-subs - "persist woss 1" - :pnp (persist-not-persistent-subclass "pnps 1" :slot1 3) + :pnp (persist-not-persistent-subclass :slot1 3) :file (concat default-directory "test-ps4.pt")))) (persist-test-save-and-compare persist-woss) @@ -209,7 +207,7 @@ persistent class.") (ert-deftest eieio-test-multiple-class-slot () (let ((persist - (persistent-multiclass-slot "random string" + (persistent-multiclass-slot :slot1 (persistent-random-class) :slot2 (persist-not-persistent) :file (concat default-directory "test-ps5.pt")))) @@ -229,10 +227,9 @@ persistent class.") (ert-deftest eieio-test-slot-with-list-of-objects () (let ((persist-wols (persistent-with-objs-list-slot - "persist wols 1" - :pnp (list (persist-not-persistent "pnp 1" :slot1 3) - (persist-not-persistent "pnp 2" :slot1 4) - (persist-not-persistent "pnp 3" :slot1 5)) + :pnp (list (persist-not-persistent :slot1 3) + (persist-not-persistent :slot1 4) + (persist-not-persistent :slot1 5)) :file (concat default-directory "test-ps5.pt")))) (persist-test-save-and-compare persist-wols) diff --git a/test/lisp/emacs-lisp/eieio-tests/eieio-tests.el b/test/lisp/emacs-lisp/eieio-tests/eieio-tests.el index 5ba094c007..74c76609b8 100644 --- a/test/lisp/emacs-lisp/eieio-tests/eieio-tests.el +++ b/test/lisp/emacs-lisp/eieio-tests/eieio-tests.el @@ -689,7 +689,7 @@ Do not override for `prot-2'." (defvar eitest-II2 nil) (defvar eitest-II3 nil) (ert-deftest eieio-test-29-instance-inheritor () - (setq eitest-II1 (II "II Test.")) + (setq eitest-II1 (II)) (oset eitest-II1 slot2 'cat) (setq eitest-II2 (clone eitest-II1 "eitest-II2 Test.")) (oset eitest-II2 slot1 'moose) commit 319fbc9fce85d1d61f00612ec26b517d1737e6c7 Author: Glenn Morris Date: Wed Mar 21 14:12:42 2018 -0400 ; * autogen.sh: Comment. diff --git a/autogen.sh b/autogen.sh index 518e5dbe83..2d52f9ea55 100755 --- a/autogen.sh +++ b/autogen.sh @@ -82,9 +82,11 @@ check_version () printf '%s' "(using $uprog0=$uprog) " fi - ## /bin/sh should always define the "command" builtin, but for - ## some odd reason sometimes it does not on hydra.nixos.org. - ## /bin/sh = "BusyBox v1.27.2", "built-in shell (ash)". ? + ## /bin/sh should always define the "command" builtin, but + ## sometimes it does not on hydra.nixos.org. + ## /bin/sh = "BusyBox v1.27.2", "built-in shell (ash)". + ## It seems to be an optional compile-time feature in that shell: + ## see ASH_CMDCMD in . if command -v command > /dev/null 2>&1; then command -v $uprog > /dev/null || return 1 else commit e0080b854df655ecd224f2ed27b83c63e2ca50a1 Author: Glenn Morris Date: Wed Mar 21 14:12:17 2018 -0400 * lisp/play/fortune.el (fortune-in-buffer): Unadvertise no-op arg. diff --git a/lisp/play/fortune.el b/lisp/play/fortune.el index 740f436711..e6c9c227c4 100644 --- a/lisp/play/fortune.el +++ b/lisp/play/fortune.el @@ -283,8 +283,9 @@ and choose the directory as the fortune-file." ;;; Display fortune (defun fortune-in-buffer (_interactive &optional file) "Put a fortune cookie in the *fortune* buffer. -INTERACTIVE is ignored. Optional argument FILE, when supplied, -specifies the file to choose the fortune from." +Optional argument FILE, when supplied, specifies the file to +choose the fortune from." + (declare (advertised-calling-convention (&optional file) "27.1")) (let ((fortune-buffer (or (get-buffer fortune-buffer-name) (generate-new-buffer fortune-buffer-name))) (fort-file (expand-file-name commit 03a27fab69e48f350679de8ef76c4b803d882e91 Author: Glenn Morris Date: Wed Mar 21 14:10:05 2018 -0400 * lisp/play/fortune.el (fortune-message): Avoid trailing newline. (Bug#30887) diff --git a/lisp/play/fortune.el b/lisp/play/fortune.el index 74ace06c01..740f436711 100644 --- a/lisp/play/fortune.el +++ b/lisp/play/fortune.el @@ -313,6 +313,8 @@ Optional FILE is a fortune file from which a cookie will be selected." (with-temp-buffer (let ((fortune-buffer-name (current-buffer))) (fortune-in-buffer t file) + ;; Avoid trailing newline. + (if (bolp) (delete-char -1)) (message "%s" (buffer-string))))) ;;;###autoload commit 4ab455147069d4b7247ba3aff0da3dba3a671df6 Author: Alan Mackenzie Date: Wed Mar 21 17:36:34 2018 +0000 Firm up documentation of generalized variables * doc/lispref/variables.texi (Generalized Variables) (Setting Generalized Variables): Define a generalized variable as something setf can write to. Remove the insinuation that hackers have poor memories. State explicitly that the list of GVs given is complete. Remove the suggestion that `setf' has superseded, or is in the process of superseding, `setq'. Make minor corrections to the English. diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi index aecee6f305..b80bc88a58 100644 --- a/doc/lispref/variables.texi +++ b/doc/lispref/variables.texi @@ -2317,11 +2317,12 @@ Attempting to assign them any other value will result in an error: @cindex generalized variable @cindex place form -A @dfn{generalized variable} or @dfn{place form} is one of the many places -in Lisp memory where values can be stored. The simplest place form is -a regular Lisp variable. But the @sc{car}s and @sc{cdr}s of lists, elements -of arrays, properties of symbols, and many other locations are also -places where Lisp values are stored. +A @dfn{generalized variable} or @dfn{place form} is one of the many +places in Lisp memory where values can be stored using the @code{setf} +macro (@pxref{Setting Generalized Variables}). The simplest place +form is a regular Lisp variable. But the @sc{car}s and @sc{cdr}s of +lists, elements of arrays, properties of symbols, and many other +locations are also places where Lisp values get stored. Generalized variables are analogous to lvalues in the C language, where @samp{x = a[i]} gets an element from an array @@ -2342,8 +2343,8 @@ variables. The @code{setf} form is like @code{setq}, except that it accepts arbitrary place forms on the left side rather than just symbols. For example, @code{(setf (car a) b)} sets the car of @code{a} to @code{b}, doing the same operation as @code{(setcar a b)}, -but without having to remember two separate functions for setting and -accessing every type of place. +but without you having to use two separate functions for setting and +accessing this type of place. @defmac setf [place form]@dots{} This macro evaluates @var{form} and stores it in @var{place}, which @@ -2353,18 +2354,19 @@ just as with @code{setq}. @code{setf} returns the value of the last @var{form}. @end defmac -The following Lisp forms will work as generalized variables, and -so may appear in the @var{place} argument of @code{setf}: +The following Lisp forms are the forms in Emacs that will work as +generalized variables, and so may appear in the @var{place} argument +of @code{setf}: @itemize @item -A symbol naming a variable. In other words, @code{(setf x y)} is -exactly equivalent to @code{(setq x y)}, and @code{setq} itself is -strictly speaking redundant given that @code{setf} exists. Many -programmers continue to prefer @code{setq} for setting simple -variables, though, purely for stylistic or historical reasons. -The macro @code{(setf x y)} actually expands to @code{(setq x y)}, -so there is no performance penalty for using it in compiled code. +A symbol. In other words, @code{(setf x y)} is exactly equivalent to +@code{(setq x y)}, and @code{setq} itself is strictly speaking +redundant given that @code{setf} exists. Most programmers will +continue to prefer @code{setq} for setting simple variables, though, +for stylistic and historical reasons. The macro @code{(setf x y)} +actually expands to @code{(setq x y)}, so there is no performance +penalty for using it in compiled code. @item A call to any of the following standard Lisp functions: commit a5bf09900836dd6199c7630b88f8fdf9f2d89d7f Author: Eli Zaretskii Date: Wed Mar 21 18:57:41 2018 +0200 Improve documentation of Auto-Revert mode * doc/emacs/files.texi (Reverting): Mention that Aut-Revert applies to Dired buffers as well. Suggested by Michael Albinus in emacs-manual-bugs@gnu.org. diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi index f1a7a65a80..1ced7ca07c 100644 --- a/doc/emacs/files.texi +++ b/doc/emacs/files.texi @@ -988,6 +988,9 @@ Auto-Revert Tail mode works also for remote files. When a buffer is auto-reverted, a message is generated. This can be suppressed by setting @code{auto-revert-verbose} to @code{nil}. + In Dired buffers (@pxref{Dired}), Auto-Revert mode refreshes the +buffer when a file is created or deleted in the buffer's directory. + @xref{VC Undo}, for commands to revert to earlier versions of files under version control. @xref{VC Mode Line}, for Auto Revert peculiarities when visiting files under version control. commit ed05eaa9487b2c5a76a512532239a106e1cf9a2a Author: Eli Zaretskii Date: Wed Mar 21 18:49:29 2018 +0200 Improvements in dired.texi * doc/emacs/dired.texi (Dired): Mention that Dired works with remote directories. (Dired Enter): ls-lisp is used on some remote systems as well. (Dired Navigation): Mention and index the command names. (Dired Deletion): Document the 'always' value of dired-recursive-deletes. Mention the alternative deletion method. (Marks vs Flags): Fix spelling of Auto-Revert mode. Document what marking does on a subdirectory header line. (Operating on Files): Document that 'Z' uses gzip or compress. (Comparison in Dired): Mention ediff-files. (Misc Dired Features): Fix a typo. Suggested by Michael Albinus in emacs-manual-bugs@gnu.org. diff --git a/doc/emacs/dired.texi b/doc/emacs/dired.texi index 309dfb3208..82882ab1b1 100644 --- a/doc/emacs/dired.texi +++ b/doc/emacs/dired.texi @@ -12,7 +12,8 @@ Dired makes an Emacs buffer containing a listing of a directory, and 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. +commands to operate on the listed files. Dired works with both local +and remote directories. The Dired buffer is normally read-only, and inserting text in it is not allowed (however, the Wdired mode allows that, @pxref{Wdired}). @@ -109,8 +110,9 @@ default) means to perform the check; any other non-@code{nil} value means to use the @samp{--dired} option; and @code{nil} means not to use the @samp{--dired} option. - On MS-Windows and MS-DOS systems, Emacs emulates @command{ls}. -@xref{ls in Lisp}, for options and peculiarities of this emulation. + On MS-Windows and MS-DOS systems, and also on some remote systems, +Emacs emulates @command{ls}. @xref{ls in Lisp}, for options and +peculiarities of this emulation. @findex dired-other-window @kindex C-x 4 d @@ -131,10 +133,13 @@ deletes its window if the window was created just for that buffer. @kindex C-n @r{(Dired)} @kindex C-p @r{(Dired)} +@findex dired-next-line +@findex dired-previous-line All the usual Emacs cursor motion commands are available in Dired -buffers. The keys @kbd{C-n} and @kbd{C-p} are redefined to put the -cursor at the beginning of the file name on the line, rather than at -the beginning of the line. +buffers. The keys @kbd{C-n} and @kbd{C-p} are redefined to run +@code{dired-next-line} and @code{dired-previous-line}, respectively, +and they put the cursor at the beginning of the file name on the line, +rather than at the beginning of the line. @kindex SPC @r{(Dired)} For extra convenience, @key{SPC} and @kbd{n} in Dired are equivalent @@ -235,10 +240,11 @@ the buffer, and no files actually deleted. You can delete empty directories just like other files, but normally Dired cannot delete directories that are nonempty. If the variable @code{dired-recursive-deletes} is non-@code{nil}, then Dired can -delete nonempty directories including all their contents. That can -be somewhat risky. -Even if you have set @code{dired-recursive-deletes} to @code{nil}, -you might want sometimes to delete recursively directories +delete nonempty directories including all their contents. That can be +somewhat risky. If the value of the variable is @code{always}, Dired +will delete nonempty directories recursively, which is even more +risky. Even if you have set @code{dired-recursive-deletes} to +@code{nil}, you might want sometimes to delete recursively directories without being asked for confirmation for all of them. This is handy when you have marked many directories for deletion and you are very sure that all of them can safely be deleted. For every nonempty @@ -252,6 +258,9 @@ questions. directories into the operating system's Trash, instead of deleting them outright. @xref{Misc File Ops}. + An alternative way of deleting files is to mark them with @kbd{m} +and delete with @kbd{D}, see @ref{Operating on Files}. + @node Flagging Many Files @section Flagging Many Files at Once @cindex flagging many files for deletion (in Dired) @@ -420,7 +429,9 @@ Mark the current file with @samp{*} (@code{dired-mark}). If the region is active, mark all files in the region instead; otherwise, if a numeric argument @var{n} is supplied, mark the next @var{n} files instead, starting with the current file (if @var{n} is negative, mark -the previous @minus{}@var{n} files). +the previous @minus{}@var{n} files). If invoked on a subdirectory +header line (@pxref{Subdirectories in Dired}), this command marks all +the files in that subdirectory. @item * * @kindex * * @r{(Dired)} @@ -578,10 +589,10 @@ command will look in the buffer without revisiting the file, so the results might be inconsistent with the file on disk if its contents have changed since it was last visited. If you don't want this, you may wish to revert the files you have visited in your buffers, or to turn on -@code{auto-revert} mode in those buffers, before invoking this -command. @xref{Reverting}. If you prefer that this command should always +Auto-Revert mode in those buffers, before invoking this command. +@xref{Reverting}. If you prefer that this command should always revisit the file, without you having to revert the file or enable -@code{auto-revert} mode, you might want to set +Auto-Revert mode, you might want to set @code{dired-always-read-filesystem} to non-@code{nil}. @item C-/ @@ -755,7 +766,9 @@ suitable guess made using the variables @code{lpr-command} and @item Z Compress the specified files (@code{dired-do-compress}). If the file appears to be a compressed file already, uncompress it instead. Each -marked file is compressed into its own archive. +marked file is compressed into its own archive. This uses the +@command{gzip} program if it is available, otherwise it uses +@command{compress}. @findex dired-do-compress-to @kindex c @r{(Dired)} @@ -1037,6 +1050,9 @@ minibuffer is the file at the mark (i.e., the ordinary Emacs mark, not a Dired mark; @pxref{Setting Mark}). Otherwise, if the file at point has a backup file (@pxref{Backup}), that is the default. + You could also compare files using @code{ediff-files}, see +@ref{Major Entry Points,,, ediff, Ediff User's Manual}. + @node Subdirectories in Dired @section Subdirectories in Dired @cindex subdirectories in Dired @@ -1465,7 +1481,7 @@ space. each marked file. With just @kbd{C-u} as the prefix argument, it uses file names relative to the Dired buffer's default directory. (This can still contain slashes if in a subdirectory.) As a special case, -if point is on a directory headerline, @kbd{w} gives you the absolute +if point is on a directory header line, @kbd{w} gives you the absolute name of that directory. Any prefix argument or marked files are ignored in this case. commit f8cad16bb3272a8069b3008019f9d18516aef1a5 Author: Noam Postavsky Date: Tue Mar 20 19:18:33 2018 -0400 Revert "Support all perl variable declarators and prefixes" It highlights normal variable names in perl programs (Bug#30812). * lisp/progmodes/perl-mode.el (perl-imenu-generic-expression) (perl-font-lock-keywords-2): Restore values prior to Bug#27613 fix. Don't merge to master, we will fix Bug#27613 properly there (it's too close to release to do that on emacs-26). diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el index 99480788f5..c9bfb1acdf 100644 --- a/lisp/progmodes/perl-mode.el +++ b/lisp/progmodes/perl-mode.el @@ -135,7 +135,7 @@ '(;; Functions (nil "^[ \t]*sub\\s-+\\([-[:alnum:]+_:]+\\)" 1) ;;Variables - ("Variables" "^[ \t]*\\(?:anon\\|argument\\|has\\|local\\|my\\|our\\|state\\|supersede\\)\\s-+\\([$@%][-[:alnum:]+_:]+\\)\\s-*=" 1) + ("Variables" "^\\(?:my\\|our\\)\\s-+\\([$@%][-[:alnum:]+_:]+\\)\\s-*=" 1) ("Packages" "^[ \t]*package\\s-+\\([-[:alnum:]+_:]+\\);" 1) ("Doc sections" "^=head[0-9][ \t]+\\(.*\\)" 1)) "Imenu generic expression for Perl mode. See `imenu-generic-expression'.") @@ -179,9 +179,8 @@ "BEGIN" "END" "return" "exec" "eval") t) "\\>") ;; - ;; Fontify declarators and prefixes as types. - ("\\<\\(anon\\|argument\\|has\\|local\\|my\\|our\\|state\\|supersede\\)\\>" . font-lock-type-face) ; declarators - ("\\<\\(let\\|temp\\)\\>" . font-lock-type-face) ; prefixes + ;; Fontify local and my keywords as types. + ("\\<\\(local\\|my\\)\\>" . font-lock-type-face) ;; ;; Fontify function, variable and file name references. ("&\\(\\sw+\\(::\\sw+\\)*\\)" 1 font-lock-function-name-face) commit d09c488cb5f4cdf8d47b1e69f5fc7ac0750d7cbe Author: Paul Eggert Date: Tue Mar 20 09:54:20 2018 -0700 Port to 32-bit sparc64 Backport from master. Problem reported by Ulrich Mueller; fix suggested by Eli Zaretskii and Andreas Schwab (Bug#30855). * src/alloc.c (mark_memory): Call mark_maybe_object only on pointers that are properly aligned for Lisp_Object. diff --git a/src/alloc.c b/src/alloc.c index 9d0e2d37e3..c3f7920ed8 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -4983,7 +4983,11 @@ mark_memory (void *start, void *end) for (pp = start; (void *) pp < end; pp += GC_POINTER_ALIGNMENT) { mark_maybe_pointer (*(void **) pp); - mark_maybe_object (*(Lisp_Object *) pp); + + verify (alignof (Lisp_Object) % GC_POINTER_ALIGNMENT == 0); + if (alignof (Lisp_Object) == GC_POINTER_ALIGNMENT + || (uintptr_t) pp % alignof (Lisp_Object) == 0) + mark_maybe_object (*(Lisp_Object *) pp); } } commit 20db48089b660a27c04d05b3d3931d5af65e404f Author: Glenn Morris Date: Tue Mar 20 17:15:39 2018 -0400 * lisp/isearch.el (isearch-pre-command-hook): Replace cl-lib function. As a preloaded file, isearch.el cannot require cl-lib at runtime. diff --git a/lisp/isearch.el b/lisp/isearch.el index 84b121af9e..aa6acfd0c8 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -2441,7 +2441,7 @@ See more for options in `search-exit-option'." (setq isearch-pre-move-point (point))) ;; Append control characters to the search string ((eq search-exit-option 'append) - (when (cl-every #'characterp key) + (unless (memq nil (mapcar (lambda (k) (characterp k)) key)) (isearch-process-search-string key key)) (setq this-command 'ignore)) ;; Other characters terminate the search and are then executed normally. commit 16559146f9db1b36d5e8b6c92edb5bb36fafdb85 Author: Alan Mackenzie Date: Tue Mar 20 18:40:52 2018 +0000 * cc-engine.el (c-looking-at-or-maybe-in-bracelist): Remove pessimization diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index c5b07b3702..2290c9cbdd 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -10538,13 +10538,6 @@ comment at the start of cc-engine.el for more info." (looking-at c-return-key)) (setq braceassignp t) nil) - ((and c-has-compound-literals - (eq (char-after) ?,)) - (save-excursion - (when (and (c-go-up-list-backward nil lim) - (eq (char-after) ?\()) - (setq braceassignp t) - nil))) ((eq (char-after) ?=) ;; We've seen a =, but must check earlier tokens so ;; that it isn't something that should be ignored. commit 2a1fe08307402d6217d073f8ab7737750d253dd4 Author: Eli Zaretskii Date: Tue Mar 20 19:05:21 2018 +0200 Avoid redisplay problems with too wide wrap-prefix * src/xdisp.c (display_line): Avoid looping in redisplay when wrap-prefix is set to a too-wide stretch of whitespace. (Bug#30432) diff --git a/src/xdisp.c b/src/xdisp.c index 4778f532cd..df5335e4ac 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -21969,9 +21969,24 @@ display_line (struct it *it, int cursor_vpos) break; } + /* Detect overly-wide wrap-prefixes made of (space ...) display + properties. When such a wrap prefix reaches past the right + margin of the window, we need to avoid the call to + set_iterator_to_next below, so that it->line_wrap is left at + its TRUNCATE value wisely set by handle_line_prefix. + Otherwise, set_iterator_to_next will pop the iterator stack, + restore it->line_wrap, and redisplay might infloop. */ + bool overwide_wrap_prefix = + CONSP (it->object) && EQ (XCAR (it->object), Qspace) + && it->sp > 0 && it->method == GET_FROM_STRETCH + && it->current_x >= it->last_visible_x + && it->continuation_lines_width > 0 + && it->line_wrap == TRUNCATE && it->stack[0].line_wrap != TRUNCATE; + /* Proceed with next display element. Note that this skips over lines invisible because of selective display. */ - set_iterator_to_next (it, true); + if (!overwide_wrap_prefix) + set_iterator_to_next (it, true); /* If we truncate lines, we are done when the last displayed glyphs reach past the right margin of the window. */ commit db64a866f6971c5d63565253c0c8d8db15d4a4dc Author: Paul Eggert Date: Tue Mar 20 09:54:20 2018 -0700 Port to 32-bit sparc64 Problem reported by Ulrich Mueller; fix suggested by Eli Zaretskii and Andreas Schwab (Bug#30855). * src/alloc.c (mark_memory): Call mark_maybe_object only on pointers that are properly aligned for Lisp_Object. diff --git a/src/alloc.c b/src/alloc.c index f97b99c0f3..da01173fba 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -4981,7 +4981,11 @@ mark_memory (void *start, void *end) for (pp = start; (void *) pp < end; pp += GC_POINTER_ALIGNMENT) { mark_maybe_pointer (*(void **) pp); - mark_maybe_object (*(Lisp_Object *) pp); + + verify (alignof (Lisp_Object) % GC_POINTER_ALIGNMENT == 0); + if (alignof (Lisp_Object) == GC_POINTER_ALIGNMENT + || (uintptr_t) pp % alignof (Lisp_Object) == 0) + mark_maybe_object (*(Lisp_Object *) pp); } } commit 7ce25de888f285502898da13e689e4372fc6a49d Author: Paul Eggert Date: Tue Mar 20 09:26:09 2018 -0700 Autoupdate from Gnulib diff --git a/build-aux/install-sh b/build-aux/install-sh index 5f3d36cb76..8175c640fe 100755 --- a/build-aux/install-sh +++ b/build-aux/install-sh @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2018-03-07.03; # UTC +scriptversion=2018-03-11.20; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -332,34 +332,43 @@ do # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) + # Note that $RANDOM variable is not portable (e.g. dash); Use it + # here however when possible just to lower collision chance. tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ - trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 + trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0 + + # Because "mkdir -p" follows existing symlinks and we likely work + # directly in world-writeable /tmp, make sure that the '$tmpdir' + # directory is successfully created first before we actually test + # 'mkdir -p' feature. if (umask $mkdir_umask && - exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 + $mkdirprog $mkdir_mode "$tmpdir" && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. - ls_ld_tmpdir=`ls -ld "$tmpdir"` + test_tmpdir="$tmpdir/a" + ls_ld_tmpdir=`ls -ld "$test_tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && - $mkdirprog -m$different_mode -p -- "$tmpdir" && { - ls_ld_tmpdir_1=`ls -ld "$tmpdir"` + $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi - rmdir "$tmpdir/d" "$tmpdir" + rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. - rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null + rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null fi trap '' 0;; esac;; diff --git a/doc/misc/texinfo.tex b/doc/misc/texinfo.tex index ac5c1d922e..aa4f256437 100644 --- a/doc/misc/texinfo.tex +++ b/doc/misc/texinfo.tex @@ -3,7 +3,7 @@ % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % -\def\texinfoversion{2018-02-12.17} +\def\texinfoversion{2018-03-10.14} % % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, @@ -182,7 +182,7 @@ % Hyphenation fixes. \hyphenation{ Flor-i-da Ghost-script Ghost-view Mac-OS Post-Script - auto-ma-ti-cal-ly ap-pen-dix bit-map bit-maps + ap-pen-dix bit-map bit-maps data-base data-bases eshell fall-ing half-way long-est man-u-script man-u-scripts mini-buf-fer mini-buf-fers over-view par-a-digm par-a-digms rath-er rec-tan-gu-lar ro-bot-ics se-vere-ly set-up spa-ces @@ -11715,7 +11715,7 @@ @markupsetuprqdefault @c Local variables: -@c eval: (add-hook 'write-file-hooks 'time-stamp) +@c eval: (add-hook 'before-save-hook 'time-stamp) @c page-delimiter: "^\\\\message\\|emacs-page" @c time-stamp-start: "def\\\\texinfoversion{" @c time-stamp-format: "%:y-%02m-%02d.%02H" diff --git a/m4/getloadavg.m4 b/m4/getloadavg.m4 index 7b6a09a5c5..d3a8910ecf 100644 --- a/m4/getloadavg.m4 +++ b/m4/getloadavg.m4 @@ -7,7 +7,7 @@ # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -#serial 7 +#serial 8 # Autoconf defines AC_FUNC_GETLOADAVG, but that is obsolescent. # New applications should use gl_GETLOADAVG instead. @@ -22,7 +22,7 @@ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) gl_save_LIBS=$LIBS -# getloadvg is present in libc on glibc >= 2.2, Mac OS X, FreeBSD >= 2.0, +# getloadavg is present in libc on glibc >= 2.2, Mac OS X, FreeBSD >= 2.0, # NetBSD >= 0.9, OpenBSD >= 2.0, Solaris >= 7. HAVE_GETLOADAVG=1 AC_CHECK_FUNC([getloadavg], [], commit a5f190dd658419e9328a846a1044b8294a7632d9 Merge: 97608c60b8 23527013c7 Author: Paul Eggert Date: Tue Mar 20 08:59:39 2018 -0700 Merge from origin/emacs-26 23527013c7 ; Rewrap doc string 4328d5f744 Correct Info link markup 2fb52abd9e Improve documentation of 'with-help-window' ec08c62f03 Minor improvements in building.texi 663aafe1ff * lisp/textmodes/bibtex.el (bibtex-mark-entry): activate mark 05781b2e88 ; Spelling fix aa40014ba3 * doc/emacs/building.texi (Starting GUD): Mention 'guiler'. 23072e468f Yet more proofreading of the Emacs manual ba5a372540 * doc/emacs/rmail.texi: Fix broken link. 6b2210cc29 ; Spelling fix 067c8c4f5b Fix recently-added POP doc glitch fb3dc0e8aa More proofreading of the Emacs manual a776ce7be6 Fix typo in the Emacs manual's VC chapter 7f27d42f0b Pass json-readtable-error data as a list (bug#30489) 10bd3b3af8 Improve word motion docs (Bug#30815) 2b8507fbdc Replace "carriage-return" by "carriage return" in manuals 2616cd94f1 Minor copyedits in mule.texi 36a1d52814 Fix problems caused by fontconfig-2.13.0 commit 23527013c79607ba19536ccce85725a91b0033a5 Author: Paul Eggert Date: Tue Mar 20 08:57:40 2018 -0700 ; Rewrap doc string diff --git a/src/minibuf.c b/src/minibuf.c index c57182354f..691fad07b7 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -1640,12 +1640,12 @@ PREDICATE limits completion to a subset of COLLECTION. See `try-completion', `all-completions', `test-completion', and `completion-boundaries', for more details on completion, COLLECTION, and PREDICATE. See also Info node `(elisp)Basic Completion' -for the details about completion, and Info node `(elisp)Programmed Completion' for -expectations from COLLECTION when it's a function. +for the details about completion, and Info node `(elisp)Programmed +Completion' for expectations from COLLECTION when it's a function. REQUIRE-MATCH can take the following values: -- t means that the user is not allowed to exit unless - the input is (or completes to) an element of COLLECTION or is null. +- t means that the user is not allowed to exit unless the input is (or + completes to) an element of COLLECTION or is null. - nil means that the user can exit with any input. - `confirm' means that the user can exit with any input, but she needs to confirm her choice if the input is not an element of COLLECTION. @@ -1656,19 +1656,19 @@ REQUIRE-MATCH can take the following values: - anything else behaves like t except that typing RET does not exit if it does non-null completion. -If the input is null, `completing-read' returns DEF, or the first element -of the list of default values, or an empty string if DEF is nil, -regardless of the value of REQUIRE-MATCH. +If the input is null, `completing-read' returns DEF, or the first +element of the list of default values, or an empty string if DEF is +nil, regardless of the value of REQUIRE-MATCH. If INITIAL-INPUT is non-nil, insert it in the minibuffer initially, - with point positioned at the end. - If it is (STRING . POSITION), the initial input is STRING, but point - is placed at _zero-indexed_ position POSITION in STRING. (*Note* - that this is different from `read-from-minibuffer' and related - functions, which use one-indexing for POSITION.) This feature is - deprecated--it is best to pass nil for INITIAL-INPUT and supply the - default value DEF instead. The user can yank the default value into - the minibuffer easily using \\\\[next-history-element]. + with point positioned at the end. If it is (STRING . POSITION), the + initial input is STRING, but point is placed at _zero-indexed_ + position POSITION in STRING. (*Note* that this is different from + `read-from-minibuffer' and related functions, which use one-indexing + for POSITION.) This feature is deprecated--it is best to pass nil + for INITIAL-INPUT and supply the default value DEF instead. The + user can yank the default value into the minibuffer easily using + \\\\[next-history-element]. HIST, if non-nil, specifies a history list and optionally the initial position in the list. It can be a symbol, which is the history list @@ -1676,16 +1676,16 @@ HIST, if non-nil, specifies a history list and optionally the initial that case, HISTVAR is the history list variable to use, and HISTPOS is the initial position (the position in the list used by the minibuffer history commands). For consistency, you should also - specify that element of the history as the value of - INITIAL-INPUT. (This is the only case in which you should use - INITIAL-INPUT instead of DEF.) Positions are counted starting from - 1 at the beginning of the list. The variable `history-length' - controls the maximum length of a history list. + specify that element of the history as the value of INITIAL-INPUT. + (This is the only case in which you should use INITIAL-INPUT instead + of DEF.) Positions are counted starting from 1 at the beginning of + the list. The variable `history-length' controls the maximum length + of a history list. DEF, if non-nil, is the default value or the list of default values. -If INHERIT-INPUT-METHOD is non-nil, the minibuffer inherits - the current input method and the setting of `enable-multibyte-characters'. +If INHERIT-INPUT-METHOD is non-nil, the minibuffer inherits the + current input method and the setting of `enable-multibyte-characters'. Completion ignores case if the ambient value of `completion-ignore-case' is non-nil. commit 97608c60b8e0d01d59d51e32a9fdbd2bb3e2da58 Author: Michael Albinus Date: Tue Mar 20 16:33:51 2018 +0100 Extend Tramp's UTF8 tests * test/lisp/net/tramp-tests.el (tramp--test-utf8): Apply more exhaustive tests. diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index e8d3503977..519c98a89f 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el @@ -4628,12 +4628,28 @@ Use the `ls' command." (coding-system-for-write utf8) (file-name-coding-system (coding-system-change-eol-conversion utf8 'unix))) - (tramp--test-check-files - (unless (tramp--test-hpux-p) "Γυρίστε το Γαλαξία με Ώτο Στοπ") - (unless (tramp--test-hpux-p) - "أصبح بوسعك الآن تنزيل نسخة كاملة من موسوعة ويكيبيديا العربية لتصفحها بلا اتصال بالإنترنت") - "银河系漫游指南系列" - "Автостопом по гала́ктике"))) + (apply + 'tramp--test-check-files + (if (tramp--test-expensive-test) + (delete-dups + (mapcar + ;; Use all available language specific snippets. Filter + ;; out strings which use unencodable characters. Remove + ;; slash or newline. Not Tramp's business. + (lambda (x) + (setq x (eval (cdr (assoc 'sample-text x)))) + (unless (or (null x) + (unencodable-char-position + nil nil file-name-coding-system nil x)) + (replace-regexp-in-string "[\n/]" "" x))) + language-info-alist)) + + (list + (unless (tramp--test-hpux-p) "Γυρίστε το Γαλαξία με Ώτο Στοπ") + (unless (tramp--test-hpux-p) + "أصبح بوسعك الآن تنزيل نسخة كاملة من موسوعة ويكيبيديا العربية لتصفحها بلا اتصال بالإنترنت") + "银河系漫游指南系列" + "Автостопом по гала́ктике"))))) (ert-deftest tramp-test39-utf8 () "Check UTF8 encoding in file names and file contents." commit d13a0dd273dc5f6221419267b0f5accc5f257802 Author: Aaron Jensen Date: Wed Mar 14 08:09:50 2018 -0700 Better support for 'transpose-chars' in Flyspell mode * lisp/textmodes/flyspell.el (flyspell-post-command-hook): Check word before previous point location after 'transpose-chars'. (Bug#30813) diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el index e462669626..b5c841403a 100644 --- a/lisp/textmodes/flyspell.el +++ b/lisp/textmodes/flyspell.el @@ -982,6 +982,11 @@ Mostly we check word delimiters." (let ((command this-command) ;; Prevent anything we do from affecting the mark. deactivate-mark) + (if (and (eq command 'transpose-chars) + flyspell-pre-point) + (save-excursion + (goto-char (- flyspell-pre-point 1)) + (flyspell-word))) (if (flyspell-check-pre-word-p) (save-excursion '(flyspell-debug-signal-pre-word-checked) commit 4328d5f744e032eb4fa67b30bc0ef539f95755c5 Author: Robert Pluim Date: Mon Mar 12 17:43:23 2018 +0100 Correct Info link markup * lisp/gnus/gnus-agent.el (gnus-agent-auto-agentize-methods): Correct markup for Info link. * src/minibuf.c (Fcompleting_read): Likewise. diff --git a/lisp/gnus/gnus-agent.el b/lisp/gnus/gnus-agent.el index b2de119643..c69d64546c 100644 --- a/lisp/gnus/gnus-agent.el +++ b/lisp/gnus/gnus-agent.el @@ -172,7 +172,7 @@ When found, offer to remove them." (defcustom gnus-agent-auto-agentize-methods nil "Initially, all servers from these methods are agentized. The user may remove or add servers using the Server buffer. -See Info nodes `(gnus)Server Buffer', `(gnus)Agent Variables'." +See Info node `(gnus)Server Buffer' and Info node `(gnus)Agent Variables'." :version "22.1" :type '(repeat symbol) :group 'gnus-agent) diff --git a/src/minibuf.c b/src/minibuf.c index cbb0898a9a..c57182354f 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -1639,8 +1639,8 @@ COLLECTION can also be a function to do the completion itself. PREDICATE limits completion to a subset of COLLECTION. See `try-completion', `all-completions', `test-completion', and `completion-boundaries', for more details on completion, -COLLECTION, and PREDICATE. See also Info nodes `(elisp)Basic Completion' -for the details about completion, and `(elisp)Programmed Completion' for +COLLECTION, and PREDICATE. See also Info node `(elisp)Basic Completion' +for the details about completion, and Info node `(elisp)Programmed Completion' for expectations from COLLECTION when it's a function. REQUIRE-MATCH can take the following values: commit 2fb52abd9e74f722c08c5e59f63dee8821789e1a Author: Nick Helm Date: Sun Mar 18 21:05:44 2018 +1300 Improve documentation of 'with-help-window' * doc/lispref/help.texi (Help Functions): Change variable name to 'buffer-or-name'. * lisp/help.el (with-help-window): Change variable name to 'buffer-or-name' and rewrite the doc string, adding reference to 'help-window-setup'. (Bug#30792) diff --git a/doc/lispref/help.texi b/doc/lispref/help.texi index 33cc2f0d55..6dd55d0b25 100644 --- a/doc/lispref/help.texi +++ b/doc/lispref/help.texi @@ -744,16 +744,17 @@ This function returns the name of the help buffer, which is normally @end defun @vindex help-window-select -@defmac with-help-window buffer-name body@dots{} +@defmac with-help-window buffer-or-name body@dots{} This macro evaluates @var{body} like @code{with-output-to-temp-buffer} -(@pxref{Temporary Displays}), inserting any output produced by its forms -into a buffer named @var{buffer-name}. (Usually, @var{buffer-name} -should be the value returned by the function @code{help-buffer}.) It -also puts the specified buffer into Help mode and displays a message -telling the user how to quit and scroll the help window. It selects the -help window if the current value of the user option -@code{help-window-select} has been set accordingly. It returns the last -value in @var{body}. +(@pxref{Temporary Displays}), inserting any output produced by its +forms into a buffer specified by @var{buffer-or-name}, which can be a +buffer or the name of a buffer. (Frequently, @var{buffer-or-name} is +the value returned by the function @code{help-buffer}.) This macro +puts the specified buffer into Help mode and displays a message +telling the user how to quit and scroll the help window. It selects +the help window if the current value of the user option +@code{help-window-select} has been set accordingly. It returns the +last value in @var{body}. @end defmac @defun help-setup-xref item interactive-p diff --git a/lisp/help.el b/lisp/help.el index 014af5141e..958b06c095 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -1370,15 +1370,14 @@ Return VALUE." ;; (4) A marker (`help-window-point-marker') to move point in the help ;; window to an arbitrary buffer position. -(defmacro with-help-window (buffer-name &rest body) - "Display buffer named BUFFER-NAME in a help window. -Evaluate the forms in BODY with standard output bound to a buffer -called BUFFER-NAME (creating it if it does not exist), put that -buffer in `help-mode', display the buffer in a window (see -`with-temp-buffer-window' for details) and issue a message how to -deal with that \"help\" window when it's no more needed. Select -the help window if the current value of the user option -`help-window-select' says so. Return last value in BODY." +(defmacro with-help-window (buffer-or-name &rest body) + "Evaluate BODY, send output to BUFFER-OR-NAME and show in a help window. +This construct is like `with-temp-buffer-window' but unlike that +puts the buffer specified by BUFFER-OR-NAME in `help-mode' and +displays a message about how to delete the help window when it's no +longer needed. The help window will be selected if +`help-window-select' is non-nil. See `help-window-setup' for +more options." (declare (indent 1) (debug t)) `(progn ;; Make `help-window-point-marker' point nowhere. The only place @@ -1390,7 +1389,7 @@ the help window if the current value of the user option (cons 'help-mode-finish temp-buffer-window-show-hook))) (setq help-window-old-frame (selected-frame)) (with-temp-buffer-window - ,buffer-name nil 'help-window-setup (progn ,@body))))) + ,buffer-or-name nil 'help-window-setup (progn ,@body))))) ;; Called from C, on encountering `help-char' when reading a char. ;; Don't print to *Help*; that would clobber Help history. commit ec08c62f036c3c86f1e00d54a47c405299a19993 Author: Eli Zaretskii Date: Tue Mar 20 11:34:14 2018 +0200 Minor improvements in building.texi * doc/emacs/building.texi (Compilation Shell): Mention that this section is for local compilation buffers. (Compilation, Compilation Mode): Mention that 'g' is bound to 'recompile' in compilation buffers. (Grep Searching): Add a cross-reference to "Compilation Mode". Suggested by Michael Albinus in emacs-manual-bugs@gnu.org. diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi index 4c716154e6..7e250bf425 100644 --- a/doc/emacs/building.texi +++ b/doc/emacs/building.texi @@ -47,6 +47,7 @@ Run a compiler asynchronously under Emacs, with error messages going to the @file{*compilation*} buffer. @item M-x recompile +@itemx g@r{ (Compilation mode)} Invoke a compiler with the same command as in the last invocation of @kbd{M-x compile}. @@ -111,7 +112,8 @@ recompile}. This reuses the compilation command from the last invocation of @kbd{M-x compile}. It also reuses the @file{*compilation*} buffer and starts the compilation in its default directory, which is the directory in which the previous compilation -was started. +was started. In @file{*compilation*} buffers this command is bound to +@kbd{g}. @findex kill-compilation @vindex compilation-always-kill @@ -185,6 +187,9 @@ different file (@code{compilation-previous-file}). @item C-c C-f Toggle Next Error Follow minor mode, which makes cursor motion in the compilation buffer produce automatic source display. +@item g +Re-run the last command whose output is shown in the +@file{*compilation*} buffer. @end table @kindex M-g M-n @@ -280,6 +285,12 @@ Names}). @node Compilation Shell @section Subshells for Compilation + This section includes various techniques and advice for using a +shell and its features in compilation buffers. This material is +specific to local compilations, and will most probably not work in (or +be irrelevant to) compilation buffers whose default directory is on +remote hosts. + The @kbd{M-x compile} command uses a shell to run the compilation command, but specifies the option for a noninteractive shell. This means, in particular, that the shell should start with no prompt. If @@ -385,6 +396,8 @@ grep -nH -e foo *.el | grep bar | grep toto The output from @command{grep} goes in the @file{*grep*} buffer. You can find the corresponding lines in the original files using @w{@kbd{C-x `}}, @key{RET}, and so forth, just like compilation errors. +@xref{Compilation Mode}, for detailed description of commands and key +bindings available in the @file{*grep*} buffer. Some grep programs accept a @samp{--color} option to output special markers around matches for the purpose of highlighting. You can make commit 663aafe1fff63b5b6f5cefe32117d5ddc2048756 Author: Alex Branham Date: Fri Jan 19 12:54:00 2018 -0600 * lisp/textmodes/bibtex.el (bibtex-mark-entry): activate mark diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el index a30e146892..a3f9804358 100644 --- a/lisp/textmodes/bibtex.el +++ b/lisp/textmodes/bibtex.el @@ -3871,7 +3871,7 @@ Otherwise display the beginning of entry." (defun bibtex-mark-entry () "Put mark at beginning, point at end of current BibTeX entry." (interactive) - (push-mark (bibtex-beginning-of-entry)) + (push-mark (bibtex-beginning-of-entry) :activate t) (bibtex-end-of-entry)) (defun bibtex-count-entries (&optional count-string-entries) commit b39ca55e294d3be3e4c6e142975256d7f8cdfe76 Author: Paul Eggert Date: Mon Mar 19 18:55:14 2018 -0700 ; Spelling fix diff --git a/test/README b/test/README index b9f6f65c45..1bfa9037ea 100644 --- a/test/README +++ b/test/README @@ -12,7 +12,7 @@ Emacs uses ERT, Emacs Lisp Regression Testing, for testing. See (info for more information on writing and running tests. Tests could be tagged by the developer. In this test directory, the -following tags are recognised: +following tags are recognized: * :expensive-test The test needs a serious amount of time to run. It is not intended commit 05781b2e886388076e8428c23383422b0dde7b61 Author: Paul Eggert Date: Mon Mar 19 18:53:21 2018 -0700 ; Spelling fix diff --git a/ChangeLog.3 b/ChangeLog.3 index ea4d71c63a..2dbe6c4bdb 100644 --- a/ChangeLog.3 +++ b/ChangeLog.3 @@ -2769,7 +2769,7 @@ This fixes bug #28623. * lisp/progmodes/cc-engine.el (c-looking-at-or-maybe-in-bracelist): When - testing for being enclosed in parens, recognise also a brace directly + testing for being enclosed in parens, recognize also a brace directly following a comma, as well as a brace being the first thing inside the paren. Enhance the return value, by indicating when we're directly inside an open paren. commit 6d12e7af88b8287b8dd520aa3a3470f7f112cfe0 Author: Paul Eggert Date: Mon Mar 19 16:49:09 2018 -0700 Improve port to NetBSD tzalloc Problem reported by Valery Ushakov (Bug#30738#22). * src/editfns.c (HAVE_TZALLOC_BUG): New macro. (tzlookup): Use it. Compile on all platforms, not just on NetBSD. diff --git a/src/editfns.c b/src/editfns.c index cb7353a48c..7e35fe8797 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -48,6 +48,16 @@ along with GNU Emacs. If not, see . */ #include #include +#ifdef HAVE_TIMEZONE_T +# include +# if defined __NetBSD_Version__ && __NetBSD_Version__ < 700000000 +# define HAVE_TZALLOC_BUG true +# endif +#endif +#ifndef HAVE_TZALLOC_BUG +# define HAVE_TZALLOC_BUG false +#endif + #include #include #include @@ -205,16 +215,14 @@ tzlookup (Lisp_Object zone, bool settz) new_tz = tzalloc (zone_string); -#if defined __NetBSD_Version__ && __NetBSD_Version__ < 700000000 - /* NetBSD 6 tzalloc mishandles POSIX TZ strings (Bug#30738). - If possible, fall back on tzdb. */ - if (!new_tz && errno != ENOMEM && plain_integer + if (HAVE_TZALLOC_BUG && !new_tz && errno != ENOMEM && plain_integer && XINT (zone) % (60 * 60) == 0) { + /* tzalloc mishandles POSIX strings; fall back on tzdb if + possible (Bug#30738). */ sprintf (tzbuf, "Etc/GMT%+"pI"d", - (XINT (zone) / (60 * 60))); new_tz = tzalloc (zone_string); } -#endif if (!new_tz) { commit 6b168a3b243dea4500ba5518316abb6e447af35e Author: Glenn Morris Date: Mon Mar 19 17:08:46 2018 -0400 ; * test/lisp/info-xref-tests.el: Remove stray line from previous. diff --git a/test/lisp/info-xref-tests.el b/test/lisp/info-xref-tests.el index 6d3a461837..1fcbb38579 100644 --- a/test/lisp/info-xref-tests.el +++ b/test/lisp/info-xref-tests.el @@ -155,7 +155,6 @@ text. (with-current-buffer info-xref-output-buffer (goto-char (point-max)) (should (search-backward "done" nil t)) - (re-search-forward "\\([0-9]+\\) bad" (line-end-position) t) (should (string-match-p " [0-9]\\{3,\\} good, 0 bad" (buffer-substring-no-properties (line-beginning-position) commit 5c8c8f0a49cf1823bc77db3c27baec6884f4d8d8 Author: Glenn Morris Date: Mon Mar 19 16:57:28 2018 -0400 * test/lisp/info-xref-tests.el (info-xref-test-emacs-manuals): New. diff --git a/test/lisp/info-xref-tests.el b/test/lisp/info-xref-tests.el index 7532befae0..6d3a461837 100644 --- a/test/lisp/info-xref-tests.el +++ b/test/lisp/info-xref-tests.el @@ -144,4 +144,22 @@ text. (format "%s.info" (file-name-sans-extension tempfile2))))))) +(ert-deftest info-xref-test-emacs-manuals () + "Test that all internal links in the Emacs manuals work." + :tags '(:expensive-test) + (require 'info) + (let ((default-directory (car (Info-default-dirs))) + (Info-directory-list '("."))) + (skip-unless (file-readable-p "emacs.info")) + (info-xref-check-all) + (with-current-buffer info-xref-output-buffer + (goto-char (point-max)) + (should (search-backward "done" nil t)) + (re-search-forward "\\([0-9]+\\) bad" (line-end-position) t) + (should (string-match-p + " [0-9]\\{3,\\} good, 0 bad" + (buffer-substring-no-properties (line-beginning-position) + (line-end-position))))))) + + ;;; info-xref.el ends here commit 7a7ee53dbdcf489050653f04ba3d0c491245c5fa Author: Paul Eggert Date: Mon Mar 19 13:29:22 2018 -0700 Tune time zone 0 * src/editfns.c (tzlookup): Treat time zone 0 like t, for speed. Suggested by Valery Ushakov (Bug#30738#19). diff --git a/src/editfns.c b/src/editfns.c index d26319441b..cb7353a48c 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -147,7 +147,7 @@ tzlookup (Lisp_Object zone, bool settz) if (NILP (zone)) return local_tz; - else if (EQ (zone, Qt)) + else if (EQ (zone, Qt) || EQ (zone, make_number (0))) { zone_string = "UTC0"; new_tz = utc_tz; commit aa40014ba373ac633b118dc63647f323ef0cedb5 Author: Eli Zaretskii Date: Mon Mar 19 22:01:55 2018 +0200 * doc/emacs/building.texi (Starting GUD): Mention 'guiler'. diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi index de3ffd571b..4c716154e6 100644 --- a/doc/emacs/building.texi +++ b/doc/emacs/building.texi @@ -534,6 +534,10 @@ Run the Java debugger. @findex pdb Run the Python debugger. +@item M-x guiler +@findex guiler +Run Guile REPL for debugging Guile Scheme programs. + @item M-x dbx @findex dbx Run the DBX debugger. commit 23072e468f612b2c49a7603e66011cc1664afbde Author: Eli Zaretskii Date: Mon Mar 19 21:53:52 2018 +0200 Yet more proofreading of the Emacs manual * doc/emacs/building.texi (Compilation, Grep Searching) (Debuggers, GUD Customization, Source Buffers) (Breakpoints Buffer, Threads Buffer): Minor fixes and updates. Suggested by Michael Albinus in emacs-manual-bugs@gnu.org. diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi index 7be96fa85c..de3ffd571b 100644 --- a/doc/emacs/building.texi +++ b/doc/emacs/building.texi @@ -45,9 +45,11 @@ messages and show you where the errors occurred. @item M-x compile Run a compiler asynchronously under Emacs, with error messages going to the @file{*compilation*} buffer. + @item M-x recompile Invoke a compiler with the same command as in the last invocation of @kbd{M-x compile}. + @item M-x kill-compilation Kill the running compilation subprocess. @end table @@ -115,12 +117,12 @@ was started. @vindex compilation-always-kill Starting a new compilation also kills any compilation already running in @file{*compilation*}, as the buffer can only handle one -compilation at any time. However, @kbd{M-x compile} asks for -confirmation before actually killing a compilation that is running; to -always automatically kill the compilation without asking, change the -variable @code{compilation-always-kill} to @code{t}. You can also -kill a compilation process with the command @kbd{M-x -kill-compilation}. +compilation at any time. However, @kbd{M-x compile} and @kbd{M-x +recompile} ask for confirmation before actually killing a compilation +that is running; to always automatically kill the compilation without +asking, change the variable @code{compilation-always-kill} to +@code{t}. You can also kill a compilation process with the command +@kbd{M-x kill-compilation}. To run two compilations at once, start the first one, then rename the @file{*compilation*} buffer (perhaps using @code{rename-uniquely}; @@ -401,7 +403,7 @@ The possible values are either @code{nil} (don't save), @code{ask} (and is called with the file name as the parameter and should return non-@code{nil} if the buffer is to be saved). Any other non-@code{nil} value means that all buffers should be saved without -asking. +asking. The default is @code{ask}. @findex grep-find @findex find-grep @@ -478,8 +480,8 @@ see the Flymake Info manual, which is distributed with Emacs. The GUD (Grand Unified Debugger) library provides an Emacs interface to a wide variety of symbolic debuggers. It can run the GNU Debugger -(GDB), as well as DBX, SDB, XDB, Perl's debugging mode, the Python -debugger PDB, and the Java Debugger JDB. +(GDB), as well as DBX, SDB, XDB, Guile REPL debug commands, Perl's +debugging mode, the Python debugger PDB, and the Java Debugger JDB. Emacs provides a special interface to GDB, which uses extra Emacs windows to display the state of the debugged program. @xref{GDB @@ -791,12 +793,14 @@ Instead, type @kbd{C-q @key{TAB}} to enter a tab. @vindex perldb-mode-hook @vindex pdb-mode-hook @vindex jdb-mode-hook +@vindex guiler-mode-hook On startup, GUD runs one of the following hooks: @code{gdb-mode-hook}, if you are using GDB; @code{dbx-mode-hook}, if you are using DBX; @code{sdb-mode-hook}, if you are using SDB; -@code{xdb-mode-hook}, if you are using XDB; @code{perldb-mode-hook}, -for Perl debugging mode; @code{pdb-mode-hook}, for PDB; -@code{jdb-mode-hook}, for JDB@. @xref{Hooks}. +@code{xdb-mode-hook}, if you are using XDB; @code{guiler-mode-hook} +for Guile REPL debugging; @code{perldb-mode-hook}, for Perl debugging +mode; @code{pdb-mode-hook}, for PDB; @code{jdb-mode-hook}, for JDB@. +@xref{Hooks}. The @code{gud-def} Lisp macro (@pxref{Defining Macros,,, elisp, the Emacs Lisp Reference Manual}) provides a convenient way to define an @@ -952,16 +956,18 @@ still in the right places. @table @asis @item @kbd{mouse-1} (in fringe) -Set or clear a breakpoint on that line. +Set or clear a breakpoint on that line +(@code{gdb-mouse-set-clear-breakpoint}). @item @kbd{C-mouse-1} (in fringe) -Enable or disable a breakpoint on that line. +Enable or disable a breakpoint on that line +(@code{gdb-mouse-toggle-breakpoint-margin}). @item @kbd{mouse-3} (in fringe) -Continue execution to that line. +Continue execution to that line (@code{gdb-mouse-until}). @item @kbd{C-mouse-3} (in fringe) -Jump to that line. +Jump to that line (@code{gdb-mouse-jump}). @end table On a graphical display, you can click @kbd{mouse-1} in the fringe of @@ -1018,7 +1024,8 @@ Visit the source line for the current breakpoint @item mouse-2 @kindex mouse-2 @r{(GDB Breakpoints buffer)} -Visit the source line for the breakpoint you click on. +Visit the source line for the breakpoint you click on +(@code{gdb-goto-breakpoint}). @end table @vindex gdb-show-threads-by-default @@ -1039,8 +1046,8 @@ point there and press @key{RET} (@code{gdb-select-thread}), or click on it with @kbd{mouse-2}. This also displays the associated source buffer, and updates the contents of the other GDB buffers. - You can customize variables under @code{gdb-buffers} group to select -fields included in GDB Threads buffer. + You can customize variables in the @code{gdb-buffers} group to +select fields included in GDB Threads buffer. @table @code @item gdb-thread-buffer-verbose-names commit 7ff62ed221cc712bb2e310917dd303594f68a625 Author: Charles A. Roelli Date: Mon Mar 19 20:16:19 2018 +0100 Normalize and fix some mistakes in NS-related commentary * lisp/term/ns-win.el (ns-insert-working-text): Normalize commentary. (x-file-dialog): Fix indentation. * src/nsfns.m (ns_get_window, interpret_services_menu) (x_set_background_color, x_set_icon_name, x_set_tool_bar_lines) (x_set_icon_type, x_set_mouse_color, Fx_create_frame) (ns_window_is_ancestor, Fns_popup_font_panel) (Fx_display_visual_class, Fns_font_name, Fns_do_applescript) (ns_screen_name, compute_tip_xy, Fns_mouse_absolute_pixel_position) (handlePanelKeys): Normalize commentary (also in top-level declarations) and remove two outdated comments (one in Fx_create_frame, the other in compute_tip_xy). * src/nsterm.h (NSApplication, NSWindow, ns_bitmap_record): * src/nsselect.m: * src/nsmenu.m (ns_update_menubar, addItemWithWidgetValue:) (runMenuAt:forFrame:keymaps:, ns_menu_show, free_frame_tool_bar) (update_frame_tool_bar, init) (initWithContentRect:styleMask:backing:defer:) (initFromContents:isQuestion:, timeout_handler:) (Fmenu_or_popup_active_p): * src/nsimage.m (initFromXBM, initFromXBMWithDepth): * src/nsgui.h: * src/nsfont.m (ns_spec_to_descriptor, ns_descriptor_to_entity) (ns_charset_covers, ns_get_req_script, ns_findfonts) (nsfont_list_family, nsfont_open, nsfont_encode_char) (nsfont_draw, ns_uni_to_glyphs, ns_glyph_metrics) (syms_of_nsfont): Normalize commentary (also in top-level declarations). * src/nsterm.m (ns_init_locale, ns_retain_object) (ns_screen_margins_ignoring_hidden_dock, ns_unfocus, NSImageView) (x_make_frame_visible, x_iconify_frame, x_destroy_window) (x_set_undecorated, x_set_no_focus_on_map, x_set_z_group) (ns_index_color, ns_get_color, ns_lisp_to_color) (note_mouse_movement, scrollbar, ns_scroll_run) (ns_draw_fringe_bitmap, ns_draw_window_cursor) (ns_draw_text_decoration, ns_draw_relief) (ns_dumpglyphs_box_or_relief, ns_dumpglyphs_image) (ns_dumpglyphs_stretch, ns_draw_glyph_string, ns_send_appdefined) (ns_check_menu_open, ns_read_socket, ns_select, ns_run_loop_break) (ns_set_vertical_scroll_bar, ns_set_horizontal_scroll_bar) (ns_string_to_lispmod, ns_default, ns_initialize_display_info) (ns_delete_display, ns_term_init, sendEvent:) (applicationDidFinishLaunching:, applicationDidBecomeActive:) (fd_handler:, setWindowClosing:, keyDown:, insertText:) (mouseDown:, mouseMoved:, updateFrameSize:) (windowWillResize:toSize:, windowDidResize:, windowDidResignKey:) (initFrameFromEmacs:, toggleFullScreen:, toolbarClicked:) (writeSelectionToPasteboard:types:, setMiniwindowImage:) (scrollerWidth, initFrame:window:, setFrame:, repeatScroll:) (ns_xlfd_to_fontname, syms_of_nsterm): Normalize commentary (also in top-level declarations), and in ns_get_color, replace a Gmane link with one from lists.gnu.org, which does not require JS to view the message. diff --git a/lisp/term/ns-win.el b/lisp/term/ns-win.el index 1c7dd8a63f..fa988ad5f2 100644 --- a/lisp/term/ns-win.el +++ b/lisp/term/ns-win.el @@ -307,8 +307,8 @@ is currently being used." "Insert contents of `ns-working-text' as UTF-8 string and mark with `ns-working-overlay'. Any previously existing working text is cleared first. The overlay is assigned the face `ns-working-text-face'." - ;; FIXME: if buffer is read-only, don't try to insert anything - ;; and if text is bound to a command, execute that instead (Bug#1453) + ;; FIXME: if buffer is read-only, don't try to insert anything, and + ;; if text is bound to a command, execute that instead (Bug#1453). (interactive) (ns-delete-working-text) (let ((start (point))) @@ -437,7 +437,7 @@ Lines are highlighted according to `ns-input-line'." ;;;; File handling. (defun x-file-dialog (prompt dir default_filename mustmatch only_dir_p) -"SKIP: real doc in xfns.c." + "SKIP: real doc in xfns.c." (ns-read-file-name prompt dir mustmatch default_filename only_dir_p)) (defun ns-open-file-using-panel () diff --git a/src/nsfns.m b/src/nsfns.m index 6407560d89..6df54b4eb5 100644 --- a/src/nsfns.m +++ b/src/nsfns.m @@ -27,7 +27,7 @@ Updated by Christian Limpach (chris@nice.ch) */ /* This should be the first include, as it may set up #defines affecting - interpretation of even the system includes. */ + interpretation of even the system includes. */ #include #include @@ -54,7 +54,7 @@ Updated by Christian Limpach (chris@nice.ch) static EmacsTooltip *ns_tooltip = nil; -/* Static variables to handle applescript execution. */ +/* Static variables to handle AppleScript execution. */ static Lisp_Object as_script, *as_result; static int as_status; @@ -116,7 +116,7 @@ Updated by Christian Limpach (chris@nice.ch) id view =nil, window =nil; if (!FRAMEP (maybeFrame) || !FRAME_NS_P (XFRAME (maybeFrame))) - maybeFrame = selected_frame;/*wrong_type_argument (Qframep, maybeFrame); */ + maybeFrame = selected_frame; /* wrong_type_argument (Qframep, maybeFrame); */ if (!NILP (maybeFrame)) view = FRAME_NS_VIEW (XFRAME (maybeFrame)); @@ -178,7 +178,7 @@ Updated by Christian Limpach (chris@nice.ch) static Lisp_Object interpret_services_menu (NSMenu *menu, Lisp_Object prefix, Lisp_Object old) /* -------------------------------------------------------------------------- - Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side + Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side. -------------------------------------------------------------------------- */ { int i, count; @@ -261,7 +261,7 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side if (FRAME_NS_VIEW (f)) { update_face_from_frame_parameter (f, Qforeground_color, arg); - /*recompute_basic_faces (f); */ + /* recompute_basic_faces (f); */ if (FRAME_VISIBLE_P (f)) SET_FRAME_GARBAGED (f); } @@ -285,8 +285,9 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side error ("Unknown color"); } - /* clear the frame; in some instances the NS-internal GC appears not to - update, or it does update and cannot clear old text properly */ + /* Clear the frame; in some instances the NS-internal GC appears not + to update, or it does update and cannot clear old text + properly. */ if (FRAME_VISIBLE_P (f)) ns_clear_frame (f); @@ -356,7 +357,7 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side NSView *view = FRAME_NS_VIEW (f); NSTRACE ("x_set_icon_name"); - /* see if it's changed */ + /* See if it's changed. */ if (STRINGP (arg)) { if (STRINGP (oldval) && EQ (Fstring_equal (oldval, arg), Qt)) @@ -556,14 +557,14 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side if (nlines) { FRAME_EXTERNAL_MENU_BAR (f) = 1; - /* does for all frames, whereas we just want for one frame + /* Does for all frames, whereas we just want for one frame [NSMenu setMenuBarVisible: YES]; */ } else { if (FRAME_EXTERNAL_MENU_BAR (f) == 1) free_frame_menubar (f); - /* [NSMenu setMenuBarVisible: NO]; */ + /* [NSMenu setMenuBarVisible: NO]; */ FRAME_EXTERNAL_MENU_BAR (f) = 0; } } @@ -573,11 +574,11 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side static void x_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval) { - /* Currently, when the tool bar change state, the frame is resized. + /* Currently, when the tool bar changes state, the frame is resized. TODO: It would be better if this didn't occur when 1) the frame is full height or maximized or 2) when specified by - `frame-inhibit-implied-resize'. */ + `frame-inhibit-implied-resize'. */ int nlines; NSTRACE ("x_set_tool_bar_lines"); @@ -694,7 +695,7 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side chain = XCDR (chain)) { elt = XCAR (chain); - /* special case: t means go by file type */ + /* Special case: t means go by file type. */ if (SYMBOLP (elt) && EQ (elt, Qt) && SSDATA (f->name)[0] == '/') { NSString *str @@ -744,7 +745,7 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side store_frame_param (f, Qicon_type, arg); } - /* do it the implicit way */ + /* Do it the implicit way. */ if (NILP (arg)) { ns_implicitly_set_icon_type (f); @@ -780,7 +781,7 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side static void x_set_mouse_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval) { - /* don't think we can do this on Nextstep */ + /* Don't think we can do this on Nextstep. */ } @@ -809,7 +810,7 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side /* This is for use by x-server-version and collapses all version info we have into a single int. For a better picture of the implementation - running, use ns_appkit_version_str.*/ + running, use ns_appkit_version_str. */ static int ns_appkit_version_int (void) { @@ -852,7 +853,8 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side } -/* Note: see frame.c for template, also where generic functions are impl */ +/* Note: see frame.c for template, also where generic functions are + implemented. */ frame_parm_handler ns_frame_parm_handlers[] = { x_set_autoraise, /* generic OK */ @@ -896,7 +898,7 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side #ifdef NS_IMPL_COCOA x_set_undecorated, #else - 0, /*x_set_undecorated */ + 0, /* x_set_undecorated */ #endif x_set_parent_frame, 0, /* x_set_skip_taskbar */ @@ -1127,7 +1129,7 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side /* use for default font name */ id font = [NSFont userFixedPitchFontOfSize: -1.0]; /* default */ x_default_parameter (f, parms, Qfontsize, - make_number (0 /*(int)[font pointSize]*/), + make_number (0 /* (int)[font pointSize] */), "fontSize", "FontSize", RES_TYPE_NUMBER); // Remove ' Regular', not handled by backends. char *fontname = xstrdup ([[font displayName] UTF8String]); @@ -1170,7 +1172,6 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side "foreground", "Foreground", RES_TYPE_STRING); x_default_parameter (f, parms, Qbackground_color, build_string ("White"), "background", "Background", RES_TYPE_STRING); - /* FIXME: not supported yet in Nextstep */ x_default_parameter (f, parms, Qline_spacing, Qnil, "lineSpacing", "LineSpacing", RES_TYPE_NUMBER); x_default_parameter (f, parms, Qleft_fringe, Qnil, @@ -1252,7 +1253,7 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side f->no_split = minibuffer_only || (!EQ (tem, Qunbound) && !EQ (tem, Qnil)); /* NOTE: on other terms, this is done in set_mouse_color, however this - was not getting called under Nextstep */ + was not getting called under Nextstep. */ f->output_data.ns->text_cursor = [NSCursor IBeamCursor]; f->output_data.ns->nontext_cursor = [NSCursor arrowCursor]; f->output_data.ns->modeline_cursor = [NSCursor pointingHandCursor]; @@ -1284,8 +1285,9 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side /* ns_display_info does not have a reference_count. */ f->terminal->reference_count++; - /* It is now ok to make the frame official even if we get an error below. - The frame needs to be on Vframe_list or making it visible won't work. */ + /* It is now ok to make the frame official even if we get an error + below. The frame needs to be on Vframe_list or making it visible + won't work. */ Vframe_list = Fcons (frame, Vframe_list); x_default_parameter (f, parms, Qicon_type, Qnil, @@ -1379,7 +1381,7 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side static BOOL ns_window_is_ancestor (NSWindow *win, NSWindow *candidate) -/* Test whether CANDIDATE is an ancestor window of WIN. */ +/* Test whether CANDIDATE is an ancestor window of WIN. */ { if (candidate == NULL) return NO; @@ -1408,7 +1410,8 @@ Frames are listed from topmost (first) to bottommost (last). */) { Lisp_Object frame; - /* Check against [win parentWindow] so that it doesn't match itself. */ + /* Check against [win parentWindow] so that it doesn't match + itself. */ if (parent == nil || ns_window_is_ancestor (parent, [win parentWindow])) { XSETFRAME (frame, ((EmacsView *)[win delegate])->emacsframe); @@ -1453,7 +1456,7 @@ Frames are listed from topmost (first) to bottommost (last). */) DEFUN ("ns-popup-font-panel", Fns_popup_font_panel, Sns_popup_font_panel, 0, 1, "", - doc: /* Pop up the font panel. */) + doc: /* Pop up the font panel. */) (Lisp_Object frame) { struct frame *f = decode_window_system_frame (frame); @@ -1698,8 +1701,8 @@ Frames are listed from topmost (first) to bottommost (last). */) (Lisp_Object terminal) { check_ns_display_info (terminal); - /* This function has no real equivalent under NeXTstep. Return nil to - indicate this. */ + /* This function has no real equivalent under Nextstep. Return nil to + indicate this. */ return Qnil; } @@ -1722,12 +1725,12 @@ Frames are listed from topmost (first) to bottommost (last). */) (Lisp_Object terminal) { check_ns_display_info (terminal); - /*NOTE: it is unclear what would best correspond with "protocol"; - we return 10.3, meaning Panther, since this is roughly the - level that GNUstep's APIs correspond to. - The last number is where we distinguish between the Apple - and GNUstep implementations ("distributor-specific release - number") and give int'ized versions of major.minor. */ + /* NOTE: it is unclear what would best correspond with "protocol"; + we return 10.3, meaning Panther, since this is roughly the + level that GNUstep's APIs correspond to. The last number + is where we distinguish between the Apple and GNUstep + implementations ("distributor-specific release number") and + give int'ized versions of major.minor. */ return list3i (10, 3, ns_appkit_version_int ()); } @@ -1806,7 +1809,8 @@ and GNUstep implementations ("distributor-specific release else if ( depth == NSBestDepth (NSCalibratedRGBColorSpace, 8, 24, NO, NULL)) return intern ("direct-color"); else - /* color mgmt as far as we do it is really handled by Nextstep itself anyway */ + /* Color management as far as we do it is really handled by + Nextstep itself anyway. */ return intern ("direct-color"); } @@ -1932,7 +1936,7 @@ and GNUstep implementations ("distributor-specific release doc: /* Determine font PostScript or family name for font NAME. NAME should be a string containing either the font name or an XLFD font descriptor. If string contains `fontset' and not -`fontset-startup', it is left alone. */) +`fontset-startup', it is left alone. */) (Lisp_Object name) { char *nm; @@ -2049,7 +2053,7 @@ and GNUstep implementations ("distributor-specific release status as function value. A zero is returned if compilation and execution is successful, in which case *RESULT is set to a Lisp string or a number containing the resulting script value. Otherwise, - 1 is returned. */ + 1 is returned. */ static int ns_do_applescript (Lisp_Object script, Lisp_Object *result) { @@ -2102,7 +2106,7 @@ and GNUstep implementations ("distributor-specific release return 0; } -/* Helper function called from sendEvent to run applescript +/* Helper function called from sendEvent to run AppleScript from within the main event loop. */ void @@ -2117,7 +2121,7 @@ and GNUstep implementations ("distributor-specific release doc: /* Execute AppleScript SCRIPT and return the result. If compilation and execution are successful, the resulting script value is returned as a string, a number or, in the case of other constructs, t. -In case the execution fails, an error is signaled. */) +In case the execution fails, an error is signaled. */) (Lisp_Object script) { Lisp_Object result; @@ -2133,10 +2137,10 @@ and GNUstep implementations ("distributor-specific release as_script = script; as_result = &result; - /* executing apple script requires the event loop to run, otherwise + /* Executing AppleScript requires the event loop to run, otherwise errors aren't returned and executeAndReturnError hangs forever. - Post an event that runs applescript and then start the event loop. - The event loop is exited when the script is done. */ + Post an event that runs AppleScript and then start the event + loop. The event loop is exited when the script is done. */ nxev = [NSEvent otherEventWithType: NSEventTypeApplicationDefined location: NSMakePoint (0, 0) modifierFlags: 0 @@ -2149,8 +2153,8 @@ and GNUstep implementations ("distributor-specific release [NSApp postEvent: nxev atStart: NO]; - // If there are other events, the event loop may exit. Keep running - // until the script has been handled. */ + /* If there are other events, the event loop may exit. Keep running + until the script has been handled. */ ns_init_events (&ev); while (! NILP (as_script)) [NSApp run]; @@ -2203,7 +2207,7 @@ and GNUstep implementations ("distributor-specific release height - 1) / height; } -/* terms impl this instead of x-get-resource directly */ +/* Terms implement this instead of x-get-resource directly. */ char * x_get_string_resource (XrmDatabase rdb, const char *name, const char *class) { @@ -2381,7 +2385,7 @@ and GNUstep implementations ("distributor-specific release /* CGDisplayIOServicePort is deprecated. Do it another (harder) way. Is this code OK for macOS < 10.9, and GNUstep? I suspect it is, - in which case is it worth keeping the other method in here? */ + in which case is it worth keeping the other method in here? */ if (IOMasterPort (MACH_PORT_NULL, &masterPort) != kIOReturnSuccess || IOServiceGetMatchingServices (masterPort, @@ -2620,7 +2624,7 @@ and GNUstep implementations ("distributor-specific release - height); } - /* Find the screen that pt is on. */ + /* Find the screen that pt is on. */ for (screen in [NSScreen screens]) if (pt.x >= screen.frame.origin.x && pt.x < screen.frame.origin.x + screen.frame.size.width @@ -2633,13 +2637,13 @@ and GNUstep implementations ("distributor-specific release if (CGRectContainsPoint ([screen frame], pt)) which would be neater, but it causes problems building on old - versions of macOS and in GNUstep. */ + versions of macOS and in GNUstep. */ /* Ensure in bounds. (Note, screen origin = lower left.) */ if (INTEGERP (left) || INTEGERP (right)) *root_x = pt.x; else if (pt.x + XINT (dx) <= screen.frame.origin.x) - *root_x = screen.frame.origin.x; /* Can happen for negative dx */ + *root_x = screen.frame.origin.x; else if (pt.x + XINT (dx) + width <= screen.frame.origin.x + screen.frame.size.width) /* It fits to the right of the pointer. */ @@ -2658,7 +2662,7 @@ and GNUstep implementations ("distributor-specific release *root_y = pt.y - height - XINT (dy); else if (pt.y + XINT (dy) + height <= screen.frame.origin.y + screen.frame.size.height) - /* It fits above the pointer */ + /* It fits above the pointer. */ *root_y = pt.y + XINT (dy); else /* Put it on the top. */ @@ -2885,7 +2889,7 @@ value is a list of the form (LEFT, TOP, RIGHT, BOTTOM). All values are { #ifdef NS_IMPL_COCOA /* GNUstep doesn't support CGWarpMouseCursorPosition, so none of - this will work. */ + this will work. */ struct frame *f = SELECTED_FRAME (); EmacsView *view = FRAME_NS_VIEW (f); NSScreen *screen = [[view window] screen]; @@ -2923,7 +2927,7 @@ value is a list of the form (LEFT, TOP, RIGHT, BOTTOM). All values are doc: /* Return absolute position of mouse cursor in pixels. The position is returned as a cons cell (X . Y) of the coordinates of the mouse cursor position in pixels relative to a -position (0, 0) of the selected frame's terminal. */) +position (0, 0) of the selected frame's terminal. */) (void) { struct frame *f = SELECTED_FRAME (); @@ -2983,8 +2987,7 @@ The position is returned as a cons cell (X . Y) of the case NSPageDownFunctionKey: case NSEndFunctionKey: /* Don't send command modified keys, as those are handled in the - performKeyEquivalent method of the super class. - */ + performKeyEquivalent method of the super class. */ if (! ([theEvent modifierFlags] & NSEventModifierFlagCommand)) { [panel sendEvent: theEvent]; @@ -2996,8 +2999,7 @@ The position is returned as a cons cell (X . Y) of the them here. TODO: handle Emacs key bindings for copy/cut/select-all here, paste works, because we have that in our Edit menu. I.e. refactor out code in nsterm.m, keyDown: to figure out the - correct modifier. - */ + correct modifier. */ case 'x': // Cut case 'c': // Copy case 'v': // Paste diff --git a/src/nsfont.m b/src/nsfont.m index 8b42102a99..232e4962b7 100644 --- a/src/nsfont.m +++ b/src/nsfont.m @@ -21,7 +21,7 @@ */ /* This should be the first include, as it may set up #defines affecting - interpretation of even the system includes. */ + interpretation of even the system includes. */ #include #include "lisp.h" @@ -37,7 +37,7 @@ #include "font.h" #include "termchar.h" -/* TODO: Drop once we can assume gnustep-gui 0.17.1. */ +/* TODO: Drop once we can assume gnustep-gui 0.17.1. */ #ifdef NS_IMPL_GNUSTEP #import #endif @@ -45,7 +45,7 @@ #define NSFONT_TRACE 0 #define LCD_SMOOTHING_MARGIN 2 -/* font glyph and metrics caching functions, implemented at end */ +/* Font glyph and metrics caching functions, implemented at end. */ static void ns_uni_to_glyphs (struct nsfont_info *font_info, unsigned char block); static void ns_glyph_metrics (struct nsfont_info *font_info, @@ -61,7 +61,7 @@ static void ns_glyph_metrics (struct nsfont_info *font_info, /* Replace spaces w/another character so emacs core font parsing routines - aren't thrown off. */ + aren't thrown off. */ static void ns_escape_name (char *name) { @@ -71,7 +71,7 @@ static void ns_glyph_metrics (struct nsfont_info *font_info, } -/* Reconstruct spaces in a font family name passed through emacs. */ +/* Reconstruct spaces in a font family name passed through emacs. */ static void ns_unescape_name (char *name) { @@ -81,7 +81,7 @@ static void ns_glyph_metrics (struct nsfont_info *font_info, } -/* Extract family name from a font spec. */ +/* Extract family name from a font spec. */ static NSString * ns_get_family (Lisp_Object font_spec) { @@ -103,7 +103,7 @@ static void ns_glyph_metrics (struct nsfont_info *font_info, /* Return 0 if attr not set, else value (which might also be 0). On Leopard 0 gets returned even on descriptors where the attribute was never set, so there's no way to distinguish between unspecified - and set to not have. Callers should assume 0 means unspecified. */ + and set to not have. Callers should assume 0 means unspecified. */ static float ns_attribute_fvalue (NSFontDescriptor *fdesc, NSString *trait) { @@ -114,7 +114,7 @@ static void ns_glyph_metrics (struct nsfont_info *font_info, /* Converts FONT_WEIGHT, FONT_SLANT, FONT_WIDTH, plus family and script/lang - to NSFont descriptor. Information under extra only needed for matching. */ + to NSFont descriptor. Information under extra only needed for matching. */ #define STYLE_REF 100 static NSFontDescriptor * ns_spec_to_descriptor (Lisp_Object font_spec) @@ -125,7 +125,7 @@ static void ns_glyph_metrics (struct nsfont_info *font_info, NSString *family = ns_get_family (font_spec); float n; - /* add each attr in font_spec to fdAttrs.. */ + /* Add each attr in font_spec to fdAttrs. */ n = min (FONT_WEIGHT_NUMERIC (font_spec), 200); if (n != -1 && n != STYLE_REF) [tdict setObject: [NSNumber numberWithFloat: (n - 100.0F) / 100.0F] @@ -156,7 +156,7 @@ static void ns_glyph_metrics (struct nsfont_info *font_info, } -/* Converts NSFont descriptor to FONT_WEIGHT, FONT_SLANT, FONT_WIDTH, etc.. */ +/* Converts NSFont descriptor to FONT_WEIGHT, FONT_SLANT, FONT_WIDTH, etc. */ static Lisp_Object ns_descriptor_to_entity (NSFontDescriptor *desc, Lisp_Object extra, @@ -168,7 +168,7 @@ static void ns_glyph_metrics (struct nsfont_info *font_info, unsigned int traits = [desc symbolicTraits]; char *escapedFamily; - /* Shouldn't happen, but on Tiger fallback desc gets name but no family. */ + /* Shouldn't happen, but on Tiger fallback desc gets name but no family. */ if (family == nil) family = [desc objectForKey: NSFontNameAttribute]; if (family == nil) @@ -220,7 +220,7 @@ static void ns_glyph_metrics (struct nsfont_info *font_info, } -/* Default font entity. */ +/* Default font entity. */ static Lisp_Object ns_fallback_entity (void) { @@ -229,7 +229,7 @@ static void ns_glyph_metrics (struct nsfont_info *font_info, } -/* Utility: get width of a char c in screen font SFONT */ +/* Utility: get width of a char c in screen font SFONT. */ static CGFloat ns_char_width (NSFont *sfont, int c) { @@ -292,7 +292,7 @@ static void ns_glyph_metrics (struct nsfont_info *font_info, /* Return whether set1 covers set2 to a reasonable extent given by pct. We check, out of each 16 Unicode char range containing chars in set2, whether at least one character is present in set1. - This must be true for pct of the pairs to consider it covering. */ + This must be true for pct of the pairs to consider it covering. */ static BOOL ns_charset_covers(NSCharacterSet *set1, NSCharacterSet *set2, float pct) { @@ -312,20 +312,20 @@ static void ns_glyph_metrics (struct nsfont_info *font_info, if (*bytes1 == 0) // *bytes1 & *bytes2 != *bytes2 off++; } -//fprintf(stderr, "off = %d\ttot = %d\n", off,tot); + // fprintf(stderr, "off = %d\ttot = %d\n", off,tot); return (float)off / tot < 1.0F - pct; } /* Convert :lang property to a script. Use of :lang property by font backend - seems to be limited for now (2009/05) to ja, zh, and ko. */ + seems to be limited for now (2009/05) to ja, zh, and ko. */ static NSString *ns_lang_to_script (Lisp_Object lang) { if (!strcmp (SSDATA (SYMBOL_NAME (lang)), "ja")) return @"han"; /* NOTE: ja given for any hanzi that's also a kanji, but Chinese fonts - have more characters. */ + have more characters. */ else if (!strcmp (SSDATA (SYMBOL_NAME (lang)), "zh")) return @"han"; else if (!strcmp (SSDATA (SYMBOL_NAME (lang)), "ko")) @@ -336,7 +336,7 @@ seems to be limited for now (2009/05) to ja, zh, and ko. */ /* Convert OTF 4-letter script code to emacs script name. (Why can't - everyone just use some standard Unicode names for these?) */ + everyone just use some standard Unicode names for these?) */ static NSString *ns_otf_to_script (Lisp_Object otf) { @@ -347,7 +347,7 @@ seems to be limited for now (2009/05) to ja, zh, and ko. */ } -/* Convert a font registry, such as */ +/* Convert a font registry. */ static NSString *ns_registry_to_script (char *reg) { @@ -368,14 +368,14 @@ seems to be limited for now (2009/05) to ja, zh, and ko. */ /* Searches the :script, :lang, and :otf extra-bundle properties of the spec, plus registry regular property, for something that can be mapped to a - Unicode script. Empty string returned if no script spec found. */ + Unicode script. Empty string returned if no script spec found. */ static NSString *ns_get_req_script (Lisp_Object font_spec) { Lisp_Object reg = AREF (font_spec, FONT_REGISTRY_INDEX); Lisp_Object extra = AREF (font_spec, FONT_EXTRA_INDEX); - /* The extra-bundle properties have priority. */ + /* The extra-bundle properties have priority. */ for ( ; CONSP (extra); extra = XCDR (extra)) { Lisp_Object tmp = XCAR (extra); @@ -392,12 +392,12 @@ seems to be limited for now (2009/05) to ja, zh, and ko. */ } } - /* If we get here, check the charset portion of the registry. */ + /* If we get here, check the charset portion of the registry. */ if (! NILP (reg)) { /* XXX: iso10646 is passed in for non-ascii latin-1 characters (which causes box rendering if we don't treat it like iso8858-1) - but also for ascii (which causes unnecessary font substitution). */ + but also for ascii (which causes unnecessary font substitution). */ #if 0 if (EQ (reg, Qiso10646_1)) reg = Qiso8859_1; @@ -410,7 +410,7 @@ but also for ascii (which causes unnecessary font substitution). */ /* This small function is static in fontset.c. If it can be made public for - all ports, remove this, but otherwise it doesn't seem worth the ifdefs. */ + all ports, remove this, but otherwise it doesn't seem worth the ifdefs. */ static void accumulate_script_ranges (Lisp_Object arg, Lisp_Object range, Lisp_Object val) { @@ -425,7 +425,7 @@ but also for ascii (which causes unnecessary font substitution). */ /* Use the Unicode range information in Vchar_script_table to convert a script - name into an NSCharacterSet. */ + name into an NSCharacterSet. */ static NSCharacterSet *ns_script_to_charset (NSString *scriptName) { @@ -465,7 +465,7 @@ but also for ascii (which causes unnecessary font substitution). */ If none are found, we reduce the percentage and try again, until 5%. This provides a font with at least some characters if such can be found. We don't use isSupersetOfSet: because (a) it doesn't work on Tiger, and - (b) need approximate match as fonts covering full Unicode ranges are rare. */ + (b) need approximate match as fonts covering full Unicode ranges are rare. */ static NSSet *ns_get_covering_families (NSString *script, float pct) { @@ -497,7 +497,7 @@ but also for ascii (which causes unnecessary font substitution). */ { NSCharacterSet *fset = [[fontMgr fontWithFamily: family traits: 0 weight: 5 size: 12.0] coveredCharacterSet]; - /* Some fonts on macOS, maybe many on GNUstep, return nil. */ + /* Some fonts on macOS, maybe many on GNUstep, return nil. */ if (fset == nil) fset = [NSCharacterSet characterSetWithRange: NSMakeRange (0, 127)]; @@ -525,7 +525,7 @@ but also for ascii (which causes unnecessary font substitution). */ /* Implementation for list() and match(). List() can return nil, match() must return something. Strategy is to drop family name from attribute -matching set for match. */ +matching set for match. */ static Lisp_Object ns_findfonts (Lisp_Object font_spec, BOOL isMatch) { @@ -574,7 +574,7 @@ but also for ascii (which causes unnecessary font substitution). */ foundItal = YES; } - /* Add synthItal member if needed. */ + /* Add synthItal member if needed. */ family = [fdesc objectForKey: NSFontFamilyAttribute]; if (family != nil && !foundItal && XINT (Flength (list)) > 0) { @@ -590,7 +590,7 @@ but also for ascii (which causes unnecessary font substitution). */ unblock_input (); - /* Return something if was a match and nothing found. */ + /* Return something if was a match and nothing found. */ if (isMatch) return ns_fallback_entity (); @@ -642,7 +642,7 @@ The returned entities should have type set (to 'ns), plus the following: /* Return a font entity most closely matching with FONT_SPEC on FRAME. The closeness is determined by the font backend, thus `face-font-selection-order' is ignored here. - Properties to be considered are same as for list(). */ + Properties to be considered are same as for list(). */ static Lisp_Object nsfont_match (struct frame *f, Lisp_Object font_spec) { @@ -651,7 +651,7 @@ Properties to be considered are same as for list(). */ /* List available families. The value is a list of family names - (symbols). */ + (symbols). */ static Lisp_Object nsfont_list_family (struct frame *f) { @@ -664,7 +664,7 @@ Properties to be considered are same as for list(). */ objectEnumerator]; while ((family = [families nextObject])) list = Fcons (intern ([family UTF8String]), list); - /* FIXME: escape the name? */ + /* FIXME: escape the name? */ if (NSFONT_TRACE) fprintf (stderr, "nsfont: list families returning %"pI"d entries\n", @@ -715,7 +715,7 @@ Properties to be considered are same as for list(). */ if (family == nil) family = [[NSFont userFixedPitchFontOfSize: 0] familyName]; /* Should be > 0.23 as some font descriptors (e.g. Terminus) set to that - when setting family in ns_spec_to_descriptor(). */ + when setting family in ns_spec_to_descriptor(). */ if (ns_attribute_fvalue (fontDesc, NSFontWeightTrait) > 0.50F) traits |= NSBoldFontMask; if (fabs (ns_attribute_fvalue (fontDesc, NSFontSlantTrait) > 0.05F)) @@ -757,7 +757,7 @@ when setting family in ns_spec_to_descriptor(). */ if (!font) { unblock_input (); - return Qnil; /* FIXME: other terms do, but return Qnil causes segfault */ + return Qnil; /* FIXME: other terms do, but returning Qnil causes segfault. */ } font_info->glyphs = xzalloc (0x100 * sizeof *font_info->glyphs); @@ -793,7 +793,7 @@ when setting family in ns_spec_to_descriptor(). */ * -2.00000405... (represented by 0xc000000220000000). Without * adjustment, the code below would round the descender to -3, * resulting in a font that would be one pixel higher than - * intended. */ + * intended. */ CGFloat adjusted_descender = [sfont descender] + 0.0001; #ifdef NS_IMPL_GNUSTEP @@ -810,7 +810,7 @@ when setting family in ns_spec_to_descriptor(). */ synthItal || ([fontMgr traitsOfFont: nsfont] & NSItalicFontMask); /* Metrics etc.; some fonts return an unusually large max advance, so we - only use it for fonts that have wide characters. */ + only use it for fonts that have wide characters. */ font_info->width = ([sfont numberOfGlyphs] > 2000) ? [sfont maximumAdvancement].width : ns_char_width (sfont, '0'); @@ -823,7 +823,7 @@ when setting family in ns_spec_to_descriptor(). */ /* max bounds */ font->ascent = font_info->max_bounds.ascent = lrint ([sfont ascender]); /* Descender is usually negative. Use floor to avoid - clipping descenders. */ + clipping descenders. */ font->descent = font_info->max_bounds.descent = -lrint (floor(adjusted_descender)); font_info->height = @@ -880,7 +880,7 @@ when setting family in ns_spec_to_descriptor(). */ } -/* Close FONT. */ +/* Close FONT. */ static void nsfont_close (struct font *font) { @@ -911,7 +911,7 @@ when setting family in ns_spec_to_descriptor(). */ /* If FONT_ENTITY has a glyph for character C (Unicode code point), return 1. If not, return 0. If a font must be opened to check - it, return -1. */ + it, return -1. */ static int nsfont_has_char (Lisp_Object entity, int c) { @@ -920,7 +920,7 @@ when setting family in ns_spec_to_descriptor(). */ /* Return a glyph code of FONT for character C (Unicode code point). - If FONT doesn't have such a glyph, return FONT_INVALID_CODE. */ + If FONT doesn't have such a glyph, return FONT_INVALID_CODE. */ static unsigned int nsfont_encode_char (struct font *font, int c) { @@ -931,7 +931,7 @@ when setting family in ns_spec_to_descriptor(). */ if (c > 0xFFFF) return FONT_INVALID_CODE; - /* did we already cache this block? */ + /* Did we already cache this block? */ if (!font_info->glyphs[high]) ns_uni_to_glyphs (font_info, high); @@ -942,7 +942,7 @@ when setting family in ns_spec_to_descriptor(). */ /* Perform the size computation of glyphs of FONT and fill in members of METRICS. The glyphs are specified by their glyph codes in - CODE (length NGLYPHS). */ + CODE (length NGLYPHS). */ static void nsfont_text_extents (struct font *font, unsigned int *code, int nglyphs, struct font_metrics *metrics) @@ -985,11 +985,11 @@ when setting family in ns_spec_to_descriptor(). */ /* Draw glyphs between FROM and TO of S->char2b at (X Y) pixel position of frame F with S->FACE and S->GC. If WITH_BACKGROUND, fill the background in advance. It is assured that WITH_BACKGROUND - is false when (FROM > 0 || TO < S->nchars). */ + is false when (FROM > 0 || TO < S->nchars). */ static int nsfont_draw (struct glyph_string *s, int from, int to, int x, int y, bool with_background) -/* NOTE: focus and clip must be set */ +/* NOTE: focus and clip must be set. */ { static unsigned char cbuf[1024]; unsigned char *c = cbuf; @@ -1019,7 +1019,7 @@ is false when (FROM > 0 || TO < S->nchars). */ if (font == NULL) font = (struct nsfont_info *)FRAME_FONT (s->f); - /* Select face based on input flags */ + /* Select face based on input flags. */ flags = s->hl == DRAW_CURSOR ? NS_DUMPGLYPH_CURSOR : (s->hl == DRAW_MOUSE_FACE ? NS_DUMPGLYPH_MOUSEFACE : (s->for_overlaps ? NS_DUMPGLYPH_FOREGROUND : @@ -1049,11 +1049,11 @@ is false when (FROM > 0 || TO < S->nchars). */ /* Convert UTF-16 (?) to UTF-8 and determine advances. Note if we just ask NS to render the string, it will come out differently from the individual - character widths added up because of layout processing. */ + character widths added up because of layout processing. */ { int cwidth, twidth = 0; int hi, lo; - /* FIXME: composition: no vertical displacement is considered. */ + /* FIXME: composition: no vertical displacement is considered. */ t += from; /* advance into composition */ for (i = from; i < to; i++, t++) { @@ -1082,14 +1082,14 @@ is false when (FROM > 0 || TO < S->nchars). */ } else { - if (!font->metrics[hi]) /* FIXME: why/how can we need this now? */ + if (!font->metrics[hi]) /* FIXME: why/how can we need this now? */ ns_glyph_metrics (font, hi); cwidth = font->metrics[hi][lo].width; } twidth += cwidth; #ifdef NS_IMPL_GNUSTEP *adv++ = cwidth; - CHAR_STRING_ADVANCE (*t, c); /* this converts the char to UTF-8 */ + CHAR_STRING_ADVANCE (*t, c); /* This converts the char to UTF-8. */ #else (*adv++).width = cwidth; #endif @@ -1099,7 +1099,7 @@ is false when (FROM > 0 || TO < S->nchars). */ *c = 0; } - /* fill background if requested */ + /* Fill background if requested. */ if (with_background && !isComposite) { NSRect br = r; @@ -1119,7 +1119,7 @@ is false when (FROM > 0 || TO < S->nchars). */ } if (s->face->box == FACE_NO_BOX) { - /* expand unboxed top row over internal border */ + /* Expand unboxed top row over internal border. */ if (br.origin.y <= fibw + 1 + mbox_line_width) { br.size.height += br.origin.y; @@ -1258,7 +1258,7 @@ is false when (FROM > 0 || TO < S->nchars). */ ========================================================================== */ /* Find and cache corresponding glyph codes for unicode values in given - hi-byte block of 256. */ + hi-byte block of 256. */ static void ns_uni_to_glyphs (struct nsfont_info *font_info, unsigned char block) { @@ -1288,7 +1288,7 @@ is false when (FROM > 0 || TO < S->nchars). */ if (!unichars || !(font_info->glyphs[block])) emacs_abort (); - /* create a string containing all Unicode characters in this block */ + /* Create a string containing all Unicode characters in this block. */ for (idx = block<<8, i = 0; i < 0x100; idx++, i++) if (idx < 0xD800 || idx > 0xDFFF) unichars[i] = idx; @@ -1303,7 +1303,7 @@ is false when (FROM > 0 || TO < S->nchars). */ length: 0x100 freeWhenDone: NO]; NSGlyphGenerator *glyphGenerator = [NSGlyphGenerator sharedGlyphGenerator]; - /*NSCharacterSet *coveredChars = [nsfont coveredCharacterSet]; */ + /* NSCharacterSet *coveredChars = [nsfont coveredCharacterSet]; */ unsigned int numGlyphs = [font_info->nsfont numberOfGlyphs]; NSUInteger gInd = 0, cInd = 0; @@ -1319,9 +1319,9 @@ is false when (FROM > 0 || TO < S->nchars). */ g = unichars[i]; #else g = glyphStorage->cglyphs[i]; - /* TODO: is this a good check? maybe need to use coveredChars.. */ + /* TODO: is this a good check? Maybe need to use coveredChars. */ if (g > numGlyphs || g == NSNullGlyph) - g = INVALID_GLYPH; /* hopefully unused... */ + g = INVALID_GLYPH; /* Hopefully unused... */ #endif *glyphs = g; } @@ -1337,7 +1337,7 @@ is false when (FROM > 0 || TO < S->nchars). */ /* Determine and cache metrics for corresponding glyph codes in given - hi-byte block of 256. */ + hi-byte block of 256. */ static void ns_glyph_metrics (struct nsfont_info *font_info, unsigned char block) { @@ -1387,16 +1387,16 @@ is false when (FROM > 0 || TO < S->nchars). */ metrics->rbearing = lrint (w + rb + LCD_SMOOTHING_MARGIN); metrics->descent = r.origin.y < 0 ? -r.origin.y : 0; - /*lrint (hshrink * [sfont ascender] + expand * hd/2); */ + /* lrint (hshrink * [sfont ascender] + expand * hd/2); */ metrics->ascent = r.size.height - metrics->descent; -/*-lrint (hshrink* [sfont descender] - expand * hd/2); */ + /* -lrint (hshrink* [sfont descender] - expand * hd/2); */ } unblock_input (); } #ifdef NS_IMPL_COCOA -/* helper for font glyph setup */ +/* Helper for font glyph setup. */ @implementation EmacsGlyphStorage - init @@ -1508,7 +1508,7 @@ - (void)setIntAttribute: (NSInteger)attributeTag value: (NSInteger)val DEFSYM (Qapple, "apple"); DEFSYM (Qmedium, "medium"); DEFVAR_LISP ("ns-reg-to-script", Vns_reg_to_script, - doc: /* Internal use: maps font registry to Unicode script. */); + doc: /* Internal use: maps font registry to Unicode script. */); ascii_printable = NULL; } diff --git a/src/nsgui.h b/src/nsgui.h index 92ea6350d6..4e7d7d35da 100644 --- a/src/nsgui.h +++ b/src/nsgui.h @@ -19,7 +19,7 @@ along with GNU Emacs. If not, see . */ #ifndef __NSGUI_H__ #define __NSGUI_H__ -/* this gets included from a couple of the plain (non-NS) .c files */ +/* This gets included from a couple of the plain (non-NS) .c files. */ #ifdef __OBJC__ #ifdef NS_IMPL_COCOA @@ -75,7 +75,7 @@ typedef unichar XChar2b; /* XXX: xfaces requires these structures, but the question is are we - forced to use them? */ + forced to use them? */ typedef struct _XGCValues { unsigned long foreground; @@ -119,8 +119,8 @@ typedef int Display; typedef Lisp_Object XrmDatabase; -/* some sort of attempt to normalize rectangle handling.. seems a bit much - for what is accomplished */ +/* Some sort of attempt to normalize rectangle handling. Seems a bit + much for what is accomplished. */ typedef struct { int x, y; unsigned width, height; @@ -160,7 +160,7 @@ typedef struct _NSRect { NSPoint origin; NSSize size; } NSRect; -/* This stuff needed by frame.c. */ +/* This stuff needed by frame.c. */ #define ForgetGravity 0 #define NorthWestGravity 1 #define NorthGravity 2 diff --git a/src/nsimage.m b/src/nsimage.m index e9af58b8af..2cc205a499 100644 --- a/src/nsimage.m +++ b/src/nsimage.m @@ -26,7 +26,7 @@ Updated by Christian Limpach (chris@nice.ch) */ /* This should be the first include, as it may set up #defines affecting - interpretation of even the system includes. */ + interpretation of even the system includes. */ #include #include "lisp.h" @@ -41,7 +41,7 @@ Updated by Christian Limpach (chris@nice.ch) C interface. This allows easy calling from C files. We could just compile everything as Objective-C, but that might mean slower - compilation and possible difficulties on some platforms.. + compilation and possible difficulties on some platforms. ========================================================================== */ @@ -226,7 +226,7 @@ - (void)dealloc /* Create image from monochrome bitmap. If both FG and BG are 0 - (black), set the background to white and make it transparent. */ + (black), set the background to white and make it transparent. */ - (instancetype)initFromXBM: (unsigned char *)bits width: (int)w height: (int)h fg: (unsigned long)fg bg: (unsigned long)bg { @@ -251,7 +251,7 @@ - (instancetype)initFromXBM: (unsigned char *)bits width: (int)w height: (int)h } { - /* pull bits out to set the (bytewise) alpha mask */ + /* Pull bits out to set the (bytewise) alpha mask. */ int i, j, k; unsigned char *s = bits; unsigned char *rr = planes[0]; @@ -362,7 +362,7 @@ - (instancetype)initForXPMWithDepth: (int)depth width: (int)width height: (int)h } -/* attempt to pull out pixmap data from a BitmapImageRep; returns NO if fails */ +/* Attempt to pull out pixmap data from a BitmapImageRep; returns NO if fails. */ - (void) setPixmapData { NSEnumerator *reps; @@ -386,15 +386,15 @@ - (void) setPixmapData } -/* note; this and next work only for image created with initForXPMWithDepth, - initFromSkipXBM, or where setPixmapData was called successfully */ +/* Note: this and next work only for image created with initForXPMWithDepth, + initFromSkipXBM, or where setPixmapData was called successfully. */ /* return ARGB */ - (unsigned long) getPixelAtX: (int)x Y: (int)y { if (bmRep == nil) return 0; - /* this method is faster but won't work for bitmaps */ + /* This method is faster but won't work for bitmaps. */ if (pixmapData[0] != NULL) { int loc = x + y * [self size].width; @@ -457,7 +457,7 @@ - (void) setAlphaAtX: (int) x Y: (int) y to: (unsigned char) a } } -/* returns a pattern color, which is cached here */ +/* Returns a pattern color, which is cached here. */ - (NSColor *)stippleMask { if (stippleMask == nil) @@ -465,7 +465,7 @@ - (NSColor *)stippleMask return stippleMask; } -/* Find the first NSBitmapImageRep which has multiple frames. */ +/* Find the first NSBitmapImageRep which has multiple frames. */ - (NSBitmapImageRep *)getAnimatedBitmapImageRep { for (NSImageRep * r in [self representations]) @@ -481,7 +481,7 @@ - (NSBitmapImageRep *)getAnimatedBitmapImageRep } /* If the image has multiple frames, get a count of them and the - animation delay, if available. */ + animation delay, if available. */ - (Lisp_Object)getMetadata { Lisp_Object metadata = Qnil; @@ -502,7 +502,7 @@ - (Lisp_Object)getMetadata return metadata; } -/* Attempt to set the animation frame to be displayed. */ +/* Attempt to set the animation frame to be displayed. */ - (BOOL)setFrame: (unsigned int) index { NSBitmapImageRep * bm = [self getAnimatedBitmapImageRep]; @@ -511,7 +511,7 @@ - (BOOL)setFrame: (unsigned int) index { int frames = [[bm valueForProperty:NSImageFrameCount] intValue]; - /* If index is invalid, give up. */ + /* If index is invalid, give up. */ if (index < 0 || index > frames) return NO; @@ -520,7 +520,7 @@ - (BOOL)setFrame: (unsigned int) index } /* Setting the frame has succeeded, or the image doesn't have - multiple frames. */ + multiple frames. */ return YES; } diff --git a/src/nsmenu.m b/src/nsmenu.m index 29b0f99e64..a438952818 100644 --- a/src/nsmenu.m +++ b/src/nsmenu.m @@ -22,7 +22,7 @@ Carbon version by Yamamoto Mitsuharu. */ /* This should be the first include, as it may set up #defines affecting - interpretation of even the system includes. */ + interpretation of even the system includes. */ #include #include "lisp.h" @@ -47,7 +47,7 @@ #if 0 -/* Include lisp -> C common menu parsing code */ +/* Include lisp -> C common menu parsing code. */ #define ENCODE_MENU_STRING(str) ENCODE_UTF_8 (str) #include "nsmenu_common.c" #endif @@ -62,7 +62,7 @@ /* NOTE: toolbar implementation is at end, - following complete menu implementation. */ + following complete menu implementation. */ /* ========================================================================== @@ -74,7 +74,7 @@ /* Supposed to discard menubar and free storage. Since we share the menubar among frames and update its context for the focused window, - there is nothing to do here. */ + there is nothing to do here. */ void free_frame_menubar (struct frame *f) { @@ -123,7 +123,7 @@ block_input (); pool = [[NSAutoreleasePool alloc] init]; - /* Menu may have been created automatically; if so, discard it. */ + /* Menu may have been created automatically; if so, discard it. */ if ([menu isKindOfClass: [EmacsMenu class]] == NO) { [menu release]; @@ -147,7 +147,7 @@ if (deep_p) { - /* Fully parse one or more of the submenus. */ + /* Fully parse one or more of the submenus. */ int n = 0; int *submenu_start, *submenu_end; bool *submenu_top_level_items; @@ -172,8 +172,8 @@ set_buffer_internal_1 (XBUFFER (buffer)); /* TODO: for some reason this is not needed in other terms, - but some menu updates call Info-extract-pointer which causes - abort-on-error if waiting-for-input. Needs further investigation. */ + but some menu updates call Info-extract-pointer which causes + abort-on-error if waiting-for-input. Needs further investigation. */ owfi = waiting_for_input; waiting_for_input = 0; @@ -214,10 +214,10 @@ break; /* FIXME: we'd like to only parse the needed submenu, but this - was causing crashes in the _common parsing code.. need to make - sure proper initialization done.. */ -/* if (submenu && strcmp ([[submenu title] UTF8String], SSDATA (string))) - continue; */ + was causing crashes in the _common parsing code: need to make + sure proper initialization done. */ + /* if (submenu && strcmp ([[submenu title] UTF8String], SSDATA (string))) + continue; */ submenu_start[i] = menu_items_used; @@ -267,17 +267,17 @@ set_buffer_internal_1 (prev); - /* Compare the new menu items with previous, and leave off if no change */ + /* Compare the new menu items with previous, and leave off if no change. */ /* FIXME: following other terms here, but seems like this should be - done before parse stage 2 above, since its results aren't used */ + done before parse stage 2 above, since its results aren't used. */ if (previous_menu_items_used && (!submenu || (submenu && submenu == last_submenu)) && menu_items_used == previous_menu_items_used) { for (i = 0; i < previous_menu_items_used; i++) /* FIXME: this ALWAYS fails on Buffers menu items.. something - about their strings causes them to change every time, so we - double-check failures */ + about their strings causes them to change every time, so we + double-check failures. */ if (!EQ (previous_items[i], AREF (menu_items, i))) if (!(STRINGP (previous_items[i]) && STRINGP (AREF (menu_items, i)) @@ -286,7 +286,7 @@ break; if (i == previous_menu_items_used) { - /* No change.. */ + /* No change. */ #if NSMENUPROFILE ftime (&tb); @@ -302,16 +302,16 @@ return; } } - /* The menu items are different, so store them in the frame */ - /* FIXME: this is not correct for single-submenu case */ + /* The menu items are different, so store them in the frame. */ + /* FIXME: this is not correct for single-submenu case. */ fset_menu_bar_vector (f, menu_items); f->menu_bar_items_used = menu_items_used; - /* Calls restore_menu_items, etc., as they were outside */ + /* Calls restore_menu_items, etc., as they were outside. */ unbind_to (specpdl_count, Qnil); /* Parse stage 2a: now GC cannot happen during the lifetime of the - widget_value, so it's safe to store data from a Lisp_String */ + widget_value, so it's safe to store data from a Lisp_String. */ wv = first_wv->contents; for (i = 0; i < ASIZE (items); i += 4) { @@ -326,7 +326,7 @@ } /* Now, update the NS menu; if we have a submenu, use that, otherwise - create a new menu for each sub and fill it. */ + create a new menu for each sub and fill it. */ if (submenu) { const char *submenuTitle = [[submenu title] UTF8String]; @@ -358,7 +358,7 @@ wv->button_type = BUTTON_TYPE_NONE; first_wv = wv; - /* Make widget-value tree w/ just the top level menu bar strings */ + /* Make widget-value tree with just the top level menu bar strings. */ items = FRAME_MENU_BAR_ITEMS (f); if (NILP (items)) { @@ -369,7 +369,7 @@ } - /* check if no change.. this mechanism is a bit rough, but ready */ + /* Check if no change: this mechanism is a bit rough, but ready. */ n = ASIZE (items) / 4; if (f == last_f && n_previous_strings == n) { @@ -416,10 +416,10 @@ wv->call_data = (void *) (intptr_t) (-1); #ifdef NS_IMPL_COCOA - /* we'll update the real copy under app menu when time comes */ + /* We'll update the real copy under app menu when time comes. */ if (!strcmp ("Services", wv->name)) { - /* but we need to make sure it will update on demand */ + /* But we need to make sure it will update on demand. */ [svcsMenu setFrame: f]; } else @@ -461,7 +461,7 @@ /* Main emacs core entry point for menubar menus: called to indicate that the frame's menus have changed, and the *step representation should be updated - from Lisp. */ + from Lisp. */ void set_frame_menubar (struct frame *f, bool first_time, bool deep_p) { @@ -489,7 +489,7 @@ /* Menu that can define itself from Emacs "widget_value"s and will lazily update itself when user clicked. Based on Carbon/AppKit implementation - by Yamamoto Mitsuharu. */ + by Yamamoto Mitsuharu. */ @implementation EmacsMenu /* override designated initializer */ @@ -556,8 +556,8 @@ - (void)menuDidClose:(NSMenu *)menu #endif /* NS_IMPL_COCOA */ -/* delegate method called when a submenu is being opened: run a 'deep' call - to set_frame_menubar */ +/* Delegate method called when a submenu is being opened: run a 'deep' call + to set_frame_menubar. */ - (void)menuNeedsUpdate: (NSMenu *)menu { if (!FRAME_LIVE_P (frame)) @@ -664,7 +664,7 @@ - (NSMenuItem *)addItemWithWidgetValue: (void *)wvptr [item setEnabled: wv->enabled]; - /* Draw radio buttons and tickboxes */ + /* Draw radio buttons and tickboxes. */ if (wv->selected && (wv->button_type == BUTTON_TYPE_TOGGLE || wv->button_type == BUTTON_TYPE_RADIO)) [item setState: NSOnState]; @@ -735,7 +735,7 @@ - (void)fillWithWidgetValue: (void *)wvptr frame: (struct frame *)f } -/* adds an empty submenu and returns it */ +/* Adds an empty submenu and returns it. */ - (EmacsMenu *)addSubmenuWithTitle: (const char *)title forFrame: (struct frame *)f { NSString *titleStr = [NSString stringWithUTF8String: title]; @@ -748,7 +748,7 @@ - (EmacsMenu *)addSubmenuWithTitle: (const char *)title forFrame: (struct frame return submenu; } -/* run a menu in popup mode */ +/* Run a menu in popup mode. */ - (Lisp_Object)runMenuAt: (NSPoint)p forFrame: (struct frame *)f keymaps: (bool)keymaps { @@ -756,7 +756,7 @@ - (Lisp_Object)runMenuAt: (NSPoint)p forFrame: (struct frame *)f NSEvent *e, *event; long retVal; -/* p = [view convertPoint:p fromView: nil]; */ + /* p = [view convertPoint:p fromView: nil]; */ p.y = NSHeight ([view frame]) - p.y; e = [[view window] currentEvent]; event = [NSEvent mouseEventWithType: NSEventTypeRightMouseDown @@ -765,7 +765,7 @@ - (Lisp_Object)runMenuAt: (NSPoint)p forFrame: (struct frame *)f timestamp: [e timestamp] windowNumber: [[view window] windowNumber] context: nil - eventNumber: 0/*[e eventNumber] */ + eventNumber: 0 /* [e eventNumber] */ clickCount: 1 pressure: 0]; @@ -811,14 +811,14 @@ - (Lisp_Object)runMenuAt: (NSPoint)p forFrame: (struct frame *)f first_wv = wv; #if 0 - /* FIXME: a couple of one-line differences prevent reuse */ + /* FIXME: a couple of one-line differences prevent reuse. */ wv = digest_single_submenu (0, menu_items_used, 0); #else { widget_value *save_wv = 0, *prev_wv = 0; widget_value **submenu_stack = alloca (menu_items_used * sizeof *submenu_stack); -/* Lisp_Object *subprefix_stack + /* Lisp_Object *subprefix_stack = alloca (menu_items_used * sizeof *subprefix_stack); */ int submenu_depth = 0; int first_pane = 1; @@ -1009,8 +1009,8 @@ - (Lisp_Object)runMenuAt: (NSPoint)p forFrame: (struct frame *)f block_input (); view->wait_for_tool_bar = NO; - /* Note: This trigger an animation, which calls windowDidResize - repeatedly. */ + /* Note: This triggers an animation, which calls windowDidResize + repeatedly. */ f->output_data.ns->in_animation = 1; [[view toolbar] setVisible: NO]; f->output_data.ns->in_animation = 0; @@ -1021,7 +1021,7 @@ - (Lisp_Object)runMenuAt: (NSPoint)p forFrame: (struct frame *)f void update_frame_tool_bar (struct frame *f) /* -------------------------------------------------------------------------- - Update toolbar contents + Update toolbar contents. -------------------------------------------------------------------------- */ { int i, k = 0; @@ -1042,7 +1042,7 @@ - (Lisp_Object)runMenuAt: (NSPoint)p forFrame: (struct frame *)f [toolbar clearAll]; #endif - /* update EmacsToolbar as in GtkUtils, build items list */ + /* Update EmacsToolbar as in GtkUtils, build items list. */ for (i = 0; i < f->n_tool_bar_items; ++i) { #define TOOLPROP(IDX) AREF (f->tool_bar_items, \ @@ -1070,7 +1070,7 @@ - (Lisp_Object)runMenuAt: (NSPoint)p forFrame: (struct frame *)f image = TOOLPROP (TOOL_BAR_ITEM_IMAGES); if (VECTORP (image)) { - /* NS toolbar auto-computes disabled and selected images */ + /* NS toolbar auto-computes disabled and selected images. */ idx = TOOL_BAR_IMAGE_ENABLED_SELECTED; eassert (ASIZE (image) >= idx); image = AREF (image, idx); @@ -1119,7 +1119,7 @@ - (Lisp_Object)runMenuAt: (NSPoint)p forFrame: (struct frame *)f #ifdef NS_IMPL_COCOA if ([toolbar changed]) { - /* inform app that toolbar has changed */ + /* Inform app that toolbar has changed. */ NSDictionary *dict = [toolbar configurationDictionary]; NSMutableDictionary *newDict = [dict mutableCopy]; NSEnumerator *keys = [[dict allKeys] objectEnumerator]; @@ -1252,7 +1252,7 @@ - (void) addDisplayItemWithImage: (EmacsImage *)img } /* This overrides super's implementation, which automatically sets - all items to enabled state (for some reason). */ + all items to enabled state (for some reason). */ - (void)validateVisibleItems { NSTRACE ("[EmacsToolbar validateVisibleItems]"); @@ -1267,7 +1267,7 @@ - (NSToolbarItem *)toolbar: (NSToolbar *)toolbar { NSTRACE ("[EmacsToolbar toolbar: ...]"); - /* look up NSToolbarItem by identifier and return... */ + /* Look up NSToolbarItem by identifier and return... */ return [identifierToItem objectForKey: itemIdentifier]; } @@ -1275,7 +1275,7 @@ - (NSArray *)toolbarDefaultItemIdentifiers: (NSToolbar *)toolbar { NSTRACE ("[EmacsToolbar toolbarDefaultItemIdentifiers:]"); - /* return entire set.. */ + /* Return entire set. */ return activeIdentifiers; } @@ -1284,7 +1284,7 @@ - (NSArray *)toolbarAllowedItemIdentifiers: (NSToolbar *)toolbar { NSTRACE ("[EmacsToolbar toolbarAllowedItemIdentifiers:]"); - /* return entire set... */ + /* return entire set... */ return activeIdentifiers; //return [identifierToItem allKeys]; } @@ -1313,7 +1313,7 @@ - (void)setVisible:(BOOL)shown ========================================================================== */ /* Needed because NeXTstep does not provide enough control over tooltip - display. */ + display. */ @implementation EmacsTooltip - (instancetype)init @@ -1323,7 +1323,7 @@ - (instancetype)init NSFont *font = [NSFont toolTipsFontOfSize: 0]; NSFont *sfont = [font screenFont]; int height = [sfont ascender] - [sfont descender]; -/*[font boundingRectForFont].size.height; */ + /* [font boundingRectForFont].size.height; */ NSRect r = NSMakeRect (0, 0, 100, height+6); textField = [[NSTextField alloc] initWithFrame: r]; @@ -1345,7 +1345,7 @@ - (instancetype)init [win setReleasedWhenClosed: NO]; [win setDelegate: self]; [[win contentView] addSubview: textField]; -/* [win setBackgroundColor: col]; */ + /* [win setBackgroundColor: col]; */ [win setOpaque: NO]; return self; @@ -1558,7 +1558,7 @@ - (instancetype)initWithContentRect: (NSRect)contentRect styleMask: (NSWindowSty [self setTitle: @""]; area.origin.x += ICONSIZE+2*SPACER; -/* area.origin.y = TEXTHEIGHT; ICONSIZE/2-10+SPACER; */ + /* area.origin.y = TEXTHEIGHT; ICONSIZE/2-10+SPACER; */ area.size.width = 400; area.size.height= TEXTHEIGHT; command = [[[NSTextField alloc] initWithFrame: area] autorelease]; @@ -1569,16 +1569,16 @@ - (instancetype)initWithContentRect: (NSRect)contentRect styleMask: (NSWindowSty [command setSelectable: NO]; [command setFont: [NSFont boldSystemFontOfSize: 13.0]]; -/* area.origin.x = ICONSIZE+2*SPACER; + /* area.origin.x = ICONSIZE+2*SPACER; area.origin.y = TEXTHEIGHT + 2*SPACER; area.size.width = 400; area.size.height= 2; tem = [[[NSBox alloc] initWithFrame: area] autorelease]; [[self contentView] addSubview: tem]; [tem setTitlePosition: NSNoTitle]; - [tem setAutoresizingMask: NSViewWidthSizable];*/ + [tem setAutoresizingMask: NSViewWidthSizable]; */ -/* area.origin.x = ICONSIZE+2*SPACER; */ + /* area.origin.x = ICONSIZE+2*SPACER; */ area.origin.y += TEXTHEIGHT+SPACER; area.size.width = 400; area.size.height= TEXTHEIGHT; @@ -1746,7 +1746,7 @@ - (instancetype)initFromContents: (Lisp_Object)contents isQuestion: (BOOL)isQ int i; NSRect r, s, t; - if (cols == 1 && rows > 1) /* Never told where to split */ + if (cols == 1 && rows > 1) /* Never told where to split. */ { [matrix addColumn]; for (i = 0; i < rows/2; i++) @@ -1810,9 +1810,9 @@ - (void)timeout_handler: (NSTimer *)timedEntry data2: 0]; timer_fired = YES; - /* We use sto because stopModal/abortModal out of the main loop does not - seem to work in 10.6. But as we use stop we must send a real event so - the stop is seen and acted upon. */ + /* We use stop because stopModal/abortModal out of the main loop + does not seem to work in 10.6. But as we use stop we must send a + real event so the stop is seen and acted upon. */ [NSApp stop:self]; [NSApp postEvent: nxev atStart: NO]; } @@ -1843,7 +1843,7 @@ - (Lisp_Object)runDialogAt: (NSPoint)p ret = dialog_return; if (! timer_fired) { - if (tmo != nil) [tmo invalidate]; /* Cancels timer */ + if (tmo != nil) [tmo invalidate]; /* Cancels timer. */ break; } } @@ -1874,7 +1874,7 @@ - (Lisp_Object)runDialogAt: (NSPoint)p DEFUN ("menu-or-popup-active-p", Fmenu_or_popup_active_p, Smenu_or_popup_active_p, 0, 0, 0, - doc: /* SKIP: real doc in xmenu.c. */) + doc: /* SKIP: real doc in xmenu.c. */) (void) { return popup_activated () ? Qt : Qnil; diff --git a/src/nsselect.m b/src/nsselect.m index d8b4e2c7af..c72f179ab3 100644 --- a/src/nsselect.m +++ b/src/nsselect.m @@ -36,7 +36,7 @@ Updated by Christian Limpach (chris@nice.ch) static Lisp_Object Vselection_alist; -/* NSPasteboardNameGeneral is pretty much analogous to X11 CLIPBOARD */ +/* NSPasteboardNameGeneral is pretty much analogous to X11 CLIPBOARD. */ static NSString *NXPrimaryPboard; static NSString *NXSecondaryPboard; diff --git a/src/nsterm.h b/src/nsterm.h index df59a7dbd9..a9635374c7 100644 --- a/src/nsterm.h +++ b/src/nsterm.h @@ -29,7 +29,7 @@ along with GNU Emacs. If not, see . */ /* CGFloat on GNUstep may be 4 or 8 byte, but functions expect float* for some versions. - On Cocoa >= 10.5, functions expect CGFloat *. Make compatible type. */ + On Cocoa >= 10.5, functions expect CGFloat *. Make compatible type. */ #ifdef NS_IMPL_COCOA typedef CGFloat EmacsCGFloat; #elif GNUSTEP_GUI_MAJOR_VERSION > 0 || GNUSTEP_GUI_MINOR_VERSION >= 22 @@ -85,7 +85,7 @@ typedef float EmacsCGFloat; can become misaligned, as all threads (currently) share one state. This is post prominent when the EVENTS part is enabled. - Note that the trace system, when enabled, use the GCC/Clang + Note that the trace system, when enabled, uses the GCC/Clang "cleanup" extension. */ /* For example, the following is the output of `M-x @@ -170,7 +170,7 @@ void nstrace_leave(int *); void nstrace_restore_global_trace_state(int *); char const * nstrace_fullscreen_type_name (int); -/* printf-style trace output. Output is aligned with contained heading. */ +/* printf-style trace output. Output is aligned with contained heading. */ #define NSTRACE_MSG_NO_DASHES(...) \ do \ { \ @@ -192,7 +192,7 @@ char const * nstrace_fullscreen_type_name (int); /* Macros for printing complex types. NSTRACE_FMT_what -- Printf format string for "what". - NSTRACE_ARG_what(x) -- Printf argument for "what". */ + NSTRACE_ARG_what(x) -- Printf argument for "what". */ #define NSTRACE_FMT_SIZE "(W:%.0f H:%.0f)" #define NSTRACE_ARG_SIZE(elt) (elt).width, (elt).height @@ -208,7 +208,7 @@ char const * nstrace_fullscreen_type_name (int); #define NSTRACE_ARG_FSTYPE(elt) nstrace_fullscreen_type_name(elt) -/* Macros for printing complex types as extra information. */ +/* Macros for printing complex types as extra information. */ #define NSTRACE_SIZE(str,size) \ NSTRACE_MSG (str ": " NSTRACE_FMT_SIZE, \ @@ -236,7 +236,7 @@ char const * nstrace_fullscreen_type_name (int); NSTRACE_FMT_RETURN - A string literal representing a returned value. Useful when creating a format string - to printf-like constructs like NSTRACE(). */ + to printf-like constructs like NSTRACE(). */ #define NSTRACE_FMT_RETURN "->>" @@ -262,7 +262,7 @@ char const * nstrace_fullscreen_type_name (int); NSTRACE_WHEN (cond, fmt, ...) -- Enable trace output when COND is true. NSTRACE_UNLESS (cond, fmt, ...) -- Enable trace output unless COND is - true. */ + true. */ @@ -278,7 +278,7 @@ char const * nstrace_fullscreen_type_name (int); /* Unsilence called functions. Concretely, this us used to allow "event" functions to be silenced - while trace output can be printed for functions they call. */ + while trace output can be printed for functions they call. */ #define NSTRACE_UNSILENCE() do { nstrace_enabled_global = 1; } while(0) #endif /* NSTRACE_ENABLED */ @@ -286,7 +286,7 @@ char const * nstrace_fullscreen_type_name (int); #define NSTRACE(...) NSTRACE_WHEN(1, __VA_ARGS__) #define NSTRACE_UNLESS(cond, ...) NSTRACE_WHEN(!(cond), __VA_ARGS__) -/* Non-trace replacement versions. */ +/* Non-trace replacement versions. */ #ifndef NSTRACE_WHEN #define NSTRACE_WHEN(...) #endif @@ -332,7 +332,7 @@ char const * nstrace_fullscreen_type_name (int); #endif -/* If the compiler doesn't support instancetype, map it to id. */ +/* If the compiler doesn't support instancetype, map it to id. */ #ifndef NATIVE_OBJC_INSTANCETYPE typedef id instancetype; #endif @@ -356,7 +356,7 @@ typedef id instancetype; ========================================================================== */ -/* We override sendEvent: as a means to stop/start the event loop */ +/* We override sendEvent: as a means to stop/start the event loop. */ @interface EmacsApp : NSApplication { #ifdef NS_IMPL_COCOA @@ -456,7 +456,7 @@ typedef id instancetype; #endif - (int)fullscreenState; -/* Non-notification versions of NSView methods. Used for direct calls. */ +/* Non-notification versions of NSView methods. Used for direct calls. */ - (void)windowWillEnterFullScreen; - (void)windowDidEnterFullScreen; - (void)windowWillExitFullScreen; @@ -465,7 +465,7 @@ typedef id instancetype; @end -/* Small utility used for processing resize events under Cocoa. */ +/* Small utility used for processing resize events under Cocoa. */ @interface EmacsWindow : NSWindow { NSPoint grabOffset; @@ -722,7 +722,7 @@ extern NSArray *ns_send_types, *ns_return_types; extern NSString *ns_app_name; extern EmacsMenu *svcsMenu; -/* Apple removed the declaration, but kept the implementation */ +/* Apple removed the declaration, but kept the implementation. */ #if defined (NS_IMPL_COCOA) @interface NSApplication (EmacsApp) - (void)setAppleMenu: (NSMenu *)menu; @@ -752,8 +752,8 @@ extern EmacsMenu *svcsMenu; #define KEY_NS_TOGGLE_TOOLBAR ((1<<28)|(0<<16)|13) #define KEY_NS_SHOW_PREFS ((1<<28)|(0<<16)|14) -/* could use list to store these, but rest of emacs has a big infrastructure - for managing a table of bitmap "records" */ +/* Could use list to store these, but rest of emacs has a big infrastructure + for managing a table of bitmap "records". */ struct ns_bitmap_record { #ifdef __OBJC__ @@ -766,7 +766,7 @@ struct ns_bitmap_record int height, width, depth; }; -/* this to map between emacs color indices and NSColor objects */ +/* This maps between emacs color indices and NSColor objects. */ struct ns_color_table { ptrdiff_t size; @@ -790,7 +790,7 @@ struct ns_color_table #define BLUE_FROM_ULONG(color) ((color) & 0xff) /* Do not change `* 0x101' in the following lines to `<< 8'. If - changed, image masks in 1-bit depth will not work. */ + changed, image masks in 1-bit depth will not work. */ #define RED16_FROM_ULONG(color) (RED_FROM_ULONG(color) * 0x101) #define GREEN16_FROM_ULONG(color) (GREEN_FROM_ULONG(color) * 0x101) #define BLUE16_FROM_ULONG(color) (BLUE_FROM_ULONG(color) * 0x101) @@ -802,7 +802,7 @@ struct nsfont_info char *name; /* PostScript name, uniquely identifies on NS systems */ - /* The following metrics are stored as float rather than int. */ + /* The following metrics are stored as float rather than int. */ float width; /* Maximum advance for the font. */ float height; @@ -823,26 +823,26 @@ struct nsfont_info char bold, ital; /* convenience flags */ char synthItal; XCharStruct max_bounds; - /* we compute glyph codes and metrics on-demand in blocks of 256 indexed - by hibyte, lobyte */ + /* We compute glyph codes and metrics on-demand in blocks of 256 indexed + by hibyte, lobyte. */ unsigned short **glyphs; /* map Unicode index to glyph */ struct font_metrics **metrics; }; -/* init'd in ns_initialize_display_info () */ +/* Initialized in ns_initialize_display_info (). */ struct ns_display_info { /* Chain of all ns_display_info structures. */ struct ns_display_info *next; - /* The generic display parameters corresponding to this NS display. */ + /* The generic display parameters corresponding to this NS display. */ struct terminal *terminal; /* This is a cons cell of the form (NAME . FONT-LIST-CACHE). */ Lisp_Object name_list_element; - /* The number of fonts loaded. */ + /* The number of fonts loaded. */ int n_fonts; /* Minimum width over all characters in all fonts in font_table. */ @@ -872,10 +872,10 @@ struct ns_display_info /* Xism */ XrmDatabase xrdb; - /* The cursor to use for vertical scroll bars. */ + /* The cursor to use for vertical scroll bars. */ Cursor vertical_scroll_bar_cursor; - /* The cursor to use for horizontal scroll bars. */ + /* The cursor to use for horizontal scroll bars. */ Cursor horizontal_scroll_bar_cursor; /* Information about the range of text currently shown in @@ -931,7 +931,7 @@ struct ns_output void *toolbar; #endif - /* NSCursors init'ed in initFrameFromEmacs */ + /* NSCursors are initialized in initFrameFromEmacs. */ Cursor text_cursor; Cursor nontext_cursor; Cursor modeline_cursor; @@ -969,10 +969,10 @@ struct ns_output scroll bars, in pixels. */ int vertical_scroll_bar_extra; - /* The height of the titlebar decoration (included in NSWindow's frame). */ + /* The height of the titlebar decoration (included in NSWindow's frame). */ int titlebar_height; - /* The height of the toolbar if displayed, else 0. */ + /* The height of the toolbar if displayed, else 0. */ int toolbar_height; /* This is the Emacs structure for the NS display this frame is on. */ @@ -981,11 +981,11 @@ struct ns_output /* Non-zero if we are zooming (maximizing) the frame. */ int zooming; - /* Non-zero if we are doing an animation, e.g. toggling the tool bar. */ + /* Non-zero if we are doing an animation, e.g. toggling the tool bar. */ int in_animation; }; -/* this dummy decl needed to support TTYs */ +/* This dummy declaration needed to support TTYs. */ struct x_output { int unused; @@ -1024,7 +1024,7 @@ struct x_output #define XNS_SCROLL_BAR(vec) XSAVE_POINTER (vec, 0) #endif -/* Compute pixel height of the frame's titlebar. */ +/* Compute pixel height of the frame's titlebar. */ #define FRAME_NS_TITLEBAR_HEIGHT(f) \ (NSHeight([FRAME_NS_VIEW (f) frame]) == 0 ? \ 0 \ @@ -1033,7 +1033,7 @@ struct x_output [[FRAME_NS_VIEW (f) window] frame] \ styleMask:[[FRAME_NS_VIEW (f) window] styleMask]]))) -/* Compute pixel height of the toolbar. */ +/* Compute pixel height of the toolbar. */ #define FRAME_TOOLBAR_HEIGHT(f) \ (([[FRAME_NS_VIEW (f) window] toolbar] == nil \ || ! [[FRAME_NS_VIEW (f) window] toolbar].isVisible) ? \ @@ -1043,7 +1043,7 @@ struct x_output styleMask:[[FRAME_NS_VIEW (f) window] styleMask]]) \ - NSHeight([[[FRAME_NS_VIEW (f) window] contentView] frame]))) -/* Compute pixel size for vertical scroll bars */ +/* Compute pixel size for vertical scroll bars. */ #define NS_SCROLL_BAR_WIDTH(f) \ (FRAME_HAS_VERTICAL_SCROLL_BARS (f) \ ? rint (FRAME_CONFIG_SCROLL_BAR_WIDTH (f) > 0 \ @@ -1051,7 +1051,7 @@ struct x_output : (FRAME_SCROLL_BAR_COLS (f) * FRAME_COLUMN_WIDTH (f))) \ : 0) -/* Compute pixel size for horizontal scroll bars */ +/* Compute pixel size for horizontal scroll bars. */ #define NS_SCROLL_BAR_HEIGHT(f) \ (FRAME_HAS_HORIZONTAL_SCROLL_BARS (f) \ ? rint (FRAME_CONFIG_SCROLL_BAR_HEIGHT (f) > 0 \ @@ -1059,22 +1059,22 @@ struct x_output : (FRAME_SCROLL_BAR_LINES (f) * FRAME_LINE_HEIGHT (f))) \ : 0) -/* Difference btwn char-column-calculated and actual SB widths. - This is only a concern for rendering when SB on left. */ +/* Difference between char-column-calculated and actual SB widths. + This is only a concern for rendering when SB on left. */ #define NS_SCROLL_BAR_ADJUST(w, f) \ (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w) ? \ (FRAME_SCROLL_BAR_COLS (f) * FRAME_COLUMN_WIDTH (f) \ - NS_SCROLL_BAR_WIDTH (f)) : 0) -/* Difference btwn char-line-calculated and actual SB heights. - This is only a concern for rendering when SB on top. */ +/* Difference between char-line-calculated and actual SB heights. + This is only a concern for rendering when SB on top. */ #define NS_SCROLL_BAR_ADJUST_HORIZONTALLY(w, f) \ (WINDOW_HAS_HORIZONTAL_SCROLL_BARS (w) ? \ (FRAME_SCROLL_BAR_LINES (f) * FRAME_LINE_HEIGHT (f) \ - NS_SCROLL_BAR_HEIGHT (f)) : 0) /* Calculate system coordinates of the left and top of the parent - window or, if there is no parent window, the screen. */ + window or, if there is no parent window, the screen. */ #define NS_PARENT_WINDOW_LEFT_POS(f) \ (FRAME_PARENT_FRAME (f) != NULL \ ? [FRAME_NS_VIEW (FRAME_PARENT_FRAME (f)) window].frame.origin.x : 0) @@ -1094,7 +1094,7 @@ struct x_output #define WHITE_PIX_DEFAULT(f) 0xFFFFFF /* First position where characters can be shown (instead of scrollbar, if - it is on left. */ + it is on left. */ #define FIRST_CHAR_POSITION(f) \ (! (FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT (f)) ? 0 \ : FRAME_SCROLL_BAR_COLS (f)) @@ -1118,7 +1118,7 @@ extern void nsfont_make_fontset_for_font (Lisp_Object name, struct glyph_string; void ns_dump_glyphstring (struct glyph_string *s) EXTERNALLY_VISIBLE; -/* Implemented in nsterm, published in or needed from nsfns. */ +/* Implemented in nsterm, published in or needed from nsfns. */ extern Lisp_Object ns_list_fonts (struct frame *f, Lisp_Object pattern, int size, int maxnames); extern void ns_clear_frame (struct frame *f); @@ -1251,13 +1251,13 @@ extern char gnustep_base_version[]; /* version tracking */ #define MINWIDTH 10 #define MINHEIGHT 10 -/* Screen max coordinate - Using larger coordinates causes movewindow/placewindow to abort */ +/* Screen max coordinate -- using larger coordinates causes + movewindow/placewindow to abort. */ #define SCREENMAX 16000 #define NS_SCROLL_BAR_WIDTH_DEFAULT [EmacsScroller scrollerWidth] #define NS_SCROLL_BAR_HEIGHT_DEFAULT [EmacsScroller scrollerHeight] -/* This is to match emacs on other platforms, ugly though it is. */ +/* This is to match emacs on other platforms, ugly though it is. */ #define NS_SELECTION_BG_COLOR_DEFAULT @"LightGoldenrod2"; #define NS_SELECTION_FG_COLOR_DEFAULT @"Black"; #define RESIZE_HANDLE_SIZE 12 @@ -1267,7 +1267,7 @@ extern char gnustep_base_version[]; /* version tracking */ ? (min) : (((x)>(max)) ? (max) : (x))) #define SCREENMAXBOUND(x) (IN_BOUND (-SCREENMAX, x, SCREENMAX)) -/* macOS 10.7 introduces some new constants. */ +/* macOS 10.7 introduces some new constants. */ #if !defined (NS_IMPL_COCOA) || !defined (MAC_OS_X_VERSION_10_7) #define NSFullScreenWindowMask (1 << 14) #define NSWindowCollectionBehaviorFullScreenPrimary (1 << 7) @@ -1276,7 +1276,7 @@ extern char gnustep_base_version[]; /* version tracking */ #define NSAppKitVersionNumber10_7 1138 #endif /* !defined (MAC_OS_X_VERSION_10_7) */ -/* macOS 10.12 deprecates a bunch of constants. */ +/* macOS 10.12 deprecates a bunch of constants. */ #if !defined (NS_IMPL_COCOA) || !defined (MAC_OS_X_VERSION_10_12) #define NSEventModifierFlagCommand NSCommandKeyMask #define NSEventModifierFlagControl NSControlKeyMask @@ -1315,12 +1315,12 @@ extern char gnustep_base_version[]; /* version tracking */ #define NSControlSizeRegular NSRegularControlSize #define NSCompositingOperationCopy NSCompositeCopy -/* And adds NSWindowStyleMask. */ +/* And adds NSWindowStyleMask. */ #ifdef __OBJC__ typedef NSUInteger NSWindowStyleMask; #endif -/* Window tabbing mode enums are new too. */ +/* Window tabbing mode enums are new too. */ enum NSWindowTabbingMode { NSWindowTabbingModeAutomatic, diff --git a/src/nsterm.m b/src/nsterm.m index f9107c43ce..d6c1d72a63 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -27,7 +27,7 @@ Updated by Christian Limpach (chris@nice.ch) */ /* This should be the first include, as it may set up #defines affecting - interpretation of even the system includes. */ + interpretation of even the system includes. */ #include #include @@ -84,7 +84,7 @@ Updated by Christian Limpach (chris@nice.ch) #if NSTRACE_ENABLED /* The following use "volatile" since they can be accessed from - parallel threads. */ + parallel threads. */ volatile int nstrace_num = 0; volatile int nstrace_depth = 0; @@ -93,10 +93,10 @@ Updated by Christian Limpach (chris@nice.ch) TODO: This should really be a thread-local variable, to avoid that a function with disabled trace thread silence trace output in - another. However, in practice this seldom is a problem. */ + another. However, in practice this seldom is a problem. */ volatile int nstrace_enabled_global = 1; -/* Called when nstrace_enabled goes out of scope. */ +/* Called when nstrace_enabled goes out of scope. */ void nstrace_leave(int * pointer_to_nstrace_enabled) { if (*pointer_to_nstrace_enabled) @@ -106,7 +106,7 @@ void nstrace_leave(int * pointer_to_nstrace_enabled) } -/* Called when nstrace_saved_enabled_global goes out of scope. */ +/* Called when nstrace_saved_enabled_global goes out of scope. */ void nstrace_restore_global_trace_state(int * pointer_to_saved_enabled_global) { nstrace_enabled_global = *pointer_to_saved_enabled_global; @@ -161,7 +161,7 @@ - (NSColor *)colorUsingDefaultColorSpace { /* FIXMES: We're checking for colorWithSRGBRed here so this will only work in the same place as in the method above. It should - really be a check whether we're on macOS 10.7 or above. */ + really be a check whether we're on macOS 10.7 or above. */ #if defined (NS_IMPL_COCOA) \ && MAC_OS_X_VERSION_MAX_ALLOWED >= 1070 if (ns_use_srgb_colorspace @@ -185,7 +185,7 @@ - (NSColor *)colorUsingDefaultColorSpace /* Convert a symbol indexed with an NSxxx value to a value as defined in keyboard.c (lispy_function_key). I hope this is a correct way - of doing things... */ + of doing things... */ static unsigned convert_ns_to_X_keysym[] = { NSHomeFunctionKey, 0x50, @@ -234,9 +234,9 @@ - (NSColor *)colorUsingDefaultColorSpace NSF23FunctionKey, 0xD4, NSF24FunctionKey, 0xD5, - NSBackspaceCharacter, 0x08, /* 8: Not on some KBs. */ - NSDeleteCharacter, 0xFF, /* 127: Big 'delete' key upper right. */ - NSDeleteFunctionKey, 0x9F, /* 63272: Del forw key off main array. */ + NSBackspaceCharacter, 0x08, /* 8: Not on some KBs. */ + NSDeleteCharacter, 0xFF, /* 127: Big 'delete' key upper right. */ + NSDeleteFunctionKey, 0x9F, /* 63272: Del forw key off main array. */ NSTabCharacter, 0x09, 0x19, 0x09, /* left tab->regular since pass shift */ @@ -266,7 +266,7 @@ - (NSColor *)colorUsingDefaultColorSpace /* On macOS picks up the default NSGlobalDomain AppleAntiAliasingThreshold, the maximum font size to NOT antialias. On GNUstep there is currently - no way to control this behavior. */ + no way to control this behavior. */ float ns_antialias_threshold; NSArray *ns_send_types = 0, *ns_return_types = 0; @@ -292,7 +292,7 @@ - (NSColor *)colorUsingDefaultColorSpace /* The number of times NSDisableScreenUpdates has been called. */ static int disable_screen_updates_count = 0; #endif -/*static int debug_lock = 0; */ +/* static int debug_lock = 0; */ /* event loop */ static BOOL send_appdefined = YES; @@ -424,7 +424,7 @@ - (NSColor *)colorUsingDefaultColorSpace (([e type] == NSEventTypeRightMouseDown) || ([e type] == NSEventTypeRightMouseUp)) ? 2 : \ [e buttonNumber] - 1) -/* Convert the time field to a timestamp in milliseconds. */ +/* Convert the time field to a timestamp in milliseconds. */ #define EV_TIMESTAMP(e) ([e timestamp] * 1000) /* This is a piece of code which is common to all the event handling @@ -454,14 +454,14 @@ - (NSColor *)colorUsingDefaultColorSpace /* These flags will be OR'd or XOR'd with the NSWindow's styleMask - property depending on what we're doing. */ + property depending on what we're doing. */ #define FRAME_DECORATED_FLAGS (NSWindowStyleMaskTitled \ | NSWindowStyleMaskResizable \ | NSWindowStyleMaskMiniaturizable \ | NSWindowStyleMaskClosable) #define FRAME_UNDECORATED_FLAGS NSWindowStyleMaskBorderless -/* TODO: get rid of need for these forward declarations */ +/* TODO: Get rid of need for these forward declarations. */ static void ns_condemn_scroll_bars (struct frame *f); static void ns_judge_scroll_bars (struct frame *f); @@ -665,7 +665,7 @@ - (NSColor *)colorUsingDefaultColorSpace void ns_init_locale (void) /* macOS doesn't set any environment variables for the locale when run - from the GUI. Get the locale from the OS and set LANG. */ + from the GUI. Get the locale from the OS and set LANG. */ { NSLocale *locale = [NSLocale currentLocale]; @@ -676,11 +676,11 @@ - (NSColor *)colorUsingDefaultColorSpace /* It seems macOS should probably use UTF-8 everywhere. 'localeIdentifier' does not specify the encoding, and I can't find any way to get the OS to tell us which encoding to use, - so hard-code '.UTF-8'. */ + so hard-code '.UTF-8'. */ NSString *localeID = [NSString stringWithFormat:@"%@.UTF-8", [locale localeIdentifier]]; - /* Set LANG to locale, but not if LANG is already set. */ + /* Set LANG to locale, but not if LANG is already set. */ setenv("LANG", [localeID UTF8String], 0); } @catch (NSException *e) @@ -703,7 +703,7 @@ Release an object (callable from C) void ns_retain_object (void *obj) /* -------------------------------------------------------------------------- - Retain an object (callable from C) + Retain an object (callable from C) -------------------------------------------------------------------------- */ { [(id)obj retain]; @@ -836,7 +836,7 @@ Free a pool and temporary objects it refers to (callable from C) static struct EmacsMargins ns_screen_margins_ignoring_hidden_dock (NSScreen *screen) /* The parts of SCREEN used by the operating system, excluding the parts -reserved for an hidden dock. */ + reserved for a hidden dock. */ { NSTRACE ("ns_screen_margins_ignoring_hidden_dock"); @@ -1297,13 +1297,13 @@ static NSRect constrain_frame_rect(NSRect frameRect, bool isFullscreen) { [focus_view unlockFocus]; [[focus_view window] flushWindow]; -/*debug_lock--; */ +/* debug_lock--; */ } if (view) [view lockFocus]; focus_view = view; -/*if (view) debug_lock++; */ +/* if (view) debug_lock++; */ } } @@ -1341,7 +1341,7 @@ static NSRect constrain_frame_rect(NSRect frameRect, bool isFullscreen) [focus_view unlockFocus]; [[focus_view window] flushWindow]; focus_view = NULL; -/*debug_lock--; */ +/* debug_lock--; */ } } } @@ -1399,7 +1399,7 @@ static NSRect constrain_frame_rect(NSRect frameRect, bool isFullscreen) @interface EmacsBell : NSImageView { - // Number of currently active bell:s. + // Number of currently active bells. unsigned int nestCount; NSView * mView; bool isAttached; @@ -1660,7 +1660,7 @@ -(void)remove NSTRACE ("x_make_frame_visible"); /* XXX: at some points in past this was not needed, as the only place that called this (frame.c:Fraise_frame ()) also called raise_lower; - if this ends up the case again, comment this out again. */ + if this ends up the case again, comment this out again. */ if (!FRAME_VISIBLE_P (f)) { EmacsView *view = (EmacsView *)FRAME_NS_VIEW (f); @@ -1683,7 +1683,7 @@ -(void)remove } /* Making a frame invisible seems to break the parent->child - relationship, so reinstate it. */ + relationship, so reinstate it. */ if ([window parentWindow] == nil && FRAME_PARENT_FRAME (f) != NULL) { NSWindow *parent = [FRAME_NS_VIEW (FRAME_PARENT_FRAME (f)) window]; @@ -1695,7 +1695,7 @@ -(void)remove /* If the parent frame moved while the child frame was invisible, the child frame's position won't have been - updated. Make sure it's in the right place now. */ + updated. Make sure it's in the right place now. */ x_set_offset(f, f->left_pos, f->top_pos, 0); } } @@ -1737,8 +1737,8 @@ -(void)remove if ([[view window] windowNumber] <= 0) { - /* the window is still deferred. Make it very small, bring it - on screen and order it out. */ + /* The window is still deferred. Make it very small, bring it + on screen and order it out. */ NSRect s = { { 100, 100}, {0, 0} }; NSRect t; t = [[view window] frame]; @@ -1749,7 +1749,7 @@ -(void)remove } /* Processing input while Emacs is being minimized can cause a - crash, so block it for the duration. */ + crash, so block it for the duration. */ block_input(); [[view window] miniaturize: NSApp]; unblock_input(); @@ -1804,7 +1804,7 @@ -(void)remove NSTRACE ("x_destroy_window"); /* If this frame has a parent window, detach it as not doing so can - cause a crash in GNUStep. */ + cause a crash in GNUStep. */ if (FRAME_PARENT_FRAME (f) != NULL) { NSWindow *child = [FRAME_NS_VIEW (f) window]; @@ -1996,7 +1996,7 @@ breaks live resize (resizing with a mouse), so don't do it if else { [window setToolbar: nil]; - /* Do I need to release the toolbar here? */ + /* Do I need to release the toolbar here? */ FRAME_UNDECORATED (f) = true; [window setStyleMask: ((window.styleMask | FRAME_UNDECORATED_FLAGS) @@ -2004,7 +2004,7 @@ breaks live resize (resizing with a mouse), so don't do it if } /* At this point it seems we don't have an active NSResponder, - so some key presses (TAB) are swallowed by the system. */ + so some key presses (TAB) are swallowed by the system. */ [window makeFirstResponder: view]; [view updateFrameSize: NO]; @@ -2073,7 +2073,7 @@ so some key presses (TAB) are swallowed by the system. */ * displayed for the first time and when the frame changes its state * from `iconified' or `invisible' to `visible'.) * - * Some window managers may not honor this parameter. */ + * Some window managers may not honor this parameter. */ { NSTRACE ("x_set_no_focus_on_map"); @@ -2092,7 +2092,7 @@ so some key presses (TAB) are swallowed by the system. */ * If non-nil, this may have the unwanted side-effect that a user cannot * scroll a non-selected frame with the mouse. * - * Some window managers may not honor this parameter. */ + * Some window managers may not honor this parameter. */ { NSTRACE ("x_set_no_accept_focus"); @@ -2109,7 +2109,7 @@ so some key presses (TAB) are swallowed by the system. */ `below' property set. If `below', F's window is displayed below all windows that do. - Some window managers may not honor this parameter. */ + Some window managers may not honor this parameter. */ { EmacsView *view = (EmacsView *)FRAME_NS_VIEW (f); NSWindow *window = [view window]; @@ -2128,7 +2128,7 @@ so some key presses (TAB) are swallowed by the system. */ } else if (EQ (new_value, Qabove_suspended)) { - /* Not sure what level this should be. */ + /* Not sure what level this should be. */ window.level = NSNormalWindowLevel + 1; FRAME_Z_GROUP (f) = z_group_above_suspended; } @@ -2206,8 +2206,7 @@ so some key presses (TAB) are swallowed by the system. */ if (! [view fsIsNative] && f->want_fullscreen == FULLSCREEN_BOTH) { /* Old style fs don't initiate correctly if created from - init/default-frame alist, so use a timer (not nice...). - */ + init/default-frame alist, so use a timer (not nice...). */ [NSTimer scheduledTimerWithTimeInterval: 0.5 target: view selector: @selector (handleFS) userInfo: nil repeats: NO]; @@ -2274,7 +2273,7 @@ so some key presses (TAB) are swallowed by the system. */ color_table->colors[idx] = color; [color retain]; -/*fprintf(stderr, "color_table: allocated %d\n",idx);*/ + /* fprintf(stderr, "color_table: allocated %d\n",idx); */ return idx; } @@ -2286,7 +2285,7 @@ so some key presses (TAB) are swallowed by the system. */ -------------------------------------------------------------------------- */ /* On *Step, we attempt to mimic the X11 platform here, down to installing an X11 rgb.txt-compatible color list in Emacs.clr (see ns_term_init()). - See: http://thread.gmane.org/gmane.emacs.devel/113050/focus=113272). */ + See https://lists.gnu.org/r/emacs-devel/2009-07/msg01203.html. */ { NSColor *new = nil; static char hex[20]; @@ -2321,8 +2320,7 @@ so some key presses (TAB) are swallowed by the system. */ else if ([nsname isEqualToString: @"ns_selection_fg_color"]) { /* NOTE: macOS applications normally don't set foreground - selection, but text may be unreadable if we don't. - */ + selection, but text may be unreadable if we don't. */ if ((new = [NSColor selectedTextColor]) != nil) { *col = [new colorUsingDefaultColorSpace]; @@ -2334,7 +2332,7 @@ so some key presses (TAB) are swallowed by the system. */ name = [nsname UTF8String]; } - /* First, check for some sort of numeric specification. */ + /* First, check for some sort of numeric specification. */ hex[0] = '\0'; if (name[0] == '0' || name[0] == '1' || name[0] == '.') /* RGB decimal */ @@ -2384,7 +2382,7 @@ so some key presses (TAB) are swallowed by the system. */ NSColorList *clist; #ifdef NS_IMPL_GNUSTEP - /* XXX: who is wrong, the requestor or the implementation? */ + /* XXX: who is wrong, the requestor or the implementation? */ if ([nsname compare: @"Highlight" options: NSCaseInsensitiveSearch] == NSOrderedSame) nsname = @"highlightColor"; @@ -2413,7 +2411,7 @@ so some key presses (TAB) are swallowed by the system. */ int ns_lisp_to_color (Lisp_Object color, NSColor **col) /* -------------------------------------------------------------------------- - Convert a Lisp string object to a NS color + Convert a Lisp string object to a NS color. -------------------------------------------------------------------------- */ { NSTRACE ("ns_lisp_to_color"); @@ -2458,7 +2456,7 @@ so some key presses (TAB) are swallowed by the system. */ If makeIndex and alloc are nonzero put the color in the color_table, and set color_def pixel to the resulting index. If makeIndex is zero, set color_def pixel to ARGB. - Return false if not found + Return false if not found. -------------------------------------------------------------------------- */ { NSColor *col; @@ -2531,7 +2529,7 @@ so some key presses (TAB) are swallowed by the system. */ { NSTRACE ("frame_set_mouse_pixel_position"); - /* FIXME: what about GNUstep? */ + /* FIXME: what about GNUstep? */ #ifdef NS_IMPL_COCOA CGPoint mouse_pos = CGPointMake(f->left_pos + pix_x, @@ -2552,15 +2550,15 @@ so some key presses (TAB) are swallowed by the system. */ struct ns_display_info *dpyinfo = FRAME_DISPLAY_INFO (frame); NSRect *r; -// NSTRACE ("note_mouse_movement"); + // NSTRACE ("note_mouse_movement"); dpyinfo->last_mouse_motion_frame = frame; r = &dpyinfo->last_mouse_glyph; /* Note, this doesn't get called for enter/leave, since we don't have a - position. Those are taken care of in the corresponding NSView methods. */ + position. Those are taken care of in the corresponding NSView methods. */ - /* has movement gone beyond last rect we were tracking? */ + /* Has movement gone beyond last rect we were tracking? */ if (x < r->origin.x || x >= r->origin.x + r->size.width || y < r->origin.y || y >= r->origin.y + r->size.height) { @@ -2584,7 +2582,7 @@ so some key presses (TAB) are swallowed by the system. */ External (hook): inform emacs about mouse position and hit parts. If a scrollbar is being dragged, set bar_window, part, x, y, time. x & y should be position in the scrollbar (the whole bar, not the handle) - and length of scrollbar respectively + and length of scrollbar respectively. -------------------------------------------------------------------------- */ { id view; @@ -2703,7 +2701,7 @@ so some key presses (TAB) are swallowed by the system. */ { const unsigned last_keysym = ARRAYELTS (convert_ns_to_X_keysym); unsigned keysym; - /* An array would be faster, but less easy to read. */ + /* An array would be faster, but less easy to read. */ for (keysym = 0; keysym < last_keysym; keysym += 2) if (code == convert_ns_to_X_keysym[keysym]) return 0xFF00 | convert_ns_to_X_keysym[keysym+1]; @@ -2900,7 +2898,7 @@ so some key presses (TAB) are swallowed by the system. */ static void ns_scroll_run (struct window *w, struct run *run) /* -------------------------------------------------------------------------- - External (RIF): Insert or delete n lines at line vpos + External (RIF): Insert or delete n lines at line vpos. -------------------------------------------------------------------------- */ { struct frame *f = XFRAME (w->frame); @@ -3146,7 +3144,7 @@ so some key presses (TAB) are swallowed by the system. */ NSRectClip (r); /* Since we composite the bitmap instead of just blitting it, we need - to erase the whole background. */ + to erase the whole background. */ [ns_lookup_indexed_color(face->background, f) set]; NSRectFill (r); @@ -3239,17 +3237,17 @@ Note that CURSOR_WIDTH is meaningful only for (h)bar cursors. get_phys_cursor_geometry (w, glyph_row, phys_cursor_glyph, &fx, &fy, &h); /* The above get_phys_cursor_geometry call set w->phys_cursor_width - to the glyph width; replace with CURSOR_WIDTH for (V)BAR cursors. */ + to the glyph width; replace with CURSOR_WIDTH for (V)BAR cursors. */ if (cursor_type == BAR_CURSOR) { if (cursor_width < 1) cursor_width = max (FRAME_CURSOR_WIDTH (f), 1); - /* The bar cursor should never be wider than the glyph. */ + /* The bar cursor should never be wider than the glyph. */ if (cursor_width < w->phys_cursor_width) w->phys_cursor_width = cursor_width; } - /* If we have an HBAR, "cursor_width" MAY specify height. */ + /* If we have an HBAR, "cursor_width" MAY specify height. */ else if (cursor_type == HBAR_CURSOR) { cursor_height = (cursor_width < 1) ? lrint (0.25 * h) : cursor_width; @@ -3264,7 +3262,7 @@ Note that CURSOR_WIDTH is meaningful only for (h)bar cursors. r.size.height = h; r.size.width = w->phys_cursor_width; - /* Prevent the cursor from being drawn outside the text area. */ + /* Prevent the cursor from being drawn outside the text area. */ ns_clip_to_row (w, glyph_row, TEXT_AREA, NO); /* do ns_focus(f, &r, 1); if remove */ @@ -3282,8 +3280,8 @@ Note that CURSOR_WIDTH is meaningful only for (h)bar cursors. /* TODO: This makes drawing of cursor plus that of phys_cursor_glyph atomic. Cleaner ways of doing this should be investigated. One way would be to set a global variable DRAWING_CURSOR - when making the call to draw_phys..(), don't focus in that - case, then move the ns_unfocus() here after that call. */ + when making the call to draw_phys..(), don't focus in that + case, then move the ns_unfocus() here after that call. */ NSDisableScreenUpdates (); #endif @@ -3503,7 +3501,7 @@ Note that CURSOR_WIDTH is meaningful only for (h)bar cursors. if (s->for_overlaps) return; - /* Do underline. */ + /* Do underline. */ if (face->underline_p) { if (s->face->underline_type == FACE_UNDER_WAVE) @@ -3521,7 +3519,7 @@ Note that CURSOR_WIDTH is meaningful only for (h)bar cursors. NSRect r; unsigned long thickness, position; - /* If the prev was underlined, match its appearance. */ + /* If the prev was underlined, match its appearance. */ if (s->prev && s->prev->face->underline_p && s->prev->face->underline_type == FACE_UNDER_LINE && s->prev->underline_thickness > 0) @@ -3549,11 +3547,11 @@ Note that CURSOR_WIDTH is meaningful only for (h)bar cursors. use_underline_position_properties = !(NILP (val) || EQ (val, Qunbound)); - /* Use underline thickness of font, defaulting to 1. */ + /* Use underline thickness of font, defaulting to 1. */ thickness = (font && font->underline_thickness > 0) ? font->underline_thickness : 1; - /* Determine the offset of underlining from the baseline. */ + /* Determine the offset of underlining from the baseline. */ if (underline_at_descent_line) position = descent - thickness; else if (use_underline_position_properties @@ -3566,7 +3564,7 @@ Note that CURSOR_WIDTH is meaningful only for (h)bar cursors. position = max (position, minimum_offset); - /* Ensure underlining is not cropped. */ + /* Ensure underlining is not cropped. */ if (descent <= position) { position = descent - 1; @@ -3589,7 +3587,7 @@ Note that CURSOR_WIDTH is meaningful only for (h)bar cursors. } } /* Do overline. We follow other terms in using a thickness of 1 - and ignoring overline_margin. */ + and ignoring overline_margin. */ if (face->overline_p) { NSRect r; @@ -3603,7 +3601,7 @@ Note that CURSOR_WIDTH is meaningful only for (h)bar cursors. } /* Do strike-through. We follow other terms for thickness and - vertical position.*/ + vertical position. */ if (face->strike_through_p) { NSRect r; @@ -3710,7 +3708,7 @@ larger if there are taller display elements (e.g., characters [(raised_p ? lightCol : darkCol) set]; - /* TODO: mitering. Using NSBezierPath doesn't work because of color switch. */ + /* TODO: mitering. Using NSBezierPath doesn't work because of color switch. */ /* top */ sr.size.height = thickness; @@ -3784,7 +3782,7 @@ Function modeled after x_draw_glyph_string_box (). r = NSMakeRect (s->x, s->y, right_x - s->x + 1, s->height); - /* TODO: Sometimes box_color is 0 and this seems wrong; should investigate. */ + /* TODO: Sometimes box_color is 0 and this seems wrong; should investigate. */ if (s->face->box == FACE_SIMPLE_BOX && s->face->box_color) { ns_draw_box (r, abs (thickness), @@ -3887,7 +3885,7 @@ Function modeled after x_draw_glyph_string_box (). /* Draw BG: if we need larger area than image itself cleared, do that, otherwise, since we composite the image under NS (instead of mucking - with its background color), we must clear just the image area. */ + with its background color), we must clear just the image area. */ if (s->hl == DRAW_MOUSE_FACE) { face = FACE_FROM_ID_OR_NULL (s->f, @@ -3913,7 +3911,7 @@ Function modeled after x_draw_glyph_string_box (). NSRectFill (br); - /* Draw the image.. do we need to draw placeholder if img ==nil? */ + /* Draw the image... do we need to draw placeholder if img == nil? */ if (img != nil) { #ifdef NS_IMPL_COCOA @@ -3939,11 +3937,11 @@ Function modeled after x_draw_glyph_string_box (). if (s->w->phys_cursor_type == FILLED_BOX_CURSOR) tdCol = ns_lookup_indexed_color (NS_FACE_BACKGROUND (face), s->f); else - /* Currently on NS img->mask is always 0. Since + /* Currently on NS img->mask is always 0. Since get_window_cursor_type specifies a hollow box cursor when on - a non-masked image we never reach this clause. But we put it + a non-masked image we never reach this clause. But we put it in, in anticipation of better support for image masks on - NS. */ + NS. */ tdCol = ns_lookup_indexed_color (NS_FACE_FOREGROUND (face), s->f); } else @@ -3951,7 +3949,7 @@ Function modeled after x_draw_glyph_string_box (). tdCol = ns_lookup_indexed_color (NS_FACE_FOREGROUND (face), s->f); } - /* Draw underline, overline, strike-through. */ + /* Draw underline, overline, strike-through. */ ns_draw_text_decoration (s, face, tdCol, br.size.width, br.origin.x); /* Draw relief, if requested */ @@ -4046,14 +4044,14 @@ Function modeled after x_draw_glyph_string_box (). a partially-visible bottom row will clear part of the modeline, and another where list-buffers headers and similar rows erroneously have visible_height set to 0. Not sure - where this is coming from as other terms seem not to show. */ + where this is coming from as other terms seem not to show. */ r[i].size.height = min (s->height, s->row->visible_height); } [bgCol set]; /* NOTE: under NS this is NOT used to draw cursors, but we must avoid - overwriting cursor (usually when cursor on a tab) */ + overwriting cursor (usually when cursor on a tab). */ if (s->hl == DRAW_CURSOR) { CGFloat x, width; @@ -4065,7 +4063,7 @@ overwriting cursor (usually when cursor on a tab) */ NSRectFill (r[i]); - /* Draw overlining, etc. on the cursor. */ + /* Draw overlining, etc. on the cursor. */ if (s->w->phys_cursor_type == FILLED_BOX_CURSOR) ns_draw_text_decoration (s, face, bgCol, width, x); else @@ -4077,7 +4075,7 @@ overwriting cursor (usually when cursor on a tab) */ } /* Draw overlining, etc. on the stretch glyph (or the part - of the stretch glyph after the cursor). */ + of the stretch glyph after the cursor). */ ns_draw_text_decoration (s, face, fgCol, r[i].size.width, r[i].origin.x); } @@ -4304,7 +4302,7 @@ overwriting cursor (usually when cursor on a tab) */ : FRAME_FOREGROUND_COLOR (s->f)); [col set]; - /* Draw underline, overline, strike-through. */ + /* Draw underline, overline, strike-through. */ ns_draw_text_decoration (s, s->face, col, s->width, s->x); } @@ -4338,7 +4336,7 @@ overwriting cursor (usually when cursor on a tab) */ emacs_abort (); } - /* Draw box if not done already. */ + /* Draw box if not done already. */ if (!s->for_overlaps && !box_drawn_p && s->face->box != FACE_NO_BOX) { n = ns_get_glyph_string_clip_rect (s, r); @@ -4381,8 +4379,8 @@ overwriting cursor (usually when cursor on a tab) */ } /* Only post this event if we haven't already posted one. This will end - the [NXApp run] main loop after having processed all events queued at - this moment. */ + the [NXApp run] main loop after having processed all events queued at + this moment. */ #ifdef NS_IMPL_COCOA if (! send_appdefined) @@ -4405,7 +4403,7 @@ in certain situations (rapid incoming events). /* We only need one NX_APPDEFINED event to stop NXApp from running. */ send_appdefined = NO; - /* Don't need wakeup timer any more */ + /* Don't need wakeup timer any more. */ if (timed_entry) { [timed_entry invalidate]; @@ -4459,7 +4457,7 @@ in certain situations (rapid incoming events). void ns_check_menu_open (NSMenu *menu) { - /* Click in menu bar? */ + /* Click in menu bar? */ NSArray *a = [[NSApp mainMenu] itemArray]; int i; BOOL found = NO; @@ -4555,19 +4553,19 @@ in certain situations (rapid incoming events). ns_init_events (&ev); q_event_ptr = hold_quit; - /* we manage autorelease pools by allocate/reallocate each time around + /* We manage autorelease pools by allocate/reallocate each time around the loop; strict nesting is occasionally violated but seems not to - matter.. earlier methods using full nesting caused major memory leaks */ + matter... earlier methods using full nesting caused major memory leaks. */ [outerpool release]; outerpool = [[NSAutoreleasePool alloc] init]; - /* If have pending open-file requests, attend to the next one of those. */ + /* If have pending open-file requests, attend to the next one of those. */ if (ns_pending_files && [ns_pending_files count] != 0 && [(EmacsApp *)NSApp openFile: [ns_pending_files objectAtIndex: 0]]) { [ns_pending_files removeObjectAtIndex: 0]; } - /* Deal with pending service requests. */ + /* Deal with pending service requests. */ else if (ns_pending_service_names && [ns_pending_service_names count] != 0 && [(EmacsApp *) NSApp fulfillService: [ns_pending_service_names objectAtIndex: 0] @@ -4620,7 +4618,7 @@ in certain situations (rapid incoming events). if (hold_event_q.nr > 0) { - /* We already have events pending. */ + /* We already have events pending. */ raise (SIGIO); errno = EINTR; return -1; @@ -4672,13 +4670,13 @@ in certain situations (rapid incoming events). pthread_mutex_unlock (&select_mutex); - /* Inform fd_handler that select should be called */ + /* Inform fd_handler that select should be called. */ c = 'g'; emacs_write_sig (selfds[1], &c, 1); } else if (nr == 0 && timeout) { - /* No file descriptor, just a timeout, no need to wake fd_handler */ + /* No file descriptor, just a timeout, no need to wake fd_handler. */ double time = timespectod (*timeout); timed_entry = [[NSTimer scheduledTimerWithTimeInterval: time target: NSApp @@ -4690,7 +4688,7 @@ in certain situations (rapid incoming events). } else /* No timeout and no file descriptors, can this happen? */ { - /* Send appdefined so we exit from the loop */ + /* Send appdefined so we exit from the loop. */ ns_send_appdefined (-1); } @@ -4715,7 +4713,7 @@ in certain situations (rapid incoming events). if (t == -2) { - /* The NX_APPDEFINED event we received was a timeout. */ + /* The NX_APPDEFINED event we received was a timeout. */ result = 0; } else if (t == -1) @@ -4727,7 +4725,7 @@ in certain situations (rapid incoming events). } else { - /* Received back from select () in fd_handler; copy the results */ + /* Received back from select () in fd_handler; copy the results. */ pthread_mutex_lock (&select_mutex); if (readfds) *readfds = select_readfds; if (writefds) *writefds = select_writefds; @@ -4747,11 +4745,11 @@ in certain situations (rapid incoming events). #ifdef HAVE_PTHREAD void ns_run_loop_break () -/* Break out of the NS run loop in ns_select or ns_read_socket. */ +/* Break out of the NS run loop in ns_select or ns_read_socket. */ { NSTRACE_WHEN (NSTRACE_GROUP_EVENTS, "ns_run_loop_break"); - /* If we don't have a GUI, don't send the event. */ + /* If we don't have a GUI, don't send the event. */ if (NSApp != NULL) ns_send_appdefined(-1); } @@ -4781,7 +4779,7 @@ in certain situations (rapid incoming events). int top, left, height, width; BOOL update_p = YES; - /* optimization; display engine sends WAY too many of these.. */ + /* Optimization; display engine sends WAY too many of these. */ if (!NILP (window->vertical_scroll_bar)) { bar = XNS_SCROLL_BAR (window->vertical_scroll_bar); @@ -4808,14 +4806,14 @@ in certain situations (rapid incoming events). left = WINDOW_SCROLL_BAR_AREA_X (window); r = NSMakeRect (left, top, width, height); - /* the parent view is flipped, so we need to flip y value */ + /* The parent view is flipped, so we need to flip y value. */ v = [view frame]; r.origin.y = (v.size.height - r.size.height - r.origin.y); XSETWINDOW (win, window); block_input (); - /* we want at least 5 lines to display a scrollbar */ + /* We want at least 5 lines to display a scrollbar. */ if (WINDOW_TOTAL_LINES (window) < 5) { if (!NILP (window->vertical_scroll_bar)) @@ -4863,7 +4861,7 @@ in certain situations (rapid incoming events). ns_set_horizontal_scroll_bar (struct window *window, int portion, int whole, int position) /* -------------------------------------------------------------------------- - External (hook): Update or add scrollbar + External (hook): Update or add scrollbar. -------------------------------------------------------------------------- */ { Lisp_Object win; @@ -4875,7 +4873,7 @@ in certain situations (rapid incoming events). int window_x, window_width; BOOL update_p = YES; - /* optimization; display engine sends WAY too many of these.. */ + /* Optimization; display engine sends WAY too many of these. */ if (!NILP (window->horizontal_scroll_bar)) { bar = XNS_SCROLL_BAR (window->horizontal_scroll_bar); @@ -4902,7 +4900,7 @@ in certain situations (rapid incoming events). top = WINDOW_SCROLL_BAR_AREA_Y (window); r = NSMakeRect (left, top, width, height); - /* the parent view is flipped, so we need to flip y value */ + /* The parent view is flipped, so we need to flip y value. */ v = [view frame]; r.origin.y = (v.size.height - r.size.height - r.origin.y); @@ -4934,7 +4932,7 @@ in certain situations (rapid incoming events). /* If there are both horizontal and vertical scroll-bars they leave a square that belongs to neither. We need to clear it otherwise - it fills with junk. */ + it fills with junk. */ if (!NILP (window->vertical_scroll_bar)) ns_clear_frame_area (f, WINDOW_SCROLL_BAR_AREA_X (window), top, NS_SCROLL_BAR_HEIGHT (f), height); @@ -5057,7 +5055,7 @@ in certain situations (rapid incoming events). static Lisp_Object ns_string_to_lispmod (const char *s) /* -------------------------------------------------------------------------- - Convert modifier name to lisp symbol + Convert modifier name to lisp symbol. -------------------------------------------------------------------------- */ { if (!strncmp (SSDATA (SYMBOL_NAME (Qmeta)), s, 10)) @@ -5082,7 +5080,7 @@ static Lisp_Object ns_string_to_lispmod (const char *s) Lisp_Object yesval, Lisp_Object noval, BOOL is_float, BOOL is_modstring) /* -------------------------------------------------------------------------- - Check a parameter value in user's preferences + Check a parameter value in user's preferences. -------------------------------------------------------------------------- */ { const char *value = ns_get_defaults_value (parameter); @@ -5123,7 +5121,7 @@ static Lisp_Object ns_string_to_lispmod (const char *s) dpyinfo->n_planes = NSBitsPerPixelFromDepth (depth); dpyinfo->color_table = xmalloc (sizeof *dpyinfo->color_table); dpyinfo->color_table->colors = NULL; - dpyinfo->root_window = 42; /* a placeholder.. */ + dpyinfo->root_window = 42; /* A placeholder. */ dpyinfo->x_highlight_frame = dpyinfo->x_focus_frame = NULL; dpyinfo->n_fonts = 0; dpyinfo->smallest_font_height = 1; @@ -5133,11 +5131,11 @@ static Lisp_Object ns_string_to_lispmod (const char *s) } -/* This and next define (many of the) public functions in this file. */ +/* This and next define (many of the) public functions in this file. */ /* x_... are generic versions in xdisp.c that we, and other terms, get away with using despite presence in the "system dependent" redisplay interface. In addition, many of the ns_ methods have code that is - shared with all terms, indicating need for further refactoring. */ + shared with all terms, indicating need for further refactoring. */ extern frame_parm_handler ns_frame_parm_handlers[]; static struct redisplay_interface ns_redisplay_interface = { @@ -5173,11 +5171,11 @@ static Lisp_Object ns_string_to_lispmod (const char *s) static void ns_delete_display (struct ns_display_info *dpyinfo) { - /* TODO... */ + /* TODO... */ } -/* This function is called when the last frame on a display is deleted. */ +/* This function is called when the last frame on a display is deleted. */ static void ns_delete_terminal (struct terminal *terminal) { @@ -5285,9 +5283,9 @@ static Lisp_Object ns_string_to_lispmod (const char *s) ns_pending_service_names = [[NSMutableArray alloc] init]; ns_pending_service_args = [[NSMutableArray alloc] init]; -/* Start app and create the main menu, window, view. + /* Start app and create the main menu, window, view. Needs to be here because ns_initialize_display_info () uses AppKit classes. - The view will then ask the NSApp to stop and return to Emacs. */ + The view will then ask the NSApp to stop and return to Emacs. */ [EmacsApp sharedApplication]; if (NSApp == nil) return NULL; @@ -5377,7 +5375,7 @@ Needs to be here because ns_initialize_display_info () uses AppKit classes. #ifdef NS_IMPL_GNUSTEP Vwindow_system_version = build_string (gnustep_base_version); #else - /*PSnextrelease (128, c); */ + /* PSnextrelease (128, c); */ char c[DBL_BUFSIZE_BOUND]; int len = dtoastr (c, sizeof c, 0, 0, NSAppKitVersionNumber); Vwindow_system_version = make_unibyte_string (c, len); @@ -5463,7 +5461,7 @@ Needs to be here because ns_initialize_display_info () uses AppKit classes. #endif /* macOS menu setup */ /* Register our external input/output types, used for determining - applicable services and also drag/drop eligibility. */ + applicable services and also drag/drop eligibility. */ NSTRACE_MSG ("Input/output types"); @@ -5633,9 +5631,9 @@ - (void)sendEvent: (NSEvent *)theEvent NSString *fstr = represented_filename; NSView *view = FRAME_NS_VIEW (represented_frame); #ifdef NS_IMPL_COCOA - /* work around a bug observed on 10.3 and later where + /* Work around a bug observed on 10.3 and later where setTitleWithRepresentedFilename does not clear out previous state - if given filename does not exist */ + if given filename does not exist. */ if (! [[NSFileManager defaultManager] fileExistsAtPath: fstr]) [[view window] setRepresentedFilename: @""]; #endif @@ -5673,7 +5671,7 @@ - (void)sendEvent: (NSEvent *)theEvent /* Events posted by ns_send_appdefined interrupt the run loop here. But, if a modal window is up, an appdefined can still come through, (e.g., from a makeKeyWindow event) but stopping self also stops the - modal loop. Just defer it until later. */ + modal loop. Just defer it until later. */ if ([NSApp modalWindow] == nil) { last_appdefined_event_data = [theEvent data1]; @@ -5738,7 +5736,7 @@ - (void)newFrame: (id)sender } -/* Open a file (used by below, after going into queue read by ns_read_socket) */ +/* Open a file (used by below, after going into queue read by ns_read_socket). */ - (BOOL) openFile: (NSString *)fileName { NSTRACE ("[EmacsApp openFile:]"); @@ -5768,7 +5766,7 @@ - (BOOL) openFile: (NSString *)fileName - (void)applicationDidFinishLaunching: (NSNotification *)notification /* -------------------------------------------------------------------------- - When application is loaded, terminate event loop in ns_term_init + When application is loaded, terminate event loop in ns_term_init. -------------------------------------------------------------------------- */ { NSTRACE ("[EmacsApp applicationDidFinishLaunching:]"); @@ -5791,7 +5789,7 @@ - (void)applicationDidFinishLaunching: (NSNotification *)notification if ([NSApp activationPolicy] == NSApplicationActivationPolicyProhibited) { /* Set the app's activation policy to regular when we run outside of a bundle. This is already done for us by Info.plist when we - run inside a bundle. */ + run inside a bundle. */ [NSApp setActivationPolicy:NSApplicationActivationPolicyRegular]; [NSApp setApplicationIconImage: [EmacsImage @@ -5895,7 +5893,7 @@ - (NSApplicationTerminateReply)applicationShouldTerminate: (id)sender return 1; } -/* Notification from the Workspace to open a file */ +/* Notification from the Workspace to open a file. */ - (BOOL)application: sender openFile: (NSString *)file { if (ns_do_open_file || not_in_argv (file)) @@ -5904,7 +5902,7 @@ - (BOOL)application: sender openFile: (NSString *)file } -/* Open a file as a temporary file */ +/* Open a file as a temporary file. */ - (BOOL)application: sender openTempFile: (NSString *)file { if (ns_do_open_file || not_in_argv (file)) @@ -5913,7 +5911,7 @@ - (BOOL)application: sender openTempFile: (NSString *)file } -/* Notification from the Workspace to open a file noninteractively (?) */ +/* Notification from the Workspace to open a file noninteractively (?). */ - (BOOL)application: sender openFileWithoutUI: (NSString *)file { if (ns_do_open_file || not_in_argv (file)) @@ -5921,7 +5919,7 @@ - (BOOL)application: sender openFileWithoutUI: (NSString *)file return YES; } -/* Notification from the Workspace to open multiple files */ +/* Notification from the Workspace to open multiple files. */ - (void)application: sender openFiles: (NSArray *)fileList { NSEnumerator *files = [fileList objectEnumerator]; @@ -5945,11 +5943,11 @@ - (NSMenu *)applicationDockMenu: (NSApplication *) sender } -/* TODO: these may help w/IO switching btwn terminal and NSApp */ +/* TODO: these may help w/IO switching between terminal and NSApp. */ - (void)applicationWillBecomeActive: (NSNotification *)notification { NSTRACE ("[EmacsApp applicationWillBecomeActive:]"); - //ns_app_active=YES; + // ns_app_active=YES; } - (void)applicationDidBecomeActive: (NSNotification *)notification @@ -5960,7 +5958,7 @@ - (void)applicationDidBecomeActive: (NSNotification *)notification if (! applicationDidFinishLaunchingCalled) [self applicationDidFinishLaunching:notification]; #endif - //ns_app_active=YES; + // ns_app_active=YES; ns_update_auto_hide_menu_bar (); // No constraining takes place when the application is not active. @@ -5970,7 +5968,7 @@ - (void)applicationDidResignActive: (NSNotification *)notification { NSTRACE ("[EmacsApp applicationDidResignActive:]"); - //ns_app_active=NO; + // ns_app_active=NO; ns_send_appdefined (-1); } @@ -5988,7 +5986,7 @@ - (void)timeout_handler: (NSTimer *)timedEntry The timeout specified to ns_select has passed. -------------------------------------------------------------------------- */ { - /*NSTRACE ("timeout_handler"); */ + /* NSTRACE ("timeout_handler"); */ ns_send_appdefined (-2); } @@ -5999,7 +5997,7 @@ - (void)sendFromMainThread:(id)unused - (void)fd_handler:(id)unused /* -------------------------------------------------------------------------- - Check data waiting on file descriptors and terminate if so + Check data waiting on file descriptors and terminate if so. -------------------------------------------------------------------------- */ { int result; @@ -6094,7 +6092,7 @@ - (void)fd_handler:(id)unused ========================================================================== */ -/* called from system: queue for next pass through event loop */ +/* Called from system: queue for next pass through event loop. */ - (void)requestService: (NSPasteboard *)pboard userData: (NSString *)userData error: (NSString **)error @@ -6105,7 +6103,7 @@ - (void)requestService: (NSPasteboard *)pboard } -/* called from ns_read_socket to clear queue */ +/* Called from ns_read_socket to clear queue. */ - (BOOL)fulfillService: (NSString *)name withArg: (NSString *)arg { struct frame *emacsframe = SELECTED_FRAME (); @@ -6139,7 +6137,7 @@ - (BOOL)fulfillService: (NSString *)name withArg: (NSString *)arg @implementation EmacsView -/* needed to inform when window closed from LISP */ +/* Needed to inform when window closed from lisp. */ - (void) setWindowClosing: (BOOL)closing { NSTRACE ("[EmacsView setWindowClosing:%d]", closing); @@ -6158,7 +6156,7 @@ - (void)dealloc } -/* called on font panel selection */ +/* Called on font panel selection. */ - (void)changeFont: (id)sender { NSEvent *e = [[self window] currentEvent]; @@ -6226,7 +6224,7 @@ - (void)resetCursorRects /*****************************************************************************/ -/* Keyboard handling. */ +/* Keyboard handling. */ #define NS_KEYLOG 0 - (void)keyDown: (NSEvent *)theEvent @@ -6239,7 +6237,7 @@ - (void)keyDown: (NSEvent *)theEvent NSTRACE ("[EmacsView keyDown:]"); - /* Rhapsody and macOS give up and down events for the arrow keys */ + /* Rhapsody and macOS give up and down events for the arrow keys. */ if (ns_fake_keydown == YES) ns_fake_keydown = NO; else if ([theEvent type] != NSEventTypeKeyDown) @@ -6250,7 +6248,7 @@ - (void)keyDown: (NSEvent *)theEvent if (![[self window] isKeyWindow] && [[theEvent window] isKindOfClass: [EmacsWindow class]] - /* we must avoid an infinite loop here. */ + /* We must avoid an infinite loop here. */ && (EmacsView *)[[theEvent window] delegate] != self) { /* XXX: There is an occasional condition in which, when Emacs display @@ -6258,7 +6256,7 @@ - (void)keyDown: (NSEvent *)theEvent selects it, then processes some interrupt-driven input (dispnew.c:3878), OS will send the event to the correct NSWindow, but for some reason that window has its first responder set to the NSView - most recently updated (I guess), which is not the correct one. */ + most recently updated (I guess), which is not the correct one. */ [(EmacsView *)[[theEvent window] delegate] keyDown: theEvent]; return; } @@ -6281,10 +6279,9 @@ most recently updated (I guess), which is not the correct one. */ code = ([[theEvent charactersIgnoringModifiers] length] == 0) ? 0 : [[theEvent charactersIgnoringModifiers] characterAtIndex: 0]; - /* is it a "function key"? */ + /* Is it a "function key"? */ /* Note: Sometimes a plain key will have the NSEventModifierFlagNumericPad - flag set (this is probably a bug in the OS). - */ + flag set (this is probably a bug in the OS). */ if (code < 0x00ff && (flags&NSEventModifierFlagNumericPad)) { fnKeysym = ns_convert_key ([theEvent keyCode] | NSEventModifierFlagNumericPad); @@ -6297,14 +6294,13 @@ flag set (this is probably a bug in the OS). if (fnKeysym) { /* COUNTERHACK: map 'Delete' on upper-right main KB to 'Backspace', - because Emacs treats Delete and KP-Delete same (in simple.el). */ + because Emacs treats Delete and KP-Delete same (in simple.el). */ if ((fnKeysym == 0xFFFF && [theEvent keyCode] == 0x33) #ifdef NS_IMPL_GNUSTEP /* GNUstep uses incompatible keycodes, even for those that are supposed to be hardware independent. Just check for delete. Keypad delete does not have keysym 0xFFFF. - See https://savannah.gnu.org/bugs/?25395 - */ + See https://savannah.gnu.org/bugs/?25395 */ || (fnKeysym == 0xFFFF && code == 127) #endif ) @@ -6336,7 +6332,7 @@ In that case we use UCKeyTranslate (ns_get_shifted_character) hasn't. Also some combinations of fn and a function key return a different key than was pressed (e.g. fn- gives ). We need to unset the fn modifier in these cases. - FIXME: Can we avoid setting it in the first place. */ + FIXME: Can we avoid setting it in the first place? */ if (fnKeysym && (flags & NS_FUNCTION_KEY_MASK)) emacs_event->modifiers ^= parse_solitary_modifier (ns_function_modifier); @@ -6412,12 +6408,12 @@ In that case we use UCKeyTranslate (ns_get_shifted_character) } -/* implementation (called through super interpretKeyEvents:]). */ +/* implementation (called through [super interpretKeyEvents:]). */ /* : called when done composing; - NOTE: also called when we delete over working text, followed immed. - by doCommandBySelector: deleteBackward: */ + NOTE: also called when we delete over working text, followed + immediately by doCommandBySelector: deleteBackward: */ - (void)insertText: (id)aString { NSString *s; @@ -6439,7 +6435,7 @@ - (void)insertText: (id)aString if (!emacs_event) return; - /* first, clear any working text */ + /* First, clear any working text. */ if (workingText != nil) [self deleteWorkingText]; @@ -6448,7 +6444,7 @@ - (void)insertText: (id)aString However, we probably can't use SAFE_NALLOCA here because it might exit nonlocally. */ - /* now insert the string as keystrokes */ + /* Now insert the string as keystrokes. */ for (NSUInteger i = 0; i < len; i++) { NSUInteger code = [s characterAtIndex:i]; @@ -6461,7 +6457,7 @@ - (void)insertText: (id)aString ++i; } } - /* TODO: still need this? */ + /* TODO: still need this? */ if (code == 0x2DC) code = '~'; /* 0x7E */ if (code != 32) /* Space */ @@ -6474,7 +6470,7 @@ - (void)insertText: (id)aString } -/* : inserts display of composing characters */ +/* : inserts display of composing characters. */ - (void)setMarkedText: (id)aString selectedRange: (NSRange)selRange { NSString *str = [aString respondsToSelector: @selector (string)] ? @@ -6506,7 +6502,7 @@ - (void)setMarkedText: (id)aString selectedRange: (NSRange)selRange } -/* delete display of composing characters [not in ] */ +/* Delete display of composing characters [not in ]. */ - (void)deleteWorkingText { NSTRACE ("[EmacsView deleteWorkingText]"); @@ -6559,7 +6555,7 @@ - (void)unmarkText } -/* used to position char selection windows, etc. */ +/* Used to position char selection windows, etc. */ - (NSRect)firstRectForCharacterRange: (NSRange)theRange { NSRect rect; @@ -6619,8 +6615,8 @@ - (void)doCommandBySelector: (SEL)aSelector processingCompose = NO; if (aSelector == @selector (deleteBackward:)) { - /* happens when user backspaces over an ongoing composition: - throw a 'delete' into the event queue */ + /* Happens when user backspaces over an ongoing composition: + throw a 'delete' into the event queue. */ if (!emacs_event) return; emacs_event->kind = NON_ASCII_KEYSTROKE_EVENT; @@ -6665,7 +6661,7 @@ - (NSAttributedString *)attributedSubstringFromRange: (NSRange)theRange return str; } -/* End impl. */ +/* End implementation. */ /*****************************************************************************/ @@ -6683,8 +6679,8 @@ - (void)mouseDown: (NSEvent *)theEvent return; dpyinfo->last_mouse_frame = emacsframe; - /* appears to be needed to prevent spurious movement events generated on - button clicks */ + /* Appears to be needed to prevent spurious movement events generated on + button clicks. */ emacsframe->mouse_moved = 0; if ([theEvent type] == NSEventTypeScrollWheel) @@ -6803,7 +6799,8 @@ - (void)mouseDown: (NSEvent *)theEvent #if defined (NS_IMPL_GNUSTEP) || MAC_OS_X_VERSION_MIN_REQUIRED < 1070 { CGFloat delta = [theEvent deltaY]; - /* Mac notebooks send wheel events w/delta =0 when trackpad scrolling */ + /* Mac notebooks send wheel events with delta equal to 0 + when trackpad scrolling. */ if (delta == 0) { delta = [theEvent deltaX]; @@ -6880,7 +6877,7 @@ - (void) scrollWheel: (NSEvent *)theEvent } -/* Tell emacs the mouse has moved. */ +/* Tell emacs the mouse has moved. */ - (void)mouseMoved: (NSEvent *)e { Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (emacsframe); @@ -6895,14 +6892,14 @@ - (void)mouseMoved: (NSEvent *)e dpyinfo->last_mouse_motion_x = pt.x; dpyinfo->last_mouse_motion_y = pt.y; - /* update any mouse face */ + /* Update any mouse face. */ if (hlinfo->mouse_face_hidden) { hlinfo->mouse_face_hidden = 0; clear_mouse_face (hlinfo); } - /* tooltip handling */ + /* Tooltip handling. */ previous_help_echo_string = help_echo_string; help_echo_string = Qnil; @@ -6937,7 +6934,7 @@ - (void)mouseMoved: (NSEvent *)e { /* NOTE: help_echo_{window,pos,object} are set in xdisp.c (note_mouse_highlight), which is called through the - note_mouse_movement () call above */ + note_mouse_movement () call above. */ any_help_event_p = YES; gen_help_event (help_echo_string, frame, help_echo_window, help_echo_object, help_echo_pos); @@ -7021,7 +7018,7 @@ - (void) updateFrameSize: (BOOL) delay if (wait_for_tool_bar) { /* The toolbar height is always 0 in fullscreen and undecorated - frames, so don't wait for it to become available. */ + frames, so don't wait for it to become available. */ if (FRAME_TOOLBAR_HEIGHT (emacsframe) == 0 && FRAME_UNDECORATED (emacsframe) == false && ! [self isFullscreen]) @@ -7069,7 +7066,7 @@ - (void) updateFrameSize: (BOOL) delay wr = NSMakeRect (0, 0, neww, newh); [view setFrame: wr]; - // to do: consider using [NSNotificationCenter postNotificationName:]. + // To do: consider using [NSNotificationCenter postNotificationName:]. [self windowDidMove: // Update top/left. [NSNotification notificationWithName:NSWindowDidMoveNotification object:[view window]]]; @@ -7081,7 +7078,7 @@ - (void) updateFrameSize: (BOOL) delay } - (NSSize)windowWillResize: (NSWindow *)sender toSize: (NSSize)frameSize -/* normalize frame to gridded text size */ +/* Normalize frame to gridded text size. */ { int extra = 0; @@ -7123,7 +7120,7 @@ - (NSSize)windowWillResize: (NSWindow *)sender toSize: (NSSize)frameSize rows = MINHEIGHT; #ifdef NS_IMPL_COCOA { - /* this sets window title to have size in it; the wm does this under GS */ + /* This sets window title to have size in it; the wm does this under GS. */ NSRect r = [[self window] frame]; if (r.size.height == frameSize.height && r.size.width == frameSize.width) { @@ -7157,12 +7154,12 @@ - (NSSize)windowWillResize: (NSWindow *)sender toSize: (NSSize)frameSize NSTRACE_MSG ("cols: %d rows: %d", cols, rows); - /* Restrict the new size to the text gird. + /* Restrict the new size to the text grid. Don't restrict the width if the user only adjusted the height, and vice versa. (Without this, the frame would shrink, and move slightly, if the window was resized by dragging one of its - borders.) */ + borders.) */ if (!frame_resize_pixelwise) { NSRect r = [[self window] frame]; @@ -7214,8 +7211,8 @@ - (void)windowDidResize: (NSNotification *)notification NSWindow *theWindow = [notification object]; /* In GNUstep, at least currently, it's possible to get a didResize - without getting a willResize.. therefore we need to act as if we got - the willResize now */ + without getting a willResize, therefore we need to act as if we got + the willResize now. */ NSSize sz = [theWindow frame].size; sz = [self windowWillResize: theWindow toSize: sz]; #endif /* NS_IMPL_GNUSTEP */ @@ -7286,7 +7283,7 @@ - (void)windowDidResignKey: (NSNotification *)notification ns_frame_rehighlight (emacsframe); /* FIXME: for some reason needed on second and subsequent clicks away - from sole-frame Emacs to get hollow box to show */ + from sole-frame Emacs to get hollow box to show. */ if (!windowClosing && [[self window] isVisible] == YES) { x_update_cursor (emacsframe, 1); @@ -7518,7 +7515,7 @@ - (instancetype) initFrameFromEmacs: (struct frame *)f /* macOS Sierra automatically enables tabbed windows. We can't allow this to be enabled until it's available on a Free system. - Currently it only happens by accident and is buggy anyway. */ + Currently it only happens by accident and is buggy anyway. */ #if defined (NS_IMPL_COCOA) \ && MAC_OS_X_VERSION_MAX_ALLOWED >= 101200 #if MAC_OS_X_VERSION_MIN_REQUIRED < 101200 @@ -7560,7 +7557,7 @@ - (void)windowDidMove: sender /* Called AFTER method below, but before our windowWillResize call there leads to windowDidResize -> x_set_window_size. Update emacs' notion of frame - location so set_window_size moves the frame. */ + location so set_window_size moves the frame. */ - (BOOL)windowShouldZoom: (NSWindow *)sender toFrame: (NSRect)newFrame { NSTRACE (("[EmacsView windowShouldZoom:toFrame:" NSTRACE_FMT_RECT "]" @@ -7574,7 +7571,7 @@ - (BOOL)windowShouldZoom: (NSWindow *)sender toFrame: (NSRect)newFrame /* Override to do something slightly nonstandard, but nice. First click on zoom button will zoom vertically. Second will zoom completely. Third - returns to original. */ + returns to original. */ - (NSRect)windowWillUseStandardFrame:(NSWindow *)sender defaultFrame:(NSRect)defaultFrame { @@ -7655,7 +7652,7 @@ - (NSRect)windowWillUseStandardFrame:(NSWindow *)sender { NSTRACE_MSG ("FULLSCREEN_MAXIMIZED"); - result = defaultFrame; /* second click */ + result = defaultFrame; /* second click */ maximized_width = result.size.width; maximized_height = result.size.height; [self setFSValue: FULLSCREEN_MAXIMIZED]; @@ -7936,7 +7933,7 @@ - (void)toggleFullScreen: (id)sender NSScreen *screen = [w screen]; #if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= 1090 - /* Hide ghost menu bar on secondary monitor? */ + /* Hide ghost menu bar on secondary monitor? */ if (! onFirstScreen #if MAC_OS_X_VERSION_MIN_REQUIRED < 1090 && [NSScreen respondsToSelector: @selector(screensHaveSeparateSpaces)] @@ -8015,7 +8012,8 @@ - (void)toggleFullScreen: (id)sender f->border_width = bwidth; - // to do: consider using [NSNotificationCenter postNotificationName:] to send notifications. + // To do: consider using [NSNotificationCenter postNotificationName:] to + // send notifications. [self windowWillExitFullScreen]; [fw setFrame: [w frame] display:YES animate:ns_use_fullscreen_animation]; @@ -8155,7 +8153,7 @@ - (EmacsToolbar *)toolbar } -/* this gets called on toolbar button click */ +/* This gets called on toolbar button click. */ - (instancetype)toolbarClicked: (id)item { NSEvent *theEvent; @@ -8166,14 +8164,14 @@ - (instancetype)toolbarClicked: (id)item if (!emacs_event) return self; - /* send first event (for some reason two needed) */ + /* Send first event (for some reason two needed). */ theEvent = [[self window] currentEvent]; emacs_event->kind = TOOL_BAR_EVENT; XSETFRAME (emacs_event->arg, emacsframe); EV_TRAILER (theEvent); emacs_event->kind = TOOL_BAR_EVENT; -/* XSETINT (emacs_event->code, 0); */ + /* XSETINT (emacs_event->code, 0); */ emacs_event->arg = AREF (emacsframe->tool_bar_items, idx + TOOL_BAR_ITEM_KEY); emacs_event->modifiers = EV_MODIFIERS (theEvent); @@ -8365,13 +8363,13 @@ - (id) validRequestorForSendType: (NSString *)typeSent But this should not happen because we override the services menu with our own entries which call ns-perform-service. Nonetheless, it appeared to happen (under strange circumstances): bug#1435. - So let's at least stub them out until further investigation can be done. */ + So let's at least stub them out until further investigation can be done. */ - (BOOL) readSelectionFromPasteboard: (NSPasteboard *)pb { - /* we could call ns_string_from_pasteboard(pboard) here but then it should - be written into the buffer in place of the existing selection.. - ordinary service calls go through functions defined in ns-win.el */ + /* We could call ns_string_from_pasteboard(pboard) here but then it should + be written into the buffer in place of the existing selection. + Ordinary service calls go through functions defined in ns-win.el. */ return NO; } @@ -8382,7 +8380,7 @@ - (BOOL) writeSelectionToPasteboard: (NSPasteboard *)pb types: (NSArray *)types NSTRACE ("[EmacsView writeSelectionToPasteboard:types:]"); - /* We only support NSStringPboardType */ + /* We only support NSStringPboardType. */ if ([types containsObject:NSStringPboardType] == NO) { return NO; } @@ -8404,10 +8402,10 @@ - (BOOL) writeSelectionToPasteboard: (NSPasteboard *)pb types: (NSArray *)types } -/* setMini =YES means set from internal (gives a finder icon), NO means set nil +/* setMini = YES means set from internal (gives a finder icon), NO means set nil (gives a miniaturized version of the window); currently we use the latter for frames whose active buffer doesn't correspond to any file - (e.g., '*scratch*') */ + (e.g., '*scratch*'). */ - (instancetype)setMiniwindowImage: (BOOL) setMini { id image = [[self window] miniwindowImage]; @@ -8415,7 +8413,7 @@ - (instancetype)setMiniwindowImage: (BOOL) setMini /* NOTE: under Cocoa miniwindowImage always returns nil, documentation about "AppleDockIconEnabled" notwithstanding, however the set message - below has its effect nonetheless. */ + below has its effect nonetheless. */ if (image != emacsframe->output_data.ns->miniimage) { if (image && [image isKindOfClass: [EmacsImage class]]) @@ -8526,7 +8524,7 @@ The default implementation (accessed using "super") constrains the Note that this should work in situations where multiple monitors are present. Common configurations are side-by-side monitors and a monitor on top of another (e.g. when a laptop is placed under a - large screen). */ + large screen). */ - (NSRect)constrainFrameRect:(NSRect)frameRect toScreen:(NSScreen *)screen { NSTRACE ("[EmacsWindow constrainFrameRect:" NSTRACE_FMT_RECT " toScreen:]", @@ -8753,7 +8751,7 @@ @implementation EmacsScroller + (CGFloat) scrollerWidth { /* TODO: if we want to allow variable widths, this is the place to do it, - however neither GNUstep nor Cocoa support it very well */ + however neither GNUstep nor Cocoa support it very well. */ CGFloat r; #if defined (NS_IMPL_COCOA) \ && MAC_OS_X_VERSION_MAX_ALLOWED >= 1070 @@ -8789,7 +8787,7 @@ - (instancetype)initFrame: (NSRect )r window: (Lisp_Object)nwin /* Ensure auto resizing of scrollbars occurs within the emacs frame's view locked against the top and bottom edges, and right edge on macOS, where - scrollers are on right. */ + scrollers are on right. */ #ifdef NS_IMPL_GNUSTEP [self setAutoresizingMask: NSViewMaxXMargin | NSViewHeightSizable]; #else @@ -8813,7 +8811,7 @@ - (instancetype)initFrame: (NSRect )r window: (Lisp_Object)nwin NSView *sview = [[view window] contentView]; NSArray *subs = [sview subviews]; - /* disable optimization stopping redraw of other scrollbars */ + /* Disable optimization stopping redraw of other scrollbars. */ view->scrollbarsNeedingUpdate = 0; for (i =[subs count]-1; i >= 0; i--) if ([[subs objectAtIndex: i] isKindOfClass: [EmacsScroller class]]) @@ -8821,7 +8819,7 @@ - (instancetype)initFrame: (NSRect )r window: (Lisp_Object)nwin [sview addSubview: self]; } -/* [self setFrame: r]; */ + /* [self setFrame: r]; */ return self; } @@ -8831,7 +8829,7 @@ - (void)setFrame: (NSRect)newRect { NSTRACE ("[EmacsScroller setFrame:]"); -/* block_input (); */ + /* block_input (); */ if (horizontal) pixel_length = NSWidth (newRect); else @@ -8839,7 +8837,7 @@ - (void)setFrame: (NSRect)newRect if (pixel_length == 0) pixel_length = 1; min_portion = 20 / pixel_length; [super setFrame: newRect]; -/* unblock_input (); */ + /* unblock_input (); */ } @@ -8882,7 +8880,7 @@ -(bool)judge { EmacsView *view; block_input (); - /* ensure other scrollbar updates after deletion */ + /* Ensure other scrollbar updates after deletion. */ view = (EmacsView *)FRAME_NS_VIEW (frame); if (view != nil) view->scrollbarsNeedingUpdate++; @@ -8924,7 +8922,7 @@ - (int) checkSamePosition: (int) position portion: (int) portion whole: (int) whole { return em_position ==position && em_portion ==portion && em_whole ==whole - && portion != whole; /* needed for resize empty buf */ + && portion != whole; /* Needed for resizing empty buffer. */ } @@ -8963,7 +8961,7 @@ - (instancetype)setPosition: (int)position portion: (int)portion whole: (int)who return self; } -/* set up emacs_event */ +/* Set up emacs_event. */ - (void) sendScrollEventAtLoc: (float)loc fromEvent: (NSEvent *)e { Lisp_Object win; @@ -9006,7 +9004,8 @@ - (void) sendScrollEventAtLoc: (float)loc fromEvent: (NSEvent *)e } -/* called manually thru timer to implement repeated button action w/hold-down */ +/* Called manually through timer to implement repeated button action + with hold-down. */ - (instancetype)repeatScroll: (NSTimer *)scrollEntry { NSEvent *e = [[self window] currentEvent]; @@ -9015,7 +9014,7 @@ - (instancetype)repeatScroll: (NSTimer *)scrollEntry NSTRACE ("[EmacsScroller repeatScroll:]"); - /* clear timer if need be */ + /* Clear timer if need be. */ if (inKnob || [scroll_repeat_entry timeInterval] == SCROLL_BAR_FIRST_DELAY) { [scroll_repeat_entry invalidate]; @@ -9041,11 +9040,11 @@ - (instancetype)repeatScroll: (NSTimer *)scrollEntry /* Asynchronous mouse tracking for scroller. This allows us to dispatch - mouseDragged events without going into a modal loop. */ + mouseDragged events without going into a modal loop. */ - (void)mouseDown: (NSEvent *)e { NSRect sr, kr; - /* hitPart is only updated AFTER event is passed on */ + /* hitPart is only updated AFTER event is passed on. */ NSScrollerPart part = [self testPart: [e locationInWindow]]; CGFloat loc, kloc, pos UNINIT; int edge = 0; @@ -9144,9 +9143,9 @@ - (void)mouseDown: (NSEvent *)e } else { - pos = 0; /* ignored */ + pos = 0; /* ignored */ - /* set a timer to repeat, as we can't let superclass do this modally */ + /* Set a timer to repeat, as we can't let superclass do this modally. */ scroll_repeat_entry = [[NSTimer scheduledTimerWithTimeInterval: SCROLL_BAR_FIRST_DELAY target: self @@ -9161,7 +9160,7 @@ - (void)mouseDown: (NSEvent *)e } -/* Called as we manually track scroller drags, rather than superclass. */ +/* Called as we manually track scroller drags, rather than superclass. */ - (void)mouseDragged: (NSEvent *)e { NSRect sr; @@ -9219,7 +9218,7 @@ - (void)mouseUp: (NSEvent *)e } -/* treat scrollwheel events in the bar as though they were in the main window */ +/* Treat scrollwheel events in the bar as though they were in the main window. */ - (void) scrollWheel: (NSEvent *)theEvent { NSTRACE ("[EmacsScroller scrollWheel:]"); @@ -9307,7 +9306,7 @@ @implementation EmacsDocument /* XLFD: -foundry-family-weight-slant-swidth-adstyle-pxlsz-ptSz-resx-resy-spc-avgWidth-rgstry-encoding */ /* Note: ns_font_to_xlfd and ns_fontname_to_xlfd no longer needed, removed - in 1.43. */ + in 1.43. */ const char * ns_xlfd_to_fontname (const char *xlfd) @@ -9348,7 +9347,7 @@ Convert an X font name (XLFD) to an NS font name. name[i+1] = c_toupper (name[i+1]); } } -/*fprintf (stderr, "converted '%s' to '%s'\n",xlfd,name); */ + /* fprintf (stderr, "converted '%s' to '%s'\n",xlfd,name); */ ret = [[NSString stringWithUTF8String: name] UTF8String]; xfree (name); return ret; @@ -9362,7 +9361,7 @@ Convert an X font name (XLFD) to an NS font name. ns_antialias_threshold = 10.0; - /* from 23+ we need to tell emacs what modifiers there are.. */ + /* From 23+ we need to tell emacs what modifiers there are. */ DEFSYM (Qmodifier_value, "modifier-value"); DEFSYM (Qalt, "alt"); DEFSYM (Qhyper, "hyper"); @@ -9477,11 +9476,11 @@ Convert an X font name (XLFD) to an NS font name. DEFVAR_LISP ("ns-auto-hide-menu-bar", ns_auto_hide_menu_bar, doc: /* Non-nil means that the menu bar is hidden, but appears when the mouse is near. -Only works on Mac OS X 10.6 or later. */); +Only works on Mac OS X. */); ns_auto_hide_menu_bar = Qnil; DEFVAR_BOOL ("ns-use-native-fullscreen", ns_use_native_fullscreen, - doc: /*Non-nil means to use native fullscreen on Mac OS X 10.7 and later. + doc: /* Non-nil means to use native fullscreen on Mac OS X 10.7 and later. Nil means use fullscreen the old (< 10.7) way. The old way works better with multiple monitors, but lacks tool bar. This variable is ignored on Mac OS X < 10.7. Default is t. */); @@ -9489,35 +9488,35 @@ Nil means use fullscreen the old (< 10.7) way. The old way works better with ns_last_use_native_fullscreen = ns_use_native_fullscreen; DEFVAR_BOOL ("ns-use-fullscreen-animation", ns_use_fullscreen_animation, - doc: /*Non-nil means use animation on non-native fullscreen. + doc: /* Non-nil means use animation on non-native fullscreen. For native fullscreen, this does nothing. Default is nil. */); ns_use_fullscreen_animation = NO; DEFVAR_BOOL ("ns-use-srgb-colorspace", ns_use_srgb_colorspace, - doc: /*Non-nil means to use sRGB colorspace on Mac OS X 10.7 and later. + doc: /* Non-nil means to use sRGB colorspace on Mac OS X 10.7 and later. Note that this does not apply to images. This variable is ignored on Mac OS X < 10.7 and GNUstep. */); ns_use_srgb_colorspace = YES; DEFVAR_BOOL ("ns-use-mwheel-acceleration", ns_use_mwheel_acceleration, - doc: /*Non-nil means use macOS's standard mouse wheel acceleration. + doc: /* Non-nil means use macOS's standard mouse wheel acceleration. This variable is ignored on macOS < 10.7 and GNUstep. Default is t. */); ns_use_mwheel_acceleration = YES; DEFVAR_LISP ("ns-mwheel-line-height", ns_mwheel_line_height, - doc: /*The number of pixels touchpad scrolling considers one line. + doc: /* The number of pixels touchpad scrolling considers one line. Nil or a non-number means use the default frame line height. This variable is ignored on macOS < 10.7 and GNUstep. Default is nil. */); ns_mwheel_line_height = Qnil; DEFVAR_BOOL ("ns-use-mwheel-momentum", ns_use_mwheel_momentum, - doc: /*Non-nil means mouse wheel scrolling uses momentum. + doc: /* Non-nil means mouse wheel scrolling uses momentum. This variable is ignored on macOS < 10.7 and GNUstep. Default is t. */); ns_use_mwheel_momentum = YES; - /* TODO: move to common code */ + /* TODO: Move to common code. */ DEFVAR_LISP ("x-toolkit-scroll-bars", Vx_toolkit_scroll_bars, doc: /* SKIP: real doc in xterm.c. */); Vx_toolkit_scroll_bars = Qt; commit ba5a372540673984c64b6b3f3e934bf1fcee229a Author: Paul Eggert Date: Mon Mar 19 11:44:07 2018 -0700 * doc/emacs/rmail.texi: Fix broken link. diff --git a/doc/emacs/rmail.texi b/doc/emacs/rmail.texi index 658b964537..0a8bf7cc26 100644 --- a/doc/emacs/rmail.texi +++ b/doc/emacs/rmail.texi @@ -62,7 +62,7 @@ The message that is shown is called the @dfn{current message}. Rmail mode's special commands can do such things as delete the current message, copy it into another file, send a reply, or move to another message. You can also create multiple Rmail files (@pxref{Files}) and -use Rmail to move messages between them (@pxref{Output}). +use Rmail to move messages between them (@pxref{Rmail Output}). @cindex message number (Rmail) Within the Rmail file, messages are normally arranged sequentially in commit 6b2210cc29283fe14d86ecf40a671e632efa5ca0 Author: Paul Eggert Date: Mon Mar 19 11:41:40 2018 -0700 ; Spelling fix diff --git a/lisp/eshell/em-cmpl.el b/lisp/eshell/em-cmpl.el index b56cf168a2..f4b7872f8c 100644 --- a/lisp/eshell/em-cmpl.el +++ b/lisp/eshell/em-cmpl.el @@ -167,7 +167,7 @@ to writing a completion function." (eshell-cmpl--custom-variable-docstring 'pcomplete-suffix-list) :type (get 'pcomplete-suffix-list 'custom-type) :group 'pcomplete) -;; Only labelled obsolete in 26.1, but all it does it set +;; Only labeled obsolete in 26.1, but all it does it set ;; pcomplete-suffix-list, which is itself obsolete since 24.1. (make-obsolete-variable 'eshell-cmpl-suffix-list nil "24.1") commit 067c8c4f5b0fdb8a34691c977501c275bc765cca Author: Paul Eggert Date: Mon Mar 19 11:41:24 2018 -0700 Fix recently-added POP doc glitch * doc/emacs/rmail.texi (Remote Mailboxes): POP3 → POP, when talking about POP in general. diff --git a/doc/emacs/rmail.texi b/doc/emacs/rmail.texi index a51ded1f1b..658b964537 100644 --- a/doc/emacs/rmail.texi +++ b/doc/emacs/rmail.texi @@ -1521,7 +1521,7 @@ instead of storing the data in inbox files. The Mailutils its use for this is not recommended since it does not support encrypted connections---the Mailutils version does. Both versions of @command{movemail} work only with POP3, not with -older versions of POP3. +older versions of POP. @cindex @env{MAILHOST} environment variable @cindex POP3 mailboxes commit 6d2e8fdd102d2d4f5105898c15813fd8dcd0907f Author: Karl Fogel Date: Mon Mar 19 12:21:03 2018 -0500 Revert move of interactive `transpose-regions' to Lisp This reverts my commit 3a3aa0e056a of 2018-03-18 at 21:43:18 UTC. I thought consensus had been reached, but it had not: Eli Zaretskii felt the pre-3a3aa0e056a situation was fine and would not like to see it changed without at least further discussion. diff --git a/lisp/simple.el b/lisp/simple.el index 543fa08233..fa93cf87c7 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -7014,34 +7014,6 @@ With argument 0, interchanges line point is in with line mark is in." (forward-line arg)))) arg)) -(defun transpose-regions (startr1 endr1 startr2 endr2 &optional leave-markers) - "Transpose region STARTR1 to ENDR1 with STARTR2 to ENDR2. -The regions should not be overlapping, because the size of the buffer is -never changed in a transposition. - -Optional fifth arg LEAVE-MARKERS, if non-nil, means don't update -any markers that happen to be located in the regions. - -Transposing beyond buffer boundaries is an error. - -Interactively, STARTR1 and ENDR1 are point and mark; STARTR2 and ENDR2 -are the last two marks pushed to the mark ring; LEAVE-MARKERS is nil. -If a prefix argument N is given, STARTR2 and ENDR2 are the two -successive marks N entries back in the mark ring. A negative prefix -argument instead counts forward from the oldest mark in the mark -ring." - (interactive - (if (< (length mark-ring) 2) - (error "Other region must be marked before transposing two regions") - (let* ((num (if current-prefix-arg - (prefix-numeric-value current-prefix-arg) - 0)) - (ring-length (length mark-ring)) - (eltnum (mod num ring-length)) - (eltnum2 (mod (1+ num) ring-length))) - (list (point) (mark) (elt mark-ring eltnum) (elt mark-ring eltnum2))))) - (transpose-regions-internal startr1 endr1 startr2 endr2 leave-markers)) - ;; FIXME seems to leave point BEFORE the current object when ARG = 0, ;; which seems inconsistent with the ARG /= 0 case. ;; FIXME document SPECIAL. diff --git a/src/editfns.c b/src/editfns.c index e24867298e..d26319441b 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -5112,7 +5112,16 @@ transpose_markers (ptrdiff_t start1, ptrdiff_t end1, } } -DEFUN ("transpose-regions-internal", Ftranspose_regions_internal, Stranspose_regions_internal, 4, 5, 0, +DEFUN ("transpose-regions", Ftranspose_regions, Stranspose_regions, 4, 5, + "(if (< (length mark-ring) 2)\ + (error \"Other region must be marked before transposing two regions\")\ + (let* ((num (if current-prefix-arg\ + (prefix-numeric-value current-prefix-arg)\ + 0))\ + (ring-length (length mark-ring))\ + (eltnum (mod num ring-length))\ + (eltnum2 (mod (1+ num) ring-length)))\ + (list (point) (mark) (elt mark-ring eltnum) (elt mark-ring eltnum2))))", doc: /* Transpose region STARTR1 to ENDR1 with STARTR2 to ENDR2. The regions should not be overlapping, because the size of the buffer is never changed in a transposition. @@ -5120,7 +5129,14 @@ never changed in a transposition. Optional fifth arg LEAVE-MARKERS, if non-nil, means don't update any markers that happen to be located in the regions. -Transposing beyond buffer boundaries is an error. */) +Transposing beyond buffer boundaries is an error. + +Interactively, STARTR1 and ENDR1 are point and mark; STARTR2 and ENDR2 +are the last two marks pushed to the mark ring; LEAVE-MARKERS is nil. +If a prefix argument N is given, STARTR2 and ENDR2 are the two +successive marks N entries back in the mark ring. A negative prefix +argument instead counts forward from the oldest mark in the mark +ring. */) (Lisp_Object startr1, Lisp_Object endr1, Lisp_Object startr2, Lisp_Object endr2, Lisp_Object leave_markers) { register ptrdiff_t start1, end1, start2, end2; @@ -5565,5 +5581,5 @@ functions if all the text being accessed has this property. */); defsubr (&Swiden); defsubr (&Snarrow_to_region); defsubr (&Ssave_restriction); - defsubr (&Stranspose_regions_internal); + defsubr (&Stranspose_regions); } commit 903e3d43310638014a33fec64700e7db8e0774d0 Author: Alan Third Date: Mon Mar 19 15:04:40 2018 +0000 Fix frame resize flicker on macOS (bug#30699) * src/nsterm.h (ns_enable_screen_updates): New function. * src/nsterm.m (ns_enable_screen_updates): (ns_disable_screen_updates): New functions. (disable_screen_updates_count): Count of number of times we've called NSDisableScreenUpdates. (x_set_window_size): Disable screen updates when not in a live resize loop. * src/xdisp.c (redisplay_internal): Reenable screen updates when redisplay doesn't complete due to a popup. (unwind_redisplay): Reenable screen updates. diff --git a/src/nsterm.h b/src/nsterm.h index 8b985930ec..df59a7dbd9 100644 --- a/src/nsterm.h +++ b/src/nsterm.h @@ -1160,6 +1160,9 @@ extern void ns_release_autorelease_pool (void *); extern const char *ns_get_defaults_value (const char *key); extern void ns_init_locale (void); +#ifdef NS_IMPL_COCOA +extern void ns_enable_screen_updates (void); +#endif /* in nsmenu */ extern void update_frame_tool_bar (struct frame *f); diff --git a/src/nsterm.m b/src/nsterm.m index 75e0b837c6..f9107c43ce 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -288,6 +288,9 @@ - (NSColor *)colorUsingDefaultColorSpace static BOOL ns_fake_keydown = NO; #ifdef NS_IMPL_COCOA static BOOL ns_menu_bar_is_hidden = NO; + +/* The number of times NSDisableScreenUpdates has been called. */ +static int disable_screen_updates_count = 0; #endif /*static int debug_lock = 0; */ @@ -727,6 +730,40 @@ Free a pool and temporary objects it refers to (callable from C) } +#ifdef NS_IMPL_COCOA +/* Disabling screen updates can be used to make several actions appear + "atomic" to the end user. It seems some actions can still update + the display, though. + + When we re-enable screen updates the number of calls to + NSEnableScreenUpdates should match the number to + NSDisableScreenUpdates. + + We use these functions to prevent the user seeing a blank frame + after it has been resized. x_set_window_size disables updates and + when redisplay completes unwind_redisplay enables them again + (bug#30699). */ + +static void +ns_disable_screen_updates (void) +{ + NSDisableScreenUpdates (); + disable_screen_updates_count++; +} + +void +ns_enable_screen_updates (void) +/* Re-enable screen updates. Called from unwind_redisplay. */ +{ + while (disable_screen_updates_count > 0) + { + NSEnableScreenUpdates (); + disable_screen_updates_count--; + } +} +#endif + + static BOOL ns_menu_bar_should_be_hidden (void) /* True, if the menu bar should be hidden. */ @@ -1877,6 +1914,15 @@ -(void)remove block_input (); +#ifdef NS_IMPL_COCOA + /* To prevent showing the user a blank frame, stop updates being + flushed to the screen until after redisplay has completed. This + breaks live resize (resizing with a mouse), so don't do it if + we're in a live resize loop. */ + if (![view inLiveResize]) + ns_disable_screen_updates (); +#endif + if (pixelwise) { pixelwidth = FRAME_TEXT_TO_PIXEL_WIDTH (f, width); diff --git a/src/xdisp.c b/src/xdisp.c index a97d4db607..4778f532cd 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -13918,7 +13918,15 @@ redisplay_internal (void) #if defined (USE_X_TOOLKIT) || defined (USE_GTK) || defined (HAVE_NS) if (popup_activated ()) - return; + { +#ifdef NS_IMPL_COCOA + /* On macOS we may have disabled screen updates due to window + resizing. We should re-enable them so the popup can be + displayed. */ + ns_enable_screen_updates (); +#endif + return; + } #endif /* I don't think this happens but let's be paranoid. */ @@ -14722,6 +14730,12 @@ unwind_redisplay (void) { redisplaying_p = false; unblock_buffer_flips (); +#ifdef NS_IMPL_COCOA + /* On macOS we may have disabled screen updates due to window + resizing. When redisplay completes we want to re-enable + them. */ + ns_enable_screen_updates (); +#endif } commit fb3dc0e8aa9ce8514cd6ee0e33a91a34ee0d5756 Author: Eli Zaretskii Date: Mon Mar 19 17:18:47 2018 +0200 More proofreading of the Emacs manual * doc/emacs/macos.texi (Mac / GNUstep Basics): Fix typos. Improve indexing. (Mac / GNUstep Basics, Mac / GNUstep Customization) (Mac / GNUstep Events): Improve indexing. * doc/emacs/rmail.texi (Rmail): Mention Gnus. (Rmail Basics, Rmail Scrolling): Improve cross-references and indexing. (Rmail Motion): Minor improvements. (Rmail Inbox): Remove outdated text about Babyl format. (Rmail Files): Formatting changes. Comment out set-rmail-inbox-list in the table of commands, as it is commented out in the text that follows. (Rmail Output, Rmail Labels, Rmail Reply, Rmail Make Summary): Minor copyedits. (Rmail Summary Edit): Document rmail-summary-scroll-between-messages. (Rmail Editing): Improve indexing. (Movemail): Fix typos. (Remote Mailboxes): Use "POP3" rather than "POP". diff --git a/doc/emacs/macos.texi b/doc/emacs/macos.texi index 4982c78f2e..e669eaa4cb 100644 --- a/doc/emacs/macos.texi +++ b/doc/emacs/macos.texi @@ -21,7 +21,7 @@ begin with @samp{ns-}, which is short for @samp{Nextstep}. NeXTstep was an application interface released by NeXT Inc.@: during the 1980s, of which Cocoa is a direct descendant. Apart from Cocoa, there is another NeXTstep-style system: GNUstep, which is free software. As of -this writing, Emacs GNUstep support is alpha status (@pxref{GNUstep +this writing, Emacs GNUstep support is in alpha status (@pxref{GNUstep Support}), but we hope to improve it in the future. @menu @@ -34,6 +34,7 @@ Support}), but we hope to improve it in the future. @node Mac / GNUstep Basics @section Basic Emacs usage under macOS and GNUstep +@cindex modifier keys (macOS) By default, the @key{Alt} and @key{Option} keys are the same as @key{Meta}. The Mac @key{Cmd} key is the same as @key{Super}, and Emacs provides a set of key bindings using this modifier key that mimic @@ -47,7 +48,7 @@ behavior of the right @key{Alt} and @key{Option} keys. These keys behave like the left-hand keys if the value is @code{left} (the default). A value of @code{control}, @code{meta}, @code{alt}, @code{super}, or @code{hyper} makes them behave like the corresponding -modifier keys; a value to @code{left} means be the same key as +modifier keys; a value of @code{left} means be the same key as @code{ns-alternate-modifier}; a value of @code{none} tells Emacs to ignore them, in which case you get the default behavior of macOS accentuation system from the right option key. @@ -64,6 +65,7 @@ dialogs to read file names. However, if you use the regular Emacs key sequences, such as @kbd{C-x C-f}, Emacs uses the minibuffer to read file names. +@cindex copy/paste to/from primary selection (macOS) On GNUstep, in an X-windows environment you need to use @kbd{Cmd-c} instead of one of the @kbd{C-w} or @kbd{M-w} commands to transfer text to the X primary selection; otherwise, Emacs will use the @@ -76,6 +78,7 @@ clipboard. @c How is this any different to launching from a window manager menu @c in GNU/Linux? These are sometimes not login shells either. +@cindex environment variables (macOS) Many programs which may run under Emacs, like latex or man, depend on the settings of environment variables. If Emacs is launched from the shell, it will automatically inherit these environment variables and its subprocesses @@ -98,6 +101,7 @@ keys and the fullscreen behavior. To see all such options, use @subsection Font and Color Panels +@findex ns-popup-font-panel The standard Mac / GNUstep font and color panels are accessible via Lisp commands. The Font Panel may be accessed with @kbd{M-x ns-popup-font-panel}. It will set the default font in the frame most @@ -106,6 +110,7 @@ recently used or clicked on. @c To make the setting permanent, use @samp{Save Options} in the @c Options menu, or run @code{menu-bar-options-save}. +@findex ns-popup-color-panel You can bring up a color panel with @kbd{M-x ns-popup-color-panel} and drag the color you want over the Emacs face you want to change. Normal dragging will alter the foreground color. Shift dragging will alter the @@ -119,6 +124,7 @@ Useful in this context is the listing of all faces obtained by @kbd{M-x list-faces-display}. @cindex Core Text, on macOS +@cindex font backend, on macOS In macOS, Emacs uses a Core Text based font backend by default. If you prefer the older font style, enter the following at the command-line before starting Emacs: @@ -130,6 +136,7 @@ at the command-line before starting Emacs: @node Mac / GNUstep Events @section Windowing System Events under macOS / GNUstep +@cindex events on macOS Nextstep applications receive a number of special events which have no X equivalent. These are sent as specially defined key events, which @@ -152,7 +159,7 @@ You can change how Emacs responds to a @code{ns-open-file} event by changing the variable @code{ns-pop-up-frames}. Its default value, @samp{fresh}, is what we have just described. A value of @code{t} means to always visit the file in a new frame. A value of @code{nil} -means to always visit the file in an existing frame. +means to always visit the file in the selected frame. @item ns-open-temp-file This event occurs when another application requests that Emacs open a @@ -195,6 +202,7 @@ This event occurs when the user logs out and Emacs is still running, or when The default behavior is to save all file-visiting buffers. @end table +@cindex using Nextstep services (macOS) Emacs also allows users to make use of Nextstep services, via a set of commands whose names begin with @samp{ns-service-} and end with the name of the service. Type @kbd{M-x ns-service-@key{TAB}} to diff --git a/doc/emacs/rmail.texi b/doc/emacs/rmail.texi index cb62ce3652..a51ded1f1b 100644 --- a/doc/emacs/rmail.texi +++ b/doc/emacs/rmail.texi @@ -14,6 +14,12 @@ you receive. Rmail stores mail messages in files called Rmail files. Reading the messages in an Rmail file is done in a special major mode, Rmail mode, which redefines most letters to run commands for managing mail. + + Emacs also comes with a much more sophisticated and flexible +subsystem for reading mail, called Gnus. Gnus is a very large +package, and is therefore described in its own manual, see @ref{Top,,, +gnus, The Gnus Newsreader}. + @menu * Basic: Rmail Basics. Basic concepts of Rmail, and simple use. * Scroll: Rmail Scrolling. Scrolling through a message. @@ -50,14 +56,15 @@ Rmail file, merges new mail in from your inboxes, displays the first message you haven't read yet, and lets you begin reading. The variable @code{rmail-file-name} specifies the name of the primary Rmail file. +@cindex current message (Rmail) Rmail displays only one message in the Rmail file at a time. The message that is shown is called the @dfn{current message}. Rmail mode's special commands can do such things as delete the current message, copy it into another file, send a reply, or move to another -message. You can also create multiple Rmail files and use Rmail to move -messages between them. +message. You can also create multiple Rmail files (@pxref{Files}) and +use Rmail to move messages between them (@pxref{Output}). -@cindex message number +@cindex message number (Rmail) Within the Rmail file, messages are normally arranged sequentially in order of receipt; you can specify other ways to sort them (@pxref{Rmail Sorting}). Messages are identified by consecutive integers which are @@ -72,8 +79,9 @@ with the @kbd{j} key (@pxref{Rmail Motion}). become permanent only when you save the file. You can save it with @kbd{s} (@code{rmail-expunge-and-save}), which also expunges deleted messages from the file first (@pxref{Rmail Deletion}). To save the -file without expunging, use @kbd{C-x C-s}. Rmail also saves the Rmail -file after merging new mail from an inbox file (@pxref{Rmail Inbox}). +file without expunging, use @kbd{C-x C-s}. Rmail automatically saves +the Rmail file after merging new mail from an inbox file (@pxref{Rmail +Inbox}). @kindex q @r{(Rmail)} @findex rmail-quit @@ -93,9 +101,10 @@ Rmail buffer and its summary without expunging and saving the Rmail file. @section Scrolling Within a Message When Rmail displays a message that does not fit on the screen, you -must scroll through it to read the rest. You could do this with -@kbd{C-v}, @kbd{M-v} and @kbd{M-<}, but in Rmail scrolling is so -frequent that it deserves to be easier. +must scroll through it to read the rest. You could do this with the +usual scrolling commands: @kbd{C-v}, @kbd{M-v} and @kbd{M-<} +(@pxref{Scrolling}), but in Rmail scrolling is so frequent that it +deserves to be easier. @table @kbd @item @key{SPC} @@ -124,9 +133,10 @@ and @kbd{M-v} (@code{scroll-down-command}) respectively. The command @kbd{.} (@code{rmail-beginning-of-message}) scrolls back to the beginning of the selected message. This is not quite the same as @kbd{M-<}: for one thing, it does not set the mark; for another, it resets the buffer -boundaries of the current message if you have changed them. Similarly, -the command @kbd{/} (@code{rmail-end-of-message}) scrolls forward to the end -of the selected message. +boundaries of the current message if you have changed them (e.g., by +editing, @pxref{Rmail Editing}). Similarly, the command @kbd{/} +(@code{rmail-end-of-message}) scrolls forward to the end of the +selected message. @c The comment about buffer boundaries is still true in mbox Rmail, if @c less likely to be relevant. @@ -168,11 +178,9 @@ message number @var{n} (@code{rmail-show-message}). Move to the last message (@code{rmail-last-message}). @item < Move to the first message (@code{rmail-first-message}). - @item M-s @var{regexp} @key{RET} Move to the next message containing a match for @var{regexp} (@code{rmail-search}). - @item - M-s @var{regexp} @key{RET} Move to the previous message containing a match for @var{regexp}. (This is @kbd{M-s} with a negative argument.) @@ -198,7 +206,8 @@ numeric argument to any of these commands serves as a repeat count. In Rmail, you can specify a numeric argument by typing just the -digits. You don't need to type @kbd{C-u} first. +digits. You don't need to type @kbd{C-u} first. You can also specify +a negative argument by typing just @kbd{-}. @kindex M-s @r{(Rmail)} @findex rmail-search @@ -228,7 +237,9 @@ the next message with the same subject as the current one. A prefix argument serves as a repeat count. With a negative argument, this command moves backward, acting like @kbd{C-c C-p} (@code{rmail-previous-same-subject}). When comparing subjects, these -commands ignore the prefixes typically added to the subjects of replies. +commands ignore the prefixes typically added to the subjects of +replies. These commands are useful for reading all of the messages +pertaining to the same subject, a.k.a.@: @dfn{thread}. @kindex j @r{(Rmail)} @kindex > @r{(Rmail)} @@ -331,7 +342,7 @@ adding or removing this attribute. @xref{Rmail Attributes}. When you receive mail locally, the operating system places incoming mail for you in a file that we call your @dfn{inbox}. When you start up Rmail, it runs a C program called @command{movemail} to copy the new -messages from your local inbox into your primary Rmail file, which +messages from your inbox into your primary Rmail file, which also contains other messages saved from previous Rmail sessions. It is in this file that you actually read the mail with Rmail. This operation is called @dfn{getting new mail}. You can get new mail at @@ -370,19 +381,12 @@ all into a separate Rmail file avoids the need for interlocking in all the rest of Rmail, since only Rmail operates on the Rmail file. @end enumerate -@c FIXME remove this in Emacs 25; won't be relevant any more. -@cindex Babyl files @cindex mbox files - Rmail was originally written to use the Babyl format as its internal -format. Since then, we have recognized that the usual inbox format -(@samp{mbox}) on Unix and GNU systems is adequate for the job, and so -since Emacs 23 Rmail uses that as its internal format. The Rmail file -is still separate from the inbox file, even though their format is the -same. -@c But this bit should stay in some form. @vindex rmail-mbox-format -(In fact, there are a few slightly different mbox formats. -The differences are not very important, but you can set the variable + Rmail uses the standard @samp{mbox} format, introduced by Unix and +GNU systems for inbox files, as its internal format of Rmail files. +(In fact, there are a few slightly different mbox formats. The +differences are not very important, but you can set the variable @code{rmail-mbox-format} to tell Rmail which form your system uses. See that variable's documentation for more details.) @@ -395,7 +399,8 @@ lose mail. If @code{rmail-preserve-inbox} is non-@code{nil}, then Rmail does not clear out the inbox file when it gets new mail. You may wish to set this, for example, on a portable computer you use to check your mail via POP while traveling, so that your mail will remain -on the server and you can save it later on your workstation. +on the server and you can save it later on your main desktop +workstation. In some cases, Rmail copies the new mail from the inbox file indirectly. First it runs the @command{movemail} program to move the mail @@ -427,14 +432,13 @@ into them with explicit Rmail commands (@pxref{Rmail Output}). @table @kbd @item i @var{file} @key{RET} Read @var{file} into Emacs and run Rmail on it (@code{rmail-input}). - +@ignore @item M-x set-rmail-inbox-list @key{RET} @var{files} @key{RET} Specify inbox file names for current Rmail file to get mail from. - +@end ignore @item g Merge new mail from current Rmail file's inboxes (@code{rmail-get-new-mail}). - @item C-u g @var{file} @key{RET} Merge new mail from inbox file @var{file}. @end table @@ -468,6 +472,8 @@ item. These variables also apply to choosing a file for output (@pxref{Rmail Output}). @c FIXME matches only checked when Rmail file first visited? +@c This is commented out because we want to advertise rmail-inbox-list +@c instead. @ignore @findex set-rmail-inbox-list Each Rmail file can contain a list of inbox file names; you can specify @@ -492,6 +498,7 @@ current Rmail file from its inboxes. If the Rmail file has no inboxes, @kbd{g} does nothing. The command @kbd{M-x rmail} also merges new mail into your primary Rmail file. +@cindex merge mail from file (Rmail) To merge mail from a file that is not the usual inbox, give the @kbd{g} key a numeric argument, as in @kbd{C-u g}. Then it reads a file name and merges mail from that file. The inbox file is not deleted or @@ -518,9 +525,9 @@ file name from the message @samp{Subject} header. @end table @kindex o @r{(Rmail)} -@findex rmail-output-as-seen -@kindex C-o @r{(Rmail)} @findex rmail-output +@kindex C-o @r{(Rmail)} +@findex rmail-output-as-seen The commands @kbd{o} and @kbd{C-o} copy the current message into a specified file, adding it at the end. The two commands differ mainly in how much to copy: @kbd{o} copies the full message headers, even if @@ -529,7 +536,7 @@ currently displayed and no more. @xref{Rmail Display}. In addition, @kbd{o} converts the message to Babyl format (used by Rmail in Emacs version 22 and before) if the file is in Babyl format; @kbd{C-o} cannot output to Babyl files at all. -@c FIXME remove BABYL mention in Emacs 25? +@c FIXME remove BABYL mention in some future version? If the output file is currently visited in an Emacs buffer, the output commands append the message to that buffer. It is up to you to @@ -542,8 +549,10 @@ file. You can save the body to a file (excluding the message header) with the @kbd{w} command (@code{rmail-output-body-to-file}). Often these messages contain the intended file name in the @samp{Subject} field, so the @kbd{w} command uses the @samp{Subject} field as the -default for the output file name. However, the file name is read using -the minibuffer, so you can specify a different name if you wish. +default for the output file name (after replacing some characters that +cannot be portably used in file names). However, the file name is +read using the minibuffer, so you can specify a different name if you +wish. You can also output a message to an Rmail file chosen with a menu. In the Classify menu, choose the Output Rmail File menu item; then @@ -564,7 +573,8 @@ appears in the mode line when such a message is current. If you like to keep just a single copy of every mail message, set the variable @code{rmail-delete-after-output} to @code{t}; then the @kbd{o}, @kbd{C-o} and @kbd{w} commands delete the original message -after copying it. (You can undelete it afterward if you wish.) +after copying it. (You can undelete it afterward if you wish, see +@ref{Rmail Deletion}.) @vindex rmail-output-file-alist The variable @code{rmail-output-file-alist} lets you specify @@ -582,7 +592,7 @@ default file name for output is @var{name-exp}. If multiple elements match the message, the first matching element decides the default file name. The subexpression @var{name-exp} may be a string constant giving the file name to use, or more generally it may be any Lisp expression -that returns a file name as a string. @code{rmail-output-file-alist} +that yields a file name as a string. @code{rmail-output-file-alist} applies to both @kbd{o} and @kbd{C-o}. @vindex rmail-automatic-folder-directives @@ -641,8 +651,7 @@ Make a summary of all messages containing any of the labels @var{labels} The @kbd{a} (@code{rmail-add-label}) and @kbd{k} (@code{rmail-kill-label}) commands allow you to assign or remove any label on the current message. If the @var{label} argument is empty, it -means to assign or remove the same label most recently assigned or -removed. +means to assign or remove the label most recently assigned or removed. Once you have given messages labels to classify them as you wish, there are three ways to use the labels: in moving, in summaries, and in sorting. @@ -717,9 +726,10 @@ standard meaning. Rmail has several commands to send outgoing mail. @xref{Sending Mail}, for information on using Message mode, including certain features meant to work with Rmail. What this section documents are -the special commands of Rmail for entering the mail buffer. Note that -the usual keys for sending mail---@kbd{C-x m}, @kbd{C-x 4 m}, and -@kbd{C-x 5 m}---also work normally in Rmail mode. +the special commands of Rmail for entering the mail buffer used to +compose the outgoing message. Note that the usual keys for sending +mail---@kbd{C-x m}, @kbd{C-x 4 m}, and @kbd{C-x 5 m}---also work +normally in Rmail mode. @table @kbd @item m @@ -758,9 +768,9 @@ excluded from the @samp{CC} field. They are also excluded from the variable is @code{nil}, then the first time you compose a reply it is initialized to a default value that matches your own address. - To omit the @samp{CC} field completely for a particular reply, enter + To reply only to the sender of the original message, enter the reply command with a numeric argument: @kbd{C-u r} or @kbd{1 r}. -This means to reply only to the sender of the original message. +This omits the @samp{CC} field completely for a particular reply. Once the mail composition buffer has been initialized, editing and sending the mail goes as usual (@pxref{Sending Mail}). You can edit @@ -930,7 +940,7 @@ commas. makes a partial summary mentioning only the messages that have one or more recipients matching the regular expression @var{rcpts}. This is matched against the @samp{To}, @samp{From}, and @samp{CC} headers (supply a prefix -argument to exclude this header). +argument to exclude the @samp{CC} header). @kindex C-M-t @r{(Rmail)} @findex rmail-summary-by-topic @@ -976,6 +986,7 @@ different lines. It doesn't matter what Emacs command you use to move point; whichever line point is on at the end of the command, that message is selected in the Rmail buffer. +@vindex rmail-summary-scroll-between-messages Almost all Rmail commands work in the summary buffer as well as in the Rmail buffer. Thus, @kbd{d} in the summary buffer deletes the current message, @kbd{u} undeletes, and @kbd{x} expunges. (However, @@ -984,8 +995,12 @@ relevant direction, the delete commands go to the first or last message, rather than staying on the current message.) @kbd{o} and @kbd{C-o} output the current message to a FILE; @kbd{r} starts a reply to it; etc. You can scroll the current message while remaining in the -summary buffer using @key{SPC} and @key{DEL}. -@c rmail-summary-scroll-between-messages not mentioned. +summary buffer using @key{SPC} and @key{DEL}. However, in the summary +buffer scrolling past the end or the beginning of a message with +@key{SPC} or @key{DEL} goes, respectively, to the next or previous +undeleted message. Customize the +@code{rmail-summary-scroll-between-messages} option to nil to disable +scrolling to next/previous messages. @findex rmail-summary-undelete-many @kbd{M-u} (@code{rmail-summary-undelete-many}) undeletes all deleted @@ -1128,8 +1143,8 @@ biggest to smallest, or in reverse alphabetical order. The same keys in the summary buffer run similar functions; for example, @kbd{C-c C-s C-l} runs @code{rmail-summary-sort-by-lines}. -Note that these commands always sort the whole Rmail buffer, even if the -summary is only showing a subset of messages. +These commands always sort the whole Rmail buffer, even if the summary +is only showing a subset of messages. Note that you cannot undo a sort, so you may wish to save the Rmail buffer before sorting it. @@ -1210,14 +1225,15 @@ Toggle between @acronym{MIME} display and raw message @end table Each plain-text @acronym{MIME} part is initially displayed -immediately after its tagline, as part of the Rmail buffer, while -@acronym{MIME} parts of other types are represented only by their -taglines, with their actual contents hidden. In either case, you can -toggle a @acronym{MIME} part between its displayed and hidden -states by typing @key{RET} anywhere in the part---or anywhere in its -tagline (except for buttons for other actions, if there are any). Type -@key{RET} (or click with the mouse) to activate a tagline button, and -@key{TAB} to cycle point between tagline buttons. +immediately after its tagline, as part of the Rmail buffer (unless the +message has an @acronym{HTML} part, see below), while @acronym{MIME} +parts of other types are represented only by their taglines, with +their actual contents hidden. In either case, you can toggle a +@acronym{MIME} part between its displayed and hidden states by typing +@key{RET} anywhere in the part---or anywhere in its tagline (except +for buttons for other actions, if there are any). Type @key{RET} (or +click with the mouse) to activate a tagline button, and @key{TAB} to +cycle point between tagline buttons. The @kbd{v} (@code{rmail-mime}) command toggles between the default @acronym{MIME} display described above, and a raw display showing @@ -1322,17 +1338,20 @@ Edit the current message as ordinary text. Rmail mode into Rmail Edit mode, another major mode which is nearly the same as Text mode. The mode line indicates this change. +@findex rmail-cease-edit +@findex rmail-abort-edit In Rmail Edit mode, letters insert themselves as usual and the Rmail commands are not available. You can edit the message body and header fields. When you are finished editing the message, type @kbd{C-c C-c} -to switch back to Rmail mode. Alternatively, you can return to Rmail -mode but cancel any editing that you have done, by typing @kbd{C-c C-]}. +(@code{rmail-cease-edit}) to switch back to Rmail mode. +Alternatively, you can return to Rmail mode but cancel any editing +that you have done, by typing @kbd{C-c C-]} (@code{rmail-abort-edit}). @vindex rmail-edit-mode-hook Entering Rmail Edit mode runs the hook @code{text-mode-hook}; then it runs the hook @code{rmail-edit-mode-hook} (@pxref{Hooks}). Returning to ordinary Rmail mode adds the attribute @samp{edited} to -the message, if you have made any changes in it. +the message, if you have made any changes in it (@pxref{Rmail Attributes}). @node Rmail Digest @section Digest Messages @@ -1384,9 +1403,9 @@ version. There are two versions of the @command{movemail} program: the GNU Mailutils version (@pxref{movemail,,,mailutils,GNU mailutils}), and an Emacs-specific version that is built and installed unless Emacs was configured @option{--with-mailutils} in effect. -The two @command{mailtool} versions support the same +The two @command{movemail} versions support the same command line syntax and the same basic subset of options. However, the -Mailutils version offers additional features. +Mailutils version offers additional features and is more secure. The Emacs version of @command{movemail} can retrieve mail from the usual Unix mailbox formats. @strong{Warning}: Although it can also use the POP3 @@ -1451,8 +1470,8 @@ denotes the name of @code{maildir} mailbox, e.g., @code{maildir:///mail/inbox}. @item file -Any local mailbox format. Its actual format is detected automatically -by @command{movemail}. +Any local file in mailbox format. Its actual format is detected +automatically by @command{movemail}. @item pop @itemx pops @@ -1495,19 +1514,19 @@ listed in @code{rmail-movemail-search-path}, then in @code{exec-path} @section Retrieving Mail from Remote Mailboxes @pindex movemail - Some sites use a method called POP for accessing users' inbox data + Some sites use a method called POP3 for accessing users' inbox data instead of storing the data in inbox files. The Mailutils -@command{movemail} by default supports POP with TLS encryption. -@strong{Warning:} Although the @command{Emacs movemail} supports POP, +@command{movemail} by default supports POP3 with TLS encryption. +@strong{Warning:} Although the @command{Emacs movemail} supports POP3, its use for this is not recommended since it does not support encrypted connections---the Mailutils version does. Both versions of @command{movemail} work only with POP3, not with -older versions of POP. +older versions of POP3. @cindex @env{MAILHOST} environment variable -@cindex POP mailboxes +@cindex POP3 mailboxes You can specify -a POP inbox by using a POP @dfn{URL} (@pxref{Movemail}). A POP +a POP3 inbox by using a POP3 @dfn{URL} (@pxref{Movemail}). A POP3 @acronym{URL} is of the form @samp{pop://@var{username}@@@var{hostname}:@var{port}}, where @var{hostname} and @var{port} are the host name (or IP address) @@ -1522,11 +1541,11 @@ If using Mailutils @command{movemail}, you may wish to use @samp{pops} in place of @samp{pop}. For backward compatibility, Rmail also supports an alternative way of -specifying remote POP mailboxes. Specifying an inbox name in the form +specifying remote POP3 mailboxes. Specifying an inbox name in the form @samp{po:@var{username}:@var{hostname}:@var{port}} is equivalent to @samp{pop://@var{username}@@@var{hostname}:@var{port}}. If you omit the @var{:hostname} part, the @env{MAILHOST} environment variable specifies -the machine on which to look for the POP server. +the machine on which to look for the POP3 server. @cindex IMAP mailboxes Another method for accessing remote mailboxes is IMAP@. This method is @@ -1561,15 +1580,15 @@ set the variable @code{rmail-movemail-flags} a list of the flags you wish to use. Do not use this variable to pass the @samp{-p} flag to preserve your inbox contents; use @code{rmail-preserve-inbox} instead. -@cindex Kerberos POP authentication +@cindex Kerberos POP3 authentication The @command{movemail} program installed at your site may support Kerberos authentication. If it is supported, it is used by default -whenever you attempt to retrieve POP mail when +whenever you attempt to retrieve POP3 mail when @code{rmail-remote-password} and @code{rmail-remote-password-required} are unset. -@cindex reverse order in POP inboxes - Some POP servers store messages in reverse order. If your server does +@cindex reverse order in POP3 inboxes + Some POP3 servers store messages in reverse order. If your server does this, and you would rather read your mail in the order in which it was received, you can tell @command{movemail} to reverse the order of downloaded messages by adding the @samp{-r} flag to commit 1979bce57d1887d89de6d728bb34dcd0f6478b2f Author: Michael Albinus Date: Mon Mar 19 12:58:45 2018 +0100 Print top time consuming tests if advised * lisp/emacs-lisp/ert.el (ert-summarize-tests-batch-and-exit): New argument HIGH. Print top-running tests. * test/Makefile.in (check-doit): Use ${SUMMARIZE_TESTS}. * test/README: Explain SUMMARIZE_TESTS. diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el index 09cf28e38b..32bb367cdb 100644 --- a/lisp/emacs-lisp/ert.el +++ b/lisp/emacs-lisp/ert.el @@ -1491,20 +1491,23 @@ the tests)." (kill-emacs 2)))) -(defun ert-summarize-tests-batch-and-exit () +(defun ert-summarize-tests-batch-and-exit (&optional high) "Summarize the results of testing. Expects to be called in batch mode, with logfiles as command-line arguments. The logfiles should have the `ert-run-tests-batch' format. When finished, -this exits Emacs, with status as per `ert-run-tests-batch-and-exit'." +this exits Emacs, with status as per `ert-run-tests-batch-and-exit'. + +If HIGH is a natural number, the HIGH long lasting tests are summarized." (or noninteractive (user-error "This function is only for use in batch mode")) + (or (natnump high) (setq high 0)) ;; Better crash loudly than attempting to recover from undefined ;; behavior. (setq attempt-stack-overflow-recovery nil attempt-orderly-shutdown-on-fatal-signal nil) (let ((nlogs (length command-line-args-left)) (ntests 0) (nrun 0) (nexpected 0) (nunexpected 0) (nskipped 0) - nnotrun logfile notests badtests unexpected skipped) + nnotrun logfile notests badtests unexpected skipped tests) (with-temp-buffer (while (setq logfile (pop command-line-args-left)) (erase-buffer) @@ -1527,7 +1530,15 @@ Ran \\([0-9]+\\) tests, \\([0-9]+\\) results as expected\ (when (match-string 5) (push logfile skipped) (setq nskipped (+ nskipped - (string-to-number (match-string 5))))))))) + (string-to-number (match-string 5))))) + (unless (zerop high) + (goto-char (point-min)) + (while (< (point) (point-max)) + (if (looking-at "^\\s-+\\w+\\s-+[[:digit:]]+/[[:digit:]]+\\s-+\\S-+\\s-+(\\([.[:digit:]]+\\)\\s-+sec)$") + (push (cons (string-to-number (match-string 1)) + (match-string 0)) + tests)) + (forward-line))))))) (setq nnotrun (- ntests nrun)) (message "\nSUMMARY OF TEST RESULTS") (message "-----------------------") @@ -1558,6 +1569,12 @@ Ran \\([0-9]+\\) tests, \\([0-9]+\\) results as expected\ (when unexpected (message "%d files contained unexpected results:" (length unexpected)) (mapc (lambda (l) (message " %s" l)) unexpected)) + (unless (or (null tests) (zerop high)) + (message "\nLONG-RUNNING TESTS") + (message "------------------") + (setq tests (sort tests (lambda (x y) (> (car x) (car y))))) + (when (< high (length tests)) (setcdr (nthcdr (1- high) tests) nil)) + (message "%s" (mapconcat 'cdr tests "\n"))) ;; More details on hydra, where the logs are harder to get to. (when (and (getenv "EMACS_HYDRA_CI") (not (zerop (+ nunexpected nskipped)))) diff --git a/test/Makefile.in b/test/Makefile.in index 20e90c6ce5..bf1f9f39b7 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -277,7 +277,8 @@ check-maybe: check-no-automated-subdir ## summarizing step from running when there is an error. check-doit: -@${MAKE} -k ${LOGFILES} - @$(emacs) -l ert -f ert-summarize-tests-batch-and-exit ${LOGFILES} + @$(emacs) -l ert --eval \ + "(ert-summarize-tests-batch-and-exit ${SUMMARIZE_TESTS})" ${LOGFILES} .PHONY: mostlyclean clean bootstrap-clean distclean maintainer-clean diff --git a/test/README b/test/README index 36307e3b6c..b9f6f65c45 100644 --- a/test/README +++ b/test/README @@ -65,6 +65,11 @@ compiled version of a test use make TEST_LOAD_EL=no ... +Some tests might take long time to run. In order to summarize the + tests with the longest duration, call + + make SUMMARIZE_TESTS= ... + (Also, see etc/compilation.txt for compilation mode font lock tests.) commit 415ff1a0e141b74a53df1d8411113b1cd0c9ce90 Author: Eli Zaretskii Date: Mon Mar 19 11:17:20 2018 +0200 Followup to last change in browse-url.el * lisp/net/browse-url.el (browse-url-emacs): Doc fix to follow up the previous change. (Bug#30673) * etc/NEWS: Mention the change in 'browse-url-emacs'. diff --git a/etc/NEWS b/etc/NEWS index b6c4157384..99f3f27486 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -144,6 +144,11 @@ for abbrevs that have them. * Changes in Specialized Modes and Packages in Emacs 27.1 +** Browse-url +*** The function 'browse-url-emacs' can now visit a URL in selected window. +It now treats the optional 2nd argument to mean that the URL should be +shown in the currently selected window. + ** Ecomplete *** The ecomplete sorting has changed to a decay-based algorithm. This can be controlled by the new `ecomplete-sort-predicate' variable. diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index 3b5169d473..bdedcb2bd3 100644 --- a/lisp/net/browse-url.el +++ b/lisp/net/browse-url.el @@ -1243,7 +1243,9 @@ used instead of `browse-url-new-window-flag'." ;;;###autoload (defun browse-url-emacs (url &optional same-window) - "Ask Emacs to load URL into a buffer and show it in another window." + "Ask Emacs to load URL into a buffer and show it in another window. +Optional argument SAME-WINDOW non-nil means show the URL in the +currently selected window instead." (interactive (browse-url-interactive-arg "URL: ")) (require 'url-handlers) (let ((file-name-handler-alist commit f022b1bdf885007363518ec1474ef5820ee6b6d6 Author: Pierre Téchoueyres Date: Thu Mar 1 22:22:05 2018 +0100 Allow 'browse-url-emacs' to fetch URL in the selected window * lisp/net/browse-url.el (browse-url-emacs): Use same-window argument. (Bug#30673) diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index 8086495aaa..3b5169d473 100644 --- a/lisp/net/browse-url.el +++ b/lisp/net/browse-url.el @@ -1242,18 +1242,14 @@ used instead of `browse-url-new-window-flag'." (defvar url-handler-regexp) ;;;###autoload -(defun browse-url-emacs (url &optional _new-window) +(defun browse-url-emacs (url &optional same-window) "Ask Emacs to load URL into a buffer and show it in another window." (interactive (browse-url-interactive-arg "URL: ")) (require 'url-handlers) (let ((file-name-handler-alist (cons (cons url-handler-regexp 'url-file-handler) file-name-handler-alist))) - ;; Ignore `new-window': with all other browsers the URL is always shown - ;; in another window than the current Emacs one since it's shown in - ;; another application's window. - ;; (if new-window (find-file-other-window url) (find-file url)) - (find-file-other-window url))) + (if same-window (find-file url) (find-file-other-window url)))) ;;;###autoload (defun browse-url-gnome-moz (url &optional new-window) commit a776ce7be658679d776e0bd5a0f8ffe0cc1cb33a Author: Simen Heggestøyl Date: Mon Mar 19 10:01:01 2018 +0100 Fix typo in the Emacs manual's VC chapter * doc/emacs/maintaining.texi (VC Directory Buffer): Fix a typo. diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi index cda482877a..9421691ba7 100644 --- a/doc/emacs/maintaining.texi +++ b/doc/emacs/maintaining.texi @@ -1181,7 +1181,7 @@ become up-to-date as a direct result of a VC command, it is listed. @noindent Two work files have been modified but not committed: -@file{configure.ac} in the current directory, and @file{foo.c} in the +@file{configure.ac} in the current directory, and @file{main.c} in the @file{src/} subdirectory. The file named @file{README} has been added but is not yet committed, while @file{temp.txt} is not under version control (@pxref{Registering}). commit 2db57579b08ac99c464b6d3698648b3167fc5d55 Author: Radon Rosborough Date: Fri Mar 2 21:06:53 2018 -0800 Various follow-ups for early init file changes * doc/emacs/custom.texi (Early Init File): Add more details about which variables must be set in the early init file rather than the regular init file. See https://lists.nongnu.org/archive/html/bug-gnu-emacs/2018-02/msg00827.html * lisp/emacs-lisp/package.el (package-enable-at-startup): Update docstring to note that packages are now made available before loading the init file, rather than afterwards. See https://lists.gnu.org/archive/html/emacs-devel/2018-02/msg00632.html (package-load-list): Refer to "making available" rather than "loading" for packages. See https://lists.gnu.org/archive/html/emacs-devel/2018-02/msg00298.html * lisp/startup.el (command-line): Call `custom-reevaluate-setting' on predefined variables before loading the early init file and before `package-initialize' is called. This prevents `Info-default-directory-list' from being unbound when `package-initialize' tries to access it during startup. See https://lists.gnu.org/archive/html/emacs-devel/2018-02/msg00545.html * lisp/emacs-lisp/package.el (package-initialize): Issue a warning if called twice. See: https://lists.gnu.org/archive/html/emacs-devel/2018-02/msg00626.html https://lists.gnu.org/archive/html/emacs-devel/2018-03/msg00301.html diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi index be73d7a289..a69888cdbd 100644 --- a/doc/emacs/custom.texi +++ b/doc/emacs/custom.texi @@ -2607,9 +2607,13 @@ desirable to have customizations that take effect during Emacs startup earlier than the normal init file is processed. Such customizations can be put in the early init file, @file{~/.emacs.d/early-init.el}. This file is loaded before the package system is initialized, so in it -you can customize variables that affect the initialization process, -such as @code{package-enable-at-startup} and @code{package-load-list}. -@xref{Package Installation}. +you can customize variables that affect the package initialization +process, such as @code{package-enable-at-startup}, +@code{package-load-list}, and @code{package-user-dir}. Note that +variables like @code{package-archives} which only affect the +installation of new packages, and not the process of making +already-installed packages available, may be customized in the regular +init file. @xref{Package Installation}. For more information on the early init file, @pxref{Init File,,, elisp, The Emacs Lisp Reference Manual}. diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 999e0d0752..1edc06d024 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -161,29 +161,34 @@ ;;; Customization options ;;;###autoload (defcustom package-enable-at-startup t - "Whether to activate installed packages when Emacs starts. -If non-nil, packages are activated after reading the init file -and before `after-init-hook'. Activation is not done if -`user-init-file' is nil (e.g. Emacs was started with \"-q\"). + "Whether to make installed packages available when Emacs starts. +If non-nil, packages are made available before reading the init +file (but after reading the early init file). This means that if +you wish to set this variable, you must do so in the early init +file. Regardless of the value of this variable, packages are not +made available if `user-init-file' is nil (e.g. Emacs was started +with \"-q\"). Even if the value is nil, you can type \\[package-initialize] to -activate the package system at any time." +make installed packages available at any time, or you can +call (package-initialize) in your init-file." :type 'boolean :version "24.1") (defcustom package-load-list '(all) - "List of packages for `package-initialize' to load. + "List of packages for `package-initialize' to make available. Each element in this list should be a list (NAME VERSION), or the -symbol `all'. The symbol `all' says to load the latest installed -versions of all packages not specified by other elements. +symbol `all'. The symbol `all' says to make available the latest +installed versions of all packages not specified by other +elements. For an element (NAME VERSION), NAME is a package name (a symbol). VERSION should be t, a string, or nil. -If VERSION is t, the most recent version is activated. -If VERSION is a string, only that version is ever loaded. +If VERSION is t, the most recent version is made available. +If VERSION is a string, only that version is ever made available. Any other version, even if newer, is silently ignored. Hence, the package is \"held\" at that version. -If VERSION is nil, the package is not loaded (it is \"disabled\")." +If VERSION is nil, the package is not made available (it is \"disabled\")." :type '(repeat (choice (const all) (list :tag "Specific package" (symbol :tag "Package name") @@ -1439,10 +1444,21 @@ If optional arg NO-ACTIVATE is non-nil, don't activate packages. If called as part of loading `user-init-file', set `package-enable-at-startup' to nil, to prevent accidentally loading packages twice. + It is not necessary to adjust `load-path' or `require' the individual packages after calling `package-initialize' -- this is -taken care of by `package-initialize'." +taken care of by `package-initialize'. + +If `package-initialize' is called twice during Emacs startup, +signal a warning, since this is a bad idea except in highly +advanced use cases. To suppress the warning, remove the +superfluous call to `package-initialize' from your init-file. If +you have code which must run before `package-initialize', put +that code in the early init-file." (interactive) + (when (and package--initialized (not after-init-time)) + (lwarn '(package reinitialization) :warning + "Unnecessary call to `package-initialize' in init file")) (setq package-alist nil) (setq package-enable-at-startup nil) (package-load-all-descriptors) diff --git a/lisp/startup.el b/lisp/startup.el index 4105c1db2d..2669342eda 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -1115,6 +1115,15 @@ please check its value") (and command-line-args (setcdr command-line-args args))) + ;; Re-evaluate predefined variables whose initial value depends on + ;; the runtime context. + (let (current-load-list) ; c-r-s may call defvar, and hence LOADHIST_ATTACH + (mapc 'custom-reevaluate-setting + ;; Initialize them in the same order they were loaded, in case there + ;; are dependencies between them. + (prog1 (nreverse custom-delayed-init-variables) + (setq custom-delayed-init-variables nil)))) + ;; Warn for invalid user name. (when init-file-user (if (string-match "[~/:\n]" init-file-user) @@ -1245,15 +1254,6 @@ please check its value") (startup--setup-quote-display) (setq internal--text-quoting-flag t)) - ;; Re-evaluate predefined variables whose initial value depends on - ;; the runtime context. - (let (current-load-list) ; c-r-s may call defvar, and hence LOADHIST_ATTACH - (mapc 'custom-reevaluate-setting - ;; Initialize them in the same order they were loaded, in case there - ;; are dependencies between them. - (prog1 (nreverse custom-delayed-init-variables) - (setq custom-delayed-init-variables nil)))) - (normal-erase-is-backspace-setup-frame) ;; Register default TTY colors for the case the terminal hasn't a commit 7f27d42f0b64c74625e45909a0bf389d68eddc62 Author: Basil L. Contovounesios Date: Fri Feb 16 17:11:49 2018 +0000 Pass json-readtable-error data as a list (bug#30489) * lisp/json.el (json-readtable-dispatch): Fix error data. * test/lisp/json-tests.el (test-json-read): Check error data is a list. diff --git a/lisp/json.el b/lisp/json.el index b03a482ca6..d374f452e6 100644 --- a/lisp/json.el +++ b/lisp/json.el @@ -685,7 +685,7 @@ become JSON objects." (push (list c 'json-read-number) table)) (pcase-dolist (`(,c . ,rest) table) (push `((eq ,char ,c) (,@rest)) res)) - `(cond ,@res (t (signal 'json-readtable-error ,char))))) + `(cond ,@res (t (signal 'json-readtable-error (list ,char)))))) (defun json-read () "Parse and return the JSON object following point. diff --git a/test/lisp/json-tests.el b/test/lisp/json-tests.el index 47f8047b34..ea562e8b13 100644 --- a/test/lisp/json-tests.el +++ b/test/lisp/json-tests.el @@ -309,7 +309,8 @@ Point is moved to beginning of the buffer." (json-tests--with-temp-buffer "" (should-error (json-read) :type 'json-end-of-file)) (json-tests--with-temp-buffer "xxx" - (should-error (json-read) :type 'json-readtable-error))) + (let ((err (should-error (json-read) :type 'json-readtable-error))) + (should (equal (cdr err) '(?x)))))) (ert-deftest test-json-read-from-string () (let ((json-string "{ \"a\": 1 }")) commit 667cdf421ff64b1fe736f75e8a7f8864de1b5026 Author: Glenn Morris Date: Sun Mar 18 15:27:57 2018 -0700 * lisp/url/url-handlers.el: No need for subr-x at run-time. diff --git a/lisp/url/url-handlers.el b/lisp/url/url-handlers.el index fc5f43bccb..98f9f1e373 100644 --- a/lisp/url/url-handlers.el +++ b/lisp/url/url-handlers.el @@ -28,7 +28,7 @@ ;; (require 'url-util) (eval-when-compile (require 'mm-decode)) ;; (require 'mailcap) -(require 'subr-x) +(eval-when-compile (require 'subr-x)) ;; The following are autoloaded instead of `require'd to avoid eagerly ;; loading all of URL when turning on url-handler-mode in the .emacs. (autoload 'url-expand-file-name "url-expand" "Convert url to a fully specified url, and canonicalize it.") commit 3a3aa0e056a3f4e8023bc8e8142ffbc73daac4ea Author: Karl Fogel Date: Sun Mar 18 16:43:18 2018 -0500 Move interactive `transpose-regions' to Lisp Define `transpose-regions' in Lisp, because its complex interactive spec was ungainly in C, and change the C version to non-interactive `transpose-regions-internal'. The Lisp function is just a wrapper around the C function, which still does all the work. * lisp/simple.el (transpose-regions): New wrapper function, with interactive spec taken from old C `transpose-regions'. * src/editfns.c (Ftranspose_regions): Rename to... (Ftranspose_regions_internal): ...here, and remove interactive spec. Discussion on Emacs Devel: From: Karl Fogel To: Emacs Development Cc: Richard Copley, Charles A. Roelli Subject: Re: [Emacs-diffs] master b88e7c8: \ Make transpose-regions interactive (Bug#30343) Date: Fri, 16 Mar 2018 10:23:31 -0500 Message-ID: <87po44jb7w.fsf@red-bean.com> https://lists.gnu.org/archive/html/emacs-devel/2018-03/msg00555.html diff --git a/lisp/simple.el b/lisp/simple.el index fa93cf87c7..543fa08233 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -7014,6 +7014,34 @@ With argument 0, interchanges line point is in with line mark is in." (forward-line arg)))) arg)) +(defun transpose-regions (startr1 endr1 startr2 endr2 &optional leave-markers) + "Transpose region STARTR1 to ENDR1 with STARTR2 to ENDR2. +The regions should not be overlapping, because the size of the buffer is +never changed in a transposition. + +Optional fifth arg LEAVE-MARKERS, if non-nil, means don't update +any markers that happen to be located in the regions. + +Transposing beyond buffer boundaries is an error. + +Interactively, STARTR1 and ENDR1 are point and mark; STARTR2 and ENDR2 +are the last two marks pushed to the mark ring; LEAVE-MARKERS is nil. +If a prefix argument N is given, STARTR2 and ENDR2 are the two +successive marks N entries back in the mark ring. A negative prefix +argument instead counts forward from the oldest mark in the mark +ring." + (interactive + (if (< (length mark-ring) 2) + (error "Other region must be marked before transposing two regions") + (let* ((num (if current-prefix-arg + (prefix-numeric-value current-prefix-arg) + 0)) + (ring-length (length mark-ring)) + (eltnum (mod num ring-length)) + (eltnum2 (mod (1+ num) ring-length))) + (list (point) (mark) (elt mark-ring eltnum) (elt mark-ring eltnum2))))) + (transpose-regions-internal startr1 endr1 startr2 endr2 leave-markers)) + ;; FIXME seems to leave point BEFORE the current object when ARG = 0, ;; which seems inconsistent with the ARG /= 0 case. ;; FIXME document SPECIAL. diff --git a/src/editfns.c b/src/editfns.c index d26319441b..e24867298e 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -5112,16 +5112,7 @@ transpose_markers (ptrdiff_t start1, ptrdiff_t end1, } } -DEFUN ("transpose-regions", Ftranspose_regions, Stranspose_regions, 4, 5, - "(if (< (length mark-ring) 2)\ - (error \"Other region must be marked before transposing two regions\")\ - (let* ((num (if current-prefix-arg\ - (prefix-numeric-value current-prefix-arg)\ - 0))\ - (ring-length (length mark-ring))\ - (eltnum (mod num ring-length))\ - (eltnum2 (mod (1+ num) ring-length)))\ - (list (point) (mark) (elt mark-ring eltnum) (elt mark-ring eltnum2))))", +DEFUN ("transpose-regions-internal", Ftranspose_regions_internal, Stranspose_regions_internal, 4, 5, 0, doc: /* Transpose region STARTR1 to ENDR1 with STARTR2 to ENDR2. The regions should not be overlapping, because the size of the buffer is never changed in a transposition. @@ -5129,14 +5120,7 @@ never changed in a transposition. Optional fifth arg LEAVE-MARKERS, if non-nil, means don't update any markers that happen to be located in the regions. -Transposing beyond buffer boundaries is an error. - -Interactively, STARTR1 and ENDR1 are point and mark; STARTR2 and ENDR2 -are the last two marks pushed to the mark ring; LEAVE-MARKERS is nil. -If a prefix argument N is given, STARTR2 and ENDR2 are the two -successive marks N entries back in the mark ring. A negative prefix -argument instead counts forward from the oldest mark in the mark -ring. */) +Transposing beyond buffer boundaries is an error. */) (Lisp_Object startr1, Lisp_Object endr1, Lisp_Object startr2, Lisp_Object endr2, Lisp_Object leave_markers) { register ptrdiff_t start1, end1, start2, end2; @@ -5581,5 +5565,5 @@ functions if all the text being accessed has this property. */); defsubr (&Swiden); defsubr (&Snarrow_to_region); defsubr (&Ssave_restriction); - defsubr (&Stranspose_regions); + defsubr (&Stranspose_regions_internal); } commit 9667ba25b4af54179c28a719163c4b74f02d0ff8 Author: Nicolas Petton Date: Sun Mar 18 22:21:30 2018 +0100 Fix compilation warnings in subr-x-tests.el * test/lisp/emacs-lisp/subr-x-tests.el (subr-x-test-if-let*-false) (subr-x-test-when-let*-false): Make tests simpler and compiler warning free. diff --git a/test/lisp/emacs-lisp/subr-x-tests.el b/test/lisp/emacs-lisp/subr-x-tests.el index c9618f3c37..f7f0ef384f 100644 --- a/test/lisp/emacs-lisp/subr-x-tests.el +++ b/test/lisp/emacs-lisp/subr-x-tests.el @@ -148,34 +148,34 @@ "Test `if-let' with falsie bindings." (should (equal (if-let* ((a nil)) - (list a b c) + "yes" "no") "no")) (should (equal (if-let* ((a nil) (b 2) (c 3)) - (list a b c) + "yes" "no") "no")) (should (equal (if-let* ((a 1) (b nil) (c 3)) - (list a b c) + "yes" "no") "no")) (should (equal (if-let* ((a 1) (b 2) (c nil)) - (list a b c) + "yes" "no") "no")) (should (equal (let (z) (if-let* (z (a 1) (b 2) (c 3)) - (list a b c) + "yes" "no")) "no")) (should (equal (let (d) (if-let* ((a 1) (b 2) (c 3) d) - (list a b c) + "yes" "no")) "no"))) @@ -312,34 +312,28 @@ "Test `when-let' with falsie bindings." (should (equal (when-let* ((a nil)) - (list a b c) "no") nil)) (should (equal (when-let* ((a nil) (b 2) (c 3)) - (list a b c) "no") nil)) (should (equal (when-let* ((a 1) (b nil) (c 3)) - (list a b c) "no") nil)) (should (equal (when-let* ((a 1) (b 2) (c nil)) - (list a b c) "no") nil)) (should (equal (let (z) (when-let* (z (a 1) (b 2) (c 3)) - (list a b c) "no")) nil)) (should (equal (let (d) (when-let* ((a 1) (b 2) (c 3) d) - (list a b c) "no")) nil))) commit 8d81a4728df74f7f3f88b9efde7855965766dde8 Author: Nicolas Petton Date: Sun Mar 18 20:44:57 2018 +0100 * lisp/url/url-handlers.el: Require subr-x. diff --git a/lisp/url/url-handlers.el b/lisp/url/url-handlers.el index 17c76cff75..fc5f43bccb 100644 --- a/lisp/url/url-handlers.el +++ b/lisp/url/url-handlers.el @@ -28,6 +28,7 @@ ;; (require 'url-util) (eval-when-compile (require 'mm-decode)) ;; (require 'mailcap) +(require 'subr-x) ;; The following are autoloaded instead of `require'd to avoid eagerly ;; loading all of URL when turning on url-handler-mode in the .emacs. (autoload 'url-expand-file-name "url-expand" "Convert url to a fully specified url, and canonicalize it.") commit 6d2b50a2451a9d7aae040cb82040c2211df75c85 Author: Nicolas Petton Date: Tue Mar 13 22:07:08 2018 +0100 Add URL handler for file-name-directory (Bug#30444) * lisp/url/url-handlers.el (url-handler-file-name-directory): New function which handles special cases for `file-name-directory' and URLs. * test/lisp/url/url-handlers-test.el: New file. Add tests for `url-handler-file-name-directory'. diff --git a/lisp/url/url-handlers.el b/lisp/url/url-handlers.el index 7d0320cb5b..17c76cff75 100644 --- a/lisp/url/url-handlers.el +++ b/lisp/url/url-handlers.el @@ -186,6 +186,7 @@ the arguments that would have been passed to OPERATION." (put 'file-name-absolute-p 'url-file-handlers (lambda (&rest ignored) t)) (put 'expand-file-name 'url-file-handlers 'url-handler-expand-file-name) (put 'directory-file-name 'url-file-handlers 'url-handler-directory-file-name) +(put 'file-name-directory 'url-file-handlers 'url-handler-file-name-directory) (put 'unhandled-file-name-directory 'url-file-handlers 'url-handler-unhandled-file-name-directory) (put 'file-remote-p 'url-file-handlers 'url-handler-file-remote-p) ;; (put 'file-name-as-directory 'url-file-handlers 'url-handler-file-name-as-directory) @@ -231,6 +232,14 @@ the arguments that would have been passed to OPERATION." ;; a local process. nil))) +(defun url-handler-file-name-directory (dir) + (let ((url (url-generic-parse-url dir))) + ;; Do not attempt to handle `file' URLs which are local. + (if (and (not (equal (url-type url) "file")) + (string-empty-p (url-filename url))) + (url-handler-file-name-directory (concat dir "/")) + (url-run-real-handler 'file-name-directory (list dir))))) + (defun url-handler-file-remote-p (filename &optional identification _connected) (let ((url (url-generic-parse-url filename))) (if (and (url-type url) (not (equal (url-type url) "file"))) diff --git a/test/lisp/url/url-handlers-test.el b/test/lisp/url/url-handlers-test.el new file mode 100644 index 0000000000..5822e16a88 --- /dev/null +++ b/test/lisp/url/url-handlers-test.el @@ -0,0 +1,75 @@ +;;; url-handlers-test.el --- Test suite for url-handlers.el -*- lexical-binding: t; -*- + +;; Copyright (C) 2018 Free Software Foundation, Inc. + +;; Author: Nicolas Petton + +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; Commentary: + +;;; Code: + +(require 'ert) +(require 'url-handlers) + +(defmacro with-url-handler-mode (&rest body) + "Evaluate BODY with `url-handler-mode' turned on." + (declare (indent 0) (debug t)) + (let ((url-handler-mode-active (make-symbol "url-handler-mode-active"))) + `(let ((,url-handler-mode-active url-handler-mode)) + (unwind-protect + (progn + (unless ,url-handler-mode-active + (url-handler-mode)) + ,@body) + (unless ,url-handler-mode-active + (url-handler-mode -1)))))) + +(ert-deftest url-handlers-file-name-directory/preserve-url-types () + (with-url-handler-mode + (should (equal (file-name-directory "https://gnu.org/index.html") + "https://gnu.org/")) + (should (equal (file-name-directory "http://gnu.org/index.html") + "http://gnu.org/")) + (should (equal (file-name-directory "ftp://gnu.org/index.html") + "ftp://gnu.org/")))) + +(ert-deftest url-handlers-file-name-directory/should-not-handle-non-url-file-names () + (with-url-handler-mode + (should-not (equal (file-name-directory "not-uri://gnu.org") + "not-uri://gnu.org/")))) + +(ert-deftest url-handlers-file-name-directory/sub-directories () + (with-url-handler-mode + (should (equal (file-name-directory "https://foo/bar/baz/index.html") + "https://foo/bar/baz/")))) + +(ert-deftest url-handlers-file-name-directory/file-urls () + (with-url-handler-mode + (should (equal (file-name-directory "file:///foo/bar/baz.txt") + "file:///foo/bar/")) + (should (equal (file-name-directory "file:///") + "file:///")))) + +;; Regression test for bug#30444 +(ert-deftest url-handlers-file-name-directory/no-filename () + (with-url-handler-mode + (should (equal (file-name-directory "https://foo.org") + "https://foo.org/")) + (should (equal (file-name-directory "https://foo.org/") + "https://foo.org/")))) + +(provide 'url-handlers-test) +;;; url-handlers-test.el ends here commit 9942734c75c7b78efba41204432533cd3fe3b419 Author: Michael Albinus Date: Sun Mar 18 10:01:37 2018 +0100 * lisp/emacs-lisp/ert.el (ert-run-tests-batch): Print selector. diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el index e4e166ac67..09cf28e38b 100644 --- a/lisp/emacs-lisp/ert.el +++ b/lisp/emacs-lisp/ert.el @@ -1360,9 +1360,10 @@ Returns the stats object." (run-started (unless ert-quiet (cl-destructuring-bind (stats) event-args - (message "Running %s tests (%s)" + (message "Running %s tests (%s, selector `%S')" (length (ert--stats-tests stats)) - (ert--format-time-iso8601 (ert--stats-start-time stats)))))) + (ert--format-time-iso8601 (ert--stats-start-time stats)) + selector)))) (run-ended (cl-destructuring-bind (stats abortedp) event-args (let ((unexpected (ert-stats-completed-unexpected stats)) commit bcc146a66867f1106f405f7f0dc1f1e02810a992 Author: Michael Albinus Date: Sat Mar 17 15:10:46 2018 +0100 Optimize tramp-tests.el * test/lisp/net/tramp-tests.el (tramp--test-expensive-test): Make it a defsubst. Adapt all callees. (tramp--test-print-duration): New defmacro. (tramp-test11-copy-file, tramp-test12-rename-file) (tramp-test21-file-links, tramp--test-special-characters): Run some parts only if expensive tests are enabled. (Bug#30807) diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index 3fd8f69443..e8d3503977 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el @@ -102,11 +102,6 @@ (when (getenv "EMACS_HYDRA_CI") (add-to-list 'tramp-remote-path 'tramp-own-remote-path)) -(defvar tramp--test-expensive-test - (null - (string-equal (getenv "SELECTOR") "(quote (not (tag :expensive-test)))")) - "Whether expensive tests are run.") - (defvar tramp--test-enabled-checked nil "Cached result of `tramp--test-enabled'. If the function did run, the value is a cons cell, the `cdr' @@ -134,6 +129,12 @@ being the result.") ;; Return result. (cdr tramp--test-enabled-checked)) +(defsubst tramp--test-expensive-test () + "Whether expensive tests are run." + (ert-select-tests + (ert--stats-selector ert--current-run-stats) + (list (make-ert-test :body nil :tags '(:expensive-test))))) + (defun tramp--test-make-temp-name (&optional local quoted) "Return a temporary file name for test. If LOCAL is non-nil, a local file name is returned. @@ -186,6 +187,16 @@ handled properly. BODY shall not contain a timeout." (tramp-backtrace (tramp-dissect-file-name tramp-test-temporary-file-directory)))) +(defmacro tramp--test-print-duration (message &rest body) + "Run BODY and print a message with duration, prompted by MESSAGE." + (declare (indent 1) (debug (stringp body))) + `(let ((start (current-time))) + (unwind-protect + (progn ,@body) + (tramp--test-message + "%s %f sec" + ,message (float-time (time-subtract (current-time) start)))))) + (ert-deftest tramp-test00-availability () "Test availability of Tramp functions." :expected-result (if (tramp--test-enabled) :passed :failed) @@ -1744,8 +1755,8 @@ handled properly. BODY shall not contain a timeout." (substitute-in-file-name "/method:host:/~foo") "/method:host:/~foo")) (should (string-equal (substitute-in-file-name "/method:host:/path//~foo") "/~foo")) - ;; (substitute-in-file-name "/path/~foo") expands only to "/~foo"", - ;; if $LOGNAME or $USER is "foo". Otherwise, it doesn't expand. + ;; (substitute-in-file-name "/path/~foo") expands only for a local + ;; user "foo" to "/~foo"". Otherwise, it doesn't expand. (should (string-equal (substitute-in-file-name @@ -1906,7 +1917,7 @@ This checks also `file-name-as-directory', `file-name-directory', "Check `file-exist-p', `write-region' and `delete-file'." (skip-unless (tramp--test-enabled)) - (dolist (quoted (if tramp--test-expensive-test '(nil t) '(nil))) + (dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil))) (let ((tmp-name (tramp--test-make-temp-name nil quoted))) (should-not (file-exists-p tmp-name)) (write-region "foo" nil tmp-name) @@ -1918,7 +1929,7 @@ This checks also `file-name-as-directory', `file-name-directory', "Check `file-local-copy'." (skip-unless (tramp--test-enabled)) - (dolist (quoted (if tramp--test-expensive-test '(nil t) '(nil))) + (dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil))) (let ((tmp-name1 (tramp--test-make-temp-name nil quoted)) tmp-name2) (unwind-protect @@ -1950,7 +1961,7 @@ This checks also `file-name-as-directory', `file-name-directory', "Check `insert-file-contents'." (skip-unless (tramp--test-enabled)) - (dolist (quoted (if tramp--test-expensive-test '(nil t) '(nil))) + (dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil))) (let ((tmp-name (tramp--test-make-temp-name nil quoted))) (unwind-protect (with-temp-buffer @@ -1978,7 +1989,7 @@ This checks also `file-name-as-directory', `file-name-directory', "Check `write-region'." (skip-unless (tramp--test-enabled)) - (dolist (quoted (if tramp--test-expensive-test '(nil t) '(nil))) + (dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil))) (let ((tmp-name (tramp--test-make-temp-name nil quoted))) (unwind-protect (progn @@ -2068,7 +2079,7 @@ This checks also `file-name-as-directory', `file-name-directory', (skip-unless (tramp--test-enabled)) ;; `filename-non-special' has been fixed in Emacs 27.1, see Bug#29579. - (dolist (quoted (if (and tramp--test-expensive-test (tramp--test-emacs27-p)) + (dolist (quoted (if (and (tramp--test-expensive-test) (tramp--test-emacs27-p)) '(nil t) '(nil))) (let ((tmp-name1 (tramp--test-make-temp-name nil quoted)) (tmp-name2 (tramp--test-make-temp-name nil quoted)) @@ -2093,9 +2104,10 @@ This checks also `file-name-as-directory', `file-name-directory', (with-temp-buffer (insert-file-contents target) (should (string-equal (buffer-string) "foo"))) - (should-error - (copy-file source target) - :type 'file-already-exists) + (when (tramp--test-expensive-test) + (should-error + (copy-file source target) + :type 'file-already-exists)) (copy-file source target 'ok)) ;; Cleanup. @@ -2112,7 +2124,7 @@ This checks also `file-name-as-directory', `file-name-directory', (make-directory target) (should (file-directory-p target)) ;; This has been changed in Emacs 26.1. - (when (tramp--test-emacs26-p) + (when (and (tramp--test-expensive-test) (tramp--test-emacs26-p)) (should-error (copy-file source target) :type 'file-already-exists)) @@ -2179,7 +2191,7 @@ This checks also `file-name-as-directory', `file-name-directory', (skip-unless (tramp--test-enabled)) ;; `filename-non-special' has been fixed in Emacs 27.1, see Bug#29579. - (dolist (quoted (if (and tramp--test-expensive-test (tramp--test-emacs27-p)) + (dolist (quoted (if (and (tramp--test-expensive-test) (tramp--test-emacs27-p)) '(nil t) '(nil))) (let ((tmp-name1 (tramp--test-make-temp-name nil quoted)) (tmp-name2 (tramp--test-make-temp-name nil quoted)) @@ -2207,9 +2219,10 @@ This checks also `file-name-as-directory', `file-name-directory', (should (string-equal (buffer-string) "foo"))) (write-region "foo" nil source) (should (file-exists-p source)) - (should-error - (rename-file source target) - :type 'file-already-exists) + (when (tramp--test-expensive-test) + (should-error + (rename-file source target) + :type 'file-already-exists)) (rename-file source target 'ok) (should-not (file-exists-p source))) @@ -2225,7 +2238,7 @@ This checks also `file-name-as-directory', `file-name-directory', (make-directory target) (should (file-directory-p target)) ;; This has been changed in Emacs 26.1. - (when (tramp--test-emacs26-p) + (when (and (tramp--test-expensive-test) (tramp--test-emacs26-p)) (should-error (rename-file source target) :type 'file-already-exists)) @@ -2292,7 +2305,7 @@ This checks also `file-name-as-directory', `file-name-directory', This tests also `file-directory-p' and `file-accessible-directory-p'." (skip-unless (tramp--test-enabled)) - (dolist (quoted (if tramp--test-expensive-test '(nil t) '(nil))) + (dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil))) (let* ((tmp-name1 (tramp--test-make-temp-name nil quoted)) (tmp-name2 (expand-file-name "foo/bar" tmp-name1))) (unwind-protect @@ -2315,7 +2328,7 @@ This tests also `file-directory-p' and `file-accessible-directory-p'." "Check `delete-directory'." (skip-unless (tramp--test-enabled)) - (dolist (quoted (if tramp--test-expensive-test '(nil t) '(nil))) + (dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil))) (let ((tmp-name (tramp--test-make-temp-name nil quoted))) ;; Delete empty directory. (make-directory tmp-name) @@ -2335,7 +2348,7 @@ This tests also `file-directory-p' and `file-accessible-directory-p'." "Check `copy-directory'." (skip-unless (tramp--test-enabled)) - (dolist (quoted (if tramp--test-expensive-test '(nil t) '(nil))) + (dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil))) (let* ((tmp-name1 (tramp--test-make-temp-name nil quoted)) (tmp-name2 (tramp--test-make-temp-name nil quoted)) (tmp-name3 (expand-file-name @@ -2401,7 +2414,7 @@ This tests also `file-directory-p' and `file-accessible-directory-p'." "Check `directory-files'." (skip-unless (tramp--test-enabled)) - (dolist (quoted (if tramp--test-expensive-test '(nil t) '(nil))) + (dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil))) (let* ((tmp-name1 (tramp--test-make-temp-name nil quoted)) (tmp-name2 (expand-file-name "bla" tmp-name1)) (tmp-name3 (expand-file-name "foo" tmp-name1))) @@ -2434,7 +2447,7 @@ This tests also `file-directory-p' and `file-accessible-directory-p'." "Check `file-expand-wildcards'." (skip-unless (tramp--test-enabled)) - (dolist (quoted (if tramp--test-expensive-test '(nil t) '(nil))) + (dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil))) (let* ((tmp-name1 (tramp--test-make-temp-name nil quoted)) (tmp-name2 (expand-file-name "foo" tmp-name1)) (tmp-name3 (expand-file-name "bar" tmp-name1)) @@ -2498,7 +2511,7 @@ This tests also `file-directory-p' and `file-accessible-directory-p'." "Check `insert-directory'." (skip-unless (tramp--test-enabled)) - (dolist (quoted (if tramp--test-expensive-test '(nil t) '(nil))) + (dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil))) (let* ((tmp-name1 (expand-file-name (tramp--test-make-temp-name nil quoted))) (tmp-name2 (expand-file-name "foo" tmp-name1)) @@ -2559,7 +2572,7 @@ This tests also `file-directory-p' and `file-accessible-directory-p'." ;; Since Emacs 26.1. (skip-unless (fboundp 'insert-directory-wildcard-in-dir-p)) - (dolist (quoted (if tramp--test-expensive-test '(nil t) '(nil))) + (dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil))) (let* ((tmp-name1 (expand-file-name (tramp--test-make-temp-name nil quoted))) (tmp-name2 @@ -2676,7 +2689,7 @@ This tests also `file-readable-p', `file-regular-p' and `file-ownership-preserved-p'." (skip-unless (tramp--test-enabled)) - (dolist (quoted (if tramp--test-expensive-test '(nil t) '(nil))) + (dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil))) ;; We must use `file-truename' for the temporary directory, ;; because it could be located on a symlinked directory. This ;; would let the test fail. @@ -2783,7 +2796,7 @@ This tests also `file-readable-p', `file-regular-p' and "Check `directory-files-and-attributes'." (skip-unless (tramp--test-enabled)) - (dolist (quoted (if tramp--test-expensive-test '(nil t) '(nil))) + (dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil))) ;; `directory-files-and-attributes' contains also values for ;; "../". Ensure that this doesn't change during tests, for ;; example due to handling temporary files. @@ -2829,7 +2842,7 @@ This tests also `file-executable-p', `file-writable-p' and `set-file-modes'." (skip-unless (tramp--test-enabled)) (skip-unless (tramp--test-sh-p)) - (dolist (quoted (if tramp--test-expensive-test '(nil t) '(nil))) + (dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil))) (let ((tmp-name (tramp--test-make-temp-name nil quoted))) (unwind-protect (progn @@ -2857,7 +2870,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." ;; older Emacsen, therefore. (skip-unless (tramp--test-emacs26-p)) - (dolist (quoted (if tramp--test-expensive-test '(nil t) '(nil))) + (dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil))) ;; We must use `file-truename' for the temporary directory, ;; because it could be located on a symlinked directory. This ;; would let the test fail. @@ -2881,14 +2894,16 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." (if quoted 'tramp-compat-file-name-unquote 'identity) (file-remote-p tmp-name1 'localname)) (file-symlink-p tmp-name2))) - (should-error - (make-symbolic-link tmp-name1 tmp-name2) - :type 'file-already-exists) - ;; A number means interactive case. - (cl-letf (((symbol-function 'yes-or-no-p) 'ignore)) + (when (tramp--test-expensive-test) (should-error - (make-symbolic-link tmp-name1 tmp-name2 0) + (make-symbolic-link tmp-name1 tmp-name2) :type 'file-already-exists)) + (when (tramp--test-expensive-test) + ;; A number means interactive case. + (cl-letf (((symbol-function 'yes-or-no-p) 'ignore)) + (should-error + (make-symbolic-link tmp-name1 tmp-name2 0) + :type 'file-already-exists))) (cl-letf (((symbol-function 'yes-or-no-p) (lambda (_prompt) t))) (make-symbolic-link tmp-name1 tmp-name2 0) (should @@ -2923,9 +2938,10 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." (string-equal tmp-name1 (file-symlink-p tmp-name3)))) ;; Check directory as newname. (make-directory tmp-name4) - (should-error - (make-symbolic-link tmp-name1 tmp-name4) - :type 'file-already-exists) + (when (tramp--test-expensive-test) + (should-error + (make-symbolic-link tmp-name1 tmp-name4) + :type 'file-already-exists)) (make-symbolic-link tmp-name1 (file-name-as-directory tmp-name4)) (should (string-equal @@ -2947,7 +2963,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." ;; Check `add-name-to-file'. (unwind-protect - (progn + (when (tramp--test-expensive-test) (write-region "foo" nil tmp-name1) (should (file-exists-p tmp-name1)) (add-name-to-file tmp-name1 tmp-name2) @@ -3061,12 +3077,14 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." (string-equal (file-truename tmp-name2) (file-truename tmp-name3))) - (should-error - (with-temp-buffer (insert-file-contents tmp-name2)) - :type tramp-file-missing) - (should-error - (with-temp-buffer (insert-file-contents tmp-name3)) - :type tramp-file-missing) + (when (tramp--test-expensive-test) + (should-error + (with-temp-buffer (insert-file-contents tmp-name2)) + :type tramp-file-missing)) + (when (tramp--test-expensive-test) + (should-error + (with-temp-buffer (insert-file-contents tmp-name3)) + :type tramp-file-missing)) ;; `directory-files' does not show symlinks to ;; non-existing targets in the "smb" case. So we remove ;; the symlinks manually. @@ -3079,18 +3097,19 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." ;; Detect cyclic symbolic links. (unwind-protect - (tramp--test-ignore-make-symbolic-link-error - (make-symbolic-link tmp-name2 tmp-name1) - (should (file-symlink-p tmp-name1)) - (if (tramp-smb-file-name-p tramp-test-temporary-file-directory) - ;; The symlink command of `smbclient' detects the - ;; cycle already. - (should-error - (make-symbolic-link tmp-name1 tmp-name2) - :type 'file-error) - (make-symbolic-link tmp-name1 tmp-name2) - (should (file-symlink-p tmp-name2)) - (should-error (file-truename tmp-name1) :type 'file-error))) + (when (tramp--test-expensive-test) + (tramp--test-ignore-make-symbolic-link-error + (make-symbolic-link tmp-name2 tmp-name1) + (should (file-symlink-p tmp-name1)) + (if (tramp-smb-file-name-p tramp-test-temporary-file-directory) + ;; The symlink command of `smbclient' detects the + ;; cycle already. + (should-error + (make-symbolic-link tmp-name1 tmp-name2) + :type 'file-error) + (make-symbolic-link tmp-name1 tmp-name2) + (should (file-symlink-p tmp-name2)) + (should-error (file-truename tmp-name1) :type 'file-error)))) ;; Cleanup. (ignore-errors @@ -3110,7 +3129,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." (skip-unless (tramp--test-enabled)) (skip-unless (or (tramp--test-adb-p) (tramp--test-sh-p))) - (dolist (quoted (if tramp--test-expensive-test '(nil t) '(nil))) + (dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil))) (let ((tmp-name1 (tramp--test-make-temp-name nil quoted)) (tmp-name2 (tramp--test-make-temp-name nil quoted)) (tmp-name3 (tramp--test-make-temp-name nil quoted))) @@ -3144,7 +3163,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." "Check `set-visited-file-modtime' and `verify-visited-file-modtime'." (skip-unless (tramp--test-enabled)) - (dolist (quoted (if tramp--test-expensive-test '(nil t) '(nil))) + (dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil))) (let ((tmp-name (tramp--test-make-temp-name nil quoted))) (unwind-protect (progn @@ -3167,7 +3186,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." (skip-unless (file-acl tramp-test-temporary-file-directory)) ;; `filename-non-special' has been fixed in Emacs 27.1, see Bug#29579. - (dolist (quoted (if (and tramp--test-expensive-test (tramp--test-emacs27-p)) + (dolist (quoted (if (and (tramp--test-expensive-test) (tramp--test-emacs27-p)) '(nil t) '(nil))) (let ((tmp-name1 (tramp--test-make-temp-name nil quoted)) (tmp-name2 (tramp--test-make-temp-name nil quoted)) @@ -3245,7 +3264,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." '(nil nil nil nil)))) ;; `filename-non-special' has been fixed in Emacs 27.1, see Bug#29579. - (dolist (quoted (if (and tramp--test-expensive-test (tramp--test-emacs27-p)) + (dolist (quoted (if (and (tramp--test-expensive-test) (tramp--test-emacs27-p)) '(nil t) '(nil))) (let ((tmp-name1 (tramp--test-make-temp-name nil quoted)) (tmp-name2 (tramp--test-make-temp-name nil quoted)) @@ -3393,7 +3412,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." (unwind-protect (dolist (syntax - (if tramp--test-expensive-test + (if (tramp--test-expensive-test) (tramp-syntax-values) `(,orig-syntax))) (tramp-change-syntax syntax) (let ;; This is needed for the `simplified' syntax. @@ -3444,7 +3463,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." (tramp-change-syntax orig-syntax)))) (dolist (n-e '(nil t)) - (dolist (quoted (if tramp--test-expensive-test '(nil t) '(nil))) + (dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil))) (let ((non-essential n-e) (tmp-name (tramp--test-make-temp-name nil quoted))) @@ -3506,7 +3525,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." "Check `load'." (skip-unless (tramp--test-enabled)) - (dolist (quoted (if tramp--test-expensive-test '(nil t) '(nil))) + (dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil))) (let ((tmp-name (tramp--test-make-temp-name nil quoted))) (unwind-protect (progn @@ -3531,7 +3550,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." (skip-unless (tramp--test-enabled)) (skip-unless (or (tramp--test-adb-p) (tramp--test-sh-p))) - (dolist (quoted (if tramp--test-expensive-test '(nil t) '(nil))) + (dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil))) (let* ((tmp-name (tramp--test-make-temp-name nil quoted)) (fnnd (file-name-nondirectory tmp-name)) (default-directory tramp-test-temporary-file-directory) @@ -3577,7 +3596,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." (skip-unless (tramp--test-enabled)) (skip-unless (tramp--test-sh-p)) - (dolist (quoted (if tramp--test-expensive-test '(nil t) '(nil))) + (dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil))) (let ((default-directory tramp-test-temporary-file-directory) (tmp-name (tramp--test-make-temp-name nil quoted)) kill-buffer-query-functions proc) @@ -3669,7 +3688,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." (skip-unless (tramp--test-enabled)) (skip-unless (tramp--test-sh-p)) - (dolist (quoted (if tramp--test-expensive-test '(nil t) '(nil))) + (dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil))) (let ((tmp-name (tramp--test-make-temp-name nil quoted)) (default-directory tramp-test-temporary-file-directory) ;; Suppress nasty messages. @@ -3931,7 +3950,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." (skip-unless (tramp--test-enabled)) (skip-unless (tramp--test-sh-p)) - (dolist (quoted (if tramp--test-expensive-test '(nil t) '(nil))) + (dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil))) (let* ((default-directory tramp-test-temporary-file-directory) (tmp-name1 (tramp--test-make-temp-name nil quoted)) (tmp-name2 (expand-file-name "foo" tmp-name1)) @@ -3999,7 +4018,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." "Check `make-auto-save-file-name'." (skip-unless (tramp--test-enabled)) - (dolist (quoted (if tramp--test-expensive-test '(nil t) '(nil))) + (dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil))) (let ((tmp-name1 (tramp--test-make-temp-name nil quoted)) (tmp-name2 (tramp--test-make-temp-name nil quoted))) @@ -4090,7 +4109,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." "Check `find-backup-file-name'." (skip-unless (tramp--test-enabled)) - (dolist (quoted (if tramp--test-expensive-test '(nil t) '(nil))) + (dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil))) (let ((tmp-name1 (tramp--test-make-temp-name nil quoted)) (tmp-name2 (tramp--test-make-temp-name nil quoted)) ;; These settings are not used by Tramp, so we ignore them. @@ -4326,7 +4345,7 @@ This requires restrictions of file name syntax." (defun tramp--test-check-files (&rest files) "Run a simple but comprehensive test over every file in FILES." ;; `filename-non-special' has been fixed in Emacs 27.1, see Bug#29579. - (dolist (quoted (if (and tramp--test-expensive-test (tramp--test-emacs27-p)) + (dolist (quoted (if (and (tramp--test-expensive-test) (tramp--test-emacs27-p)) '(nil t) '(nil))) ;; We must use `file-truename' for the temporary directory, ;; because it could be located on a symlinked directory. This @@ -4459,7 +4478,7 @@ This requires restrictions of file name syntax." (should-not (file-exists-p file1)))) ;; Check, that environment variables are set correctly. - (when (and tramp--test-expensive-test (tramp--test-sh-p)) + (when (and (tramp--test-expensive-test) (tramp--test-sh-p)) (dolist (elt files) (let ((envvar (concat "VAR_" (upcase (md5 elt)))) (default-directory tramp-test-temporary-file-directory) @@ -4489,41 +4508,46 @@ This requires restrictions of file name syntax." ;; character on Windows or Cygwin, because the backslash is ;; interpreted as a path separator, preventing "\t" from being ;; expanded to . - (tramp--test-check-files - (if (or (tramp--test-gvfs-p) (tramp--test-windows-nt-or-smb-p)) - "foo bar baz" - (if (or (tramp--test-adb-p) - (tramp--test-docker-p) - (eq system-type 'cygwin)) - " foo bar baz " - " foo\tbar baz\t")) - "$foo$bar$$baz$" - "-foo-bar-baz-" - "%foo%bar%baz%" - "&foo&bar&baz&" - (unless (or (tramp--test-ftp-p) - (tramp--test-gvfs-p) - (tramp--test-windows-nt-or-smb-p)) - "?foo?bar?baz?") - (unless (or (tramp--test-ftp-p) - (tramp--test-gvfs-p) - (tramp--test-windows-nt-or-smb-p)) - "*foo*bar*baz*") - (if (or (tramp--test-gvfs-p) (tramp--test-windows-nt-or-smb-p)) - "'foo'bar'baz'" - "'foo\"bar'baz\"") - "#foo~bar#baz~" - (if (or (tramp--test-gvfs-p) (tramp--test-windows-nt-or-smb-p)) - "!foo!bar!baz!" - "!foo|bar!baz|") - (if (or (tramp--test-gvfs-p) (tramp--test-windows-nt-or-smb-p)) - ";foo;bar;baz;" - ":foo;bar:baz;") - (unless (or (tramp--test-gvfs-p) (tramp--test-windows-nt-or-smb-p)) - "bar") - "(foo)bar(baz)" - (unless (or (tramp--test-ftp-p) (tramp--test-gvfs-p)) "[foo]bar[baz]") - "{foo}bar{baz}")) + (let ((files + (list + (if (or (tramp--test-gvfs-p) (tramp--test-windows-nt-or-smb-p)) + "foo bar baz" + (if (or (tramp--test-adb-p) + (tramp--test-docker-p) + (eq system-type 'cygwin)) + " foo bar baz " + " foo\tbar baz\t")) + "$foo$bar$$baz$" + "-foo-bar-baz-" + "%foo%bar%baz%" + "&foo&bar&baz&" + (unless (or (tramp--test-ftp-p) + (tramp--test-gvfs-p) + (tramp--test-windows-nt-or-smb-p)) + "?foo?bar?baz?") + (unless (or (tramp--test-ftp-p) + (tramp--test-gvfs-p) + (tramp--test-windows-nt-or-smb-p)) + "*foo*bar*baz*") + (if (or (tramp--test-gvfs-p) (tramp--test-windows-nt-or-smb-p)) + "'foo'bar'baz'" + "'foo\"bar'baz\"") + "#foo~bar#baz~" + (if (or (tramp--test-gvfs-p) (tramp--test-windows-nt-or-smb-p)) + "!foo!bar!baz!" + "!foo|bar!baz|") + (if (or (tramp--test-gvfs-p) (tramp--test-windows-nt-or-smb-p)) + ";foo;bar;baz;" + ":foo;bar:baz;") + (unless (or (tramp--test-gvfs-p) (tramp--test-windows-nt-or-smb-p)) + "bar") + "(foo)bar(baz)" + (unless (or (tramp--test-ftp-p) (tramp--test-gvfs-p)) "[foo]bar[baz]") + "{foo}bar{baz}"))) + ;; Simplify test in order to speed up. + (apply 'tramp--test-check-files + (if (tramp--test-expensive-test) + files (list (mapconcat 'identity files "")))))) ;; These tests are inspired by Bug#17238. (ert-deftest tramp-test38-special-characters () @@ -4742,11 +4766,11 @@ process sentinels. They shall not disturb each other." ;; Number of asynchronous processes for test. Tests on ;; some machines handle less parallel processes. (number-proc - (or - (ignore-errors - (string-to-number (getenv "REMOTE_PARALLEL_PROCESSES"))) - (if (getenv "EMACS_HYDRA_CI") 5) - 10)) + (cond + ((ignore-errors + (string-to-number (getenv "REMOTE_PARALLEL_PROCESSES")))) + ((getenv "EMACS_HYDRA_CI") 5) + (t 10))) ;; On hydra, timings are bad. (timer-repeat (cond commit f7346a584ed46fdb0bfcbbdd3673fee022d2c1c3 Author: Aaron Jensen Date: Sat Mar 17 10:58:17 2018 +0100 In frameset save pixel values with frame-resize-pixelwise non-nil (Bug#30141) * lisp/frameset.el (frameset--record-relationships): Replace check for text width/height and replace with check for frame-resize-pixelwise. (Bug#30141) diff --git a/lisp/frameset.el b/lisp/frameset.el index 0e3363d7ae..0d7e8025ab 100644 --- a/lisp/frameset.el +++ b/lisp/frameset.el @@ -800,22 +800,17 @@ Internal use only." (cons nil (and mb-frame (frameset-frame-id mb-frame))))))))) - ;; Now store text-pixel width and height if it differs from the calculated - ;; width and height and the frame is not fullscreen. + ;; Now store text-pixel width and height if `frame-resize-pixelwise' + ;; is set. (Bug#30141) (dolist (frame frame-list) - (unless (frame-parameter frame 'fullscreen) - (unless (eq (* (frame-parameter frame 'width) - (frame-char-width frame)) - (frame-text-width frame)) - (set-frame-parameter - frame 'frameset--text-pixel-width - (frame-text-width frame))) - (unless (eq (* (frame-parameter frame 'height) - (frame-char-height frame)) - (frame-text-height frame)) - (set-frame-parameter - frame 'frameset--text-pixel-height - (frame-text-height frame)))))) + (when (and frame-resize-pixelwise + (not (frame-parameter frame 'fullscreen))) + (set-frame-parameter + frame 'frameset--text-pixel-width + (frame-text-width frame)) + (set-frame-parameter + frame 'frameset--text-pixel-height + (frame-text-height frame))))) ;;;###autoload (cl-defun frameset-save (frame-list commit bcec2a8a392da74df9136a13cf7acaa6b95358f7 Author: Michael Albinus Date: Sat Mar 17 10:25:22 2018 +0100 Print test timings unconditionally * lisp/emacs-lisp/ert.el (ert-batch-print-duration): Remove. (ert-run-tests-batch): Adapt accordingly. * test/Makefile.in: * test/README: Remove TEST_PRINT_TEST_DURATION. diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el index a15450734e..e4e166ac67 100644 --- a/lisp/emacs-lisp/ert.el +++ b/lisp/emacs-lisp/ert.el @@ -1342,9 +1342,6 @@ RESULT must be an `ert-test-result-with-condition'." (defvar ert-quiet nil "Non-nil makes ERT only print important information in batch mode.") -(defvar ert-batch-print-duration nil - "Non-nil makes ERT print duration time of single tests in batch mode.") - ;;;###autoload (defun ert-run-tests-batch (&optional selector) "Run the tests specified by SELECTOR, printing results to the terminal. @@ -1371,7 +1368,7 @@ Returns the stats object." (let ((unexpected (ert-stats-completed-unexpected stats)) (skipped (ert-stats-skipped stats)) (expected-failures (ert--stats-failed-expected stats))) - (message "\n%sRan %s tests, %s results as expected%s%s (%s)%s\n" + (message "\n%sRan %s tests, %s results as expected%s%s (%s, %f sec)%s\n" (if (not abortedp) "" "Aborted: ") @@ -1383,15 +1380,11 @@ Returns the stats object." (if (zerop skipped) "" (format ", %s skipped" skipped)) - (if ert-batch-print-duration - (format - "%s, %f sec" - (ert--format-time-iso8601 (ert--stats-end-time stats)) - (float-time - (time-subtract - (ert--stats-end-time stats) - (ert--stats-start-time stats)))) - (ert--format-time-iso8601 (ert--stats-end-time stats))) + (ert--format-time-iso8601 (ert--stats-end-time stats)) + (float-time + (time-subtract + (ert--stats-end-time stats) + (ert--stats-start-time stats))) (if (zerop expected-failures) "" (format "\n%s expected failures" expected-failures))) @@ -1463,17 +1456,14 @@ Returns the stats object." (let* ((max (prin1-to-string (length (ert--stats-tests stats)))) (format-string (concat "%9s %" (prin1-to-string (length max)) - "s/" max " %S" - (if ert-batch-print-duration - " (%f sec)")))) + "s/" max " %S (%f sec)"))) (message format-string (ert-string-for-test-result result (ert-test-result-expected-p test result)) (1+ (ert--stats-test-pos stats test)) (ert-test-name test) - (if ert-batch-print-duration - (ert-test-result-duration result))))))))) + (ert-test-result-duration result)))))))) nil)) ;;;###autoload diff --git a/test/Makefile.in b/test/Makefile.in index 426d22d063..20e90c6ce5 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -111,11 +111,6 @@ ifneq (${TEST_BACKTRACE_LINE_LENGTH},) ert_opts += --eval '(setq ert-batch-backtrace-right-margin ${TEST_BACKTRACE_LINE_LENGTH})' endif -# Whether the tests shall also report their duration. -ifdef TEST_PRINT_TEST_DURATION -ert_opts += --eval '(setq ert-batch-print-duration t)' -endif - ifeq (@HAVE_MODULES@, yes) MODULES_EMACSOPT := --module-assertions else diff --git a/test/README b/test/README index 37156c632c..36307e3b6c 100644 --- a/test/README +++ b/test/README @@ -65,11 +65,6 @@ compiled version of a test use make TEST_LOAD_EL=no ... -Sometimes, it is necessary to trace the duration time for single tests. -This is controlled by the environment variable TEST_PRINT_TEST_DURATION - - make TEST_PRINT_TEST_DURATION=1 ... - (Also, see etc/compilation.txt for compilation mode font lock tests.) commit 1c7db8aa30969d0bc0e6d35b9bd57c70314ed9d0 Author: Glenn Morris Date: Fri Mar 16 20:41:17 2018 -0400 Explicitly require cl-lib where needed Rather than relying on the byte-compiler happening to use it. * lisp/completion.el, lisp/ffap.el, lisp/loadhist.el: * lisp/userlock.el, lisp/emacs-lisp/debug.el, lisp/emacs-lisp/rx.el: * lisp/emacs-lisp/testcover.el, lisp/mail/rfc2231.el: * lisp/net/newst-treeview.el, lisp/net/puny.el: * lisp/net/tramp-archive.el, lisp/net/tramp-gvfs.el: * lisp/net/tramp-sh.el, lisp/net/tramp-smb.el, lisp/org/org-ctags.el: * lisp/org/org-macs.el, lisp/progmodes/grep.el: * lisp/progmodes/perl-mode.el, lisp/progmodes/ruby-mode.el: * lisp/textmodes/dns-mode.el, lisp/textmodes/mhtml-mode.el: * lisp/vc/pcvs-parse.el: Explicitly require cl-lib as needed. diff --git a/lisp/completion.el b/lisp/completion.el index a5c8158d1b..9666ca60b0 100644 --- a/lisp/completion.el +++ b/lisp/completion.el @@ -2226,6 +2226,7 @@ TYPE is the type of the wrapper to be added. Can be :before or :under." table)) (defun completion-lisp-mode-hook () + (require 'cl-lib) (setq completion-syntax-table completion-lisp-syntax-table) ;; Lisp Mode diffs (setq-local completion-separator-chars diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el index 4624da3026..f3a927f31c 100644 --- a/lisp/emacs-lisp/debug.el +++ b/lisp/emacs-lisp/debug.el @@ -27,6 +27,7 @@ ;;; Code: +(require 'cl-lib) (require 'button) (defgroup debugger nil diff --git a/lisp/emacs-lisp/rx.el b/lisp/emacs-lisp/rx.el index c4f6d4f70e..8059bf2a6e 100644 --- a/lisp/emacs-lisp/rx.el +++ b/lisp/emacs-lisp/rx.el @@ -106,6 +106,8 @@ ;;; Code: +(require 'cl-lib) + ;; FIXME: support macros. (defvar rx-constituents ;Not `const' because some modes extend it. diff --git a/lisp/emacs-lisp/testcover.el b/lisp/emacs-lisp/testcover.el index 613f69c4f6..e0d2797c0c 100644 --- a/lisp/emacs-lisp/testcover.el +++ b/lisp/emacs-lisp/testcover.el @@ -63,6 +63,7 @@ ;; error if these "potentially" 1-valued forms actually return differing ;; values. +(eval-when-compile (require 'cl-lib)) (require 'edebug) (provide 'testcover) diff --git a/lisp/ffap.el b/lisp/ffap.el index 22be2f8536..b51929d260 100644 --- a/lisp/ffap.el +++ b/lisp/ffap.el @@ -104,6 +104,7 @@ ;;; Code: +(eval-when-compile (require 'cl-lib)) (require 'url-parse) (require 'thingatpt) diff --git a/lisp/loadhist.el b/lisp/loadhist.el index b8d9e2de0d..566d51a319 100644 --- a/lisp/loadhist.el +++ b/lisp/loadhist.el @@ -29,6 +29,8 @@ ;;; Code: +(eval-when-compile (require 'cl-lib)) + (defun feature-symbols (feature) "Return the file and list of definitions associated with FEATURE. The value is actually the element of `load-history' diff --git a/lisp/mail/rfc2231.el b/lisp/mail/rfc2231.el index 4da3641893..103af55248 100644 --- a/lisp/mail/rfc2231.el +++ b/lisp/mail/rfc2231.el @@ -22,6 +22,7 @@ ;;; Code: +(eval-when-compile (require 'cl-lib)) (require 'ietf-drums) (require 'rfc2047) (autoload 'mm-encode-body "mm-bodies") diff --git a/lisp/net/newst-treeview.el b/lisp/net/newst-treeview.el index 7f3d5d75fd..b2997d71b1 100644 --- a/lisp/net/newst-treeview.el +++ b/lisp/net/newst-treeview.el @@ -36,6 +36,7 @@ ;; ====================================================================== ;;; Code: +(require 'cl-lib) (require 'newst-reader) (require 'widget) (require 'tree-widget) diff --git a/lisp/net/puny.el b/lisp/net/puny.el index 4bf1a372cb..efa11cf178 100644 --- a/lisp/net/puny.el +++ b/lisp/net/puny.el @@ -27,6 +27,7 @@ ;;; Code: +(eval-when-compile (require 'cl-lib)) (require 'seq) (defun puny-encode-domain (domain) diff --git a/lisp/net/tramp-archive.el b/lisp/net/tramp-archive.el index 0b5a351dea..0b8e8da976 100644 --- a/lisp/net/tramp-archive.el +++ b/lisp/net/tramp-archive.el @@ -107,6 +107,7 @@ ;;; Code: +(eval-when-compile (require 'cl-lib)) (require 'tramp-gvfs) (autoload 'dired-uncache "dired") diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el index eb3dddcd6c..d0385f3ba2 100644 --- a/lisp/net/tramp-gvfs.el +++ b/lisp/net/tramp-gvfs.el @@ -103,6 +103,7 @@ ;; option "--without-dbus". Declare used subroutines and variables. (declare-function dbus-get-unique-name "dbusbind.c") +(eval-when-compile (require 'cl-lib)) (require 'tramp) (require 'dbus) diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 0cdf42de68..4d7359a4c9 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -27,6 +27,7 @@ ;;; Code: +(eval-when-compile (require 'cl-lib)) (require 'tramp) ;; Pacify byte-compiler. diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el index eab0da54b6..69827870d3 100644 --- a/lisp/net/tramp-smb.el +++ b/lisp/net/tramp-smb.el @@ -27,6 +27,7 @@ ;;; Code: +(eval-when-compile (require 'cl-lib)) (require 'tramp) ;; Define SMB method ... diff --git a/lisp/org/org-ctags.el b/lisp/org/org-ctags.el index 72ea76fe75..792f3fe1a3 100644 --- a/lisp/org/org-ctags.el +++ b/lisp/org/org-ctags.el @@ -137,6 +137,7 @@ ;;; Code: +(eval-when-compile (require 'cl-lib)) (require 'org) (defgroup org-ctags nil diff --git a/lisp/org/org-macs.el b/lisp/org/org-macs.el index 79d09e3797..f56672680f 100644 --- a/lisp/org/org-macs.el +++ b/lisp/org/org-macs.el @@ -31,6 +31,8 @@ ;;; Code: +(require 'cl-lib) + (defmacro org-with-gensyms (symbols &rest body) (declare (debug (sexp body)) (indent 1)) `(let ,(mapcar (lambda (s) diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index 8c0e46f35a..ee8886a4e1 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el @@ -29,6 +29,7 @@ ;;; Code: +(eval-when-compile (require 'cl-lib)) (require 'compile) (defgroup grep nil diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el index e667a97015..b96aad7a6e 100644 --- a/lisp/progmodes/perl-mode.el +++ b/lisp/progmodes/perl-mode.el @@ -87,6 +87,8 @@ ;;; Code: +(eval-when-compile (require 'cl-lib)) + (defgroup perl nil "Major mode for editing Perl code." :link '(custom-group-link :tag "Font Lock Faces group" font-lock-faces) diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index 5abc29a664..1f5d8865a7 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el @@ -39,6 +39,8 @@ ;;; Code: +(eval-when-compile (require 'cl-lib)) + (defgroup ruby nil "Major mode for editing Ruby code." :prefix "ruby-" diff --git a/lisp/textmodes/dns-mode.el b/lisp/textmodes/dns-mode.el index 7223d525fa..87ae35d17b 100644 --- a/lisp/textmodes/dns-mode.el +++ b/lisp/textmodes/dns-mode.el @@ -45,6 +45,8 @@ ;;; Code: +(eval-when-compile (require 'cl-lib)) + (defgroup dns-mode nil "DNS master file mode configuration." :group 'data) diff --git a/lisp/textmodes/mhtml-mode.el b/lisp/textmodes/mhtml-mode.el index 28c248fb0c..552fcd38b0 100644 --- a/lisp/textmodes/mhtml-mode.el +++ b/lisp/textmodes/mhtml-mode.el @@ -22,6 +22,7 @@ ;;; Code: (eval-and-compile + (require 'cl-lib) (require 'flyspell) (require 'sgml-mode)) (require 'js) diff --git a/lisp/userlock.el b/lisp/userlock.el index 5ba971ba6c..73bb0d2aae 100644 --- a/lisp/userlock.el +++ b/lisp/userlock.el @@ -32,6 +32,8 @@ ;;; Code: +(eval-when-compile (require 'cl-lib)) + (define-error 'file-locked "File is locked" 'file-error) ;;;###autoload diff --git a/lisp/vc/pcvs-parse.el b/lisp/vc/pcvs-parse.el index 8db2fe5e83..dbd25d93a1 100644 --- a/lisp/vc/pcvs-parse.el +++ b/lisp/vc/pcvs-parse.el @@ -32,6 +32,7 @@ ;;; Code: +(eval-when-compile (require 'cl-lib)) (require 'pcvs-util) (require 'pcvs-info) commit 9c4ee531158960d3aae50e950b48ca8dce18c0d1 Author: Glenn Morris Date: Fri Mar 16 20:34:27 2018 -0400 cedet: remove obsolete name args to constructors * lisp/cedet/ede/proj-archive.el, lisp/cedet/ede/proj-aux.el: * lisp/cedet/ede/proj-elisp.el, lisp/cedet/ede/proj-info.el: * lisp/cedet/ede/proj-misc.el, lisp/cedet/ede/proj-obj.el: * lisp/cedet/ede/proj-shared.el, lisp/cedet/ede/simple.el: * lisp/cedet/ede/source.el, lisp/cedet/semantic/: * lisp/cedet/semantic/analyze.el, lisp/cedet/semantic/complete.el: * lisp/cedet/semantic/db-javascript.el: * lisp/cedet/semantic/db-ref.el, lisp/cedet/semantic/debug.el: * lisp/cedet/semantic/ede-grammar.el: * lisp/cedet/semantic/mru-bookmark.el, lisp/cedet/semantic/scope.el: * lisp/cedet/semantic/texi.el, lisp/cedet/semantic/bovine/: * lisp/cedet/semantic/bovine/c.el: * lisp/cedet/semantic/bovine/debug.el, lisp/cedet/srecode/: * lisp/cedet/srecode/extract.el, lisp/cedet/srecode/map.el: * lisp/cedet/srecode/srt-mode.el: Remove obsolete name args to constructors. diff --git a/lisp/cedet/ede/proj-archive.el b/lisp/cedet/ede/proj-archive.el index ad2355a851..553f918f9e 100644 --- a/lisp/cedet/ede/proj-archive.el +++ b/lisp/cedet/ede/proj-archive.el @@ -34,7 +34,6 @@ (defvar ede-archive-linker (ede-linker - "ede-archive-linker" :name "ar" :variables '(("AR" . "ar") ("AR_CMD" . "$(AR) cr")) diff --git a/lisp/cedet/ede/proj-aux.el b/lisp/cedet/ede/proj-aux.el index 091ea1741b..f75006d6c5 100644 --- a/lisp/cedet/ede/proj-aux.el +++ b/lisp/cedet/ede/proj-aux.el @@ -34,8 +34,7 @@ "This target consists of aux files such as READMEs and COPYING.") (defvar ede-aux-source - (ede-sourcecode "ede-aux-source-txt" - :name "Auxiliary Text" + (ede-sourcecode :name "Auxiliary Text" :sourcepattern "^[A-Z]+$\\|\\.txt$") "Miscellaneous fields definition.") diff --git a/lisp/cedet/ede/proj-elisp.el b/lisp/cedet/ede/proj-elisp.el index 2ef91e767b..d9b8989ec7 100644 --- a/lisp/cedet/ede/proj-elisp.el +++ b/lisp/cedet/ede/proj-elisp.el @@ -77,21 +77,18 @@ For Emacs Lisp, return addsuffix command on source files." (ede-proj-makefile-sourcevar this))) (defvar ede-source-emacs - (ede-sourcecode "ede-emacs-source" - :name "Emacs Lisp" + (ede-sourcecode :name "Emacs Lisp" :sourcepattern "\\.el$" :garbagepattern '("*.elc")) "Emacs Lisp source code definition.") (defvar ede-emacs-compiler (ede-compiler - "ede-emacs-compiler" :name "emacs" :variables '(("EMACS" . "emacs") ("EMACSFLAGS" . "-batch --no-site-file --eval '(setq debug-on-error t)'") ("require" . "$(foreach r,$(1),(require (quote $(r))))")) :rules (list (ede-makefile-rule - "elisp-inference-rule" :target "%.elc" :dependencies "%.el" :rules '("$(EMACS) $(EMACSFLAGS) $(addprefix -L ,$(LOADPATH)) \ @@ -103,7 +100,7 @@ For Emacs Lisp, return addsuffix command on source files." "Compile Emacs Lisp programs.") (defvar ede-xemacs-compiler - (clone ede-emacs-compiler "ede-xemacs-compiler" + (clone ede-emacs-compiler :name "xemacs" :variables '(("EMACS" . "xemacs"))) "Compile Emacs Lisp programs with XEmacs.") @@ -324,7 +321,6 @@ Lays claim to all .elc files that match .el files in this target." ;; Compilers (defvar ede-emacs-cedet-autogen-compiler (ede-compiler - "ede-emacs-autogen-compiler" :name "emacs" :variables '(("EMACS" . "emacs") ("EMACSFLAGS" . "-batch --no-site-file --eval '(setq debug-on-error t)'") @@ -333,7 +329,7 @@ Lays claim to all .elc files that match .el files in this target." '("$(EMACS) $(EMACSFLAGS) $(addprefix -L ,$(LOADPATH)) \ --eval '(setq generated-autoload-file \"$(abspath $(LOADDEFS))\")' \ -f batch-update-autoloads $(abspath $(LOADDIRS))") - :rules (list (ede-makefile-rule "clean-autoloads" :target "clean-autoloads" :phony t :rules '("rm -f $(LOADDEFS)"))) + :rules (list (ede-makefile-rule :target "clean-autoloads" :phony t :rules '("rm -f $(LOADDEFS)"))) :sourcetype '(ede-source-emacs) ) "Build an autoloads file.") diff --git a/lisp/cedet/ede/proj-info.el b/lisp/cedet/ede/proj-info.el index 849ef14352..992996a935 100644 --- a/lisp/cedet/ede/proj-info.el +++ b/lisp/cedet/ede/proj-info.el @@ -43,15 +43,13 @@ All other sources should be included independently.")) "Target for a single info file.") (defvar ede-makeinfo-source - (ede-sourcecode "ede-makeinfo-source" - :name "Texinfo" + (ede-sourcecode :name "Texinfo" :sourcepattern "\\.texi?$" :garbagepattern '("*.info*" "*.html")) "Texinfo source code definition.") (defvar ede-makeinfo-compiler (ede-compiler - "ede-makeinfo-compiler" :name "makeinfo" :variables '(("MAKEINFO" . "makeinfo")) :commands '("$(MAKEINFO) $<") @@ -62,7 +60,6 @@ All other sources should be included independently.")) (defvar ede-texi2html-compiler (ede-compiler - "ede-texi2html-compiler" :name "texi2html" :variables '(("TEXI2HTML" . "makeinfo -html")) :commands '("makeinfo -o $@ $<") diff --git a/lisp/cedet/ede/proj-misc.el b/lisp/cedet/ede/proj-misc.el index d85300c312..7bc02facca 100644 --- a/lisp/cedet/ede/proj-misc.el +++ b/lisp/cedet/ede/proj-misc.el @@ -49,14 +49,12 @@ A user-written makefile is used to build this target. All listed sources are included in the distribution.") (defvar ede-misc-source - (ede-sourcecode "ede-misc-source" - :name "Miscellaneous" + (ede-sourcecode :name "Miscellaneous" :sourcepattern ".*") "Miscellaneous field definition.") (defvar ede-misc-compile - (ede-compiler "ede-misc-compile" - :name "Sub Makefile" + (ede-compiler :name "Sub Makefile" :commands '( ) diff --git a/lisp/cedet/ede/proj-obj.el b/lisp/cedet/ede/proj-obj.el index a34d209375..b087c29cfe 100644 --- a/lisp/cedet/ede/proj-obj.el +++ b/lisp/cedet/ede/proj-obj.el @@ -83,8 +83,7 @@ file.") ;;; C/C++ Compilers and Linkers ;; (defvar ede-source-c - (ede-sourcecode "ede-source-c" - :name "C" + (ede-sourcecode :name "C" :sourcepattern "\\.c$" :auxsourcepattern "\\.h$" :garbagepattern '("*.o" "*.obj" ".deps/*.P" ".lo")) @@ -92,14 +91,12 @@ file.") (defvar ede-gcc-compiler (ede-object-compiler - "ede-c-compiler-gcc" :name "gcc" :dependencyvar '("C_DEPENDENCIES" . "-Wp,-MD,.deps/$(*F).P") :variables '(("CC" . "gcc") ("C_COMPILE" . "$(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)")) :rules (list (ede-makefile-rule - "c-inference-rule" :target "%.o" :dependencies "%.c" :rules '("@echo '$(C_COMPILE) -c $<'; \\" @@ -115,7 +112,6 @@ file.") (defvar ede-cc-linker (ede-linker - "ede-cc-linker" :name "cc" :sourcetype '(ede-source-c) :variables '(("C_LINK" . "$(CC) $(CFLAGS) $(LDFLAGS) -L.")) @@ -124,8 +120,7 @@ file.") "Linker for C sourcecode.") (defvar ede-source-c++ - (ede-sourcecode "ede-source-c++" - :name "C++" + (ede-sourcecode :name "C++" :sourcepattern "\\.\\(c\\(pp?\\|c\\|xx\\|++\\)\\|C\\(PP\\)?\\)$" :auxsourcepattern "\\.\\(hpp?\\|hh?\\|hxx\\|H\\)$" :garbagepattern '("*.o" "*.obj" ".deps/*.P" ".lo")) @@ -133,7 +128,6 @@ file.") (defvar ede-g++-compiler (ede-object-compiler - "ede-c-compiler-g++" :name "g++" :dependencyvar '("CXX_DEPENDENCIES" . "-Wp,-MD,.deps/$(*F).P") :variables '(("CXX" "g++") @@ -141,7 +135,6 @@ file.") "$(CXX) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)") ) :rules (list (ede-makefile-rule - "c++-inference-rule" :target "%.o" :dependencies "%.cpp" :rules '("@echo '$(CXX_COMPILE) -c $<'; \\" @@ -157,7 +150,6 @@ file.") (defvar ede-g++-linker (ede-linker - "ede-g++-linker" :name "g++" ;; Only use this linker when c++ exists. :sourcetype '(ede-source-c++) @@ -169,15 +161,13 @@ file.") ;;; LEX (defvar ede-source-lex - (ede-sourcecode "ede-source-lex" - :name "lex" + (ede-sourcecode :name "lex" :sourcepattern "\\.l\\(l\\|pp\\|++\\)") "Lex source code definition. No garbage pattern since it creates C or C++ code.") (defvar ede-lex-compiler (ede-object-compiler - "ede-lex-compiler" ;; Can we support regular makefiles too?? :autoconf '("AC_PROG_LEX") :sourcetype '(ede-source-lex)) @@ -185,15 +175,13 @@ No garbage pattern since it creates C or C++ code.") ;;; YACC (defvar ede-source-yacc - (ede-sourcecode "ede-source-yacc" - :name "yacc" + (ede-sourcecode :name "yacc" :sourcepattern "\\.y\\(y\\|pp\\|++\\)") "Yacc source code definition. No garbage pattern since it creates C or C++ code.") (defvar ede-yacc-compiler (ede-object-compiler - "ede-yacc-compiler" ;; Can we support regular makefiles too?? :autoconf '("AC_PROG_YACC") :sourcetype '(ede-source-yacc)) @@ -203,16 +191,14 @@ No garbage pattern since it creates C or C++ code.") ;; ;; Contributed by David Engster (defvar ede-source-f90 - (ede-sourcecode "ede-source-f90" - :name "Fortran 90/95" + (ede-sourcecode :name "Fortran 90/95" :sourcepattern "\\.[fF]9[05]$" :auxsourcepattern "\\.incf$" :garbagepattern '("*.o" "*.mod" ".deps/*.P")) "Fortran 90/95 source code definition.") (defvar ede-source-f77 - (ede-sourcecode "ede-source-f77" - :name "Fortran 77" + (ede-sourcecode :name "Fortran 77" :sourcepattern "\\.\\([fF]\\|for\\)$" :auxsourcepattern "\\.incf$" :garbagepattern '("*.o" ".deps/*.P")) @@ -220,14 +206,12 @@ No garbage pattern since it creates C or C++ code.") (defvar ede-gfortran-compiler (ede-object-compiler - "ede-f90-compiler-gfortran" :name "gfortran" :dependencyvar '("F90_DEPENDENCIES" . "-Wp,-MD,.deps/$(*F).P") :variables '(("F90" . "gfortran") ("F90_COMPILE" . "$(F90) $(DEFS) $(INCLUDES) $(F90FLAGS)")) :rules (list (ede-makefile-rule - "f90-inference-rule" :target "%.o" :dependencies "%.f90" :rules '("@echo '$(F90_COMPILE) -c $<'; \\" @@ -242,7 +226,6 @@ No garbage pattern since it creates C or C++ code.") (defvar ede-gfortran-module-compiler (clone ede-gfortran-compiler - "ede-f90-module-compiler-gfortran" :name "gfortranmod" :sourcetype '(ede-source-f90) :commands '("$(F90_COMPILE) -c $^") @@ -253,7 +236,6 @@ No garbage pattern since it creates C or C++ code.") (defvar ede-gfortran-linker (ede-linker - "ede-gfortran-linker" :name "gfortran" :sourcetype '(ede-source-f90 ede-source-f77) :variables '(("F90_LINK" . "$(F90) $(CFLAGS) $(LDFLAGS) -L.")) @@ -265,7 +247,6 @@ No garbage pattern since it creates C or C++ code.") ;; (defvar ede-ld-linker (ede-linker - "ede-ld-linker" :name "ld" :variables '(("LD" . "ld") ("LD_LINK" . "$(LD) $(LDFLAGS) -L.")) diff --git a/lisp/cedet/ede/proj-shared.el b/lisp/cedet/ede/proj-shared.el index 5d6ca95d7c..75d02eccbc 100644 --- a/lisp/cedet/ede/proj-shared.el +++ b/lisp/cedet/ede/proj-shared.el @@ -75,7 +75,6 @@ Use ldlibs to add addition libraries.") ("LTLINK" . "$(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -L. -o $@") ) :rules (list (ede-makefile-rule - "cc-inference-rule-libtool" :target "%.o" :dependencies "%.c" :rules '("@echo '$(LTCOMPILE) -o $@ $<'; \\" @@ -122,7 +121,6 @@ Use ldlibs to add addition libraries.") ("LTCOMPILE" . "$(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)") ) :rules (list (ede-makefile-rule - "c++-inference-rule-libtool" :target "%.o" :dependencies "%.cpp" :rules '("@echo '$(LTCOMPILE) -o $@ $<'; \\" diff --git a/lisp/cedet/ede/simple.el b/lisp/cedet/ede/simple.el index b945d690f9..3931cf6348 100644 --- a/lisp/cedet/ede/simple.el +++ b/lisp/cedet/ede/simple.el @@ -46,7 +46,7 @@ ;;; Code: (add-to-list 'ede-project-class-files - (ede-project-autoload "simple-overlay" + (ede-project-autoload :name "Simple" :file 'ede/simple :proj-file 'ede-simple-projectfile-for-dir :load-type 'ede-simple-load diff --git a/lisp/cedet/ede/source.el b/lisp/cedet/ede/source.el index b616af3a43..71a1c38a52 100644 --- a/lisp/cedet/ede/source.el +++ b/lisp/cedet/ede/source.el @@ -156,14 +156,12 @@ Used to guess header files, but uses the auxsource regular expression." ;; ;; This must appear at the end so that the init method will work. (defvar ede-source-scheme - (ede-sourcecode "ede-source-scheme" - :name "Scheme" + (ede-sourcecode :name "Scheme" :sourcepattern "\\.scm$") "Scheme source code definition.") ;;(defvar ede-source- -;; (ede-sourcecode "ede-source-" -;; :name "" +;; (ede-sourcecode :name "" ;; :sourcepattern "\\.$" ;; :garbagepattern '("*.")) ;; " source code definition.") diff --git a/lisp/cedet/semantic/analyze.el b/lisp/cedet/semantic/analyze.el index 7c9f102951..625982f2c7 100644 --- a/lisp/cedet/semantic/analyze.el +++ b/lisp/cedet/semantic/analyze.el @@ -642,7 +642,6 @@ Returns an object based on symbol `semantic-analyze-context'." ;; for the argument. (setq context-return (semantic-analyze-context-functionarg - "functionargument" :buffer (current-buffer) :function fntag :index arg @@ -665,7 +664,6 @@ Returns an object based on symbol `semantic-analyze-context'." (setq context-return (semantic-analyze-context-assignment - "assignment" :buffer (current-buffer) :assignee asstag :scope scope @@ -683,7 +681,6 @@ Returns an object based on symbol `semantic-analyze-context'." ;; Nothing in particular (setq context-return (semantic-analyze-context - "context" :buffer (current-buffer) :scope scope :bounds bounds diff --git a/lisp/cedet/semantic/bovine/c.el b/lisp/cedet/semantic/bovine/c.el index 73c8a56dbd..cb27582fa5 100644 --- a/lisp/cedet/semantic/bovine/c.el +++ b/lisp/cedet/semantic/bovine/c.el @@ -1990,7 +1990,7 @@ have to be wrapped in that namespace." (list (semantic-tag-new-type inside-ns "namespace" tags nil))) ;; Create new semantic-table for the wrapped tags, since we don't want ;; the namespace to actually be a part of the header file. - (setq newtable (semanticdb-table "include with context")) + (setq newtable (semanticdb-table)) (oset newtable tags newtags) (oset newtable parent-db (oref inctable parent-db)) (oset newtable file (oref inctable file))) diff --git a/lisp/cedet/semantic/bovine/debug.el b/lisp/cedet/semantic/bovine/debug.el index 9bacee2a9c..e511b3d271 100644 --- a/lisp/cedet/semantic/bovine/debug.el +++ b/lisp/cedet/semantic/bovine/debug.el @@ -73,8 +73,7 @@ The RULE is for \"thing\" is 1. The MATCH for \"thing\" is 1. COLLECTION is a list of `things' that have been matched so far. LEXTOKEN, is a token returned by the lexer which is being matched." - (let ((frame (semantic-bovine-debug-frame "frame" - :nonterm nonterm + (let ((frame (semantic-bovine-debug-frame :nonterm nonterm :rule rule :match match :collection collection @@ -119,8 +118,7 @@ LEXTOKEN, is a token returned by the lexer which is being matched." (defun semantic-create-bovine-debug-error-frame (condition) "Create an error frame for bovine debugger. Argument CONDITION is the thrown error condition." - (let ((frame (semantic-bovine-debug-error-frame "frame" - :condition condition))) + (let ((frame (semantic-bovine-debug-error-frame :condition condition))) (semantic-debug-set-frame semantic-debug-current-interface frame) frame)) diff --git a/lisp/cedet/semantic/complete.el b/lisp/cedet/semantic/complete.el index 1da1a319f1..baea2261e5 100644 --- a/lisp/cedet/semantic/complete.el +++ b/lisp/cedet/semantic/complete.el @@ -1890,8 +1890,8 @@ If INITIAL-INPUT is non-nil, insert it in the minibuffer initially. HISTORY is a symbol representing a variable to store the history in." (semantic-complete-read-tag-engine (semantic-collector-buffer-deep prompt :buffer (current-buffer)) - (semantic-displayor-traditional-with-focus-highlight "simple") - ;;(semantic-displayor-tooltip "simple") + (semantic-displayor-traditional-with-focus-highlight) + ;;(semantic-displayor-tooltip) prompt default-tag initial-input @@ -1912,8 +1912,8 @@ If INITIAL-INPUT is non-nil, insert it in the minibuffer initially. HISTORY is a symbol representing a variable to store the history in." (semantic-complete-read-tag-engine (semantic-collector-local-members prompt :buffer (current-buffer)) - (semantic-displayor-traditional-with-focus-highlight "simple") - ;;(semantic-displayor-tooltip "simple") + (semantic-displayor-traditional-with-focus-highlight) + ;;(semantic-displayor-tooltip) prompt default-tag initial-input @@ -1937,7 +1937,7 @@ HISTORY is a symbol representing a variable to store the history in." :buffer (current-buffer) :path (current-buffer) ) - (semantic-displayor-traditional-with-focus-highlight "simple") + (semantic-displayor-traditional-with-focus-highlight) prompt default-tag initial-input @@ -1954,7 +1954,6 @@ to control how completion options are displayed. See `semantic-complete-inline-tag-engine' for details on how completion works." (let* ((collector (semantic-collector-project-brutish - "inline" :buffer (current-buffer) :path (current-buffer))) (sbounds (semantic-ctxt-current-symbol-and-bounds)) @@ -1984,9 +1983,8 @@ completion works." ;; There are several options. Do the completion. (semantic-complete-inline-tag-engine collector - (funcall semantic-complete-inline-analyzer-displayor-class - "inline displayor") - ;;(semantic-displayor-tooltip "simple") + (funcall semantic-complete-inline-analyzer-displayor-class) + ;;(semantic-displayor-tooltip) (current-buffer) start end)) ))) @@ -2013,7 +2011,7 @@ prompts. these are calculated from the CONTEXT variable passed in." prompt :buffer (oref context buffer) :context context) - (semantic-displayor-traditional-with-focus-highlight "simple") + (semantic-displayor-traditional-with-focus-highlight) (with-current-buffer (oref context buffer) (goto-char (cdr (oref context bounds))) (concat prompt (mapconcat 'identity syms ".") @@ -2037,7 +2035,6 @@ completion works." (if (not context) (setq context (semantic-analyze-current-context (point)))) (if (not context) (error "Nothing to complete on here")) (let* ((collector (semantic-collector-analyze-completions - "inline" :buffer (oref context buffer) :context context)) (syms (semantic-ctxt-current-symbol (point))) @@ -2064,9 +2061,8 @@ completion works." ;; There are several options. Do the completion. (semantic-complete-inline-tag-engine collector - (funcall semantic-complete-inline-analyzer-displayor-class - "inline displayor") - ;;(semantic-displayor-tooltip "simple") + (funcall semantic-complete-inline-analyzer-displayor-class) + ;;(semantic-displayor-tooltip) (oref context buffer) (car (oref context bounds)) (cdr (oref context bounds)) diff --git a/lisp/cedet/semantic/db-javascript.el b/lisp/cedet/semantic/db-javascript.el index c58c295cd5..789614d511 100644 --- a/lisp/cedet/semantic/db-javascript.el +++ b/lisp/cedet/semantic/db-javascript.el @@ -98,7 +98,7 @@ See bottom of this file for instructions on managing this list.") ;; Create the database, and add it to searchable databases for javascript mode. (defvar-mode-local javascript-mode semanticdb-project-system-databases (list - (semanticdb-project-database-javascript "Javascript")) + (semanticdb-project-database-javascript)) "Search javascript for symbols.") ;; NOTE: Be sure to modify this to the best advantage of your @@ -115,13 +115,13 @@ the omniscience database.") "For a javascript database, there are no explicit tables. Create one of our special tables that can act as an intermediary." ;; NOTE: This method overrides an accessor for the `tables' slot in - ;; a database. You can either construct your own (like tmp here + ;; a database. You can either construct your own (like newtable here ;; or you can manage any number of tables. ;; We need to return something since there is always the "master table" ;; The table can then answer file name type questions. (when (not (slot-boundp obj 'tables)) - (let ((newtable (semanticdb-table-javascript "tmp"))) + (let ((newtable (semanticdb-table-javascript))) (oset obj tables (list newtable)) (oset newtable parent-db obj) (oset newtable tags nil) diff --git a/lisp/cedet/semantic/db-ref.el b/lisp/cedet/semantic/db-ref.el index 8f20fee954..7713a3cec5 100644 --- a/lisp/cedet/semantic/db-ref.el +++ b/lisp/cedet/semantic/db-ref.el @@ -162,8 +162,7 @@ refreshed before dumping the result." (let* ((tab semanticdb-current-table) (myrefs (oref tab db-refs)) (myinc (semanticdb-includes-in-table tab)) - (adbc (semanticdb-ref-adebug "DEBUG" - :i-depend-on myrefs + (adbc (semanticdb-ref-adebug :i-depend-on myrefs :local-table tab :i-include myinc))) (data-debug-new-buffer "*References ADEBUG*") diff --git a/lisp/cedet/semantic/debug.el b/lisp/cedet/semantic/debug.el index d127b6465f..4f05e59979 100644 --- a/lisp/cedet/semantic/debug.el +++ b/lisp/cedet/semantic/debug.el @@ -361,7 +361,6 @@ Argument ONOFF is non-nil when we are entering debug mode. (semantic-debug-current-interface (let ((parserb (semantic-debug-find-parser-source))) (semantic-debug-interface - "Debug Interface" :parser-buffer parserb :parser-local-map (with-current-buffer parserb (current-local-map)) diff --git a/lisp/cedet/semantic/ede-grammar.el b/lisp/cedet/semantic/ede-grammar.el index 617ad7867f..8c36623b72 100644 --- a/lisp/cedet/semantic/ede-grammar.el +++ b/lisp/cedet/semantic/ede-grammar.el @@ -67,8 +67,7 @@ For Emacs Lisp, return addsuffix command on source files." (ede-proj-makefile-sourcevar this)))))) (defvar semantic-ede-source-grammar-wisent - (ede-sourcecode "semantic-ede-grammar-source-wisent" - :name "Wisent Grammar" + (ede-sourcecode :name "Wisent Grammar" :sourcepattern "\\.wy$" :garbagepattern '("*-wy.el") ) @@ -80,13 +79,11 @@ For Emacs Lisp, return addsuffix command on source files." (defvar semantic-ede-grammar-compiler-wisent (semantic-ede-grammar-compiler-class - "ede-emacs-wisent-compiler" :name "emacs" :variables '(("EMACS" . "emacs") ("EMACSFLAGS" . "-batch --no-site-file --eval '(setq debug-on-error t)'") ("require" . "$(foreach r,$(1),(require (quote $(r))))")) :rules (list (ede-makefile-rule - "elisp-inference-rule" :target "%-wy.el" :dependencies "%.wy" :rules '("$(EMACS) $(EMACSFLAGS) $(addprefix -L ,$(LOADPATH)) \ @@ -98,8 +95,7 @@ For Emacs Lisp, return addsuffix command on source files." (defvar semantic-ede-source-grammar-bovine - (ede-sourcecode "semantic-ede-grammar-source-bovine" - :name "Bovine Grammar" + (ede-sourcecode :name "Bovine Grammar" :sourcepattern "\\.by$" :garbagepattern '("*-by.el") ) @@ -107,13 +103,11 @@ For Emacs Lisp, return addsuffix command on source files." (defvar semantic-ede-grammar-compiler-bovine (semantic-ede-grammar-compiler-class - "ede-emacs-wisent-compiler" :name "emacs" :variables '(("EMACS" . "emacs") ("EMACSFLAGS" . "-batch --no-site-file --eval '(setq debug-on-error t)'") ("require" . "$(foreach r,$(1),(require (quote $(r))))")) :rules (list (ede-makefile-rule - "elisp-inference-rule" :target "%-by.el" :dependencies "%.by" :rules '("$(EMACS) $(EMACSFLAGS) $(addprefix -L ,$(LOADPATH)) \ diff --git a/lisp/cedet/semantic/mru-bookmark.el b/lisp/cedet/semantic/mru-bookmark.el index bc8b1a9ef2..80844494c4 100644 --- a/lisp/cedet/semantic/mru-bookmark.el +++ b/lisp/cedet/semantic/mru-bookmark.el @@ -166,7 +166,6 @@ We can't use the built-in ring data structure because we need to delete some items from the ring when we don't have the data.") (defvar semantic-mru-bookmark-ring (semantic-bookmark-ring - "Ring" :ring (make-ring 20)) "The MRU bookmark ring. This ring tracks the most recent active tags of interest.") diff --git a/lisp/cedet/semantic/scope.el b/lisp/cedet/semantic/scope.el index a2c68ed3a6..e653d0a03d 100644 --- a/lisp/cedet/semantic/scope.el +++ b/lisp/cedet/semantic/scope.el @@ -309,7 +309,7 @@ are from nesting data types." (list searchname))) (fullsearchname nil) - (miniscope (semantic-scope-cache "mini")) + (miniscope (semantic-scope-cache)) ptag) ;; Find the next entry in the referenced type for @@ -368,7 +368,7 @@ and PROTECTION is the level of protection offered by the relationship. Optional SCOPETYPES are additional scoped entities in which our parent might be found." (let ((lineage nil) - (miniscope (semantic-scope-cache "mini")) + (miniscope (semantic-scope-cache)) ) (oset miniscope parents parents) (oset miniscope scope scopetypes) @@ -644,7 +644,7 @@ whose tags can be searched when needed, OR it may be a scope object." ;; We need to make a mini scope, and only include the misc bits ;; that will help in finding the parent. We don't really need ;; to do any of the stuff related to variables and what-not. - (setq tmpscope (semantic-scope-cache "mini")) + (setq tmpscope (semantic-scope-cache)) (let* ( ;; Step 1: (scopetypes (cons type (semantic-analyze-scoped-types (point)))) (parents (semantic-analyze-scope-nested-tags (point) scopetypes)) diff --git a/lisp/cedet/semantic/texi.el b/lisp/cedet/semantic/texi.el index 7fe1932479..1fdfd104a5 100644 --- a/lisp/cedet/semantic/texi.el +++ b/lisp/cedet/semantic/texi.el @@ -378,7 +378,6 @@ Optional argument POINT is where to look for the environment." (when prefix (require 'semantic/analyze) (semantic-analyze-context - "Context-for-texinfo" :buffer (current-buffer) :scope nil :bounds bounds diff --git a/lisp/cedet/srecode/extract.el b/lisp/cedet/srecode/extract.el index 3e2c4ebd12..276f2ace2f 100644 --- a/lisp/cedet/srecode/extract.el +++ b/lisp/cedet/srecode/extract.el @@ -88,7 +88,7 @@ the dictionary entries were for that block of text." (save-restriction (narrow-to-region start end) (let ((dict (srecode-create-dictionary t)) - (state (srecode-extract-state "state")) + (state (srecode-extract-state)) ) (goto-char start) (srecode-extract-method template dict state) diff --git a/lisp/cedet/srecode/map.el b/lisp/cedet/srecode/map.el index f885b49614..1d419c93ba 100644 --- a/lisp/cedet/srecode/map.el +++ b/lisp/cedet/srecode/map.el @@ -270,7 +270,7 @@ if that file is NEW, otherwise assume the mode has not changed." (if (not srecode-map-save-file) ;; 0) Create a MAP when in no save file mode. (when (not srecode-current-map) - (setq srecode-current-map (srecode-map "SRecode Map")) + (setq srecode-current-map (srecode-map)) (message "SRecode map created in non-save mode.") ) @@ -290,8 +290,7 @@ if that file is NEW, otherwise assume the mode has not changed." (error "Change your SRecode map file")))) ;; Have a dir. Make the object. (setq srecode-current-map - (srecode-map "SRecode Map" - :file srecode-map-save-file))) + (srecode-map :file srecode-map-save-file))) ;; 2) Do we not have a current map? If so load. (when (not srecode-current-map) @@ -301,8 +300,7 @@ if that file is NEW, otherwise assume the mode has not changed." (error ;; There was an error loading the old map. Create a new one. (setq srecode-current-map - (srecode-map "SRecode Map" - :file srecode-map-save-file)))) + (srecode-map :file srecode-map-save-file)))) ) ) diff --git a/lisp/cedet/srecode/srt-mode.el b/lisp/cedet/srecode/srt-mode.el index ef1d9e37c0..6c269e0d91 100644 --- a/lisp/cedet/srecode/srt-mode.el +++ b/lisp/cedet/srecode/srt-mode.el @@ -494,7 +494,7 @@ section or ? for an ask variable." (let* ((macroend (match-beginning 0)) (raw (buffer-substring-no-properties macrostart macroend)) - (STATE (srecode-compile-state "TMP")) + (STATE (srecode-compile-state)) (inserter (condition-case nil (srecode-compile-parse-inserter raw STATE) @@ -605,7 +605,6 @@ section or ? for an ask variable." (setq context-return (semantic-analyze-context-functionarg - "context-for-srecode" :buffer (current-buffer) :scope scope :bounds bounds commit 10bd3b3af8acfc226acadc654298865cffc19cc9 Author: Noam Postavsky Date: Tue Mar 13 22:17:43 2018 -0400 Improve word motion docs (Bug#30815) * doc/lispref/positions.texi (Word Motion): Fix reference to `char-script-table'. * lisp/simple.el (backward-word): * src/syntax.c (forward-word): Mention `char-script-table' and add link to the 'Word Motion' manual section. diff --git a/doc/lispref/positions.texi b/doc/lispref/positions.texi index 0a03e246c0..fdc8bb96ae 100644 --- a/doc/lispref/positions.texi +++ b/doc/lispref/positions.texi @@ -210,7 +210,7 @@ by the current buffer's syntax table (@pxref{Syntax Class Table}), but modes can override that by setting up a suitable @code{find-word-boundary-function-table}, described below. Characters that belong to different scripts (as defined by -@code{char-syntax-table}), also define a word boundary +@code{char-script-table}), also define a word boundary (@pxref{Character Properties}). In any case, this function cannot move point past the boundary of the accessible portion of the buffer, or across a field boundary (@pxref{Fields}). The most common case of diff --git a/lisp/simple.el b/lisp/simple.el index b7ad6ebd79..d8abeb3000 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -7027,11 +7027,13 @@ current object." With argument ARG, do this that many times. If ARG is omitted or nil, move point backward one word. -The word boundaries are normally determined by the buffer's syntax -table, but `find-word-boundary-function-table', such as set up -by `subword-mode', can change that. If a Lisp program needs to -move by words determined strictly by the syntax table, it should -use `backward-word-strictly' instead." +The word boundaries are normally determined by the buffer's +syntax table and character script (according to +`char-script-table'), but `find-word-boundary-function-table', +such as set up by `subword-mode', can change that. If a Lisp +program needs to move by words determined strictly by the syntax +table, it should use `backward-word-strictly' instead. See Info +node `(elisp) Word Motion' for details." (interactive "^p") (forward-word (- (or arg 1)))) diff --git a/src/syntax.c b/src/syntax.c index 378064611c..e54325589f 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -1552,10 +1552,11 @@ left there and the function returns nil. Field boundaries are not noticed if `inhibit-field-text-motion' is non-nil. The word boundaries are normally determined by the buffer's syntax -table, but `find-word-boundary-function-table', such as set up -by `subword-mode', can change that. If a Lisp program needs to -move by words determined strictly by the syntax table, it should -use `forward-word-strictly' instead. */) +table and character script (according to `char-script-table'), but +`find-word-boundary-function-table', such as set up by `subword-mode', +can change that. If a Lisp program needs to move by words determined +strictly by the syntax table, it should use `forward-word-strictly' +instead. See Info node `(elisp) Word Motion' for details. */) (Lisp_Object arg) { Lisp_Object tmp; commit 165803c69136229aaf426bf7655eacbe94425138 Author: Glenn Morris Date: Fri Mar 16 13:44:13 2018 -0400 Quieten semantic re-compilation when .elc already exist * lisp/cedet/semantic/db-find.el, lisp/cedet/semantic/util.el: Add some function declarations. diff --git a/lisp/cedet/semantic/db-find.el b/lisp/cedet/semantic/db-find.el index d3ad5c7537..7cb2ac1e94 100644 --- a/lisp/cedet/semantic/db-find.el +++ b/lisp/cedet/semantic/db-find.el @@ -1333,6 +1333,9 @@ Returns a table of all matching tags." (semantic-find-tags-included (or tags (semanticdb-get-tags table))) (semantic-find-tags-by-class class (or tags (semanticdb-get-tags table))))) +(declare-function semantic-find-tags-external-children-of-type + "semantic/find" (type &optional table)) + (cl-defmethod semanticdb-find-tags-external-children-of-type-method ((table semanticdb-abstract-table) parent &optional tags) "In TABLE, find all occurrences of tags whose parent is the PARENT type. Optional argument TAGS is a list of tags to search. @@ -1340,6 +1343,9 @@ Returns a table of all matching tags." (require 'semantic/find) (semantic-find-tags-external-children-of-type parent (or tags (semanticdb-get-tags table)))) +(declare-function semantic-find-tags-subclasses-of-type + "semantic/find" (type &optional table)) + (cl-defmethod semanticdb-find-tags-subclasses-of-type-method ((table semanticdb-abstract-table) parent &optional tags) "In TABLE, find all occurrences of tags whose parent is the PARENT type. Optional argument TAGS is a list of tags to search. diff --git a/lisp/cedet/semantic/util.el b/lisp/cedet/semantic/util.el index 313f2350a4..0a02b898e3 100644 --- a/lisp/cedet/semantic/util.el +++ b/lisp/cedet/semantic/util.el @@ -54,6 +54,8 @@ Equivalent modes share a parser, and a set of override methods. A value of nil means that the current major mode is the only one.") (make-variable-buffer-local 'semantic-equivalent-major-modes) +(declare-function semanticdb-file-stream "semantic/db" (file)) + ;; These semanticdb calls will throw warnings in the byte compiler. ;; Doing the right thing to make them available at compile time ;; really messes up the compilation sequence. @@ -80,6 +82,11 @@ If FILE is not loaded, and semanticdb is not available, find the file (semantic-alias-obsolete 'semantic-file-token-stream 'semantic-file-tag-table "23.2") +(declare-function semanticdb-abstract-table-child-p "semantic/db" (obj) t) +(declare-function semanticdb-refresh-table "semantic/db") +(declare-function semanticdb-get-tags "semantic/db" (arg &rest args) t) +(declare-function semanticdb-find-results-p "semantic/db-find" (resultp)) + (defun semantic-something-to-tag-table (something) "Convert SOMETHING into a semantic tag table. Something can be a tag with a valid BUFFER property, a tag table, a @@ -140,6 +147,11 @@ buffer, or a filename. If SOMETHING is nil return nil." (defvar semantic-read-symbol-history nil "History for a symbol read.") +(declare-function semantic-brute-find-tag-by-function + "semantic/find" + (function streamorbuffer + &optional search-parts search-includes)) + (defun semantic-read-symbol (prompt &optional default stream filter) "Read a symbol name from the user for the current buffer. PROMPT is the prompt to use. @@ -154,6 +166,7 @@ FILTER must be a function to call on each element." (setq stream (if filter (semantic--find-tags-by-function filter stream) + (require 'semantic/find) (semantic-brute-find-tag-standard stream))) (if (and default (string-match ":" prompt)) (setq prompt @@ -367,6 +380,11 @@ NOTFIRST indicates that this was not the first call in the recursive use." ;; Symbol completion +(declare-function semanticdb-fast-strip-find-results + "semantic/db-find" (results)) +(declare-function semanticdb-deep-find-tags-for-completion + "semantic/db-find" (prefix &optional path find-file-match)) + (defun semantic-find-tag-for-completion (prefix) "Find all tags with name starting with PREFIX. This uses `semanticdb' when available." commit 18d82f15ae63a351bc977895b3f2127444876e3a Author: Glenn Morris Date: Fri Mar 16 13:42:49 2018 -0400 * lisp/gnus/gnus-registry.el: Add missing compile-time requirement. diff --git a/lisp/gnus/gnus-registry.el b/lisp/gnus/gnus-registry.el index 07e80f3ca9..7ae81b02a2 100644 --- a/lisp/gnus/gnus-registry.el +++ b/lisp/gnus/gnus-registry.el @@ -77,6 +77,7 @@ ;;; Code: (eval-when-compile (require 'cl)) +(eval-when-compile (require 'subr-x)) (require 'gnus) (require 'gnus-int) commit 4a20174d7949028f66b18a92a75d6b74194242a8 Author: Eli Zaretskii Date: Fri Mar 16 19:15:33 2018 +0200 Fix 'posn-at-point' when line numbers are displayed * src/xdisp.c (pos_visible_p): For the leftmost glyph, adjust the X coordinate due to line-number display. (Bug#30834) diff --git a/src/xdisp.c b/src/xdisp.c index 424f1735b5..a97d4db607 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -1381,6 +1381,29 @@ pos_visible_p (struct window *w, ptrdiff_t charpos, int *x, int *y, move_it_to (&it, charpos, -1, it.last_visible_y - 1, -1, (charpos >= 0 ? MOVE_TO_POS : 0) | MOVE_TO_Y); + /* Adjust for line numbers, if CHARPOS is at or beyond first_visible_x, + but we didn't yet produce the line-number glyphs. */ + if (!NILP (Vdisplay_line_numbers) + && it.current_x >= it.first_visible_x + && IT_CHARPOS (it) == charpos + && !it.line_number_produced_p) + { + /* If the pixel width of line numbers was not yet known, compute + it now. This usually happens in the first display line of a + window. */ + if (!it.lnum_pixel_width) + { + struct it it2; + void *it2data = NULL; + + SAVE_IT (it2, it, it2data); + move_it_by_lines (&it, 1); + it2.lnum_pixel_width = it.lnum_pixel_width; + RESTORE_IT (&it, &it2, it2data); + } + it.current_x += it.lnum_pixel_width; + } + if (charpos >= 0 && (((!it.bidi_p || it.bidi_it.scan_dir != -1) && IT_CHARPOS (it) >= charpos) commit 33cba5405c724566673cf023513bfb1faa963bea Author: Eli Zaretskii Date: Fri Mar 16 18:11:07 2018 +0200 Another followup to fixing 'window-text-pixel-width' * src/xdisp.c (Fwindow_text_pixel_size): Adjust the return value when we stop one buffer position short of TO. (Bug#30746) diff --git a/src/xdisp.c b/src/xdisp.c index b99990d1d4..424f1735b5 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -10173,9 +10173,14 @@ include the height of both, if present, in the return value. */) RESTORE_IT (&it, &it2, it2data); x = move_it_to (&it, end, to_x, max_y, -1, move_op); /* Add the width of the thing at TO, but only if we didn't - overshoot it; if we did, it is already accounted for. */ + overshoot it; if we did, it is already accounted for. Also, + account for the height of the thing at TO. */ if (IT_CHARPOS (it) == end) - x += it.pixel_width; + { + x += it.pixel_width; + it.max_ascent = max (it.max_ascent, it.ascent); + it.max_descent = max (it.max_descent, it.descent); + } } if (!NILP (x_limit)) { commit 2d0853f62ac65f974f25887f69506bfe923bf14b Author: Michael Albinus Date: Fri Mar 16 16:19:10 2018 +0100 Optimize "make check" and "make check-maybe" * lisp/emacs-lisp/ert.el (ert-run-tests-batch): Print summary duration. * test/Makefile.in (TEST_LOAD_EL): Set default to "no" for targets all, check, and check-maybe. (Bug#30807) * test/README: Reflect recent changes in Makefile. * test/lisp/net/tramp-archive-tests.el (tramp-archive-test99-libarchive-tests): Tag it :unstable. diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el index 3beb8a070f..a15450734e 100644 --- a/lisp/emacs-lisp/ert.el +++ b/lisp/emacs-lisp/ert.el @@ -1383,7 +1383,15 @@ Returns the stats object." (if (zerop skipped) "" (format ", %s skipped" skipped)) - (ert--format-time-iso8601 (ert--stats-end-time stats)) + (if ert-batch-print-duration + (format + "%s, %f sec" + (ert--format-time-iso8601 (ert--stats-end-time stats)) + (float-time + (time-subtract + (ert--stats-end-time stats) + (ert--stats-start-time stats)))) + (ert--format-time-iso8601 (ert--stats-end-time stats))) (if (zerop expected-failures) "" (format "\n%s expected failures" expected-failures))) diff --git a/test/Makefile.in b/test/Makefile.in index 0b6f8c2eec..426d22d063 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -97,7 +97,8 @@ TEST_LOCALE = C # Whether to run tests from .el files in preference to .elc, we do # this by default since it gives nicer stacktraces. # If you just want a pass/fail, setting this to no is much faster. -TEST_LOAD_EL ?= yes +export TEST_LOAD_EL ?= \ + $(if $(findstring $(MAKECMDGOALS), all check check-maybe),no,yes) # Additional settings for ert. ert_opts = diff --git a/test/README b/test/README index 17135a0274..37156c632c 100644 --- a/test/README +++ b/test/README @@ -11,12 +11,23 @@ Emacs uses ERT, Emacs Lisp Regression Testing, for testing. See (info "(ert)") or https://www.gnu.org/software/emacs/manual/html_node/ert/ for more information on writing and running tests. +Tests could be tagged by the developer. In this test directory, the +following tags are recognised: + +* :expensive-test + The test needs a serious amount of time to run. It is not intended + to run on a regular basis by users. Instead, it runs on demand + only, or during regression tests. + +* :unstable + The test is under development. It shall run on demand only. + The Makefile in this directory supports the following targets: * make check - Run all tests as defined in the directory. Expensive tests are - suppressed. The result of the tests for .el is stored in - .log. + Run all tests as defined in the directory. Expensive and unstable + tests are suppressed. The result of the tests for .el is + stored in .log. * make check-maybe Like "make check", but run only the tests for files which have @@ -25,6 +36,9 @@ The Makefile in this directory supports the following targets: * make check-expensive Like "make check", but run also the tests marked as expensive. +* make check-all + Like "make check", but run all tests. + * make or make .log Run all tests declared in .el. This includes expensive tests. In the former case the output is shown on the terminal, in @@ -38,15 +52,16 @@ https://www.gnu.org/software/emacs/manual/html_node/ert/Test-Selectors.html You could use predefined selectors of the Makefile. "make SELECTOR='$(SELECTOR_DEFAULT)'" runs all tests for .el -except the tests tagged as expensive. +except the tests tagged as expensive or unstable. If your test file contains the tests "test-foo", "test2-foo" and "test-foo-remote", and you want to run only the former two tests, you could use a selector regexp: "make SELECTOR='\"foo$$\"'". Note that although the test files are always compiled (unless they set -no-byte-compile), the source files will be run by default, to give -nicer backtraces. To run the compiled version of a test use +no-byte-compile), the source files will be run when expensive or +unstable tests are involved, to give nicer backtraces. To run the +compiled version of a test use make TEST_LOAD_EL=no ... diff --git a/test/lisp/net/tramp-archive-tests.el b/test/lisp/net/tramp-archive-tests.el index a3201bdba4..b327e64818 100644 --- a/test/lisp/net/tramp-archive-tests.el +++ b/test/lisp/net/tramp-archive-tests.el @@ -873,7 +873,7 @@ This tests also `file-executable-p', `file-writable-p' and `set-file-modes'." (ert-deftest tramp-archive-test99-libarchive-tests () "Run tests of libarchive test files." - :tags '(:expensive-test) + :tags '(:expensive-test :unstable) (skip-unless tramp-archive-enabled) ;; We do not want to run unless chosen explicitly. This test makes ;; sense only in my local environment. Michael Albinus. commit a402d9aacbecf4bf0b9afde592a3b90c71f96832 Author: Reuben Thomas Date: Fri Mar 16 10:50:21 2018 +0000 Call enchant-lsmod correctly when Enchant is installed with a suffix * lisp/textmodes/ispell.el (ispell--call-enchant-lsmod): Cope with a version suffix on the binary name, so enchant-2 is converted to enchant-lsmod-2, not enchant-2-lsmod. diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index 512dfcfa6a..ba98ea5519 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el @@ -1200,8 +1200,9 @@ Internal use.") (with-output-to-string (with-current-buffer standard-output - (apply 'ispell-call-process - (concat ispell-program-name "-lsmod") nil t nil args)))) + (apply 'ispell-call-process + (replace-regexp-in-string "enchant\\(-[0-9]\\)?$" "enchant-lsmod\\1" + ispell-program-name) nil t nil args)))) (defun ispell--get-extra-word-characters (&optional lang) "Get the extra word characters for LANG as a character class. commit 419514a84a60a1dc36323ae55986c53f59c12262 Author: Glenn Morris Date: Fri Mar 16 01:57:39 2018 -0400 Suppress warnings about obsolete generics (bug#25556) * lisp/Makefile.in (MAIN_FIRST): New variable. (compile-main): Put some files at the head of the queue. diff --git a/lisp/Makefile.in b/lisp/Makefile.in index d4709bd79d..19b0180226 100644 --- a/lisp/Makefile.in +++ b/lisp/Makefile.in @@ -101,6 +101,10 @@ COMPILE_FIRST = \ $(lisp)/emacs-lisp/bytecomp.elc \ $(lisp)/emacs-lisp/autoload.elc +# Files to compile early in compile-main. Works around bug#25556. +MAIN_FIRST = ./emacs-lisp/eieio.el ./emacs-lisp/eieio-base.el \ + ./cedet/semantic/db.el + # Prevent any settings in the user environment causing problems. unexport EMACSDATA EMACSDOC EMACSPATH @@ -319,7 +323,7 @@ compile-targets: $(TARGETS) compile-main: gen-lisp compile-clean @(cd $(lisp) && \ els=`echo "${SUBDIRS_REL} " | sed -e 's|/\./|/|g' -e 's|/\. | |g' -e 's| |/*.el |g'`; \ - for el in $$els; do \ + for el in ${MAIN_FIRST} $$els; do \ test -f $$el || continue; \ test ! -f $${el}c && GREP_OPTIONS= grep '^;.*no-byte-compile: t' $$el > /dev/null && continue; \ echo "$${el}c"; \ commit b1d7e58520dc42a4eda902aa934a250fda6a04ca Author: Glenn Morris Date: Thu Mar 15 20:23:09 2018 -0400 Replace some obsolete uses of filter-buffer-substring-functions * lisp/org/org-agenda.el (org-agenda-mode): * lisp/org/org-indent.el (org-indent-mode): Replace filter-buffer-substring-functions, obsolete since 24.4. diff --git a/lisp/org/org-agenda.el b/lisp/org/org-agenda.el index 9aaec33070..3d4379b022 100644 --- a/lisp/org/org-agenda.el +++ b/lisp/org/org-agenda.el @@ -2201,10 +2201,14 @@ The following commands are available: (add-hook 'post-command-hook 'org-agenda-update-agenda-type nil 'local) (add-hook 'pre-command-hook 'org-unhighlight nil 'local) ;; Make sure properties are removed when copying text - (add-hook 'filter-buffer-substring-functions - (lambda (fun start end delete) - (substring-no-properties (funcall fun start end delete))) - nil t) + (if (boundp 'filter-buffer-substring-functions) + (add-hook 'filter-buffer-substring-functions + (lambda (fun start end delete) + (substring-no-properties (funcall fun start end delete))) + nil t) + ;; Emacs >= 24.4. + (add-function :filter-return (local 'filter-buffer-substring-function) + #'substring-no-properties)) (unless org-agenda-keep-modes (setq org-agenda-follow-mode org-agenda-start-with-follow-mode org-agenda-entry-text-mode org-agenda-start-with-entry-text-mode)) diff --git a/lisp/org/org-indent.el b/lisp/org/org-indent.el index ef68c3c4fa..f2cd6a66fb 100644 --- a/lisp/org/org-indent.el +++ b/lisp/org/org-indent.el @@ -183,11 +183,15 @@ during idle time." org-hide-leading-stars) (setq-local org-hide-leading-stars t)) (org-indent--compute-prefixes) - (add-hook 'filter-buffer-substring-functions - (lambda (fun start end delete) - (org-indent-remove-properties-from-string - (funcall fun start end delete))) - nil t) + (if (boundp 'filter-buffer-substring-functions) + (add-hook 'filter-buffer-substring-functions + (lambda (fun start end delete) + (org-indent-remove-properties-from-string + (funcall fun start end delete))) + nil t) + ;; Emacs >= 24.4. + (add-function :filter-return (local 'filter-buffer-substring-function) + #'org-indent-remove-properties-from-string)) (add-hook 'after-change-functions 'org-indent-refresh-maybe nil 'local) (add-hook 'before-change-functions 'org-indent-notify-modified-headline nil 'local) @@ -211,10 +215,13 @@ during idle time." (when (boundp 'org-hide-leading-stars-before-indent-mode) (setq-local org-hide-leading-stars org-hide-leading-stars-before-indent-mode)) - (remove-hook 'filter-buffer-substring-functions - (lambda (fun start end delete) - (org-indent-remove-properties-from-string - (funcall fun start end delete)))) + (if (boundp 'filter-buffer-substring-functions) + (remove-hook 'filter-buffer-substring-functions + (lambda (fun start end delete) + (org-indent-remove-properties-from-string + (funcall fun start end delete)))) + (remove-function (local 'filter-buffer-substring-function) + #'org-indent-remove-properties-from-string)) (remove-hook 'after-change-functions 'org-indent-refresh-maybe 'local) (remove-hook 'before-change-functions 'org-indent-notify-modified-headline 'local) commit 0a9d297198b9f4d6a0d6355bd7692740d6ecb418 Author: Glenn Morris Date: Thu Mar 15 20:22:06 2018 -0400 * lisp/gnus/nnmaildir.el (nnmaildir-close-server): Remove unused locals. ; By inspection, these were leftovers rather than dynamic bindings. ; See eg a very old version of nnmaildir.el such as ; https://web.archive.org/web/20020531235353/http://multivac.cwru.edu:80/nnmaildir/releases/nnmaildir-2001.12.19.el.bz2 diff --git a/lisp/gnus/nnmaildir.el b/lisp/gnus/nnmaildir.el index 3e4a87cee7..dc97b32f0b 100644 --- a/lisp/gnus/nnmaildir.el +++ b/lisp/gnus/nnmaildir.el @@ -1779,14 +1779,11 @@ This variable is set by `nnmaildir-request-article'.") t))) (defun nnmaildir-close-server (&optional server) - (defvar flist) (defvar ls) (defvar dirs) (defvar dir) - (defvar files) (defvar file) (defvar x) - (let (flist ls dirs dir files file x) - (nnmaildir--prepare server nil) - (when nnmaildir--cur-server - (setq server nnmaildir--cur-server - nnmaildir--cur-server nil) - (unintern (nnmaildir--srv-address server) nnmaildir--servers))) + (nnmaildir--prepare server nil) + (when nnmaildir--cur-server + (setq server nnmaildir--cur-server + nnmaildir--cur-server nil) + (unintern (nnmaildir--srv-address server) nnmaildir--servers)) t) (defun nnmaildir-request-close () commit 23f139e72aec04356c688a32b782e367d79cd0c3 Author: Glenn Morris Date: Thu Mar 15 20:20:24 2018 -0400 * lisp/emulation/cua-base.el (cua-paste): Quieten compilation. diff --git a/lisp/emulation/cua-base.el b/lisp/emulation/cua-base.el index a737bb6c11..ff23484dd0 100644 --- a/lisp/emulation/cua-base.el +++ b/lisp/emulation/cua-base.el @@ -852,8 +852,6 @@ With numeric prefix arg, copy to register 0-9 instead." (if (fboundp 'cua--cancel-rectangle) (cua--cancel-rectangle))) -(declare-function x-clipboard-yank "../term/x-win" ()) - (put 'cua-paste 'delete-selection 'yank) (defun cua-paste (arg) "Paste last cut or copied region or rectangle. @@ -884,10 +882,8 @@ If global mark is active, copy from register or one character." ((consp regtxt) (cua--insert-rectangle regtxt)) ((stringp regtxt) (insert-for-yank regtxt)) (t (message "Unknown data in register %c" cua--register)))) - ((eq this-original-command 'clipboard-yank) - (clipboard-yank)) - ((eq this-original-command 'x-clipboard-yank) - (x-clipboard-yank)) + ((memq this-original-command '(clipboard-yank x-clipboard-yank)) + (funcall this-original-command)) (t (yank arg))))))) commit 0e2984a7f447e2404dcb7ab6ad388ddbe9221d40 Author: Glenn Morris Date: Thu Mar 15 13:29:30 2018 -0400 * lisp/progmodes/verilog-mode.el (verilog-mode): Quieten compilation. diff --git a/lisp/progmodes/verilog-mode.el b/lisp/progmodes/verilog-mode.el index 48dee4bef3..6657761902 100644 --- a/lisp/progmodes/verilog-mode.el +++ b/lisp/progmodes/verilog-mode.el @@ -3966,7 +3966,9 @@ Key bindings specific to `verilog-mode-map' are: #'verilog-completion-at-point nil 'local) ;; Stuff for autos - (add-hook 'write-contents-hooks 'verilog-auto-save-check nil 'local) + (add-hook (if (boundp 'write-contents-hooks) 'write-contents-hooks + 'write-contents-functions) ; Emacs >= 22.1 + 'verilog-auto-save-check nil 'local) ;; verilog-mode-hook call added by define-derived-mode ) commit 64a1da4989b0551481600facb1781ac92089d182 Author: Paul Eggert Date: Thu Mar 15 09:35:33 2018 -0700 Improve port to NetBSD tzalloc Problem reported by Valery Ushakov (Bug#30738#13). * src/editfns.c (tzlookup) [__NetBSD_Version__ < 700000000]: If tzalloc fails for any reason other than memory exhaustion, assume it’s because NetBSD 6 does not support tzalloc on POSIX-format TZ strings, and fall back on tzdb if possible. diff --git a/src/editfns.c b/src/editfns.c index 6ecc83fc30..d26319441b 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -204,6 +204,18 @@ tzlookup (Lisp_Object zone, bool settz) invalid_time_zone_specification (zone); new_tz = tzalloc (zone_string); + +#if defined __NetBSD_Version__ && __NetBSD_Version__ < 700000000 + /* NetBSD 6 tzalloc mishandles POSIX TZ strings (Bug#30738). + If possible, fall back on tzdb. */ + if (!new_tz && errno != ENOMEM && plain_integer + && XINT (zone) % (60 * 60) == 0) + { + sprintf (tzbuf, "Etc/GMT%+"pI"d", - (XINT (zone) / (60 * 60))); + new_tz = tzalloc (zone_string); + } +#endif + if (!new_tz) { if (errno == ENOMEM) commit 711b94c8bb2d25bb3cd13be8b1f88feb2edbd186 Author: Glenn Morris Date: Thu Mar 15 12:32:50 2018 -0400 * test/lisp/ses-tests.el: Quieten compilation. diff --git a/test/lisp/ses-tests.el b/test/lisp/ses-tests.el index d08237e285..c773c9b396 100644 --- a/test/lisp/ses-tests.el +++ b/test/lisp/ses-tests.el @@ -38,7 +38,7 @@ interactively." (dolist (c '((0 0 1) (1 0 (1+ A1)))) (apply 'ses-cell-set-formula c) (apply 'ses-calculate-cell (list (car c) (cadr c) nil))) - (should (eq A2 2))))) + (should (eq (bound-and-true-p A2) 2))))) (ert-deftest ses-tests-plain-formula () "Check that setting A1 to 1 and A2 to (1+ A1), makes A2 value @@ -49,13 +49,16 @@ equal to 2. This is done using interactive calls." (dolist (c '((0 0 1) (1 0 (1+ A1)))) (apply 'funcall-interactively 'ses-edit-cell c)) (ses-command-hook) - (should (eq A2 2))))) + (should (eq (bound-and-true-p A2) 2))))) ;; PLAIN CELL RENAMING TESTS ;; ====================================================================== +(defvar ses--foo) +(defvar ses--cells) + (ert-deftest ses-tests-lowlevel-renamed-cell () - "Check that renaming A1 to `foo' and setting `foo' to 1 and A2 to (1+ foo), makes A2 value equal to 2. + "Check that renaming A1 to `ses--foo' and setting `ses--foo' to 1 and A2 to (1+ ses--foo), makes A2 value equal to 2. This is done using low level functions, `ses-rename-cell' is not called but instead we use text replacement in the buffer previously passed in text mode." @@ -69,63 +72,63 @@ previously passed in text mode." (text-mode) (goto-char (point-min)) (while (re-search-forward "\\" nil t) - (replace-match "foo" t t)) + (replace-match "ses--foo" t t)) (ses-mode) (should-not (local-variable-p 'A1)) - (should (eq foo 1)) - (should (equal (ses-cell-formula 1 0) '(ses-safe-formula (1+ foo)))) - (should (eq A2 2))))) + (should (eq ses--foo 1)) + (should (equal (ses-cell-formula 1 0) '(ses-safe-formula (1+ ses--foo)))) + (should (eq (bound-and-true-p A2) 2))))) (ert-deftest ses-tests-renamed-cell () - "Check that renaming A1 to `foo' and setting `foo' to 1 and A2 -to (1+ foo), makes A2 value equal to 2." + "Check that renaming A1 to `ses--foo' and setting `ses--foo' to 1 and A2 +to (1+ ses--foo), makes A2 value equal to 2." (let ((ses-initial-size '(2 . 1))) (with-temp-buffer (ses-mode) - (ses-rename-cell 'foo (ses-get-cell 0 0)) - (dolist (c '((0 0 1) (1 0 (1+ foo)))) + (ses-rename-cell 'ses--foo (ses-get-cell 0 0)) + (dolist (c '((0 0 1) (1 0 (1+ ses--foo)))) (apply 'funcall-interactively 'ses-edit-cell c)) (ses-command-hook) (should-not (local-variable-p 'A1)) - (should (eq foo 1)) - (should (equal (ses-cell-formula 1 0) '(1+ foo))) - (should (eq A2 2))))) + (should (eq ses--foo 1)) + (should (equal (ses-cell-formula 1 0) '(1+ ses--foo))) + (should (eq (bound-and-true-p A2) 2))))) (ert-deftest ses-tests-renamed-cell-after-setting () "Check that setting A1 to 1 and A2 to (1+ A1), and then -renaming A1 to `foo' makes `foo' value equal to 2." +renaming A1 to `ses--foo' makes `ses--foo' value equal to 2." (let ((ses-initial-size '(2 . 1))) (with-temp-buffer (ses-mode) (dolist (c '((0 0 1) (1 0 (1+ A1)))) (apply 'funcall-interactively 'ses-edit-cell c)) (ses-command-hook); deferred recalc - (ses-rename-cell 'foo (ses-get-cell 0 0)) + (ses-rename-cell 'ses--foo (ses-get-cell 0 0)) (should-not (local-variable-p 'A1)) - (should (eq foo 1)) - (should (equal (ses-cell-formula 1 0) '(1+ foo))) - (should (eq A2 2))))) + (should (eq ses--foo 1)) + (should (equal (ses-cell-formula 1 0) '(1+ ses--foo))) + (should (eq (bound-and-true-p A2) 2))))) (ert-deftest ses-tests-renaming-cell-with-one-symbol-formula () "Check that setting A1 to 1 and A2 to A1, and then renaming A1 -to `foo' makes `foo' value equal to 1. Then set A1 to 2 and check -that `foo' becomes 2." +to `ses--foo' makes `ses--foo' value equal to 1. Then set A1 to 2 and check +that `ses--foo' becomes 2." (let ((ses-initial-size '(3 . 1))) (with-temp-buffer (ses-mode) (dolist (c '((0 0 1) (1 0 A1))) (apply 'funcall-interactively 'ses-edit-cell c)) (ses-command-hook); deferred recalc - (ses-rename-cell 'foo (ses-get-cell 0 0)) + (ses-rename-cell 'ses--foo (ses-get-cell 0 0)) (ses-command-hook); deferred recalc (should-not (local-variable-p 'A1)) - (should (eq foo 1)) - (should (equal (ses-cell-formula 1 0) 'foo)) - (should (eq A2 1)) + (should (eq ses--foo 1)) + (should (equal (ses-cell-formula 1 0) 'ses--foo)) + (should (eq (bound-and-true-p A2) 1)) (funcall-interactively 'ses-edit-cell 0 0 2) (ses-command-hook); deferred recalc - (should (eq A2 2)) - (should (eq foo 2))))) + (should (eq (bound-and-true-p A2) 2)) + (should (eq ses--foo 2))))) ;; ROW INSERTION TESTS @@ -144,12 +147,14 @@ to A2 and inserting a row, makes A2 value empty, and A3 equal to (ses-jump 'A2) (ses-insert-row 1) (ses-command-hook) - (should-not A2) - (should (eq A3 2))))) + (should-not (bound-and-true-p A2)) + (should (eq (bound-and-true-p A3) 2))))) + +(defvar ses--bar) (ert-deftest ses-tests-renamed-cells-row-insertion () - "Check that setting A1 to 1 and A2 to (1+ A1), and then renaming A1 to `foo' and A2 to `bar' jumping -to `bar' and inserting a row, makes A2 value empty, and `bar' equal to + "Check that setting A1 to 1 and A2 to (1+ A1), and then renaming A1 to `ses--foo' and A2 to `ses--bar' jumping +to `ses--bar' and inserting a row, makes A2 value empty, and `ses--bar' equal to 2." (let ((ses-initial-size '(2 . 1))) (with-temp-buffer @@ -157,16 +162,16 @@ to `bar' and inserting a row, makes A2 value empty, and `bar' equal to (dolist (c '((0 0 1) (1 0 (1+ A1)))) (apply 'funcall-interactively 'ses-edit-cell c)) (ses-command-hook) - (ses-rename-cell 'foo (ses-get-cell 0 0)) + (ses-rename-cell 'ses--foo (ses-get-cell 0 0)) (ses-command-hook) - (ses-rename-cell 'bar (ses-get-cell 1 0)) + (ses-rename-cell 'ses--bar (ses-get-cell 1 0)) (ses-command-hook) - (should (eq bar 2)) - (ses-jump 'bar) + (should (eq ses--bar 2)) + (ses-jump 'ses--bar) (ses-insert-row 1) (ses-command-hook) - (should-not A2) - (should (eq bar 2))))) + (should-not (bound-and-true-p A2)) + (should (eq ses--bar 2))))) (provide 'ses-tests) commit 86aaf45e3040eb7255f859346b99c45549533468 Author: Glenn Morris Date: Thu Mar 15 12:32:22 2018 -0400 * lisp/pcomplete.el (pcomplete-here): Move before first reference. diff --git a/lisp/pcomplete.el b/lisp/pcomplete.el index e7d12c6341..6bdea68c0b 100644 --- a/lisp/pcomplete.el +++ b/lisp/pcomplete.el @@ -272,6 +272,39 @@ to all arguments, such as variable names after a $." "Complete amongst a list of directories and executables." (pcomplete-entries regexp 'file-executable-p)) +(defmacro pcomplete-here (&optional form stub paring form-only) + "Complete against the current argument, if at the end. +If completion is to be done here, evaluate FORM to generate the completion +table which will be used for completion purposes. If STUB is a +string, use it as the completion stub instead of the default (which is +the entire text of the current argument). + +For an example of when you might want to use STUB: if the current +argument text is `long-path-name/', you don't want the completions +list display to be cluttered by `long-path-name/' appearing at the +beginning of every alternative. Not only does this make things less +intelligible, but it is also inefficient. Yet, if the completion list +does not begin with this string for every entry, the current argument +won't complete correctly. + +The solution is to specify a relative stub. It allows you to +substitute a different argument from the current argument, almost +always for the sake of efficiency. + +If PARING is nil, this argument will be pared against previous +arguments using the function `file-truename' to normalize them. +PARING may be a function, in which case that function is used for +normalization. If PARING is t, the argument dealt with by this +call will not participate in argument paring. If it is the +integer 0, all previous arguments that have been seen will be +cleared. + +If FORM-ONLY is non-nil, only the result of FORM will be used to +generate the completions list. This means that the hook +`pcomplete-try-first-hook' will not be run." + (declare (debug t)) + `(pcomplete--here (lambda () ,form) ,stub ,paring ,form-only)) + (defcustom pcomplete-command-completion-function (function (lambda () @@ -1014,39 +1047,6 @@ See the documentation for `pcomplete-here'." ;; byte-compiled with the older code. (eval form))))) -(defmacro pcomplete-here (&optional form stub paring form-only) - "Complete against the current argument, if at the end. -If completion is to be done here, evaluate FORM to generate the completion -table which will be used for completion purposes. If STUB is a -string, use it as the completion stub instead of the default (which is -the entire text of the current argument). - -For an example of when you might want to use STUB: if the current -argument text is `long-path-name/', you don't want the completions -list display to be cluttered by `long-path-name/' appearing at the -beginning of every alternative. Not only does this make things less -intelligible, but it is also inefficient. Yet, if the completion list -does not begin with this string for every entry, the current argument -won't complete correctly. - -The solution is to specify a relative stub. It allows you to -substitute a different argument from the current argument, almost -always for the sake of efficiency. - -If PARING is nil, this argument will be pared against previous -arguments using the function `file-truename' to normalize them. -PARING may be a function, in which case that function is used for -normalization. If PARING is t, the argument dealt with by this -call will not participate in argument paring. If it is the -integer 0, all previous arguments that have been seen will be -cleared. - -If FORM-ONLY is non-nil, only the result of FORM will be used to -generate the completions list. This means that the hook -`pcomplete-try-first-hook' will not be run." - (declare (debug t)) - `(pcomplete--here (lambda () ,form) ,stub ,paring ,form-only)) - (defmacro pcomplete-here* (&optional form stub form-only) "An alternate form which does not participate in argument paring." commit d6e04a6d1c3f73a62c1001674a9837cac7715546 Author: Michael Albinus Date: Thu Mar 15 16:11:14 2018 +0100 Improve robustness in tramp-sh.el * lisp/net/tramp-sh.el (tramp-open-connection-setup-interactive-shell): Wrap both echo calls in parentheses, in order to avoid double prompt. diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index f619ac3063..0cdf42de68 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -4175,7 +4175,7 @@ process to set up. VEC specifies the connection." cs-encode (coding-system-change-eol-conversion cs-encode (if (string-match "^Darwin" uname) 'mac 'unix))) - (tramp-send-command vec "echo foo ; echo bar" t) + (tramp-send-command vec "(echo foo ; echo bar)" t) (goto-char (point-min)) (when (search-forward "\r" nil t) (setq cs-decode (coding-system-change-eol-conversion cs-decode 'dos))) commit 9e73c9d0384fc7593161a6c9f6805490953d7156 Author: Eli Zaretskii Date: Thu Mar 15 15:23:01 2018 +0200 Support variable-unquoting syntax in bat-mode * lisp/progmodes/bat-mode.el (bat-font-lock-keywords): Fontify argument numbers in %~n. Suggested by Jostein Kjønigsen in emacs-devel. * test/lisp/progmodes/bat-mode-tests.el (bat-test-fontification-iter-var-1): Update the test to check also the %~n construct. diff --git a/lisp/progmodes/bat-mode.el b/lisp/progmodes/bat-mode.el index 2910a7a104..51acc6a949 100644 --- a/lisp/progmodes/bat-mode.el +++ b/lisp/progmodes/bat-mode.el @@ -84,6 +84,8 @@ . 'bat-label-face) ("\\_<\\(defined\\|set\\)\\_>[ \t]*\\(\\(\\sw\\|\\s_\\)+\\)" (2 font-lock-variable-name-face)) + ("%~\\([0-9]\\)" + (1 font-lock-variable-name-face)) ("%\\([^%~ \n]+\\)%?" (1 font-lock-variable-name-face)) ("!\\([^!%~ \n]+\\)!?" ; delayed-expansion !variable! diff --git a/test/lisp/progmodes/bat-mode-tests.el b/test/lisp/progmodes/bat-mode-tests.el index 4fa8de10c6..5b824841d4 100644 --- a/test/lisp/progmodes/bat-mode-tests.el +++ b/test/lisp/progmodes/bat-mode-tests.el @@ -63,10 +63,11 @@ "Test fontification of iteration variables." (should (equal - (bat-test-fontify "echo %%a\necho %%~dp1\necho %%~$PATH:I") + (bat-test-fontify "echo %%a\necho %%~dp1\necho %%~$PATH:I\necho %%~1") "echo %%a echo %%~dp1 -echo %%~$PATH:I"))) +echo %%~$PATH:I +echo %%~1"))) (defun bat-test-fill-paragraph (str) "Return the result of invoking `fill-paragraph' on STR in a `bat-mode' buffer." commit 5c585b8b994aad4e6844f8eed80bdfbb396e91bf Author: Eli Zaretskii Date: Thu Mar 15 15:13:50 2018 +0200 Fix mouse-set-point when line numbers are displayed * src/xdisp.c (move_it_to): Initialize the line_number_produced_p flag before iterating on a new line. (Bug#30818) diff --git a/src/xdisp.c b/src/xdisp.c index c0fdeca484..b99990d1d4 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -9598,6 +9598,7 @@ move_it_to (struct it *it, ptrdiff_t to_charpos, int to_x, int to_y, int to_vpos it->current_x = line_start_x; line_start_x = 0; it->hpos = 0; + it->line_number_produced_p = false; it->current_y += it->max_ascent + it->max_descent; ++it->vpos; last_height = it->max_ascent + it->max_descent; commit c8c486bd380ccaff330b4f5046109f639fe31167 Author: Michael Albinus Date: Thu Mar 15 11:32:50 2018 +0100 Fix an error in tramp-archive-test42-auto-load * test/lisp/net/tramp-archive-tests.el (tramp-archive-test42-auto-load): Do not use "/ssh::" as test directory, it could harm. (Bug#30807) diff --git a/test/lisp/net/tramp-archive-tests.el b/test/lisp/net/tramp-archive-tests.el index 33916f82da..a3201bdba4 100644 --- a/test/lisp/net/tramp-archive-tests.el +++ b/test/lisp/net/tramp-archive-tests.el @@ -809,7 +809,7 @@ This tests also `file-executable-p', `file-writable-p' and `set-file-modes'." (skip-unless (tramp-archive--test-emacs27-p)) ;; tramp-archive is neither loaded at Emacs startup, nor when - ;; loading a file like "/ssh::" (which loads Tramp). + ;; loading a file like "/mock::foo" (which loads Tramp). (let ((default-directory (expand-file-name temporary-file-directory)) (code "(progn \ @@ -818,7 +818,7 @@ This tests also `file-executable-p', `file-writable-p' and `set-file-modes'." (file-attributes %S \"/\") \ (message \"tramp-archive loaded: %%s %%s\" \ (featurep 'tramp) (featurep 'tramp-archive)))")) - (dolist (file `("/ssh::foo" ,(concat tramp-archive-test-archive "foo"))) + (dolist (file `("/mock::foo" ,(concat tramp-archive-test-archive "foo"))) (should (string-match (format commit 2b8507fbdce8228ccdbcbc31fe545a50330ddd51 Author: Michael Albinus Date: Thu Mar 15 10:56:08 2018 +0100 Replace "carriage-return" by "carriage return" in manuals * doc/emacs/msdos.texi: * doc/emacs/mule.texi: * doc/emacs/screen.texi: * doc/lispref/nonascii.texi: * doc/misc/calc.texi: Replace "carriage-return" by "carriage return". Suggested by Richard Stallman in emacs-manual-bugs@gnu.org. diff --git a/doc/emacs/msdos.texi b/doc/emacs/msdos.texi index 95969540f5..90f0389a0e 100644 --- a/doc/emacs/msdos.texi +++ b/doc/emacs/msdos.texi @@ -152,15 +152,16 @@ window. @xref{emacsclient Options}. convention used on GNU, Unix, and other POSIX-compliant systems. @cindex end-of-line conversion on MS-DOS/MS-Windows - By contrast, MS-DOS and MS-Windows normally use carriage-return linefeed, -a two-character sequence, to separate text lines. (Linefeed is the same -character as newline.) Therefore, convenient editing of typical files -with Emacs requires conversion of these end-of-line (EOL) sequences. -And that is what Emacs normally does: it converts carriage-return -linefeed into newline when reading files, and converts newline into -carriage-return linefeed when writing files. The same mechanism that -handles conversion of international character codes does this conversion -also (@pxref{Coding Systems}). + By contrast, MS-DOS and MS-Windows normally use carriage return +followed by linefeed, a two-character sequence, to separate text +lines. (Linefeed is the same character as newline.) Therefore, +convenient editing of typical files with Emacs requires conversion of +these end-of-line (EOL) sequences. And that is what Emacs normally +does: it converts carriage return followed by linefeed into newline +when reading files, and converts newline into carriage return followed +by linefeed when writing files. The same mechanism that handles +conversion of international character codes does this conversion also +(@pxref{Coding Systems}). @cindex cursor location, on MS-DOS @cindex point location, on MS-DOS @@ -169,11 +170,11 @@ that character positions as reported by Emacs (@pxref{Position Info}) do not agree with the file size information known to the operating system. In addition, if Emacs recognizes from a file's contents that it uses -newline rather than carriage-return linefeed as its line separator, it -does not perform EOL conversion when reading or writing that file. -Thus, you can read and edit files from GNU and Unix systems on MS-DOS -with no special effort, and they will retain their Unix-style -end-of-line convention after you edit them. +newline rather than carriage return followed by linefeed as its line +separator, it does not perform EOL conversion when reading or writing +that file. Thus, you can read and edit files from GNU and Unix +systems on MS-DOS with no special effort, and they will retain their +Unix-style end-of-line convention after you edit them. The mode line indicates whether end-of-line translation was used for the current buffer. If MS-DOS end-of-line translation is in use for the @@ -181,20 +182,20 @@ buffer, the MS-Windows build of Emacs displays a backslash @samp{\} after the coding system mnemonic near the beginning of the mode line (@pxref{Mode Line}). If no EOL translation was performed, the string @samp{(Unix)} is displayed instead of the backslash, to alert you that the -file's EOL format is not the usual carriage-return linefeed. +file's EOL format is not the usual carriage return followed by linefeed. @cindex DOS-to-Unix conversion of files To visit a file and specify whether it uses DOS-style or Unix-style end-of-line, specify a coding system (@pxref{Text Coding}). For example, @kbd{C-x @key{RET} c unix @key{RET} C-x C-f foobar.txt} visits the file @file{foobar.txt} without converting the EOLs; if some -line ends with a carriage-return linefeed pair, Emacs will display -@samp{^M} at the end of that line. Similarly, you can direct Emacs to -save a buffer in a specified EOL format with the @kbd{C-x @key{RET} f} -command. For example, to save a buffer with Unix EOL format, type -@kbd{C-x @key{RET} f unix @key{RET} C-x C-s}. If you visit a file -with DOS EOL conversion, then save it with Unix EOL format, that -effectively converts the file to Unix EOL style, like the +line ends with a carriage return followed by linefeed pair, Emacs will +display @samp{^M} at the end of that line. Similarly, you can direct +Emacs to save a buffer in a specified EOL format with the @kbd{C-x +@key{RET} f} command. For example, to save a buffer with Unix EOL +format, type @kbd{C-x @key{RET} f unix @key{RET} C-x C-s}. If you +visit a file with DOS EOL conversion, then save it with Unix EOL +format, that effectively converts the file to Unix EOL style, like the @code{dos2unix} program. @cindex untranslated file system diff --git a/doc/emacs/mule.texi b/doc/emacs/mule.texi index f9dbeffcb1..401c83dd49 100644 --- a/doc/emacs/mule.texi +++ b/doc/emacs/mule.texi @@ -690,8 +690,8 @@ system; for example, to visit a file encoded in codepage 850, type In addition to converting various representations of non-@acronym{ASCII} characters, a coding system can perform end-of-line conversion. Emacs handles three different conventions for how to separate lines in a file: -newline (Unix), carriage-return linefeed (DOS), and just -carriage-return (Mac). +newline (Unix), carriage return followed by linefeed (DOS), and just +carriage return (Mac). @table @kbd @item C-h C @var{coding} @key{RET} @@ -728,8 +728,8 @@ system, including the letter that stands for it in the mode line @code{no-conversion}, which means no conversion of any kind---specifies how and whether to convert printing characters, but leaves the choice of end-of-line conversion to be decided based on the contents of each file. -For example, if the file appears to use the sequence carriage-return -linefeed to separate lines, DOS end-of-line conversion will be used. +For example, if the file appears to use the sequence carriage return +and linefeed to separate lines, DOS end-of-line conversion will be used. Each of the listed coding systems has three variants, which specify exactly what to do for end-of-line conversion: @@ -741,15 +741,15 @@ newline to separate lines. (This is the convention normally used on Unix and GNU systems, and macOS.) @item @dots{}-dos -Assume the file uses carriage-return linefeed to separate lines, and do -the appropriate conversion. (This is the convention normally used on -Microsoft systems.@footnote{It is also specified for MIME @samp{text/*} -bodies and in other network transport contexts. It is different -from the SGML reference syntax record-start/record-end format, which -Emacs doesn't support directly.}) +Assume the file uses carriage return followed by linefeed to separate +lines, and do the appropriate conversion. (This is the convention +normally used on Microsoft systems.@footnote{It is also specified for +MIME @samp{text/*} bodies and in other network transport contexts. It +is different from the SGML reference syntax record-start/record-end +format, which Emacs doesn't support directly.}) @item @dots{}-mac -Assume the file uses carriage-return to separate lines, and do the +Assume the file uses carriage return to separate lines, and do the appropriate conversion. (This was the convention used in Classic Mac OS.) @end table @@ -859,15 +859,15 @@ the third argument says which coding system to use for these files. @vindex inhibit-eol-conversion @cindex DOS-style end-of-line display Emacs recognizes which kind of end-of-line conversion to use based on -the contents of the file: if it sees only carriage-returns, or only -carriage-return linefeed sequences, then it chooses the end-of-line -conversion accordingly. You can inhibit the automatic use of -end-of-line conversion by setting the variable @code{inhibit-eol-conversion} -to non-@code{nil}. If you do that, DOS-style files will be displayed -with the @samp{^M} characters visible in the buffer; some people -prefer this to the more subtle @samp{(DOS)} end-of-line type -indication near the left edge of the mode line (@pxref{Mode Line, -eol-mnemonic}). +the contents of the file: if it sees only carriage returns, or only +carriage return followed by linefeed sequences, then it chooses the +end-of-line conversion accordingly. You can inhibit the automatic use +of end-of-line conversion by setting the variable +@code{inhibit-eol-conversion} to non-@code{nil}. If you do that, +DOS-style files will be displayed with the @samp{^M} characters +visible in the buffer; some people prefer this to the more subtle +@samp{(DOS)} end-of-line type indication near the left edge of the +mode line (@pxref{Mode Line, eol-mnemonic}). @vindex inhibit-iso-escape-detection @cindex escape sequences in files @@ -1041,7 +1041,7 @@ buffer (@pxref{Output Coding}). (@pxref{Coding Systems, end-of-line conversion}) for encoding the current buffer. For example, @kbd{C-x @key{RET} f dos @key{RET}} will cause Emacs to save the current buffer's text with DOS-style -carriage-return linefeed line endings. +carriage return followed by linefeed line endings. @kindex C-x RET c @findex universal-coding-system-argument diff --git a/doc/emacs/screen.texi b/doc/emacs/screen.texi index 19a4a9e4b6..8f2be4b9a7 100644 --- a/doc/emacs/screen.texi +++ b/doc/emacs/screen.texi @@ -205,11 +205,11 @@ terminal output. Furthermore, if you are using an input method, string is displayed, that indicates a nontrivial end-of-line convention for encoding a file. Usually, lines of text are separated by @dfn{newline characters} in a file, but two other conventions are -sometimes used. The MS-DOS convention uses a carriage-return +sometimes used. The MS-DOS convention uses a carriage return character followed by a linefeed character; when editing such files, the colon changes to either a backslash (@samp{\}) or @samp{(DOS)}, depending on the operating system. Another convention, -employed by older Macintosh systems, uses a carriage-return +employed by older Macintosh systems, uses a carriage return character instead of a newline; when editing such files, the colon changes to either a forward slash (@samp{/}) or @samp{(Mac)}. On some systems, Emacs displays @samp{(Unix)} instead of the colon for files diff --git a/doc/lispref/nonascii.texi b/doc/lispref/nonascii.texi index 8bc7e20989..70df555d87 100644 --- a/doc/lispref/nonascii.texi +++ b/doc/lispref/nonascii.texi @@ -1074,9 +1074,9 @@ that result from encoding unsupported characters. used on various systems for representing end of line in files. The Unix convention, used on GNU and Unix systems, is to use the linefeed character (also called newline). The DOS convention, used on -MS-Windows and MS-DOS systems, is to use a carriage-return and a +MS-Windows and MS-DOS systems, is to use a carriage return and a linefeed at the end of a line. The Mac convention is to use just -carriage-return. (This was the convention used in Classic Mac OS.) +carriage return. (This was the convention used in Classic Mac OS.) @cindex base coding system @cindex variant coding system diff --git a/doc/misc/calc.texi b/doc/misc/calc.texi index be78a53ed6..0c8c2db493 100644 --- a/doc/misc/calc.texi +++ b/doc/misc/calc.texi @@ -33164,7 +33164,7 @@ This switches into the Calc buffer for the duration of the macro. For example, @samp{(calc-eval "vx5\rVR+" 'macro)} pushes the vector @samp{[1,2,3,4,5]} on the stack and then replaces it with the sum of those numbers. Note that @samp{\r} is the Lisp -notation for the carriage-return, @key{RET}, character. +notation for the carriage return, @key{RET}, character. If your keyboard macro wishes to pop the stack, @samp{\C-d} is safer than @samp{\177} (the @key{DEL} character) because some commit 2616cd94f13edaf6db9ef600d9a79fa1be4807c5 Author: Eli Zaretskii Date: Thu Mar 15 08:36:09 2018 +0200 Minor copyedits in mule.texi * doc/emacs/mule.texi (Recognize Coding, Fontsets): Minor changes in wording. Suggested by Richard Stallman in emacs-manual-bugs@gnu.org. diff --git a/doc/emacs/mule.texi b/doc/emacs/mule.texi index 5ddfb7defd..f9dbeffcb1 100644 --- a/doc/emacs/mule.texi +++ b/doc/emacs/mule.texi @@ -871,7 +871,7 @@ eol-mnemonic}). @vindex inhibit-iso-escape-detection @cindex escape sequences in files - By default, the automatic detection of coding system is sensitive to + By default, the automatic detection of the coding system is sensitive to escape sequences. If Emacs sees a sequence of characters that begin with an escape character, and the sequence is valid as an ISO-2022 code, that tells Emacs to use one of the ISO-2022 encodings to decode @@ -1344,9 +1344,8 @@ 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. However, it does not specify font family names, so results can be -somewhat random if you use it directly. You can specify use of a -particular fontset by starting Emacs with the @samp{-fn} option. -For example, +somewhat random if you use it directly. You can specify a particular +fontset by starting Emacs with the @samp{-fn} option. For example, @example emacs -fn fontset-standard commit 5d968dbf6bb85f73b806d196b05db3406ce808be Author: Glenn Morris Date: Wed Mar 14 14:30:39 2018 -0400 More hydra.nixos.org logging for unfinished tests * lisp/emacs-lisp/ert.el (ert-summarize-tests-batch-and-exit): Dump contents of any unfinished log files on hydra.nixos.org. diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el index 7d8d0a50e4..3beb8a070f 100644 --- a/lisp/emacs-lisp/ert.el +++ b/lisp/emacs-lisp/ert.el @@ -1548,7 +1548,14 @@ Ran \\([0-9]+\\) tests, \\([0-9]+\\) results as expected\ (mapc (lambda (l) (message " %s" l)) notests)) (when badtests (message "%d files did not finish:" (length badtests)) - (mapc (lambda (l) (message " %s" l)) badtests)) + (mapc (lambda (l) (message " %s" l)) badtests) + (if (getenv "EMACS_HYDRA_CI") + (with-temp-buffer + (dolist (f badtests) + (erase-buffer) + (insert-file-contents f) + (message "Contents of unfinished file %s:" f) + (message "-----\n%s\n-----" (buffer-string)))))) (when unexpected (message "%d files contained unexpected results:" (length unexpected)) (mapc (lambda (l) (message " %s" l)) unexpected)) commit 36a1d52814562bb589f03226c31ca823f0518fd2 Author: Eli Zaretskii Date: Wed Mar 14 20:11:16 2018 +0200 Fix problems caused by fontconfig-2.13.0 * src/xterm.c (x_term_init): Call fixup_locale after xg_initialize, to countermand the call to setlocale in some versions of fontconfig. (Bug#30788) diff --git a/src/xterm.c b/src/xterm.c index c5163aa990..7b445e5f46 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -12411,12 +12411,16 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name) unrequest_sigio (); /* See comment in x_display_ok. */ gtk_init (&argc, &argv2); request_sigio (); - fixup_locale (); g_log_remove_handler ("GLib", id); xg_initialize (); + /* Do this after the call to xg_initialize, because when + Fontconfig is used, xg_initialize calls its initialization + function which in some versions of Fontconfig calls setlocale. */ + fixup_locale (); + dpy = DEFAULT_GDK_DISPLAY (); #if ! GTK_CHECK_VERSION (2, 90, 0) commit 5bebacc476259f854d3735a6dc5a639016f1673a Author: Stefan Monnier Date: Wed Mar 14 12:14:01 2018 -0400 * lisp/desktop.el: Make use some "new" functionality (desktop-files-not-to-save, desktop-clear): Use \` and \' when we don't intend to match newlines. (desktop-minor-mode-table): Remove auto-fill-function entry. (desktop-buffer-info): Use :minor-mode-function instead. (desktop--v2s): Use a closure rather than a backquoted lambda. (desktop-save): Set 'lexical-binding' in the saved file. Use 'utf-8-emacs' encoding rather than the old 'emacs-mule'. (desktop-read): Use 'default-value' to get the global part of a hook. diff --git a/lisp/desktop.el b/lisp/desktop.el index 0a1a4d5f23..55ec71c1b9 100644 --- a/lisp/desktop.el +++ b/lisp/desktop.el @@ -387,7 +387,7 @@ or `desktop-modes-not-to-save'." ;; Skip tramp and ange-ftp files (defcustom desktop-files-not-to-save - "\\(^/[^/:]*:\\|(ftp)$\\)" + "\\(\\`/[^/:]*:\\|(ftp)\\'\\)" "Regexp identifying files whose buffers are to be excluded from saving. The default value excludes buffers visiting remote files." :type '(choice (const :tag "None" nil) @@ -534,8 +534,7 @@ can guess how to load the mode's definition.") (put 'desktop-buffer-mode-handlers 'risky-local-variable t) (defcustom desktop-minor-mode-table - '((auto-fill-function auto-fill-mode) - (defining-kbd-macro nil) + '((defining-kbd-macro nil) (isearch-mode nil) (vc-mode nil) (vc-dired-mode nil) @@ -702,12 +701,12 @@ if different)." (if (symbolp var) (set-default var nil) (set-default var (eval (cdr var))))) - (let ((preserve-regexp (concat "^\\(" + (let ((preserve-regexp (concat "\\`\\(" (mapconcat (lambda (regexp) (concat "\\(" regexp "\\)")) desktop-clear-preserve-buffers "\\|") - "\\)$"))) + "\\)\\'"))) (dolist (buffer (buffer-list)) (let ((bufname (buffer-name buffer))) (unless (or (eq (aref bufname 0) ?\s) ;; Don't kill internal buffers @@ -735,7 +734,7 @@ if different)." ;; ---------------------------------------------------------------------------- (unless noninteractive - (add-hook 'kill-emacs-hook 'desktop-kill)) + (add-hook 'kill-emacs-hook #'desktop-kill)) (defun desktop-kill () "If `desktop-save-mode' is non-nil, do what `desktop-save' says to do. @@ -804,6 +803,7 @@ buffer, which is (in order): (symbol-value minor-mode) (let* ((special (assq minor-mode desktop-minor-mode-table)) (value (cond (special (cadr special)) + ((get minor-mode :minor-mode-function)) ((functionp minor-mode) minor-mode)))) (when value (cl-pushnew value ret)))))) ;; point and mark, and read-only status @@ -889,8 +889,8 @@ QUOTE may be `may' (value may be quoted), (cons nil `(let ((mk (make-marker))) (add-hook 'desktop-delay-hook - `(lambda () - (set-marker ,mk ,,pos (get-buffer ,,buf)))) + (lambda () + (set-marker mk ,pos (get-buffer ,buf)))) mk)))) (t ; Save as text. (cons 'may "Unprintable entity")))) @@ -1074,7 +1074,7 @@ without further confirmation." (with-temp-buffer (insert - ";; -*- mode: emacs-lisp; coding: emacs-mule; -*-\n" + ";; -*- mode: emacs-lisp; lexical-binding:t; coding: utf-8-emacs; -*-\n" desktop-header ";; Created " (current-time-string) "\n" ";; Desktop file format version " (format "%d" desktop-io-file-version) "\n" @@ -1087,7 +1087,7 @@ without further confirmation." (desktop-save-frameset) (unless (memq 'desktop-saved-frameset desktop-globals-to-save) (desktop-outvar 'desktop-saved-frameset)) - (mapc (function desktop-outvar) desktop-globals-to-save) + (mapc #'desktop-outvar desktop-globals-to-save) (setq desktop-saved-frameset nil) ; after saving desktop-globals-to-save (when (memq 'kill-ring desktop-globals-to-save) (insert @@ -1096,9 +1096,9 @@ without further confirmation." " kill-ring))\n")) (insert "\n;; Buffer section -- buffers listed in same order as in buffer list:\n") - (dolist (l (mapcar 'desktop-buffer-info (buffer-list))) + (dolist (l (mapcar #'desktop-buffer-info (buffer-list))) (let ((base (pop l))) - (when (apply 'desktop-save-buffer-p l) + (when (apply #'desktop-save-buffer-p l) (insert "(" (if (or (not (integerp eager)) (if (zerop eager) @@ -1129,9 +1129,9 @@ without further confirmation." ;; This is saved after the timestamp (search-forward (format "%S" desktop--app-id) nil t)) (point)))) - (checksum (and beg (md5 (current-buffer) beg (point-max) 'emacs-mule)))) + (checksum (and beg (md5 (current-buffer) beg (point-max) 'utf-8-emacs)))) (unless (and checksum (equal checksum desktop-file-checksum)) - (let ((coding-system-for-write 'emacs-mule)) + (let ((coding-system-for-write 'utf-8-emacs)) (write-region (point-min) (point-max) (desktop-full-file-name) nil 'nomessage)) (setq desktop-file-checksum checksum) ;; We remember when it was modified (which is presumably just now). @@ -1230,12 +1230,12 @@ Using it may cause conflicts. Use it anyway? " owner))))) ;; disabled when loading the desktop fails with errors, ;; thus not overwriting the desktop with broken contents. (setq desktop-autosave-was-enabled - (memq 'desktop-auto-save-set-timer - ;; Use the toplevel value of the hook, in case some + (memq #'desktop-auto-save-set-timer + ;; Use the global value of the hook, in case some ;; feature makes window-configuration-change-hook ;; buffer-local, and puts there stuff which ;; doesn't include our timer. - (default-toplevel-value + (default-value 'window-configuration-change-hook))) (desktop-auto-save-disable) ;; Evaluate desktop buffer and remember when it was modified. @@ -1254,7 +1254,7 @@ Using it may cause conflicts. Use it anyway? " owner))))) ;; We want buffers existing prior to evaluating the desktop (and ;; not reused) to be placed at the end of the buffer list, so we ;; move them here. - (mapc 'bury-buffer + (mapc #'bury-buffer (nreverse (cdr (memq desktop-first-buffer (nreverse (buffer-list)))))) (switch-to-buffer (car (buffer-list)))) (run-hooks 'desktop-delay-hook) @@ -1328,10 +1328,10 @@ directory DIRNAME." (defun desktop-auto-save-enable (&optional timeout) (when (and (integerp (or timeout desktop-auto-save-timeout)) (> (or timeout desktop-auto-save-timeout) 0)) - (add-hook 'window-configuration-change-hook 'desktop-auto-save-set-timer))) + (add-hook 'window-configuration-change-hook #'desktop-auto-save-set-timer))) (defun desktop-auto-save-disable () - (remove-hook 'window-configuration-change-hook 'desktop-auto-save-set-timer) + (remove-hook 'window-configuration-change-hook #'desktop-auto-save-set-timer) (desktop-auto-save-cancel-timer)) (defun desktop-auto-save () @@ -1586,7 +1586,7 @@ ARGS must be an argument list for `desktop-create-buffer'." (let ((desktop-first-buffer nil) (desktop-buffer-ok-count 0) (desktop-buffer-fail-count 0)) - (apply 'desktop-create-buffer args) + (apply #'desktop-create-buffer args) (run-hooks 'desktop-delay-hook) (setq desktop-delay-hook nil) (bury-buffer (get-buffer buffer-name)) commit d993d00394707e69b6ac7befeb72140d9b12a4e9 Author: Michael Albinus Date: Wed Mar 14 16:45:45 2018 +0100 ; * test/README: Fix typo diff --git a/test/README b/test/README index 11a25fb524..17135a0274 100644 --- a/test/README +++ b/test/README @@ -50,7 +50,7 @@ nicer backtraces. To run the compiled version of a test use make TEST_LOAD_EL=no ... -Sometimes, it is ncessary to trace the duration time for single tests. +Sometimes, it is necessary to trace the duration time for single tests. This is controlled by the environment variable TEST_PRINT_TEST_DURATION make TEST_PRINT_TEST_DURATION=1 ... commit 84a946a5199d84163ee221994216360502fc85ee Author: Michael Albinus Date: Wed Mar 14 16:21:06 2018 +0100 Extend ert to print duration of single tests * lisp/emacs-lisp/ert.el (ert-test-result): New slot ´duration'. (ert-run-or-rerun-test): Set it. (ert-batch-print-duration): New defvar. (ert-run-tests-batch): Print duration if needed. * test/Makefile.in (TEST_PRINT_TEST_DURATION): New variable. * test/README: Explain TEST_PRINT_TEST_DURATION. diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el index a47108545d..7d8d0a50e4 100644 --- a/lisp/emacs-lisp/ert.el +++ b/lisp/emacs-lisp/ert.el @@ -676,6 +676,7 @@ and is displayed in front of the value of MESSAGE-FORM." (cl-defstruct ert-test-result (messages nil) (should-forms nil) + (duration 0) ) (cl-defstruct (ert-test-passed (:include ert-test-result))) (cl-defstruct (ert-test-result-with-condition (:include ert-test-result)) @@ -1230,6 +1231,11 @@ SELECTOR is the selector that was used to select TESTS." (ert-run-test test) (setf (aref (ert--stats-test-end-times stats) pos) (current-time)) (let ((result (ert-test-most-recent-result test))) + (setf (ert-test-result-duration result) + (float-time + (time-subtract + (aref (ert--stats-test-end-times stats) pos) + (aref (ert--stats-test-start-times stats) pos)))) (ert--stats-set-test-and-result stats pos test result) (funcall listener 'test-ended stats test result)) (setf (ert--stats-current-test stats) nil)))) @@ -1336,6 +1342,9 @@ RESULT must be an `ert-test-result-with-condition'." (defvar ert-quiet nil "Non-nil makes ERT only print important information in batch mode.") +(defvar ert-batch-print-duration nil + "Non-nil makes ERT print duration time of single tests in batch mode.") + ;;;###autoload (defun ert-run-tests-batch (&optional selector) "Run the tests specified by SELECTOR, printing results to the terminal. @@ -1446,13 +1455,17 @@ Returns the stats object." (let* ((max (prin1-to-string (length (ert--stats-tests stats)))) (format-string (concat "%9s %" (prin1-to-string (length max)) - "s/" max " %S"))) + "s/" max " %S" + (if ert-batch-print-duration + " (%f sec)")))) (message format-string (ert-string-for-test-result result (ert-test-result-expected-p test result)) (1+ (ert--stats-test-pos stats test)) - (ert-test-name test)))))))) + (ert-test-name test) + (if ert-batch-print-duration + (ert-test-result-duration result))))))))) nil)) ;;;###autoload diff --git a/test/Makefile.in b/test/Makefile.in index 42d9880e66..0b6f8c2eec 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -99,14 +99,20 @@ TEST_LOCALE = C # If you just want a pass/fail, setting this to no is much faster. TEST_LOAD_EL ?= yes +# Additional settings for ert. +ert_opts = + # Maximum length of lines in ert backtraces; nil for no limit. # (if empty, use the default ert-batch-backtrace-right-margin). TEST_BACKTRACE_LINE_LENGTH = -ifeq (${TEST_BACKTRACE_LINE_LENGTH},) -ert_opts = -else -ert_opts = --eval '(setq ert-batch-backtrace-right-margin ${TEST_BACKTRACE_LINE_LENGTH})' +ifneq (${TEST_BACKTRACE_LINE_LENGTH},) +ert_opts += --eval '(setq ert-batch-backtrace-right-margin ${TEST_BACKTRACE_LINE_LENGTH})' +endif + +# Whether the tests shall also report their duration. +ifdef TEST_PRINT_TEST_DURATION +ert_opts += --eval '(setq ert-batch-print-duration t)' endif ifeq (@HAVE_MODULES@, yes) diff --git a/test/README b/test/README index 1cd9db3bb8..11a25fb524 100644 --- a/test/README +++ b/test/README @@ -50,6 +50,11 @@ nicer backtraces. To run the compiled version of a test use make TEST_LOAD_EL=no ... +Sometimes, it is ncessary to trace the duration time for single tests. +This is controlled by the environment variable TEST_PRINT_TEST_DURATION + + make TEST_PRINT_TEST_DURATION=1 ... + (Also, see etc/compilation.txt for compilation mode font lock tests.) commit 4c33ad4a244db59bfe128aa54380904efdc775ba Author: Noam Postavsky Date: Sun Mar 11 20:47:12 2018 -0400 Fix line-wrapping for term.el (Bug#30775) * lisp/term.el (term-emulate-terminal): Leave line-wrapping state if point was moved after we entered it. * test/lisp/term-tests.el (term-line-wrapping-then-motion): New test. diff --git a/lisp/term.el b/lisp/term.el index 93da33ea5b..91eab771cf 100644 --- a/lisp/term.el +++ b/lisp/term.el @@ -2891,9 +2891,11 @@ See `term-prompt-regexp'." ;; If the last char was written in last column, ;; back up one column, but remember we did so. ;; Thus we emulate xterm/vt100-style line-wrapping. - (cond ((eq (term-current-column) term-width) - (term-move-columns -1) - (setq term-do-line-wrapping t))) + (when (eq (term-current-column) term-width) + (term-move-columns -1) + ;; We check after ctrl sequence handling if point + ;; was moved (and leave line-wrapping state if so). + (setq term-do-line-wrapping (point))) (setq term-current-column nil) (setq i funny)) (pcase-exhaustive (and (<= ctl-end str-length) (aref str i)) @@ -2993,6 +2995,9 @@ See `term-prompt-regexp'." (substring str i ctl-end))))) ;; Ignore NUL, Shift Out, Shift In. ((or ?\0 #xE #xF 'nil) nil)) + ;; Leave line-wrapping state if point was moved. + (unless (eq term-do-line-wrapping (point)) + (setq term-do-line-wrapping nil)) (if (term-handling-pager) (progn ;; Finish stuff to get ready to handle PAGER. diff --git a/test/lisp/term-tests.el b/test/lisp/term-tests.el index 234dfa1f0d..8aaa61a210 100644 --- a/test/lisp/term-tests.el +++ b/test/lisp/term-tests.el @@ -124,6 +124,18 @@ line6\r 40 12 (list "\eAnSiTc /f" "oo/\n") 'default-directory) "/foo/")))) +(ert-deftest term-line-wrapping-then-motion () + "Make sure we reset the line-wrapping state after moving cursor. +A real-life example is the default zsh prompt which writes spaces +to the end of line (triggering line-wrapping state), and then +sends a carriage return followed by another space to overwrite +the first character of the line." + (let* ((width 10) + (strs (list "x" (make-string (1- width) ?_) + "\r_"))) + (should (equal (term-test-screen-from-input width 12 strs) + (make-string width ?_))))) + (provide 'term-tests) ;;; term-tests.el ends here commit e0f18aa07fb900c1bb0fe25386336fd6a73c9b0d Merge: ae80854e9a 675edecf61 Author: Glenn Morris Date: Tue Mar 13 18:13:26 2018 -0700 Merge from origin/emacs-26 675edec (origin/emacs-26) Fix some allout.el aliases b2c069a * lisp/progmodes/ada-mode.el (ada-clean-buffer-before-saving)... 2f5420c Doc fixes re obsolete items 9edf82a Replace an obsolete alias in tpu-mapper a643792 Doc fixes re obsolete items 3060fb8 Minor changes in mule.texi 3e39897 Avoid assertion violation under visual-order-cursor-movement e4b73ab Stop mentioning options.el in doc 05669f0 ; * lisp/minibuffer.el (completion-cycle-threshold): Fix last... 758597f * lisp/vc/vc-dir.el (vc-dir-unmark): Fix documentation. 62f0a2b * lisp/minibuffer.el (completion-cycle-threshold): Doc fix. 761845c Fix last change in Xref documentation 5186675 More changes in the Emacs manual b1aaa72 Improve documentation of Xref Conflicts: lisp/w32-fns.el commit ae80854e9a9f8f6733870b5b5a88467867dceb6c Author: Glenn Morris Date: Tue Mar 13 18:45:38 2018 -0400 Try to stop tramp test hangs on hydra * test/lisp/net/tramp-tests.el (tramp-test41-asynchronous-requests): Use fewer processes on hydra. diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index 422e71df7c..3fd8f69443 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el @@ -4719,6 +4719,8 @@ process sentinels. They shall not disturb each other." ;; This test could be blocked on hydra. So we set a timeout of 300 ;; seconds, and we send a SIGUSR1 signal after 300 seconds. + ;; This clearly doesn't work though, because the test not + ;; infrequently hangs for hours until killed by the infrastructure. (with-timeout (300 (tramp--test-timeout-handler)) (define-key special-event-map [sigusr1] 'tramp--test-timeout-handler) (tramp--test-instrument-test-case (if (getenv "EMACS_HYDRA_CI") 10 0) @@ -4743,6 +4745,7 @@ process sentinels. They shall not disturb each other." (or (ignore-errors (string-to-number (getenv "REMOTE_PARALLEL_PROCESSES"))) + (if (getenv "EMACS_HYDRA_CI") 5) 10)) ;; On hydra, timings are bad. (timer-repeat commit 675edecf6102a20b3482544315c654fde4b6236e Author: Glenn Morris Date: Tue Mar 13 14:48:37 2018 -0400 Fix some allout.el aliases * lisp/allout.el (allout-passphrase-verifier-string) (allout-passphrase-hint-string): Fix alias. diff --git a/lisp/allout.el b/lisp/allout.el index 77aa906ee6..33317e89de 100644 --- a/lisp/allout.el +++ b/lisp/allout.el @@ -1522,7 +1522,7 @@ the Emacs buffer state, if file variable adjustments are enabled. See `allout-enable-file-variable-adjustment' for details about that.") (make-variable-buffer-local 'allout-passphrase-verifier-string) (make-obsolete-variable 'allout-passphrase-verifier-string - 'allout-passphrase-verifier-string "23.3") + "it is no longer used." "23.3") ;;;###autoload (put 'allout-passphrase-verifier-string 'safe-local-variable 'stringp) ;;;_ = allout-passphrase-hint-string @@ -1538,7 +1538,7 @@ state, if file variable adjustments are enabled. See (make-variable-buffer-local 'allout-passphrase-hint-string) (setq-default allout-passphrase-hint-string "") (make-obsolete-variable 'allout-passphrase-hint-string - 'allout-passphrase-hint-string "23.3") + "it is no longer used." "23.3") ;;;###autoload (put 'allout-passphrase-hint-string 'safe-local-variable 'stringp) ;;;_ = allout-after-save-decrypt commit b2c069a20f91517592dd3dbff1403c9c7b5de594 Author: Glenn Morris Date: Tue Mar 13 14:48:02 2018 -0400 * lisp/progmodes/ada-mode.el (ada-clean-buffer-before-saving): Doc fix. diff --git a/lisp/progmodes/ada-mode.el b/lisp/progmodes/ada-mode.el index 2d3f6e22a6..76c9be93d0 100644 --- a/lisp/progmodes/ada-mode.el +++ b/lisp/progmodes/ada-mode.el @@ -231,7 +231,7 @@ It may be `downcase-word', `upcase-word', `ada-loose-case-word' or "Non-nil means remove trailing spaces and untabify the buffer before saving." :type 'boolean :group 'ada) (make-obsolete-variable 'ada-clean-buffer-before-saving - "use the `write-file-functions' hook." + "it has no effect - use `write-file-functions' hook." "23.2") commit 2f5420c90ab4a9e16ba119d6abc4a4324294c284 Author: Glenn Morris Date: Tue Mar 13 14:47:41 2018 -0400 Doc fixes re obsolete items * doc/emacs/mini.texi (Completion Commands): Small update re mouse. * doc/misc/htmlfontify.texi (Customization): Replace obsolete alias. diff --git a/doc/emacs/mini.texi b/doc/emacs/mini.texi index 579697f47b..b4ebb7d241 100644 --- a/doc/emacs/mini.texi +++ b/doc/emacs/mini.texi @@ -344,12 +344,6 @@ window. You can display the same list with @kbd{?} used with the completion list: @table @kbd -@findex mouse-choose-completion -@item mouse-1 -@itemx mouse-2 -Clicking mouse button 1 or 2 on a completion alternative chooses it -(@code{mouse-choose-completion}). - @findex switch-to-completions @item M-v @itemx @key{PageUp} @@ -362,6 +356,8 @@ the same. You can also select the window in other ways @findex choose-completion @item @key{RET} +@itemx mouse-1 +@itemx mouse-2 While in the completion list buffer, this chooses the completion at point (@code{choose-completion}). diff --git a/doc/misc/htmlfontify.texi b/doc/misc/htmlfontify.texi index 6bc57daf62..c4cf7dac0a 100644 --- a/doc/misc/htmlfontify.texi +++ b/doc/misc/htmlfontify.texi @@ -1379,9 +1379,9 @@ For example, I customize this to: ((t :background "black" :foreground "white" :family "misc-fixed")) @end lisp -@item hfy-init-kludge-hooks -@vindex hfy-init-kludge-hooks -@anchor{hfy-init-kludge-hooks} +@item hfy-init-kludge-hook +@vindex hfy-init-kludge-hook +@anchor{hfy-init-kludge-hook} List of functions to call when starting htmlfontify-buffer to do any kludging necessary to get highlighting modes to behave as you want, even commit 06911714ef66ea81380b1eda75a9f7cfbc9e0b65 Author: Eli Zaretskii Date: Tue Mar 13 20:00:54 2018 +0200 * src/xdisp.c (Fwindow_text_pixel_size): Fix last change. diff --git a/src/xdisp.c b/src/xdisp.c index 44eb1ebf05..693e273eb0 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -10143,14 +10143,12 @@ include the height of both, if present, in the return value. */) directionality, and regions that begin and end in text of the same directionality. */ it.bidi_p = false; - void *it2data = NULL; - struct it it2; - SAVE_IT (it2, it, it2data); int move_op = MOVE_TO_POS | MOVE_TO_Y; int to_x = -1; if (!NILP (x_limit)) { + it.last_visible_x = max_x; /* Actually, we never want move_it_to stop at to_x. But to make sure that move_it_in_display_line_to always moves far enough, we set to_x to INT_MAX and specify MOVE_TO_X. */ @@ -10158,6 +10156,10 @@ include the height of both, if present, in the return value. */) to_x = INT_MAX; } + void *it2data = NULL; + struct it it2; + SAVE_IT (it2, it, it2data); + x = move_it_to (&it, end, to_x, max_y, -1, move_op); /* We could have a display property at END, in which case asking commit 9edf82a6d6f2c8f510f5bf99eef7f2ae5397208d Author: Glenn Morris Date: Tue Mar 13 13:49:53 2018 -0400 Replace an obsolete alias in tpu-mapper * lisp/obsolete/tpu-mapper.el (tpu-map-key, tpu-mapper): Replace obsolete alias. diff --git a/lisp/obsolete/tpu-mapper.el b/lisp/obsolete/tpu-mapper.el index 6a5a83c888..4cc2404e4e 100644 --- a/lisp/obsolete/tpu-mapper.el +++ b/lisp/obsolete/tpu-mapper.el @@ -56,7 +56,7 @@ (set-buffer "Keys") (insert (format"(global-set-key %s %s)\n" tpu-key func)) (set-buffer "Gold-Keys") - (insert (format "(define-key GOLD-map %s %s)\n" tpu-key gold-func)))) + (insert (format "(define-key tpu-gold-map %s %s)\n" tpu-key gold-func)))) (message "Press %s%s: " ident descrip) (setq tpu-key-seq (read-event) tpu-key (format "[%s]" tpu-key-seq)) @@ -203,7 +203,7 @@ your local X guru can try to figure out why the key is being ignored." ") (set-buffer "Directions") - (tpu-map-key "PF1" " - The GOLD key" "GOLD-map" "'keyboard-quit") + (tpu-map-key "PF1" " - The GOLD key" "tpu-gold-map" "'keyboard-quit") (tpu-map-key "PF2" " - The Keypad Help key" "'tpu-help" "'help-for-help") (tpu-map-key "PF3" " - The Find/Find-Next key" "'tpu-search-again" "'tpu-search") (tpu-map-key "PF4" " - The Del/Undelete Line key" "'tpu-delete-current-line" "'tpu-undelete-lines") commit a6437924f796c07ec15a13c7d1885e83d1b0b0cc Author: Glenn Morris Date: Tue Mar 13 13:49:05 2018 -0400 Doc fixes re obsolete items * doc/emacs/maintaining.texi (VC Undo): * doc/misc/efaq-w32.texi (Font names): Replace obsolete aliases. * doc/misc/url.texi (Customization): Don't mention url-temporary-directory, it essentially does nothing. * lisp/hilit-chg.el (highlight-changes-global-changes-existing-buffers): Doc fix. ; * lisp/w32-fns.el: Comment. ; * etc/TODO: Remove obsolete ffap mention. diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi index 619f80a315..cda482877a 100644 --- a/doc/emacs/maintaining.texi +++ b/doc/emacs/maintaining.texi @@ -1078,7 +1078,7 @@ Revert the work file(s) in the current VC fileset to the last revision @findex vc-revert @vindex vc-revert-show-diff If you want to discard all the changes you have made to the current -VC fileset, type @kbd{C-x v u} (@code{vc-revert-buffer}). This shows +VC fileset, type @kbd{C-x v u} (@code{vc-revert}). This shows you a diff between the work file(s) and the revision from which you started editing, and asks for confirmation for discarding the changes. If you agree, the fileset is reverted. If you don't want @kbd{C-x v diff --git a/doc/misc/efaq-w32.texi b/doc/misc/efaq-w32.texi index 8cdf870ad6..a4e82e2d92 100644 --- a/doc/misc/efaq-w32.texi +++ b/doc/misc/efaq-w32.texi @@ -906,7 +906,7 @@ The doc string contains a list of the system sounds you can use. @cindex font XLFD name format @cindex fontconfig font names in Emacs 23 @cindex font dialog, using to find font names -@findex w32-select-font +@findex x-select-font @findex x-list-fonts Fonts in Emacs 22 and earlier are named using the X Logical Font @@ -937,7 +937,7 @@ Fontconfig: Courier New-13 To find the XFLD name for a font, you can execute the following in the @file{*scratch*} buffer by pressing C-j at the end of the line: @example -(w32-select-font nil t) +(x-select-font nil t) @end example To see a complete list of fonts, execute the following in the diff --git a/doc/misc/url.texi b/doc/misc/url.texi index ed39aab2a3..1acf5f2319 100644 --- a/doc/misc/url.texi +++ b/doc/misc/url.texi @@ -1263,19 +1263,6 @@ You can use this function to do completion of URLs from the history. @node Customization @chapter Customization -@cindex environment variables - The following environment variables affect the @code{url} library's -operation at startup. - -@table @code -@item TMPDIR -@vindex TMPDIR -@vindex url-temporary-directory -If this is defined, @code{url-temporary-directory} is initialized from -it. This variable was obsoleted in 23.1, please use -@code{temporary-file-directory} instead. -@end table - The following user options affect the general operation of @code{url} library. diff --git a/etc/TODO b/etc/TODO index a6ab8787f7..de579746ac 100644 --- a/etc/TODO +++ b/etc/TODO @@ -216,7 +216,6 @@ Change them to use report-emacs-bug. **** lm-report-bug **** tramp-bug **** c-submit-bug-report -**** ffap-bug and ffap-submit-bug (obsoleted) [Do all of them need changing?] ** Allow fringe indicators to display a tooltip (provide a help-echo property?) diff --git a/lisp/hilit-chg.el b/lisp/hilit-chg.el index de1ae0d457..b8c1fc5a99 100644 --- a/lisp/hilit-chg.el +++ b/lisp/hilit-chg.el @@ -300,9 +300,9 @@ modes only." (defcustom highlight-changes-global-changes-existing-buffers nil "If non-nil, toggling global Highlight Changes mode affects existing buffers. -Normally, `global-highlight-changes' affects only new buffers (to be +Normally, `global-highlight-changes-mode' affects only new buffers (to be created). However, if `highlight-changes-global-changes-existing-buffers' -is non-nil, then turning on `global-highlight-changes' will turn on +is non-nil, then turning on `global-highlight-changes-mode' will turn on Highlight Changes mode in suitable buffers, and turning the mode off will remove it from existing buffers." :type 'boolean diff --git a/lisp/w32-fns.el b/lisp/w32-fns.el index b35e6869d2..9b9d3ce9ad 100644 --- a/lisp/w32-fns.el +++ b/lisp/w32-fns.el @@ -260,7 +260,7 @@ bit output with no translation." (cons xlfd-charset (cons windows-charset codepage)))) ;; The last charset we add becomes the "preferred" charset for the return -;; value from w32-select-font etc, so list the most important charsets last. +;; value from x-select-font etc, so list the most important charsets last. (w32-add-charset-info "iso8859-14" 'w32-charset-ansi 28604) (w32-add-charset-info "iso8859-15" 'w32-charset-ansi 28605) ;; The following two are included for pattern matching. commit 3060fb8f8118aa88ed13721fc042f22492b9d637 Author: Eli Zaretskii Date: Tue Mar 13 19:40:24 2018 +0200 Minor changes in mule.texi * doc/emacs/mule.texi (International, Coding Systems) (Bidirectional Editing): Minor wording changes and typo fixes. Suggested by Michael Albinus in emacs-manual-bugs@gnu.org. diff --git a/doc/emacs/mule.texi b/doc/emacs/mule.texi index dc80bc9217..5ddfb7defd 100644 --- a/doc/emacs/mule.texi +++ b/doc/emacs/mule.texi @@ -51,7 +51,7 @@ others. @item You can insert non-@acronym{ASCII} characters or search for them. To do that, you can specify an input method (@pxref{Select Input Method}) suitable -for your language, or use the default input method set up when you chose +for your language, or use the default input method set up when you choose your language environment. If your keyboard can produce non-@acronym{ASCII} characters, you can select an appropriate keyboard coding system (@pxref{Terminal Coding}), and Emacs @@ -698,7 +698,7 @@ carriage-return (Mac). Describe coding system @var{coding} (@code{describe-coding-system}). @item C-h C @key{RET} -Describe the coding systems currently in use. +Describe the coding systems currently in use (@code{describe-coding-system}). @item M-x list-coding-systems Display a list of all the supported coding systems. @@ -936,7 +936,7 @@ or a local variables list at the end (@pxref{File Variables}). You do this by defining a value for the ``variable'' named @code{coding}. Emacs does not really have a variable @code{coding}; instead of setting a variable, this uses the specified coding system for the -file. For example, @samp{-*-mode: C; coding: latin-1;-*-} specifies +file. For example, @w{@samp{-*-mode: C; coding: latin-1; -*-}} specifies use of the Latin-1 coding system, as well as C mode. When you specify the coding explicitly in the file, that overrides @code{file-coding-system-alist}. @@ -1207,13 +1207,13 @@ using the internal Emacs representation. @cindex file-name encoding, MS-Windows @vindex w32-unicode-filenames When Emacs runs on MS-Windows versions that are descendants of the -NT family (Windows 2000, XP, Vista, Windows 7, and all the later -versions), the value of @code{file-name-coding-system} is largely -ignored, as Emacs by default uses APIs that allow passing Unicode file -names directly. By contrast, on Windows 9X, file names are encoded -using @code{file-name-coding-system}, which should be set to the -codepage (@pxref{Coding Systems, codepage}) pertinent for the current -system locale. The value of the variable @code{w32-unicode-filenames} +NT family (Windows 2000, XP, and all the later versions), the value of +@code{file-name-coding-system} is largely ignored, as Emacs by default +uses APIs that allow passing Unicode file names directly. By +contrast, on Windows 9X, file names are encoded using +@code{file-name-coding-system}, which should be set to the codepage +(@pxref{Coding Systems, codepage}) pertinent for the current system +locale. The value of the variable @code{w32-unicode-filenames} controls whether Emacs uses the Unicode APIs when it calls OS functions that accept file names. This variable is set by the startup code to @code{nil} on Windows 9X, and to @code{t} on newer versions of @@ -1779,8 +1779,9 @@ of the first character you read precedes that of the next character. Reordering of bidirectional text into the @dfn{visual} order happens at display time. As a result, character positions no longer increase monotonically with their positions on display. Emacs implements the -Unicode Bidirectional Algorithm (UBA) described in the Unicode -Standard Annex #9, for reordering of bidirectional text for display. +Unicode Bidirectional Algorithm (UBA) described in the +@uref{http://unicode.org/reports/tr9/, Unicode Standard Annex #9}, for +reordering of bidirectional text for display. It deviates from the UBA only in how continuation lines are displayed when text direction is opposite to the base paragraph direction, e.g., when a long line of English text appears in a right-to-left commit 3e39897cd03a10b5d1ac75a89f999943e3dad5c0 Author: Eli Zaretskii Date: Tue Mar 13 18:00:23 2018 +0200 Avoid assertion violation under visual-order-cursor-movement * src/xdisp.c (Fmove_point_visually): Don't let point exceed the BEGV..ZV range. Signal Beginning of buffer error when there's a before-string at BEGV. (Bug#30787) diff --git a/src/xdisp.c b/src/xdisp.c index b003a2f9cc..fb6729c36a 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -22430,6 +22430,11 @@ Value is the new character position of point. */) new_pos += (row->reversed_p ? -dir : dir); else new_pos -= (row->reversed_p ? -dir : dir); + new_pos = clip_to_bounds (BEGV, new_pos, ZV); + /* If we didn't move, we've hit BEGV or ZV, so we + need to signal a suitable error. */ + if (new_pos == PT) + break; } else if (BUFFERP (g->object)) new_pos = g->charpos; commit 9f8e7712d98f49dfdd6975f781bc392b50394120 Author: Glenn Morris Date: Mon Mar 12 23:42:17 2018 -0700 * lisp/subr.el (focus-frame, unfocus-frame): Remove obsolete no-ops. * lisp/vc/ediff-util.el (ediff-recenter): Don't try focus-frame on Emacs. ; * etc/NEWS: Mention this. ; Comments in subr.el mention VM as a user, however this is untrue since ; 2010-07. Ref https://bazaar.launchpad.net/~vm/vm/trunk/revision/840 ; and 853. diff --git a/etc/NEWS b/etc/NEWS index 1264cc64ea..b6c4157384 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -333,8 +333,8 @@ desktop-basefilename, desktop-buffer-handlers, desktop-buffer-misc-functions, desktop-buffer-modes-to-save, desktop-enable, desktop-load-default, dired-omit-files-p, disabled-command-hook, dungeon-mode-map, electric-nroff-mode, -electric-nroff-newline, electric-perl-terminator, forward-text-line, -generic-define-mswindows-modes, generic-define-unix-modes, +electric-nroff-newline, electric-perl-terminator, focus-frame, +forward-text-line, generic-define-mswindows-modes, generic-define-unix-modes, generic-font-lock-defaults, goto-address-at-mouse, highlight-changes-colours, ibuffer-elide-long-columns, ibuffer-hooks, ibuffer-mode-hooks, icalendar-convert-diary-to-ical, @@ -351,7 +351,7 @@ speedbar-add-ignored-path-regexp, speedbar-buffers-line-path, speedbar-buffers-line-path, speedbar-ignored-path-expressions, speedbar-ignored-path-regexp, speedbar-line-path, speedbar-path-line, timer-set-time-with-usecs, tooltip-gud-display, tooltip-gud-modes, -tooltip-gud-toggle-dereference, unload-hook-features-list, +tooltip-gud-toggle-dereference, unfocus-frame, unload-hook-features-list, update-autoloads-from-directories, vc-comment-ring, vc-comment-ring-index, vc-comment-search-forward, vc-comment-search-reverse, vc-comment-to-change-log, vc-diff-switches-list, vc-next-comment, vc-previous-comment, view-todo, diff --git a/lisp/subr.el b/lisp/subr.el index b621042c23..113bd978b6 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -1449,12 +1449,6 @@ be a list of the form returned by `event-start' and `event-end'." (declare (obsolete log "24.4")) (log x 10)) -;; These are used by VM and some old programs -(defalias 'focus-frame 'ignore "") -(make-obsolete 'focus-frame "it does nothing." "22.1") -(defalias 'unfocus-frame 'ignore "") -(make-obsolete 'unfocus-frame "it does nothing." "22.1") - (set-advertised-calling-convention 'all-completions '(string collection &optional predicate) "23.1") (set-advertised-calling-convention 'unintern '(name obarray) "23.3") diff --git a/lisp/vc/ediff-util.el b/lisp/vc/ediff-util.el index be36273592..1158b7146e 100644 --- a/lisp/vc/ediff-util.el +++ b/lisp/vc/ediff-util.el @@ -778,8 +778,8 @@ Reestablish the default window display." (select-frame-set-input-focus ediff-control-frame) (raise-frame ediff-control-frame) (select-frame ediff-control-frame) - (if (fboundp 'focus-frame) - (focus-frame ediff-control-frame)))) + (and (featurep 'xemacs) (fboundp 'focus-frame) + (focus-frame ediff-control-frame)))) ;; Redisplay whatever buffers are showing, if there is a selected difference (let ((control-frame ediff-control-frame) commit 2734e29ff5b10b97196b4da32606524eefa47653 Author: Glenn Morris Date: Mon Mar 12 23:33:12 2018 -0700 * lisp/obsolete/options.el: Remove file. ; etc/NEWS: Mention this. diff --git a/etc/NEWS b/etc/NEWS index 49b755b551..1264cc64ea 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -283,6 +283,10 @@ To restore the old behavior, use *** New connection method "owncloud", which allows to access OwnCloud or NextCloud hosted files and directories. +--- +** The options.el library has been removed. +It was obsolete since Emacs 22.1, replaced by customize. + * New Modes and Packages in Emacs 27.1 @@ -317,6 +321,7 @@ as new-style, bind the new variable 'force-new-style-backquotes' to t. integer, Emacs now signals an error if the number is too large for the implementation to format (Bug#30408). +--- ** Some functions and variables obsolete since Emacs 22 have been removed: archive-mouse-extract, assoc-ignore-case, assoc-ignore-representation, backward-text-line, blink-cursor, bookmark-exit-hooks, diff --git a/lisp/obsolete/options.el b/lisp/obsolete/options.el deleted file mode 100644 index 41637a6ecf..0000000000 --- a/lisp/obsolete/options.el +++ /dev/null @@ -1,140 +0,0 @@ -;;; options.el --- edit Options command for Emacs - -;; Copyright (C) 1985, 2001-2018 Free Software Foundation, Inc. - -;; Maintainer: emacs-devel@gnu.org -;; Obsolete-since: 22.1 - -;; 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 . - -;;; Commentary: - -;; This code provides functions to list and edit the values of all global -;; option variables known to loaded Emacs Lisp code. There are two entry -;; points, `list-options' and `edit' options'. The latter enters a major -;; mode specifically for editing option values. Do `M-x describe-mode' in -;; that context for more details. - -;; The customization buffer feature is intended to make this obsolete. - -;;; Code: - -;;;###autoload -(defun list-options () - "Display a list of Emacs user options, with values and documentation. -It is now better to use Customize instead." - (interactive) - (with-output-to-temp-buffer "*List Options*" - (let (vars) - (princ "This facility is obsolete; we recommend using M-x customize instead.") - - (mapatoms (function (lambda (sym) - (if (custom-variable-p sym) - (setq vars (cons sym vars)))))) - (setq vars (sort vars 'string-lessp)) - (while vars - (let ((sym (car vars))) - (when (boundp sym) - (princ ";; ") - (prin1 sym) - (princ ":\n\t") - (prin1 (symbol-value sym)) - (terpri) - (princ (substitute-command-keys - (documentation-property sym 'variable-documentation))) - (princ "\n;;\n")) - (setq vars (cdr vars)))) - (with-current-buffer "*List Options*" - (Edit-options-mode) - (setq buffer-read-only t))))) - -;;;###autoload -(defun edit-options () - "Edit a list of Emacs user option values. -Selects a buffer containing such a list, -in which there are commands to set the option values. -Type \\[describe-mode] in that buffer for a list of commands. - -The Custom feature is intended to make this obsolete." - (interactive) - (list-options) - (pop-to-buffer "*List Options*")) - -(defvar Edit-options-mode-map - (let ((map (make-keymap))) - (define-key map "s" 'Edit-options-set) - (define-key map "x" 'Edit-options-toggle) - (define-key map "1" 'Edit-options-t) - (define-key map "0" 'Edit-options-nil) - (define-key map "p" 'backward-paragraph) - (define-key map " " 'forward-paragraph) - (define-key map "n" 'forward-paragraph) - map) - "") - -;; Edit Options mode is suitable only for specially formatted data. -(put 'Edit-options-mode 'mode-class 'special) - -(define-derived-mode Edit-options-mode emacs-lisp-mode "Options" - "\\\ -Major mode for editing Emacs user option settings. -Special commands are: -\\[Edit-options-set] -- set variable point points at. New value read using minibuffer. -\\[Edit-options-toggle] -- toggle variable, t -> nil, nil -> t. -\\[Edit-options-t] -- set variable to t. -\\[Edit-options-nil] -- set variable to nil. -Changed values made by these commands take effect immediately. - -Each variable description is a paragraph. -For convenience, the characters \\[backward-paragraph] and \\[forward-paragraph] move back and forward by paragraphs." - (setq-local paragraph-separate "[^\^@-\^?]") - (setq-local paragraph-start "\t") - (setq-local truncate-lines t)) - -(defun Edit-options-set () (interactive) - (Edit-options-modify - (lambda (var) (eval-minibuffer (concat "New " (symbol-name var) ": "))))) - -(defun Edit-options-toggle () (interactive) - (Edit-options-modify (lambda (var) (not (symbol-value var))))) - -(defun Edit-options-t () (interactive) - (Edit-options-modify (lambda (var) t))) - -(defun Edit-options-nil () (interactive) - (Edit-options-modify (lambda (var) nil))) - -(defun Edit-options-modify (modfun) - (save-excursion - (let ((buffer-read-only nil) var pos) - (re-search-backward "^;; \\|\\`") - (forward-char 3) - (setq pos (point)) - (save-restriction - (narrow-to-region pos (progn (end-of-line) (1- (point)))) - (goto-char pos) - (setq var (read (current-buffer)))) - (goto-char pos) - (forward-line 1) - (forward-char 1) - (save-excursion - (set var (funcall modfun var))) - (kill-sexp 1) - (prin1 (symbol-value var) (current-buffer))))) - -(provide 'options) - -;;; options.el ends here commit 9ab4cc1e27f569a0f415b5756eaf0f81a0d8b7f9 Author: Glenn Morris Date: Mon Mar 12 23:28:36 2018 -0700 ; tiny NEWS fix diff --git a/etc/NEWS b/etc/NEWS index c0de56d2cd..49b755b551 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -292,7 +292,32 @@ This feature uses Tramp and works only on systems which support GVFS, i.e. GNU/Linux, roughly spoken. See the chapter "(tramp) Archive file names" in the Tramp manual for full documentation of these facilities. -** Some functions and variables obsolete since 22.1 have been removed: + +* Incompatible Lisp Changes in Emacs 27.1 + +** The FILENAME argument to 'file-name-base' is now mandatory and no +longer defaults to 'buffer-file-name'. + +--- +** The function 'eldoc-message' now accepts a single argument. +Programs that called it with multiple arguments before should pass +them through 'format' first. Even that is discouraged: for ElDoc +support, you should set 'eldoc-documentation-function' instead of +calling 'eldoc-message' directly. + +** Old-style backquotes now generate an error. They have been +generating warnings for a decade. To interpret old-style backquotes +as new-style, bind the new variable 'force-new-style-backquotes' to t. + +** Defining a Common Lisp structure using 'cl-defstruct' or +'cl-struct-define' whose name clashes with a builtin type (e.g., +'integer' or 'hash-table') now signals an error. + +** When formatting a floating-point number as an octal or hexadecimal +integer, Emacs now signals an error if the number is too large for the +implementation to format (Bug#30408). + +** Some functions and variables obsolete since Emacs 22 have been removed: archive-mouse-extract, assoc-ignore-case, assoc-ignore-representation, backward-text-line, blink-cursor, bookmark-exit-hooks, comint-use-prompt-regexp-instead-of-fields, compilation-finish-function, @@ -328,31 +353,6 @@ vc-diff-switches-list, vc-next-comment, vc-previous-comment, view-todo, x-lost-selection-hooks, x-sent-selection-hooks -* Incompatible Lisp Changes in Emacs 27.1 - -** The FILENAME argument to 'file-name-base' is now mandatory and no -longer defaults to 'buffer-file-name'. - ---- -** The function 'eldoc-message' now accepts a single argument. -Programs that called it with multiple arguments before should pass -them through 'format' first. Even that is discouraged: for ElDoc -support, you should set 'eldoc-documentation-function' instead of -calling 'eldoc-message' directly. - -** Old-style backquotes now generate an error. They have been -generating warnings for a decade. To interpret old-style backquotes -as new-style, bind the new variable 'force-new-style-backquotes' to t. - -** Defining a Common Lisp structure using 'cl-defstruct' or -'cl-struct-define' whose name clashes with a builtin type (e.g., -'integer' or 'hash-table') now signals an error. - -** When formatting a floating-point number as an octal or hexadecimal -integer, Emacs now signals an error if the number is too large for the -implementation to format (Bug#30408). - - * Lisp Changes in Emacs 27.1 +++ commit e4b73abd3897a9291fc028f5ef33d6215c7e9de9 Author: Glenn Morris Date: Mon Mar 12 21:09:36 2018 -0400 Stop mentioning options.el in doc * doc/misc/calc.texi (Customizing Embedded Mode): Remove mentions of the obsolete (since 22.1) options.el. * lisp/progmodes/meta-mode.el: Comment fix. diff --git a/doc/misc/calc.texi b/doc/misc/calc.texi index 1fe7948ab8..be78a53ed6 100644 --- a/doc/misc/calc.texi +++ b/doc/misc/calc.texi @@ -31292,7 +31292,7 @@ for @code{Save} have no effect. You can modify Embedded mode's behavior by setting various Lisp variables described here. These variables are customizable (@pxref{Customizing Calc}), or you can use @kbd{M-x set-variable} -or @kbd{M-x edit-options} to adjust a variable on the fly. +to adjust a variable on the fly. (Another possibility would be to use a file-local variable annotation at the end of the file; @pxref{File Variables, , Local Variables in Files, emacs, the Emacs manual}.) @@ -31311,9 +31311,8 @@ regular expression is not completely plain, let's go through it in detail. The surrounding @samp{" "} marks quote the text between them as a -Lisp string. If you left them off, @code{set-variable} or -@code{edit-options} would try to read the regular expression as a -Lisp program. +Lisp string. If you left them off, @code{set-variable} (for example) +would try to read the regular expression as a Lisp program. The most obvious property of this regular expression is that it contains indecently many backslashes. There are actually two levels diff --git a/lisp/progmodes/meta-mode.el b/lisp/progmodes/meta-mode.el index 7d20e02d80..e207d22ff4 100644 --- a/lisp/progmodes/meta-mode.el +++ b/lisp/progmodes/meta-mode.el @@ -47,8 +47,8 @@ ;; `metafont-mode-hook' and `metapost-mode-hook' which apply to the ;; individual modes. In addition, there are several variables and ;; regexps controlling e.g. the behavior of the indentation function, -;; which may be customized via `edit-options'. Please refer to the -;; docstrings in the code below for details. +;; which may be customized. Please refer to the docstrings in the code +;; below for details. ;; Availability: ;; commit a2027ad648436568053388c5a64375c8a432bad3 Author: Glenn Morris Date: Mon Mar 12 20:58:38 2018 -0400 * lisp/loadhist.el (unload-hook-features-list): Remove obsolete alias. diff --git a/etc/NEWS b/etc/NEWS index 9eb28e18f7..c0de56d2cd 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -321,11 +321,11 @@ speedbar-add-ignored-path-regexp, speedbar-buffers-line-path, speedbar-buffers-line-path, speedbar-ignored-path-expressions, speedbar-ignored-path-regexp, speedbar-line-path, speedbar-path-line, timer-set-time-with-usecs, tooltip-gud-display, tooltip-gud-modes, -tooltip-gud-toggle-dereference, update-autoloads-from-directories, -vc-comment-ring, vc-comment-ring-index, vc-comment-search-forward, -vc-comment-search-reverse, vc-comment-to-change-log, vc-diff-switches-list, -vc-next-comment, vc-previous-comment, view-todo, x-lost-selection-hooks, -x-sent-selection-hooks +tooltip-gud-toggle-dereference, unload-hook-features-list, +update-autoloads-from-directories, vc-comment-ring, vc-comment-ring-index, +vc-comment-search-forward, vc-comment-search-reverse, vc-comment-to-change-log, +vc-diff-switches-list, vc-next-comment, vc-previous-comment, view-todo, +x-lost-selection-hooks, x-sent-selection-hooks * Incompatible Lisp Changes in Emacs 27.1 diff --git a/lisp/loadhist.el b/lisp/loadhist.el index e2b2ccd510..b8d9e2de0d 100644 --- a/lisp/loadhist.el +++ b/lisp/loadhist.el @@ -141,8 +141,6 @@ 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. commit 05669f0e3ee01e785da2482c1342bbd902e57edf Author: Eli Zaretskii Date: Mon Mar 12 22:08:54 2018 +0200 ; * lisp/minibuffer.el (completion-cycle-threshold): Fix last change. diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index 76cda2c480..7302fff458 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -987,7 +987,7 @@ Moves point to the end of the new text." "Number of completion candidates below which cycling is used. Depending on this setting `completion-in-region' may use cycling, whereby invoking a completion command several times in a row -completes to each of the candidates in turn, in cyclic manner. +completes to each of the candidates in turn, in a cyclic manner. If nil, cycling is never used. If t, cycling is always used. If an integer, cycling is used so long as there are not more commit 758597fb3ea6e02afb28b1b3f99a4fe0598883af Author: Charles A. Roelli Date: Mon Mar 12 20:16:53 2018 +0100 * lisp/vc/vc-dir.el (vc-dir-unmark): Fix documentation. diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el index b439fe736d..0cd05b943e 100644 --- a/lisp/vc/vc-dir.el +++ b/lisp/vc/vc-dir.el @@ -693,7 +693,7 @@ share the same state." (defun vc-dir-unmark () "Unmark the current file or all files in the region. If the region is active, unmark all the files in the region. -Otherwise mark the file on the current line and move to the next +Otherwise unmark the file on the current line and move to the next line." (interactive) (vc-dir-mark-unmark 'vc-dir-unmark-file)) commit 8048caab1d4125991b475be0ff8052f319221174 Author: Glenn Morris Date: Mon Mar 12 11:29:01 2018 -0700 Make compiler warn about use of obsolete hooks * lisp/emacs-lisp/bytecomp.el (byte-compile-form): Warn about using obsolete hooks. diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 2a986f6cbb..b3ea9300b0 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -3119,6 +3119,11 @@ for symbols generated by the byte compiler itself." (when (assq var byte-compile-lexical-variables) (byte-compile-report-error (format-message "%s cannot use lexical var `%s'" fn var)))))) + ;; Warn about using obsolete hooks. + (if (memq fn '(add-hook remove-hook)) + (let ((hook (car-safe (cdr form)))) + (if (eq (car-safe hook) 'quote) + (byte-compile-check-variable (cadr hook) nil)))) (when (and (byte-compile-warning-enabled-p 'suspicious) (macroexp--const-symbol-p fn)) (byte-compile-warn "`%s' called as a function" fn)) commit 6b80a585c7f3600805c8cced58aa1f196e679c7c Author: Glenn Morris Date: Mon Mar 12 11:25:40 2018 -0700 Replace use of the obsolete write-contents-hooks * lisp/play/gametree.el (gametree-mode): Replace write-contents-hooks, obsolete since 22.1, with write-contents-functions. ; * lisp/files.el: Related comment. diff --git a/lisp/files.el b/lisp/files.el index fbd3425cbb..8ec2bde588 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -521,6 +521,7 @@ updates before the buffer is saved, use `before-save-hook'.") (put 'local-write-file-hooks 'permanent-local t) (make-obsolete-variable 'local-write-file-hooks 'write-file-functions "22.1") +;; I found some files still using the obsolete form in 2018. (define-obsolete-variable-alias 'write-contents-hooks 'write-contents-functions "22.1") (defvar write-contents-functions nil diff --git a/lisp/play/gametree.el b/lisp/play/gametree.el index de8abd7abe..5b05ae13e2 100644 --- a/lisp/play/gametree.el +++ b/lisp/play/gametree.el @@ -586,8 +586,7 @@ shogi, etc.) players, it is a slightly modified version of Outline mode. \\{gametree-mode-map}" (auto-fill-mode 0) - (make-local-variable 'write-contents-hooks) - (add-hook 'write-contents-hooks 'gametree-save-and-hack-layout)) + (add-hook 'write-contents-functions 'gametree-save-and-hack-layout nil t)) ;;;; Goodies for mousing users (defun gametree-mouse-break-line-here (event) commit e067f1fd9feabc9c83cfbba177616a46b28d058a Author: Paul Eggert Date: Mon Mar 12 10:35:25 2018 -0700 Revert overenthusiastic procfs fixup Also, be more systematic in calls to string_to_number. * src/sysdep.c (list_system_processes) [HAVE_PROCFS]: Allow pids to be floating-point if they exceed fixnum range. This partially reverts my patch 2018-03-09T20:06:05Z!eggert@cs.ucla.edu, which went too far in fixing string-to-number mishandling. diff --git a/src/data.c b/src/data.c index 62b3fcfeb2..06308c62c4 100644 --- a/src/data.c +++ b/src/data.c @@ -2754,7 +2754,7 @@ If the base used is not 10, STRING is always parsed as an integer. */) while (*p == ' ' || *p == '\t') p++; - val = string_to_number (p, b, 1); + val = string_to_number (p, b, true); return NILP (val) ? make_number (0) : val; } diff --git a/src/lread.c b/src/lread.c index 0ea7677300..381f9cf20c 100644 --- a/src/lread.c +++ b/src/lread.c @@ -2693,7 +2693,7 @@ read_integer (Lisp_Object readcharfun, EMACS_INT radix) invalid_syntax (buf); } - return string_to_number (buf, radix, 0); + return string_to_number (buf, radix, false); } @@ -3502,7 +3502,7 @@ read1 (Lisp_Object readcharfun, int *pch, bool first_in_list) if (!quoted && !uninterned_symbol) { - Lisp_Object result = string_to_number (read_buffer, 10, 0); + Lisp_Object result = string_to_number (read_buffer, 10, false); if (! NILP (result)) return unbind_to (count, result); } diff --git a/src/process.c b/src/process.c index 9b9b9f3550..11d914aab2 100644 --- a/src/process.c +++ b/src/process.c @@ -6844,7 +6844,7 @@ SIGCODE may be an integer, or a symbol whose name is a signal name. */) if (NILP (tem)) { Lisp_Object process_number - = string_to_number (SSDATA (process), 10, 1); + = string_to_number (SSDATA (process), 10, true); if (NUMBERP (process_number)) tem = process_number; } diff --git a/src/sysdep.c b/src/sysdep.c index 1eaf648ea7..c59034ce5c 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -3006,11 +3006,7 @@ list_system_processes (void) for (tail = proclist; CONSP (tail); tail = next) { next = XCDR (tail); - Lisp_Object pidstring = XCAR (tail); - Lisp_Object pid = Fstring_to_number (pidstring, Qnil); - if (!INTEGERP (pid) || XINT (pid) <= 0) - xsignal1 (Qoverflow_error, pidstring); - XSETCAR (tail, pid); + XSETCAR (tail, Fstring_to_number (XCAR (tail), Qnil)); } /* directory_files_internal returns the files in reverse order; undo diff --git a/src/xfaces.c b/src/xfaces.c index 56df06574a..a9c2f37e9f 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -3392,7 +3392,7 @@ DEFUN ("internal-set-lisp-face-attribute-from-resource", value = Qunspecified; else if (EQ (attr, QCheight)) { - value = Fstring_to_number (value, make_number (10)); + value = Fstring_to_number (value, Qnil); if (!INTEGERP (value) || XINT (value) <= 0) signal_error ("Invalid face height from X resource", value); } commit 62f0a2b229604fca83bc2ebf67b0eaa179810e36 Author: Eli Zaretskii Date: Mon Mar 12 19:25:10 2018 +0200 * lisp/minibuffer.el (completion-cycle-threshold): Doc fix. diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index e8c6ce6910..76cda2c480 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -986,7 +986,8 @@ Moves point to the end of the new text." (defcustom completion-cycle-threshold nil "Number of completion candidates below which cycling is used. Depending on this setting `completion-in-region' may use cycling, -like `minibuffer-force-complete'. +whereby invoking a completion command several times in a row +completes to each of the candidates in turn, in cyclic manner. If nil, cycling is never used. If t, cycling is always used. If an integer, cycling is used so long as there are not more commit 761845cc4acd517fdab4375aa54fc04301095351 Author: Eli Zaretskii Date: Mon Mar 12 18:02:15 2018 +0200 Fix last change in Xref documentation * doc/emacs/maintaining.texi (Looking Up Identifiers): More accurate wording for the description of xref-etags-mode. diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi index 6ee2f2cc59..619f80a315 100644 --- a/doc/emacs/maintaining.texi +++ b/doc/emacs/maintaining.texi @@ -1875,15 +1875,17 @@ steps to a depth determined by the variable @findex xref-etags-mode Some major modes install @code{xref} support facilities that might -fail to find certain identifiers. For example, in Emacs Lisp mode -(@pxref{Lisp Eval}) @kbd{M-.} will by default find only functions and -variables from Lisp packages that are loaded into the current Emacs -session. To find more identifiers, turn on the Xref Etags minor mode -with @w{@kbd{M-x xref-etags-mode}}. This command forces @code{xref} -to use the @code{etags} backend (@pxref{Xref}). (For this to work, -you should first run @command{etags} to create the tags table, see -@ref{Create Tags Table}.) - +sometimes fail to find certain identifiers. For example, in Emacs +Lisp mode (@pxref{Lisp Eval}) @kbd{M-.} will by default find only +functions and variables from Lisp packages which are loaded into the +current Emacs session or are auto-loaded (@pxref{Autoload,,, elisp, +The Emacs Lisp Reference Manual}). If @kbd{M-.} fails to find some +identifiers, you can try forcing @code{xref} to use the @code{etags} +backend (@pxref{Xref}). To this end, turn on the Xref Etags minor +mode with @w{@kbd{M-x xref-etags-mode}}, then invoke @kbd{M-.} again. +(For this to work, be sure to run @command{etags} to create the tags +table in the directory tree of the source files, see @ref{Create Tags +Table}.) @node Xref Commands @subsubsection Commands Available in the @file{*xref*} Buffer commit 51866758c1a1b808897fc869d651b21fd492ee1a Author: Eli Zaretskii Date: Sun Mar 11 20:07:38 2018 +0200 More changes in the Emacs manual * doc/emacs/text.texi (Words, Foldout, Table Conversion): Clarify text. Reported by Gijs Hillenius in emacs-manual-bugs@gnu.org. * doc/emacs/msdos.texi (Windows Keyboard): * doc/emacs/msdos-xtra.texi (MS-DOS Keyboard): * doc/emacs/macos.texi (Mac / GNUstep Basics): * doc/emacs/glossary.texi (Glossary): * doc/emacs/custom.texi (Function Keys, Init Syntax): * doc/emacs/commands.texi (User Input): * doc/emacs/basic.texi (Arguments): Fix capitalization of "Meta". * doc/emacs/msdos.texi (Windows Keyboard): * doc/emacs/dired.texi (Dired Updating): * doc/emacs/custom.texi (Init Rebinding): Fix misuses of @key. Suggested by Richard Stallman . diff --git a/doc/emacs/basic.texi b/doc/emacs/basic.texi index b9e0ce4404..3fec5f44de 100644 --- a/doc/emacs/basic.texi +++ b/doc/emacs/basic.texi @@ -728,7 +728,7 @@ direction. @findex digit-argument @findex negative-argument The easiest way to specify a numeric argument is to type a digit -and/or a minus sign while holding down the @key{META} key. For +and/or a minus sign while holding down the @key{Meta} key. For example, @example @@ -742,7 +742,7 @@ well as @kbd{M--}, are bound to commands (@code{digit-argument} and command. @kbd{M--} without digits normally means @minus{}1. If you enter more than one digit, you need not hold down the -@key{META} key for the second and subsequent digits. Thus, to move +@key{Meta} key for the second and subsequent digits. Thus, to move down fifty lines, type @example diff --git a/doc/emacs/commands.texi b/doc/emacs/commands.texi index 8b8b0c7aad..a992dedc92 100644 --- a/doc/emacs/commands.texi +++ b/doc/emacs/commands.texi @@ -44,25 +44,25 @@ are certain characters found on non-English keyboards @cindex M- Emacs also recognizes control characters that are entered using @dfn{modifier keys}. Two commonly-used modifier keys are -@key{Control} (usually labeled @key{Ctrl}), and @key{META} (usually -labeled @key{Alt})@footnote{We refer to @key{Alt} as @key{META} for +@key{Control} (usually labeled @key{Ctrl}), and @key{Meta} (usually +labeled @key{Alt})@footnote{We refer to @key{Alt} as @key{Meta} for historical reasons.}. For example, @kbd{Control-a} is entered by holding down the @key{Ctrl} key while pressing @kbd{a}; we will refer -to this as @kbd{C-a} for short. Similarly, @kbd{@key{META}-a}, or @kbd{M-a} +to this as @kbd{C-a} for short. Similarly, @kbd{@key{Meta}-a}, or @kbd{M-a} for short, is entered by holding down the @key{Alt} key and pressing @kbd{a}. Modifier keys can also be applied to non-alphanumerical characters, e.g., @kbd{C-@key{F1}} or @kbd{M-@key{LEFT}}. -@cindex @key{ESC} replacing @key{META} key +@cindex @key{ESC} replacing @key{Meta} key You can also type Meta characters using two-character sequences starting with @key{ESC}. Thus, you can enter @kbd{M-a} by typing @kbd{@key{ESC} a}. You can enter @kbd{C-M-a} (holding down both @key{Ctrl} and @key{Alt}, then pressing @kbd{a}) by typing -@kbd{@key{ESC} C-a}. Unlike @key{META}, @key{ESC} is entered as a +@kbd{@key{ESC} C-a}. Unlike @key{Meta}, @key{ESC} is entered as a separate character. You don't hold down @key{ESC} while typing the next character; instead, press @key{ESC} and release it, then enter the next character. This feature is useful on certain text terminals -where the @key{META} key does not function reliably. +where the @key{Meta} key does not function reliably. @cindex keys stolen by window manager @cindex window manager, keys stolen by diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi index 0ffc2a0c30..ee4b6a1b88 100644 --- a/doc/emacs/custom.texi +++ b/doc/emacs/custom.texi @@ -1745,10 +1745,11 @@ characters. For example, here's how to bind @kbd{C-x M-l} to (global-set-key "\C-x\M-l" 'make-symbolic-link) @end example - To put @key{TAB}, @key{RET}, @key{ESC}, or @key{DEL} in the string, -use the Emacs Lisp escape sequences @samp{\t}, @samp{\r}, @samp{\e}, -and @samp{\d} respectively. Here is an example which binds @kbd{C-x -@key{TAB}} to @code{indent-rigidly} (@pxref{Indentation}): + To bind a key sequence including @key{TAB}, @key{RET}, @key{ESC}, or +@key{DEL}, the string should contain the Emacs Lisp escape sequence +@samp{\t}, @samp{\r}, @samp{\e}, or @samp{\d} respectively. Here is +an example which binds @kbd{C-x @key{TAB}} to @code{indent-rigidly} +(@pxref{Indentation}): @example (global-set-key "\C-x\t" 'indent-rigidly) @@ -1822,11 +1823,11 @@ historical. characters case-sensitive when you customize Emacs. For instance, you could make @kbd{M-a} and @kbd{M-A} run different commands. - Although only the @key{Control} and @key{META} modifier keys are + Although only the @key{Control} and @key{Meta} modifier keys are commonly used, Emacs supports three other modifier keys. These are called @key{Super}, @key{Hyper}, and @key{Alt}. Few terminals provide ways to use these modifiers; the key labeled @key{Alt} on most -keyboards usually issues the @key{META} modifier, not @key{Alt}. The +keyboards usually issues the @key{Meta} modifier, not @key{Alt}. The standard key bindings in Emacs do not include any characters with these modifiers. However, you can customize Emacs to assign meanings to them. The modifier bits are labeled as @samp{s-}, @samp{H-} and @@ -1896,7 +1897,7 @@ the numeric keypad produces @code{kp-8}, which is translated to such as @kbd{8} or @key{UP}, it affects the equivalent keypad key too. However, if you rebind a @samp{kp-} key directly, that won't affect its non-keypad equivalent. Note that the modified keys are not -translated: for instance, if you hold down the @key{META} key while +translated: for instance, if you hold down the @key{Meta} key while pressing the @samp{8} key on the numeric keypad, that generates @kbd{M-@key{kp-8}}. @@ -2241,8 +2242,8 @@ sequences are mandatory. @samp{\C-} can be used as a prefix for a control character, as in @samp{\C-s} for @acronym{ASCII} control-S, and @samp{\M-} can be used as a prefix for -a Meta character, as in @samp{\M-a} for @kbd{@key{META}-A} or -@samp{\M-\C-a} for @kbd{@key{Ctrl}-@key{META}-A}. +a Meta character, as in @samp{\M-a} for @kbd{@key{Meta}-A} or +@samp{\M-\C-a} for @kbd{@key{Ctrl}-@key{Meta}-A}. @xref{Init Non-ASCII}, for information about including non-@acronym{ASCII} in your init file. diff --git a/doc/emacs/dired.texi b/doc/emacs/dired.texi index 15c9cb5687..309dfb3208 100644 --- a/doc/emacs/dired.texi +++ b/doc/emacs/dired.texi @@ -1229,7 +1229,7 @@ contents of the corresponding subdirectory. If you use @kbd{C-x d} or some other Dired command to visit a directory that is already being shown in a Dired buffer, Dired switches to that buffer but does not update it. If the buffer is not -up-to-date, Dired displays a warning telling you to type @key{g} to +up-to-date, Dired displays a warning telling you to type @kbd{g} to update it. You can also tell Emacs to revert each Dired buffer automatically when you revisit it, by setting the variable @code{dired-auto-revert-buffer} to a non-@code{nil} value. diff --git a/doc/emacs/glossary.texi b/doc/emacs/glossary.texi index 6002e367cc..02939679fe 100644 --- a/doc/emacs/glossary.texi +++ b/doc/emacs/glossary.texi @@ -29,7 +29,7 @@ Alt is the name of a modifier bit that a keyboard input character may have. To make a character Alt, type it while holding down the @key{Alt} key. Such characters are given names that start with @kbd{@key{Alt}-} (usually written @kbd{A-} for short). (Note that many terminals have a -key labeled @key{Alt} that is really a @key{META} key.) @xref{User +key labeled @key{Alt} that is really a @key{Meta} key.) @xref{User Input, Alt}. @item Argument @@ -174,7 +174,7 @@ misspelling. @item @kbd{C-M-} @kbd{C-M-} in the name of a character is an abbreviation for -Control-Meta. If your terminal lacks a real @key{META} key, you type +Control-Meta. If your terminal lacks a real @key{Meta} key, you type a Control-Meta character by typing @key{ESC} and then typing the corresponding Control character. @xref{User Input,C-M-}. @@ -507,7 +507,7 @@ Such messages appear in the echo area, accompanied by a beep. @item @key{ESC} @key{ESC} is a character used as a prefix for typing Meta characters on -keyboards lacking a @key{META} key. Unlike the @key{META} key (which, +keyboards lacking a @key{Meta} key. Unlike the @key{Meta} key (which, like the @key{SHIFT} key, is held down while another character is typed), you press the @key{ESC} key as you would press a letter key, and it applies to the next character you type. @@ -881,7 +881,7 @@ A local value of a variable (q.v.@:) applies to only one buffer. @xref{Locals}. @item @kbd{M-} -@kbd{M-} in the name of a character is an abbreviation for @key{META}, +@kbd{M-} in the name of a character is an abbreviation for @key{Meta}, one of the modifier keys that can accompany any character. @xref{User Input,M-}. @@ -939,15 +939,15 @@ a keyboard interface to navigate it. @xref{Menu Bars}. @item Meta Meta is the name of a modifier bit which you can use in a command -character. To enter a meta character, you hold down the @key{META} +character. To enter a meta character, you hold down the @key{Meta} key while typing the character. We refer to such characters with names that start with @kbd{Meta-} (usually written @kbd{M-} for -short). For example, @kbd{M-<} is typed by holding down @key{META} +short). For example, @kbd{M-<} is typed by holding down @key{Meta} and at the same time typing @kbd{<} (which itself is done, on most terminals, by holding down @key{SHIFT} and typing @kbd{,}). @xref{User Input,Meta}. -On some terminals, the @key{META} key is actually labeled @key{Alt} +On some terminals, the @key{Meta} key is actually labeled @key{Alt} or @key{Edit}. @item Meta Character diff --git a/doc/emacs/macos.texi b/doc/emacs/macos.texi index bf37d67b64..4982c78f2e 100644 --- a/doc/emacs/macos.texi +++ b/doc/emacs/macos.texi @@ -35,7 +35,7 @@ Support}), but we hope to improve it in the future. @section Basic Emacs usage under macOS and GNUstep By default, the @key{Alt} and @key{Option} keys are the same as -@key{META}. The Mac @key{Cmd} key is the same as @key{Super}, and +@key{Meta}. The Mac @key{Cmd} key is the same as @key{Super}, and Emacs provides a set of key bindings using this modifier key that mimic other Mac / GNUstep applications (@pxref{Mac / GNUstep Events}). You can change these bindings in the usual way (@pxref{Key Bindings}). diff --git a/doc/emacs/msdos-xtra.texi b/doc/emacs/msdos-xtra.texi index 406ebd1905..64ce8414fc 100644 --- a/doc/emacs/msdos-xtra.texi +++ b/doc/emacs/msdos-xtra.texi @@ -83,17 +83,17 @@ a running command and for emergency escape @cindex Super (under MS-DOS) @vindex dos-super-key @vindex dos-hyper-key - The PC keyboard maps use the left @key{Alt} key as the @key{META} key. + The PC keyboard maps use the left @key{Alt} key as the @key{Meta} key. You have two choices for emulating the @key{SUPER} and @key{Hyper} keys: choose either the right @key{Ctrl} key or the right @key{Alt} key by setting the variables @code{dos-hyper-key} and @code{dos-super-key} to 1 or 2 respectively. If neither @code{dos-super-key} nor @code{dos-hyper-key} is 1, then by default the right @key{Alt} key is -also mapped to the @key{META} key. However, if the MS-DOS international +also mapped to the @key{Meta} key. However, if the MS-DOS international keyboard support program @file{KEYB.COM} is installed, Emacs will -@emph{not} map the right @key{Alt} to @key{META}, since it is used for +@emph{not} map the right @key{Alt} to @key{Meta}, since it is used for accessing characters like @kbd{~} and @kbd{@@} on non-US keyboard -layouts; in this case, you may only use the left @key{Alt} as @key{META} +layouts; in this case, you may only use the left @key{Alt} as @key{Meta} key. @kindex C-j @r{(MS-DOS)} diff --git a/doc/emacs/msdos.texi b/doc/emacs/msdos.texi index b3b40d476e..95969540f5 100644 --- a/doc/emacs/msdos.texi +++ b/doc/emacs/msdos.texi @@ -547,7 +547,7 @@ Windows-specific variables in this category. @ifnottex @vindex w32-alt-is-meta @cindex @code{Alt} key (MS-Windows) - By default, the key labeled @key{Alt} is mapped as the @key{META} + By default, the key labeled @key{Alt} is mapped as the @key{Meta} key. If you wish it to produce the @code{Alt} modifier instead, set the variable @code{w32-alt-is-meta} to a @code{nil} value. @@ -605,8 +605,8 @@ Windows key and @key{R} opens the Windows @code{Run} dialog. The hotkey registrations always also include all the shift and control modifier combinations for the given hotkey; that is, -registering @kbd{s-@key{a}} as a hotkey gives you @kbd{S-s-@key{a}}, -@kbd{C-s-@key{a}} and @kbd{C-S-s-@key{a}} as well. +registering @kbd{s-a} as a hotkey gives you @kbd{S-s-a}, +@kbd{C-s-a} and @kbd{C-S-s-a} as well. On Windows 98 and ME, the hotkey registration is more restricted. The desired hotkey must always be fully specified, and @@ -670,8 +670,8 @@ value other than the above modifier symbols. @cindex @code{Alt} key invokes menu (Windows) Emacs compiled as a native Windows application normally turns off the Windows feature that tapping the @key{Alt} key invokes the Windows -menu. The reason is that the @key{Alt} serves as @key{META} in Emacs. -When using Emacs, users often press the @key{META} key temporarily and +menu. The reason is that the @key{Alt} serves as @key{Meta} in Emacs. +When using Emacs, users often press the @key{Meta} key temporarily and then change their minds; if this has the effect of bringing up the Windows menu, it alters the meaning of subsequent commands. Many users find this frustrating. @@ -701,7 +701,7 @@ the combination of the right @key{Alt} and left @key{Ctrl} keys pressed together, is recognized as the @key{AltGr} key. The default is @code{t}, which means these keys produce @code{AltGr}; setting it to @code{nil} causes @key{AltGr} or the equivalent key combination to -be interpreted as the combination of @key{Ctrl} and @key{META} +be interpreted as the combination of @key{Ctrl} and @key{Meta} modifiers. @end ifnottex diff --git a/doc/emacs/text.texi b/doc/emacs/text.texi index b188c02a9a..96262a5eef 100644 --- a/doc/emacs/text.texi +++ b/doc/emacs/text.texi @@ -117,7 +117,7 @@ cognate to @kbd{C-@@}, which is an alias for @kbd{C-@key{SPC}}. @findex backward-word The commands @kbd{M-f} (@code{forward-word}) and @kbd{M-b} (@code{backward-word}) move forward and backward over words. These -@key{META}-based key sequences are analogous to the key sequences +@key{Meta}-based key sequences are analogous to the key sequences @kbd{C-f} and @kbd{C-b}, which move over single characters. The analogy extends to numeric arguments, which serve as repeat counts. @kbd{M-f} with a negative argument moves backward, and @kbd{M-b} with @@ -1321,7 +1321,7 @@ quad click: exit all folds and hide text. @c FIXME not marked as a user variable @vindex foldout-mouse-modifiers You can specify different modifier keys (instead of -@kbd{@key{Ctrl}-@key{META}-}) by setting @code{foldout-mouse-modifiers}; but if +@kbd{@key{Ctrl}-@key{Meta}-}) by setting @code{foldout-mouse-modifiers}; but if you have already loaded the @file{foldout.el} library, you must reload it in order for this to take effect. @@ -2755,8 +2755,7 @@ Invoking @kbd{M-x table-capture} on that text produces this table: to plain text, removing its cell borders. One application of this pair of commands is to edit a text in -layout. Look at the following three paragraphs (the latter two are -indented with header lines): +layout. Look at the following three paragraphs: @example table-capture is a powerful command. commit b1aaa72df8e0afd8a849aab7525640f1cec66af3 Author: Eli Zaretskii Date: Sun Mar 11 19:38:48 2018 +0200 Improve documentation of Xref * doc/emacs/maintaining.texi (Looking Up Identifiers): Document xref-etags-mode. diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi index 8f71b12b81..6ee2f2cc59 100644 --- a/doc/emacs/maintaining.texi +++ b/doc/emacs/maintaining.texi @@ -1812,6 +1812,8 @@ Find definition of identifier, and display it in a new frame @item M-, Go back to where you previously invoked @kbd{M-.} and friends (@code{xref-pop-marker-stack}). +@item M-x xref-etags-mode +Switch @code{xref} to use the @code{etags} backend. @end table @kindex M-. @@ -1871,6 +1873,18 @@ where you were with @kbd{M-,}. @kbd{M-,} allows you to retrace your steps to a depth determined by the variable @code{xref-marker-ring-length}, which defaults to 16. +@findex xref-etags-mode + Some major modes install @code{xref} support facilities that might +fail to find certain identifiers. For example, in Emacs Lisp mode +(@pxref{Lisp Eval}) @kbd{M-.} will by default find only functions and +variables from Lisp packages that are loaded into the current Emacs +session. To find more identifiers, turn on the Xref Etags minor mode +with @w{@kbd{M-x xref-etags-mode}}. This command forces @code{xref} +to use the @code{etags} backend (@pxref{Xref}). (For this to work, +you should first run @command{etags} to create the tags table, see +@ref{Create Tags Table}.) + + @node Xref Commands @subsubsection Commands Available in the @file{*xref*} Buffer @cindex commands in @file{*xref*} buffers commit 0965d94ca426765382f366bf48f88ba5f9500afd Author: Charles A. Roelli Date: Sun Mar 11 14:56:00 2018 +0100 Allow toggling Grep command abbreviation, and rename related symbols * lisp/progmodes/grep.el (grep-find-hide): Rename 'grep-find-hide' to 'grep-find-abbreviate'. (grep-find-hide-properties): Rename to 'grep-find-abbreviate-properties'. (grep-mode-font-lock-keywords): Even when 'grep-find-abbreviate' is nil, fontify the verbose command options with property 'abbreviated-command', so that the toggling command can later find these parts without refontifying. (grep-find-show): Rename to 'grep-find-toggle-abbreviation', simplify the code, and permit toggling the hidden command options. (grep-mode-map): Add a menu-bar item and new separator for 'grep-find-toggle-abbreviation', and fix the incumbent separators in the "Grep" menu-bar, of which only one was showing before this commit, even though two were specified. * etc/NEWS (grep): * doc/emacs/building.texi (Grep Searching): Document these changes, and mention 'grep-find-toggle-abbreviation'. diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi index 0697e1b590..e1c3cea035 100644 --- a/doc/emacs/building.texi +++ b/doc/emacs/building.texi @@ -434,14 +434,17 @@ the variable @code{grep-files-aliases}. @kbd{M-x rgrep}. The default value includes the data directories used by various version control systems. -@vindex grep-find-hide +@vindex grep-find-abbreviate +@findex grep-find-toggle-abbreviation By default, the shell commands constructed for @code{lgrep}, @code{rgrep}, and @code{zgrep} are abbreviated for display by concealing the part that contains a long list of files and directories to ignore. You can reveal the concealed part by clicking on the -button with ellipsis, which represents them. To disable this -abbreviation of the shell commands, customize the option -@code{grep-find-hide} to a @code{nil} value. +button with ellipsis, which represents them. You can also +interactively toggle viewing the concealed part by typing @kbd{M-x +grep-find-toggle-abbreviation}. To disable this abbreviation of the +shell commands, customize the option @code{grep-find-abbreviate} to a +@code{nil} value. @node Flymake @section Finding Syntax Errors On The Fly diff --git a/etc/NEWS b/etc/NEWS index f35a5134a9..9eb28e18f7 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -228,8 +228,10 @@ by default. *** rgrep, lgrep and zrgrep now hide part of the command line that contains a list of ignored directories and files. -Clicking on the button with ellipsis unhides the truncated part. -This truncation can be disabled by the new option 'grep-find-hide'. +Clicking on the button with ellipsis unhides it. +The abbreviation can be disabled by the new option +'grep-find-abbreviate'. The new command +'grep-find-toggle-abbreviation' toggles it interactively. ** ERT diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index dc74ad2de5..8c0e46f35a 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el @@ -286,6 +286,11 @@ See `compilation-error-screen-columns'" (define-key map [menu-bar grep] (cons "Grep" (make-sparse-keymap "Grep"))) + (define-key map [menu-bar grep grep-find-toggle-abbreviation] + '(menu-item "Toggle command abbreviation" + grep-find-toggle-abbreviation + :help "Toggle showing verbose command options")) + (define-key map [menu-bar grep compilation-separator3] '("----")) (define-key map [menu-bar grep compilation-kill-compilation] '(menu-item "Kill Grep" kill-compilation :help "Kill the currently running grep process")) @@ -308,7 +313,7 @@ See `compilation-error-screen-columns'" (define-key map [menu-bar grep compilation-recompile] '(menu-item "Repeat grep" recompile :help "Run grep again")) - (define-key map [menu-bar grep compilation-separator2] '("----")) + (define-key map [menu-bar grep compilation-separator1] '("----")) (define-key map [menu-bar grep compilation-first-error] '(menu-item "First Match" first-error :help "Restart at the first match, visit corresponding location")) @@ -433,24 +438,26 @@ See `compilation-error-regexp-alist' for format details.") help-echo "Number of matches so far") "]")) -(defcustom grep-find-hide t +(defcustom grep-find-abbreviate t "If non-nil, hide part of rgrep/lgrep/zrgrep command line. The hidden part contains a list of ignored directories and files. Clicking on the button-like ellipsis unhides the abbreviated part -and reveals the entire command line." +and reveals the entire command line. The visibility of the +abbreviated part can also be toggled with +`grep-find-toggle-abbreviation'." :type 'boolean :version "27.1" :group 'grep) -(defvar grep-find-hide-properties +(defvar grep-find-abbreviate-properties (let ((ellipsis (if (char-displayable-p ?…) "[…]" "[...]")) (map (make-sparse-keymap))) (define-key map [down-mouse-2] 'mouse-set-point) - (define-key map [mouse-2] 'grep-find-show) - (define-key map "\C-m" 'grep-find-show) + (define-key map [mouse-2] 'grep-find-toggle-abbreviation) + (define-key map "\C-m" 'grep-find-toggle-abbreviation) `(face nil display ,ellipsis mouse-face highlight help-echo "RET, mouse-2: show unabbreviated command" - keymap ,map)) + keymap ,map abbreviated-command t)) "Properties of button-like ellipsis on part of rgrep command line.") (defvar grep-mode-font-lock-keywords @@ -476,10 +483,12 @@ and reveals the entire command line." `(face nil display ,(match-string 2))))) ;; Hide excessive part of rgrep command ("^find \\(\\. -type d .*\\\\)\\)" - (1 (when grep-find-hide grep-find-hide-properties))) + (1 (if grep-find-abbreviate grep-find-abbreviate-properties + '(face nil abbreviated-command t)))) ;; Hide excessive part of lgrep command ("^grep \\( *--exclude.*--exclude[^ ]+\\)" - (1 (when grep-find-hide grep-find-hide-properties)))) + (1 (if grep-find-abbreviate grep-find-abbreviate-properties + '(face nil abbreviated-command t))))) "Additional things to highlight in grep output. This gets tacked on the end of the generated expressions.") @@ -1195,23 +1204,19 @@ to specify a command to run." (shell-quote-argument ")") " -prune -o "))))) -(defun grep-find-show () - "Show the hidden part of rgrep/lgrep/zrgrep command line." +(defun grep-find-toggle-abbreviation () + "Toggle showing the hidden part of rgrep/lgrep/zrgrep command line." (interactive) - (when (get-text-property (point) 'display) - (let ((beg (or (previous-single-property-change - (min (point-max) (1+ (point))) 'display) - (point))) - (end (or (next-single-property-change - (point) 'display) - (point))) - (inhibit-modification-hooks t) - (inhibit-read-only t) - (buffer-undo-list t) - (modified (buffer-modified-p))) - (remove-list-of-text-properties - beg end '(display help-echo mouse-face help-echo keymap)) - (set-buffer-modified-p modified)))) + (with-silent-modifications + (let* ((beg (next-single-property-change (point-min) 'abbreviated-command)) + (end (when beg + (next-single-property-change beg 'abbreviated-command)))) + (if end + (if (get-text-property beg 'display) + (remove-list-of-text-properties + beg end '(display help-echo mouse-face help-echo keymap)) + (add-text-properties beg end grep-find-abbreviate-properties)) + (user-error "No abbreviated part to hide/show"))))) ;;;###autoload (defun zrgrep (regexp &optional files dir confirm template) commit c773dc118e897d6e0b95c131051e73d6fef97111 Author: Charles A. Roelli Date: Sun Mar 11 12:25:21 2018 +0100 Document 'transpose-sentences' and 'transpose-paragraphs' * doc/emacs/fixit.texi (Transpose): Add documentation and index entries for 'transpose-sentences' and 'transpose-paragraphs' (Bug#30343 in passing). diff --git a/doc/emacs/fixit.texi b/doc/emacs/fixit.texi index eb783d175c..0cb8565c6a 100644 --- a/doc/emacs/fixit.texi +++ b/doc/emacs/fixit.texi @@ -149,6 +149,10 @@ Transpose two words (@code{transpose-words}). Transpose two balanced expressions (@code{transpose-sexps}). @item C-x C-t Transpose two lines (@code{transpose-lines}). +@item M-x transpose-sentences +Transpose two sentences (@code{transpose-sentences}). +@item M-x transpose-paragraphs +Transpose two paragraphs (@code{transpose-paragraphs}). @item M-x transpose-regions Transpose two regions. @end table @@ -185,10 +189,14 @@ punctuation characters between the words do not move. For example, @samp{@w{BAR FOO,}}. When point is at the end of the line, it will transpose the word before point with the first word on the next line. +@findex transpose-sentences +@findex transpose-paragraphs @kbd{C-M-t} (@code{transpose-sexps}) is a similar command for transposing two expressions (@pxref{Expressions}), and @kbd{C-x C-t} -(@code{transpose-lines}) exchanges lines. They work like @kbd{M-t} -except as regards the units of text they transpose. +(@code{transpose-lines}) exchanges lines. @kbd{M-x +transpose-sentences} and @kbd{M-x transpose-paragraphs} transpose +sentences and paragraphs, respectively. These commands work like +@kbd{M-t} except as regards the units of text they transpose. A numeric argument to a transpose command serves as a repeat count: it tells the transpose command to move the character (or word or commit b88e7c8bcd523f1f503f87a1734679405322b5ec Author: Charles A. Roelli Date: Sun Mar 11 11:59:01 2018 +0100 Make transpose-regions interactive (Bug#30343) * doc/emacs/fixit.texi (Transpose): Mention and explain the new command. * editfns.c (Ftranspose_regions): Add an interactive calling specification, and add documentation for it. diff --git a/doc/emacs/fixit.texi b/doc/emacs/fixit.texi index 7cacac4240..eb783d175c 100644 --- a/doc/emacs/fixit.texi +++ b/doc/emacs/fixit.texi @@ -149,6 +149,8 @@ Transpose two words (@code{transpose-words}). Transpose two balanced expressions (@code{transpose-sexps}). @item C-x C-t Transpose two lines (@code{transpose-lines}). +@item M-x transpose-regions +Transpose two regions. @end table @kindex C-t @@ -204,6 +206,15 @@ otherwise a command with a repeat count of zero would do nothing): to transpose the character (or word or expression or line) ending after point with the one ending after the mark. +@findex transpose-regions + @kbd{M-x transpose-regions} transposes the text between point and +mark with the text between the last two marks pushed to the mark ring +(@pxref{Setting Mark}). With a numeric prefix argument, it transposes +the text between point and mark with the text between two successive +marks that many entries back in the mark ring. This command is best +used for transposing multiple characters (or words or sentences or +paragraphs) in one go. + @node Fixing Case @section Case Conversion diff --git a/src/editfns.c b/src/editfns.c index debe10572d..6ecc83fc30 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -5100,7 +5100,16 @@ transpose_markers (ptrdiff_t start1, ptrdiff_t end1, } } -DEFUN ("transpose-regions", Ftranspose_regions, Stranspose_regions, 4, 5, 0, +DEFUN ("transpose-regions", Ftranspose_regions, Stranspose_regions, 4, 5, + "(if (< (length mark-ring) 2)\ + (error \"Other region must be marked before transposing two regions\")\ + (let* ((num (if current-prefix-arg\ + (prefix-numeric-value current-prefix-arg)\ + 0))\ + (ring-length (length mark-ring))\ + (eltnum (mod num ring-length))\ + (eltnum2 (mod (1+ num) ring-length)))\ + (list (point) (mark) (elt mark-ring eltnum) (elt mark-ring eltnum2))))", doc: /* Transpose region STARTR1 to ENDR1 with STARTR2 to ENDR2. The regions should not be overlapping, because the size of the buffer is never changed in a transposition. @@ -5108,7 +5117,14 @@ never changed in a transposition. Optional fifth arg LEAVE-MARKERS, if non-nil, means don't update any markers that happen to be located in the regions. -Transposing beyond buffer boundaries is an error. */) +Transposing beyond buffer boundaries is an error. + +Interactively, STARTR1 and ENDR1 are point and mark; STARTR2 and ENDR2 +are the last two marks pushed to the mark ring; LEAVE-MARKERS is nil. +If a prefix argument N is given, STARTR2 and ENDR2 are the two +successive marks N entries back in the mark ring. A negative prefix +argument instead counts forward from the oldest mark in the mark +ring. */) (Lisp_Object startr1, Lisp_Object endr1, Lisp_Object startr2, Lisp_Object endr2, Lisp_Object leave_markers) { register ptrdiff_t start1, end1, start2, end2; commit 806a0c77490e2f997b3498829c8d63a00e504b6b Author: Charles A. Roelli Date: Sun Mar 11 11:48:08 2018 +0100 Unify documentation on 'save-some-buffers' * doc/emacs/files.texi (Save Commands): Include some more keys that can be used in 'save-some-buffers'. * lisp/files.el (save-some-buffers): Include the same keys as above, and document all missing ones. diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi index fd35096f96..77bdb6ee44 100644 --- a/doc/emacs/files.texi +++ b/doc/emacs/files.texi @@ -400,11 +400,14 @@ possible responses are analogous to those of @code{query-replace}: @table @kbd @item y +@item @key{SPC} Save this buffer and ask about the rest of the buffers. @item n +@item @key{DEL} Don't save this buffer, but ask about the rest of the buffers. @item ! Save this buffer and all the rest with no more questions. +@item q @c following generates acceptable underfull hbox @item @key{RET} Terminate @code{save-some-buffers} without any more saving. diff --git a/lisp/files.el b/lisp/files.el index b887a34791..fbd3425cbb 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -5209,9 +5209,14 @@ about certain files that you'd usually rather not save." (defun save-some-buffers (&optional arg pred) "Save some modified file-visiting buffers. Asks user about each one. -You can answer `y' to save, `n' not to save, `C-r' to look at the -buffer in question with `view-buffer' before deciding or `d' to -view the differences using `diff-buffer-with-file'. +You can answer `y' or SPC to save, `n' or DEL not to save, `C-r' +to look at the buffer in question with `view-buffer' before +deciding, `d' to view the differences using +`diff-buffer-with-file', `!' to save the buffer and all remaining +buffers without any further querying, `.' to save only the +current buffer and skip the remaining ones and `q' or RET to exit +the function without saving any more buffers. `C-h' displays a +help message describing these options. This command first saves any buffers where `buffer-save-without-query' is non-nil, without asking. commit 9bef4ef45732d2f2e2a917dcd5659fb1767a0e5d Author: Charles A. Roelli Date: Sun Mar 11 11:25:01 2018 +0100 * lisp/simple.el (mark-whole-buffer): Clarify its behavior. diff --git a/lisp/simple.el b/lisp/simple.el index 60a00286f8..fa93cf87c7 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -1130,6 +1130,7 @@ the actual saved text might be different from what was killed." (defun mark-whole-buffer () "Put point at beginning and mark at end of buffer. +Also push mark at point before pushing mark at end of buffer. If narrowing is in effect, only uses the accessible part of the buffer. You probably should not use this function in Lisp programs; it is usually a mistake for a Lisp function to use any subroutine commit 08aa6a0533c44771fb8c43771d806d3bf6ac3776 Author: Charles A. Roelli Date: Sun Mar 11 11:13:47 2018 +0100 Improve and make use of 'image--get-image' * lisp/image.el (image--get-image): Add documentation, and check overlays for images too (since function 'put-image' from the same library uses overlays to insert images). (image-save): Use 'image--get-image'. diff --git a/lisp/image.el b/lisp/image.el index b69bf93054..ab868f7db3 100644 --- a/lisp/image.el +++ b/lisp/image.el @@ -971,7 +971,8 @@ default is 20%." 0.8))) (defun image--get-image () - (let ((image (get-text-property (point) 'display))) + "Return the image at point." + (let ((image (get-char-property (point) 'display))) (unless (eq (car-safe image) 'image) (error "No image under point")) image)) @@ -1026,10 +1027,7 @@ default is 20%." (defun image-save () "Save the image under point." (interactive) - (let ((image (get-text-property (point) 'display))) - (when (or (not (consp image)) - (not (eq (car image) 'image))) - (error "No image under point")) + (let ((image (image--get-image))) (with-temp-buffer (let ((file (plist-get (cdr image) :file))) (if file commit d48f4c3be13f8894964dad160f98ff8a7c7c3561 Author: Paul Eggert Date: Sun Mar 11 00:18:34 2018 -0800 Port to NetBSD tzalloc Problem reported by Valery Ushakov (Bug#30738). * src/editfns.c (xtzalloc): Remove. (invalid_time_zone_specification): New function. (tzlookup): Port to NetBSD, where tzalloc can fail when the TZ string has an invalid value. diff --git a/src/editfns.c b/src/editfns.c index 3a34dd0980..debe10572d 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -117,14 +117,10 @@ emacs_mktime_z (timezone_t tz, struct tm *tm) return t; } -/* Allocate a timezone, signaling on failure. */ -static timezone_t -xtzalloc (char const *name) +static _Noreturn void +invalid_time_zone_specification (Lisp_Object zone) { - timezone_t tz = tzalloc (name); - if (!tz) - memory_full (SIZE_MAX); - return tz; + xsignal2 (Qerror, build_string ("Invalid time zone specification"), zone); } /* Free a timezone, except do not free the time zone for local time. @@ -205,9 +201,15 @@ tzlookup (Lisp_Object zone, bool settz) } } else - xsignal2 (Qerror, build_string ("Invalid time zone specification"), - zone); - new_tz = xtzalloc (zone_string); + invalid_time_zone_specification (zone); + + new_tz = tzalloc (zone_string); + if (!new_tz) + { + if (errno == ENOMEM) + memory_full (SIZE_MAX); + invalid_time_zone_specification (zone); + } } if (settz) commit f1c48b0ec521744826ed43ae27eed0e152c472bf Author: Glenn Morris Date: Sat Mar 10 19:15:56 2018 -0800 Remove many items obsolete since Emacs 22.1 Emacs 22.1 was five major releases and over decade ago. In bug reporting statistics, it's been absent for around 5 years. Ref: https://debbugs.gnu.org/stats/emacs.html This list can be reviewed before to the next release, but for now hopefully this motivates any needed external updates. * lisp/arc-mode.el (archive-mouse-extract): * lisp/bookmark.el (bookmark-exit-hooks): * lisp/comint.el (comint-use-prompt-regexp-instead-of-fields): * lisp/cus-edit.el (custom-face-save-command): * lisp/descr-text.el (describe-char-after): * lisp/desktop.el (desktop-enable, desktop-basefilename) (desktop-buffer-modes-to-save, desktop-buffer-misc-functions) (desktop-buffer-handlers, desktop-load-default): * lisp/dired-x.el (dired-omit-files-p): * lisp/frame.el (new-frame, set-default-font, delete-frame-hook) (blink-cursor): * lisp/generic-x.el (generic-define-mswindows-modes) (generic-define-unix-modes): * lisp/help.el (describe-project, view-todo): * lisp/hilit-chg.el (highlight-changes-colours): * lisp/ibuffer.el (ibuffer-elide-long-columns, ibuffer-hooks) (ibuffer-mode-hooks): * lisp/imenu.el (imenu-always-use-completion-buffer-p): * lisp/isearch.el (isearch-lazy-highlight-cleanup) (isearch-lazy-highlight-initial-delay) (isearch-lazy-highlight-interval) (isearch-lazy-highlight-max-at-a-time) (isearch-lazy-highlight-cleanup): * lisp/mwheel.el (mouse-wheel-down-button) (mouse-wheel-up-button, mouse-wheel-click-button): * lisp/novice.el (disabled-command-hook): * lisp/recentf.el (recentf-menu-append-commands-p): * lisp/savehist.el (savehist-load): * lisp/speedbar.el (speedbar-ignored-path-expressions) (speedbar-ignored-path-regexp, speedbar-add-ignored-path-regexp) (speedbar-line-path, speedbar-buffers-line-path, speedbar-path-line): * lisp/subr.el (assoc-ignore-case, assoc-ignore-representation) (x-lost-selection-hooks, x-sent-selection-hooks) (process-kill-without-query): * lisp/calendar/icalendar.el (icalendar-convert-diary-to-ical) (icalendar-extract-ical-from-buffer): * lisp/emacs-lisp/autoload.el (update-autoloads-from-directories): * lisp/emacs-lisp/derived.el (derived-mode-class): * lisp/emacs-lisp/generic.el (generic-font-lock-defaults): * lisp/emacs-lisp/timer.el (timer-set-time-with-usecs): * lisp/gnus/spam.el (spam-list-of-processors): * lisp/international/latin1-disp.el (latin1-char-displayable-p): * lisp/mail/rmail.el (rmail-pop-password, rmail-pop-password-required): * lisp/net/goto-addr.el (goto-address-at-mouse): * lisp/net/net-utils.el (ipconfig-program, ipconfig-program-options): * lisp/obsolete/iswitchb.el (iswitchb-use-fonts): * lisp/play/dunnet.el (dungeon-mode-map): * lisp/progmodes/compile.el (compilation-finish-function) * lisp/progmodes/cperl-mode.el (cperl-vc-header-alist) * lisp/progmodes/gud.el (tooltip-gud-modes, tooltip-gud-display) (tooltip-gud-toggle-dereference): * lisp/progmodes/pascal.el (pascal-outline): * lisp/progmodes/perl-mode.el (electric-perl-terminator): * lisp/textmodes/nroff-mode.el (count-text-lines) (forward-text-line, backward-text-line, electric-nroff-newline) (electric-nroff-mode): * lisp/vc/log-edit.el (vc-comment-ring, vc-comment-ring-index) (vc-previous-comment, vc-next-comment) (vc-comment-search-reverse, vc-comment-search-forward) (vc-comment-to-change-log): * lisp/vc/pcvs-info.el (cvs-display-full-path) (cvs-fileinfo->full-path): * lisp/vc/vc.el (vc-diff-switches-list): Remove items, obsolete since Emacs 22.1. * lisp/ibuffer.el (ibuffer-cached-elide-long-columns): Remove internal variable. (ibuffer-compile-make-eliding-form, ibuffer-check-formats): (ibuffer-mode): Remove support for ibuffer-elide-long-columns. * lisp/cedet/semantic/sb.el (semantic-sb-token-jump): Remove support for speedbar-line-path. * lisp/emacs-lisp/unsafep.el (assoc-ignore-case): Stop marking as side-effect-free. * lisp/gnus/spam.el (spam-group-processor-p): Remove support for spam-list-of-processors. * lisp/progmodes/compile.el (define-compilation-mode) (compilation-handle-exit): Remove support for compilation-finish-function. * lisp/progmodes/cperl-mode.el (cperl-mode): Remove support for cperl-vc-header-alist. ; * lisp/files.el: Comments. ; * etc/NEWS: List removed items. diff --git a/etc/NEWS b/etc/NEWS index 8d69dc6b53..f35a5134a9 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -290,6 +290,41 @@ This feature uses Tramp and works only on systems which support GVFS, i.e. GNU/Linux, roughly spoken. See the chapter "(tramp) Archive file names" in the Tramp manual for full documentation of these facilities. +** Some functions and variables obsolete since 22.1 have been removed: +archive-mouse-extract, assoc-ignore-case, assoc-ignore-representation, +backward-text-line, blink-cursor, bookmark-exit-hooks, +comint-use-prompt-regexp-instead-of-fields, compilation-finish-function, +count-text-lines, cperl-vc-header-alist, custom-face-save-command, +cvs-display-full-path, cvs-fileinfo->full-path, delete-frame-hook, +derived-mode-class, describe-char-after, describe-project, +desktop-basefilename, desktop-buffer-handlers, +desktop-buffer-misc-functions, desktop-buffer-modes-to-save, +desktop-enable, desktop-load-default, dired-omit-files-p, +disabled-command-hook, dungeon-mode-map, electric-nroff-mode, +electric-nroff-newline, electric-perl-terminator, forward-text-line, +generic-define-mswindows-modes, generic-define-unix-modes, +generic-font-lock-defaults, goto-address-at-mouse, +highlight-changes-colours, ibuffer-elide-long-columns, ibuffer-hooks, +ibuffer-mode-hooks, icalendar-convert-diary-to-ical, +icalendar-extract-ical-from-buffer, imenu-always-use-completion-buffer-p, +ipconfig-program, ipconfig-program-options, isearch-lazy-highlight-cleanup, +isearch-lazy-highlight-cleanup, isearch-lazy-highlight-initial-delay, +isearch-lazy-highlight-interval, isearch-lazy-highlight-max-at-a-time, +iswitchb-use-fonts, latin1-char-displayable-p, mouse-wheel-click-button, +mouse-wheel-down-button, mouse-wheel-up-button, new-frame, pascal-outline, +process-kill-without-query, recentf-menu-append-commands-p, +rmail-pop-password, rmail-pop-password-required, savehist-load, +set-default-font, spam-list-of-processors, +speedbar-add-ignored-path-regexp, speedbar-buffers-line-path, +speedbar-buffers-line-path, speedbar-ignored-path-expressions, +speedbar-ignored-path-regexp, speedbar-line-path, speedbar-path-line, +timer-set-time-with-usecs, tooltip-gud-display, tooltip-gud-modes, +tooltip-gud-toggle-dereference, update-autoloads-from-directories, +vc-comment-ring, vc-comment-ring-index, vc-comment-search-forward, +vc-comment-search-reverse, vc-comment-to-change-log, vc-diff-switches-list, +vc-next-comment, vc-previous-comment, view-todo, x-lost-selection-hooks, +x-sent-selection-hooks + * Incompatible Lisp Changes in Emacs 27.1 diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el index ce3ec09e28..4ddb29dcbb 100644 --- a/lisp/arc-mode.el +++ b/lisp/arc-mode.el @@ -1010,8 +1010,6 @@ using `make-temp-file', and the generated name is returned." (kill-local-variable 'buffer-file-coding-system) (after-insert-file-set-coding (- (point-max) (point-min)))))) -(define-obsolete-function-alias 'archive-mouse-extract 'archive-extract "22.1") - (defun archive-extract (&optional other-window-p event) "In archive mode, extract this entry of the archive into its own buffer." (interactive (list nil last-input-event)) diff --git a/lisp/bookmark.el b/lisp/bookmark.el index 70b63a22b8..a454ccb3ae 100644 --- a/lisp/bookmark.el +++ b/lisp/bookmark.el @@ -2251,8 +2251,6 @@ 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.") diff --git a/lisp/calendar/icalendar.el b/lisp/calendar/icalendar.el index ca3adfaeeb..c1a3e0a421 100644 --- a/lisp/calendar/icalendar.el +++ b/lisp/calendar/icalendar.el @@ -43,13 +43,13 @@ ;; 0.06: (2004-10-06) ;; - Bugfixes regarding icalendar-import-format-*. -;; - Fix in icalendar-convert-diary-to-ical -- thanks to Philipp Grau. +;; - Fix in icalendar-export-file -- thanks to Philipp Grau. ;; 0.05: (2003-06-19) ;; - New import format scheme: Replaced icalendar-import-prefix-*, ;; icalendar-import-ignored-properties, and ;; icalendar-import-separator with icalendar-import-format(-*). -;; - icalendar-import-file and icalendar-convert-diary-to-ical +;; - icalendar-import-file and icalendar-export-file ;; have an extra parameter which should prevent them from ;; erasing their target files (untested!). ;; - Tested with Emacs 21.3.2 @@ -996,9 +996,6 @@ Finto iCalendar file: ") (set-buffer (find-file diary-filename)) (icalendar-export-region (point-min) (point-max) ical-filename))) -(define-obsolete-function-alias 'icalendar-convert-diary-to-ical - 'icalendar-export-file "22.1") - (defvar icalendar--uid-count 0 "Auxiliary counter for creating unique ids.") @@ -2027,9 +2024,6 @@ buffer `*icalendar-errors*'." ;; return nil, i.e. import did not work nil))) -(define-obsolete-function-alias 'icalendar-extract-ical-from-buffer - 'icalendar-import-buffer "22.1") - (defun icalendar--format-ical-event (event) "Create a string representation of an iCalendar EVENT." (if (functionp icalendar-import-format) diff --git a/lisp/cedet/semantic/sb.el b/lisp/cedet/semantic/sb.el index 739f674214..443c3839bb 100644 --- a/lisp/cedet/semantic/sb.el +++ b/lisp/cedet/semantic/sb.el @@ -298,11 +298,7 @@ TEXT TOKEN and INDENT are the details." "Jump to the location specified in token. TEXT TOKEN and INDENT are the details." (let ((file - (or - (cond ((fboundp 'speedbar-line-path) - (speedbar-line-directory indent)) - ((fboundp 'speedbar-line-directory) - (speedbar-line-directory indent))) + (or (speedbar-line-directory indent) ;; If speedbar cannot figure this out, extract the filename from ;; the token. True for Analysis mode. (semantic-tag-file-name token))) diff --git a/lisp/comint.el b/lisp/comint.el index 838662a59a..3182cba866 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -429,9 +429,6 @@ See `comint-send-input'." :type 'boolean :group 'comint) -(define-obsolete-variable-alias 'comint-use-prompt-regexp-instead-of-fields - 'comint-use-prompt-regexp "22.1") - ;; Note: If it is decided to purge comint-prompt-regexp from the source ;; entirely, searching for uses of this variable will help to identify ;; places that need attention. diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 816c7f7881..a12897e799 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -3790,10 +3790,6 @@ Optional EVENT is the location for the menu." (custom-save-all) (custom-face-state-set-and-redraw widget)) -;; For backward compatibility. -(define-obsolete-function-alias 'custom-face-save-command 'custom-face-save - "22.1") - (defun custom-face-reset-saved (widget) "Restore WIDGET to the face's default attributes. If there is a saved face, restore it; otherwise reset to the diff --git a/lisp/descr-text.el b/lisp/descr-text.el index ddd7d801d2..d8f8188eb1 100644 --- a/lisp/descr-text.el +++ b/lisp/descr-text.el @@ -835,8 +835,6 @@ relevant to POS." (if text-props-desc (insert text-props-desc)) (setq buffer-read-only t)))))) -(define-obsolete-function-alias 'describe-char-after 'describe-char "22.1") - ;;; Describe-Char-ElDoc (defun describe-char-eldoc--truncate (name width) diff --git a/lisp/desktop.el b/lisp/desktop.el index 8bd44658d8..0a1a4d5f23 100644 --- a/lisp/desktop.el +++ b/lisp/desktop.el @@ -158,8 +158,6 @@ Used at desktop read to provide 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). @@ -248,9 +246,6 @@ the normal hook `desktop-not-loaded-hook' is run." :group 'desktop :version "22.2") -(define-obsolete-variable-alias 'desktop-basefilename - 'desktop-base-file-name "22.1") - (defcustom desktop-base-file-name (convert-standard-filename ".emacs.desktop") "Name of file for Emacs desktop, excluding the directory part." @@ -494,10 +489,6 @@ When file names are returned, they should be formatted using the call Later, when `desktop-read' evaluates the desktop file, auxiliary information is passed as the argument DESKTOP-BUFFER-MISC to functions in `desktop-buffer-mode-handlers'.") -(make-obsolete-variable 'desktop-buffer-modes-to-save - 'desktop-save-buffer "22.1") -(make-obsolete-variable 'desktop-buffer-misc-functions - 'desktop-save-buffer "22.1") ;;;###autoload (defvar desktop-buffer-mode-handlers nil @@ -541,8 +532,6 @@ can guess how to load the mode's definition.") ;;;###autoload (put 'desktop-buffer-mode-handlers 'risky-local-variable t) -(make-obsolete-variable 'desktop-buffer-handlers - 'desktop-buffer-mode-handlers "22.1") (defcustom desktop-minor-mode-table '((auto-fill-function auto-fill-mode) @@ -1309,17 +1298,6 @@ Using it may cause conflicts. Use it anyway? " owner))))) (message "No desktop file.") nil))) -;; ---------------------------------------------------------------------------- -;; Maintained for backward compatibility -;;;###autoload -(defun desktop-load-default () - "Load the `default' start-up library manually. -Also inhibit further loading of it." - (declare (obsolete desktop-save-mode "22.1")) - (unless inhibit-default-init ; safety check - (load "default" t t) - (setq inhibit-default-init t))) - ;; ---------------------------------------------------------------------------- ;;;###autoload (defun desktop-change-dir (dirname) diff --git a/lisp/dired-x.el b/lisp/dired-x.el index fa36083e14..a1c2f4484c 100644 --- a/lisp/dired-x.el +++ b/lisp/dired-x.el @@ -137,8 +137,6 @@ folding to be used on case-insensitive filesystems only." (file-name-case-insensitive-p dir) dired-omit-case-fold)) -;; 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 diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el index 7b4a7d04f9..5274ec880c 100644 --- a/lisp/emacs-lisp/autoload.el +++ b/lisp/emacs-lisp/autoload.el @@ -1145,9 +1145,6 @@ write its autoloads into the specified file instead." ;; file-local autoload-generated-file settings. (autoload-save-buffers)))) -(define-obsolete-function-alias 'update-autoloads-from-directories - 'update-directory-autoloads "22.1") - ;;;###autoload (defun batch-update-autoloads () "Update loaddefs.el autoloads in batch mode. diff --git a/lisp/emacs-lisp/derived.el b/lisp/emacs-lisp/derived.el index 547f5cd805..6b47ffea07 100644 --- a/lisp/emacs-lisp/derived.el +++ b/lisp/emacs-lisp/derived.el @@ -286,19 +286,6 @@ No problems result if this variable is not bound. ;; Run the hooks (and delayed-after-hook-functions), if any. (run-mode-hooks ',hook))))) -;; PUBLIC: find the ultimate class of a derived mode. - -(defun derived-mode-class (mode) - "Find the class of a major MODE. -A mode's class is the first ancestor which is NOT a derived mode. -Use the `derived-mode-parent' property of the symbol to trace backwards. -Since major-modes might all derive from `fundamental-mode', this function -is not very useful." - (declare (obsolete derived-mode-p "22.1")) - (while (get mode 'derived-mode-parent) - (setq mode (get mode 'derived-mode-parent))) - mode) - ;;; PRIVATE diff --git a/lisp/emacs-lisp/generic.el b/lisp/emacs-lisp/generic.el index e2009bf4c2..194fa1e1c2 100644 --- a/lisp/emacs-lisp/generic.el +++ b/lisp/emacs-lisp/generic.el @@ -96,8 +96,6 @@ ;; 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) diff --git a/lisp/emacs-lisp/timer.el b/lisp/emacs-lisp/timer.el index b1e12b1fd5..795554fec5 100644 --- a/lisp/emacs-lisp/timer.el +++ b/lisp/emacs-lisp/timer.el @@ -141,20 +141,6 @@ omitted, they are treated as zero." (setf (timer--time timer) (timer-relative-time (timer--time timer) secs usecs psecs))) -(defun timer-set-time-with-usecs (timer time usecs &optional delta) - "Set the trigger time of TIMER to TIME plus USECS. -TIME must be in the internal format returned by, e.g., `current-time'. -The microsecond count from TIME is ignored, and USECS is used instead. -If optional fourth argument DELTA is a positive number, make the timer -fire repeatedly that many seconds apart." - (declare (obsolete "use `timer-set-time' and `timer-inc-time' instead." - "22.1")) - (setf (timer--time timer) time) - (setf (timer--usecs timer) usecs) - (setf (timer--psecs timer) 0) - (setf (timer--repeat-delay timer) (and (numberp delta) (> delta 0) delta)) - timer) - (defun timer-set-function (timer function &optional args) "Make TIMER call FUNCTION with optional ARGS when triggering." (timer--check timer) diff --git a/lisp/emacs-lisp/unsafep.el b/lisp/emacs-lisp/unsafep.el index f6b569bc7f..03f22ebf1a 100644 --- a/lisp/emacs-lisp/unsafep.el +++ b/lisp/emacs-lisp/unsafep.el @@ -93,7 +93,7 @@ in the parse.") (put 'unsafep-vars 'risky-local-variable t) ;;Side-effect-free functions from subr.el -(dolist (x '(assoc-default assoc-ignore-case butlast last match-string +(dolist (x '(assoc-default butlast last match-string match-string-no-properties member-ignore-case remove remq)) (put x 'side-effect-free t)) diff --git a/lisp/files.el b/lisp/files.el index 4b67b02c38..b887a34791 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -473,7 +473,7 @@ location of point in the current buffer." :group 'find-file) ;;;It is not useful to make this a local variable. -;;;(put 'find-file-not-found-hooks 'permanent-local t) +;;;(put 'find-file-not-found-functions '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 @@ -483,7 +483,8 @@ Variable `buffer-file-name' is already set up. The functions are called in the order given until one of them returns non-nil.") ;;;It is not useful to make this a local variable. -;;;(put 'find-file-hooks 'permanent-local t) +;;;(put 'find-file-hook 'permanent-local t) +;; I found some external files still using the obsolete form in 2018. (define-obsolete-variable-alias 'find-file-hooks 'find-file-hook "22.1") (defcustom find-file-hook nil "List of functions to be called after a buffer is loaded from a file. @@ -494,6 +495,7 @@ functions are called." :options '(auto-insert) :version "22.1") +;; I found some external files still using the obsolete form in 2018. (define-obsolete-variable-alias 'write-file-hooks 'write-file-functions "22.1") (defvar write-file-functions nil "List of functions to be called before saving a buffer to a file. @@ -513,6 +515,7 @@ 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) +;; I found some files still using the obsolete form in 2018. (defvar local-write-file-hooks nil) (make-variable-buffer-local 'local-write-file-hooks) (put 'local-write-file-hooks 'permanent-local t) diff --git a/lisp/frame.el b/lisp/frame.el index 0cf502d506..fbf2f6e773 100644 --- a/lisp/frame.el +++ b/lisp/frame.el @@ -614,9 +614,6 @@ frame.") (defvar after-setting-font-hook nil "Functions to run after a frame's font has been changed.") -;; Alias, kept temporarily. -(define-obsolete-function-alias 'new-frame 'make-frame "22.1") - (defvar frame-inherited-parameters '() "Parameters `make-frame' copies from the selected to the new frame.") @@ -1147,8 +1144,6 @@ FRAME defaults to the selected frame." (declare-function x-list-fonts "xfaces.c" (pattern &optional face frame maximum width)) -(define-obsolete-function-alias 'set-default-font 'set-frame-font "23.1") - (defun set-frame-font (font &optional keep-size frames) "Set the default font to FONT. When called interactively, prompt for the name of a font, and use @@ -2113,10 +2108,6 @@ a live frame and defaults to the selected one." (delete-frame this)) (setq this next)))) -;; miscellaneous obsolescence declarations -(define-obsolete-variable-alias 'delete-frame-hook - 'delete-frame-functions "22.1") - ;;; Window dividers. (defgroup window-divider nil @@ -2352,8 +2343,6 @@ This is done when a frame gets focus. Blink timers may be stopped by (remove-hook 'post-command-hook 'blink-cursor-check) (blink-cursor--start-idle-timer))) -(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 diff --git a/lisp/generic-x.el b/lisp/generic-x.el index 3e3ddc5ceb..d8a7fe3a73 100644 --- a/lisp/generic-x.el +++ b/lisp/generic-x.el @@ -241,30 +241,11 @@ This hook will be installed if the variable spice-generic-mode) "List of generic modes that are not defined by default.") -(defcustom generic-define-mswindows-modes - (memq system-type '(windows-nt ms-dos)) - "Non-nil means the modes in `generic-mswindows-modes' will be defined. -This is a list of MS-Windows specific generic modes. This variable -only affects the default value of `generic-extras-enable-list'." - :group 'generic-x - :type 'boolean - :version "22.1") -(make-obsolete-variable 'generic-define-mswindows-modes 'generic-extras-enable-list "22.1") - -(defcustom generic-define-unix-modes - (not (memq system-type '(windows-nt ms-dos))) - "Non-nil means the modes in `generic-unix-modes' will be defined. -This is a list of Unix specific generic modes. This variable only -affects the default value of `generic-extras-enable-list'." - :group 'generic-x - :type 'boolean - :version "22.1") -(make-obsolete-variable 'generic-define-unix-modes 'generic-extras-enable-list "22.1") - (defcustom generic-extras-enable-list (append generic-default-modes - (if generic-define-mswindows-modes generic-mswindows-modes) - (if generic-define-unix-modes generic-unix-modes) + (if (memq system-type '(windows-nt ms-dos)) + generic-mswindows-modes + generic-unix-modes) nil) "List of generic modes to define. Each entry in the list should be a symbol. If you set this variable diff --git a/lisp/gnus/spam.el b/lisp/gnus/spam.el index 71a69cb5f0..97e63404c4 100644 --- a/lisp/gnus/spam.el +++ b/lisp/gnus/spam.el @@ -1244,73 +1244,40 @@ Will not return a nil score." (setq found backend))) found)) -(defvar spam-list-of-processors - ;; note the nil processors are not defined in gnus.el - '((gnus-group-spam-exit-processor-bogofilter spam spam-use-bogofilter) - (gnus-group-spam-exit-processor-bsfilter spam spam-use-bsfilter) - (gnus-group-spam-exit-processor-blacklist spam spam-use-blacklist) - (gnus-group-spam-exit-processor-ifile spam spam-use-ifile) - (gnus-group-spam-exit-processor-stat spam spam-use-stat) - (gnus-group-spam-exit-processor-spamoracle spam spam-use-spamoracle) - (gnus-group-spam-exit-processor-spamassassin spam spam-use-spamassassin) - (gnus-group-spam-exit-processor-report-gmane spam spam-use-gmane) ;; Buggy? - (gnus-group-ham-exit-processor-ifile ham spam-use-ifile) - (gnus-group-ham-exit-processor-bogofilter ham spam-use-bogofilter) - (gnus-group-ham-exit-processor-bsfilter ham spam-use-bsfilter) - (gnus-group-ham-exit-processor-stat ham spam-use-stat) - (gnus-group-ham-exit-processor-whitelist ham spam-use-whitelist) - (gnus-group-ham-exit-processor-BBDB ham spam-use-BBDB) - (gnus-group-ham-exit-processor-copy ham spam-use-ham-copy) - (gnus-group-ham-exit-processor-spamassassin ham spam-use-spamassassin) - (gnus-group-ham-exit-processor-spamoracle ham spam-use-spamoracle)) - "The OBSOLETE `spam-list-of-processors' list. -This list contains pairs associating the obsolete ham/spam exit -processor variables with a classification and a spam-use-* -variable. When the processor variable is nil, just the -classification and spam-use-* check variable are used. This is -superseded by the new spam backend code, so it's only consulted -for backwards compatibility.") -(make-obsolete-variable 'spam-list-of-processors nil "22.1") - (defun spam-group-processor-p (group backend &optional classification) "Checks if GROUP has a BACKEND with CLASSIFICATION registered. -Also accepts the obsolete processors, which can be found in -gnus.el and in spam-list-of-processors. In the case of mover -backends, checks the setting of `spam-summary-exit-behavior' in -addition to the set values for the group." +In the case of mover backends, checks the setting of +`spam-summary-exit-behavior' in addition to the set values for the group." (if (and (stringp group) (symbolp backend)) - (let ((old-style (assq backend spam-list-of-processors)) - (parameters (nth 0 (gnus-parameter-spam-process group))) + (let ((parameters (nth 0 (gnus-parameter-spam-process group))) found) - (if old-style ; old-style processor - (spam-group-processor-p group (nth 2 old-style) (nth 1 old-style)) - ;; now search for the parameter - (dolist (parameter parameters) - (when (and (null found) - (listp parameter) - (eq classification (nth 0 parameter)) - (eq backend (nth 1 parameter))) - (setq found t))) - - ;; now, if the parameter was not found, do the - ;; spam-summary-exit-behavior-logic for mover backends - (unless found - (when (spam-backend-mover-p backend) - (setq - found - (cond - ((eq spam-summary-exit-behavior 'move-all) t) - ((eq spam-summary-exit-behavior 'move-none) nil) - ((eq spam-summary-exit-behavior 'default) - (or (eq classification 'spam) ;move spam out of all groups - ;; move ham out of spam groups - (and (eq classification 'ham) - (spam-group-spam-contents-p group)))) - (t (gnus-error 5 "Unknown spam-summary-exit-behavior: %s" - spam-summary-exit-behavior)))))) - - found)) + ;; now search for the parameter + (dolist (parameter parameters) + (when (and (null found) + (listp parameter) + (eq classification (nth 0 parameter)) + (eq backend (nth 1 parameter))) + (setq found t))) + + ;; now, if the parameter was not found, do the + ;; spam-summary-exit-behavior-logic for mover backends + (unless found + (when (spam-backend-mover-p backend) + (setq + found + (cond + ((eq spam-summary-exit-behavior 'move-all) t) + ((eq spam-summary-exit-behavior 'move-none) nil) + ((eq spam-summary-exit-behavior 'default) + (or (eq classification 'spam) ;move spam out of all groups + ;; move ham out of spam groups + (and (eq classification 'ham) + (spam-group-spam-contents-p group)))) + (t (gnus-error 5 "Unknown spam-summary-exit-behavior: %s" + spam-summary-exit-behavior)))))) + + found) nil)) ;;}}} diff --git a/lisp/help.el b/lisp/help.el index e923546032..0830dc5d3c 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -308,8 +308,6 @@ If that doesn't give a function, return nil." (interactive) (browse-url "https://www.gnu.org/gnu/thegnuproject.html")) -(define-obsolete-function-alias 'describe-project 'describe-gnu-project "22.2") - (defun describe-no-warranty () "Display info on all the kinds of warranty Emacs does NOT have." (interactive) @@ -413,9 +411,6 @@ With argument, display info only for the selected version." (interactive "P") (view-help-file "TODO")) -(define-obsolete-function-alias 'view-todo 'view-emacs-todo "22.2") - - (defun view-echo-area-messages () "View the log of recent echo-area messages: the `*Messages*' buffer. The number of messages retained in that buffer diff --git a/lisp/hilit-chg.el b/lisp/hilit-chg.el index de1ae0d457..7c5294fa17 100644 --- a/lisp/hilit-chg.el +++ b/lisp/hilit-chg.el @@ -204,9 +204,6 @@ :group 'highlight-changes) ;; A (not very good) default list of colors to rotate through. -(define-obsolete-variable-alias 'highlight-changes-colours - 'highlight-changes-colors "22.1") - (defcustom highlight-changes-colors (if (eq (frame-parameter nil 'background-mode) 'light) ;; defaults for light background: diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el index 38fffcb976..0fd2971934 100644 --- a/lisp/ibuffer.el +++ b/lisp/ibuffer.el @@ -224,14 +224,6 @@ view of the buffers." :group 'ibuffer) (defvar ibuffer-sorting-reversep nil) -(defcustom ibuffer-elide-long-columns nil - "If non-nil, then elide column entries which exceed their max length." - :type 'boolean - :group 'ibuffer) -(make-obsolete-variable 'ibuffer-elide-long-columns - "use the :elide argument of `ibuffer-formats'." - "22.1") - (defcustom ibuffer-eliding-string "..." "The string to use for eliding long columns." :type 'string @@ -349,15 +341,11 @@ directory, like `default-directory'." :type 'regexp :group 'ibuffer) -(define-obsolete-variable-alias 'ibuffer-hooks 'ibuffer-hook "22.1") - (defcustom ibuffer-hook nil "Hook run when `ibuffer' is called." :type 'hook :group 'ibuffer) -(define-obsolete-variable-alias 'ibuffer-mode-hooks 'ibuffer-mode-hook "22.1") - (defcustom ibuffer-mode-hook nil "Hook run upon entry into `ibuffer-mode'." :type 'hook @@ -952,7 +940,6 @@ directory, like `default-directory'." (defvar ibuffer-compiled-formats nil) (defvar ibuffer-cached-formats nil) (defvar ibuffer-cached-eliding-string nil) -(defvar ibuffer-cached-elide-long-columns 0) (defvar ibuffer-sorting-functions-alist nil "An alist of functions which describe how to sort buffers. @@ -1589,7 +1576,7 @@ If point is on a group name, this function operates on that group." (defun ibuffer-compile-make-eliding-form (strvar elide from-end-p) (let ((ellipsis (propertize ibuffer-eliding-string 'font-lock-face 'bold))) - (if (or elide (with-no-warnings ibuffer-elide-long-columns)) + (if elide `(if (> strlen 5) ,(if from-end-p ;; FIXME: this should probably also be using @@ -1789,9 +1776,6 @@ If point is on a group name, this function operates on that group." (not (eq ibuffer-cached-formats ibuffer-formats)) (null ibuffer-cached-eliding-string) (not (equal ibuffer-cached-eliding-string ibuffer-eliding-string)) - (eql 0 ibuffer-cached-elide-long-columns) - (not (eql ibuffer-cached-elide-long-columns - (with-no-warnings ibuffer-elide-long-columns))) (and ext-loaded (not (eq ibuffer-cached-filter-formats ibuffer-filter-format-alist)) @@ -1800,8 +1784,7 @@ If point is on a group name, this function operates on that group." (message "Formats have changed, recompiling...") (ibuffer-recompile-formats) (setq ibuffer-cached-formats ibuffer-formats - ibuffer-cached-eliding-string ibuffer-eliding-string - ibuffer-cached-elide-long-columns (with-no-warnings ibuffer-elide-long-columns)) + ibuffer-cached-eliding-string ibuffer-eliding-string) (when ext-loaded (setq ibuffer-cached-filter-formats ibuffer-filter-format-alist)) (message "Formats have changed, recompiling...done")))) @@ -2746,7 +2729,6 @@ will be inserted before the group at point." (set (make-local-variable 'ibuffer-compiled-formats) nil) (set (make-local-variable 'ibuffer-cached-formats) nil) (set (make-local-variable 'ibuffer-cached-eliding-string) nil) - (set (make-local-variable 'ibuffer-cached-elide-long-columns) nil) (set (make-local-variable 'ibuffer-current-format) nil) (set (make-local-variable 'ibuffer-did-modification) nil) (set (make-local-variable 'ibuffer-tmp-hide-regexps) nil) diff --git a/lisp/imenu.el b/lisp/imenu.el index f56e7b5039..b4d7d90359 100644 --- a/lisp/imenu.el +++ b/lisp/imenu.el @@ -102,14 +102,7 @@ This variable is buffer-local." :type 'integer :group 'imenu) -(defvar imenu-always-use-completion-buffer-p nil) -(make-obsolete-variable 'imenu-always-use-completion-buffer-p - 'imenu-use-popup-menu "22.1") - -(defcustom imenu-use-popup-menu - (if imenu-always-use-completion-buffer-p - (not (eq imenu-always-use-completion-buffer-p 'never)) - 'on-mouse) +(defcustom imenu-use-popup-menu 'on-mouse "Use a popup menu rather than a minibuffer prompt. If nil, always use a minibuffer prompt. If t, always use a popup menu, @@ -119,8 +112,7 @@ If `on-mouse' use a popup menu when `imenu' was invoked with the mouse." (other :tag "Always" t)) :group 'imenu) -(defcustom imenu-eager-completion-buffer - (not (eq imenu-always-use-completion-buffer-p 'never)) +(defcustom imenu-eager-completion-buffer t "If non-nil, eagerly popup the completion buffer." :type 'boolean :group 'imenu diff --git a/lisp/international/latin1-disp.el b/lisp/international/latin1-disp.el index 657f79097c..df2c1dc9a8 100644 --- a/lisp/international/latin1-disp.el +++ b/lisp/international/latin1-disp.el @@ -201,10 +201,6 @@ character set: `latin-2', `hebrew' etc." (char (and info (decode-char (car (remq 'ascii info)) ?\ )))) (and char (char-displayable-p char)))) -;; Backwards compatibility. -(define-obsolete-function-alias 'latin1-char-displayable-p - 'char-displayable-p "22.1") - (defun latin1-display-setup (set &optional force) "Set up Latin-1 display for characters in the given SET. SET must be a member of `latin1-display-sets'. Normally, check diff --git a/lisp/isearch.el b/lisp/isearch.el index 4f5f494875..84b121af9e 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -323,10 +323,6 @@ this variable is set to the symbol `all-windows'." :group 'isearch :group 'matching) -(define-obsolete-variable-alias 'isearch-lazy-highlight-cleanup - 'lazy-highlight-cleanup - "22.1") - (defcustom lazy-highlight-cleanup t "Controls whether to remove extra highlighting after a search. If this is nil, extra highlighting can be \"manually\" removed with @@ -334,28 +330,16 @@ If this is nil, extra highlighting can be \"manually\" removed with :type 'boolean :group 'lazy-highlight) -(define-obsolete-variable-alias 'isearch-lazy-highlight-initial-delay - 'lazy-highlight-initial-delay - "22.1") - (defcustom lazy-highlight-initial-delay 0.25 "Seconds to wait before beginning to lazily highlight all matches." :type 'number :group 'lazy-highlight) -(define-obsolete-variable-alias 'isearch-lazy-highlight-interval - 'lazy-highlight-interval - "22.1") - (defcustom lazy-highlight-interval 0 ; 0.0625 "Seconds between lazily highlighting successive matches." :type 'number :group 'lazy-highlight) -(define-obsolete-variable-alias 'isearch-lazy-highlight-max-at-a-time - 'lazy-highlight-max-at-a-time - "22.1") - (defcustom lazy-highlight-max-at-a-time nil ; 20 (bug#25751) "Maximum matches to highlight at a time (for `lazy-highlight'). Larger values may reduce Isearch's responsiveness to user input; @@ -3202,10 +3186,6 @@ This function is called when exiting an incremental search if (cancel-timer isearch-lazy-highlight-timer) (setq isearch-lazy-highlight-timer nil))) -(define-obsolete-function-alias 'isearch-lazy-highlight-cleanup - 'lazy-highlight-cleanup - "22.1") - (defun isearch-lazy-highlight-new-loop (&optional beg end) "Cleanup any previous `lazy-highlight' loop and begin a new one. BEG and END specify the bounds within which highlighting should occur. diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index 4e5873c06e..f2fdcb6367 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el @@ -191,9 +191,6 @@ Its name should end with a slash." :group 'rmail-retrieve :type '(choice (const nil) string)) -(define-obsolete-variable-alias 'rmail-pop-password - 'rmail-remote-password "22.1") - (defcustom rmail-remote-password nil "Password to use when reading mail from a remote server. This setting is ignored for mailboxes whose URL already contains a password." @@ -202,9 +199,6 @@ This setting is ignored for mailboxes whose URL already contains a password." :group 'rmail-retrieve :version "22.1") -(define-obsolete-variable-alias 'rmail-pop-password-required - 'rmail-remote-password-required "22.1") - (defcustom rmail-remote-password-required nil "Non-nil if a password is required when reading mail from a remote server." :type 'boolean diff --git a/lisp/mwheel.el b/lisp/mwheel.el index 44c4989ad0..f055df9ee8 100644 --- a/lisp/mwheel.el +++ b/lisp/mwheel.el @@ -52,38 +52,25 @@ ;; Sync the bindings. (when (bound-and-true-p mouse-wheel-mode) (mouse-wheel-mode 1))) -(defvar mouse-wheel-down-button 4) -(make-obsolete-variable 'mouse-wheel-down-button - 'mouse-wheel-down-event - "22.1") (defcustom mouse-wheel-down-event (if (or (featurep 'w32-win) (featurep 'ns-win)) 'wheel-up - (intern (format "mouse-%s" mouse-wheel-down-button))) + 'mouse-4) "Event used for scrolling down." :group 'mouse :type 'symbol :set 'mouse-wheel-change-button) -(defvar mouse-wheel-up-button 5) -(make-obsolete-variable 'mouse-wheel-up-button - 'mouse-wheel-up-event - "22.1") (defcustom mouse-wheel-up-event (if (or (featurep 'w32-win) (featurep 'ns-win)) 'wheel-down - (intern (format "mouse-%s" mouse-wheel-up-button))) + 'mouse-5) "Event used for scrolling up." :group 'mouse :type 'symbol :set 'mouse-wheel-change-button) -(defvar mouse-wheel-click-button 2) -(make-obsolete-variable 'mouse-wheel-click-button - 'mouse-wheel-click-event - "22.1") -(defcustom mouse-wheel-click-event - (intern (format "mouse-%s" mouse-wheel-click-button)) +(defcustom mouse-wheel-click-event 'mouse-2 "Event that should be temporarily inhibited after mouse scrolling. The mouse wheel is typically on the mouse-2 button, so it may easily happen that text is accidentally yanked into the buffer when diff --git a/lisp/net/goto-addr.el b/lisp/net/goto-addr.el index ed615d10eb..cc1cdd1518 100644 --- a/lisp/net/goto-addr.el +++ b/lisp/net/goto-addr.el @@ -220,10 +220,6 @@ and `goto-address-fontify-p'." ;; code to find and goto addresses; much of this has been blatantly ;; snarfed from browse-url.el -;;;###autoload -(define-obsolete-function-alias - 'goto-address-at-mouse 'goto-address-at-point "22.1") - ;;;###autoload (defun goto-address-at-point (&optional event) "Send to the e-mail address or load the URL at point. diff --git a/lisp/net/net-utils.el b/lisp/net/net-utils.el index 9edd42b857..c9e80804bd 100644 --- a/lisp/net/net-utils.el +++ b/lisp/net/net-utils.el @@ -86,8 +86,6 @@ These options can be used to limit how many ICMP packets are emitted." :group 'net-utils :type '(repeat string)) -(define-obsolete-variable-alias 'ipconfig-program 'ifconfig-program "22.2") - (defcustom ifconfig-program (cond ((eq system-type 'windows-nt) "ipconfig") ((executable-find "ifconfig") "ifconfig") @@ -99,9 +97,6 @@ These options can be used to limit how many ICMP packets are emitted." :group 'net-utils :type 'string) -(define-obsolete-variable-alias 'ipconfig-program-options - 'ifconfig-program-options "22.2") - (defcustom ifconfig-program-options (cond ((string-match "ipconfig\\'" ifconfig-program) '("/all")) ((string-match "ifconfig\\'" ifconfig-program) '("-a")) diff --git a/lisp/novice.el b/lisp/novice.el index b9cd568ace..aaad4fabfe 100644 --- a/lisp/novice.el +++ b/lisp/novice.el @@ -34,9 +34,6 @@ ;; The command is found in this-command ;; and the keys are returned by (this-command-keys). -;;;###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. diff --git a/lisp/obsolete/iswitchb.el b/lisp/obsolete/iswitchb.el index 55e81d08d1..d03621df3c 100644 --- a/lisp/obsolete/iswitchb.el +++ b/lisp/obsolete/iswitchb.el @@ -353,8 +353,6 @@ See also `iswitchb-newbuffer'." :type 'boolean :group 'iswitchb) -(define-obsolete-variable-alias 'iswitchb-use-fonts 'iswitchb-use-faces "22.1") - (defcustom iswitchb-use-faces t "Non-nil means use font-lock faces for showing first match." :type 'boolean diff --git a/lisp/play/dunnet.el b/lisp/play/dunnet.el index f22cc240c0..2b8bd9d6b8 100644 --- a/lisp/play/dunnet.el +++ b/lisp/play/dunnet.el @@ -2349,7 +2349,6 @@ for a moment, then straighten yourself up.\n") ;;;; This section sets up the keymaps for interactive and batch dunnet. ;;;; -(define-obsolete-variable-alias 'dungeon-mode-map 'dun-mode-map "22.1") (define-key dun-mode-map "\r" 'dun-parse) (defvar dungeon-batch-map (make-keymap)) (if (string= (substring emacs-version 0 2) "18") diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 422974379b..15503ee0b2 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -99,16 +99,6 @@ The function receives one argument, the name of the major mode of the compilation buffer. It should return a string. If nil, compute the name with `(concat \"*\" (downcase major-mode) \"*\")'.") -;;;###autoload -(defvar compilation-finish-function nil - "Function to call when a compilation process finishes. -It is called with two arguments: the compilation buffer, and a string -describing how the process finished.") - -(make-obsolete-variable 'compilation-finish-function - "use `compilation-finish-functions', but it works a little differently." - "22.1") - ;;;###autoload (defvar compilation-finish-functions nil "Functions to call when a compilation process finishes. @@ -2101,7 +2091,6 @@ by replacing the first word, e.g., `compilation-scroll-output' from compilation-error-regexp-alist compilation-error-regexp-alist-alist compilation-error-screen-columns - compilation-finish-function compilation-finish-functions compilation-first-column compilation-mode-font-lock-keywords @@ -2245,9 +2234,6 @@ commands of Compilation major mode are available. See (force-mode-line-update) (if (and opoint (< opoint omax)) (goto-char opoint)) - (with-no-warnings - (if compilation-finish-function - (funcall compilation-finish-function cur-buffer msg))) (run-hook-with-args 'compilation-finish-functions cur-buffer msg))) ;; Called when compilation process changes state. diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el index 8c0682ac1c..09a26ddbe0 100644 --- a/lisp/progmodes/cperl-mode.el +++ b/lisp/progmodes/cperl-mode.el @@ -390,13 +390,6 @@ Affects: `cperl-font-lock', `cperl-electric-lbrace-space', :type '(repeat string) :group 'cperl) -;; This became obsolete... -(defvar cperl-vc-header-alist nil) -(make-obsolete-variable - 'cperl-vc-header-alist - "use cperl-vc-rcs-header or cperl-vc-sccs-header instead." - "22.1") - ;; (defcustom cperl-clobber-mode-lists ;; (not ;; (and @@ -1727,9 +1720,8 @@ or as help on variables `cperl-tips', `cperl-problems', (when (featurep 'xemacs) ;; This one is obsolete... (set (make-local-variable 'vc-header-alist) - (or cperl-vc-header-alist ; Avoid warning - `((SCCS ,(car cperl-vc-sccs-header)) - (RCS ,(car cperl-vc-rcs-header)))))) + `((SCCS ,(car cperl-vc-sccs-header)) + (RCS ,(car cperl-vc-rcs-header))))) (cond ((boundp 'compilation-error-regexp-alist-alist);; xemacs 20.x (set (make-local-variable 'compilation-error-regexp-alist-alist) (cons (cons 'cperl (car cperl-compilation-error-regexp-alist)) diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 6aa9a7e4d4..2664d03e72 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -3397,9 +3397,6 @@ it if ARG is omitted or nil." (kill-local-variable 'gdb-define-alist) (remove-hook 'after-save-hook 'gdb-create-define-alist t)))) -(define-obsolete-variable-alias 'tooltip-gud-modes - 'gud-tooltip-modes "22.1") - (defcustom gud-tooltip-modes '(gud-mode c-mode c++-mode fortran-mode python-mode) "List of modes for which to enable GUD tooltips." @@ -3407,9 +3404,6 @@ it if ARG is omitted or nil." :group 'gud :group 'tooltip) -(define-obsolete-variable-alias 'tooltip-gud-display - 'gud-tooltip-display "22.1") - (defcustom gud-tooltip-display '((eq (tooltip-event-buffer gud-tooltip-event) (marker-buffer gud-overlay-arrow-position))) @@ -3501,8 +3495,6 @@ With arg, dereference expr if ARG is positive, otherwise do not dereference." (message "Dereferencing is now %s." (if gud-tooltip-dereference "on" "off"))) -(define-obsolete-function-alias 'tooltip-gud-toggle-dereference - 'gud-tooltip-dereference "22.1") (defvar tooltip-use-echo-area) (declare-function tooltip-show "tooltip" (text &optional use-echo-area)) (declare-function tooltip-strip-prompt "tooltip" (process output)) diff --git a/lisp/progmodes/pascal.el b/lisp/progmodes/pascal.el index 737dd9ea8a..58dc213d8a 100644 --- a/lisp/progmodes/pascal.el +++ b/lisp/progmodes/pascal.el @@ -1403,7 +1403,6 @@ The default is a name found in the buffer around point." map) "Keymap used in Pascal Outline mode.") -(define-obsolete-function-alias 'pascal-outline 'pascal-outline-mode "22.1") (define-minor-mode pascal-outline-mode "Outline-line minor mode for Pascal mode. With a prefix argument ARG, enable the mode if ARG is positive, diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el index c1d94acfa5..e667a97015 100644 --- a/lisp/progmodes/perl-mode.el +++ b/lisp/progmodes/perl-mode.el @@ -745,8 +745,6 @@ Turning on Perl mode runs the normal hook `perl-mode-hook'." 0 ;Existing comment at bol stays there. comment-column)) -(define-obsolete-function-alias 'electric-perl-terminator - 'perl-electric-terminator "22.1") (defun perl-electric-noindent-p (_char) ;; To reproduce the old behavior, ;, {, }, and : are made electric, but ;; we only want them to be electric at EOL. diff --git a/lisp/recentf.el b/lisp/recentf.el index b33f22d959..c3c4e45922 100644 --- a/lisp/recentf.el +++ b/lisp/recentf.el @@ -228,10 +228,6 @@ This item will replace the \"More...\" item." :group 'recentf :type 'boolean) -(define-obsolete-variable-alias 'recentf-menu-append-commands-p - 'recentf-menu-append-commands-flag - "22.1") - (defcustom recentf-menu-append-commands-flag t "Non-nil means to append command items to the menu." :group 'recentf diff --git a/lisp/savehist.el b/lisp/savehist.el index fbb5f53390..0a261b0b0c 100644 --- a/lisp/savehist.el +++ b/lisp/savehist.el @@ -204,29 +204,6 @@ histories, which is probably undesirable." (signal (car errvar) (cdr errvar))))) (savehist-install))) -(defun savehist-load () - "Load the variables stored in `savehist-file' and turn on Savehist mode. -If `savehist-file' is in the old format that doesn't record -the value of `savehist-minibuffer-history-variables', that -value is deducted from the contents of the file." - (declare (obsolete savehist-mode "22.1")) - (savehist-mode 1) - ;; Old versions of savehist distributed with XEmacs didn't save - ;; savehist-minibuffer-history-variables. If that variable is nil - ;; after loading the file, try to intuit the intended value. - (when (null savehist-minibuffer-history-variables) - (setq savehist-minibuffer-history-variables - (with-temp-buffer - (ignore-errors - (insert-file-contents savehist-file)) - (let ((vars ()) form) - (while (setq form (condition-case nil - (read (current-buffer)) (error nil))) - ;; Each form read is of the form (setq VAR VALUE). - ;; Collect VAR, i.e. (nth form 1). - (push (nth 1 form) vars)) - vars))))) - (defun savehist-install () "Hook Savehist into Emacs. Normally invoked by calling `savehist-mode' to set the minor mode. diff --git a/lisp/speedbar.el b/lisp/speedbar.el index 7915a52df3..a231163715 100644 --- a/lisp/speedbar.el +++ b/lisp/speedbar.el @@ -637,9 +637,6 @@ Created from `speedbar-ignored-directory-expressions' with the function Use the function `speedbar-add-ignored-directory-regexp', or customize the variable `speedbar-ignored-directory-expressions' to modify this variable.") -(define-obsolete-variable-alias 'speedbar-ignored-path-expressions - 'speedbar-ignored-directory-expressions "22.1") - (defcustom speedbar-ignored-directory-expressions '("[/\\]logs?[/\\]\\'") "List of regular expressions matching directories speedbar will ignore. @@ -4077,26 +4074,6 @@ TEXT is the buffer's name, TOKEN and INDENT are unused." (setq font-lock-global-modes (delq 'speedbar-mode font-lock-global-modes))))) -;;; Obsolete variables and functions - -(define-obsolete-variable-alias - 'speedbar-ignored-path-regexp 'speedbar-ignored-directory-regexp "22.1") - -(define-obsolete-function-alias 'speedbar-add-ignored-path-regexp - 'speedbar-add-ignored-directory-regexp "22.1") - -(define-obsolete-function-alias 'speedbar-line-path - 'speedbar-line-directory "22.1") - -(define-obsolete-function-alias 'speedbar-buffers-line-path - 'speedbar-buffers-line-directory "22.1") - -(define-obsolete-function-alias 'speedbar-path-line - 'speedbar-directory-line "22.1") - -(define-obsolete-function-alias 'speedbar-buffers-line-path - 'speedbar-buffers-line-directory "22.1") - (provide 'speedbar) ;; run load-time hooks diff --git a/lisp/subr.el b/lisp/subr.el index 056392a926..b621042c23 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -680,20 +680,6 @@ If TEST is omitted or nil, `equal' is used." (setq tail (cdr tail))) value)) -(defun assoc-ignore-case (key alist) - "Like `assoc', but ignores differences in case and text representation. -KEY must be a string. Upper-case and lower-case letters are treated as equal. -Unibyte strings are converted to multibyte for comparison." - (declare (obsolete assoc-string "22.1")) - (assoc-string key alist t)) - -(defun assoc-ignore-representation (key alist) - "Like `assoc', but ignores differences in text representation. -KEY must be a string. -Unibyte strings are converted to multibyte for comparison." - (declare (obsolete assoc-string "22.1")) - (assoc-string key alist nil)) - (defun member-ignore-case (elt list) "Like `member', but ignore differences in case and text representation. ELT must be a string. Upper-case and lower-case letters are treated as equal. @@ -1491,11 +1477,6 @@ be a list of the form returned by `event-start' and `event-end'." (make-obsolete-variable 'command-debug-status "expect it to be removed in a future version." "25.2") -(define-obsolete-variable-alias 'x-lost-selection-hooks - 'x-lost-selection-functions "22.1") -(define-obsolete-variable-alias 'x-sent-selection-hooks - 'x-sent-selection-functions "22.1") - ;; This was introduced in 21.4 for pre-unicode unification. That ;; usage was rendered obsolete in 23.1 which uses Unicode internally. ;; Other uses are possible, so this variable is not _really_ obsolete, @@ -2173,19 +2154,6 @@ process." (memq (process-status process) '(run open listen connect stop)))) -;; compatibility - -(defun process-kill-without-query (process &optional _flag) - "Say no query needed if PROCESS is running when Emacs is exited. -Optional second argument if non-nil says to require a query. -Value is t if a query was formerly required." - (declare (obsolete - "use `process-query-on-exit-flag' or `set-process-query-on-exit-flag'." - "22.1")) - (let ((old (process-query-on-exit-flag process))) - (set-process-query-on-exit-flag process nil) - old)) - (defun process-kill-buffer-query-function () "Ask before killing a buffer that has a running process." (let ((process (get-buffer-process (current-buffer)))) diff --git a/lisp/textmodes/nroff-mode.el b/lisp/textmodes/nroff-mode.el index 9c846292f1..6955ed25e1 100644 --- a/lisp/textmodes/nroff-mode.el +++ b/lisp/textmodes/nroff-mode.el @@ -328,13 +328,6 @@ otherwise off." (kill-buffer viewbuf)) (Man-getpage-in-background file))) -;; Old names that were not namespace clean. -(define-obsolete-function-alias 'count-text-lines 'nroff-count-text-lines "22.1") -(define-obsolete-function-alias 'forward-text-line 'nroff-forward-text-line "22.1") -(define-obsolete-function-alias 'backward-text-line 'nroff-backward-text-line "22.1") -(define-obsolete-function-alias 'electric-nroff-newline 'nroff-electric-newline "22.1") -(define-obsolete-function-alias 'electric-nroff-mode 'nroff-electric-mode "22.1") - (provide 'nroff-mode) ;;; nroff-mode.el ends here diff --git a/lisp/vc/log-edit.el b/lisp/vc/log-edit.el index 89b6201bab..6ff782a606 100644 --- a/lisp/vc/log-edit.el +++ b/lisp/vc/log-edit.el @@ -203,10 +203,7 @@ 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 "") @@ -311,13 +308,6 @@ automatically." (or (eobp) (looking-at "\n\n") (insert "\n")))) -;; Compatibility with old names. -(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") -(define-obsolete-function-alias 'vc-comment-search-forward 'log-edit-comment-search-forward "22.1") -(define-obsolete-function-alias 'vc-comment-to-change-log 'log-edit-comment-to-change-log "22.1") - ;;; ;;; Actual code ;;; diff --git a/lisp/vc/pcvs-info.el b/lisp/vc/pcvs-info.el index 7e72767055..edcfc6e6c4 100644 --- a/lisp/vc/pcvs-info.el +++ b/lisp/vc/pcvs-info.el @@ -39,9 +39,6 @@ ;;;; config variables ;;;; -(define-obsolete-variable-alias 'cvs-display-full-path - 'cvs-display-full-name "22.1") - (defcustom cvs-display-full-name t "Specifies how the filenames should be displayed in the listing. If non-nil, their full filename name will be displayed, else only the @@ -211,8 +208,6 @@ to confuse some users sometimes." ;; Here, I use `concat' rather than `expand-file-name' because I want ;; the resulting path to stay relative if `dir' is relative. (concat dir (cvs-fileinfo->file fileinfo))))) -(define-obsolete-function-alias 'cvs-fileinfo->full-path - 'cvs-fileinfo->full-name "22.1") (defun cvs-fileinfo->pp-name (fi) "Return the filename of FI as it should be displayed." diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 01dc47e808..7646af075f 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -1649,11 +1649,6 @@ to override the value of `vc-diff-switches' and `diff-switches'." ;; any switches in diff-switches. (when (listp switches) switches)))) -;; Old def for compatibility with Emacs-21.[123]. -(defmacro vc-diff-switches-list (backend) - (declare (obsolete vc-switches "22.1")) - `(vc-switches ',backend 'diff)) - (defun vc-diff-finish (buffer messages) ;; The empty sync output case has already been handled, so the only ;; possibility of an empty output is for an async process. commit 6a2d179a477d6d92fe9df78c4eee392cf83d6d4e Author: Stefan Monnier Date: Sat Mar 10 21:49:22 2018 -0500 eshell-eval-using-options: Avoid compiler warning differently * lisp/eshell/em-unix.el (eshell/time): * lisp/eshell/em-tramp.el (eshell/sudo): * lisp/eshell/esh-var.el (eshell/env): Remove artificial use of `args'. * lisp/eshell/esh-opt.el (eshell-eval-using-options): Silence warning when `args' is not used by `body-forms'. diff --git a/lisp/eshell/em-tramp.el b/lisp/eshell/em-tramp.el index 9a72f781fc..004c495490 100644 --- a/lisp/eshell/em-tramp.el +++ b/lisp/eshell/em-tramp.el @@ -109,7 +109,6 @@ Uses the system sudo through TRAMP's sudo method." :show-usage :usage "[(-u | --user) USER] COMMAND Execute a COMMAND as the superuser or another USER.") - args ; suppress "unused lexical variable" warning (throw 'eshell-external (let ((user (or user "root")) (host (or (file-remote-p default-directory 'host) diff --git a/lisp/eshell/em-unix.el b/lisp/eshell/em-unix.el index 04c517f82a..a18fb85507 100644 --- a/lisp/eshell/em-unix.el +++ b/lisp/eshell/em-unix.el @@ -956,7 +956,6 @@ Summarize disk usage of each FILE, recursively for directories.") :show-usage :usage "COMMAND... Show wall-clock time elapsed during execution of COMMAND.") - args ; suppress "unused lexical variable" warning (setq eshell-time-start (float-time)) (add-hook 'eshell-post-command-hook 'eshell-show-elapsed-time nil t) ;; after setting diff --git a/lisp/eshell/esh-opt.el b/lisp/eshell/esh-opt.el index 18852ce534..b802696306 100644 --- a/lisp/eshell/esh-opt.el +++ b/lisp/eshell/esh-opt.el @@ -95,8 +95,8 @@ BODY-FORMS. If instead an external command is run (because of an unknown option), the tag `eshell-external' will be thrown with the new process for its value. -Lastly, any remaining arguments will be available in a locally -interned variable `args' (created using a `let' form)." +Lastly, any remaining arguments will be available in the locally +let-bound variable `args'." (declare (debug (form form sexp body))) `(let* ((temp-args ,(if (memq ':preserve-args (cadr options)) @@ -111,7 +111,8 @@ interned variable `args' (created using a `let' form)." ;; `options' is of the form (quote OPTS). (cadr options)))) (args processed-args)) - ;; Unused lexical variable warning if body does not use `args'. + ;; Silence unused lexical variable warning if body does not use `args'. + (ignore args) ,@body-forms)) ;;; Internal Functions: diff --git a/lisp/eshell/esh-var.el b/lisp/eshell/esh-var.el index d400e0a9be..b5dce80de8 100644 --- a/lisp/eshell/esh-var.el +++ b/lisp/eshell/esh-var.el @@ -353,7 +353,6 @@ This function is explicit for adding to `eshell-parse-argument-hook'." '((?h "help" nil nil "show this usage screen") :external "env" :usage "") - args ; suppress "unused lexical variable" warning (dolist (setting (sort (eshell-environment-variables) 'string-lessp)) (eshell-buffered-print setting "\n")) (eshell-flush))) commit a3f26048a9b115e8dabffaa768128eaccd07dfd3 Merge: ab04a0941b 5c91ca8f30 Author: Paul Eggert Date: Sat Mar 10 18:30:54 2018 -0800 Merge from origin/emacs-26 5c91ca8 Fix create_process bug breaking eudc-expand-inline e244fed Clarify that nil doesn't match itself as a cl-case clause (Bu... df0e7e2 Improve SVG documentation a34ef52 Document the "URL" keyword in library headers fbc7f9a * test/lisp/international/mule-tests.el: Avoid local variable... 16faff6 ; * lisp/org/org-table.el: Replace obsolete alias in comment. commit ab04a0941b67a76575b99d89ba7ba3db1169b901 Merge: 767780169b 1bf6266ae3 Author: Paul Eggert Date: Sat Mar 10 18:30:54 2018 -0800 ; Merge from origin/emacs-26 The following commit was skipped: 1bf6266 Add missing findex entries for recently removed kindex entries commit 767780169b095b15d6be32ac5be1aba00f1ccbc2 Merge: 60c4cf6311 6af509ec67 Author: Paul Eggert Date: Sat Mar 10 18:30:54 2018 -0800 Merge from origin/emacs-26 6af509e Replace the obsolete process-kill-without-query in documentation 4df0d15 ; Tiny fix for recent doc change commit 5c91ca8f30098cb2593ca375daa82d25aef03ad7 Author: Paul Eggert Date: Sat Mar 10 18:26:01 2018 -0800 Fix create_process bug breaking eudc-expand-inline Problem reported by Thomas Fitzsimmons (Bug#30762). * src/process.c (create_process) [HAVE_PTYS]: Call setsid even if !PTY_FLAG. diff --git a/src/process.c b/src/process.c index bccc3ac399..b201e9b6ac 100644 --- a/src/process.c +++ b/src/process.c @@ -2087,9 +2087,9 @@ create_process (Lisp_Object process, char **new_argv, Lisp_Object current_dir) { /* Make the pty be the controlling terminal of the process. */ #ifdef HAVE_PTYS - /* First, disconnect its current controlling terminal. */ - if (pty_flag) - setsid (); + /* First, disconnect its current controlling terminal. + Do this even if !PTY_FLAG; see Bug#30762. */ + setsid (); /* Make the pty's terminal the controlling terminal. */ if (pty_flag && forkin >= 0) { commit 60c4cf6311b84ed7ec007702a0cdd7881f9f647c Author: Noam Postavsky Date: Sat Mar 10 21:01:24 2018 -0500 ; Revert "; Tracing for eieio-test random failure (Bug#24503)" The tracing seems to prevent the bug from happening. diff --git a/test/Makefile.in b/test/Makefile.in index 4024d0286f..42d9880e66 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -152,7 +152,6 @@ endif WRITE_LOG = > $@ 2>&1 || { STAT=$$?; cat $@; exit $$STAT; } ifdef EMACS_HYDRA_CI ## On Hydra, always show logs for certain problematic tests. -lisp/emacs-lisp/eieio-tests/eieio-tests.log \ lisp/net/tramp-tests.log \ : WRITE_LOG = 2>&1 | tee $@ endif diff --git a/test/lisp/emacs-lisp/eieio-tests/eieio-tests.el b/test/lisp/emacs-lisp/eieio-tests/eieio-tests.el index 69dc16443f..5ba094c007 100644 --- a/test/lisp/emacs-lisp/eieio-tests/eieio-tests.el +++ b/test/lisp/emacs-lisp/eieio-tests/eieio-tests.el @@ -887,34 +887,15 @@ Subclasses to override slot attributes.") (should (= (length (eieio-build-class-alist 'opt-test1 nil)) 2)) (should (= (length (eieio-build-class-alist 'opt-test1 t)) 1))) -(mapatoms (lambda (a) - (when (and (fboundp a) - (string-match "\\`cl--?generic" - (symbol-name a))) - (trace-function-background a)))) - (defclass eieio--testing () ()) (defmethod constructor :static ((_x eieio--testing) newname &rest _args) (list newname 2)) -(defun eieio-test-dump-trace () - (message "%s" (with-current-buffer "*trace-output*" - (goto-char (point-min)) - (while (re-search-forward "[\0-\010\013-\037]" nil t) - (insert (prog1 (format "\\%03o" (char-before)) - (delete-char -1)))) - (buffer-string)))) -(eieio-test-dump-trace) - (ert-deftest eieio-test-37-obsolete-name-in-constructor () ;; FIXME repeated intermittent failures on hydra and elsewhere (bug#24503). :tags '(:unstable) - (with-current-buffer "*trace-output*" - (erase-buffer)) - (unwind-protect - (should (equal (eieio--testing "toto") '("toto" 2))) - (eieio-test-dump-trace))) + (should (equal (eieio--testing "toto") '("toto" 2)))) (ert-deftest eieio-autoload () "Tests to see whether reftex-auc has been autoloaded" commit 864643929b7e241020c3a43b830d6ccf1c1726d8 Author: Noam Postavsky Date: Tue Mar 6 19:26:32 2018 -0500 Let warning about (:foo) be suppressible (Bug#30499) * lisp/emacs-lisp/bytecomp.el (byte-compile-form): Check byte-compile-warning-enabled-p before warning about funcalling const symbol. diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 1bf6d04b63..2a986f6cbb 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -3119,7 +3119,8 @@ for symbols generated by the byte compiler itself." (when (assq var byte-compile-lexical-variables) (byte-compile-report-error (format-message "%s cannot use lexical var `%s'" fn var)))))) - (when (macroexp--const-symbol-p fn) + (when (and (byte-compile-warning-enabled-p 'suspicious) + (macroexp--const-symbol-p fn)) (byte-compile-warn "`%s' called as a function" fn)) (when (and (byte-compile-warning-enabled-p 'interactive-only) interactive-only) commit fda58fbc245a3f6f6722261ffb2e2262231bd4ea Author: Dmitry Safronov Date: Mon Jan 22 12:19:00 2018 +0100 Fix wrong behavior of 'outline-headers-as-kill' command (Bug#30209) * outline.el (outline-headers-as-kill): Fix heading duplication. diff --git a/lisp/outline.el b/lisp/outline.el index 7cf56abd23..669935bbc1 100644 --- a/lisp/outline.el +++ b/lisp/outline.el @@ -1100,28 +1100,26 @@ convenient way to make a table of contents of the buffer." (save-restriction (narrow-to-region beg end) (goto-char (point-min)) - (let ((buffer (current-buffer)) - start end) - (with-temp-buffer - (with-current-buffer buffer - ;; Boundary condition: starting on heading: - (when (outline-on-heading-p) - (outline-back-to-heading) - (setq start (point) - end (progn (outline-end-of-heading) - (point))) - (insert-buffer-substring buffer start end) - (insert "\n\n"))) - (let ((temp-buffer (current-buffer))) - (with-current-buffer buffer - (while (outline-next-heading) - (unless (outline-invisible-p) - (setq start (point) - end (progn (outline-end-of-heading) (point))) - (with-current-buffer temp-buffer - (insert-buffer-substring buffer start end) - (insert "\n\n")))))) - (kill-new (buffer-string))))))) + (let ((buffer (current-buffer)) start end) + (with-temp-buffer + (let ((temp-buffer (current-buffer))) + (with-current-buffer buffer + ;; Boundary condition: starting on heading: + (when (outline-on-heading-p) + (outline-back-to-heading) + (setq start (point) + end (progn (outline-end-of-heading) (point))) + (with-current-buffer temp-buffer + (insert-buffer-substring buffer start end) + (insert "\n\n"))) + (while (outline-next-heading) + (unless (outline-invisible-p) + (setq start (point) + end (progn (outline-end-of-heading) (point))) + (with-current-buffer temp-buffer + (insert-buffer-substring buffer start end) + (insert "\n\n")))))) + (kill-new (buffer-string))))))) (provide 'outline) (provide 'noutline) commit e244fed5e041c706dd10c60bd893634902f04aaa Author: Noam Postavsky Date: Thu Mar 8 18:48:39 2018 -0500 Clarify that nil doesn't match itself as a cl-case clause (Bug#30749) * lisp/emacs-lisp/cl-macs.el (cl-case): Mention that the ATOM => (ATOM) short form is only for non-nil ATOMs. diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index e7f82ced48..971f4f926b 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el @@ -761,13 +761,15 @@ The result of the body appears to the compiler as a quoted constant." ;;;###autoload (defmacro cl-case (expr &rest clauses) "Eval EXPR and choose among clauses on that value. -Each clause looks like (KEYLIST BODY...). EXPR is evaluated and compared -against each key in each KEYLIST; the corresponding BODY is evaluated. -If no clause succeeds, cl-case returns nil. A single atom may be used in -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...)...)" +Each clause looks like (KEYLIST BODY...). EXPR is evaluated and +compared against each key in each KEYLIST; the corresponding BODY +is evaluated. If no clause succeeds, cl-case returns nil. A +single non-nil atom may be used in 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'. + +\(fn EXPR (KEYLIST BODY...)...)" (declare (indent 1) (debug (form &rest (sexp body)))) (macroexp-let2 macroexp-copyable-p temp expr (let* ((head-list nil)) commit df0e7e2b9e98e45353d3555448cb0f7d5a20a00d Author: Charles A. Roelli Date: Sat Mar 10 19:19:00 2018 +0100 Improve SVG documentation * doc/lispref/display.texi (ImageMagick Images): Remove an outdated comment that references a fixed bug. (SVG Images): Fix grammar, and call functions functions (there are no commands in lisp/svg.el). diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index dcd2fcffb4..2ac89ba970 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi @@ -5387,7 +5387,6 @@ hint to ImageMagick to help it detect the image type. Specifies a rotation angle in degrees. @item :index @var{frame} -@c Doesn't work: https://debbugs.gnu.org/7978 @xref{Multi-Frame Images}. @end table @@ -5396,8 +5395,8 @@ Specifies a rotation angle in degrees. @cindex SVG images SVG (Scalable Vector Graphics) is an XML format for specifying images. -If your Emacs build has with SVG support, you can create and manipulate -these images with the following commands. +If your Emacs build has SVG support, you can create and manipulate +these images with the following functions. @defun svg-create width height &rest args Create a new, empty SVG image with the specified dimensions. @@ -5411,7 +5410,7 @@ The default width (in pixels) of any lines created. The default stroke color on any lines created. @end table -This function returns an SVG structure, and all the following commands +This function returns an SVG structure, and all the following functions work on that structure. @end defun commit a34ef529642360130b32a6b5032ad6de2e24baa8 Author: Eli Zaretskii Date: Sat Mar 10 13:57:33 2018 +0200 Document the "URL" keyword in library headers * doc/lispref/tips.texi (Library Headers): "URL" is an alias for "Homepage". Suggested by Peter Oliver . (Bug#30571) diff --git a/doc/lispref/tips.texi b/doc/lispref/tips.texi index 0695d9b7b1..c62cfcfa8f 100644 --- a/doc/lispref/tips.texi +++ b/doc/lispref/tips.texi @@ -1043,7 +1043,8 @@ the place to write arbitrary keywords that describe their package, rather than just the relevant Finder keywords. @item Homepage -This line states the homepage of the library. +@itemx URL +These lines state the homepage of the library. @item Package-Version If @samp{Version} is not suitable for use by the package manager, then commit a8be860e17e2a737bda7a4c5075b71f0fb627a92 Author: Eli Zaretskii Date: Sat Mar 10 13:48:49 2018 +0200 Improve support for desktop restoration in daemon mode * lisp/server.el (server-after-make-frame-hook): New hook. (server-execute): Call it after creating a new frame or before switching to a buffer shown in a client frame. (Bug#30421) * doc/emacs/misc.texi (Saving Emacs Sessions): Adjust advice for restoring desktop in daemon mode to the new hook. * doc/lispref/frames.texi (Creating Frames, Standard Hooks): Document server-after-make-frame-hook. * etc/NEWS: Mention server-after-make-frame-hook. diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi index 60986347a7..68bd308983 100644 --- a/doc/emacs/misc.texi +++ b/doc/emacs/misc.texi @@ -2529,7 +2529,7 @@ e.g., the daemon cannot use GUI features, so parameters such as frame position, size, and decorations cannot be restored. For that reason, you may wish to delay restoring the desktop in daemon mode until the first client connects, by calling @code{desktop-read} in a hook -function that you add to @code{after-make-frame-functions} +function that you add to @code{server-after-make-frame-hook} (@pxref{Creating Frames,,, elisp, The Emacs Lisp Reference Manual}). @node Recursive Edit diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi index 2f9bb39886..459f05cb1c 100644 --- a/doc/lispref/frames.texi +++ b/doc/lispref/frames.texi @@ -181,6 +181,12 @@ the value of that parameter in the created frame to its value in the selected frame. @end defvar +@defopt server-after-make-frame-hook +A normal hook run when the Emacs server creates a client frame. When +this hook is called, the created frame is the selected one. +@xref{Emacs Server,,, emacs, The GNU Emacs Manual}. +@end defopt + @node Multiple Terminals @section Multiple Terminals diff --git a/doc/lispref/hooks.texi b/doc/lispref/hooks.texi index db4e413921..e374d02def 100644 --- a/doc/lispref/hooks.texi +++ b/doc/lispref/hooks.texi @@ -66,6 +66,7 @@ not exactly a hook, but does a similar job. @item after-make-frame-functions @itemx before-make-frame-hook +@itemx server-after-make-frame-hook @xref{Creating Frames}. @c Not general enough? diff --git a/etc/NEWS b/etc/NEWS index 14926ba2e3..8d69dc6b53 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -83,6 +83,15 @@ Customize the option 'mode-line-default-help-echo' to restore the old behavior where the tooltip text is also shown when the corresponding action does not apply. ++++ +** New hook 'server-after-make-frame-hook'. +This hook is a convenient place to perform initializations in daemon +mode which require GUI features to be available. One example is +restoration of the previous session using the desktop.el package: put +the call to 'desktop-read' in this hook, if you want the GUI settings +to be restored, or if desktop.el needs to interact with you during +restoration of the session. + +++ ** New function 'logcount' calculates an integer's Hamming weight. diff --git a/lisp/server.el b/lisp/server.el index a892203c24..ff03cbe622 100644 --- a/lisp/server.el +++ b/lisp/server.el @@ -188,6 +188,13 @@ space (this means characters from ! to ~; or from code 33 to :group 'server :type 'hook) +(defcustom server-after-make-frame-hook nil + "Hook run when the Emacs server creates a client frame. +The created frame is selected when the hook is called." + :group 'server + :type 'hook + :version "27.1") + (defcustom server-done-hook nil "Hook run when done editing a buffer for the Emacs server." :group 'server @@ -1336,9 +1343,11 @@ The following commands are accepted by the client: ((or isearch-mode (minibufferp)) nil) ((and frame (null buffers)) + (run-hooks 'server-after-make-frame-hook) (message "%s" (substitute-command-keys "When done with this frame, type \\[delete-frame]"))) ((not (null buffers)) + (run-hooks 'server-after-make-frame-hook) (server-switch-buffer (car buffers) nil (cdr (car files))) (run-hooks 'server-switch-hook) (unless nowait commit bbf53d99b57bd3d7fc0427d378df2efc6fa10e00 Author: Aaron Jensen Date: Sat Mar 10 13:14:28 2018 +0200 Allow underline position variables be buffer-local * src/nsterm.m (ns_draw_text_decoration): * src/w32term.c (x_draw_glyph_string): * src/xterm.c (x_draw_glyph_string): Allow underline-minimum-offset, underline-at-descent-line, and x-use-underline-position-properties be buffer local variables. (Bug#30553) * src/xdisp.c (syms_of_xdisp) : Add DEFSYM. diff --git a/src/nsterm.m b/src/nsterm.m index 1919c6defa..75e0b837c6 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -3487,23 +3487,38 @@ Note that CURSOR_WIDTH is meaningful only for (h)bar cursors. { struct font *font = font_for_underline_metrics (s); unsigned long descent = s->y + s->height - s->ybase; + unsigned long minimum_offset; + BOOL underline_at_descent_line, use_underline_position_properties; + Lisp_Object val = buffer_local_value (Qunderline_minimum_offset, + s->w->contents); + if (INTEGERP (val)) + minimum_offset = XFASTINT (val); + else + minimum_offset = 1; + val = buffer_local_value (Qx_underline_at_descent_line, + s->w->contents); + underline_at_descent_line = !(NILP (val) || EQ (val, Qunbound)); + val = buffer_local_value (Qx_use_underline_position_properties, + s->w->contents); + use_underline_position_properties = + !(NILP (val) || EQ (val, Qunbound)); /* Use underline thickness of font, defaulting to 1. */ thickness = (font && font->underline_thickness > 0) ? font->underline_thickness : 1; /* Determine the offset of underlining from the baseline. */ - if (x_underline_at_descent_line) + if (underline_at_descent_line) position = descent - thickness; - else if (x_use_underline_position_properties + else if (use_underline_position_properties && font && font->underline_position >= 0) position = font->underline_position; else if (font) position = lround (font->descent / 2); else - position = underline_minimum_offset; + position = minimum_offset; - position = max (position, underline_minimum_offset); + position = max (position, minimum_offset); /* Ensure underlining is not cropped. */ if (descent <= position) @@ -9465,11 +9480,14 @@ Nil means use fullscreen the old (< 10.7) way. The old way works better with x_use_underline_position_properties, doc: /* SKIP: real doc in xterm.c. */); x_use_underline_position_properties = 0; + DEFSYM (Qx_use_underline_position_properties, + "x-use-underline-position-properties"); DEFVAR_BOOL ("x-underline-at-descent-line", x_underline_at_descent_line, doc: /* SKIP: real doc in xterm.c. */); x_underline_at_descent_line = 0; + DEFSYM (Qx_underline_at_descent_line, "x-underline-at-descent-line"); /* Tell Emacs about this window system. */ Fprovide (Qns, Qnil); diff --git a/src/w32term.c b/src/w32term.c index 97afb678c1..24950dd25e 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -2475,31 +2475,52 @@ x_draw_glyph_string (struct glyph_string *s) else { struct font *font = font_for_underline_metrics (s); + unsigned long minimum_offset; + BOOL underline_at_descent_line; + BOOL use_underline_position_properties; + Lisp_Object val + = buffer_local_value (Qunderline_minimum_offset, + s->w->contents); + if (INTEGERP (val)) + minimum_offset = XFASTINT (val); + else + minimum_offset = 1; + val = buffer_local_value (Qx_underline_at_descent_line, + s->w->contents); + underline_at_descent_line + = !(NILP (val) || EQ (val, Qunbound)); + val + = buffer_local_value (Qx_use_underline_position_properties, + s->w->contents); + use_underline_position_properties + = !(NILP (val) || EQ (val, Qunbound)); /* Get the underline thickness. Default is 1 pixel. */ if (font && font->underline_thickness > 0) thickness = font->underline_thickness; else thickness = 1; - if (x_underline_at_descent_line || !font) + if (underline_at_descent_line + || !font) position = (s->height - thickness) - (s->ybase - s->y); else { - /* Get the underline position. This is the recommended - vertical offset in pixels from the baseline to the top of - the underline. This is a signed value according to the + /* Get the underline position. This is the + recommended vertical offset in pixels from + the baseline to the top of the underline. + This is a signed value according to the specs, and its default is ROUND ((maximum_descent) / 2), with ROUND (x) = floor (x + 0.5) */ - if (x_use_underline_position_properties + if (use_underline_position_properties && font->underline_position >= 0) position = font->underline_position; else position = (font->descent + 1) / 2; } - position = max (position, underline_minimum_offset); + position = max (position, minimum_offset); } /* Check the sanity of thickness and position. We should avoid drawing underline out of the current line area. */ @@ -7385,11 +7406,14 @@ the cursor have no effect. */); x_use_underline_position_properties, doc: /* SKIP: real doc in xterm.c. */); x_use_underline_position_properties = 0; + DEFSYM (Qx_use_underline_position_properties, + "x-use-underline-position-properties"); DEFVAR_BOOL ("x-underline-at-descent-line", x_underline_at_descent_line, doc: /* SKIP: real doc in xterm.c. */); x_underline_at_descent_line = 0; + DEFSYM (Qx_underline_at_descent_line, "x-underline-at-descent-line"); DEFVAR_LISP ("x-toolkit-scroll-bars", Vx_toolkit_scroll_bars, doc: /* SKIP: real doc in xterm.c. */); diff --git a/src/xdisp.c b/src/xdisp.c index c2b3f5d954..44eb1ebf05 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -33040,6 +33040,7 @@ particularly when using variable `x-use-underline-position-properties' with fonts that specify an UNDERLINE_POSITION relatively close to the baseline. The default value is 1. */); underline_minimum_offset = 1; + DEFSYM (Qunderline_minimum_offset, "underline-minimum-offset"); DEFVAR_BOOL ("display-hourglass", display_hourglass_p, doc: /* Non-nil means show an hourglass pointer, when Emacs is busy. diff --git a/src/xterm.c b/src/xterm.c index 0d25c7f1a2..db5ea4ac55 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -3707,33 +3707,53 @@ x_draw_glyph_string (struct glyph_string *s) else { struct font *font = font_for_underline_metrics (s); + unsigned long minimum_offset; + bool underline_at_descent_line; + bool use_underline_position_properties; + Lisp_Object val + = buffer_local_value (Qunderline_minimum_offset, + s->w->contents); + if (INTEGERP (val)) + minimum_offset = XFASTINT (val); + else + minimum_offset = 1; + val = buffer_local_value (Qx_underline_at_descent_line, + s->w->contents); + underline_at_descent_line + = !(NILP (val) || EQ (val, Qunbound)); + val + = buffer_local_value (Qx_use_underline_position_properties, + s->w->contents); + use_underline_position_properties + = !(NILP (val) || EQ (val, Qunbound)); /* Get the underline thickness. Default is 1 pixel. */ if (font && font->underline_thickness > 0) thickness = font->underline_thickness; else thickness = 1; - if (x_underline_at_descent_line) + if (underline_at_descent_line) position = (s->height - thickness) - (s->ybase - s->y); else { - /* Get the underline position. This is the recommended - vertical offset in pixels from the baseline to the top of - the underline. This is a signed value according to the + /* Get the underline position. This is the + recommended vertical offset in pixels from + the baseline to the top of the underline. + This is a signed value according to the specs, and its default is ROUND ((maximum descent) / 2), with ROUND(x) = floor (x + 0.5) */ - if (x_use_underline_position_properties + if (use_underline_position_properties && font && font->underline_position >= 0) position = font->underline_position; else if (font) position = (font->descent + 1) / 2; else - position = underline_minimum_offset; + position = minimum_offset; } - position = max (position, underline_minimum_offset); + position = max (position, minimum_offset); } /* Check the sanity of thickness and position. We should avoid drawing underline out of the current line area. */ @@ -13246,6 +13266,8 @@ UNDERLINE_POSITION font properties, set this to nil. You can also use `underline-minimum-offset' to override the font's UNDERLINE_POSITION for small font display sizes. */); x_use_underline_position_properties = true; + DEFSYM (Qx_use_underline_position_properties, + "x-use-underline-position-properties"); DEFVAR_BOOL ("x-underline-at-descent-line", x_underline_at_descent_line, @@ -13256,6 +13278,7 @@ A value of nil means to draw the underline according to the value of the variable `x-use-underline-position-properties', which is usually at the baseline level. The default value is nil. */); x_underline_at_descent_line = false; + DEFSYM (Qx_underline_at_descent_line, "x-underline-at-descent-line"); DEFVAR_BOOL ("x-mouse-click-focus-ignore-position", x_mouse_click_focus_ignore_position, commit 461e681822ff86132a6dc18b65eb2070cb006800 Author: Glenn Morris Date: Fri Mar 9 16:40:43 2018 -0500 * Makefile.in (check-declare): Also check test/ directory. diff --git a/Makefile.in b/Makefile.in index 66369cd25f..52d44d9708 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1158,6 +1158,7 @@ check-declare: exit 1; \ fi $(MAKE) -C lisp $@ + $(MAKE) -C test $@ .PHONY: gitmerge commit 6edbc03f8f79ae7b7765723b70a31aeae7351a0d Author: Glenn Morris Date: Fri Mar 9 16:39:51 2018 -0500 * test/Makefile.in (check-declare): New PHONY rule. diff --git a/test/Makefile.in b/test/Makefile.in index 1653263e7a..4024d0286f 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -296,3 +296,9 @@ distclean: clean rm -f Makefile maintainer-clean: distclean bootstrap-clean + +.PHONY: check-declare + +check-declare: + $(emacs) -l check-declare \ + --eval '(check-declare-directory "$(srcdir)")' commit d3ceff630ed723f3eef3c1f92e55a610d1c5ca5e Author: Glenn Morris Date: Fri Mar 9 16:38:02 2018 -0500 Quieten --without-json compilation of json-tests.el * test/src/json-tests.el (json-serialize, json-insert) (json-parse-string, json-parse-buffer): Declare. diff --git a/test/src/json-tests.el b/test/src/json-tests.el index 3bbf9eb96b..09067bad8c 100644 --- a/test/src/json-tests.el +++ b/test/src/json-tests.el @@ -26,6 +26,11 @@ (require 'cl-lib) (require 'map) +(declare-function json-serialize "json.c" (object)) +(declare-function json-insert "json.c" (object)) +(declare-function json-parse-string "json.c" (string &rest args)) +(declare-function json-parse-buffer "json.c" (&rest args)) + (define-error 'json-tests--error "JSON test error") (ert-deftest json-serialize/roundtrip () commit 01675be3871802374e27bb6597eab72d0717c1c4 Author: Glenn Morris Date: Fri Mar 9 16:36:50 2018 -0500 * test/lisp/vc/vc-tests.el (w32-application-type): Fix declaration. diff --git a/test/lisp/vc/vc-tests.el b/test/lisp/vc/vc-tests.el index 7fdf0626cd..cd774d301d 100644 --- a/test/lisp/vc/vc-tests.el +++ b/test/lisp/vc/vc-tests.el @@ -109,7 +109,7 @@ (require 'ert) (require 'vc) -(declare-function w32-application-type "w32proc") +(declare-function w32-application-type "w32proc.c") ;; The working horses. commit ae0634148e0a6242067c98260721be032bca283f Author: Paul Eggert Date: Fri Mar 9 12:06:05 2018 -0800 Fix string-to-number C-level mishandling * src/sysdep.c (list_system_processes): * src/xfaces.c (Finternal_set_lisp_face_attribute_from_resource): Defend against Fstring_to_number returning a float or a nonsense integer. diff --git a/src/sysdep.c b/src/sysdep.c index c59034ce5c..1eaf648ea7 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -3006,7 +3006,11 @@ list_system_processes (void) for (tail = proclist; CONSP (tail); tail = next) { next = XCDR (tail); - XSETCAR (tail, Fstring_to_number (XCAR (tail), Qnil)); + Lisp_Object pidstring = XCAR (tail); + Lisp_Object pid = Fstring_to_number (pidstring, Qnil); + if (!INTEGERP (pid) || XINT (pid) <= 0) + xsignal1 (Qoverflow_error, pidstring); + XSETCAR (tail, pid); } /* directory_files_internal returns the files in reverse order; undo diff --git a/src/xfaces.c b/src/xfaces.c index 77afee4587..56df06574a 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -3393,7 +3393,7 @@ DEFUN ("internal-set-lisp-face-attribute-from-resource", else if (EQ (attr, QCheight)) { value = Fstring_to_number (value, make_number (10)); - if (XINT (value) <= 0) + if (!INTEGERP (value) || XINT (value) <= 0) signal_error ("Invalid face height from X resource", value); } else if (EQ (attr, QCbold) || EQ (attr, QCitalic)) commit 94a59a6d8377db809b395175f7dbb81e8325dcf2 Author: Glenn Morris Date: Fri Mar 9 15:04:59 2018 -0500 Quieten compilation of some test/lisp files * test/lisp/dired-tests.el (dired-test-bug27243-02) (dired-test-bug27243-03, dired-test-bug27899) (dired-test-with-temp-dirs): Remove unused local variables. * test/lisp/hi-lock-tests.el (hi-lock-bug26666) (hi-lock-test-set-pattern): Mark unused arguments. * test/lisp/ses-tests.el (ses-tests-renamed-cells-row-insertion): Remove unused global "ses-tests-trigger". * test/lisp/simple-tests.el (line-number-at-pos-when-passing-point): Remove unused local "pos". * test/lisp/emacs-lisp/benchmark-tests.el (benchmark-tests): Pacify compiler. * test/lisp/emacs-lisp/package-tests.el (package-test-signed): Replace obsolete function epg-configuration. * test/lisp/ls-lisp-tests.el: * test/lisp/eshell/em-ls-tests.el: Require dired. * test/lisp/progmodes/ruby-mode-tests.el (ruby-forward-sexp-skips-method-calls-with-keyword-names): * test/lisp/vc/diff-mode-tests.el (diff-mode-test-ignore-trailing-dashes): Replace interactive funcs. diff --git a/test/lisp/dired-tests.el b/test/lisp/dired-tests.el index bb0e1bc388..49ae4bc040 100644 --- a/test/lisp/dired-tests.el +++ b/test/lisp/dired-tests.el @@ -210,12 +210,12 @@ (concat (file-name-as-directory test-dir) (file-name-as-directory "test-subdir")))) (push (dired-find-file) buffers) - (let ((pt2 (point))) ; Point is on test-file. - (switch-to-buffer buf) - ;; Sanity check: point should now be back on the subdirectory. - (should (eq (point) pt1)) - (push (dired test-dir) buffers) - (should (eq (point) pt1)))) + ;; Point is on test-file. + (switch-to-buffer buf) + ;; Sanity check: point should now be back on the subdirectory. + (should (eq (point) pt1)) + (push (dired test-dir) buffers) + (should (eq (point) pt1))) (dolist (buf buffers) (when (buffer-live-p buf) (kill-buffer buf))) (delete-directory test-dir t)))) @@ -224,7 +224,7 @@ "Test for https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27243#61 ." (let ((test-dir (make-temp-file "test-dir-" t)) (dired-auto-revert-buffer t) - test-subdir1 test-subdir2 allbufs) + allbufs) (unwind-protect (progn (with-current-buffer (find-file-noselect test-dir) @@ -294,9 +294,9 @@ (ert-deftest dired-test-bug27899 () "Test for https://debbugs.gnu.org/27899 ." - (let* ((dir (expand-file-name "src" source-directory)) - (buf (dired (list dir "cygw32.c" "alloc.c" "w32xfns.c" "xdisp.c"))) - (orig dired-hide-details-mode)) + (dired (list (expand-file-name "src" source-directory) + "cygw32.c" "alloc.c" "w32xfns.c" "xdisp.c")) + (let ((orig dired-hide-details-mode)) (dired-goto-file (expand-file-name "cygw32.c")) (forward-line 0) (unwind-protect @@ -362,8 +362,7 @@ (defmacro dired-test-with-temp-dirs (just-empty-dirs &rest body) "Helper macro for Bug#27940 test." (declare (indent 1) (debug body)) - (let ((dir (make-symbol "dir")) - (ignore-funcs (make-symbol "ignore-funcs"))) + (let ((dir (make-symbol "dir"))) `(let* ((,dir (make-temp-file "bug27940" t)) (dired-deletion-confirmer (lambda (_) "yes")) ; Suppress prompts. (inhibit-message t) diff --git a/test/lisp/emacs-lisp/benchmark-tests.el b/test/lisp/emacs-lisp/benchmark-tests.el index 8de7818bdb..cba53aefc9 100644 --- a/test/lisp/emacs-lisp/benchmark-tests.el +++ b/test/lisp/emacs-lisp/benchmark-tests.el @@ -23,9 +23,9 @@ (require 'ert) (ert-deftest benchmark-tests () - (let (str t-long t-short) - (should (consp (benchmark-run nil (1+ 0)))) - (should (consp (benchmark-run 1 (1+ 0)))) + (let (str t-long t-short m) + (should (consp (benchmark-run nil (setq m (1+ 0))))) + (should (consp (benchmark-run 1 (setq m (1+ 0))))) (should (stringp (benchmark nil (1+ 0)))) (should (stringp (benchmark 1 (1+ 0)))) (should (consp (benchmark-run-compiled nil (1+ 0)))) @@ -33,10 +33,10 @@ ;; First test is heavier, must need longer time. (should (> (car (benchmark-run nil (let ((n 100000)) (while (> n 1) (setq n (1- n)))))) - (car (benchmark-run nil (1+ 0))))) + (car (benchmark-run nil (setq m (1+ 0)))))) (should (> (car (benchmark-run nil (let ((n 100000)) (while (> n 1) (setq n (1- n)))))) - (car (benchmark-run nil (1+ 0))))) + (car (benchmark-run nil (setq m (1+ 0)))))) (should (> (car (benchmark-run-compiled nil (let ((n 100000)) (while (> n 1) (setq n (1- n)))))) (car (benchmark-run-compiled nil (1+ 0))))) @@ -46,6 +46,8 @@ (setq str (benchmark nil '(1+ 0))) (string-match "Elapsed time: \\([0-9.]+\\)" str) (setq t-short (string-to-number (match-string 1 str))) - (should (> t-long t-short)))) + (should (> t-long t-short)) + ;; Silence compiler. + m)) ;;; benchmark-tests.el ends here. diff --git a/test/lisp/emacs-lisp/package-tests.el b/test/lisp/emacs-lisp/package-tests.el index 83f5228488..0059c546ac 100644 --- a/test/lisp/emacs-lisp/package-tests.el +++ b/test/lisp/emacs-lisp/package-tests.el @@ -473,8 +473,8 @@ Must called from within a `tar-mode' buffer." (let ((process-environment (cons (format "HOME=%s" homedir) process-environment))) - (epg-check-configuration (epg-configuration)) - (epg-find-configuration 'OpenPGP)) + (epg-check-configuration + (epg-find-configuration 'OpenPGP))) (delete-directory homedir t))))) (let* ((keyring (expand-file-name "key.pub" package-test-data-dir)) (package-test-data-dir diff --git a/test/lisp/eshell/em-ls-tests.el b/test/lisp/eshell/em-ls-tests.el index 1ce832f1dc..c5c9eac324 100644 --- a/test/lisp/eshell/em-ls-tests.el +++ b/test/lisp/eshell/em-ls-tests.el @@ -26,6 +26,7 @@ (require 'ert) (require 'em-ls) +(require 'dired) (ert-deftest em-ls-test-bug27631 () "Test for https://debbugs.gnu.org/27631 ." diff --git a/test/lisp/hi-lock-tests.el b/test/lisp/hi-lock-tests.el index 40d76ee9de..4c639b03dc 100644 --- a/test/lisp/hi-lock-tests.el +++ b/test/lisp/hi-lock-tests.el @@ -29,7 +29,7 @@ (with-temp-buffer (insert "a A b B\n") (cl-letf (((symbol-function 'completing-read) - (lambda (prompt coll x y z hist defaults) + (lambda (_prompt _coll _x _y _z _hist defaults) (car defaults)))) (dotimes (_ 2) (let ((face (hi-lock-read-face-name))) @@ -41,7 +41,7 @@ (with-temp-buffer (insert "foo bar") (cl-letf (((symbol-function 'completing-read) - (lambda (prompt coll x y z hist defaults) + (lambda (_prompt _coll _x _y _z _hist defaults) (car defaults)))) (hi-lock-set-pattern "9999" (hi-lock-read-face-name)) ; No match (hi-lock-set-pattern "foo" (hi-lock-read-face-name))) diff --git a/test/lisp/ls-lisp-tests.el b/test/lisp/ls-lisp-tests.el index d16ffa3acd..91e8b0b701 100644 --- a/test/lisp/ls-lisp-tests.el +++ b/test/lisp/ls-lisp-tests.el @@ -26,6 +26,7 @@ ;;; Code: (require 'ert) (require 'ls-lisp) +(require 'dired) (ert-deftest ls-lisp-unload () "Test for https://debbugs.gnu.org/xxxxx ." diff --git a/test/lisp/progmodes/ruby-mode-tests.el b/test/lisp/progmodes/ruby-mode-tests.el index b16698fba1..72d83affae 100644 --- a/test/lisp/progmodes/ruby-mode-tests.el +++ b/test/lisp/progmodes/ruby-mode-tests.el @@ -705,13 +705,15 @@ VALUES-PLIST is a list with alternating index and value elements." (ert-deftest ruby-forward-sexp-skips-method-calls-with-keyword-names () (ruby-with-temp-buffer ruby-sexp-test-example - (goto-line 2) + (goto-char (point-min)) + (forward-line 1) (ruby-forward-sexp) (should (= 8 (line-number-at-pos))))) (ert-deftest ruby-backward-sexp-skips-method-calls-with-keyword-names () (ruby-with-temp-buffer ruby-sexp-test-example - (goto-line 8) + (goto-char (point-min)) + (forward-line 7) (end-of-line) (ruby-backward-sexp) (should (= 2 (line-number-at-pos))))) diff --git a/test/lisp/ses-tests.el b/test/lisp/ses-tests.el index c9966e237f..d08237e285 100644 --- a/test/lisp/ses-tests.el +++ b/test/lisp/ses-tests.el @@ -147,13 +147,10 @@ to A2 and inserting a row, makes A2 value empty, and A3 equal to (should-not A2) (should (eq A3 2))))) -; (defvar ses-tests-trigger nil) - (ert-deftest ses-tests-renamed-cells-row-insertion () "Check that setting A1 to 1 and A2 to (1+ A1), and then renaming A1 to `foo' and A2 to `bar' jumping to `bar' and inserting a row, makes A2 value empty, and `bar' equal to 2." - (setq ses-tests-trigger nil) (let ((ses-initial-size '(2 . 1))) (with-temp-buffer (ses-mode) diff --git a/test/lisp/simple-tests.el b/test/lisp/simple-tests.el index 91fdd5e816..64b341bd46 100644 --- a/test/lisp/simple-tests.el +++ b/test/lisp/simple-tests.el @@ -489,13 +489,12 @@ See Bug#21722." (should (equal pos (point)))))) (ert-deftest line-number-at-pos-when-passing-point () - (let (pos) - (with-temp-buffer - (insert "a\nb\nc\nd\n") - (should (equal (line-number-at-pos 1) 1)) - (should (equal (line-number-at-pos 3) 2)) - (should (equal (line-number-at-pos 5) 3)) - (should (equal (line-number-at-pos 7) 4))))) + (with-temp-buffer + (insert "a\nb\nc\nd\n") + (should (equal (line-number-at-pos 1) 1)) + (should (equal (line-number-at-pos 3) 2)) + (should (equal (line-number-at-pos 5) 3)) + (should (equal (line-number-at-pos 7) 4)))) ;;; Auto fill. diff --git a/test/lisp/vc/diff-mode-tests.el b/test/lisp/vc/diff-mode-tests.el index 1e35f9f7cd..7900e41b25 100644 --- a/test/lisp/vc/diff-mode-tests.el +++ b/test/lisp/vc/diff-mode-tests.el @@ -182,7 +182,7 @@ youthfulness (with-temp-buffer (cd temp-dir) (insert patch) - (beginning-of-buffer) + (goto-char (point-min)) (diff-apply-hunk) (diff-apply-hunk) (diff-apply-hunk)) commit fbc7f9ae44a2a705e37cb7d1f9585cfaac8d13ee Author: Glenn Morris Date: Fri Mar 9 14:05:36 2018 -0500 * test/lisp/international/mule-tests.el: Avoid local variables confusion. diff --git a/test/lisp/international/mule-tests.el b/test/lisp/international/mule-tests.el index 3c3bae1493..59c9ff5aab 100644 --- a/test/lisp/international/mule-tests.el +++ b/test/lisp/international/mule-tests.el @@ -36,4 +36,7 @@ (find-auto-coding "" (buffer-size))) '(utf-8 . :coding))))) +;; Stop "Local Variables" above causing confusion when visiting this file. + + ;;; mule-tests.el ends here commit 16faff6a46f28b4db2e9b91e52b27404303f3197 Author: Glenn Morris Date: Fri Mar 9 12:43:21 2018 -0500 ; * lisp/org/org-table.el: Replace obsolete alias in comment. diff --git a/lisp/org/org-table.el b/lisp/org/org-table.el index 3932671e8b..4bb5c91ce8 100644 --- a/lisp/org/org-table.el +++ b/lisp/org/org-table.el @@ -5428,7 +5428,7 @@ which will prompt for the width." ;; - orgtbl-uc-draw-cont (smooth unicode) ;; This is best viewed with the "DejaVu Sans Mono" font -;; (use M-x set-default-font). +;; (use M-x set-frame-font). (defun orgtbl-uc-draw-grid (value min max &optional width) "Draw a bar in a table using block unicode characters. commit 80e145fc96765cc0a0f48ae2425294c8c92bce56 Author: Paul Eggert Date: Thu Mar 8 20:55:55 2018 -0800 Avoid losing info when formatting integers * doc/lispref/numbers.texi (Integer Basics): Clarify that out-of-range integers are treated as floating point only when the integers are decimal. * etc/NEWS: Mention changes. * src/editfns.c (styled_format): Use %.0f when formatting %d or %i values outside machine integer range, to avoid losing info. Signal an error for %o or %x values that are too large to be formatted, to avoid losing info. diff --git a/doc/lispref/numbers.texi b/doc/lispref/numbers.texi index e692ee1cc2..f1180cf754 100644 --- a/doc/lispref/numbers.texi +++ b/doc/lispref/numbers.texi @@ -53,8 +53,9 @@ but many machines provide a wider range. Many examples in this chapter assume the minimum integer width of 30 bits. @cindex overflow - The Lisp reader reads an integer as a sequence of digits with optional -initial sign and optional final period. An integer that is out of the + The Lisp reader reads an integer as a nonempty sequence +of decimal digits with optional initial sign and optional +final period. A decimal integer that is out of the Emacs range is treated as a floating-point number. @example diff --git a/etc/NEWS b/etc/NEWS index 07f6d04a74..14926ba2e3 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -302,6 +302,10 @@ as new-style, bind the new variable 'force-new-style-backquotes' to t. 'cl-struct-define' whose name clashes with a builtin type (e.g., 'integer' or 'hash-table') now signals an error. +** When formatting a floating-point number as an octal or hexadecimal +integer, Emacs now signals an error if the number is too large for the +implementation to format (Bug#30408). + * Lisp Changes in Emacs 27.1 @@ -343,6 +347,9 @@ remote systems, which support this check. If the optional third argument is non-nil, 'make-string' will produce a multibyte string even if its second argument is an ASCII character. +** (format "%d" X) no longer mishandles a floating-point number X that +does not fit in a machine integer (Bug#30408). + ** New JSON parsing and serialization functions 'json-serialize', 'json-insert', 'json-parse-string', and 'json-parse-buffer'. These are implemented in C using the Jansson library. diff --git a/src/editfns.c b/src/editfns.c index 96bb271b2d..3a34dd0980 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -4563,32 +4563,30 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message) and with pM inserted for integer formats. At most two flags F can be specified at once. */ char convspec[sizeof "%FF.*d" + max (INT_AS_LDBL, pMlen)]; - { - char *f = convspec; - *f++ = '%'; - /* MINUS_FLAG and ZERO_FLAG are dealt with later. */ - *f = '+'; f += plus_flag; - *f = ' '; f += space_flag; - *f = '#'; f += sharp_flag; - *f++ = '.'; - *f++ = '*'; - if (float_conversion) - { - if (INT_AS_LDBL) - { - *f = 'L'; - f += INTEGERP (arg); - } - } - else if (conversion != 'c') - { - memcpy (f, pMd, pMlen); - f += pMlen; - zero_flag &= ! precision_given; - } - *f++ = conversion; - *f = '\0'; - } + char *f = convspec; + *f++ = '%'; + /* MINUS_FLAG and ZERO_FLAG are dealt with later. */ + *f = '+'; f += plus_flag; + *f = ' '; f += space_flag; + *f = '#'; f += sharp_flag; + *f++ = '.'; + *f++ = '*'; + if (float_conversion) + { + if (INT_AS_LDBL) + { + *f = 'L'; + f += INTEGERP (arg); + } + } + else if (conversion != 'c') + { + memcpy (f, pMd, pMlen); + f += pMlen; + zero_flag &= ! precision_given; + } + *f++ = conversion; + *f = '\0'; int prec = -1; if (precision_given) @@ -4630,29 +4628,20 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message) } else if (conversion == 'd' || conversion == 'i') { - /* For float, maybe we should use "%1.0f" - instead so it also works for values outside - the integer range. */ - printmax_t x; if (INTEGERP (arg)) - x = XINT (arg); + { + printmax_t x = XINT (arg); + sprintf_bytes = sprintf (sprintf_buf, convspec, prec, x); + } else { - double d = XFLOAT_DATA (arg); - if (d < 0) - { - x = TYPE_MINIMUM (printmax_t); - if (x < d) - x = d; - } - else - { - x = TYPE_MAXIMUM (printmax_t); - if (d < x) - x = d; - } + strcpy (f - pMlen - 1, "f"); + double x = XFLOAT_DATA (arg); + sprintf_bytes = sprintf (sprintf_buf, convspec, 0, x); + char c0 = sprintf_buf[0]; + bool signedp = ! ('0' <= c0 && c0 <= '9'); + prec = min (precision, sprintf_bytes - signedp); } - sprintf_bytes = sprintf (sprintf_buf, convspec, prec, x); } else { @@ -4663,22 +4652,19 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message) else { double d = XFLOAT_DATA (arg); - if (d < 0) - x = 0; - else - { - x = TYPE_MAXIMUM (uprintmax_t); - if (d < x) - x = d; - } + double uprintmax = TYPE_MAXIMUM (uprintmax_t); + if (! (0 <= d && d < uprintmax + 1)) + xsignal1 (Qoverflow_error, arg); + x = d; } sprintf_bytes = sprintf (sprintf_buf, convspec, prec, x); } /* Now the length of the formatted item is known, except it omits padding and excess precision. Deal with excess precision - first. This happens only when the format specifies - ridiculously large precision. */ + first. This happens when the format specifies ridiculously + large precision, or when %d or %i formats a float that would + ordinarily need fewer digits than a specified precision. */ ptrdiff_t excess_precision = precision_given ? precision - prec : 0; ptrdiff_t leading_zeros = 0, trailing_zeros = 0; commit 1bf6266ae3b542a968933a828c75f659c25cf2db Author: Bill Wohler Date: Sat Mar 3 15:57:43 2018 -0800 Add missing findex entries for recently removed kindex entries * doc/misc/mh-e.texi: (cherry picked from commit a56a3fc6849b89a71c9a00afcb088021ccbe94e5) diff --git a/doc/misc/mh-e.texi b/doc/misc/mh-e.texi index 74b17264d2..b44e503996 100644 --- a/doc/misc/mh-e.texi +++ b/doc/misc/mh-e.texi @@ -5974,6 +5974,9 @@ Using prefixes instead of postfixes helps you explore aliases during completion. If you forget the name of an old dive buddy, you can enter @samp{div} and then @key{SPC} to get a listing of all your dive buddies. +@findex mh-alias-add-address-under-point +@findex mh-alias-grab-from-field + An alias for the sender of the current message is added automatically by clicking on the @samp{Grab From alias} tool bar button or by running the @kbd{M-x mh-alias-grab-from-field} command. Aliases for other @@ -6265,6 +6268,7 @@ containing the value for the field is given. @cindex folder navigation @cindex speedbar @findex mh-visit-folder +@findex speedbar @kindex F v @kindex mouse-2 @@ -7984,6 +7988,7 @@ system. @cindex MH-E version @cindex @file{*MH-E Info*} @cindex version +@findex mh-version One command worth noting is @kbd{M-x mh-version}. You can compare the version this command prints to the latest release (@pxref{Getting @@ -8698,6 +8703,7 @@ I also point out some additional sources of information. @cindex bugs @cindex SourceForge +@findex mh-version Bug reports should be filed at @uref{https://sourceforge.net/p/mh-e/bugs/, SourceForge}. You need to @@ -8773,6 +8779,7 @@ instead. @cindex news @cindex @samp{MH-E-NEWS} @cindex @samp{README} +@findex mh-version After you download and extract the MH-E tarball, read the @file{README} file and @file{MH-E-NEWS}. These correspond to the commit 6af509ec672f8b32076007bf17ad8cf45668f4cd Author: Glenn Morris Date: Thu Mar 8 20:18:18 2018 -0500 Replace the obsolete process-kill-without-query in documentation * lisp/comint.el (comint-exec-hook): * lisp/term.el (term-exec-hook): * lisp/eshell/esh-proc.el (eshell-exec-hook): Doc fixes re the obsolete process-kill-without-query. ; * lisp/net/ange-ftp.el: Comment. diff --git a/lisp/comint.el b/lisp/comint.el index 9e5e7c69d9..1e4c0d33ee 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -454,8 +454,8 @@ This is run before the process is cranked up." "Hook run each time a process is exec'd by `comint-exec'. This is called after the process is cranked up. It is useful for things that must be done each time a process is executed in a Comint mode buffer (e.g., -`(process-kill-without-query)'). In contrast, the `comint-mode-hook' is only -executed once when the buffer is created." +`set-process-query-on-exit-flag'). In contrast, `comint-mode-hook' is only +executed once, when the buffer is created." :type 'hook :group 'comint) diff --git a/lisp/eshell/esh-proc.el b/lisp/eshell/esh-proc.el index 59fb9b926d..94401c5daa 100644 --- a/lisp/eshell/esh-proc.el +++ b/lisp/eshell/esh-proc.el @@ -87,8 +87,8 @@ variable's value to take effect." "Called each time a process is exec'd by `eshell-gather-process-output'. It is passed one argument, which is the process that was just started. It is useful for things that must be done each time a process is -executed in an eshell mode buffer (e.g., `process-kill-without-query'). -In contrast, `eshell-mode-hook' is only executed once when the buffer +executed in an eshell mode buffer (e.g., `set-process-query-on-exit-flag'). +In contrast, `eshell-mode-hook' is only executed once, when the buffer is created." :type 'hook :group 'eshell-proc) diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el index e62bee4499..9b23b8a4d8 100644 --- a/lisp/net/ange-ftp.el +++ b/lisp/net/ange-ftp.el @@ -3622,7 +3622,7 @@ so return the size on the remote host exactly. See RFC 3659." ;; newname)) ;; res) ;; (set-process-sentinel proc 'ange-ftp-copy-file-locally-sentinel) -;; (process-kill-without-query proc) +;; (set-process-query-on-exit-flag proc nil) ;; (with-current-buffer (process-buffer proc) ;; (set (make-local-variable 'copy-cont) cont)))) ;; diff --git a/lisp/term.el b/lisp/term.el index a470873a82..f4a1299f27 100644 --- a/lisp/term.el +++ b/lisp/term.el @@ -612,8 +612,8 @@ This is run before the process is cranked up." "Called each time a process is exec'd by `term-exec'. This is called after the process is cranked up. It is useful for things that must be done each time a process is executed in a term mode buffer (e.g., -`process-kill-without-query'). In contrast, `term-mode-hook' is only -executed once when the buffer is created." +`set-process-query-on-exit-flag'). In contrast, `term-mode-hook' is only +executed once, when the buffer is created." :type 'hook :group 'term) commit cb0f6348956761880069e8ff7ed5086a177a521a Author: Glenn Morris Date: Thu Mar 8 20:03:13 2018 -0500 Replace uses of the obsolete local-write-file-hooks * lisp/net/quickurl.el (quickurl-reread-hook-postfix): * lisp/progmodes/ebrowse.el (ebrowse-tree-mode) (ebrowse-write-file-hook-fn): * lisp/progmodes/glasses.el (glasses-mode): * lisp/progmodes/vhdl-mode.el (vhdl-write-file-hooks-init): * lisp/vc/ediff-merg.el (ediff-set-merge-mode): * lisp/vc/ediff-util.el (ediff-setup): Replace local-write-file-hooks, obsolete since 22.1, with write-file-functions. diff --git a/lisp/net/quickurl.el b/lisp/net/quickurl.el index abfca383e0..a5ba26bcdc 100644 --- a/lisp/net/quickurl.el +++ b/lisp/net/quickurl.el @@ -155,7 +155,7 @@ could be used here." (defconst quickurl-reread-hook-postfix " ;; Local Variables: -;; eval: (progn (require 'quickurl) (add-hook 'local-write-file-hooks (lambda () (quickurl-read) nil))) +;; eval: (progn (require 'quickurl) (add-hook 'write-file-functions (lambda () (quickurl-read) nil) nil t)) ;; End: " "Example `quickurl-postfix' text that adds a local variable to the diff --git a/lisp/progmodes/ebrowse.el b/lisp/progmodes/ebrowse.el index ca64af5c91..08b1acd4da 100644 --- a/lisp/progmodes/ebrowse.el +++ b/lisp/progmodes/ebrowse.el @@ -1107,7 +1107,7 @@ Tree mode key bindings: (and tree (ebrowse-build-tree-obarray tree))) (set (make-local-variable 'ebrowse--frozen-flag) nil) - (add-hook 'local-write-file-hooks 'ebrowse-write-file-hook-fn nil t) + (add-hook 'write-file-functions 'ebrowse-write-file-hook-fn nil t) (modify-syntax-entry ?_ (char-to-string (char-syntax ?a))) (when tree (ebrowse-redraw-tree) @@ -4023,7 +4023,7 @@ If VIEW is non-nil, view else find source files." (defun ebrowse-write-file-hook-fn () "Write current buffer as a class tree. -Installed on `local-write-file-hooks'." +Added to `write-file-functions'." (ebrowse-save-tree) t) diff --git a/lisp/progmodes/glasses.el b/lisp/progmodes/glasses.el index de176019a5..c3e8ac35f3 100644 --- a/lisp/progmodes/glasses.el +++ b/lisp/progmodes/glasses.el @@ -326,10 +326,10 @@ add virtual separators (like underscores) at places they belong to." (if glasses-mode (progn (jit-lock-register 'glasses-change) - (add-hook 'local-write-file-hooks + (add-hook 'write-file-functions 'glasses-convert-to-unreadable nil t)) (jit-lock-unregister 'glasses-change) - (remove-hook 'local-write-file-hooks + (remove-hook 'write-file-functions 'glasses-convert-to-unreadable t))))) diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el index a841f87f3c..f6cb2419de 100644 --- a/lisp/progmodes/vhdl-mode.el +++ b/lisp/progmodes/vhdl-mode.el @@ -4953,8 +4953,8 @@ Key bindings: (defun vhdl-write-file-hooks-init () "Add/remove hooks when buffer is saved." (if vhdl-modify-date-on-saving - (add-hook 'local-write-file-hooks 'vhdl-template-modify-noerror nil t) - (remove-hook 'local-write-file-hooks 'vhdl-template-modify-noerror t)) + (add-hook 'write-file-functions 'vhdl-template-modify-noerror nil t) + (remove-hook 'write-file-functions 'vhdl-template-modify-noerror t)) (if (featurep 'xemacs) (make-local-hook 'after-save-hook)) (add-hook 'after-save-hook 'vhdl-add-modified-file nil t)) diff --git a/lisp/vc/ediff-merg.el b/lisp/vc/ediff-merg.el index ad72d7570c..b67f520ca0 100644 --- a/lisp/vc/ediff-merg.el +++ b/lisp/vc/ediff-merg.el @@ -194,7 +194,7 @@ Buffer B." (defun ediff-set-merge-mode () (normal-mode t) - (remove-hook 'local-write-file-hooks 'ediff-set-merge-mode)) + (remove-hook 'write-file-functions 'ediff-set-merge-mode t)) ;; Go over all diffs starting with DIFF-NUM and copy regions into buffer C diff --git a/lisp/vc/ediff-util.el b/lisp/vc/ediff-util.el index 8670ba4603..be36273592 100644 --- a/lisp/vc/ediff-util.el +++ b/lisp/vc/ediff-util.el @@ -347,7 +347,7 @@ to invocation.") (goto-char (point-min)) (funcall (ediff-with-current-buffer buf major-mode)) (widen) ; merge buffer is always widened - (add-hook 'local-write-file-hooks 'ediff-set-merge-mode nil t) + (add-hook 'write-file-functions 'ediff-set-merge-mode nil t) ))) (setq buffer-read-only nil ediff-buffer-A buffer-A commit f0c590b857415e94a8ed9ded0e9ba2f91ea2a3c7 Author: Paul Eggert Date: Thu Mar 8 16:50:06 2018 -0800 Update from Gnulib This includes: 2018-03-08 fflush: be more paranoid about libio.h change * lib/fpending.c: Copy from Gnulib. diff --git a/lib/fpending.c b/lib/fpending.c index 789f50e4e4..7bc235deda 100644 --- a/lib/fpending.c +++ b/lib/fpending.c @@ -32,7 +32,8 @@ __fpending (FILE *fp) /* Most systems provide FILE as a struct and the necessary bitmask in , because they need it for implementing getc() and putc() as fast macros. */ -#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ +#if defined _IO_EOF_SEEN || defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 + /* GNU libc, BeOS, Haiku, Linux libc5 */ return fp->_IO_write_ptr - fp->_IO_write_base; #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */ commit 6bc78d5b16b6bc56f3ef401c519de6ff2fff3111 Author: Juri Linkov Date: Fri Mar 9 00:29:04 2018 +0200 * lisp/isearch.el (search-exit-option): Add option 'append'. (isearch-pre-command-hook): Use it. * doc/emacs/search.texi: Replace search-exit-option option nil with append. https://lists.gnu.org/archive/html/emacs-devel/2018-03/msg00202.html diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi index 0de3aee1b2..8ac9794c37 100644 --- a/doc/emacs/search.texi +++ b/doc/emacs/search.texi @@ -446,7 +446,7 @@ they are not themselves part of incremental search. search exits the search before executing the command. Thus, the command operates on the buffer from which you invoked the search. However, if you customize the variable @code{search-exit-option} to -@code{nil}, the characters which you type that are not interpreted by +@code{append}, the characters which you type that are not interpreted by the incremental search are simply appended to the search string. This is so you could include in the search string control characters, such as @kbd{C-a}, that would normally exit the search and invoke the diff --git a/lisp/isearch.el b/lisp/isearch.el index 96faa27c17..4f5f494875 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -77,11 +77,14 @@ If `shift-move', extend the search string by motion commands while holding down the shift key. Both `move' and `shift-move' extend the search string by yanking text that ends at the new position after moving point in the current buffer. +If `append', the characters which you type that are not interpreted by +the incremental search are simply appended to the search string. If nil, run the command without exiting Isearch." :type '(choice (const :tag "Terminate incremental search" t) (const :tag "Edit the search string" edit) (const :tag "Extend the search string by motion commands" move) (const :tag "Extend the search string by shifted motion keys" shift-move) + (const :tag "Append control characters to the search string" append) (const :tag "Don't terminate incremental search" nil)) :version "27.1") @@ -2452,13 +2455,15 @@ See more for options in `search-exit-option'." this-command-keys-shift-translated)) (setq this-command-keys-shift-translated nil) (setq isearch-pre-move-point (point))) + ;; Append control characters to the search string + ((eq search-exit-option 'append) + (when (cl-every #'characterp key) + (isearch-process-search-string key key)) + (setq this-command 'ignore)) ;; Other characters terminate the search and are then executed normally. (search-exit-option (isearch-done) - (isearch-clean-overlays)) - ;; If search-exit-option is nil, run the command without exiting Isearch. - (t - (isearch-process-search-string key key))))) + (isearch-clean-overlays))))) (defun isearch-post-command-hook () (cond commit f67a14efb6fc9c00bd69d3bdee509c999bc17cb1 Author: Charles A. Roelli Date: Thu Mar 8 20:45:47 2018 +0100 Add to "Completion Commands" Info node * doc/emacs/mini.texi (Completion Commands): Mention other keys for 'next-completion' and 'previous-completion', and explain 'q' and 'z' which are relatively new additions. diff --git a/doc/emacs/mini.texi b/doc/emacs/mini.texi index 579697f47b..9e650ba55f 100644 --- a/doc/emacs/mini.texi +++ b/doc/emacs/mini.texi @@ -366,14 +366,26 @@ While in the completion list buffer, this chooses the completion at point (@code{choose-completion}). @findex next-completion +@item @key{TAB} @item @key{RIGHT} -While in the completion list buffer, this moves point to the following -completion alternative (@code{next-completion}). +While in the completion list buffer, these keys move point to the +following completion alternative (@code{next-completion}). @findex previous-completion +@item @key{S-TAB} @item @key{LEFT} -While in the completion list buffer, this moves point to the previous -completion alternative (@code{previous-completion}). +While in the completion list buffer, these keys move point to the +previous completion alternative (@code{previous-completion}). + +@findex quit-window +@item @kbd{q} +While in the completion list buffer, this quits the window showing it +and selects the window showing the minibuffer (@code{quit-window}). + +@findex kill-current-buffer +@item @kbd{z} +While in the completion list buffer, kill it and delete the window +showing it (@code{kill-current-buffer}). @end table @node Completion Exit commit 4df0d159631fd58f58e0e475c93ab61910c5d1bf Author: Glenn Morris Date: Thu Mar 8 08:41:52 2018 -0800 ; Tiny fix for recent doc change diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi index 499be26004..42a5227983 100644 --- a/doc/emacs/display.texi +++ b/doc/emacs/display.texi @@ -1676,7 +1676,7 @@ line truncation. @xref{Split Window}, for the variable @dfn{word wrap}. Here, each long logical line is divided into two or more screen lines, like in ordinary line continuation. However, Emacs attempts to wrap the line at word boundaries near the right window -edge. (If line's direction is right-to-left, it is wrapped at the +edge. (If the line's direction is right-to-left, it is wrapped at the left window edge instead.) This makes the text easier to read, as wrapping does not occur in the middle of words. commit 43548b51cb94c15af41b61b90172e05b9443a39b Merge: 50e2c0fb51 cb0d40eab4 Author: Glenn Morris Date: Thu Mar 8 08:29:14 2018 -0800 Merge from origin/emacs-26 cb0d40e (origin/emacs-26) Minor change in the manual 7e26d83 More minor changes in the manual 6851754 Replace some obsolete aliases in code 6bcb48c Replace some obsolete aliases in documentation 317da2a Minor improvements in manuals 61c1f80 Minor copyedits in display.texi d523e4a Remove some unused spam.el variables 501808c Replace some obsolete aliases in code 19afff3 Replace some obsolete aliases in documentation c797bc9 Merge branch 'emacs-26' of git.savannah.gnu.org:/srv/git/emac... 0efe0bd Obsolete eshell-cmpl-suffix-list add48d2 More minor changes in the Glossary of the Emacs manual f6bd7e0 Revert last commit af4697f Define if-let* and derivatives as aliases for if-let etc ec79bdc Minor fix in Emacs manual's Glossary commit cb0d40eab406e7df22b09f7ae5557c820c087af4 Author: Michael Albinus Date: Thu Mar 8 17:08:47 2018 +0100 Minor change in the manual * doc/emacs/display.texi (Useless Whitespace): Don't upcase "TAB" and "SPC" when alluding to characters. diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi index ad3221463a..499be26004 100644 --- a/doc/emacs/display.texi +++ b/doc/emacs/display.texi @@ -1239,7 +1239,7 @@ and @code{newline-mark}. Highlight trailing whitespace. @item tabs -Highlight TAB characters. +Highlight tab characters. @item spaces Highlight space and non-breaking space characters. @@ -1263,7 +1263,7 @@ highlighted. To change that, customize the regular expression @code{whitespace-big-indent-regexp}. @item space-mark -Draw SPC and non-breaking characters with a special glyph. +Draw space and non-breaking characters with a special glyph. @item tab-mark Draw tab characters with a special glyph. commit 7e26d8356aad20d62b54a6fd649ba577ae9a48a8 Author: Eli Zaretskii Date: Thu Mar 8 17:53:09 2018 +0200 More minor changes in the manual * doc/emacs/display.texi (Useless Whitespace): Don't upcase "TAB" and "SPC" when alluding to characters. Suggested by Richard Stallman . * doc/emacs/buffers.texi (Misc Buffer): Clarify what "read-only" means for buffers. (Buffers): Define and describe "buffer contents". Suggested by Richard Stallman . (Bug#30685) diff --git a/doc/emacs/buffers.texi b/doc/emacs/buffers.texi index f8c1856058..dd7a653186 100644 --- a/doc/emacs/buffers.texi +++ b/doc/emacs/buffers.texi @@ -32,6 +32,13 @@ buffer. When there is only one Emacs window, the buffer displayed in that window is current. When there are multiple windows, the buffer displayed in the @dfn{selected window} is current. @xref{Windows}. +@cindex buffer contents +@cindex contents of a buffer + A buffer's @dfn{contents} consist of a series of characters, each of +which optionally carries a set of text properties +(@pxref{International Chars, Text properties}) that can specify more +information about that character. + Aside from its textual contents, each buffer records several pieces of information, such as what file it is visiting (if any), whether it is modified, and what major mode and minor modes are in effect @@ -231,13 +238,14 @@ Scroll through buffer @var{buffer}. @xref{View Mode}. @kindex C-x C-q @vindex buffer-read-only @cindex read-only buffer - A buffer can be @dfn{read-only}, which means that commands to change -its contents are not allowed. The mode line indicates read-only -buffers with @samp{%%} or @samp{%*} near the left margin. @xref{Mode -Line}. Read-only buffers are usually made by subsystems such as Dired -and Rmail that have special commands to operate on the text. Visiting -a file whose access control says you cannot write it also makes the -buffer read-only. + A buffer can be @dfn{read-only}, which means that commands to insert +or delete its text are not allowed. (However, other commands, like +@kbd{C-x @key{RET} f}, can still mark it as modified, @pxref{Text +Coding}). The mode line indicates read-only buffers with @samp{%%} or +@samp{%*} near the left margin. @xref{Mode Line}. Read-only buffers +are usually made by subsystems such as Dired and Rmail that have +special commands to operate on the text. Visiting a file whose access +control says you cannot write it also makes the buffer read-only. @findex read-only-mode @vindex view-read-only diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi index 3a0116a745..ad3221463a 100644 --- a/doc/emacs/display.texi +++ b/doc/emacs/display.texi @@ -1258,7 +1258,7 @@ Highlight empty lines. @item big-indent @vindex whitespace-big-indent-regexp Highlight too-deep indentation. By default any sequence of at least 4 -consecutive TAB characters or 32 consecutive SPC characters is +consecutive tab characters or 32 consecutive space characters is highlighted. To change that, customize the regular expression @code{whitespace-big-indent-regexp}. @@ -1266,7 +1266,7 @@ highlighted. To change that, customize the regular expression Draw SPC and non-breaking characters with a special glyph. @item tab-mark -Draw TAB characters with a special glyph. +Draw tab characters with a special glyph. @item newline-mark Draw newline characters with a special glyph. commit 50e2c0fb5180a757d8d533518f68837ffe5909be Author: Eli Zaretskii Date: Thu Mar 8 15:32:23 2018 +0200 Fix 'window-text-pixel-size' when display properties are around * src/xdisp.c (Fwindow_text_pixel_size): Correct the result when there's a display property at the TO position, and the call to move_it_to overshoots. (Bug#30746) diff --git a/src/xdisp.c b/src/xdisp.c index 23a10659b0..c2b3f5d954 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -10136,17 +10136,46 @@ include the height of both, if present, in the return value. */) itdata = bidi_shelve_cache (); SET_TEXT_POS (startp, start, CHAR_TO_BYTE (start)); start_display (&it, w, startp); - - if (NILP (x_limit)) - x = move_it_to (&it, end, -1, max_y, -1, MOVE_TO_POS | MOVE_TO_Y); - else + /* It makes no sense to measure dimensions of region of text that + crosses the point where bidi reordering changes scan direction. + By using unidirectional movement here we at least support the use + case of measuring regions of text that have a uniformly R2L + directionality, and regions that begin and end in text of the + same directionality. */ + it.bidi_p = false; + void *it2data = NULL; + struct it it2; + SAVE_IT (it2, it, it2data); + + int move_op = MOVE_TO_POS | MOVE_TO_Y; + int to_x = -1; + if (!NILP (x_limit)) { - it.last_visible_x = max_x; /* Actually, we never want move_it_to stop at to_x. But to make sure that move_it_in_display_line_to always moves far enough, - we set it to INT_MAX and specify MOVE_TO_X. */ - x = move_it_to (&it, end, INT_MAX, max_y, -1, - MOVE_TO_POS | MOVE_TO_X | MOVE_TO_Y); + we set to_x to INT_MAX and specify MOVE_TO_X. */ + move_op |= MOVE_TO_X; + to_x = INT_MAX; + } + + x = move_it_to (&it, end, to_x, max_y, -1, move_op); + + /* We could have a display property at END, in which case asking + move_it_to to stop at END will overshoot and stop at position + after END. So we try again, stopping before END, and account for + the width of the last buffer position manually. */ + if (IT_CHARPOS (it) > end) + { + end--; + RESTORE_IT (&it, &it2, it2data); + x = move_it_to (&it, end, to_x, max_y, -1, move_op); + /* Add the width of the thing at TO, but only if we didn't + overshoot it; if we did, it is already accounted for. */ + if (IT_CHARPOS (it) == end) + x += it.pixel_width; + } + if (!NILP (x_limit)) + { /* Don't return more than X-LIMIT. */ if (x > max_x) x = max_x; commit 4d6e548e60ddb8506d5c943b481f8ae5c819f174 Author: Michael Albinus Date: Thu Mar 8 14:09:38 2018 +0100 Add OpenDocument formats to Tramp file archives * doc/misc/tramp.texi (Archive file names): * lisp/net/tramp-archive.el (tramp-archive-suffixes): Add OpenDocument formats. diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index e1c4f3e980..3143904343 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi @@ -3059,6 +3059,22 @@ BSD mtree format @cindex @file{mtree} file archive suffix @cindex file archive suffix @file{mtree} +@item @samp{.odb}, @samp{.odf}, @samp{.odg}, @samp{.odp}, @samp{.ods}, +@samp{.odt} --- +OpenDocument formats +@cindex @file{odb} file archive suffix +@cindex @file{odf} file archive suffix +@cindex @file{odg} file archive suffix +@cindex @file{odp} file archive suffix +@cindex @file{ods} file archive suffix +@cindex @file{odt} file archive suffix +@cindex file archive suffix @file{odb} +@cindex file archive suffix @file{odf} +@cindex file archive suffix @file{odg} +@cindex file archive suffix @file{odp} +@cindex file archive suffix @file{ods} +@cindex file archive suffix @file{odt} + @item @samp{.pax} --- Posix archives @cindex @file{pax} file archive suffix diff --git a/lisp/net/tramp-archive.el b/lisp/net/tramp-archive.el index 87b69767f0..0b5a351dea 100644 --- a/lisp/net/tramp-archive.el +++ b/lisp/net/tramp-archive.el @@ -62,6 +62,7 @@ ;; * ".lzh", ".LZH" - Microsoft Windows compressed LHA archives ;; * ".msu", ".MSU" - Microsoft Windows Update packages ;; * ".mtree" - BSD mtree format +;; * ".odb" ".odf" ".odg" ".odp" ".ods" ".odt" - OpenDocument formats ;; * ".pax" - Posix archives ;; * ".rar" - RAR archives ;; * ".rpm" - Red Hat packages @@ -126,9 +127,9 @@ ;; ;;;###autoload (defconst tramp-archive-suffixes - ;; "cab", "lzh" and "zip" are included with lower and upper letters, - ;; because Microsoft Windows provides them often with capital - ;; letters. + ;; "cab", "lzh", "msu" and "zip" are included with lower and upper + ;; letters, because Microsoft Windows provides them often with + ;; capital letters. '("7z" ;; 7-Zip archives. "apk" ;; Android package kits. Not in libarchive testsuite. "ar" ;; UNIX archiver formats. @@ -142,6 +143,7 @@ "lzh" "LZH" ;; Microsoft Windows compressed LHA archives. "msu" "MSU" ;; Microsoft Windows Update packages. Not in testsuite. "mtree" ;; BSD mtree format. + "odb" "odf" "odg" "odp" "ods" "odt" ;; OpenDocument formats. Not in testsuite. "pax" ;; Posix archives. "rar" ;; RAR archives. "rpm" ;; Red Hat packages. commit 9f6e7905eccf147a07ac9d041921add37ebbf08b Author: Mike Kupfer Date: Wed Mar 7 23:01:12 2018 -0800 * lisp/mh-e/mh-e.el (mh-variant-set): Tweak failure message. diff --git a/lisp/mh-e/mh-e.el b/lisp/mh-e/mh-e.el index 7b587a80d1..4515144d14 100644 --- a/lisp/mh-e/mh-e.el +++ b/lisp/mh-e/mh-e.el @@ -945,6 +945,8 @@ finally GNU mailutils MH." (when (not (mh-variant-set-variant variant)) (message "Warning: %s variant not found. Autodetecting..." variant) (mh-variant-set 'autodetect))) + ((null valid-list) + (message "Unknown variant %s; can't find MH anywhere" variant)) (t (message "Unknown variant %s; use %s" variant commit 8c361c0c7316eb80a49b2d7b856ada1319fe4121 Author: Mike Kupfer Date: Wed Mar 7 22:59:14 2018 -0800 * lisp/mh-e/mh-utils.el (mh-find-path): Add missing part of previous. diff --git a/lisp/mh-e/mh-utils.el b/lisp/mh-e/mh-utils.el index 66d87262bc..7bda0a6847 100644 --- a/lisp/mh-e/mh-utils.el +++ b/lisp/mh-e/mh-utils.el @@ -177,6 +177,7 @@ been set. This hook can be used the change the value of these variables if you need to run with different values between MH and MH-E." (unless mh-find-path-run + (or mh-variant-in-use (mh-variant-set mh-variant)) ;; Sanity checks. (if (and (getenv "MH") (not (file-readable-p (getenv "MH")))) commit 2dc909c67b987e20cbfd4816cb4264151c68f2f9 Author: Glenn Morris Date: Wed Mar 7 22:56:23 2018 -0800 Suppress "No MH variant found" message (bug#30669) * lisp/mh-e/mh-e.el (mh-variant): Don't try to detect till needed. * lisp/mh-e/mh-e.el (mh-version, mh-variant-p): * lisp/mh-e/mh-comp.el (mh-insert-x-mailer): Ensure mh-variant-in-use is set. diff --git a/lisp/mh-e/mh-comp.el b/lisp/mh-e/mh-comp.el index cfdd2ae5ab..941529330e 100644 --- a/lisp/mh-e/mh-comp.el +++ b/lisp/mh-e/mh-comp.el @@ -1056,6 +1056,7 @@ letter." (defun mh-insert-x-mailer () "Append an X-Mailer field to the header. The versions of MH-E, Emacs, and MH are shown." + (or mh-variant-in-use (mh-variant-set mh-variant)) ;; Lazily initialize mh-x-mailer-string. (when (and mh-insert-x-mailer-flag (null mh-x-mailer-string)) (setq mh-x-mailer-string diff --git a/lisp/mh-e/mh-e.el b/lisp/mh-e/mh-e.el index 05ff672da5..7b587a80d1 100644 --- a/lisp/mh-e/mh-e.el +++ b/lisp/mh-e/mh-e.el @@ -410,6 +410,8 @@ gnus-version) (require 'gnus) gnus-version) +(defvar mh-variant) + ;;;###autoload (defun mh-version () "Display version information about MH-E and the MH mail handling system." @@ -430,6 +432,7 @@ gnus-version) ;; Emacs version. (insert (emacs-version) "\n\n") ;; MH version. + (or mh-variant-in-use (mh-variant-set mh-variant)) (if mh-variant-in-use (insert mh-variant-in-use "\n" " mh-progs:\t" mh-progs "\n" @@ -876,6 +879,7 @@ variant." (defun mh-variant-p (&rest variants) "Return t if variant is any of VARIANTS. Currently known variants are `MH', `nmh', and `gnu-mh'." + (or mh-variant-in-use (mh-variant-set mh-variant)) (let ((variant-in-use (cadr (assoc 'variant (assoc mh-variant-in-use (mh-variants)))))) (not (null (member variant-in-use variants))))) @@ -972,6 +976,7 @@ necessary and can actually cause problems." :set (lambda (symbol value) (set-default symbol value) ;Done in mh-variant-set-variant! (mh-variant-set value)) + :initialize 'custom-initialize-default :group 'mh-e :package-version '(MH-E . "8.0")) commit bb1309f1eb7651b41f2b6b7fb97ddb86bb82160c Author: Paul Eggert Date: Wed Mar 7 17:55:44 2018 -0800 Update from Gnulib This includes: 2018-03-07 maint: write-file-hooks -> before-save-hook 2018-03-05 binary-io: pacify gcc -Wunused-parameter 2018-03-05 fflush: adjust to glibc 2.28 libio.h removal * build-aux/config.guess, build-aux/config.sub: * build-aux/gitlog-to-changelog, build-aux/install-sh: * build-aux/move-if-change, build-aux/update-copyright: * doc/misc/texinfo.tex, lib/binary-io.h, lib/fpending.c: * lib/stdio-impl.h: Copy from Gnulib. diff --git a/build-aux/config.guess b/build-aux/config.guess index f50dcdb6de..256083a70d 100755 --- a/build-aux/config.guess +++ b/build-aux/config.guess @@ -2,7 +2,7 @@ # Attempt to guess a canonical system name. # Copyright 1992-2018 Free Software Foundation, Inc. -timestamp='2018-02-24' +timestamp='2018-03-08' # 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 @@ -1046,11 +1046,7 @@ EOF echo "$UNAME_MACHINE"-dec-linux-"$LIBC" exit ;; x86_64:Linux:*:*) - if objdump -f /bin/sh | grep -q elf32-x86-64; then - echo "$UNAME_MACHINE"-pc-linux-"$LIBC"x32 - else - echo "$UNAME_MACHINE"-pc-linux-"$LIBC" - fi + echo "$UNAME_MACHINE"-pc-linux-"$LIBC" exit ;; xtensa*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" @@ -1473,7 +1469,7 @@ EOF exit 1 # Local variables: -# eval: (add-hook 'write-file-functions 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" diff --git a/build-aux/config.sub b/build-aux/config.sub index 1d8e98bcee..9ccf09a7a3 100755 --- a/build-aux/config.sub +++ b/build-aux/config.sub @@ -2,7 +2,7 @@ # Configuration validation subroutine script. # Copyright 1992-2018 Free Software Foundation, Inc. -timestamp='2018-02-22' +timestamp='2018-03-08' # 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 @@ -1376,7 +1376,7 @@ case $os in | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* | -hcos* \ | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ @@ -1794,7 +1794,7 @@ echo "$basic_machine$os" exit # Local variables: -# eval: (add-hook 'write-file-functions 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" diff --git a/build-aux/gitlog-to-changelog b/build-aux/gitlog-to-changelog index d8074aadab..1e73f4214f 100755 --- a/build-aux/gitlog-to-changelog +++ b/build-aux/gitlog-to-changelog @@ -3,7 +3,7 @@ eval '(exit $?0)' && eval 'exec perl -wS "$0" "$@"' if 0; # Convert git log output to ChangeLog format. -my $VERSION = '2017-09-13 06:45'; # UTC +my $VERSION = '2018-03-07 03:47'; # UTC # The definition above must lie within the first 8 lines in order # for the Emacs time-stamp write hook (at end) to update it. # If you change this file with Emacs, please let the write hook @@ -491,7 +491,7 @@ sub git_dir_option($) # Local Variables: # mode: perl # indent-tabs-mode: nil -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "my $VERSION = '" # time-stamp-format: "%:y-%02m-%02d %02H:%02M" # time-stamp-time-zone: "UTC0" diff --git a/build-aux/install-sh b/build-aux/install-sh index ac159ceda4..5f3d36cb76 100755 --- a/build-aux/install-sh +++ b/build-aux/install-sh @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2017-09-23.17; # UTC +scriptversion=2018-03-07.03; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -501,7 +501,7 @@ do done # Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" diff --git a/build-aux/move-if-change b/build-aux/move-if-change index f15923613c..5da3eae80a 100755 --- a/build-aux/move-if-change +++ b/build-aux/move-if-change @@ -2,7 +2,7 @@ # Like mv $1 $2, but if the files are the same, just delete $1. # Status is zero if successful, nonzero otherwise. -VERSION='2017-09-13 06:45'; # UTC +VERSION='2018-03-07 03:47'; # UTC # The definition above must lie within the first 8 lines in order # for the Emacs time-stamp write hook (at end) to update it. # If you change this file with Emacs, please let the write hook @@ -75,7 +75,7 @@ else fi ## Local Variables: -## eval: (add-hook 'write-file-hooks 'time-stamp) +## eval: (add-hook 'before-save-hook 'time-stamp) ## time-stamp-start: "VERSION='" ## time-stamp-format: "%:y-%02m-%02d %02H:%02M" ## time-stamp-time-zone: "UTC0" diff --git a/build-aux/update-copyright b/build-aux/update-copyright index 3bb26abea1..f2fc97e368 100755 --- a/build-aux/update-copyright +++ b/build-aux/update-copyright @@ -3,7 +3,7 @@ eval '(exit $?0)' && eval 'exec perl -wS -0777 -pi "$0" "$@"' if 0; # Update an FSF copyright year list to include the current year. -my $VERSION = '2018-01-04.14:48'; # UTC +my $VERSION = '2018-03-07.03:47'; # UTC # Copyright (C) 2009-2018 Free Software Foundation, Inc. # @@ -269,7 +269,7 @@ else # coding: utf-8 # mode: perl # indent-tabs-mode: nil -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "my $VERSION = '" # time-stamp-format: "%:y-%02m-%02d.%02H:%02M" # time-stamp-time-zone: "UTC0" diff --git a/doc/misc/texinfo.tex b/doc/misc/texinfo.tex index 0af2f09b52..ac5c1d922e 100644 --- a/doc/misc/texinfo.tex +++ b/doc/misc/texinfo.tex @@ -3,7 +3,7 @@ % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % -\def\texinfoversion{2018-02-24.16} +\def\texinfoversion{2018-02-12.17} % % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, @@ -182,7 +182,7 @@ % Hyphenation fixes. \hyphenation{ Flor-i-da Ghost-script Ghost-view Mac-OS Post-Script - ap-pen-dix bit-map bit-maps + auto-ma-ti-cal-ly ap-pen-dix bit-map bit-maps data-base data-bases eshell fall-ing half-way long-est man-u-script man-u-scripts mini-buf-fer mini-buf-fers over-view par-a-digm par-a-digms rath-er rec-tan-gu-lar ro-bot-ics se-vere-ly set-up spa-ces diff --git a/lib/binary-io.h b/lib/binary-io.h index cce1301d56..1f21fc051f 100644 --- a/lib/binary-io.h +++ b/lib/binary-io.h @@ -47,10 +47,8 @@ _GL_INLINE_HEADER_BEGIN /* Use a function rather than a macro, to avoid gcc warnings "warning: statement with no effect". */ BINARY_IO_INLINE int -__gl_setmode (int fd, int mode) +__gl_setmode (int fd _GL_UNUSED, int mode _GL_UNUSED) { - (void) fd; - (void) mode; return O_BINARY; } #endif @@ -59,7 +57,7 @@ __gl_setmode (int fd, int mode) extern int __gl_setmode_check (int); #else BINARY_IO_INLINE int -__gl_setmode_check (int fd) { return 0; } +__gl_setmode_check (int fd _GL_UNUSED) { return 0; } #endif /* Set FD's mode to MODE, which should be either O_TEXT or O_BINARY. diff --git a/lib/fpending.c b/lib/fpending.c index c84e3a5b4e..789f50e4e4 100644 --- a/lib/fpending.c +++ b/lib/fpending.c @@ -32,7 +32,7 @@ __fpending (FILE *fp) /* Most systems provide FILE as a struct and the necessary bitmask in , because they need it for implementing getc() and putc() as fast macros. */ -#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ +#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ return fp->_IO_write_ptr - fp->_IO_write_base; #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */ diff --git a/lib/stdio-impl.h b/lib/stdio-impl.h index 78d896e9f5..05c5752a24 100644 --- a/lib/stdio-impl.h +++ b/lib/stdio-impl.h @@ -18,6 +18,12 @@ the same implementation of stdio extension API, except that some fields have different naming conventions, or their access requires some casts. */ +/* Glibc 2.28 made _IO_IN_BACKUP private. For now, work around this + problem by defining it ourselves. FIXME: Do not rely on glibc + internals. */ +#if !defined _IO_IN_BACKUP && defined _IO_EOF_SEEN +# define _IO_IN_BACKUP 0x100 +#endif /* BSD stdio derived implementations. */ commit 685175404f04b56daeb5c706333e35f671e60e82 Author: Glenn Morris Date: Wed Mar 7 15:44:08 2018 -0500 Replace some obsolete aliases in code * lisp/net/eudc-bob.el (eudc-bob-mail-keymap): * lisp/textmodes/reftex-toc.el (reftex-make-separate-toc-frame): Replace obsolete aliases. diff --git a/lisp/net/eudc-bob.el b/lisp/net/eudc-bob.el index 57b748b150..584d1a9d0d 100644 --- a/lisp/net/eudc-bob.el +++ b/lisp/net/eudc-bob.el @@ -312,7 +312,7 @@ display a button." (define-key map [return] 'goto-address-at-point) (define-key map (if (featurep 'xemacs) [button2] - [down-mouse-2]) 'goto-address-at-mouse) + [down-mouse-2]) 'goto-address-at-point) map)) (set-keymap-parent eudc-bob-image-keymap eudc-bob-generic-keymap) diff --git a/lisp/textmodes/reftex-toc.el b/lisp/textmodes/reftex-toc.el index 6637da4b14..9c158a5f56 100644 --- a/lisp/textmodes/reftex-toc.el +++ b/lisp/textmodes/reftex-toc.el @@ -1096,7 +1096,7 @@ always show the current section in connection with the option (when (eq reftex-auto-recenter-toc 'frame) (unless reftex-toc-auto-recenter-timer (reftex-toggle-auto-toc-recenter)) - (add-hook 'delete-frame-hook 'reftex-toc-delete-frame-hook))))) + (add-hook 'delete-frame-functions 'reftex-toc-delete-frame-hook))))) (defun reftex-toc-delete-frame-hook (frame) (if (and reftex-toc-auto-recenter-timer commit 6bcb48cf274fb1dd290b305e0ef01fbc1dbbaf66 Author: Glenn Morris Date: Wed Mar 7 15:41:29 2018 -0500 Replace some obsolete aliases in documentation * doc/misc/efaq-w32.texi (Incoming mail with Rmail): * doc/misc/speedbar.texi (Major Display Modes): * lisp/mh-e/mh-folder.el (mh-restore-desktop-buffer): Doc fixes re obsolete aliases. ; * lisp/autoinsert.el (auto-insert): ; * lisp/ffap.el (ffap-newfile-prompt): ; * lisp/woman.el (woman-insert-file-contents): Comment fixes. diff --git a/doc/misc/efaq-w32.texi b/doc/misc/efaq-w32.texi index af002d7a28..8cdf870ad6 100644 --- a/doc/misc/efaq-w32.texi +++ b/doc/misc/efaq-w32.texi @@ -1595,7 +1595,7 @@ non-@code{nil}, you should set it to @code{nil}: @cindex movemail, using pop3 @cindex MAILHOST @vindex rmail-primary-inbox-list -@vindex rmail-pop-password-required +@vindex rmail-remote-password-required For incoming mail using the Rmail package and a POP3 server, you will need the following configuration: @@ -1603,7 +1603,7 @@ need the following configuration: @example (setenv "MAILHOST" "@var{domain.name.of.your.pop3.server}") (setq rmail-primary-inbox-list '("po:@var{your logon id}")) -(setq rmail-pop-password-required t) +(setq rmail-remote-password-required t) @end example @node Incoming mail with Gnus diff --git a/doc/misc/speedbar.texi b/doc/misc/speedbar.texi index 1c1b014f54..d67c4e6145 100644 --- a/doc/misc/speedbar.texi +++ b/doc/misc/speedbar.texi @@ -979,8 +979,8 @@ With a numeric argument (@kbd{C-u}), flush cached data before expanding. Contract the item under the cursor. @end table -@cindex @code{speedbar-line-path} -These function require that function @code{speedbar-line-path} be +@cindex @code{speedbar-line-directory} +These functions require that the function @code{speedbar-line-directory} be correctly overloaded to work. Next, register your extension like this; @@ -1013,14 +1013,14 @@ like this: (speedbar-add-mode-functions-list '("MYEXTENSION" (speedbar-item-info . MyExtension-speedbar-item-info) - (speedbar-line-path . MyExtension-speedbar-line-path))) + (speedbar-line-directory . MyExtension-speedbar-line-directory))) @end example The first element in the list is the name of you extension. The second is an alist of functions to overload. The function to overload is first, followed by what you want called instead. -For @code{speedbar-line-path} your function should take an optional DEPTH +For @code{speedbar-line-directory} your function should take an optional DEPTH parameter. This is the starting depth for heavily indented lines. If it is not provided, you can derive it like this: diff --git a/lisp/autoinsert.el b/lisp/autoinsert.el index f2ca52b1a1..dfa5b60306 100644 --- a/lisp/autoinsert.el +++ b/lisp/autoinsert.el @@ -386,7 +386,7 @@ Matches the visited file name against the elements of `auto-insert-alist'." (not (eq this-command 'auto-insert)) (set-buffer-modified-p (eq auto-insert t))))) ;; Return nil so that it could be used in - ;; `find-file-not-found-hooks', though that's probably inadvisable. + ;; `find-file-not-found-functions', though that's probably inadvisable. nil) diff --git a/lisp/ffap.el b/lisp/ffap.el index 4e479d1b82..22be2f8536 100644 --- a/lisp/ffap.el +++ b/lisp/ffap.el @@ -248,7 +248,7 @@ it passes it on to `dired'." (defcustom ffap-newfile-prompt nil ;; Suggestion from RHOGEE, 11 Jul 1994. Disabled, I think this is - ;; better handled by `find-file-not-found-hooks'. + ;; better handled by `find-file-not-found-functions'. "Whether `find-file-at-point' prompts about a nonexistent file." :type 'boolean :group 'ffap) diff --git a/lisp/mh-e/mh-folder.el b/lisp/mh-e/mh-folder.el index 23cc2baab7..82e28e8741 100644 --- a/lisp/mh-e/mh-folder.el +++ b/lisp/mh-e/mh-folder.el @@ -88,7 +88,7 @@ the MH mail system." When desktop creates a buffer, DESKTOP-BUFFER-FILE-NAME holds the file name to visit, DESKTOP-BUFFER-NAME holds the desired buffer name, and DESKTOP-BUFFER-MISC holds a list of miscellaneous info -used by the `desktop-buffer-handlers' functions." +used by the `desktop-buffer-mode-handlers' functions." (mh-find-path) (mh-visit-folder desktop-buffer-name) (current-buffer)) diff --git a/lisp/woman.el b/lisp/woman.el index 73f18b0dd6..533f14674a 100644 --- a/lisp/woman.el +++ b/lisp/woman.el @@ -1759,8 +1759,8 @@ Leave point at end of new text. Return length of inserted text." (condition-case () (insert-file-contents filename nil) (file-error - ;; Run find-file-not-found-hooks until one returns non-nil. - ;; (run-hook-with-args-until-success 'find-file-not-found-hooks) + ;; Run find-file-not-found-functions until one returns non-nil. + ;; (run-hook-with-args-until-success 'find-file-not-found-functions) (insert "\n***** File " filename " not found! *****\n\n"))))))) commit 317da2ace54e971c788d4718874df957d3d1c549 Author: Eli Zaretskii Date: Wed Mar 7 21:51:59 2018 +0200 Minor improvements in manuals * doc/lispref/variables.texi (Local Variables): Make more clear that local bindings of 'let' are in effect only within the body. Suggested by Marcin Borkowski , see http://lists.gnu.org/archive/html/emacs-devel/2018-03/msg00217.html for the details. * doc/emacs/programs.texi (Matching): Fix a typo. Reported by Alex Branham in emacs-manual-bugs@gnu.org. Improve indexing. diff --git a/doc/emacs/programs.texi b/doc/emacs/programs.texi index c34b55fc00..d3d7028c14 100644 --- a/doc/emacs/programs.texi +++ b/doc/emacs/programs.texi @@ -849,11 +849,13 @@ options which control the operation of this mode include: @itemize @bullet @item -@code{show-paren-highlight-open-paren} controls whether to highlight +@vindex show-paren-highlight-openparen +@code{show-paren-highlight-openparen} controls whether to highlight an open paren when point stands just before it, and hence its position is marked by the cursor anyway. The default is non-@code{nil} (yes). @item +@vindex show-paren-style @code{show-paren-style} controls whether just the two parens, or also the space between them get highlighted. The valid options here are @code{parenthesis} (show the matching paren), @code{expression} @@ -862,10 +864,12 @@ the space between them get highlighted. The valid options here are expression otherwise). @item +@vindex show-paren-when-point-inside-paren @code{show-paren-when-point-inside-paren}, when non-@code{nil}, causes highlighting also when point is on the inside of a parenthesis. @item +@vindex show-paren-when-point-in-periphery @code{show-paren-when-point-in-periphery}, when non-@code{nil}, causes highlighting also when point is in whitespace at the beginning or end of a line, and there is a paren at, respectively, the first or last, diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi index e025d3fd10..aecee6f305 100644 --- a/doc/lispref/variables.texi +++ b/doc/lispref/variables.texi @@ -165,7 +165,7 @@ receive local values, which are the actual arguments supplied to the function call; these local bindings take effect within the body of the function. To take another example, the @code{let} special form explicitly establishes local bindings for specific variables, which -take effect within the body of the @code{let} form. +take effect only within the body of the @code{let} form. We also speak of the @dfn{global binding}, which is where (conceptually) the global value is kept. @@ -204,7 +204,8 @@ bindings: This special form sets up local bindings for a certain set of variables, as specified by @var{bindings}, and then evaluates all of the @var{forms} in textual order. Its return value is the value of -the last form in @var{forms}. +the last form in @var{forms}. The local bindings set up by @code{let} +will be in effect only within the body of @var{forms}. Each of the @var{bindings} is either @w{(i) a} symbol, in which case that symbol is locally bound to @code{nil}; or @w{(ii) a} list of the commit 61c1f80f0544b3da784f97ec2368aec809c8524b Author: Eli Zaretskii Date: Wed Mar 7 21:02:24 2018 +0200 Minor copyedits in display.texi * doc/emacs/display.texi (Highlight Interactively) (Useless Whitespace, Line Truncation, Visual Line Mode): Minor changes of wording and typo corrections. Suggested by Michael Albinus in emacs-manual-bugs@gnu.org. diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi index 312f70e13b..3a0116a745 100644 --- a/doc/emacs/display.texi +++ b/doc/emacs/display.texi @@ -971,7 +971,7 @@ version.) Highlight text that matches @var{regexp} using face @var{face} (@code{highlight-regexp}). The highlighting will remain as long as the buffer is loaded. For example, to highlight all occurrences of -the word ``whim'' using the default face (a yellow background) +the word ``whim'' using the default face (a yellow background), type @kbd{M-s h r whim @key{RET} @key{RET}}. Any face can be used for highlighting, Hi Lock provides several of its own and these are pre-loaded into a list of default values. While being prompted @@ -1239,7 +1239,7 @@ and @code{newline-mark}. Highlight trailing whitespace. @item tabs -Highlight tab characters. +Highlight TAB characters. @item spaces Highlight space and non-breaking space characters. @@ -1263,10 +1263,10 @@ highlighted. To change that, customize the regular expression @code{whitespace-big-indent-regexp}. @item space-mark -Draw space and non-breaking characters with a special glyph. +Draw SPC and non-breaking characters with a special glyph. @item tab-mark -Draw tab characters with a special glyph. +Draw TAB characters with a special glyph. @item newline-mark Draw newline characters with a special glyph. @@ -1649,8 +1649,8 @@ Emacs can display long lines by @dfn{truncation}. This means that all the characters that do not fit in the width of the screen or window do not appear at all. On graphical displays, a small straight arrow in the fringe indicates truncation at either end of the line. On text -terminals, this is indicated with @samp{$} signs in the leftmost -and/or rightmost columns. +terminals, this is indicated with @samp{$} signs in the rightmost +and/or leftmost columns. @vindex truncate-lines @findex toggle-truncate-lines @@ -1676,8 +1676,9 @@ line truncation. @xref{Split Window}, for the variable @dfn{word wrap}. Here, each long logical line is divided into two or more screen lines, like in ordinary line continuation. However, Emacs attempts to wrap the line at word boundaries near the right window -edge. This makes the text easier to read, as wrapping does not occur -in the middle of words. +edge. (If line's direction is right-to-left, it is wrapped at the +left window edge instead.) This makes the text easier to read, as +wrapping does not occur in the middle of words. @cindex mode, Visual Line @cindex Visual Line mode @@ -1688,8 +1689,8 @@ To turn on Visual Line mode in the current buffer, type @kbd{M-x visual-line-mode}; repeating this command turns it off. You can also turn on Visual Line mode using the menu bar: in the Options menu, select the @samp{Line Wrapping in this Buffer} submenu, followed by -the @samp{Word Wrap (Visual Line Mode)} menu item. While Visual Line -mode is enabled, the mode-line shows the string @samp{wrap} in the +the @samp{Word Wrap (Visual Line mode)} menu item. While Visual Line +mode is enabled, the mode line shows the string @samp{wrap} in the mode display. The command @kbd{M-x global-visual-line-mode} toggles Visual Line mode in all buffers. commit 1ac190553886ff20817d3dd218464e2fc6f9e42a Author: Eli Zaretskii Date: Wed Mar 7 20:40:44 2018 +0200 Fix display of TABs in hscrolled windows with line numbers * src/dispextern.h (struct it): New members tab_offset and line_number_produced_p. * src/xdisp.c (display_line): Don't set row->x to a negative value if line numbers are being displayed. (Bug#30582) Reset the line_number_produced_p flag before laying out the glyph row. (x_produce_glyphs): Use the line_number_produced_p flag to decide whether to offset the X coordinate due to line-number display. Use the tab_offset member to restore the original TAB width for alignment purposes. (move_it_in_display_line_to): Don't produce line numbers when moving in hscrolled window to the left of first_visible_x. (maybe_produce_line_number): Set the line_number_produced_p flag. (Bug#30584) * src/term.c (produce_glyphs): Correct TAB width only when line_number_produced_p flag is set. diff --git a/src/dispextern.h b/src/dispextern.h index 441361b408..25d51cdd63 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -2462,6 +2462,10 @@ struct it descent/ascent (line-height property). Reset after this glyph. */ bool_bf constrain_row_ascent_descent_p : 1; + /* If true, glyphs for line number display were already produced for + the current row. */ + bool_bf line_number_produced_p : 1; + enum line_wrap_method line_wrap; /* The ID of the default face to use. One of DEFAULT_FACE_ID, @@ -2641,6 +2645,12 @@ struct it /* The line number of point's line, or zero if not computed yet. */ ptrdiff_t pt_lnum; + /* Number of pixels to offset tab stops due to width fixup of the + first glyph that crosses first_visible_x. This is only needed on + GUI frames, only when display-line-numbers is in effect, and only + in hscrolled windows. */ + int tab_offset; + /* Left fringe bitmap number (enum fringe_bitmap_type). */ unsigned left_user_fringe_bitmap : FRINGE_ID_BITS; diff --git a/src/term.c b/src/term.c index 64a2b7e551..8be5fb319b 100644 --- a/src/term.c +++ b/src/term.c @@ -1591,13 +1591,13 @@ produce_glyphs (struct it *it) + it->continuation_lines_width); int x0 = absolute_x; /* Adjust for line numbers. */ - if (!NILP (Vdisplay_line_numbers)) + if (!NILP (Vdisplay_line_numbers) && it->line_number_produced_p) absolute_x -= it->lnum_pixel_width; int next_tab_x = (((1 + absolute_x + it->tab_width - 1) / it->tab_width) * it->tab_width); - if (!NILP (Vdisplay_line_numbers)) + if (!NILP (Vdisplay_line_numbers) && it->line_number_produced_p) next_tab_x += it->lnum_pixel_width; int nspaces; diff --git a/src/xdisp.c b/src/xdisp.c index 9170d6b777..23a10659b0 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -8716,8 +8716,12 @@ move_it_in_display_line_to (struct it *it, if (it->hpos == 0) { - /* If line numbers are being displayed, produce a line number. */ - if (should_produce_line_number (it)) + /* If line numbers are being displayed, produce a line number. + But don't do that if we are to reach first_visible_x, because + line numbers are not relevant to stuff that is not visible on + display. */ + if (!((op && MOVE_TO_X) && to_x == it->first_visible_x) + && should_produce_line_number (it)) { if (it->current_x == it->first_visible_x) maybe_produce_line_number (it); @@ -21173,6 +21177,8 @@ maybe_produce_line_number (struct it *it) it->max_phys_descent = max (it->max_phys_descent, tem_it.max_phys_descent); } + it->line_number_produced_p = true; + bidi_unshelve_cache (itdata, false); } @@ -21290,6 +21296,8 @@ display_line (struct it *it, int cursor_vpos) row->displays_text_p = true; row->starts_in_middle_of_char_p = it->starts_in_middle_of_char_p; it->starts_in_middle_of_char_p = false; + it->tab_offset = 0; + it->line_number_produced_p = false; /* Arrange the overlays nicely for our purposes. Usually, we call display_line on only one line at a time, in which case this @@ -21334,6 +21342,10 @@ display_line (struct it *it, int cursor_vpos) || move_result == MOVE_POS_MATCH_OR_ZV)) it->current_x = it->first_visible_x; + /* In case move_it_in_display_line_to above "produced" the line + number. */ + it->line_number_produced_p = false; + /* Record the smallest positions seen while we moved over display elements that are not visible. This is needed by redisplay_internal for optimizing the case where the cursor @@ -21553,6 +21565,10 @@ display_line (struct it *it, int cursor_vpos) row->extra_line_spacing = max (row->extra_line_spacing, it->max_extra_line_spacing); if (it->current_x - it->pixel_width < it->first_visible_x + /* When line numbers are displayed, row->x should not be + offset, as the first glyph after the line number can + never be partially visible. */ + && !line_number_needed /* In R2L rows, we arrange in extend_face_to_end_of_line to add a right offset to the line, by a suitable change to the stretch glyph that is the leftmost @@ -21794,7 +21810,8 @@ display_line (struct it *it, int cursor_vpos) if (it->bidi_p) RECORD_MAX_MIN_POS (it); - if (x < it->first_visible_x && !row->reversed_p) + if (x < it->first_visible_x && !row->reversed_p + && !line_number_needed) /* Glyph is partially visible, i.e. row starts at negative X position. Don't do that in R2L rows, where we arrange to add a right offset to @@ -21810,6 +21827,7 @@ display_line (struct it *it, int cursor_vpos) be taken care of in produce_special_glyphs. */ if (row->reversed_p && new_x > it->last_visible_x + && !line_number_needed && !(it->line_wrap == TRUNCATE && WINDOW_LEFT_FRINGE_WIDTH (it->w) == 0)) { @@ -28274,8 +28292,14 @@ x_produce_glyphs (struct it *it) int x = it->current_x + it->continuation_lines_width; int x0 = x; /* Adjust for line numbers, if needed. */ - if (!NILP (Vdisplay_line_numbers) && x0 >= it->lnum_pixel_width) - x -= it->lnum_pixel_width; + if (!NILP (Vdisplay_line_numbers) && it->line_number_produced_p) + { + x -= it->lnum_pixel_width; + /* Restore the original TAB width, if required. */ + if (x + it->tab_offset >= it->first_visible_x) + x += it->tab_offset; + } + int next_tab_x = ((1 + x + tab_width - 1) / tab_width) * tab_width; /* If the distance from the current position to the next tab @@ -28283,10 +28307,19 @@ x_produce_glyphs (struct it *it) tab stop after that. */ if (next_tab_x - x < font->space_width) next_tab_x += tab_width; - if (!NILP (Vdisplay_line_numbers) && x0 >= it->lnum_pixel_width) - next_tab_x += (it->lnum_pixel_width - - ((it->w->hscroll * font->space_width) - % tab_width)); + if (!NILP (Vdisplay_line_numbers) && it->line_number_produced_p) + { + next_tab_x += it->lnum_pixel_width; + /* If the line is hscrolled, and the TAB starts before + the first visible pixel, simulate negative row->x. */ + if (x < it->first_visible_x) + { + next_tab_x -= it->first_visible_x - x; + it->tab_offset = it->first_visible_x - x; + } + else + next_tab_x -= it->tab_offset; + } it->pixel_width = next_tab_x - x0; it->nglyphs = 1; commit d523e4accd6656b6960e0990a353f00b1f42feff Author: Glenn Morris Date: Tue Mar 6 20:18:54 2018 -0500 Remove some unused spam.el variables * lisp/gnus/spam.el (spam-ifile-path, spam-ifile-database-path) (spam-bogofilter-path, spam-bsfilter-path) (spam-spamassassin-path, spam-sa-learn-path): Remove variables that are described as obsolete, but are really completely unused, and have been for years. diff --git a/lisp/gnus/spam.el b/lisp/gnus/spam.el index f2024a339b..1c2b346723 100644 --- a/lisp/gnus/spam.el +++ b/lisp/gnus/spam.el @@ -411,16 +411,12 @@ Only meaningful if you enable `spam-use-regex-body'." "Spam ifile configuration." :group 'spam) -(make-obsolete-variable 'spam-ifile-path 'spam-ifile-program - "Gnus 5.10.9 (Emacs 22.1)") (defcustom spam-ifile-program (executable-find "ifile") "Name of the ifile program." :type '(choice (file :tag "Location of ifile") (const :tag "ifile is not installed")) :group 'spam-ifile) -(make-obsolete-variable 'spam-ifile-database-path 'spam-ifile-database - "Gnus 5.10.9 (Emacs 22.1)") (defcustom spam-ifile-database nil "File name of the ifile database." :type '(choice (file :tag "Location of the ifile database") @@ -450,8 +446,6 @@ your main source of newsgroup names." "Spam bogofilter configuration." :group 'spam) -(make-obsolete-variable 'spam-bogofilter-path 'spam-bogofilter-program - "Gnus 5.10.9 (Emacs 22.1)") (defcustom spam-bogofilter-program (executable-find "bogofilter") "Name of the Bogofilter program." :type '(choice (file :tag "Location of bogofilter") @@ -502,8 +496,6 @@ When nil, use the default location." "Spam bsfilter configuration." :group 'spam) -(make-obsolete-variable 'spam-bsfilter-path 'spam-bsfilter-program - "Gnus 5.10.9 (Emacs 22.1)") (defcustom spam-bsfilter-program (executable-find "bsfilter") "Name of the Bsfilter program." :type '(choice (file :tag "Location of bsfilter") @@ -568,8 +560,6 @@ When nil, use the default spamoracle database." "Spam SpamAssassin configuration." :group 'spam) -(make-obsolete-variable 'spam-spamassassin-path - 'spam-spamassassin-program "Gnus 5.10.9 (Emacs 22.1)") (defcustom spam-assassin-program (executable-find "spamassassin") "Name of the spamassassin program. Hint: set this to \"spamc\" if you have spamd running. See the spamc and @@ -600,8 +590,6 @@ identification" :type 'string :group 'spam-spamassassin) -(make-obsolete-variable 'spam-sa-learn-path 'spam-sa-learn-program - "Gnus 5.10.9 (Emacs 22.1)") (defcustom spam-sa-learn-program (executable-find "sa-learn") "Name of the sa-learn program." :type '(choice (file :tag "Location of spamassassin") commit 501808ce690c93eac7df4b8f467ed940528d9229 Author: Glenn Morris Date: Tue Mar 6 20:16:52 2018 -0500 Replace some obsolete aliases in code * lisp/emulation/viper.el (viper-set-hooks): * lisp/epa-hook.el (auto-encryption-mode): * lisp/term/pc-win.el (set-frame-font): Replace obsolete aliases. * lisp/net/quickurl.el (quickurl--assoc-function): New. (quickurl-assoc-function): Use it. diff --git a/lisp/emulation/viper.el b/lisp/emulation/viper.el index 13a88ad11f..c8eca30e88 100644 --- a/lisp/emulation/viper.el +++ b/lisp/emulation/viper.el @@ -902,7 +902,7 @@ Two differences: (viper-setup-ESC-to-escape t) (add-hook 'change-major-mode-hook #'viper-major-mode-change-sentinel) - (add-hook 'find-file-hooks #'set-viper-state-in-major-mode) + (add-hook 'find-file-hook #'set-viper-state-in-major-mode) ;; keep this because many modes we don't know about use this hook (defvar text-mode-hook) diff --git a/lisp/epa-hook.el b/lisp/epa-hook.el index d99a3ef51a..135c956c3f 100644 --- a/lisp/epa-hook.el +++ b/lisp/epa-hook.el @@ -95,7 +95,7 @@ the mode if ARG is omitted or nil." :initialize 'custom-initialize-delay (setq file-name-handler-alist (delq epa-file-handler file-name-handler-alist)) - (remove-hook 'find-file-hooks 'epa-file-find-file-hook) + (remove-hook 'find-file-hook 'epa-file-find-file-hook) (setq auto-mode-alist (delq epa-file-auto-mode-alist-entry auto-mode-alist)) (when auto-encryption-mode diff --git a/lisp/net/quickurl.el b/lisp/net/quickurl.el index 5321807cd6..abfca383e0 100644 --- a/lisp/net/quickurl.el +++ b/lisp/net/quickurl.el @@ -116,8 +116,13 @@ :type 'function :group 'quickurl) -(defcustom quickurl-assoc-function #'assoc-ignore-case +(defun quickurl--assoc-function (key alist) + "Default function for `quickurl-assoc-function'." + (assoc-string key alist t)) + +(defcustom quickurl-assoc-function #'quickurl--assoc-function "Function to use for alist lookup into `quickurl-urls'." + :version "26.1" ; was the obsolete assoc-ignore-case :type 'function :group 'quickurl) diff --git a/lisp/term/pc-win.el b/lisp/term/pc-win.el index 83f5923ad5..62734d9cfe 100644 --- a/lisp/term/pc-win.el +++ b/lisp/term/pc-win.el @@ -372,7 +372,7 @@ Consult the selection. Treat empty strings as if they were unset." (fset 'iconify-or-deiconify-frame 'ignore) ;; From lisp/frame.el -(fset 'set-default-font 'ignore) +(fset 'set-frame-font 'ignore) (fset 'set-mouse-color 'ignore) ; We cannot, I think. (fset 'set-cursor-color 'ignore) ; Hardware determined by char under. (fset 'set-border-color 'ignore) ; Not useful. commit 19afff31c9340ba5c35504064fb0fadcc8a86aff Author: Glenn Morris Date: Tue Mar 6 20:13:51 2018 -0500 Replace some obsolete aliases in documentation * doc/emacs/text.texi (Nroff Mode): * doc/misc/efaq.texi (How to add fonts): * lisp/gnus/nnheader.el (nnheader-insert-file-contents): * lisp/progmodes/pascal.el (pascal-outline-mode): Doc fixes re obsolete aliases. ; * src/frame.c (do_switch_frame): Comment. diff --git a/doc/emacs/text.texi b/doc/emacs/text.texi index c8e36411a5..b188c02a9a 100644 --- a/doc/emacs/text.texi +++ b/doc/emacs/text.texi @@ -2057,27 +2057,27 @@ hook @code{text-mode-hook}, then @code{nroff-mode-hook} separators, pages are separated by @samp{.bp} commands, and comments start with backslash-doublequote. It also defines these commands: -@findex forward-text-line -@findex backward-text-line -@findex count-text-lines +@findex nroff-forward-text-line +@findex nroff-backward-text-line +@findex nroff-count-text-lines @kindex M-n @r{(Nroff mode)} @kindex M-p @r{(Nroff mode)} @kindex M-? @r{(Nroff mode)} @table @kbd @item M-n Move to the beginning of the next line that isn't an nroff command -(@code{forward-text-line}). An argument is a repeat count. +(@code{nroff-forward-text-line}). An argument is a repeat count. @item M-p -Like @kbd{M-n} but move up (@code{backward-text-line}). +Like @kbd{M-n} but move up (@code{nroff-backward-text-line}). @item M-? Displays in the echo area the number of text lines (lines that are not -nroff commands) in the region (@code{count-text-lines}). +nroff commands) in the region (@code{nroff-count-text-lines}). @end table -@findex electric-nroff-mode +@findex nroff-electric-mode Electric Nroff mode is a buffer-local minor mode that can be used with Nroff mode. To toggle this minor mode, type @kbd{M-x -electric-nroff-mode} (@pxref{Minor Modes}). When the mode is on, each +nroff-electric-mode} (@pxref{Minor Modes}). When the mode is on, each time you type @key{RET} to end a line containing an nroff command that opens a kind of grouping, the nroff command to close that grouping is automatically inserted on the following line. diff --git a/doc/misc/efaq.texi b/doc/misc/efaq.texi index 6f4977779f..e0dfc8936d 100644 --- a/doc/misc/efaq.texi +++ b/doc/misc/efaq.texi @@ -4310,7 +4310,7 @@ fontset, or you can select it by setting the default font in your @file{~/.emacs}: @lisp - (set-default-font "fontset-bdf") + (set-frame-font "fontset-bdf") @end lisp diff --git a/lisp/gnus/nnheader.el b/lisp/gnus/nnheader.el index 14bd14924f..77afb09a2a 100644 --- a/lisp/gnus/nnheader.el +++ b/lisp/gnus/nnheader.el @@ -945,7 +945,7 @@ first. Otherwise, find the newest one, though it may take a time." "Like `insert-file-contents', q.v., but only reads in the file. A buffer may be modified in several ways after reading into the buffer due to advanced Emacs features, such as file-name-handlers, format decoding, -find-file-hooks, etc. +find-file-hook, etc. This function ensures that none of these modifications will take place." (let ((coding-system-for-read nnheader-file-coding-system)) (mm-insert-file-contents filename visit beg end replace))) diff --git a/lisp/progmodes/pascal.el b/lisp/progmodes/pascal.el index 83f15d495b..737dd9ea8a 100644 --- a/lisp/progmodes/pascal.el +++ b/lisp/progmodes/pascal.el @@ -1425,7 +1425,7 @@ Pascal Outline mode provides some additional commands. \\[pascal-show-all]\t- Show the whole buffer. \\[pascal-hide-other-defuns]\ \t- Hide everything but the current function (function under the cursor). -\\[pascal-outline]\t- Leave Pascal Outline mode." +\\[pascal-outline-mode]\t- Leave Pascal Outline mode." :init-value nil :lighter " Outl" :keymap pascal-outline-map (add-to-invisibility-spec '(pascal . t)) (unless pascal-outline-mode diff --git a/src/frame.c b/src/frame.c index a86f05191a..cee775c6fa 100644 --- a/src/frame.c +++ b/src/frame.c @@ -1419,7 +1419,7 @@ do_switch_frame (Lisp_Object frame, int track, int for_deletion, Lisp_Object nor /* We want to make sure that the next event generates a frame-switch event to the appropriate frame. This seems kludgy to me, but before you take it out, make sure that evaluating something like - (select-window (frame-root-window (new-frame))) doesn't end up + (select-window (frame-root-window (make-frame))) doesn't end up with your typing being interpreted in the new frame instead of the one you're actually typing in. */ #ifdef HAVE_WINDOW_SYSTEM commit c797bc90f5c63ad5ad01c1caa54f6d236a283efe Merge: add48d2064 0efe0bd233 Author: Eli Zaretskii Date: Tue Mar 6 22:45:33 2018 +0200 Merge branch 'emacs-26' of git.savannah.gnu.org:/srv/git/emacs into emacs-26 commit 4ad214f36c2b1eab4446f9f698ce2588941a7356 Author: Glenn Morris Date: Tue Mar 6 15:10:49 2018 -0500 Condition em-cmpl's setting of pcomplete-suffix-list * lisp/eshell/em-cmpl.el (eshell-cmpl-initialize): Only set pcomplete-suffix-list if it is defined. diff --git a/lisp/eshell/em-cmpl.el b/lisp/eshell/em-cmpl.el index 667bdeb43b..fe34d9546a 100644 --- a/lisp/eshell/em-cmpl.el +++ b/lisp/eshell/em-cmpl.el @@ -259,8 +259,9 @@ to writing a completion function." eshell-cmpl-ignore-case) (set (make-local-variable 'pcomplete-autolist) eshell-cmpl-autolist) - (set (make-local-variable 'pcomplete-suffix-list) - eshell-cmpl-suffix-list) + (if (boundp 'pcomplete-suffix-list) + (set (make-local-variable 'pcomplete-suffix-list) + eshell-cmpl-suffix-list)) (set (make-local-variable 'pcomplete-recexact) eshell-cmpl-recexact) (set (make-local-variable 'pcomplete-man-function) commit 0efe0bd233de20bfb5bd9d06b255fc8ecf04602b Author: Glenn Morris Date: Tue Mar 6 15:07:15 2018 -0500 Obsolete eshell-cmpl-suffix-list * lisp/eshell/em-cmpl.el (eshell-cmpl-suffix-list): Make obsolete, to match pcomplete-suffix-list. diff --git a/lisp/eshell/em-cmpl.el b/lisp/eshell/em-cmpl.el index 1f44007746..b56cf168a2 100644 --- a/lisp/eshell/em-cmpl.el +++ b/lisp/eshell/em-cmpl.el @@ -167,6 +167,9 @@ to writing a completion function." (eshell-cmpl--custom-variable-docstring 'pcomplete-suffix-list) :type (get 'pcomplete-suffix-list 'custom-type) :group 'pcomplete) +;; Only labelled obsolete in 26.1, but all it does it set +;; pcomplete-suffix-list, which is itself obsolete since 24.1. +(make-obsolete-variable 'eshell-cmpl-suffix-list nil "24.1") (defcustom eshell-cmpl-recexact nil (eshell-cmpl--custom-variable-docstring 'pcomplete-recexact) commit add48d206463255030a7cc958faa8efb63197836 Author: Eli Zaretskii Date: Tue Mar 6 19:32:39 2018 +0200 More minor changes in the Glossary of the Emacs manual * doc/emacs/glossary.texi (Glossary): Improve cross-references for modifier keys. Fix typos. Suggested by Gijs Hillenius in emacs-manual-bugs@gnu.org. diff --git a/doc/emacs/glossary.texi b/doc/emacs/glossary.texi index 148aafd1e5..6002e367cc 100644 --- a/doc/emacs/glossary.texi +++ b/doc/emacs/glossary.texi @@ -720,10 +720,11 @@ customizing the various hooks, you can modify Emacs's behavior without changing any of its code. @xref{Hooks}. @item Hyper -Hyper is the name of a modifier bit that a keyboard input character may -have. To make a character Hyper, type it while holding down the +Hyper is the name of a modifier bit that a keyboard input character +may have. To make a character Hyper, type it while holding down the @key{Hyper} key. Such characters are given names that start with -@kbd{Hyper-} (usually written @kbd{H-} for short). @xref{User Input}. +@kbd{Hyper-} (usually written @kbd{H-} for short). @xref{Modifier +Keys}. @item i.e. Short for ``id est'' in Latin, which means ``that is''. @@ -1343,10 +1344,11 @@ which characters balance each other like parentheses, etc. Manual}. @item Super -Super is the name of a modifier bit that a keyboard input character may -have. To make a character Super, type it while holding down the +Super is the name of a modifier bit that a keyboard input character +may have. To make a character Super, type it while holding down the @key{SUPER} key. Such characters are given names that start with -@kbd{Super-} (usually written @kbd{s-} for short). @xref{User Input}. +@kbd{Super-} (usually written @kbd{s-} for short). @xref{Modifier +Keys}. @item Suspending Suspending Emacs means stopping it temporarily and returning control @@ -1493,13 +1495,13 @@ Emacs divides a frame (q.v.@:) into one or more windows, each of which can display the contents of one buffer (q.v.@:) at any time. @xref{Screen}, for basic information on how Emacs uses the screen. @xref{Windows}, for commands to control the use of windows. Some -other editors use the term ``window'' for what we call a ``frame'' -(q.v.@:) in Emacs. +other editors use the term ``window'' for what we call a ``frame'' in +Emacs. @item Window System A window system is software that operates on a graphical display -(q.v.), to subdivide the screen so that multiple applications can -have their] own windows at the same time. All modern operating systems +(q.v.), to subdivide the screen so that multiple applications can have +their own windows at the same time. All modern operating systems include a window system. @item Word Abbrev commit f6bd7e06861142371994ff9ce54dd62573809fa5 Author: Michael Heerdegen Date: Tue Mar 6 18:28:51 2018 +0100 Revert last commit This reverts commit af4697faa1f5b643f63a9ea61aa205a4c1432e23. It's too late for this to be in the release. diff --git a/etc/NEWS b/etc/NEWS index c88bec5a56..eded00e655 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1301,10 +1301,12 @@ current buffer or the self-insertion takes place within a comment. ** The alist 'ucs-names' is now a hash table. --- -** The new macro 'and-let' is an implementation of the Scheme SRFI-2 -syntax. 'if-let' and 'when-let' now also accept the same binding -syntax as 'and-let'. 'if-let*', 'when-let*' and 'and-let*' are new -aliases for 'if-let', 'when-let' and 'and-let'. +** 'if-let' and 'when-let' are subsumed by 'if-let*' and 'when-let*'. +The incumbent 'if-let' and 'when-let' are now marked obsolete. +'if-let*' and 'when-let*' do not accept the single tuple special case. +New macro 'and-let*' is an implementation of the Scheme SRFI-2 syntax +of the same name. 'if-let*' and 'when-let*' now accept the same +binding syntax as 'and-let*'. --- ** 'C-up', 'C-down', 'C-left' and 'C-right' are now defined in term diff --git a/lisp/emacs-lisp/subr-x.el b/lisp/emacs-lisp/subr-x.el index b2d7f0dec4..21dba377bf 100644 --- a/lisp/emacs-lisp/subr-x.el +++ b/lisp/emacs-lisp/subr-x.el @@ -121,7 +121,7 @@ If ELT is of the form ((EXPR)), listify (EXPR) with a dummy symbol." binding)) bindings))) -(defmacro if-let (varlist then &rest else) +(defmacro if-let* (varlist then &rest else) "Bind variables according to VARLIST and eval THEN or ELSE. Each binding is evaluated in turn, and evaluation stops if a binding value is nil. If all are non-nil, the value of THEN is @@ -131,18 +131,10 @@ Each element of VARLIST is a list (SYMBOL VALUEFORM) which binds SYMBOL to the value of VALUEFORM. An element can additionally be of the form (VALUEFORM), which is evaluated and checked for nil; i.e. SYMBOL can be omitted if only the test result is of -interest. - -As a special case, a VARLIST of the form (SYMBOL SOMETHING) is -treated like ((SYMBOL SOMETHING))." +interest." (declare (indent 2) - (debug ([&or (symbolp form) - (&rest [&or symbolp (symbolp form) (form)])] + (debug ((&rest [&or symbolp (symbolp form) (form)]) form body))) - (pcase varlist - (`(,(pred symbolp) ,_) - ;; the single-tuple syntax case, for backward compatibility - (cl-callf list varlist))) (if varlist `(let* ,(setq varlist (internal--build-bindings varlist)) (if ,(caar (last varlist)) @@ -150,23 +142,23 @@ treated like ((SYMBOL SOMETHING))." ,@else)) `(let* () ,then))) -(defmacro when-let (varlist &rest body) +(defmacro when-let* (varlist &rest body) "Bind variables according to VARLIST and conditionally eval BODY. Each binding is evaluated in turn, and evaluation stops if a binding value is nil. If all are non-nil, the value of the last form in BODY is returned. -VARLIST is the same as in `if-let'." - (declare (indent 1) (debug ([&or (symbolp form) - (&rest [&or symbolp (symbolp form) (form)])] - body))) - (list 'if-let varlist (macroexp-progn body))) +VARLIST is the same as in `if-let*'." + (declare (indent 1) (debug if-let*)) + (list 'if-let* varlist (macroexp-progn body))) -(defmacro and-let (varlist &rest body) +(defmacro and-let* (varlist &rest body) "Bind variables according to VARLIST and conditionally eval BODY. -Like `when-let', except if BODY is empty and all the bindings +Like `when-let*', except if BODY is empty and all the bindings are non-nil, then the result is non-nil." - (declare (indent 1) (debug when-let)) + (declare (indent 1) + (debug ((&rest [&or symbolp (symbolp form) (form)]) + body))) (let (res) (if varlist `(let* ,(setq varlist (internal--build-bindings varlist)) @@ -174,9 +166,26 @@ are non-nil, then the result is non-nil." ,@(or body `(,res)))) `(let* () ,@(or body '(t)))))) -(defalias 'if-let* #'if-let) -(defalias 'when-let* #'when-let) -(defalias 'and-let* #'and-let) +(defmacro if-let (spec then &rest else) + "Bind variables according to SPEC and eval THEN or ELSE. +Like `if-let*' except SPEC can have the form (SYMBOL VALUEFORM)." + (declare (indent 2) + (debug ([&or (&rest [&or symbolp (symbolp form) (form)]) + (symbolp form)] + form body)) + (obsolete "use `if-let*' instead." "26.1")) + (when (and (<= (length spec) 2) + (not (listp (car spec)))) + ;; Adjust the single binding case + (setq spec (list spec))) + (list 'if-let* spec then (macroexp-progn else))) + +(defmacro when-let (spec &rest body) + "Bind variables according to SPEC and conditionally eval BODY. +Like `when-let*' except SPEC can have the form (SYMBOL VALUEFORM)." + (declare (indent 1) (debug if-let) + (obsolete "use `when-let*' instead." "26.1")) + (list 'if-let spec (macroexp-progn body))) (defsubst hash-table-empty-p (hash-table) "Check whether HASH-TABLE is empty (has 0 elements)." diff --git a/test/lisp/emacs-lisp/subr-x-tests.el b/test/lisp/emacs-lisp/subr-x-tests.el index a361718c9e..c9618f3c37 100644 --- a/test/lisp/emacs-lisp/subr-x-tests.el +++ b/test/lisp/emacs-lisp/subr-x-tests.el @@ -28,13 +28,13 @@ (require 'subr-x) -;; `if-let' tests +;; `if-let*' tests -(ert-deftest subr-x-test-if-let-single-binding-expansion () +(ert-deftest subr-x-test-if-let*-single-binding-expansion () "Test single bindings are expanded properly." (should (equal (macroexpand - '(if-let ((a 1)) + '(if-let* ((a 1)) (- a) "no")) '(let* ((a (and t 1))) @@ -43,7 +43,7 @@ "no")))) (should (equal (macroexpand - '(if-let (a) + '(if-let* (a) (- a) "no")) '(let* ((a (and t a))) @@ -51,11 +51,11 @@ (- a) "no"))))) -(ert-deftest subr-x-test-if-let-single-symbol-expansion () +(ert-deftest subr-x-test-if-let*-single-symbol-expansion () "Test single symbol bindings are expanded properly." (should (equal (macroexpand - '(if-let (a) + '(if-let* (a) (- a) "no")) '(let* ((a (and t a))) @@ -64,7 +64,7 @@ "no")))) (should (equal (macroexpand - '(if-let (a b c) + '(if-let* (a b c) (- a) "no")) '(let* ((a (and t a)) @@ -75,7 +75,7 @@ "no")))) (should (equal (macroexpand - '(if-let (a (b 2) c) + '(if-let* (a (b 2) c) (- a) "no")) '(let* ((a (and t a)) @@ -85,11 +85,11 @@ (- a) "no"))))) -(ert-deftest subr-x-test-if-let-nil-related-expansion () +(ert-deftest subr-x-test-if-let*-nil-related-expansion () "Test nil is processed properly." (should (equal (macroexpand - '(if-let (nil) + '(if-let* (nil) (- a) "no")) '(let* ((nil (and t nil))) @@ -98,7 +98,7 @@ "no")))) (should (equal (macroexpand - '(if-let ((a 1) nil (b 2)) + '(if-let* ((a 1) nil (b 2)) (- a) "no")) '(let* ((a (and t 1)) @@ -108,106 +108,106 @@ (- a) "no"))))) -(ert-deftest subr-x-test-if-let-malformed-binding () +(ert-deftest subr-x-test-if-let*-malformed-binding () "Test malformed bindings trigger errors." (should-error (macroexpand - '(if-let (_ (a 1 1) (b 2) (c 3) d) + '(if-let* (_ (a 1 1) (b 2) (c 3) d) (- a) "no")) :type 'error) (should-error (macroexpand - '(if-let (_ (a 1) (b 2 2) (c 3) d) + '(if-let* (_ (a 1) (b 2 2) (c 3) d) (- a) "no")) :type 'error) (should-error (macroexpand - '(if-let (_ (a 1) (b 2) (c 3 3) d) + '(if-let* (_ (a 1) (b 2) (c 3 3) d) (- a) "no")) :type 'error) (should-error (macroexpand - '(if-let ((a 1 1)) + '(if-let* ((a 1 1)) (- a) "no")) :type 'error)) -(ert-deftest subr-x-test-if-let-true () +(ert-deftest subr-x-test-if-let*-true () "Test `if-let' with truthy bindings." (should (equal - (if-let ((a 1)) + (if-let* ((a 1)) a "no") 1)) (should (equal - (if-let ((a 1) (b 2) (c 3)) + (if-let* ((a 1) (b 2) (c 3)) (list a b c) "no") (list 1 2 3)))) -(ert-deftest subr-x-test-if-let-false () +(ert-deftest subr-x-test-if-let*-false () "Test `if-let' with falsie bindings." (should (equal - (if-let ((a nil)) + (if-let* ((a nil)) (list a b c) "no") "no")) (should (equal - (if-let ((a nil) (b 2) (c 3)) + (if-let* ((a nil) (b 2) (c 3)) (list a b c) "no") "no")) (should (equal - (if-let ((a 1) (b nil) (c 3)) + (if-let* ((a 1) (b nil) (c 3)) (list a b c) "no") "no")) (should (equal - (if-let ((a 1) (b 2) (c nil)) + (if-let* ((a 1) (b 2) (c nil)) (list a b c) "no") "no")) (should (equal (let (z) - (if-let (z (a 1) (b 2) (c 3)) + (if-let* (z (a 1) (b 2) (c 3)) (list a b c) "no")) "no")) (should (equal (let (d) - (if-let ((a 1) (b 2) (c 3) d) + (if-let* ((a 1) (b 2) (c 3) d) (list a b c) "no")) "no"))) -(ert-deftest subr-x-test-if-let-bound-references () +(ert-deftest subr-x-test-if-let*-bound-references () "Test `if-let' bindings can refer to already bound symbols." (should (equal - (if-let ((a (1+ 0)) (b (1+ a)) (c (1+ b))) + (if-let* ((a (1+ 0)) (b (1+ a)) (c (1+ b))) (list a b c) "no") (list 1 2 3)))) -(ert-deftest subr-x-test-if-let-and-laziness-is-preserved () +(ert-deftest subr-x-test-if-let*-and-laziness-is-preserved () "Test `if-let' respects `and' laziness." (let (a-called b-called c-called) (should (equal - (if-let ((a nil) - (b (setq b-called t)) - (c (setq c-called t))) + (if-let* ((a nil) + (b (setq b-called t)) + (c (setq c-called t))) "yes" (list a-called b-called c-called)) (list nil nil nil)))) (let (a-called b-called c-called) (should (equal - (if-let ((a (setq a-called t)) - (b nil) - (c (setq c-called t))) + (if-let* ((a (setq a-called t)) + (b nil) + (c (setq c-called t))) "yes" (list a-called b-called c-called)) (list t nil nil)))) (let (a-called b-called c-called) (should (equal - (if-let ((a (setq a-called t)) + (if-let* ((a (setq a-called t)) (b (setq b-called t)) (c nil) (d (setq c-called t))) @@ -215,19 +215,14 @@ (list a-called b-called c-called)) (list t t nil))))) -(defun if-let-single-tuple-case-test () - "Test the BINDING-SPEC == (SYMBOL SOMETHING) case." - (should (equal (if-let (a 1) (1+ a)) 2)) - (should (equal (let ((b 2)) (if-let (a b) a)) 2))) - -;; `when-let' tests +;; `when-let*' tests -(ert-deftest subr-x-test-when-let-body-expansion () +(ert-deftest subr-x-test-when-let*-body-expansion () "Test body allows for multiple sexps wrapping with progn." (should (equal (macroexpand - '(when-let ((a 1)) + '(when-let* ((a 1)) (message "opposite") (- a))) '(let* ((a (and t 1))) @@ -236,18 +231,18 @@ (message "opposite") (- a))))))) -(ert-deftest subr-x-test-when-let-single-symbol-expansion () +(ert-deftest subr-x-test-when-let*-single-symbol-expansion () "Test single symbol bindings are expanded properly." (should (equal (macroexpand - '(when-let (a) + '(when-let* (a) (- a))) '(let* ((a (and t a))) (if a (- a))))) (should (equal (macroexpand - '(when-let (a b c) + '(when-let* (a b c) (- a))) '(let* ((a (and t a)) (b (and a b)) @@ -256,7 +251,7 @@ (- a))))) (should (equal (macroexpand - '(when-let (a (b 2) c) + '(when-let* (a (b 2) c) (- a))) '(let* ((a (and t a)) (b (and a 2)) @@ -264,18 +259,18 @@ (if c (- a)))))) -(ert-deftest subr-x-test-when-let-nil-related-expansion () +(ert-deftest subr-x-test-when-let*-nil-related-expansion () "Test nil is processed properly." (should (equal (macroexpand - '(when-let (nil) + '(when-let* (nil) (- a))) '(let* ((nil (and t nil))) (if nil (- a))))) (should (equal (macroexpand - '(when-let ((a 1) nil (b 2)) + '(when-let* ((a 1) nil (b 2)) (- a))) '(let* ((a (and t 1)) (nil (and a nil)) @@ -283,178 +278,173 @@ (if b (- a)))))) -(ert-deftest subr-x-test-when-let-malformed-binding () +(ert-deftest subr-x-test-when-let*-malformed-binding () "Test malformed bindings trigger errors." (should-error (macroexpand - '(when-let (_ (a 1 1) (b 2) (c 3) d) + '(when-let* (_ (a 1 1) (b 2) (c 3) d) (- a))) :type 'error) (should-error (macroexpand - '(when-let (_ (a 1) (b 2 2) (c 3) d) + '(when-let* (_ (a 1) (b 2 2) (c 3) d) (- a))) :type 'error) (should-error (macroexpand - '(when-let (_ (a 1) (b 2) (c 3 3) d) + '(when-let* (_ (a 1) (b 2) (c 3 3) d) (- a))) :type 'error) (should-error (macroexpand - '(when-let ((a 1 1)) + '(when-let* ((a 1 1)) (- a))) :type 'error)) -(ert-deftest subr-x-test-when-let-true () +(ert-deftest subr-x-test-when-let*-true () "Test `when-let' with truthy bindings." (should (equal - (when-let ((a 1)) + (when-let* ((a 1)) a) 1)) (should (equal - (when-let ((a 1) (b 2) (c 3)) + (when-let* ((a 1) (b 2) (c 3)) (list a b c)) (list 1 2 3)))) -(ert-deftest subr-x-test-when-let-false () +(ert-deftest subr-x-test-when-let*-false () "Test `when-let' with falsie bindings." (should (equal - (when-let ((a nil)) + (when-let* ((a nil)) (list a b c) "no") nil)) (should (equal - (when-let ((a nil) (b 2) (c 3)) + (when-let* ((a nil) (b 2) (c 3)) (list a b c) "no") nil)) (should (equal - (when-let ((a 1) (b nil) (c 3)) + (when-let* ((a 1) (b nil) (c 3)) (list a b c) "no") nil)) (should (equal - (when-let ((a 1) (b 2) (c nil)) + (when-let* ((a 1) (b 2) (c nil)) (list a b c) "no") nil)) (should (equal (let (z) - (when-let (z (a 1) (b 2) (c 3)) + (when-let* (z (a 1) (b 2) (c 3)) (list a b c) "no")) nil)) (should (equal (let (d) - (when-let ((a 1) (b 2) (c 3) d) + (when-let* ((a 1) (b 2) (c 3) d) (list a b c) "no")) nil))) -(ert-deftest subr-x-test-when-let-bound-references () +(ert-deftest subr-x-test-when-let*-bound-references () "Test `when-let' bindings can refer to already bound symbols." (should (equal - (when-let ((a (1+ 0)) (b (1+ a)) (c (1+ b))) + (when-let* ((a (1+ 0)) (b (1+ a)) (c (1+ b))) (list a b c)) (list 1 2 3)))) -(ert-deftest subr-x-test-when-let-and-laziness-is-preserved () +(ert-deftest subr-x-test-when-let*-and-laziness-is-preserved () "Test `when-let' respects `and' laziness." (let (a-called b-called c-called) (should (equal (progn - (when-let ((a nil) - (b (setq b-called t)) - (c (setq c-called t))) + (when-let* ((a nil) + (b (setq b-called t)) + (c (setq c-called t))) "yes") (list a-called b-called c-called)) (list nil nil nil)))) (let (a-called b-called c-called) (should (equal (progn - (when-let ((a (setq a-called t)) - (b nil) - (c (setq c-called t))) + (when-let* ((a (setq a-called t)) + (b nil) + (c (setq c-called t))) "yes") (list a-called b-called c-called)) (list t nil nil)))) (let (a-called b-called c-called) (should (equal (progn - (when-let ((a (setq a-called t)) - (b (setq b-called t)) - (c nil) - (d (setq c-called t))) + (when-let* ((a (setq a-called t)) + (b (setq b-called t)) + (c nil) + (d (setq c-called t))) "yes") (list a-called b-called c-called)) (list t t nil))))) -(defun when-let-single-tuple-case-test () - "Test the BINDING-SPEC == (SYMBOL SOMETHING) case." - (should (equal (when-let (a 1) (1+ a)) 2)) - (should (equal (let ((b 2)) (when-let (a b) a)) 2))) - -;; `and-let' tests +;; `and-let*' tests ;; Adapted from the Guile tests ;; https://git.savannah.gnu.org/cgit/guile.git/tree/test-suite/tests/srfi-2.test -(ert-deftest subr-x-and-let-test-empty-varlist () - (should (equal 1 (and-let () 1))) - (should (equal 2 (and-let () 1 2))) - (should (equal t (and-let ())))) +(ert-deftest subr-x-and-let*-test-empty-varlist () + (should (equal 1 (and-let* () 1))) + (should (equal 2 (and-let* () 1 2))) + (should (equal t (and-let* ())))) -(ert-deftest subr-x-and-let-test-group-1 () - (should (equal nil (let ((x nil)) (and-let (x))))) - (should (equal 1 (let ((x 1)) (and-let (x))))) - (should (equal nil (and-let ((x nil))))) - (should (equal 1 (and-let ((x 1))))) +(ert-deftest subr-x-and-let*-test-group-1 () + (should (equal nil (let ((x nil)) (and-let* (x))))) + (should (equal 1 (let ((x 1)) (and-let* (x))))) + (should (equal nil (and-let* ((x nil))))) + (should (equal 1 (and-let* ((x 1))))) ;; The error doesn't trigger when compiled: the compiler will give ;; a warning and then drop the erroneous code. Therefore, use ;; `eval' to avoid compilation. - (should-error (eval '(and-let (nil (x 1))) lexical-binding) + (should-error (eval '(and-let* (nil (x 1))) lexical-binding) :type 'setting-constant) - (should (equal nil (and-let ((nil) (x 1))))) - (should-error (eval '(and-let (2 (x 1))) lexical-binding) + (should (equal nil (and-let* ((nil) (x 1))))) + (should-error (eval '(and-let* (2 (x 1))) lexical-binding) :type 'wrong-type-argument) - (should (equal 1 (and-let ((2) (x 1))))) - (should (equal 2 (and-let ((x 1) (2))))) - (should (equal nil (let ((x nil)) (and-let (x) x)))) - (should (equal "" (let ((x "")) (and-let (x) x)))) - (should (equal "" (let ((x "")) (and-let (x))))) - (should (equal 2 (let ((x 1)) (and-let (x) (+ x 1))))) - (should (equal nil (let ((x nil)) (and-let (x) (+ x 1))))) - (should (equal 2 (let ((x 1)) (and-let (((> x 0))) (+ x 1))))) - (should (equal t (let ((x 1)) (and-let (((> x 0))))))) - (should (equal nil (let ((x 0)) (and-let (((> x 0))) (+ x 1))))) + (should (equal 1 (and-let* ((2) (x 1))))) + (should (equal 2 (and-let* ((x 1) (2))))) + (should (equal nil (let ((x nil)) (and-let* (x) x)))) + (should (equal "" (let ((x "")) (and-let* (x) x)))) + (should (equal "" (let ((x "")) (and-let* (x))))) + (should (equal 2 (let ((x 1)) (and-let* (x) (+ x 1))))) + (should (equal nil (let ((x nil)) (and-let* (x) (+ x 1))))) + (should (equal 2 (let ((x 1)) (and-let* (((> x 0))) (+ x 1))))) + (should (equal t (let ((x 1)) (and-let* (((> x 0))))))) + (should (equal nil (let ((x 0)) (and-let* (((> x 0))) (+ x 1))))) (should (equal 3 - (let ((x 1)) (and-let (((> x 0)) (x (+ x 1))) (+ x 1)))))) + (let ((x 1)) (and-let* (((> x 0)) (x (+ x 1))) (+ x 1)))))) -(ert-deftest subr-x-and-let-test-rebind () +(ert-deftest subr-x-and-let*-test-rebind () (should (equal 4 (let ((x 1)) - (and-let (((> x 0)) (x (+ x 1)) (x (+ x 1))) (+ x 1)))))) + (and-let* (((> x 0)) (x (+ x 1)) (x (+ x 1))) (+ x 1)))))) -(ert-deftest subr-x-and-let-test-group-2 () +(ert-deftest subr-x-and-let*-test-group-2 () (should - (equal 2 (let ((x 1)) (and-let (x ((> x 0))) (+ x 1))))) + (equal 2 (let ((x 1)) (and-let* (x ((> x 0))) (+ x 1))))) (should - (equal 2 (let ((x 1)) (and-let (((progn x)) ((> x 0))) (+ x 1))))) - (should (equal nil (let ((x 0)) (and-let (x ((> x 0))) (+ x 1))))) - (should (equal nil (let ((x nil)) (and-let (x ((> x 0))) (+ x 1))))) + (equal 2 (let ((x 1)) (and-let* (((progn x)) ((> x 0))) (+ x 1))))) + (should (equal nil (let ((x 0)) (and-let* (x ((> x 0))) (+ x 1))))) + (should (equal nil (let ((x nil)) (and-let* (x ((> x 0))) (+ x 1))))) (should - (equal nil (let ((x nil)) (and-let (((progn x)) ((> x 0))) (+ x 1)))))) + (equal nil (let ((x nil)) (and-let* (((progn x)) ((> x 0))) (+ x 1)))))) -(ert-deftest subr-x-and-let-test-group-3 () +(ert-deftest subr-x-and-let*-test-group-3 () (should - (equal nil (let ((x 1)) (and-let (x (y (- x 1)) ((> y 0))) (/ x y))))) + (equal nil (let ((x 1)) (and-let* (x (y (- x 1)) ((> y 0))) (/ x y))))) (should - (equal nil (let ((x 0)) (and-let (x (y (- x 1)) ((> y 0))) (/ x y))))) + (equal nil (let ((x 0)) (and-let* (x (y (- x 1)) ((> y 0))) (/ x y))))) (should (equal nil - (let ((x nil)) (and-let (x (y (- x 1)) ((> y 0))) (/ x y))))) + (let ((x nil)) (and-let* (x (y (- x 1)) ((> y 0))) (/ x y))))) (should (equal (/ 3.0 2) - (let ((x 3.0)) (and-let (x (y (- x 1)) ((> y 0))) (/ x y)))))) + (let ((x 3.0)) (and-let* (x (y (- x 1)) ((> y 0))) (/ x y)))))) commit af4697faa1f5b643f63a9ea61aa205a4c1432e23 Author: Michael Heerdegen Date: Wed Feb 21 11:15:37 2018 +0100 Define if-let* and derivatives as aliases for if-let etc This commit reverts declaring `if-let' and `when-let' obsolete in favor of the new `if-let*' and `when-let*' versions because of the compiler warning mess (Bug#30039). Instead we make foo-let* aliases for foo-let. The old single-tuple variable spec case is still supported for backward compatibility. * lisp/emacs-lisp/subr-x.el (if-let, when-let): Don't declare obsolete. Tweak edebug specs. (and-let): Renamed from `and-let*' for compatibility with the names `if-let' and `when-let'. (if-let*, when-let*, and-let*): Define as aliases for `if-let', `when-let' and `and-let'. * test/lisp/emacs-lisp/subr-x-tests.el (if-let-single-tuple-case-test) (when-let-single-tuple-case-test): New tests for the single-binding tuple case. In the whole file, prefer the names without "*". diff --git a/etc/NEWS b/etc/NEWS index eded00e655..c88bec5a56 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1301,12 +1301,10 @@ current buffer or the self-insertion takes place within a comment. ** The alist 'ucs-names' is now a hash table. --- -** 'if-let' and 'when-let' are subsumed by 'if-let*' and 'when-let*'. -The incumbent 'if-let' and 'when-let' are now marked obsolete. -'if-let*' and 'when-let*' do not accept the single tuple special case. -New macro 'and-let*' is an implementation of the Scheme SRFI-2 syntax -of the same name. 'if-let*' and 'when-let*' now accept the same -binding syntax as 'and-let*'. +** The new macro 'and-let' is an implementation of the Scheme SRFI-2 +syntax. 'if-let' and 'when-let' now also accept the same binding +syntax as 'and-let'. 'if-let*', 'when-let*' and 'and-let*' are new +aliases for 'if-let', 'when-let' and 'and-let'. --- ** 'C-up', 'C-down', 'C-left' and 'C-right' are now defined in term diff --git a/lisp/emacs-lisp/subr-x.el b/lisp/emacs-lisp/subr-x.el index 21dba377bf..b2d7f0dec4 100644 --- a/lisp/emacs-lisp/subr-x.el +++ b/lisp/emacs-lisp/subr-x.el @@ -121,7 +121,7 @@ If ELT is of the form ((EXPR)), listify (EXPR) with a dummy symbol." binding)) bindings))) -(defmacro if-let* (varlist then &rest else) +(defmacro if-let (varlist then &rest else) "Bind variables according to VARLIST and eval THEN or ELSE. Each binding is evaluated in turn, and evaluation stops if a binding value is nil. If all are non-nil, the value of THEN is @@ -131,10 +131,18 @@ Each element of VARLIST is a list (SYMBOL VALUEFORM) which binds SYMBOL to the value of VALUEFORM. An element can additionally be of the form (VALUEFORM), which is evaluated and checked for nil; i.e. SYMBOL can be omitted if only the test result is of -interest." +interest. + +As a special case, a VARLIST of the form (SYMBOL SOMETHING) is +treated like ((SYMBOL SOMETHING))." (declare (indent 2) - (debug ((&rest [&or symbolp (symbolp form) (form)]) + (debug ([&or (symbolp form) + (&rest [&or symbolp (symbolp form) (form)])] form body))) + (pcase varlist + (`(,(pred symbolp) ,_) + ;; the single-tuple syntax case, for backward compatibility + (cl-callf list varlist))) (if varlist `(let* ,(setq varlist (internal--build-bindings varlist)) (if ,(caar (last varlist)) @@ -142,23 +150,23 @@ interest." ,@else)) `(let* () ,then))) -(defmacro when-let* (varlist &rest body) +(defmacro when-let (varlist &rest body) "Bind variables according to VARLIST and conditionally eval BODY. Each binding is evaluated in turn, and evaluation stops if a binding value is nil. If all are non-nil, the value of the last form in BODY is returned. -VARLIST is the same as in `if-let*'." - (declare (indent 1) (debug if-let*)) - (list 'if-let* varlist (macroexp-progn body))) +VARLIST is the same as in `if-let'." + (declare (indent 1) (debug ([&or (symbolp form) + (&rest [&or symbolp (symbolp form) (form)])] + body))) + (list 'if-let varlist (macroexp-progn body))) -(defmacro and-let* (varlist &rest body) +(defmacro and-let (varlist &rest body) "Bind variables according to VARLIST and conditionally eval BODY. -Like `when-let*', except if BODY is empty and all the bindings +Like `when-let', except if BODY is empty and all the bindings are non-nil, then the result is non-nil." - (declare (indent 1) - (debug ((&rest [&or symbolp (symbolp form) (form)]) - body))) + (declare (indent 1) (debug when-let)) (let (res) (if varlist `(let* ,(setq varlist (internal--build-bindings varlist)) @@ -166,26 +174,9 @@ are non-nil, then the result is non-nil." ,@(or body `(,res)))) `(let* () ,@(or body '(t)))))) -(defmacro if-let (spec then &rest else) - "Bind variables according to SPEC and eval THEN or ELSE. -Like `if-let*' except SPEC can have the form (SYMBOL VALUEFORM)." - (declare (indent 2) - (debug ([&or (&rest [&or symbolp (symbolp form) (form)]) - (symbolp form)] - form body)) - (obsolete "use `if-let*' instead." "26.1")) - (when (and (<= (length spec) 2) - (not (listp (car spec)))) - ;; Adjust the single binding case - (setq spec (list spec))) - (list 'if-let* spec then (macroexp-progn else))) - -(defmacro when-let (spec &rest body) - "Bind variables according to SPEC and conditionally eval BODY. -Like `when-let*' except SPEC can have the form (SYMBOL VALUEFORM)." - (declare (indent 1) (debug if-let) - (obsolete "use `when-let*' instead." "26.1")) - (list 'if-let spec (macroexp-progn body))) +(defalias 'if-let* #'if-let) +(defalias 'when-let* #'when-let) +(defalias 'and-let* #'and-let) (defsubst hash-table-empty-p (hash-table) "Check whether HASH-TABLE is empty (has 0 elements)." diff --git a/test/lisp/emacs-lisp/subr-x-tests.el b/test/lisp/emacs-lisp/subr-x-tests.el index c9618f3c37..a361718c9e 100644 --- a/test/lisp/emacs-lisp/subr-x-tests.el +++ b/test/lisp/emacs-lisp/subr-x-tests.el @@ -28,13 +28,13 @@ (require 'subr-x) -;; `if-let*' tests +;; `if-let' tests -(ert-deftest subr-x-test-if-let*-single-binding-expansion () +(ert-deftest subr-x-test-if-let-single-binding-expansion () "Test single bindings are expanded properly." (should (equal (macroexpand - '(if-let* ((a 1)) + '(if-let ((a 1)) (- a) "no")) '(let* ((a (and t 1))) @@ -43,7 +43,7 @@ "no")))) (should (equal (macroexpand - '(if-let* (a) + '(if-let (a) (- a) "no")) '(let* ((a (and t a))) @@ -51,11 +51,11 @@ (- a) "no"))))) -(ert-deftest subr-x-test-if-let*-single-symbol-expansion () +(ert-deftest subr-x-test-if-let-single-symbol-expansion () "Test single symbol bindings are expanded properly." (should (equal (macroexpand - '(if-let* (a) + '(if-let (a) (- a) "no")) '(let* ((a (and t a))) @@ -64,7 +64,7 @@ "no")))) (should (equal (macroexpand - '(if-let* (a b c) + '(if-let (a b c) (- a) "no")) '(let* ((a (and t a)) @@ -75,7 +75,7 @@ "no")))) (should (equal (macroexpand - '(if-let* (a (b 2) c) + '(if-let (a (b 2) c) (- a) "no")) '(let* ((a (and t a)) @@ -85,11 +85,11 @@ (- a) "no"))))) -(ert-deftest subr-x-test-if-let*-nil-related-expansion () +(ert-deftest subr-x-test-if-let-nil-related-expansion () "Test nil is processed properly." (should (equal (macroexpand - '(if-let* (nil) + '(if-let (nil) (- a) "no")) '(let* ((nil (and t nil))) @@ -98,7 +98,7 @@ "no")))) (should (equal (macroexpand - '(if-let* ((a 1) nil (b 2)) + '(if-let ((a 1) nil (b 2)) (- a) "no")) '(let* ((a (and t 1)) @@ -108,106 +108,106 @@ (- a) "no"))))) -(ert-deftest subr-x-test-if-let*-malformed-binding () +(ert-deftest subr-x-test-if-let-malformed-binding () "Test malformed bindings trigger errors." (should-error (macroexpand - '(if-let* (_ (a 1 1) (b 2) (c 3) d) + '(if-let (_ (a 1 1) (b 2) (c 3) d) (- a) "no")) :type 'error) (should-error (macroexpand - '(if-let* (_ (a 1) (b 2 2) (c 3) d) + '(if-let (_ (a 1) (b 2 2) (c 3) d) (- a) "no")) :type 'error) (should-error (macroexpand - '(if-let* (_ (a 1) (b 2) (c 3 3) d) + '(if-let (_ (a 1) (b 2) (c 3 3) d) (- a) "no")) :type 'error) (should-error (macroexpand - '(if-let* ((a 1 1)) + '(if-let ((a 1 1)) (- a) "no")) :type 'error)) -(ert-deftest subr-x-test-if-let*-true () +(ert-deftest subr-x-test-if-let-true () "Test `if-let' with truthy bindings." (should (equal - (if-let* ((a 1)) + (if-let ((a 1)) a "no") 1)) (should (equal - (if-let* ((a 1) (b 2) (c 3)) + (if-let ((a 1) (b 2) (c 3)) (list a b c) "no") (list 1 2 3)))) -(ert-deftest subr-x-test-if-let*-false () +(ert-deftest subr-x-test-if-let-false () "Test `if-let' with falsie bindings." (should (equal - (if-let* ((a nil)) + (if-let ((a nil)) (list a b c) "no") "no")) (should (equal - (if-let* ((a nil) (b 2) (c 3)) + (if-let ((a nil) (b 2) (c 3)) (list a b c) "no") "no")) (should (equal - (if-let* ((a 1) (b nil) (c 3)) + (if-let ((a 1) (b nil) (c 3)) (list a b c) "no") "no")) (should (equal - (if-let* ((a 1) (b 2) (c nil)) + (if-let ((a 1) (b 2) (c nil)) (list a b c) "no") "no")) (should (equal (let (z) - (if-let* (z (a 1) (b 2) (c 3)) + (if-let (z (a 1) (b 2) (c 3)) (list a b c) "no")) "no")) (should (equal (let (d) - (if-let* ((a 1) (b 2) (c 3) d) + (if-let ((a 1) (b 2) (c 3) d) (list a b c) "no")) "no"))) -(ert-deftest subr-x-test-if-let*-bound-references () +(ert-deftest subr-x-test-if-let-bound-references () "Test `if-let' bindings can refer to already bound symbols." (should (equal - (if-let* ((a (1+ 0)) (b (1+ a)) (c (1+ b))) + (if-let ((a (1+ 0)) (b (1+ a)) (c (1+ b))) (list a b c) "no") (list 1 2 3)))) -(ert-deftest subr-x-test-if-let*-and-laziness-is-preserved () +(ert-deftest subr-x-test-if-let-and-laziness-is-preserved () "Test `if-let' respects `and' laziness." (let (a-called b-called c-called) (should (equal - (if-let* ((a nil) - (b (setq b-called t)) - (c (setq c-called t))) + (if-let ((a nil) + (b (setq b-called t)) + (c (setq c-called t))) "yes" (list a-called b-called c-called)) (list nil nil nil)))) (let (a-called b-called c-called) (should (equal - (if-let* ((a (setq a-called t)) - (b nil) - (c (setq c-called t))) + (if-let ((a (setq a-called t)) + (b nil) + (c (setq c-called t))) "yes" (list a-called b-called c-called)) (list t nil nil)))) (let (a-called b-called c-called) (should (equal - (if-let* ((a (setq a-called t)) + (if-let ((a (setq a-called t)) (b (setq b-called t)) (c nil) (d (setq c-called t))) @@ -215,14 +215,19 @@ (list a-called b-called c-called)) (list t t nil))))) +(defun if-let-single-tuple-case-test () + "Test the BINDING-SPEC == (SYMBOL SOMETHING) case." + (should (equal (if-let (a 1) (1+ a)) 2)) + (should (equal (let ((b 2)) (if-let (a b) a)) 2))) + -;; `when-let*' tests +;; `when-let' tests -(ert-deftest subr-x-test-when-let*-body-expansion () +(ert-deftest subr-x-test-when-let-body-expansion () "Test body allows for multiple sexps wrapping with progn." (should (equal (macroexpand - '(when-let* ((a 1)) + '(when-let ((a 1)) (message "opposite") (- a))) '(let* ((a (and t 1))) @@ -231,18 +236,18 @@ (message "opposite") (- a))))))) -(ert-deftest subr-x-test-when-let*-single-symbol-expansion () +(ert-deftest subr-x-test-when-let-single-symbol-expansion () "Test single symbol bindings are expanded properly." (should (equal (macroexpand - '(when-let* (a) + '(when-let (a) (- a))) '(let* ((a (and t a))) (if a (- a))))) (should (equal (macroexpand - '(when-let* (a b c) + '(when-let (a b c) (- a))) '(let* ((a (and t a)) (b (and a b)) @@ -251,7 +256,7 @@ (- a))))) (should (equal (macroexpand - '(when-let* (a (b 2) c) + '(when-let (a (b 2) c) (- a))) '(let* ((a (and t a)) (b (and a 2)) @@ -259,18 +264,18 @@ (if c (- a)))))) -(ert-deftest subr-x-test-when-let*-nil-related-expansion () +(ert-deftest subr-x-test-when-let-nil-related-expansion () "Test nil is processed properly." (should (equal (macroexpand - '(when-let* (nil) + '(when-let (nil) (- a))) '(let* ((nil (and t nil))) (if nil (- a))))) (should (equal (macroexpand - '(when-let* ((a 1) nil (b 2)) + '(when-let ((a 1) nil (b 2)) (- a))) '(let* ((a (and t 1)) (nil (and a nil)) @@ -278,173 +283,178 @@ (if b (- a)))))) -(ert-deftest subr-x-test-when-let*-malformed-binding () +(ert-deftest subr-x-test-when-let-malformed-binding () "Test malformed bindings trigger errors." (should-error (macroexpand - '(when-let* (_ (a 1 1) (b 2) (c 3) d) + '(when-let (_ (a 1 1) (b 2) (c 3) d) (- a))) :type 'error) (should-error (macroexpand - '(when-let* (_ (a 1) (b 2 2) (c 3) d) + '(when-let (_ (a 1) (b 2 2) (c 3) d) (- a))) :type 'error) (should-error (macroexpand - '(when-let* (_ (a 1) (b 2) (c 3 3) d) + '(when-let (_ (a 1) (b 2) (c 3 3) d) (- a))) :type 'error) (should-error (macroexpand - '(when-let* ((a 1 1)) + '(when-let ((a 1 1)) (- a))) :type 'error)) -(ert-deftest subr-x-test-when-let*-true () +(ert-deftest subr-x-test-when-let-true () "Test `when-let' with truthy bindings." (should (equal - (when-let* ((a 1)) + (when-let ((a 1)) a) 1)) (should (equal - (when-let* ((a 1) (b 2) (c 3)) + (when-let ((a 1) (b 2) (c 3)) (list a b c)) (list 1 2 3)))) -(ert-deftest subr-x-test-when-let*-false () +(ert-deftest subr-x-test-when-let-false () "Test `when-let' with falsie bindings." (should (equal - (when-let* ((a nil)) + (when-let ((a nil)) (list a b c) "no") nil)) (should (equal - (when-let* ((a nil) (b 2) (c 3)) + (when-let ((a nil) (b 2) (c 3)) (list a b c) "no") nil)) (should (equal - (when-let* ((a 1) (b nil) (c 3)) + (when-let ((a 1) (b nil) (c 3)) (list a b c) "no") nil)) (should (equal - (when-let* ((a 1) (b 2) (c nil)) + (when-let ((a 1) (b 2) (c nil)) (list a b c) "no") nil)) (should (equal (let (z) - (when-let* (z (a 1) (b 2) (c 3)) + (when-let (z (a 1) (b 2) (c 3)) (list a b c) "no")) nil)) (should (equal (let (d) - (when-let* ((a 1) (b 2) (c 3) d) + (when-let ((a 1) (b 2) (c 3) d) (list a b c) "no")) nil))) -(ert-deftest subr-x-test-when-let*-bound-references () +(ert-deftest subr-x-test-when-let-bound-references () "Test `when-let' bindings can refer to already bound symbols." (should (equal - (when-let* ((a (1+ 0)) (b (1+ a)) (c (1+ b))) + (when-let ((a (1+ 0)) (b (1+ a)) (c (1+ b))) (list a b c)) (list 1 2 3)))) -(ert-deftest subr-x-test-when-let*-and-laziness-is-preserved () +(ert-deftest subr-x-test-when-let-and-laziness-is-preserved () "Test `when-let' respects `and' laziness." (let (a-called b-called c-called) (should (equal (progn - (when-let* ((a nil) - (b (setq b-called t)) - (c (setq c-called t))) + (when-let ((a nil) + (b (setq b-called t)) + (c (setq c-called t))) "yes") (list a-called b-called c-called)) (list nil nil nil)))) (let (a-called b-called c-called) (should (equal (progn - (when-let* ((a (setq a-called t)) - (b nil) - (c (setq c-called t))) + (when-let ((a (setq a-called t)) + (b nil) + (c (setq c-called t))) "yes") (list a-called b-called c-called)) (list t nil nil)))) (let (a-called b-called c-called) (should (equal (progn - (when-let* ((a (setq a-called t)) - (b (setq b-called t)) - (c nil) - (d (setq c-called t))) + (when-let ((a (setq a-called t)) + (b (setq b-called t)) + (c nil) + (d (setq c-called t))) "yes") (list a-called b-called c-called)) (list t t nil))))) +(defun when-let-single-tuple-case-test () + "Test the BINDING-SPEC == (SYMBOL SOMETHING) case." + (should (equal (when-let (a 1) (1+ a)) 2)) + (should (equal (let ((b 2)) (when-let (a b) a)) 2))) + -;; `and-let*' tests +;; `and-let' tests ;; Adapted from the Guile tests ;; https://git.savannah.gnu.org/cgit/guile.git/tree/test-suite/tests/srfi-2.test -(ert-deftest subr-x-and-let*-test-empty-varlist () - (should (equal 1 (and-let* () 1))) - (should (equal 2 (and-let* () 1 2))) - (should (equal t (and-let* ())))) +(ert-deftest subr-x-and-let-test-empty-varlist () + (should (equal 1 (and-let () 1))) + (should (equal 2 (and-let () 1 2))) + (should (equal t (and-let ())))) -(ert-deftest subr-x-and-let*-test-group-1 () - (should (equal nil (let ((x nil)) (and-let* (x))))) - (should (equal 1 (let ((x 1)) (and-let* (x))))) - (should (equal nil (and-let* ((x nil))))) - (should (equal 1 (and-let* ((x 1))))) +(ert-deftest subr-x-and-let-test-group-1 () + (should (equal nil (let ((x nil)) (and-let (x))))) + (should (equal 1 (let ((x 1)) (and-let (x))))) + (should (equal nil (and-let ((x nil))))) + (should (equal 1 (and-let ((x 1))))) ;; The error doesn't trigger when compiled: the compiler will give ;; a warning and then drop the erroneous code. Therefore, use ;; `eval' to avoid compilation. - (should-error (eval '(and-let* (nil (x 1))) lexical-binding) + (should-error (eval '(and-let (nil (x 1))) lexical-binding) :type 'setting-constant) - (should (equal nil (and-let* ((nil) (x 1))))) - (should-error (eval '(and-let* (2 (x 1))) lexical-binding) + (should (equal nil (and-let ((nil) (x 1))))) + (should-error (eval '(and-let (2 (x 1))) lexical-binding) :type 'wrong-type-argument) - (should (equal 1 (and-let* ((2) (x 1))))) - (should (equal 2 (and-let* ((x 1) (2))))) - (should (equal nil (let ((x nil)) (and-let* (x) x)))) - (should (equal "" (let ((x "")) (and-let* (x) x)))) - (should (equal "" (let ((x "")) (and-let* (x))))) - (should (equal 2 (let ((x 1)) (and-let* (x) (+ x 1))))) - (should (equal nil (let ((x nil)) (and-let* (x) (+ x 1))))) - (should (equal 2 (let ((x 1)) (and-let* (((> x 0))) (+ x 1))))) - (should (equal t (let ((x 1)) (and-let* (((> x 0))))))) - (should (equal nil (let ((x 0)) (and-let* (((> x 0))) (+ x 1))))) + (should (equal 1 (and-let ((2) (x 1))))) + (should (equal 2 (and-let ((x 1) (2))))) + (should (equal nil (let ((x nil)) (and-let (x) x)))) + (should (equal "" (let ((x "")) (and-let (x) x)))) + (should (equal "" (let ((x "")) (and-let (x))))) + (should (equal 2 (let ((x 1)) (and-let (x) (+ x 1))))) + (should (equal nil (let ((x nil)) (and-let (x) (+ x 1))))) + (should (equal 2 (let ((x 1)) (and-let (((> x 0))) (+ x 1))))) + (should (equal t (let ((x 1)) (and-let (((> x 0))))))) + (should (equal nil (let ((x 0)) (and-let (((> x 0))) (+ x 1))))) (should (equal 3 - (let ((x 1)) (and-let* (((> x 0)) (x (+ x 1))) (+ x 1)))))) + (let ((x 1)) (and-let (((> x 0)) (x (+ x 1))) (+ x 1)))))) -(ert-deftest subr-x-and-let*-test-rebind () +(ert-deftest subr-x-and-let-test-rebind () (should (equal 4 (let ((x 1)) - (and-let* (((> x 0)) (x (+ x 1)) (x (+ x 1))) (+ x 1)))))) + (and-let (((> x 0)) (x (+ x 1)) (x (+ x 1))) (+ x 1)))))) -(ert-deftest subr-x-and-let*-test-group-2 () +(ert-deftest subr-x-and-let-test-group-2 () (should - (equal 2 (let ((x 1)) (and-let* (x ((> x 0))) (+ x 1))))) + (equal 2 (let ((x 1)) (and-let (x ((> x 0))) (+ x 1))))) (should - (equal 2 (let ((x 1)) (and-let* (((progn x)) ((> x 0))) (+ x 1))))) - (should (equal nil (let ((x 0)) (and-let* (x ((> x 0))) (+ x 1))))) - (should (equal nil (let ((x nil)) (and-let* (x ((> x 0))) (+ x 1))))) + (equal 2 (let ((x 1)) (and-let (((progn x)) ((> x 0))) (+ x 1))))) + (should (equal nil (let ((x 0)) (and-let (x ((> x 0))) (+ x 1))))) + (should (equal nil (let ((x nil)) (and-let (x ((> x 0))) (+ x 1))))) (should - (equal nil (let ((x nil)) (and-let* (((progn x)) ((> x 0))) (+ x 1)))))) + (equal nil (let ((x nil)) (and-let (((progn x)) ((> x 0))) (+ x 1)))))) -(ert-deftest subr-x-and-let*-test-group-3 () +(ert-deftest subr-x-and-let-test-group-3 () (should - (equal nil (let ((x 1)) (and-let* (x (y (- x 1)) ((> y 0))) (/ x y))))) + (equal nil (let ((x 1)) (and-let (x (y (- x 1)) ((> y 0))) (/ x y))))) (should - (equal nil (let ((x 0)) (and-let* (x (y (- x 1)) ((> y 0))) (/ x y))))) + (equal nil (let ((x 0)) (and-let (x (y (- x 1)) ((> y 0))) (/ x y))))) (should (equal nil - (let ((x nil)) (and-let* (x (y (- x 1)) ((> y 0))) (/ x y))))) + (let ((x nil)) (and-let (x (y (- x 1)) ((> y 0))) (/ x y))))) (should (equal (/ 3.0 2) - (let ((x 3.0)) (and-let* (x (y (- x 1)) ((> y 0))) (/ x y)))))) + (let ((x 3.0)) (and-let (x (y (- x 1)) ((> y 0))) (/ x y)))))) commit 892129881dba9a923ab1ff3fe75283ee67a6c0c9 Author: Glenn Morris Date: Mon Mar 5 15:58:57 2018 -0500 Suppress some font-lock-fontify-buffer compiler warnings * lisp/htmlfontify.el (hfy-force-fontification): * lisp/progmodes/idlw-help.el (idlwave-help-fontify): Suppress compiler warning from backwards compatibility branch. diff --git a/lisp/htmlfontify.el b/lisp/htmlfontify.el index 799da86cd4..23efcd1298 100644 --- a/lisp/htmlfontify.el +++ b/lisp/htmlfontify.el @@ -1830,10 +1830,11 @@ fontified. This is a simple convenience wrapper around (noninteractive (message "hfy batch mode (%s:%S)" (or (buffer-file-name) (buffer-name)) major-mode) - (if (fboundp 'font-lock-ensure) + (if (fboundp 'font-lock-ensure) ; Emacs >= 25.1 (font-lock-ensure) (when font-lock-defaults - (font-lock-fontify-buffer)))) + ; Silence "interactive use only" warning on Emacs >= 25.1. + (with-no-warnings (font-lock-fontify-buffer))))) ((fboundp #'jit-lock-fontify-now) (message "hfy jit-lock mode (%S %S)" window-system major-mode) (jit-lock-fontify-now)) diff --git a/lisp/progmodes/idlw-help.el b/lisp/progmodes/idlw-help.el index cbdca015e9..54e740be11 100644 --- a/lisp/progmodes/idlw-help.el +++ b/lisp/progmodes/idlw-help.el @@ -1181,9 +1181,10 @@ Useful when source code is displayed as help. See the option (with-syntax-table idlwave-mode-syntax-table (set (make-local-variable 'font-lock-defaults) idlwave-font-lock-defaults) - (if (fboundp 'font-lock-ensure) + (if (fboundp 'font-lock-ensure) ; Emacs >= 25.1 (font-lock-ensure) - (font-lock-fontify-buffer)))))) + ;; Silence "interactive use only" warning on Emacs >= 25.1. + (with-no-warnings (font-lock-fontify-buffer))))))) (defun idlwave-help-error (name type class keyword) commit 2722df2a14465b49a192e741baaa8c22591d1ffa Author: Glenn Morris Date: Mon Mar 5 15:46:48 2018 -0500 ; * lisp/minibuffer.el (completion-pcm--optimize-pattern): Comment. diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index e3ae2912a8..9b6f043b57 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -2951,6 +2951,8 @@ or a symbol, see `completion-pcm--merge-completions'." (`(,(and s1 (pred stringp)) ,(and s2 (pred stringp)) . ,rest) (setq p (cons (concat s1 s2) rest))) (`(,(and p1 (pred symbolp)) ,(and p2 (guard (eq p1 p2))) . ,_) + ;; Unused lexical variable warning due to body not using p1, p2. + ;; https://debbugs.gnu.org/16771 (setq p (cdr p))) (`(star ,(pred symbolp) . ,rest) (setq p `(star . ,rest))) (`(,(pred symbolp) star . ,rest) (setq p `(star . ,rest))) commit 92618d767d1c2cc52c57d2c157998d2fd103f34c Author: Glenn Morris Date: Mon Mar 5 15:29:15 2018 -0500 Small auth-source-netrc-create fix * lisp/auth-source.el (auth-source-netrc-create): Fix handling of auth-source-netrc-use-gpg-tokens being a list. diff --git a/lisp/auth-source.el b/lisp/auth-source.el index 8ef5f7140a..66e1897b87 100644 --- a/lisp/auth-source.el +++ b/lisp/auth-source.el @@ -1315,9 +1315,7 @@ See `auth-source-search' for details on SPEC." (string-match (car item) file)) (setq ret (cdr item)) (setq check nil))) - ;; FIXME: `ret' unused. - ;; Should we return it here? - )) + ret)) (t 'never))) (plain (or (eval default) (read-passwd prompt)))) ;; ask if we don't know what to do (in which case commit 7a38a6d8818b6f5be0b13957d06f4da7573e3ddd Author: Glenn Morris Date: Mon Mar 5 14:32:20 2018 -0500 * lisp/emacs-lisp/ewoc.el (ewoc-goto-node): Simplify and quieten compiler. diff --git a/lisp/emacs-lisp/ewoc.el b/lisp/emacs-lisp/ewoc.el index 262d4d8594..52d8451f4b 100644 --- a/lisp/emacs-lisp/ewoc.el +++ b/lisp/emacs-lisp/ewoc.el @@ -500,7 +500,7 @@ Return the node (or nil if we just passed the last node)." (defun ewoc-goto-node (ewoc node) "Move point to NODE in EWOC." - (ewoc--set-buffer-bind-dll ewoc + (with-current-buffer (ewoc--buffer ewoc) (goto-char (ewoc--node-start-marker node)) (if goal-column (move-to-column goal-column)) (setf (ewoc--last-node ewoc) node))) commit bcc80b8fd264352812a5bf5d11232659848cda3d Author: Glenn Morris Date: Mon Mar 5 14:29:40 2018 -0500 Suppress some unused lexical variable warnings in eshell * lisp/eshell/em-tramp.el (eshell/sudo): * lisp/eshell/em-unix.el (eshell/time): * lisp/eshell/esh-var.el (eshell/env): Pretend to use "args" to quieten compiler. diff --git a/lisp/eshell/em-tramp.el b/lisp/eshell/em-tramp.el index 004c495490..9a72f781fc 100644 --- a/lisp/eshell/em-tramp.el +++ b/lisp/eshell/em-tramp.el @@ -109,6 +109,7 @@ Uses the system sudo through TRAMP's sudo method." :show-usage :usage "[(-u | --user) USER] COMMAND Execute a COMMAND as the superuser or another USER.") + args ; suppress "unused lexical variable" warning (throw 'eshell-external (let ((user (or user "root")) (host (or (file-remote-p default-directory 'host) diff --git a/lisp/eshell/em-unix.el b/lisp/eshell/em-unix.el index a18fb85507..04c517f82a 100644 --- a/lisp/eshell/em-unix.el +++ b/lisp/eshell/em-unix.el @@ -956,6 +956,7 @@ Summarize disk usage of each FILE, recursively for directories.") :show-usage :usage "COMMAND... Show wall-clock time elapsed during execution of COMMAND.") + args ; suppress "unused lexical variable" warning (setq eshell-time-start (float-time)) (add-hook 'eshell-post-command-hook 'eshell-show-elapsed-time nil t) ;; after setting diff --git a/lisp/eshell/esh-opt.el b/lisp/eshell/esh-opt.el index 3af8fd7cac..18852ce534 100644 --- a/lisp/eshell/esh-opt.el +++ b/lisp/eshell/esh-opt.el @@ -111,6 +111,7 @@ interned variable `args' (created using a `let' form)." ;; `options' is of the form (quote OPTS). (cadr options)))) (args processed-args)) + ;; Unused lexical variable warning if body does not use `args'. ,@body-forms)) ;;; Internal Functions: diff --git a/lisp/eshell/esh-var.el b/lisp/eshell/esh-var.el index 1af03d367c..d400e0a9be 100644 --- a/lisp/eshell/esh-var.el +++ b/lisp/eshell/esh-var.el @@ -343,6 +343,8 @@ This function is explicit for adding to `eshell-parse-argument-hook'." obarray 'boundp)) (pcomplete-here)))) +;; FIXME the real "env" command does more than this, it runs a program +;; in a modified environment. (defun eshell/env (&rest args) "Implementation of `env' in Lisp." (eshell-init-print-buffer) @@ -351,6 +353,7 @@ This function is explicit for adding to `eshell-parse-argument-hook'." '((?h "help" nil nil "show this usage screen") :external "env" :usage "") + args ; suppress "unused lexical variable" warning (dolist (setting (sort (eshell-environment-variables) 'string-lessp)) (eshell-buffered-print setting "\n")) (eshell-flush))) commit bc85cdc16946ad2592450dd6b6ebc42be6421b05 Author: Glenn Morris Date: Mon Mar 5 14:26:50 2018 -0500 Suppress some compiler warnings about pcomplete * lisp/erc/erc-dcc.el, lisp/eshell/em-xtra.el: Load pcomplete at run-time too, to silence compiler. diff --git a/lisp/erc/erc-dcc.el b/lisp/erc/erc-dcc.el index 764c6cc617..5bc8c2f38b 100644 --- a/lisp/erc/erc-dcc.el +++ b/lisp/erc/erc-dcc.el @@ -54,7 +54,9 @@ ;;; Code: (require 'erc) -(eval-when-compile (require 'pcomplete)) +;; Strictly speaking, should only be needed at compile time. +;; Require at run-time too to silence compiler. +(require 'pcomplete) ;;;###autoload(autoload 'erc-dcc-mode "erc-dcc") (define-erc-module dcc nil diff --git a/lisp/eshell/em-xtra.el b/lisp/eshell/em-xtra.el index ce73474fb7..cc84d19854 100644 --- a/lisp/eshell/em-xtra.el +++ b/lisp/eshell/em-xtra.el @@ -25,8 +25,10 @@ (require 'esh-util) (eval-when-compile - (require 'eshell) - (require 'pcomplete)) + (require 'eshell)) +;; Strictly speaking, should only be needed at compile time. +;; Require at run-time too to silence compiler. +(require 'pcomplete) (require 'compile) ;; There are no items in this custom group, but eshell modules (ab)use commit ec79bdc53fd75ea48c1451b0d83b0b41a0345bc6 Author: Eli Zaretskii Date: Mon Mar 5 20:37:34 2018 +0200 Minor fix in Emacs manual's Glossary * doc/emacs/glossary.texi (Glossary): Fix outdated text about primary selection. Reported by Gijs Hillenius in emacs-manual-bugs@gnu.org. diff --git a/doc/emacs/glossary.texi b/doc/emacs/glossary.texi index fd9e97f2d5..148aafd1e5 100644 --- a/doc/emacs/glossary.texi +++ b/doc/emacs/glossary.texi @@ -1090,8 +1090,9 @@ The primary selection is one particular X selection (q.v.); it is the selection that most X applications use for transferring text to and from other applications. -The Emacs kill commands set the primary selection and the yank command -uses the primary selection when appropriate. @xref{Killing}. +The Emacs commands that mark or select text set the primary selection, +and clicking the mouse inserts text from the primary selection when +appropriate. @xref{Shift Selection}. @item Prompt A prompt is text used to ask you for input. Displaying a prompt commit f02ce3b1e41c735c3b1a0da4e45434c7b8313bde Author: Glenn Morris Date: Mon Mar 5 13:36:05 2018 -0500 ; Add fixme comments re password caching diff --git a/lisp/gnus/mml-sec.el b/lisp/gnus/mml-sec.el index 3855d7b796..dc10763da8 100644 --- a/lisp/gnus/mml-sec.el +++ b/lisp/gnus/mml-sec.el @@ -647,6 +647,7 @@ The passphrase is read and cached." (when passphrase (let ((password-cache-expiry (mml-secure-cache-expiry-interval (epg-context-protocol context)))) + ;; FIXME test passphrase works before caching it. (password-cache-add password-cache-key-id passphrase)) (mml-secure-add-secret-key-id password-cache-key-id) (copy-sequence passphrase))))) diff --git a/lisp/gnus/smime.el b/lisp/gnus/smime.el index d55cea724f..ab2a5b0f81 100644 --- a/lisp/gnus/smime.el +++ b/lisp/gnus/smime.el @@ -238,6 +238,7 @@ password under `cache-key'." "Passphrase for secret key (RET for no passphrase): " cache-key))) (if (string= passphrase "") nil + ;; FIXME test passphrase works before caching it. (and passphrase cache-key (password-cache-add cache-key passphrase)) passphrase))) diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 6011239253..fe9f197694 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -4459,6 +4459,7 @@ Invokes `password-read' if available, `read-passwd' else." auth-passwd)))) ;; Try the password cache. (let ((password (password-read pw-prompt key))) + ;; FIXME test password works before caching it. (password-cache-add key password) password) ;; Else, get the password interactively. commit a2ad931bb379dcd5805ae51ac9178266985b12e4 Author: Glenn Morris Date: Mon Mar 5 08:57:21 2018 -0800 * lisp/pcmpl-rpm.el (pcmpl-rpm-all-query): Fix typo in previous. diff --git a/lisp/pcmpl-rpm.el b/lisp/pcmpl-rpm.el index 624547ecd4..74ddb8b9d7 100644 --- a/lisp/pcmpl-rpm.el +++ b/lisp/pcmpl-rpm.el @@ -96,7 +96,7 @@ (pcomplete-process-result "rpm" "-q" (car pkgs) flag))) (setq pkgs (cdr pkgs))) - (pcomplete-uniquifyxo-list (cdr provs)))) + (pcomplete-uniquify-list (cdr provs)))) (defsubst pcmpl-rpm-files () (pcomplete-dirs-or-entries "\\.rpm\\'")) commit 136e1d23e936598a1c988cfa4b1d81ea7f7cb1f9 Author: Paul Eggert Date: Sun Mar 4 17:53:07 2018 -0800 uniqify -> uniquify The latter spelling is more common both within Emacs and in English-language sources in general (Bug#10048). * lisp/eshell/esh-util.el (eshell-uniquify-list): Rename from eshell-uniqify-list. All callers changed. * lisp/pcomplete.el (pcomplete-uniquify-list): Rename from pcomplete-uniqify-list. All callers changed. diff --git a/etc/NEWS b/etc/NEWS index c998ad6663..07f6d04a74 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -259,6 +259,13 @@ To restore the old behavior, use (add-hook 'eshell-expand-input-functions #'eshell-expand-history-references) +*** The function 'shell-uniquify-list' has been renamed from +'eshell-uniqify-list'. + +** Pcomplete +*** The function 'pcomplete-uniquify-list' has been renamed from +'pcomplete-uniqify-list'. + ** Tramp +++ diff --git a/lisp/eshell/em-cmpl.el b/lisp/eshell/em-cmpl.el index 1f44007746..667bdeb43b 100644 --- a/lisp/eshell/em-cmpl.el +++ b/lisp/eshell/em-cmpl.el @@ -434,7 +434,7 @@ to writing a completion function." (setq comps-in-path (cdr comps-in-path))) (setq paths (cdr paths))) ;; Add aliases which are currently visible, and Lisp functions. - (pcomplete-uniqify-list + (pcomplete-uniquify-list (if glob-name completions (setq completions diff --git a/lisp/eshell/em-dirs.el b/lisp/eshell/em-dirs.el index 34bf821c11..ec380e6701 100644 --- a/lisp/eshell/em-dirs.el +++ b/lisp/eshell/em-dirs.el @@ -282,7 +282,7 @@ Thus, this does not include the current directory.") (defvar pcomplete-stub) (defvar pcomplete-last-completion-raw) (declare-function pcomplete-actual-arg "pcomplete") -(declare-function pcomplete-uniqify-list "pcomplete") +(declare-function pcomplete-uniquify-list "pcomplete") (defun eshell-complete-user-reference () "If there is a user reference, complete it." @@ -293,7 +293,7 @@ Thus, this does not include the current directory.") (throw 'pcomplete-completions (progn (eshell-read-user-names) - (pcomplete-uniqify-list + (pcomplete-uniquify-list (mapcar (function (lambda (user) diff --git a/lisp/eshell/em-pred.el b/lisp/eshell/em-pred.el index 61af4048d5..b3b16d909b 100644 --- a/lisp/eshell/em-pred.el +++ b/lisp/eshell/em-pred.el @@ -131,7 +131,7 @@ The format of each entry is (?e . #'(lambda (lst) (mapcar 'file-name-extension lst))) (?t . #'(lambda (lst) (mapcar 'file-name-nondirectory lst))) (?q . #'(lambda (lst) (mapcar 'eshell-escape-arg lst))) - (?u . #'(lambda (lst) (eshell-uniqify-list lst))) + (?u . #'(lambda (lst) (eshell-uniquify-list lst))) (?o . #'(lambda (lst) (sort lst 'string-lessp))) (?O . #'(lambda (lst) (nreverse (sort lst 'string-lessp)))) (?j . (eshell-join-members)) diff --git a/lisp/eshell/esh-util.el b/lisp/eshell/esh-util.el index 5d38c27eb1..5ef1ae4129 100644 --- a/lisp/eshell/esh-util.el +++ b/lisp/eshell/esh-util.el @@ -295,7 +295,7 @@ Prepend remote identification of `default-directory', if any." (nconc new-list (list a)))) (cdr new-list))) -(defun eshell-uniqify-list (l) +(defun eshell-uniquify-list (l) "Remove occurring multiples in L. You probably want to sort first." (let ((m l)) (while m @@ -305,6 +305,9 @@ Prepend remote identification of `default-directory', if any." (setcdr m (cddr m))) (setq m (cdr m)))) l) +(define-obsolete-function-alias + 'eshell-uniqify-list + 'eshell-uniquify-list "27.1") (defun eshell-stringify (object) "Convert OBJECT into a string value." diff --git a/lisp/org/org-pcomplete.el b/lisp/org/org-pcomplete.el index a7cc09def4..1acb61590f 100644 --- a/lisp/org/org-pcomplete.el +++ b/lisp/org/org-pcomplete.el @@ -194,7 +194,7 @@ When completing for #+STARTUP, for example, this function returns "Complete arguments for the #+LANGUAGE file option." (require 'ox) (pcomplete-here - (pcomplete-uniqify-list + (pcomplete-uniquify-list (list org-export-default-language "en")))) (defvar org-default-priority) @@ -219,7 +219,7 @@ When completing for #+STARTUP, for example, this function returns (defun pcomplete/org-mode/file-option/startup () "Complete arguments for the #+STARTUP file option." (while (pcomplete-here - (let ((opts (pcomplete-uniqify-list + (let ((opts (pcomplete-uniquify-list (mapcar 'car org-startup-options)))) ;; Some options are mutually exclusive, and shouldn't be completed ;; against if certain other options have already been seen. @@ -248,7 +248,7 @@ When completing for #+STARTUP, for example, this function returns (defun pcomplete/org-mode/file-option/options () "Complete arguments for the #+OPTIONS file option." (while (pcomplete-here - (pcomplete-uniqify-list + (pcomplete-uniquify-list (append ;; Hard-coded OPTION items always available. '("H:" "\\n:" "num:" "timestamp:" "arch:" "author:" "c:" @@ -267,7 +267,7 @@ When completing for #+STARTUP, for example, this function returns (defun pcomplete/org-mode/file-option/infojs_opt () "Complete arguments for the #+INFOJS_OPT file option." (while (pcomplete-here - (pcomplete-uniqify-list + (pcomplete-uniquify-list (mapcar (lambda (item) (format "%s:" (car item))) (bound-and-true-p org-html-infojs-opts-table)))))) @@ -283,7 +283,7 @@ When completing for #+STARTUP, for example, this function returns (defun pcomplete/org-mode/link () "Complete against defined #+LINK patterns." (pcomplete-here - (pcomplete-uniqify-list + (pcomplete-uniquify-list (copy-sequence (append (mapcar 'car org-link-abbrev-alist-local) (mapcar 'car org-link-abbrev-alist)))))) @@ -293,13 +293,13 @@ When completing for #+STARTUP, for example, this function returns "Complete against TeX-style HTML entity names." (require 'org-entities) (while (pcomplete-here - (pcomplete-uniqify-list (remove nil (mapcar 'car-safe org-entities))) + (pcomplete-uniquify-list (remove nil (mapcar 'car-safe org-entities))) (substring pcomplete-stub 1)))) (defvar org-todo-keywords-1) (defun pcomplete/org-mode/todo () "Complete against known TODO keywords." - (pcomplete-here (pcomplete-uniqify-list (copy-sequence org-todo-keywords-1)))) + (pcomplete-here (pcomplete-uniquify-list (copy-sequence org-todo-keywords-1)))) (defvar org-todo-line-regexp) (defun pcomplete/org-mode/searchhead () @@ -315,14 +315,14 @@ This needs more work, to handle headings with lots of spaces in them." (push (org-make-org-heading-search-string (match-string-no-properties 3)) tbl))) - (pcomplete-uniqify-list tbl))) + (pcomplete-uniquify-list tbl))) (substring pcomplete-stub 1)))) (defun pcomplete/org-mode/tag () "Complete a tag name. Omit tags already set." (while (pcomplete-here (mapcar (lambda (x) (concat x ":")) - (let ((lst (pcomplete-uniqify-list + (let ((lst (pcomplete-uniquify-list (or (remq nil (mapcar (lambda (x) (org-string-nw-p (car x))) @@ -339,7 +339,7 @@ This needs more work, to handle headings with lots of spaces in them." (pcomplete-here (mapcar (lambda (x) (concat x ": ")) - (let ((lst (pcomplete-uniqify-list + (let ((lst (pcomplete-uniquify-list (copy-sequence (org-buffer-property-keys nil t t t))))) (dolist (prop (org-entry-properties)) diff --git a/lisp/pcmpl-cvs.el b/lisp/pcmpl-cvs.el index a3e2b2f5b3..dedc007223 100644 --- a/lisp/pcmpl-cvs.el +++ b/lisp/pcmpl-cvs.el @@ -122,7 +122,7 @@ (let (cmds) (while (re-search-forward "^\\s-+\\([a-z]+\\)" nil t) (setq cmds (cons (match-string 1) cmds))) - (pcomplete-uniqify-list cmds)))) + (pcomplete-uniquify-list cmds)))) (defun pcmpl-cvs-modules () "Return a list of available modules under CVS." @@ -132,7 +132,7 @@ (let (entries) (while (re-search-forward "\\(\\S-+\\)$" nil t) (setq entries (cons (match-string 1) entries))) - (pcomplete-uniqify-list entries)))) + (pcomplete-uniquify-list entries)))) (defun pcmpl-cvs-tags (&optional opers) "Return all the tags which could apply to the files related to OPERS." @@ -149,7 +149,7 @@ (error "Error in output from `cvs status -v'")) (setq tags (cons (match-string 1) tags)) (forward-line)))) - (pcomplete-uniqify-list tags))) + (pcomplete-uniquify-list tags))) (defun pcmpl-cvs-entries (&optional opers) "Return the Entries for the current directory. @@ -187,6 +187,6 @@ operation character applies, as displayed by `cvs -n update'." (setq entries (cons text entries)))) (forward-line))))) (setq pcomplete-stub nondir) - (pcomplete-uniqify-list entries))) + (pcomplete-uniquify-list entries))) ;;; pcmpl-cvs.el ends here diff --git a/lisp/pcmpl-gnu.el b/lisp/pcmpl-gnu.el index 505d10c164..16c992662d 100644 --- a/lisp/pcmpl-gnu.el +++ b/lisp/pcmpl-gnu.el @@ -125,7 +125,7 @@ (while (re-search-forward (concat "^\\s-*\\([^\n#%.$][^:=\n]*\\)\\s-*:[^=]") nil t) (setq rules (append (split-string (match-string 1)) rules)))) - (pcomplete-uniqify-list rules)))) + (pcomplete-uniquify-list rules)))) (defcustom pcmpl-gnu-tarfile-regexp "\\.t\\(ar\\(\\.\\(gz\\|bz2\\|Z\\|xz\\)\\)?\\|gz\\|a[zZ]\\|z2\\)\\'" diff --git a/lisp/pcmpl-linux.el b/lisp/pcmpl-linux.el index ce42486fda..18cc647aac 100644 --- a/lisp/pcmpl-linux.el +++ b/lisp/pcmpl-linux.el @@ -43,7 +43,7 @@ "Completion for GNU/Linux `kill', using /proc filesystem." (if (pcomplete-match "^-\\(.*\\)" 0) (pcomplete-here - (pcomplete-uniqify-list + (pcomplete-uniquify-list (split-string (pcomplete-process-result "kill" "-l"))) (pcomplete-match-string 1 0))) @@ -82,7 +82,7 @@ (args (split-string line " "))) (setq points (cons (nth 1 args) points))) (forward-line))) - (pcomplete-uniqify-list points)))) + (pcomplete-uniquify-list points)))) (defun pcomplete-pare-list (l r) "Destructively remove from list L all elements matching any in list R. @@ -109,7 +109,7 @@ Test is done using `equal'." (setq points (cons (nth 1 args) points))) (forward-line))) (pcomplete-pare-list - (pcomplete-uniqify-list points) + (pcomplete-uniquify-list points) (cons "swap" (pcmpl-linux-mounted-directories)))))) ;;; pcmpl-linux.el ends here diff --git a/lisp/pcmpl-rpm.el b/lisp/pcmpl-rpm.el index d3250babe6..624547ecd4 100644 --- a/lisp/pcmpl-rpm.el +++ b/lisp/pcmpl-rpm.el @@ -96,7 +96,7 @@ (pcomplete-process-result "rpm" "-q" (car pkgs) flag))) (setq pkgs (cdr pkgs))) - (pcomplete-uniqify-list (cdr provs)))) + (pcomplete-uniquifyxo-list (cdr provs)))) (defsubst pcmpl-rpm-files () (pcomplete-dirs-or-entries "\\.rpm\\'")) diff --git a/lisp/pcmpl-unix.el b/lisp/pcmpl-unix.el index 90dde26599..1b11afd36b 100644 --- a/lisp/pcmpl-unix.el +++ b/lisp/pcmpl-unix.el @@ -111,7 +111,7 @@ documentation), this function returns nil." (point))) ":"))) (setq names (cons (nth 0 fields) names))) (forward-line)))) - (pcomplete-uniqify-list names))) + (pcomplete-uniquify-list names))) (defsubst pcmpl-unix-group-names () "Read the contents of /etc/group for group names." diff --git a/lisp/pcomplete.el b/lisp/pcomplete.el index 6078dfd744..e7d12c6341 100644 --- a/lisp/pcomplete.el +++ b/lisp/pcomplete.el @@ -950,7 +950,7 @@ Arguments NO-GANGING and ARGS-FOLLOW are currently ignored." (function (lambda (opt) (concat "-" opt))) - (pcomplete-uniqify-list choices)))) + (pcomplete-uniquify-list choices)))) (let ((arg (pcomplete-arg))) (when (and (> (length arg) 1) (stringp arg) @@ -1269,7 +1269,7 @@ If specific documentation can't be given, be generic." ;; general utilities -(defun pcomplete-uniqify-list (l) +(defun pcomplete-uniquify-list (l) "Sort and remove multiples in L." (setq l (sort l 'string-lessp)) (let ((m l)) @@ -1280,6 +1280,9 @@ If specific documentation can't be given, be generic." (setcdr m (cddr m))) (setq m (cdr m)))) l) +(define-obsolete-function-alias + 'pcomplete-uniqify-list + 'pcomplete-uniquify-list "27.1") (defun pcomplete-process-result (cmd &rest args) "Call CMD using `call-process' and return the simplest result." commit 0e10b6fce7568077797c5a16cd2a584a8dcba46e Author: Paul Eggert Date: Sun Mar 4 17:38:43 2018 -0800 Spelling fixes (Bug#10068) * lisp/gnus/gnus-score.el (gnus-score-find-favorite-words): Rename from gnus-score-find-favourite-words. * lisp/hfy-cmap.el (hfy-fallback-color-map) (hfy-rgb-txt-color-map, hfy-fallback-color-values): * lisp/htmlfontify.el (hfy-color-vals, hfy-color): Rename from names that used 'colour' instead of 'color'. diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi index 8a0b631936..cc4b2342be 100644 --- a/doc/misc/gnus.texi +++ b/doc/misc/gnus.texi @@ -19471,8 +19471,8 @@ score file and edit it. @item V w @kindex V w @r{(Summary)} -@findex gnus-score-find-favourite-words -List words used in scoring (@code{gnus-score-find-favourite-words}). +@findex gnus-score-find-favorite-words +List words used in scoring (@code{gnus-score-find-favorite-words}). @item V R @kindex V R @r{(Summary)} diff --git a/etc/NEWS b/etc/NEWS index 08c7e7eb56..c998ad6663 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -142,6 +142,16 @@ This can be controlled by the new `ecomplete-sort-predicate' variable. *** The 'ecompleterc' file is now placed in ~/.emacs.d/ecompleterc by default Of course it will still find it if you have it in ~/.ecompleterc +** Gnus +*** The function 'gnus-score-find-favorite-words' has been renamed +from 'gnus-score-find-favourite-words'. + +** Htmlfontify +*** The functions 'hfy-color', 'hfy-color-vals' and +'hfy-fallback-color-values' and the variables 'hfy-fallback-color-map' +and 'hfy-rgb-txt-color-map' have been renamed from names that used +'colour' instead of 'color'. + ** Smtpmail Authentication mechanisms can be added via external packages, by defining new cl-defmethod of smtpmail-try-auth-method. diff --git a/lisp/gnus/gnus-score.el b/lisp/gnus/gnus-score.el index ec07d1ab15..ad11ff4a5c 100644 --- a/lisp/gnus/gnus-score.el +++ b/lisp/gnus/gnus-score.el @@ -514,7 +514,7 @@ of the last successful match.") "f" gnus-score-edit-file "F" gnus-score-flush-cache "t" gnus-score-find-trace - "w" gnus-score-find-favourite-words) + "w" gnus-score-find-favorite-words) ;; Summary score file commands @@ -2517,7 +2517,7 @@ the score file and its full name, including the directory.") (set-buffer gnus-summary-buffer) (setq gnus-newsgroup-scored old-scored))) -(defun gnus-score-find-favourite-words () +(defun gnus-score-find-favorite-words () "List words used in scoring." (interactive) (let ((alists (gnus-score-load-files (gnus-all-score-files))) @@ -2553,6 +2553,9 @@ the score file and its full name, including the directory.") (pop rules)) (goto-char (point-min)) (gnus-configure-windows 'score-words)))) +(define-obsolete-function-alias + 'gnus-score-find-favourite-words + 'gnus-score-find-favorite-words "27.1") (defun gnus-summary-rescore () "Redo the entire scoring process in the current summary." diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index a28c00be94..468f2b195e 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -2370,7 +2370,7 @@ increase the score of each group you read." ["Edit current score file" gnus-score-edit-current-scores t] ["Edit score file..." gnus-score-edit-file t] ["Trace score" gnus-score-find-trace t] - ["Find words" gnus-score-find-favourite-words t] + ["Find words" gnus-score-find-favorite-words t] ["Rescore buffer" gnus-summary-rescore t] ["Increase score..." gnus-summary-increase-score t] ["Lower score..." gnus-summary-lower-score t])))) diff --git a/lisp/hfy-cmap.el b/lisp/hfy-cmap.el index 6dea345f28..4ec24cea70 100644 --- a/lisp/hfy-cmap.el +++ b/lisp/hfy-cmap.el @@ -1,15 +1,15 @@ -;;; hfy-cmap.el --- Fallback colour name -> rgb mapping for `htmlfontify' +;;; hfy-cmap.el --- Fallback color name -> rgb mapping for `htmlfontify' ;; Copyright (C) 2002-2003, 2009-2018 Free Software Foundation, Inc. ;; Emacs Lisp Archive Entry ;; Package: htmlfontify ;; Filename: hfy-cmap.el -;; Keywords: colour, rgb +;; Keywords: color, rgb ;; Author: Vivek Dasmohapatra ;; Maintainer: Vivek Dasmohapatra ;; Created: 2002-01-20 -;; Description: fallback code for colour name -> rgb mapping +;; Description: fallback code for color name -> rgb mapping ;; URL: http://rtfm.etla.org/emacs/htmlfontify/ ;; Last-Updated: Sat 2003-02-15 03:49:32 +0000 @@ -32,7 +32,7 @@ ;;; Code: -(defconst hfy-fallback-colour-map +(defconst hfy-fallback-color-map '(("snow" 65535 64250 64250) ("ghost white" 63736 63736 65535) ("GhostWhite" 63736 63736 65535) @@ -785,8 +785,14 @@ ("DarkRed" 35723 0 0) ("light green" 37008 61166 37008) ("LightGreen" 37008 61166 37008)) ) +(define-obsolete-variable-alias + 'hfy-fallback-colour-map + 'hfy-fallback-color-map "27.1") -(defvar hfy-rgb-txt-colour-map nil) +(defvar hfy-rgb-txt-color-map nil) +(define-obsolete-variable-alias + 'hfy-rgb-txt-colour-map + 'hfy-rgb-txt-color-map "27.1") (defvar hfy-rgb-load-path (list "/etc/X11" @@ -806,8 +812,8 @@ (defun htmlfontify-load-rgb-file (&optional file) "Load an X11 style rgb.txt FILE. Search `hfy-rgb-load-path' if FILE is not specified. -Loads the variable `hfy-rgb-txt-colour-map', which is used by -`hfy-fallback-colour-values'." +Loads the variable `hfy-rgb-txt-color-map', which is used by +`hfy-fallback-color-values'." (interactive (list (read-file-name "rgb.txt (equivalent) file: " "" nil t (hfy-rgb-file)))) @@ -822,25 +828,28 @@ Loads the variable `hfy-rgb-txt-colour-map', which is used by (htmlfontify-unload-rgb-file) (while (/= end-of-rgb 1) (if (looking-at hfy-rgb-regex) - (setq hfy-rgb-txt-colour-map + (setq hfy-rgb-txt-color-map (cons (list (match-string 4) (string-to-number (match-string 1)) (string-to-number (match-string 2)) (string-to-number (match-string 3))) - hfy-rgb-txt-colour-map)) ) + hfy-rgb-txt-color-map)) ) (setq end-of-rgb (forward-line))) (kill-buffer rgb-buffer))))) (defun htmlfontify-unload-rgb-file () "Unload the current color name -> rgb translation map." (interactive) - (setq hfy-rgb-txt-colour-map nil)) + (setq hfy-rgb-txt-color-map nil)) ;;;###autoload -(defun hfy-fallback-colour-values (colour-string) +(defun hfy-fallback-color-values (color-string) "Use a fallback method for obtaining the rgb values for a color." - (cdr (assoc-string colour-string (or hfy-rgb-txt-colour-map - hfy-fallback-colour-map))) ) + (cdr (assoc-string color-string (or hfy-rgb-txt-color-map + hfy-fallback-color-map))) ) +(define-obsolete-function-alias + 'hfy-fallback-colour-values + 'hfy-fallback-color-values "27.1") (provide 'hfy-cmap) diff --git a/lisp/htmlfontify.el b/lisp/htmlfontify.el index dfa6bde297..799da86cd4 100644 --- a/lisp/htmlfontify.el +++ b/lisp/htmlfontify.el @@ -584,22 +584,23 @@ therefore no longer care about) will be invalid at any time.\n (if (memq elt set-b) (setq interq (cons elt interq)))) interq)) -(defun hfy-colour-vals (colour) - "Where COLOUR is a color name or #XXXXXX style triplet, return a +(defun hfy-color-vals (color) + "Where COLOR is a color name or #XXXXXX style triplet, return a list of three (16 bit) rgb values for said color.\n -If a window system is unavailable, calls `hfy-fallback-colour-values'." - (if (string-match hfy-triplet-regex colour) +If a window system is unavailable, calls `hfy-fallback-color-values'." + (if (string-match hfy-triplet-regex color) (mapcar - (lambda (x) (* (string-to-number (match-string x colour) 16) 257)) + (lambda (x) (* (string-to-number (match-string x color) 16) 257)) '(1 2 3)) - ;;(message ">> %s" colour) + ;;(message ">> %s" color) (if window-system (if (fboundp 'color-values) - (color-values colour) + (color-values color) ;;(message "[%S]" window-system) - (x-color-values colour)) + (x-color-values color)) ;; blarg - tty colors are no good - go fetch some X colors: - (hfy-fallback-colour-values colour)))) + (hfy-fallback-color-values color)))) +(define-obsolete-function-alias 'hfy-colour-vals 'hfy-color-vals "27.1") (defvar hfy-cperl-mode-kludged-p nil) @@ -738,7 +739,7 @@ FILE is the name of the file being rendered, in case it is needed." "Replace the end of a CSS style declaration STYLE-STRING with the contents of the variable `hfy-src-doc-link-style', removing text matching the regex `hfy-src-doc-link-unstyle' first, if necessary." - ;;(message "hfy-colour-vals");;DBUG + ;;(message "hfy-color-vals");;DBUG (if (string-match hfy-src-doc-link-unstyle style-string) (setq style-string (replace-match "" 'fixed-case 'literal style-string))) (if (and (not (string-match hfy-src-doc-link-style style-string)) @@ -751,19 +752,19 @@ of the variable `hfy-src-doc-link-style', removing text matching the regex ;; utility functions - cast emacs style specification values into their ;; css2 equivalents: -(defun hfy-triplet (colour) - "Takes a COLOUR name (string) and return a CSS rgb(R, G, B) triplet string. +(defun hfy-triplet (color) + "Takes a COLOR name (string) and return a CSS rgb(R, G, B) triplet string. Uses the definition of \"white\" to map the numbers to the 0-255 range, so if you've redefined white, (esp. if you've redefined it to have a triplet member lower than that of the color you are processing) strange things may happen." - ;;(message "hfy-colour-vals");;DBUG + ;;(message "hfy-color-vals");;DBUG ;; TODO? Can we do somehow do better than this? (cond - ((equal colour "unspecified-fg") (setq colour "black")) - ((equal colour "unspecified-bg") (setq colour "white"))) - (let ((white (mapcar (lambda (I) (float (1+ I))) (hfy-colour-vals "white"))) - (rgb16 (mapcar (lambda (I) (float (1+ I))) (hfy-colour-vals colour)))) + ((equal color "unspecified-fg") (setq color "black")) + ((equal color "unspecified-bg") (setq color "white"))) + (let ((white (mapcar (lambda (I) (float (1+ I))) (hfy-color-vals "white"))) + (rgb16 (mapcar (lambda (I) (float (1+ I))) (hfy-color-vals color)))) (if rgb16 ;;(apply 'format "rgb(%d, %d, %d)" ;; Use #rrggbb instead, it is smaller @@ -774,8 +775,9 @@ may happen." '(0 1 2)))))) (defun hfy-family (family) (list (cons "font-family" family))) -(defun hfy-bgcol (colour) (list (cons "background" (hfy-triplet colour)))) -(defun hfy-colour (colour) (list (cons "color" (hfy-triplet colour)))) +(defun hfy-bgcol (color) (list (cons "background" (hfy-triplet color)))) +(defun hfy-color (color) (list (cons "color" (hfy-triplet color)))) +(define-obsolete-function-alias 'hfy-colour 'hfy-color "27.1") (defun hfy-width (width) (list (cons "font-stretch" (symbol-name width)))) (defcustom hfy-font-zoom 1.05 @@ -825,17 +827,17 @@ regular specifiers." (let ((tag (car spec)) (val (cadr spec))) (cons (cl-case tag - (:color (cons "colour" val)) + (:color (cons "color" val)) (:width (cons "width" val)) (:style (cons "style" val))) (hfy-box-to-border-assoc (cddr spec)))))) (defun hfy-box-to-style (spec) (let* ((css (hfy-box-to-border-assoc spec)) - (col (cdr (assoc "colour" css))) + (col (cdr (assoc "color" css))) (s (cdr (assoc "style" css)))) (list - (if col (cons "border-color" (cdr (assoc "colour" css)))) + (if col (cons "border-color" (cdr (assoc "color" css)))) (cons "border-width" (format "%dpx" (or (cdr (assoc "width" css)) 1))) (cons "border-style" (cl-case s (released-button "outset") @@ -1014,7 +1016,7 @@ merged by the user - `hfy-flatten-style' should do this." (:width (hfy-width val)) (:weight (hfy-weight val)) (:slant (hfy-slant val)) - (:foreground (hfy-colour val)) + (:foreground (hfy-color val)) (:background (hfy-bgcol val)) (:box (hfy-box val)) (:height (hfy-size val)) diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el index 7ac61b843f..7a0ea71aee 100644 --- a/lisp/net/tramp-adb.el +++ b/lisp/net/tramp-adb.el @@ -464,7 +464,7 @@ pass to the OPERATION." (cond ;; Support Android derived systems where "ls" command is provided ;; by GNU Coreutils. Force "ls" to print one column and set - ;; time-style to imitate other "ls" flavours. + ;; time-style to imitate other "ls" flavors. ((tramp-adb-send-command-and-check vec "ls --time-style=long-iso /dev/null") "ls -1 --time-style=long-iso") commit bd6c1976fba03bd2e4ca0a52cea562c8ecf23ef8 Merge: 78589529a7 f2caf08ca6 Author: Paul Eggert Date: Sun Mar 4 17:16:39 2018 -0800 Merge from origin/emacs-26 f2caf08ca6 ; Spelling fixes f0e5f220b6 * lisp/progmodes/grep.el (zrgrep): a0f71260f8 Minor copyedits in doc/emacs/text.texi adfe2f580f Remove outdated comment in syntax.el b80e15b6a6 Prevent Flyspell from changing unrelated words e385599457 Avoid errors in flymake in builds --without-x d691e30cb0 More improvements of the Emacs manual commit 78589529a7e7ea21f78c972c87b9e2c94ef27610 Merge: 819179f275 6719f05ff7 Author: Paul Eggert Date: Sun Mar 4 17:16:39 2018 -0800 ; Merge from origin/emacs-26 The following commits were skipped: 6719f05ff7 Backport: xref--next-error-function: Move xref's window point 94ff88247d ; * lisp/wheel.el: Rearrange to match master, to reduce me... commit 819179f275bf9c94c7366e59a0eedab9450ef9a4 Author: Daniel Colascione Date: Sun Mar 4 17:13:28 2018 -0800 Rename marker_free_list to misc_free_list * src/alloc.c: 'marker_free_list' -> 'misc_free_list' throughout diff --git a/src/alloc.c b/src/alloc.c index ea8fdeee48..f97b99c0f3 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -3661,7 +3661,7 @@ struct marker_block static struct marker_block *marker_block; static int marker_block_index = MARKER_BLOCK_SIZE; -static union Lisp_Misc *marker_free_list; +static union Lisp_Misc *misc_free_list; /* Return a newly allocated Lisp_Misc object of specified TYPE. */ @@ -3672,10 +3672,10 @@ allocate_misc (enum Lisp_Misc_Type type) MALLOC_BLOCK_INPUT; - if (marker_free_list) + if (misc_free_list) { - XSETMISC (val, marker_free_list); - marker_free_list = marker_free_list->u_free.chain; + XSETMISC (val, misc_free_list); + misc_free_list = misc_free_list->u_free.chain; } else { @@ -3707,8 +3707,8 @@ void free_misc (Lisp_Object misc) { XMISCANY (misc)->type = Lisp_Misc_Free; - XMISC (misc)->u_free.chain = marker_free_list; - marker_free_list = XMISC (misc); + XMISC (misc)->u_free.chain = misc_free_list; + misc_free_list = XMISC (misc); consing_since_gc -= sizeof (union Lisp_Misc); total_free_markers++; } @@ -7079,7 +7079,7 @@ sweep_misc (void) /* Put all unmarked misc's on free list. For a marker, first unchain it from the buffer it points into. */ - marker_free_list = 0; + misc_free_list = 0; for (mblk = marker_block; mblk; mblk = *mprev) { @@ -7106,8 +7106,8 @@ sweep_misc (void) We could leave the type alone, since nobody checks it, but this might catch bugs faster. */ mblk->markers[i].m.u_marker.type = Lisp_Misc_Free; - mblk->markers[i].m.u_free.chain = marker_free_list; - marker_free_list = &mblk->markers[i].m; + mblk->markers[i].m.u_free.chain = misc_free_list; + misc_free_list = &mblk->markers[i].m; this_free++; } else @@ -7124,7 +7124,7 @@ sweep_misc (void) { *mprev = mblk->next; /* Unhook from the free list. */ - marker_free_list = mblk->markers[0].m.u_free.chain; + misc_free_list = mblk->markers[0].m.u_free.chain; lisp_free (mblk); } else commit f2caf08ca625f64c7eeea8dfa8f65a5b1bac58e2 Author: Paul Eggert Date: Sun Mar 4 17:09:52 2018 -0800 ; Spelling fixes diff --git a/ChangeLog.2 b/ChangeLog.2 index eab9e3d018..b01ab19ebe 100644 --- a/ChangeLog.2 +++ b/ChangeLog.2 @@ -9949,7 +9949,7 @@ * lisp/files-x.el (modify-dir-local-variable): Small rewrite Change a variable name to be more meaningful, and reorder some of - the code with no change in behaviour. + the code with no change in behavior. 2016-01-26 Artur Malabarba diff --git a/ChangeLog.3 b/ChangeLog.3 index 5b68559f43..ea4d71c63a 100644 --- a/ChangeLog.3 +++ b/ChangeLog.3 @@ -4805,7 +4805,7 @@ 2017-10-11 Alan Third - Make frame-list-z-order on NS match Windows behaviour (bug#28788) + Make frame-list-z-order on NS match Windows behavior (bug#28788) * src/nsfns.m (Fns_frame_list_z_order): If terminal isn't a frame, ignore it rather than returning nil. @@ -5932,7 +5932,7 @@ Flymake uses some new fringe bitmaps - Also fix behaviour whereby flymake wouldn't react to a change in the + Also fix behavior whereby flymake wouldn't react to a change in the variable. * lisp/progmodes/flymake-ui.el (flymake-error-bitmap) @@ -6180,7 +6180,7 @@ REPORT-FN's calling convention stipulates that a backend calls it with a list of diagnostics as argument, or, alternatively, with a symbol denoting an exceptional situation, usually some panic resulting from a - misconfigured backend. In keeping with legacy behaviour, + misconfigured backend. In keeping with legacy behavior, flymake.el's response to a panic is to disable the issuing backend. The flymake--diag object representing a diagnostic now also keeps @@ -7918,7 +7918,7 @@ 2017-09-15 Michael Albinus - Improve Tramp behaviour according to bug#27986 + Improve Tramp behavior according to bug#27986 * lisp/net/tramp-adb.el (tramp-adb-handle-copy-file): * lisp/net/tramp-sh.el (tramp-sh-handle-copy-directory): @@ -8120,7 +8120,7 @@ Add clarification to if-let* docstring - Also make its behaviour consistent with and-let* in that empty bindings + Also make its behavior consistent with and-let* in that empty bindings results in success, not failure. * lisp/emacs-lisp/subr-x.el: Edit docstring, change else to then. @@ -22797,7 +22797,7 @@ (Type Descriptors): new section. * doc/lispref/elisp.texi: reference it. * doc/lispref/records.texi (Records): reference it. Document - behaviour when type slot is a record. + behavior when type slot is a record. * admin/alloc-colors.c (Fmake_record, Frecord): mention type desciptors. @@ -23348,7 +23348,7 @@ Now dired-mark-extension prepends '.' to extension when not present. Add command dired-mark-suffix to preserve the previous - behaviour (Bug#25942). + behavior (Bug#25942). * lisp/dired-x.el (dired-mark-suffix): New command; mark files ending in a given suffix. (dired--mark-suffix-interactive-spec): New defun. @@ -45072,7 +45072,7 @@ Sync from gnulib This incorporates a spelling fix, plus: - 2016-05-09 Fix undefined behaviour in gettext.h + 2016-05-09 Fix undefined behavior in gettext.h * lib/gettext.h, lib/mktime.c: Copy from gnulib. @@ -54900,7 +54900,7 @@ make check unconditional, check-maybe top-level. * Makefile.in: Add check-maybe target. - * test/Makefile.in: Restore unconditional behaviour to make check. + * test/Makefile.in: Restore unconditional behavior to make check. 2015-12-01 Phillip Lord diff --git a/doc/misc/cc-mode.texi b/doc/misc/cc-mode.texi index d0d39d44e9..5a229c1cd6 100644 --- a/doc/misc/cc-mode.texi +++ b/doc/misc/cc-mode.texi @@ -4734,7 +4734,7 @@ Once again, line 8 is assigned as @code{brace-entry-open} as is line with anchor point at the @samp{@{} of line 8@footnote{This extra syntactic element was introduced in @ccmode{} 5.33.1 to allow extra flexibility in indenting the second line of such a construct. You can -preserve the behaviour resulting from the former syntactic analysis by +preserve the behavior resulting from the former syntactic analysis by giving @code{brace-list-entry} an offset of @code{c-lineup-under-anchor} (@pxref{Misc Line-Up}).}, and @code{brace-list-entry} anchored on the @samp{1} of line 8. diff --git a/doc/misc/org.texi b/doc/misc/org.texi index cd61259518..c6d603cd60 100644 --- a/doc/misc/org.texi +++ b/doc/misc/org.texi @@ -10237,7 +10237,7 @@ for display purposes only. @cindex dash, special symbol @cindex ellipsis, special symbol In addition to regular entities defined above, Org exports in a special -way@footnote{This behaviour can be disabled with @code{-} export setting +way@footnote{This behavior can be disabled with @code{-} export setting (@pxref{Export settings}).} the following commonly used character combinations: @samp{\-} is treated as a shy hyphen, @samp{--} and @samp{---} are converted into dashes, and @samp{...} becomes a compact set of dots. diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index aa8e84cf0c..f4a1951cf3 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi @@ -3323,7 +3323,7 @@ Why is @file{~/.sh_history} file on the remote host growing? @vindex tramp-histfile-override Due to the remote shell saving tilde expansions triggered by @value{tramp}, the history file is probably growing rapidly. -@value{tramp} can suppress this behaviour with the user option +@value{tramp} can suppress this behavior with the user option @option{tramp-histfile-override}. When set to @code{t}, environment variable @env{HISTFILE} is unset, and environment variables @env{HISTFILESIZE} @env{HISTSIZE} are set to 0. diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS index 12eab44f0f..b9f3b0cdbe 100644 --- a/etc/ORG-NEWS +++ b/etc/ORG-NEWS @@ -1358,7 +1358,7 @@ don't have to be distinct on a heading. Grouptags had to previously be defined with { }. This syntax is already used for exclusive tags and Grouptags need their own, -non-exclusive syntax. This behaviour is achieved with [ ]. Note: { } +non-exclusive syntax. This behavior is achieved with [ ]. Note: { } can still be used also for Grouptags but then only one of the given tags can be used on the headline at the same time. Example: @@ -1422,9 +1422,9 @@ Check the documentation for more details. Thanks to Jarmo Hurri for this feature. -*** New behaviour for ~org-toggle-latex-fragment~ +*** New behavior for ~org-toggle-latex-fragment~ -The new behaviour is the following: +The new behavior is the following: - With a double prefix argument or with a single prefix argument when point is before the first headline, toggle overlays in the whole @@ -1623,10 +1623,10 @@ leading spaces within table cells. Org uses the MathJax CDN by default. See the manual and the docstring of ~org-html-mathjax-options~ for details. -*** New behaviour in `org-export-options-alist' +*** New behavior in `org-export-options-alist' When defining a back-end, it is now possible to specify to give -`parse' behaviour on a keyword. It is equivalent to call +`parse' behavior on a keyword. It is equivalent to call `org-element-parse-secondary-string' on the value. However, parsed =KEYWORD= is automatically associated to an @@ -1745,7 +1745,7 @@ everywhere in the buffer, possibly corrupting URLs. *** Removed option =org-babel-sh-command= This undocumented option defaulted to the value of =shell-file-name= at -the time of loading =ob-shell=. The new behaviour is to use the value +the time of loading =ob-shell=. The new behavior is to use the value of =shell-file-name= directly when the shell langage is =shell=. To chose a different shell, either customize =shell-file-name= or bind this variable locally. diff --git a/lisp/filenotify.el b/lisp/filenotify.el index 986dc093bc..21c9cc23df 100644 --- a/lisp/filenotify.el +++ b/lisp/filenotify.el @@ -419,7 +419,7 @@ DESCRIPTOR should be an object returned by `file-notify-add-watch'." ;; TODO: ;; * Watching a /dir/file may receive events for dir. -;; (This may be the desired behaviour.) +;; (This may be the desired behavior.) ;; * Watching a file in an already watched directory ;; If the file is created and *then* a watch is added to that file, the ;; watch might receive events which occurred prior to it being created, diff --git a/lisp/frame.el b/lisp/frame.el index a28baf7ff0..447413b325 100644 --- a/lisp/frame.el +++ b/lisp/frame.el @@ -2441,7 +2441,7 @@ See also `toggle-frame-maximized'." nil `((fullscreen . fullboth) (fullscreen-restore . ,fullscreen)))) ;; Manipulating a frame without waiting for the fullscreen ;; animation to complete can cause a crash, or other unexpected - ;; behaviour, on macOS (bug#28496). + ;; behavior, on macOS (bug#28496). (when (featurep 'cocoa) (sleep-for 0.5)))) ;;;; Key bindings diff --git a/lisp/org/org-element.el b/lisp/org/org-element.el index 7a40d6933c..9e5c4007bd 100644 --- a/lisp/org/org-element.el +++ b/lisp/org/org-element.el @@ -4721,7 +4721,7 @@ indentation removed from its contents." ;; Cache is enabled by default, but can be disabled globally with ;; `org-element-use-cache'. `org-element-cache-sync-idle-time', ;; org-element-cache-sync-duration' and `org-element-cache-sync-break' -;; can be tweaked to control caching behaviour. +;; can be tweaked to control caching behavior. ;; ;; Internally, parsed elements are stored in an AVL tree, ;; `org-element--cache'. This tree is updated lazily: whenever diff --git a/lisp/org/org.el b/lisp/org/org.el index 4e4620549c..a53553bfd8 100644 --- a/lisp/org/org.el +++ b/lisp/org/org.el @@ -10641,7 +10641,7 @@ a timestamp or a link." (save-excursion ;; Do not validate action when point is on the ;; spaces right after the footnote label, in - ;; order to be on par with behaviour on links. + ;; order to be on par with behavior on links. (skip-chars-forward " \t") (let ((begin (org-element-property :contents-begin context))) @@ -10794,7 +10794,7 @@ there is one, return it." (cons link end))))) ;; TODO: These functions are deprecated since `org-open-at-point' -;; hard-codes behaviour for "file+emacs" and "file+sys" types. +;; hard-codes behavior for "file+emacs" and "file+sys" types. (defun org-open-file-with-system (path) "Open file at PATH using the system way of opening it." (org-open-file path 'system)) diff --git a/lisp/term.el b/lisp/term.el index 3970e93cf1..a470873a82 100644 --- a/lisp/term.el +++ b/lisp/term.el @@ -498,7 +498,7 @@ inconsistent with the state of the terminal understood by the inferior process. Only the process filter is allowed to make changes to the buffer. -Customize this option to nil if you want the previous behaviour." +Customize this option to nil if you want the previous behavior." :version "26.1" :type 'boolean :group 'term) @@ -519,7 +519,7 @@ commands can be invoked on the mouse-selected point or region, until the process filter (or user) moves point to the process mark once again. -Customize this option to nil if you want the previous behaviour." +Customize this option to nil if you want the previous behavior." :version "26.1" :type 'boolean :group 'term) commit 1bc998f98f937ee82e29d80e19fda7c32632501a Author: Glenn Morris Date: Sat Mar 3 17:39:20 2018 -0800 * lisp/epa-mail.el (epa-mail-default-recipients): Replace obsolete func. diff --git a/lisp/epa-mail.el b/lisp/epa-mail.el index 077666ac89..c819f6734c 100644 --- a/lisp/epa-mail.el +++ b/lisp/epa-mail.el @@ -111,7 +111,7 @@ If no one is selected, default secret key is used. " (defun epa-mail-default-recipients () "Return the default list of encryption recipients for a mail buffer." - (let ((config (epg-configuration)) + (let ((config (epg-find-configuration 'OpenPGP)) recipients-string real-recipients) (save-excursion (goto-char (point-min)) commit d3437eaf6777a9660d19dbec084392e8134984b7 Author: Glenn Morris Date: Sat Mar 3 17:17:36 2018 -0800 Replace some obsolete functions in gnus * lisp/gnus/mml-sec.el (mml-secure-epg-encrypt): * lisp/gnus/smime.el (smime-ask-passphrase): Replace obsolete functions. diff --git a/lisp/gnus/mml-sec.el b/lisp/gnus/mml-sec.el index 099e5372b4..3855d7b796 100644 --- a/lisp/gnus/mml-sec.el +++ b/lisp/gnus/mml-sec.el @@ -903,7 +903,7 @@ If no one is selected, symmetric encryption will be performed. " (defun mml-secure-epg-encrypt (protocol cont &optional sign) ;; Based on code appearing inside mml2015-epg-encrypt. (let* ((context (epg-make-context protocol)) - (config (epg-configuration)) + (config (epg-find-configuration 'OpenPGP)) (sender (message-options-get 'message-sender)) (recipients (mml-secure-recipients protocol context config sender)) (signer-names (mml-secure-signer-names protocol sender)) diff --git a/lisp/gnus/smime.el b/lisp/gnus/smime.el index 3e722d2d82..d55cea724f 100644 --- a/lisp/gnus/smime.el +++ b/lisp/gnus/smime.el @@ -234,10 +234,11 @@ must be set in `ldap-host-parameters-alist'." If `cache-key' and `password-cache' is non-nil then cache the password under `cache-key'." (let ((passphrase - (password-read-and-add + (password-read "Passphrase for secret key (RET for no passphrase): " cache-key))) (if (string= passphrase "") nil + (and passphrase cache-key (password-cache-add cache-key passphrase)) passphrase))) ;; OpenSSL wrappers. commit a56a3fc6849b89a71c9a00afcb088021ccbe94e5 Author: Bill Wohler Date: Sat Mar 3 15:57:43 2018 -0800 Add missing findex entries for recently removed kindex entries * doc/misc/mh-e.texi: diff --git a/doc/misc/mh-e.texi b/doc/misc/mh-e.texi index 74b17264d2..b44e503996 100644 --- a/doc/misc/mh-e.texi +++ b/doc/misc/mh-e.texi @@ -5974,6 +5974,9 @@ Using prefixes instead of postfixes helps you explore aliases during completion. If you forget the name of an old dive buddy, you can enter @samp{div} and then @key{SPC} to get a listing of all your dive buddies. +@findex mh-alias-add-address-under-point +@findex mh-alias-grab-from-field + An alias for the sender of the current message is added automatically by clicking on the @samp{Grab From alias} tool bar button or by running the @kbd{M-x mh-alias-grab-from-field} command. Aliases for other @@ -6265,6 +6268,7 @@ containing the value for the field is given. @cindex folder navigation @cindex speedbar @findex mh-visit-folder +@findex speedbar @kindex F v @kindex mouse-2 @@ -7984,6 +7988,7 @@ system. @cindex MH-E version @cindex @file{*MH-E Info*} @cindex version +@findex mh-version One command worth noting is @kbd{M-x mh-version}. You can compare the version this command prints to the latest release (@pxref{Getting @@ -8698,6 +8703,7 @@ I also point out some additional sources of information. @cindex bugs @cindex SourceForge +@findex mh-version Bug reports should be filed at @uref{https://sourceforge.net/p/mh-e/bugs/, SourceForge}. You need to @@ -8773,6 +8779,7 @@ instead. @cindex news @cindex @samp{MH-E-NEWS} @cindex @samp{README} +@findex mh-version After you download and extract the MH-E tarball, read the @file{README} file and @file{MH-E-NEWS}. These correspond to the commit 90ca83d4bf17a334902321e93fa89ccb1f4a5a4e Author: Juri Linkov Date: Sun Mar 4 00:33:30 2018 +0200 * lisp/isearch.el (search-exit-option): Add options ‘shift-move’ and ‘move’. Change type from ‘boolean’ to ‘choice’. Extend docstring. (isearch-pre-move-point): New variable. (isearch-pre-command-hook, isearch-post-command-hook): Handle search-exit-option for values ‘move’ and ‘shift-move’. * doc/emacs/search.texi (Not Exiting Isearch): Document new values ‘shift-move’ and ‘move’ of search-exit-option. https://lists.gnu.org/archive/html/emacs-devel/2018-03/msg00013.html diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi index 887fd982d0..0de3aee1b2 100644 --- a/doc/emacs/search.texi +++ b/doc/emacs/search.texi @@ -437,7 +437,7 @@ of the keymap @code{isearch-mode-map} (@pxref{Keymaps}). This subsection describes how to control whether typing a command not specifically meaningful in searches exits the search before executing -the command. It also describes two categories of commands which you +the command. It also describes three categories of commands which you can type without exiting the current incremental search, even though they are not themselves part of incremental search. @@ -507,6 +507,18 @@ change point, the buffer contents, the match data, the current buffer, or the selected window and frame. The command must not itself attempt an incremental search. This feature is disabled if @code{isearch-allow-scroll} is @code{nil} (which it is by default). + +@item Motion Commands +@cindex motion commands, during incremental search +When @code{search-exit-option} is customized to @code{shift-move}, +you can extend the search string by holding down the shift key while +typing cursor motion commands. It will yank text that ends at the new +position after moving point in the current buffer. + +When @code{search-exit-option} is @code{move}, you can extend the +search string without using the shift key for cursor motion commands, +but it applies only for certain motion command that have the +@code{isearch-move} property on their symbols. @end table @node Isearch Minibuffer diff --git a/etc/NEWS b/etc/NEWS index 596adf88ae..08c7e7eb56 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -180,6 +180,14 @@ created by 'edit-last-kbd-macro', and to save the macro by 'C-c C-c'. --- *** New filter ibuffer-filter-by-process; bound to '/E'. +** Search and Replace + +*** 'search-exit-option' provides new options 'move' and 'shift-move' +to extend the search string by yanking text that ends at the new +position after moving point in the current buffer. 'shift-move' +extends the search string by motion commands while holding down +the shift key. + ** Edebug +++ diff --git a/lisp/isearch.el b/lisp/isearch.el index a41adf0c2c..96faa27c17 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -67,8 +67,23 @@ (defcustom search-exit-option t - "Non-nil means random control characters terminate incremental search." - :type 'boolean) + "Defines what control characters do in incremental search. +If t, random control and meta characters terminate the search +and are then executed normally. +If `edit', edit the search string instead of exiting. +If `move', extend the search string by motion commands +that have the `isearch-move' property on their symbols. +If `shift-move', extend the search string by motion commands +while holding down the shift key. +Both `move' and `shift-move' extend the search string by yanking text +that ends at the new position after moving point in the current buffer. +If nil, run the command without exiting Isearch." + :type '(choice (const :tag "Terminate incremental search" t) + (const :tag "Edit the search string" edit) + (const :tag "Extend the search string by motion commands" move) + (const :tag "Extend the search string by shifted motion keys" shift-move) + (const :tag "Don't terminate incremental search" nil)) + :version "27.1") (defcustom search-slow-window-lines 1 "Number of lines in slow search display windows. @@ -2391,6 +2406,7 @@ the bottom." (goto-char isearch-point)) (defvar isearch-pre-scroll-point nil) +(defvar isearch-pre-move-point nil) (defun isearch-pre-command-hook () "Decide whether to exit Isearch mode before executing the command. @@ -2398,8 +2414,9 @@ Don't exit Isearch if the key sequence that invoked this command is bound in `isearch-mode-map', or if the invoked command is a prefix argument command (when `isearch-allow-prefix' is non-nil), or it is a scrolling command (when `isearch-allow-scroll' is non-nil). -Otherwise, exit Isearch (when `search-exit-option' is non-nil) -before the command is executed globally with terminated Isearch." +Otherwise, exit Isearch (when `search-exit-option' is t) +before the command is executed globally with terminated Isearch. +See more for options in `search-exit-option'." (let* ((key (this-single-command-keys)) (main-event (aref key 0))) (cond @@ -2427,6 +2444,14 @@ before the command is executed globally with terminated Isearch." ;; Swallow the up-event. (read-event) (setq this-command 'isearch-edit-string)) + ;; Don't terminate the search for motion commands. + ((or (and (eq search-exit-option 'move) + (symbolp this-command) + (eq (get this-command 'isearch-move) t)) + (and (eq search-exit-option 'shift-move) + this-command-keys-shift-translated)) + (setq this-command-keys-shift-translated nil) + (setq isearch-pre-move-point (point))) ;; Other characters terminate the search and are then executed normally. (search-exit-option (isearch-done) @@ -2436,13 +2461,28 @@ before the command is executed globally with terminated Isearch." (isearch-process-search-string key key))))) (defun isearch-post-command-hook () - (when isearch-pre-scroll-point + (cond + (isearch-pre-scroll-point (let ((ab-bel (isearch-string-out-of-window isearch-pre-scroll-point))) (if ab-bel (isearch-back-into-window (eq ab-bel 'above) isearch-pre-scroll-point) (goto-char isearch-pre-scroll-point))) (setq isearch-pre-scroll-point nil) - (isearch-update))) + (isearch-update)) + ((memq search-exit-option '(move shift-move)) + (when (and isearch-pre-move-point + (not (eq isearch-pre-move-point (point)))) + (let ((string (buffer-substring-no-properties + (or isearch-other-end isearch-opoint) (point)))) + (if isearch-regexp (setq string (regexp-quote string))) + (setq isearch-string string) + (setq isearch-message (mapconcat 'isearch-text-char-description + string "")) + (setq isearch-yank-flag t) + (setq isearch-forward (<= (or isearch-other-end isearch-opoint) (point))) + (goto-char isearch-pre-move-point) + (isearch-search-and-update))) + (setq isearch-pre-move-point nil)))) (defun isearch-quote-char (&optional count) "Quote special characters for incremental search. commit f0e5f220b69880f1f5c29b2e5515b2aa8a950f14 Author: Juri Linkov Date: Sat Mar 3 23:33:15 2018 +0200 * lisp/progmodes/grep.el (zrgrep): Let-bind grep-use-null-filename-separator to nil (bug#30559). diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index 755c9c73d3..da09c900e5 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el @@ -1185,6 +1185,8 @@ file name to `*.gz', and sets `grep-highlight-matches' to `always'." (grep-find-template nil) (grep-find-command nil) (grep-host-defaults-alist nil) + ;; `zgrep' doesn't support the `--null' option. + (grep-use-null-filename-separator nil) ;; Use for `grep-read-files' (grep-files-aliases '(("all" . "* .*") ("gz" . "*.gz")))) commit b3300c3ec80a40a6fe34a8721b79f273d519f00e Author: Glenn Morris Date: Sat Mar 3 10:36:48 2018 -0800 Quieten gud.el and gdb-mi.el compilation * lisp/progmodes/gud.el (gud-gdb): * lisp/progmodes/gdb-mi.el (gdb): Suppress "unused lexical argument" warning. diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el index c664799ab0..88e34d8df9 100644 --- a/lisp/progmodes/gdb-mi.el +++ b/lisp/progmodes/gdb-mi.el @@ -792,7 +792,7 @@ detailed description of this mode. (gud-def gud-tbreak "tbreak %f:%l" "\C-t" "Set temporary breakpoint at current line.") (gud-def gud-jump - (progn (gud-call "tbreak %f:%l") (gud-call "jump %f:%l")) + (progn (gud-call "tbreak %f:%l" arg) (gud-call "jump %f:%l")) "\C-j" "Set execution address to current line.") (gud-def gud-up "up %p" "<" "Up N stack frames (numeric arg).") diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 72f5769558..6aa9a7e4d4 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -378,6 +378,7 @@ we're in the GUD buffer)." (if (not gud-running) ,(if (stringp cmd) `(gud-call ,cmd arg) + ;; Unused lexical warning if cmd does not use "arg". cmd)))) ,(if key `(local-set-key ,(concat "\C-c" key) ',func)) ,(if key `(global-set-key (vconcat gud-key-prefix ,key) ',func)))) @@ -771,7 +772,7 @@ the buffer in which this command was invoked." (gud-def gud-cont "cont" "\C-r" "Continue with display.") (gud-def gud-finish "finish" "\C-f" "Finish executing current function.") (gud-def gud-jump - (progn (gud-call "tbreak %f:%l") (gud-call "jump %f:%l")) + (progn (gud-call "tbreak %f:%l" arg) (gud-call "jump %f:%l")) "\C-j" "Set execution address to current line.") (gud-def gud-up "up %p" "<" "Up N stack frames (numeric arg).") commit a0f71260f8d6685f307eb9ce92edaecc9f5f6fef Author: Eli Zaretskii Date: Sat Mar 3 19:39:55 2018 +0200 Minor copyedits in doc/emacs/text.texi * doc/emacs/text.texi (TeX Mode): Use @code for command markup. (HTML Mode): Add a note about "C-x C-v" binding in HTML mode. diff --git a/doc/emacs/text.texi b/doc/emacs/text.texi index ffac2027f9..c8e36411a5 100644 --- a/doc/emacs/text.texi +++ b/doc/emacs/text.texi @@ -1518,8 +1518,8 @@ normally called automatically when you visit a @TeX{}-like file. this, Emacs chooses the mode specified by the variable @code{tex-default-mode}; its default value is @code{latex-mode}. If Emacs does not guess right, you can select the correct variant of -@TeX{} mode using the command @kbd{M-x plain-tex-mode}, @kbd{M-x -latex-mode}, @kbd{M-x slitex-mode}, or @kbd{doctex-mode}. +@TeX{} mode using the commands @code{plain-tex-mode}, +@code{latex-mode}, @code{slitex-mode}, or @code{doctex-mode}. The following sections document the features of @TeX{} mode and its variants. There are several other @TeX{}-related Emacs packages, @@ -1997,7 +1997,8 @@ characters themselves (@code{sgml-name-8bit-mode}). @kindex C-c C-v @r{(SGML mode)} @findex sgml-validate Run a shell command (which you must specify) to validate the current -buffer as SGML (@code{sgml-validate}). +buffer as SGML (@code{sgml-validate}). (In HTML mode this key +sequence runs a different command.) @item C-c @key{TAB} @kindex C-c TAB @r{(SGML mode)} commit 282a68189a4721d6764126d435fc7cf57fad6440 Author: Eli Zaretskii Date: Sat Mar 3 14:54:15 2018 +0200 Improve commentary in simple,el * lisp/simple.el (next-error-last-buffer): Improve commentary. (Bug#20489) diff --git a/lisp/simple.el b/lisp/simple.el index edcb73ce2e..60a00286f8 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -121,6 +121,11 @@ If non-nil, the value is passed directly to `recenter'." A buffer becomes most recent when its compilation, grep, or similar mode is started, or when it is used with \\[next-error] or \\[compile-goto-error].") + +;; next-error-last-buffer is made buffer-local to keep the reference +;; to the parent buffer used to navigate to the current buffer, so the +;; next call of next-buffer will use the same parent buffer to +;; continue navigation from it. (make-variable-buffer-local 'next-error-last-buffer) (defvar next-error-function nil commit adfe2f580f2359eb7e1b15aa0a39096273fe9995 Author: Eli Zaretskii Date: Sat Mar 3 14:41:16 2018 +0200 Remove outdated comment in syntax.el * lisp/emacs-lisp/syntax.el (syntax-ppss-toplevel-pos): Remove outdated comment. (Bug#30617) diff --git a/lisp/emacs-lisp/syntax.el b/lisp/emacs-lisp/syntax.el index 6106720f7a..ad1a9665ff 100644 --- a/lisp/emacs-lisp/syntax.el +++ b/lisp/emacs-lisp/syntax.el @@ -363,12 +363,6 @@ An \"outermost position\" means one that it is outside of any syntactic entity: outside of any parentheses, comments, or strings encountered in the scan. If no such position is recorded in PPSS (because the end of the scan was itself at the outermost level), return nil." - ;; BEWARE! We rely on the undocumented 9th field. The 9th field currently - ;; contains the list of positions of the enclosing open-parens. - ;; I.e. those positions are outside of any string/comment and the first of - ;; those is outside of any paren (i.e. corresponds to a nil ppss). - ;; If this list is empty but we are in a string or comment, then the 8th - ;; field contains a similar "toplevel" position. (or (car (nth 9 ppss)) (nth 8 ppss))) commit f9dfad9358b2af36d1496c525585f761c130f095 Author: Evgeni Kolev Date: Sat Mar 3 13:07:26 2018 +0200 Fix font-lock in perl-mode * lisp/progmodes/perl-mode.el (perl-font-lock-keywords-1): Prevent the regexp from matching keywords if they start with a Perl sigil. (Bug#30549) diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el index 99480788f5..c1d94acfa5 100644 --- a/lisp/progmodes/perl-mode.el +++ b/lisp/progmodes/perl-mode.el @@ -165,7 +165,7 @@ ;; Fontify function and package names in declarations. ("\\<\\(package\\|sub\\)\\>[ \t]*\\(\\sw+\\)?" (1 font-lock-keyword-face) (2 font-lock-function-name-face nil t)) - ("\\<\\(import\\|no\\|require\\|use\\)\\>[ \t]*\\(\\sw+\\)?" + ("\\(^\\|[^$@%&\\]\\)\\<\\(import\\|no\\|require\\|use\\)\\>[ \t]*\\(\\sw+\\)?" (1 font-lock-keyword-face) (2 font-lock-constant-face nil t))) "Subdued level highlighting for Perl mode.") commit b80e15b6a6d06fc2937a9c11c1cae5619ceed9c3 Author: Eli Zaretskii Date: Sat Mar 3 12:47:47 2018 +0200 Prevent Flyspell from changing unrelated words * lisp/textmodes/flyspell.el (flyspell-auto-correct-word): Avoid using stale cached data from previous invocations of this command. (Bug#30462) diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el index d87cb5e72e..e462669626 100644 --- a/lisp/textmodes/flyspell.el +++ b/lisp/textmodes/flyspell.el @@ -1944,6 +1944,10 @@ spell-check." (call-interactively flyspell--prev-meta-tab-binding) (let ((pos (point)) (old-max (point-max))) + ;; Flush a possibly stale cache from previous invocations of + ;; flyspell-auto-correct-word. + (if (not (eq last-command 'flyspell-auto-correct-word)) + (setq flyspell-auto-correct-region nil)) ;; Use the correct dictionary. (flyspell-accept-buffer-local-defs) (if (and (eq flyspell-auto-correct-pos pos) commit e385599457497d0ad1a103363eec73e09058c24a Author: Eli Zaretskii Date: Sat Mar 3 12:41:31 2018 +0200 Avoid errors in flymake in builds --without-x * lisp/progmodes/flymake.el: Require 'mwheel'. (Bug#28732) diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el index 58bad8f366..40eacdd188 100644 --- a/lisp/progmodes/flymake.el +++ b/lisp/progmodes/flymake.el @@ -48,6 +48,10 @@ (require 'thingatpt) ; end-of-thing (require 'warnings) ; warning-numeric-level, display-warning (require 'compile) ; for some faces +;; We need the next require to avoid compiler warnings and run-time +;; errors about mouse-wheel-up/down-event in builds --without-x, where +;; mwheel is not preloaded. +(require 'mwheel) ;; when-let*, if-let*, hash-table-keys, hash-table-values: (eval-when-compile (require 'subr-x)) commit d691e30cb0c630f9d40da5369500b36419c6f0c3 Author: Eli Zaretskii Date: Sat Mar 3 11:50:24 2018 +0200 More improvements of the Emacs manual * doc/emacs/rmail.texi (Rmail Reply, Rmail Sorting): Improve wording. Suggested by Daniel Chakraborty . * doc/emacs/glossary.texi (Glossary): Add cross-references. Improve and clarify wording. Suggested by Gijs Hillenius in emacs-manual-bugs@gnu.org. * doc/emacs/text.texi (Org Authoring): Add more supported formats to the list. (TeX Print): Improve wording. Slightly rearrange stuff. (TeX Misc): Mention doctex-mode-hook. (Two-Column): Minor rearrangement of text. Suggested by Michael Albinus in emacs-manual-bugs@gnu.org. * doc/emacs/misc.texi (Saving Emacs Sessions): * doc/emacs/programs.texi (Program Modes): Remove redundant text and index entries. diff --git a/doc/emacs/glossary.texi b/doc/emacs/glossary.texi index a9120194a4..fd9e97f2d5 100644 --- a/doc/emacs/glossary.texi +++ b/doc/emacs/glossary.texi @@ -103,13 +103,14 @@ supports both of these forms, as well as any mixture of them---this is ``bidirectional text''. @xref{Bidirectional Editing}. @item Bind +@anchor{Glossary---Bind} To bind a key sequence means to give it a binding (q.v.). @xref{Rebinding}. @anchor{Glossary---Binding} @item Binding A key sequence gets its meaning in Emacs by having a binding, which is a -command (q.v.), a Lisp function that is run when you type that +command (q.v.)---a Lisp function that is run when you type that sequence. @xref{Commands,Binding}. Customization often involves rebinding a character to a different command function. The bindings of all key sequences are recorded in the keymaps (q.v.). @xref{Keymaps}. @@ -141,8 +142,8 @@ are visiting (q.v.@:) some file. @xref{Buffers}. @item Buffer Selection History Emacs keeps a buffer selection history that records how recently each -Emacs buffer has been selected. This is used for choosing a buffer to -select. @xref{Buffers}. +Emacs buffer has been selected. This is used for choosing which +buffer to select. @xref{Buffers}. @item Bug A bug is an incorrect or unreasonable behavior of a program, or @@ -220,9 +221,9 @@ the clipboard is used @emph{instead} of the primary selection. @xref{Clipboard}. @item Coding System -A coding system is an encoding for representing text characters in a -file or in a stream of information. Emacs has the ability to convert -text to or from a variety of coding systems when reading or writing it. +A coding system is a way to encode text characters in a file or in a +stream of information. Emacs has the ability to convert text to or +from a variety of coding systems when reading or writing it. @xref{Coding Systems}. @item Command @@ -263,12 +264,12 @@ executes faster. @item Complete Key A complete key is a key sequence that fully specifies one action to be -performed by Emacs. For example, @kbd{X} and @kbd{C-f} and @kbd{C-x m} -are complete keys. Complete keys derive their meanings from being bound -(q.v.@:) to commands (q.v.). Thus, @kbd{X} is conventionally bound to -a command to insert @samp{X} in the buffer; @kbd{C-x m} is -conventionally bound to a command to begin composing a mail message. -@xref{Keys}. +performed by Emacs. For example, @kbd{X} and @kbd{C-f} and @kbd{C-x +m} are complete keys. Complete keys derive their meanings from being +bound (@pxref{Glossary---Bind}) to commands (q.v.). Thus, @kbd{X} is +conventionally bound to a command to insert @samp{X} in the buffer; +@kbd{C-x m} is conventionally bound to a command to begin composing a +mail message. @xref{Keys}. @item Completion Completion is what Emacs does when it automatically expands an @@ -281,11 +282,11 @@ file names. Completion usually occurs when @key{TAB}, @key{SPC} or @anchor{Glossary---Continuation Line} @item Continuation Line When a line of text is longer than the width of the window, it -normally (but see @ref{Glossary---Truncation}) takes up more than one -screen line when displayed. We say that the text line is continued, and all -screen lines used for it after the first are called continuation -lines. @xref{Continuation Lines}. A related Emacs feature is -filling (q.v.). +normally takes up more than one screen line when displayed (but see +@ref{Glossary---Truncation}). We say that the text line is continued, +and all screen lines used for it after the first are called +continuation lines. @xref{Continuation Lines}. A related Emacs +feature is filling (q.v.). @item Control Character A control character is a character that you type by holding down the @@ -418,7 +419,7 @@ Variables}. On GNU and other Unix-like systems, directory names are strings that end in @samp{/}. For example, @file{/no-such-dir/} is a directory name whereas @file{/tmp} is not, even though @file{/tmp} names a file -that happens to be a directory. On MS-DOS the relationship is more +that happens to be a directory. On MS-Windows the relationship is more complicated. @xref{Directory Names,,, elisp, the Emacs Lisp Reference Manual}. diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi index e1b8070f43..60986347a7 100644 --- a/doc/emacs/misc.texi +++ b/doc/emacs/misc.texi @@ -2463,12 +2463,6 @@ sessions, or add this line in your init file (@pxref{Init File}): (desktop-save-mode 1) @end example -@vindex desktop-auto-save-timeout -@noindent -When @code{desktop-save-mode} is active and the desktop file exists, -Emacs auto-saves it every @code{desktop-auto-save-timeout} -seconds, if that is non-@code{nil} and non-zero. - @findex desktop-change-dir @findex desktop-revert @vindex desktop-path diff --git a/doc/emacs/programs.texi b/doc/emacs/programs.texi index 3a4330ea89..c34b55fc00 100644 --- a/doc/emacs/programs.texi +++ b/doc/emacs/programs.texi @@ -77,7 +77,6 @@ mode for the C programming language is @code{c-mode}. @cindex VHDL mode @cindex M4 mode @cindex Shell-script mode -@cindex Scheme mode @cindex OPascal mode @cindex PostScript mode @cindex Conf mode diff --git a/doc/emacs/rmail.texi b/doc/emacs/rmail.texi index e9371f39a9..cb62ce3652 100644 --- a/doc/emacs/rmail.texi +++ b/doc/emacs/rmail.texi @@ -802,7 +802,7 @@ its contents. @vindex rmail-enable-mime-composing @findex unforward-rmail-message Rmail offers two formats for forwarded messages. The default is to -use MIME (@pxref{Rmail Display}) format. This includes the original +use the MIME format (@pxref{Rmail Display}). This includes the original message as a separate part. You can use a simpler format if you prefer, by setting the variable @code{rmail-enable-mime-composing} to @code{nil}. In this case, Rmail just includes the original message @@ -1092,7 +1092,7 @@ Sort messages of current Rmail buffer by author's name. @findex rmail-sort-by-recipient @item C-c C-s C-r @itemx M-x rmail-sort-by-recipient -Sort messages of current Rmail buffer by recipient's names. +Sort messages of current Rmail buffer by recipient's name. @findex rmail-sort-by-correspondent @item C-c C-s C-c diff --git a/doc/emacs/text.texi b/doc/emacs/text.texi index e00c550343..ffac2027f9 100644 --- a/doc/emacs/text.texi +++ b/doc/emacs/text.texi @@ -1451,8 +1451,9 @@ etc. export and publication. To export the current buffer, type @kbd{C-c C-e} (@code{org-export}) anywhere in an Org buffer. This command prompts for an export format; currently supported formats include -HTML, @LaTeX{}, OpenDocument (@file{.odt}), and PDF@. Some formats, -such as PDF, require certain system tools to be installed. +HTML, @LaTeX{}, Texinfo, OpenDocument (@file{.odt}), iCalendar, +Markdown, man-page, and PDF@. Some formats, such as PDF, require +certain system tools to be installed. @vindex org-publish-project-alist To export several files at once to a specific directory, either @@ -1511,14 +1512,14 @@ with @LaTeX{}.}. Emacs provides a @TeX{} major mode for each of these variants: Plain @TeX{} mode, @LaTeX{} mode, Doc@TeX{} mode, and Sli@TeX{} mode. Emacs selects the appropriate mode by looking at the contents of the buffer. -(This is done by the @code{tex-mode} command, which is normally called -automatically when you visit a @TeX{}-like file. @xref{Choosing -Modes}.) If the contents are insufficient to determine this, Emacs -chooses the mode specified by the variable @code{tex-default-mode}; -its default value is @code{latex-mode}. If Emacs does not guess -right, you can select the correct variant of @TeX{} mode using the -command @kbd{M-x plain-tex-mode}, @kbd{M-x latex-mode}, @kbd{M-x -slitex-mode}, or @kbd{doctex-mode}. +(This is done by invoking the @code{tex-mode} command, which is +normally called automatically when you visit a @TeX{}-like file. +@xref{Choosing Modes}.) If the contents are insufficient to determine +this, Emacs chooses the mode specified by the variable +@code{tex-default-mode}; its default value is @code{latex-mode}. If +Emacs does not guess right, you can select the correct variant of +@TeX{} mode using the command @kbd{M-x plain-tex-mode}, @kbd{M-x +latex-mode}, @kbd{M-x slitex-mode}, or @kbd{doctex-mode}. The following sections document the features of @TeX{} mode and its variants. There are several other @TeX{}-related Emacs packages, @@ -1691,14 +1692,16 @@ chapter of a larger document). @table @kbd @item C-c C-b Invoke @TeX{} on the entire current buffer (@code{tex-buffer}). + @item C-c C-r Invoke @TeX{} on the current region, together with the buffer's header (@code{tex-region}). + @item C-c C-f Invoke @TeX{} on the current file (@code{tex-file}). @item C-c C-v -Preview the output from the last @kbd{C-c C-r}, @kbd{C-c C-b}, or @kbd{C-c +Preview the output from the last @kbd{C-c C-b}, @kbd{C-c C-r}, or @kbd{C-c C-f} command (@code{tex-view}). @item C-c C-p @@ -1733,7 +1736,7 @@ C-p} (@code{tex-print}) to print a hardcopy of the output file. @cindex @env{TEXINPUTS} environment variable @vindex tex-directory By default, @kbd{C-c C-b} runs @TeX{} in the current directory. The -output of @TeX{} also goes in this directory. To run @TeX{} in a +output of @TeX{} is also created in this directory. To run @TeX{} in a different directory, change the variable @code{tex-directory} to the desired directory. If your environment variable @env{TEXINPUTS} contains relative names, or if your files contain @@ -1879,14 +1882,16 @@ keys (@pxref{Completion}). @vindex tex-shell-hook @vindex tex-mode-hook +@vindex doctex-mode-hook @vindex latex-mode-hook @vindex slitex-mode-hook @vindex plain-tex-mode-hook Entering any variant of @TeX{} mode runs the hooks @code{text-mode-hook} and @code{tex-mode-hook}. Then it runs either -@code{plain-tex-mode-hook}, @code{latex-mode-hook}, or -@code{slitex-mode-hook}, whichever is appropriate. Starting the -@TeX{} shell runs the hook @code{tex-shell-hook}. @xref{Hooks}. +@code{plain-tex-mode-hook}, @code{doctex-mode-hook}, +@code{latex-mode-hook}, or @code{slitex-mode-hook}, whichever is +appropriate. Starting the @TeX{} shell runs the hook +@code{tex-shell-hook}. @xref{Hooks}. @findex iso-iso2tex @findex iso-tex2iso @@ -2903,7 +2908,7 @@ right-hand buffer.) @kindex F2 RET @kindex C-x 6 RET @findex 2C-newline - The command @kbd{C-x 6 @key{RET}} or @kbd{@key{F2} @key{RET}} + The command @kbd{@key{F2} @key{RET}} or @kbd{C-x 6 @key{RET}} (@code{2C-newline}) inserts a newline in each of the two buffers at corresponding positions. This is the easiest way to add a new line to the two-column text while editing it in split buffers. commit ed071fa79c05e88a2ec3830c0813ed94544854b2 Author: Glenn Morris Date: Fri Mar 2 19:33:24 2018 -0800 Quieten eshell compilation * lisp/eshell/em-dirs.el (eshell-dirs-initialize, eshell/pwd): * lisp/eshell/em-script.el (eshell-script-initialize): * lisp/eshell/em-unix.el (eshell/whoami): * lisp/eshell/esh-proc.el (eshell/jobs): Mark unused arguments. diff --git a/lisp/eshell/em-dirs.el b/lisp/eshell/em-dirs.el index 37cb6b169a..34bf821c11 100644 --- a/lisp/eshell/em-dirs.el +++ b/lisp/eshell/em-dirs.el @@ -207,7 +207,7 @@ Thus, this does not include the current directory.") (when eshell-cd-on-directory (make-local-variable 'eshell-interpreter-alist) (setq eshell-interpreter-alist - (cons (cons #'(lambda (file args) + (cons (cons #'(lambda (file _args) (eshell-lone-directory-p file)) 'eshell-dirs-substitute-cd) eshell-interpreter-alist))) @@ -300,7 +300,7 @@ Thus, this does not include the current directory.") (file-name-as-directory (cdr user)))) eshell-user-names))))))) -(defun eshell/pwd (&rest args) +(defun eshell/pwd (&rest _args) "Change output from `pwd' to be cleaner." (let* ((path default-directory) (len (length path))) diff --git a/lisp/eshell/em-script.el b/lisp/eshell/em-script.el index 1b0b220d5b..a5d8e96ba8 100644 --- a/lisp/eshell/em-script.el +++ b/lisp/eshell/em-script.el @@ -61,7 +61,7 @@ This includes when running `eshell-command'." "Initialize the script parsing code." (make-local-variable 'eshell-interpreter-alist) (setq eshell-interpreter-alist - (cons (cons #'(lambda (file args) + (cons (cons #'(lambda (file _args) (string= (file-name-nondirectory file) "eshell")) 'eshell/source) diff --git a/lisp/eshell/em-unix.el b/lisp/eshell/em-unix.el index c3448de407..a18fb85507 100644 --- a/lisp/eshell/em-unix.el +++ b/lisp/eshell/em-unix.el @@ -965,7 +965,7 @@ Show wall-clock time elapsed during execution of COMMAND.") (eshell-stringify-list (eshell-flatten-list (cdr time-args)))))))) -(defun eshell/whoami (&rest args) +(defun eshell/whoami (&rest _args) "Make \"whoami\" Tramp aware." (or (file-remote-p default-directory 'user) (user-login-name))) diff --git a/lisp/eshell/esh-proc.el b/lisp/eshell/esh-proc.el index 59fb9b926d..f1380852b3 100644 --- a/lisp/eshell/esh-proc.el +++ b/lisp/eshell/esh-proc.el @@ -158,7 +158,7 @@ The signals which will cause this to happen are matched by (defalias 'eshell/wait 'eshell-wait-for-process) -(defun eshell/jobs (&rest args) +(defun eshell/jobs (&rest _args) "List processes, if there are any." (and (fboundp 'process-list) (process-list) commit 6719f05ff75ec19e45e40b98d8b0c6184168ac5e Author: Dmitry Gutov Date: Wed Feb 28 04:03:16 2018 +0200 Backport: xref--next-error-function: Move xref's window point * lisp/progmodes/xref.el (xref--next-error-function): Move xref's window point if it's visible. When we don't do that, navigation can start looping after a while. (cherry picked from commit 108ce84432d597f92637ea74bd0a094224d157de) diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index e0f5b2d367..b0bdd62ae9 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -692,6 +692,10 @@ references displayed in the current *xref* buffer." (dotimes (_ n) (setq xref (xref--search-property 'xref-item backward))) (cond (xref + ;; Save the current position (when the buffer is visible, + ;; it gets reset to that window's point from time to time). + (let ((win (get-buffer-window (current-buffer)))) + (and win (set-window-point win (point)))) (xref--show-location (xref-item-location xref) t)) (t (error "No %s xref" (if backward "previous" "next")))))) commit f50598a53dfcee45a8d711abb4b542e8ed82714b Author: Glenn Morris Date: Fri Mar 2 16:06:32 2018 -0500 * lisp/gnus/gnus.el (image-load-path): Declare for without-x builds. diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el index 123b64ac6c..fb2ae192f1 100644 --- a/lisp/gnus/gnus.el +++ b/lisp/gnus/gnus.el @@ -752,6 +752,7 @@ be set in `.emacs' instead." (cdr (assq gnus-logo-color-style gnus-logo-color-alist)) "Colors used for the Gnus logo.") +(defvar image-load-path) (declare-function image-size "image.c" (spec &optional pixels frame)) (defun gnus-group-startup-message (&optional x y) commit 94ff88247d290a3906ac0c438b7a025f865392c9 Author: Glenn Morris Date: Fri Mar 2 15:05:16 2018 -0500 ; * lisp/wheel.el: Rearrange to match master, to reduce merge conflicts No need to merge to master. diff --git a/lisp/mwheel.el b/lisp/mwheel.el index 498fcbcf5c..44c4989ad0 100644 --- a/lisp/mwheel.el +++ b/lisp/mwheel.el @@ -148,6 +148,20 @@ This can be slightly disconcerting, but some people prefer it." :group 'mouse :type 'boolean) +;;; For tilt-scroll +;;; +(defcustom mouse-wheel-tilt-scroll nil + "Enable scroll using tilting mouse wheel." + :group 'mouse + :type 'boolean + :version "26.1") + +(defcustom mouse-wheel-flip-direction nil + "Swap direction of 'wheel-right and 'wheel-left." + :group 'mouse + :type 'boolean + :version "26.1") + (eval-and-compile (if (fboundp 'event-button) (fset 'mwheel-event-button 'event-button) @@ -191,6 +205,18 @@ This can be slightly disconcerting, but some people prefer it." (defvar mwheel-scroll-right-function 'scroll-right "Function that does the job of scrolling right.") +(defvar mouse-wheel-left-event + (if (or (featurep 'w32-win) (featurep 'ns-win)) + 'wheel-left + (intern "mouse-6")) + "Event used for scrolling left.") + +(defvar mouse-wheel-right-event + (if (or (featurep 'w32-win) (featurep 'ns-win)) + 'wheel-right + (intern "mouse-7")) + "Event used for scrolling right.") + (defun mwheel-scroll (event) "Scroll up or down according to the EVENT. This should be bound only to mouse buttons 4, 5, 6, and 7 on @@ -327,33 +353,6 @@ the mode if ARG is omitted or nil." "Enable mouse wheel support." (mouse-wheel-mode (if uninstall -1 1))) - -;;; For tilt-scroll -;;; -(defcustom mouse-wheel-tilt-scroll nil - "Enable scroll using tilting mouse wheel." - :group 'mouse - :type 'boolean - :version "26.1") - -(defcustom mouse-wheel-flip-direction nil - "Swap direction of 'wheel-right and 'wheel-left." - :group 'mouse - :type 'boolean - :version "26.1") - -(defvar mouse-wheel-left-event - (if (or (featurep 'w32-win) (featurep 'ns-win)) - 'wheel-left - (intern "mouse-6")) - "Event used for scrolling left.") - -(defvar mouse-wheel-right-event - (if (or (featurep 'w32-win) (featurep 'ns-win)) - 'wheel-right - (intern "mouse-7")) - "Event used for scrolling right.") - (provide 'mwheel) ;;; mwheel.el ends here commit 762ea10d7ff483d3528c2c85b42596178ccc2a34 Merge: e943b9b514 0213c8bf47 Author: Glenn Morris Date: Fri Mar 2 11:59:46 2018 -0800 Merge from origin/emacs-26 0213c8b (origin/emacs-26) mwheel minor consistency fix 82f12b2 * src/window.c (Frecenter): Improve commentary. 04da8f4 Fix downloading non-text files in EWW 832b9ec ; Spelling fixes dd88499 ; Spelling fixes 3968f72 Rename some mwheel options, for consistency d6e78de * lisp/vc/add-log.el (add-change-log-entry): Replace obsolete... 5fe0387 Improve the Emacs manual 56ab8e3 * lisp/dired-aux.el (dired-do-create-files): Doc fix. (Bug#3... Conflicts: etc/NEWS lisp/mwheel.el commit e943b9b514fcc82a47364a35e4af9f46e30e7346 Merge: df84410a93 dde91a37ea Author: Glenn Morris Date: Fri Mar 2 11:54:10 2018 -0800 ; Merge from origin/emacs-26 The following commit was skipped: dde91a3 ; Auto-commit of loaddefs files. commit df84410a93c396b123e061aaf477515d646ec118 Merge: 61c0760b84 304278c040 Author: Glenn Morris Date: Fri Mar 2 11:54:10 2018 -0800 Merge from origin/emacs-26 304278c Further improvements on manuals commit 61c0760b84b3a7f1b076c86dd024dabab4b413d7 Merge: cc8ae51e6f ca8afa7672 Author: Glenn Morris Date: Fri Mar 2 11:54:10 2018 -0800 ; Merge from origin/emacs-26 The following commit was skipped: ca8afa7 Require a larger stack size for threads on macOS (bug#30364) commit 0213c8bf472b196d995d92a52b44458ac8226e42 Author: Glenn Morris Date: Fri Mar 2 14:53:06 2018 -0500 mwheel minor consistency fix * lisp/mwheel.el (mwheel-scroll-left-function) (mwheel-scroll-right-function): Change from defcustom to defvar, for consistency with pre-existing. diff --git a/lisp/mwheel.el b/lisp/mwheel.el index 7107d64aa1..498fcbcf5c 100644 --- a/lisp/mwheel.el +++ b/lisp/mwheel.el @@ -185,6 +185,12 @@ This can be slightly disconcerting, but some people prefer it." (defvar mwheel-scroll-down-function 'scroll-down "Function that does the job of scrolling downward.") +(defvar mwheel-scroll-left-function 'scroll-left + "Function that does the job of scrolling left.") + +(defvar mwheel-scroll-right-function 'scroll-right + "Function that does the job of scrolling right.") + (defun mwheel-scroll (event) "Scroll up or down according to the EVENT. This should be bound only to mouse buttons 4, 5, 6, and 7 on @@ -336,18 +342,6 @@ the mode if ARG is omitted or nil." :type 'boolean :version "26.1") -(defcustom mwheel-scroll-left-function 'scroll-left - "Function that does the job of scrolling left." - :group 'mouse - :type 'function - :version "26.1") - -(defcustom mwheel-scroll-right-function 'scroll-right - "Function that does the job of scrolling right." - :group 'mouse - :type 'function - :version "26.1") - (defvar mouse-wheel-left-event (if (or (featurep 'w32-win) (featurep 'ns-win)) 'wheel-left commit 82f12b2f13780248fac6ce4591cf9ed8d62a41f1 Author: Eli Zaretskii Date: Fri Mar 2 11:24:24 2018 +0200 * src/window.c (Frecenter): Improve commentary. diff --git a/src/window.c b/src/window.c index 08c3f32dff..e6d0280d9b 100644 --- a/src/window.c +++ b/src/window.c @@ -5923,6 +5923,9 @@ and redisplay normally--don't erase and redraw the frame. */) EMACS_INT iarg UNINIT; int this_scroll_margin; + /* For reasons why we signal an error here, see + http://lists.gnu.org/archive/html/emacs-devel/2014-06/msg00053.html, + http://lists.gnu.org/archive/html/emacs-devel/2014-06/msg00094.html. */ if (buf != current_buffer) error ("`recenter'ing a window that does not display current-buffer."); commit 04da8f4c292bf9cd666f883181afd1de32d0f67f Author: Eli Zaretskii Date: Fri Mar 2 10:44:44 2018 +0200 Fix downloading non-text files in EWW * lisp/net/eww.el (eww-download-callback): Bind coding-system-for-read to 'no-conversion', to avoid any code- or EOL-conversions in downloaded files. (Bug#30664) diff --git a/lisp/net/eww.el b/lisp/net/eww.el index caac96a485..66b1767b56 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -1532,7 +1532,8 @@ Differences in #targets are ignored." eww-download-directory))) (goto-char (point-min)) (re-search-forward "\r?\n\r?\n") - (write-region (point) (point-max) file) + (let ((coding-system-for-write 'no-conversion)) + (write-region (point) (point-max) file)) (message "Saved %s" file)))) (defun eww-decode-url-file-name (string) commit cc8ae51e6f62f86d07c82c6ab7ce162150fae448 Author: Noam Postavsky Date: Thu Mar 1 22:04:57 2018 -0500 ; lisp/emacs-lisp/eieio.el (eieio-object-set-name-string): Fix quote. diff --git a/lisp/emacs-lisp/eieio.el b/lisp/emacs-lisp/eieio.el index de08e37286..1e1419f6eb 100644 --- a/lisp/emacs-lisp/eieio.el +++ b/lisp/emacs-lisp/eieio.el @@ -403,7 +403,7 @@ If EXTRA, include that in the string returned to represent the symbol." (cl-defgeneric eieio-object-set-name-string (obj name) "Set the string which is OBJ's NAME." - (declare (obsolete "inherit from `eieio-named' and use (setf (slot-value OBJ 'object-name) NAME) instead" "25.1")) + (declare (obsolete "inherit from `eieio-named' and use (setf (slot-value OBJ \\='object-name) NAME) instead" "25.1")) (cl-check-type name string) (setf (gethash obj eieio--object-names) name)) (define-obsolete-function-alias commit 4a0934192176fb8e372170f5f028edcf0f8cbdc3 Author: Noam Postavsky Date: Thu Mar 1 21:52:27 2018 -0500 Fix issues turned up by previous python.el change See [1] for more discussion. * lisp/progmodes/python.el (python--prettify-symbols-alist): Define the obsolete alias before the variable proper, so that we correctly get the user's settings regardless of which name they set. (python-nav-end-of-statement): Add missing backslash. (python-shell-send-file): Call `expand-file-name' before `file-local-name', the expansion of "~" could be different on remote filenames. (python-mode): Declare prettify-symbols-alist instead of checking if it's bound. Use the non-obsolete python-prettify-symbols-alist name, rather than checking if the obsolete name is bound (it always is too, but the Emacs 24 byte compiler doesn't recognize that define-obsolete-variable-alias defines a variable). [1]: https://lists.gnu.org/archive/html/emacs-devel/2018-02/msg00826.html diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 142e6eb3f3..afafd1b42c 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -647,15 +647,15 @@ The type returned can be `comment', `string' or `paren'." ((python-rx string-delimiter) (0 (ignore (python-syntax-stringify)))))) +(define-obsolete-variable-alias 'python--prettify-symbols-alist + 'python-prettify-symbols-alist "26.1") + (defvar python-prettify-symbols-alist '(("lambda" . ?λ) ("and" . ?∧) ("or" . ?∨)) "Value for `prettify-symbols-alist' in `python-mode'.") -(define-obsolete-variable-alias 'python--prettify-symbols-alist - 'python-prettify-symbols-alist "26.1") - (defsubst python-syntax-count-quotes (quote-char &optional point limit) "Count number of quotes around point (max is 3). QUOTE-CHAR is the quote char to count. Optional argument POINT is @@ -1520,7 +1520,7 @@ of the statement." ;; narrowing. (cl-assert (> string-start last-string-end) :show-args - " + "\ Overlapping strings detected (start=%d, last-end=%d)") (goto-char string-start) (if (python-syntax-context 'paren) @@ -3196,10 +3196,10 @@ t when called interactively." (insert-file-contents (or temp-file-name file-name)) (python-info-encoding))) - (file-name (expand-file-name (file-local-name file-name))) + (file-name (file-local-name (expand-file-name file-name))) (temp-file-name (when temp-file-name - (expand-file-name - (file-local-name temp-file-name))))) + (file-local-name (expand-file-name + temp-file-name))))) (python-shell-send-string (format (concat @@ -5299,6 +5299,7 @@ REPORT-FN is Flymake's callback function." (save-excursion (insert (make-string 2 last-command-event))))) (defvar electric-indent-inhibit) +(defvar prettify-symbols-alist) ;;;###autoload (define-derived-mode python-mode prog-mode "Python" @@ -5393,10 +5394,8 @@ REPORT-FN is Flymake's callback function." "`outline-level' function for Python mode." (1+ (/ (current-indentation) python-indent-offset)))) - (when (and (boundp 'prettify-symbols-alist) - (boundp 'python--prettify-symbols-alist)) - (set (make-local-variable 'prettify-symbols-alist) - python--prettify-symbols-alist)) + (set (make-local-variable 'prettify-symbols-alist) + python-prettify-symbols-alist) (python-skeleton-add-menu-items) commit 832b9ece366bc79b410d8628bbad877bdb245080 Author: Paul Eggert Date: Thu Mar 1 18:43:07 2018 -0800 ; Spelling fixes diff --git a/ChangeLog.3 b/ChangeLog.3 index d8c40b33ef..5b68559f43 100644 --- a/ChangeLog.3 +++ b/ChangeLog.3 @@ -20930,7 +20930,7 @@ 2017-04-24 Alan Third - Fix XBM colour rendering in NS port (bug#22060) + Fix XBM color rendering in NS port (bug#22060) src/nsimage.m (setXBMColor): Fix calculation of xbm_fg. @@ -42329,9 +42329,9 @@ Enable dividers in NS (bug#22973) - src/nsfns.m: Add colour settings functions to ns_frame_park_handlers. + src/nsfns.m: Add color settings functions to ns_frame_park_handlers. src/nsterm.m (ns_draw_window_divider): ns_focus has to go before the - attempt to set the colour. + attempt to set the color. src/nsterm.m (ns_draw_vertical_window_border): This had the same bug as above, although I didn't see any errors. @@ -49635,7 +49635,7 @@ 2016-02-27 Jan Moringen - Show the face colours when completing in `read-color' + Show the face colors when completing in `read-color' * lisp/faces.el (defined-colors-with-face-attributes): New function. (readable-foreground-color, defined-colors-with-face-attributes) commit dd88499e89ce61a5d3f173a5234e94f5a0e211fe Author: Paul Eggert Date: Thu Mar 1 18:34:17 2018 -0800 ; Spelling fixes diff --git a/ChangeLog.3 b/ChangeLog.3 index f68ba58cac..d8c40b33ef 100644 --- a/ChangeLog.3 +++ b/ChangeLog.3 @@ -38136,7 +38136,7 @@ ^ * src/frame.c (x_set_frame_parameters): Drop width_changed and - height_changed variables in favour of storing that information in + height_changed variables in favor of storing that information in width and height variables. 2016-09-12 Michal Nazarewicz @@ -38193,7 +38193,7 @@ Refactor common code in {upcase,downcase,capitalize}-word functions - * src/casefiddle.c (operate_on_word): Removed in favour of… + * src/casefiddle.c (operate_on_word): Removed in favor of… (casify_word) …new function which does what operate_on_word did plus what all of the common code from *-word functions. (upcase-word, downcase-word, capitalize-word): Move code common between @@ -38418,9 +38418,9 @@ alphabeticp. Because both of those functions require Unicode general category lookup, this resulted in unnecessary lookups (if alphabeticp return false decimalp had to perform another lookup). Drop decimalnump - in favour of alphanumericp which combines decimelnump with alphabeticp. + in favor of alphanumericp which combines decimelnump with alphabeticp. - * src/character.c (decimalnump): Remove in favour of… + * src/character.c (decimalnump): Remove in favor of… (alphanumericp): …new function. * src/regex.c (ISALNUM): Use alphanumericp. @@ -43563,10 +43563,10 @@ 2016-06-08 Michal Nazarewicz - Remove ‘ert-with-function-mocked’ macro in favour of ‘cl-letf’ macro + Remove ‘ert-with-function-mocked’ macro in favor of ‘cl-letf’ macro * lisp/emacs-lisp/ert-x.el (ert-with-function-mocked): Remove macro - in favour of ‘cl-letf’ macro which is more generic. All existing + in favor of ‘cl-letf’ macro which is more generic. All existing uses are migrated accordingly. The macro has not been included in an official release yet so it should be fine to delete it. commit 703fdeec8c3039a42d16dba46fcea2c1a4428b75 Author: Glenn Morris Date: Thu Mar 1 21:19:12 2018 -0500 * admin/automerge: Quieten initial reset. diff --git a/admin/automerge b/admin/automerge index 520961f1e8..e88711f8d6 100755 --- a/admin/automerge +++ b/admin/automerge @@ -138,7 +138,7 @@ trap "rm -f $tempfile 2> /dev/null" EXIT [ "$reset" ] && { echo "Resetting..." - git reset --hard origin/master || die "reset error" + git reset -q --hard origin/master || die "reset error" echo "Pulling..." git pull -q --ff-only || die "pull error" commit a206ea124c7ea679ea7e60ee3d4f83e931aec4e9 Author: Paul Eggert Date: Thu Mar 1 17:58:26 2018 -0800 Arrange for loaddefs files to be greppable Without this change, ldefs-boot.el contains a couple of stray NUL bytes, which cause it to be considered to be a non-text file by tools like GNU grep. * lisp/emacs-lisp/autoload.el (autoload-print-form): Set print-escape-control-characters to t. diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el index 92ad6155b5..7b4a7d04f9 100644 --- a/lisp/emacs-lisp/autoload.el +++ b/lisp/emacs-lisp/autoload.el @@ -324,6 +324,7 @@ put the output in." (setcdr p nil) (princ "\n(" outbuf) (let ((print-escape-newlines t) + (print-escape-control-characters t) (print-quoted t) (print-escape-nonascii t)) (dolist (elt form) @@ -348,6 +349,7 @@ put the output in." outbuf)) (terpri outbuf))) (let ((print-escape-newlines t) + (print-escape-control-characters t) (print-quoted t) (print-escape-nonascii t)) (print form outbuf))))))) commit a4605cd60d79e5dc050d722f8c4360f11ce65232 Author: Paul Eggert Date: Thu Mar 1 17:58:26 2018 -0800 Improve octal-escape output in bool vectors and strings * src/print.c (octalout): New function. (print_vectorlike): When printing bool vectors, use octal escapes for control characters when print-escape-control-characters is non-nil, so that the printed representation avoids encoding issues. Rename locals to avoid byte-vs-char confusion. (print_object): Don't output unnecessary zeros when printing octal escapes. Simplify by using octalout. diff --git a/src/print.c b/src/print.c index b3c0f6f38f..a8bbb9d37a 100644 --- a/src/print.c +++ b/src/print.c @@ -313,6 +313,25 @@ printchar (unsigned int ch, Lisp_Object fun) } } +/* Output an octal escape for C. If C is less than '\100' consult the + following character (if any) to see whether to use three octal + digits to avoid misinterpretation of the next character. The next + character after C will be taken from DATA, starting at byte + location I, if I is less than SIZE. Use PRINTCHARFUN to output + each character. */ + +static void +octalout (unsigned char c, unsigned char *data, ptrdiff_t i, ptrdiff_t size, + Lisp_Object printcharfun) +{ + int digits = (c > '\77' || (i < size && '0' <= data[i] && data[i] <= '7') + ? 3 + : c > '\7' ? 2 : 1); + printchar ('\\', printcharfun); + do + printchar ('0' + ((c >> (3 * --digits)) & 7), printcharfun); + while (digits != 0); +} /* Output SIZE characters, SIZE_BYTE bytes from string PTR using method PRINTCHARFUN. PRINTCHARFUN nil means output to @@ -1367,32 +1386,33 @@ print_vectorlike (Lisp_Object obj, Lisp_Object printcharfun, bool escapeflag, case PVEC_BOOL_VECTOR: { EMACS_INT size = bool_vector_size (obj); - ptrdiff_t size_in_chars = bool_vector_bytes (size); - ptrdiff_t real_size_in_chars = size_in_chars; + ptrdiff_t size_in_bytes = bool_vector_bytes (size); + ptrdiff_t real_size_in_bytes = size_in_bytes; + unsigned char *data = bool_vector_uchar_data (obj); int len = sprintf (buf, "#&%"pI"d\"", size); strout (buf, len, len, printcharfun); - /* Don't print more characters than the specified maximum. + /* Don't print more bytes than the specified maximum. Negative values of print-length are invalid. Treat them like a print-length of nil. */ if (NATNUMP (Vprint_length) - && XFASTINT (Vprint_length) < size_in_chars) - size_in_chars = XFASTINT (Vprint_length); + && XFASTINT (Vprint_length) < size_in_bytes) + size_in_bytes = XFASTINT (Vprint_length); - for (ptrdiff_t i = 0; i < size_in_chars; i++) + for (ptrdiff_t i = 0; i < size_in_bytes; i++) { maybe_quit (); - unsigned char c = bool_vector_uchar_data (obj)[i]; + unsigned char c = data[i]; if (c == '\n' && print_escape_newlines) print_c_string ("\\n", printcharfun); else if (c == '\f' && print_escape_newlines) print_c_string ("\\f", printcharfun); - else if (c > '\177') + else if (c > '\177' + || (print_escape_control_characters && c_iscntrl (c))) { /* Use octal escapes to avoid encoding issues. */ - int len = sprintf (buf, "\\%o", c); - strout (buf, len, len, printcharfun); + octalout (c, data, i + 1, size_in_bytes, printcharfun); } else { @@ -1402,7 +1422,7 @@ print_vectorlike (Lisp_Object obj, Lisp_Object printcharfun, bool escapeflag, } } - if (size_in_chars < real_size_in_chars) + if (size_in_bytes < real_size_in_bytes) print_c_string (" ...", printcharfun); printchar ('\"', printcharfun); } @@ -1854,9 +1874,7 @@ print_object (Lisp_Object obj, Lisp_Object printcharfun, bool escapeflag) (when requested) a non-ASCII character in a unibyte buffer, print single-byte non-ASCII string chars using octal escapes. */ - char outbuf[5]; - int len = sprintf (outbuf, "\\%03o", c + 0u); - strout (outbuf, len, len, printcharfun); + octalout (c, SDATA (obj), i_byte, size_byte, printcharfun); need_nonhex = false; } else if (multibyte @@ -1870,7 +1888,6 @@ print_object (Lisp_Object obj, Lisp_Object printcharfun, bool escapeflag) } else { - bool still_need_nonhex = false; /* If we just had a hex escape, and this character could be taken as part of it, output `\ ' to prevent that. */ @@ -1884,22 +1901,16 @@ print_object (Lisp_Object obj, Lisp_Object printcharfun, bool escapeflag) ? (c = 'n', true) : c == '\f' && print_escape_newlines ? (c = 'f', true) - : c == '\0' && print_escape_control_characters - ? (c = '0', still_need_nonhex = true) : c == '\"' || c == '\\') { printchar ('\\', printcharfun); printchar (c, printcharfun); } else if (print_escape_control_characters && c_iscntrl (c)) - { - char outbuf[1 + 3 + 1]; - int len = sprintf (outbuf, "\\%03o", c + 0u); - strout (outbuf, len, len, printcharfun); - } + octalout (c, SDATA (obj), i_byte, size_byte, printcharfun); else printchar (c, printcharfun); - need_nonhex = still_need_nonhex; + need_nonhex = false; } } printchar ('\"', printcharfun); commit 3968f72be861b3ee1de590b1ef53f9fb56f3640e Author: Tak Kunihiro Date: Thu Mar 1 20:44:22 2018 -0500 Rename some mwheel options, for consistency * lisp/mwheel.el (mouse-wheel-tilt-scroll) (mouse-wheel-flip-direction): Rename from mwheel-tilt-scroll-p, mwheel-flip-direction. (mwheel-scroll): Update for option renaming. * doc/emacs/frames.texi (Mouse Commands): Update for option renaming. diff --git a/doc/emacs/frames.texi b/doc/emacs/frames.texi index 17f6f35a8a..11611e7351 100644 --- a/doc/emacs/frames.texi +++ b/doc/emacs/frames.texi @@ -207,13 +207,13 @@ buffers are scrolled. The variable @code{mouse-wheel-progressive-speed} determines whether the scroll speed is linked to how fast you move the wheel. -@vindex mwheel-tilt-scroll-p -@vindex mwheel-flip-direction +@vindex mouse-wheel-tilt-scroll +@vindex mouse-wheel-flip-direction Emacs can also support horizontal scrolling if your mouse's wheel can be tilted. This feature is off by default; the variable -@code{mwheel-tilt-scroll-p} turns it on. If you'd like to reverse the -direction of horizontal scrolling, customize the variable -@code{mwheel-flip-direction} to a non-@code{nil} value. +@code{mouse-wheel-tilt-scroll} turns it on. If you'd like to reverse +the direction of horizontal scrolling, customize the variable +@code{mouse-wheel-flip-direction} to a non-@code{nil} value. @node Word and Line Mouse diff --git a/etc/NEWS b/etc/NEWS index cb4048dee4..eded00e655 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -431,9 +431,9 @@ always restricting the margin to a quarter of the window. +++ ** Emacs can scroll horizontally using mouse, touchpad, and trackbar. -You can enable this by customizing 'mwheel-tilt-scroll-p'. If you +You can enable this by customizing 'mouse-wheel-tilt-scroll'. If you want to reverse the direction of the scroll, customize -'mwheel-flip-direction'. +'mouse-wheel-flip-direction'. +++ ** The default GnuTLS priority string now includes %DUMBFW. diff --git a/lisp/mwheel.el b/lisp/mwheel.el index 9718ab87d3..7107d64aa1 100644 --- a/lisp/mwheel.el +++ b/lisp/mwheel.el @@ -255,13 +255,13 @@ non-Windows systems." ;; Make sure we do indeed scroll to the end of the buffer. (end-of-buffer (while t (funcall mwheel-scroll-up-function))))) ((eq button mouse-wheel-left-event) ; for tilt scroll - (when mwheel-tilt-scroll-p - (funcall (if mwheel-flip-direction + (when mouse-wheel-tilt-scroll + (funcall (if mouse-wheel-flip-direction mwheel-scroll-right-function mwheel-scroll-left-function) amt))) ((eq button mouse-wheel-right-event) ; for tilt scroll - (when mwheel-tilt-scroll-p - (funcall (if mwheel-flip-direction + (when mouse-wheel-tilt-scroll + (funcall (if mouse-wheel-flip-direction mwheel-scroll-left-function mwheel-scroll-right-function) amt))) (t (error "Bad binding in mwheel-scroll")))) @@ -324,13 +324,13 @@ the mode if ARG is omitted or nil." ;;; For tilt-scroll ;;; -(defcustom mwheel-tilt-scroll-p nil +(defcustom mouse-wheel-tilt-scroll nil "Enable scroll using tilting mouse wheel." :group 'mouse :type 'boolean :version "26.1") -(defcustom mwheel-flip-direction nil +(defcustom mouse-wheel-flip-direction nil "Swap direction of 'wheel-right and 'wheel-left." :group 'mouse :type 'boolean commit de92605038763d7f970891a8cc0edc0e106ed267 Author: Glenn Morris Date: Thu Mar 1 20:32:22 2018 -0500 Quieten nnir.el compilation * lisp/gnus/nnir.el (gnus-inhibit-demon, gnus-article-decode-hook): Declare dynamic variables. (nnir-request-group, nnir-retrieve-headers) (nnir-request-move-article, nnir-request-update-mark) (nnir-run-swish++, nnir-run-swish-e, nnir-run-namazu) (nnir-run-notmuch, nnir-registry-action) (nnir-request-create-group, nnir-request-delete-group) (nnir-request-list, nnir-request-scan): Mark unused arguments. (nnir-warp-to-article, nnir-run-imap, nnir-run-gmane) (nnir-get-active): Remove unused local variables. diff --git a/lisp/gnus/nnir.el b/lisp/gnus/nnir.el index 55e00a0b69..0a7d829614 100644 --- a/lisp/gnus/nnir.el +++ b/lisp/gnus/nnir.el @@ -644,7 +644,7 @@ skips all prompting." (add-hook 'gnus-summary-mode-hook 'nnir-mode) (nnoo-change-server 'nnir server definitions)))) -(deffoo nnir-request-group (group &optional server dont-check info) +(deffoo nnir-request-group (group &optional server dont-check _info) (nnir-possibly-change-group group server) (let ((pgroup (gnus-group-guess-full-name-from-command-method group)) length) @@ -669,7 +669,9 @@ skips all prompting." group)))) ; group name nnir-artlist) -(deffoo nnir-retrieve-headers (articles &optional group server fetch-old) +(defvar gnus-inhibit-demon) + +(deffoo nnir-retrieve-headers (articles &optional _group _server _fetch-old) (with-current-buffer nntp-server-buffer (let ((gnus-inhibit-demon t) (articles-by-group (nnir-categorize @@ -716,6 +718,8 @@ skips all prompting." (mapc 'nnheader-insert-nov headers) 'nov))) +(defvar gnus-article-decode-hook) + (deffoo nnir-request-article (article &optional group server to-buffer) (nnir-possibly-change-group group server) (if (and (stringp article) @@ -753,7 +757,7 @@ skips all prompting." (cons artfullgroup artno))))))) (deffoo nnir-request-move-article (article group server accept-form - &optional last internal-move-group) + &optional last _internal-move-group) (nnir-possibly-change-group group server) (let* ((artfullgroup (nnir-article-group article)) (artno (nnir-article-number article)) @@ -803,7 +807,8 @@ skips all prompting." (error "Can't warp to a pseudo-article"))) (backend-article-group (nnir-article-group cur)) (backend-article-number (nnir-article-number cur)) - (quit-config (gnus-ephemeral-group-p gnus-newsgroup-name))) +; (quit-config (gnus-ephemeral-group-p gnus-newsgroup-name)) + ) ;; what should we do here? we could leave all the buffers around ;; and assume that we have to exit from them one by one. or we can @@ -818,7 +823,7 @@ skips all prompting." (gnus-summary-read-group-1 backend-article-group t t nil nil (list backend-article-number)))) -(deffoo nnir-request-update-mark (group article mark) +(deffoo nnir-request-update-mark (_group article mark) (let ((artgroup (nnir-article-group article)) (artnumber (nnir-article-number article))) (or (and artgroup @@ -956,7 +961,7 @@ details on the language and supported extensions." (save-excursion (let ((qstring (cdr (assq 'query query))) (server (cadr (gnus-server-to-method srv))) - (defs (nth 2 (gnus-server-to-method srv))) +;; (defs (nth 2 (gnus-server-to-method srv))) (criteria (or (cdr (assq 'criteria query)) (cdr (assoc nnir-imap-default-search-key nnir-imap-search-arguments)))) @@ -1177,7 +1182,7 @@ returning the one at the supplied position." ;; - article number ;; - file size ;; - group -(defun nnir-run-swish++ (query server &optional group) +(defun nnir-run-swish++ (query server &optional _group) "Run QUERY against swish++. Returns a vector of (group name, file name) pairs (also vectors, actually). @@ -1267,7 +1272,7 @@ Windows NT 4.0." (nnir-artitem-rsv y))))))))) ;; Swish-E interface. -(defun nnir-run-swish-e (query server &optional group) +(defun nnir-run-swish-e (query server &optional _group) "Run given query against swish-e. Returns a vector of (group name, file name) pairs (also vectors, actually). @@ -1433,7 +1438,7 @@ Tested with swish-e-2.0.1 on Windows NT 4.0." ))) ;; Namazu interface -(defun nnir-run-namazu (query server &optional group) +(defun nnir-run-namazu (query server &optional _group) "Run given query against Namazu. Returns a vector of (group name, file name) pairs (also vectors, actually). @@ -1502,7 +1507,7 @@ Tested with Namazu 2.0.6 on a GNU/Linux system." (> (nnir-artitem-rsv x) (nnir-artitem-rsv y))))))))) -(defun nnir-run-notmuch (query server &optional group) +(defun nnir-run-notmuch (query server &optional _group) "Run QUERY against notmuch. Returns a vector of (group name, file name) pairs (also vectors, actually)." @@ -1667,7 +1672,7 @@ actually)." "Run a search against a gmane back-end server." (let* ((case-fold-search t) (qstring (cdr (assq 'query query))) - (server (cadr (gnus-server-to-method srv))) +;; (server (cadr (gnus-server-to-method srv))) (groupspec (mapconcat (lambda (x) (if (string-match-p "gmane" x) @@ -1809,8 +1814,7 @@ article came from is also searched." groups) (gnus-request-list method) (with-current-buffer nntp-server-buffer - (let ((cur (current-buffer)) - name) + (let ((cur (current-buffer))) (goto-char (point-min)) (unless (or (null nnir-ignored-newsgroups) (string= nnir-ignored-newsgroups "")) @@ -1851,7 +1855,7 @@ article came from is also searched." (declare-function gnus-registry-action "gnus-registry" (action data-header from &optional to method)) -(defun nnir-registry-action (action data-header from &optional to method) +(defun nnir-registry-action (action data-header _from &optional to method) "Call `gnus-registry-action' with the original article group." (gnus-registry-action action @@ -1886,7 +1890,7 @@ article came from is also searched." (gnus-group-find-parameter pgroup))))) -(deffoo nnir-request-create-group (group &optional server args) +(deffoo nnir-request-create-group (group &optional _server args) (message "Creating nnir group %s" group) (let* ((group (gnus-group-prefixed-name group '(nnir "nnir"))) (specs (assq 'nnir-specs args)) @@ -1907,13 +1911,13 @@ article came from is also searched." (nnir-request-update-info group (gnus-get-info group))) t) -(deffoo nnir-request-delete-group (group &optional force server) +(deffoo nnir-request-delete-group (_group &optional _force _server) t) -(deffoo nnir-request-list (&optional server) +(deffoo nnir-request-list (&optional _server) t) -(deffoo nnir-request-scan (group method) +(deffoo nnir-request-scan (_group _method) t) (deffoo nnir-request-close () commit 7d3152862f43c32decc4ee730af184ee49b6e37b Author: Glenn Morris Date: Thu Mar 1 20:29:23 2018 -0500 * lisp/progmodes/sql.el (sql-comint-oracle): Silence compiler. diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el index d20c579f66..9bb2cf4bdf 100644 --- a/lisp/progmodes/sql.el +++ b/lisp/progmodes/sql.el @@ -4406,7 +4406,8 @@ The default comes from `process-coding-system-alist' and (or coding 'utf-8)) (when (string-match (format "\\.%s\\'" (car cs)) nlslang) (setq coding (cdr cs))))) - (set-buffer-process-coding-system coding coding))) + (set-process-coding-system (get-buffer-process (current-buffer)) + coding coding))) (defun sql-oracle-save-settings (sqlbuf) "Save most SQL*Plus settings so they may be reset by \\[sql-redirect]." commit 5967b14f48bd3886a0db3732696419c298efbab1 Author: Glenn Morris Date: Thu Mar 1 20:28:34 2018 -0500 Quieten url-auth.el compilation * lisp/url/url-auth.el (url-digest-auth-nonce-count): Mark unused argument. diff --git a/lisp/url/url-auth.el b/lisp/url/url-auth.el index 4f7b544674..67e701ecb1 100644 --- a/lisp/url/url-auth.el +++ b/lisp/url/url-auth.el @@ -194,7 +194,7 @@ key cache `url-digest-auth-storage'." (base64-encode-string (apply 'format "%016x%04x%04x%05x%05x" (random) (current-time)) t)) -(defun url-digest-auth-nonce-count (nonce) +(defun url-digest-auth-nonce-count (_nonce) "The number requests sent to server with the given NONCE. This count includes the request we're preparing here. commit 7995f44bced3b9e97e52efa5704125bd5ca1f46e Author: Glenn Morris Date: Thu Mar 1 20:28:03 2018 -0500 Quieten ses.el compilation * lisp/ses.el (ses--edit-cell-completion-at-point-function) (ses--read-printer-completion-at-point-function): Mark unused arguments. diff --git a/lisp/ses.el b/lisp/ses.el index 9097bf5d81..bcf8bdb636 100644 --- a/lisp/ses.el +++ b/lisp/ses.el @@ -2495,7 +2495,7 @@ to are recalculated first." prefix-length) (when (and prefix (null (string= prefix ""))) (setq prefix-length (length prefix)) - (maphash (lambda (key val) + (maphash (lambda (key _val) (let ((key-name (symbol-name key))) (when (and (>= (length key-name) prefix-length) (string= prefix (substring key-name 0 prefix-length))) @@ -2648,7 +2648,7 @@ cells." prefix-length) (when prefix (setq prefix-length (length prefix)) - (maphash (lambda (key val) + (maphash (lambda (key _val) (let ((key-name (symbol-name key))) (when (and (>= (length key-name) prefix-length) (string= prefix (substring key-name 0 prefix-length))) commit 2038b6a1dd2a4a27ac363a0901276255c37e79d8 Author: Paul Eggert Date: Thu Mar 1 16:24:41 2018 -0800 make-docfile: minor fixes and cleanups * lib-src/make-docfile.c: Include c-ctype.h. (read_c_string_or_comment, write_c_args, scan_c_stream, skip_white) (read_lisp_symbol, scan_lisp_file): Prefer c_isspace etc. to listing characters by hand. (read_c_string_or_comment): Simplify. (scan_c_stream, read_lisp_symbol): Use true for boolean 1. (scan_c_stream): Fix typo (c >= 'Z' && c <= 'Z'). Minor rewrites to avoid duplicate code. (scan_c_stream, read_lisp_symbol, scan_lisp_file): Avoid infloop if at EOF. (skip_white, read_lisp_symbol): Don’t stuff getc result into ‘char’, as this mishandles EOF. diff --git a/lib-src/make-docfile.c b/lib-src/make-docfile.c index 61d53dc59d..a5ed6e3607 100644 --- a/lib-src/make-docfile.c +++ b/lib-src/make-docfile.c @@ -43,6 +43,7 @@ along with GNU Emacs. If not, see . */ #include #include +#include #include #include #include @@ -341,7 +342,7 @@ scan_keyword_or_put_char (char ch, struct rcsoc_state *state) state->pending_newlines = 2; state->pending_spaces = 0; - /* Skip any whitespace between the keyword and the + /* Skip any spaces and newlines between the keyword and the usage string. */ int c; do @@ -361,6 +362,7 @@ scan_keyword_or_put_char (char ch, struct rcsoc_state *state) fatal ("Unexpected EOF after keyword"); } while (c != ' ' && c != ')'); + put_char ('f', state); put_char ('n', state); @@ -415,7 +417,7 @@ read_c_string_or_comment (FILE *infile, int printflag, bool comment, c = getc (infile); if (comment) - while (c == '\n' || c == '\r' || c == '\t' || c == ' ') + while (c_isspace (c)) c = getc (infile); while (c != EOF) @@ -425,15 +427,14 @@ read_c_string_or_comment (FILE *infile, int printflag, bool comment, if (c == '\\') { c = getc (infile); - if (c == '\n' || c == '\r') + switch (c) { + case '\n': case '\r': c = getc (infile); continue; + case 'n': c = '\n'; break; + case 't': c = '\t'; break; } - if (c == 'n') - c = '\n'; - if (c == 't') - c = '\t'; } if (c == ' ') @@ -504,10 +505,7 @@ write_c_args (char *func, char *buf, int minargs, int maxargs) char c = *p; /* Notice when a new identifier starts. */ - if ((('A' <= c && c <= 'Z') - || ('a' <= c && c <= 'z') - || ('0' <= c && c <= '9') - || c == '_') + if ((c_isalnum (c) || c == '_') != in_ident) { if (!in_ident) @@ -550,11 +548,8 @@ write_c_args (char *func, char *buf, int minargs, int maxargs) else while (ident_length-- > 0) { - c = *ident_start++; - if (c >= 'a' && c <= 'z') - /* Upcase the letter. */ - c += 'A' - 'a'; - else if (c == '_') + c = c_toupper (*ident_start++); + if (c == '_') /* Print underscore as hyphen. */ c = '-'; putchar (c); @@ -960,7 +955,7 @@ scan_c_stream (FILE *infile) { c = getc (infile); } - while (c == ',' || c == ' ' || c == '\t' || c == '\n' || c == '\r'); + while (c == ',' || c_isspace (c)); /* Read in the identifier. */ do @@ -972,8 +967,8 @@ scan_c_stream (FILE *infile) fatal ("identifier too long"); c = getc (infile); } - while (! (c == ',' || c == ' ' || c == '\t' - || c == '\n' || c == '\r')); + while (! (c == ',' || c_isspace (c))); + input_buffer[i] = '\0'; memcpy (name, input_buffer, i + 1); @@ -981,7 +976,8 @@ scan_c_stream (FILE *infile) { do c = getc (infile); - while (c == ' ' || c == '\t' || c == '\n' || c == '\r'); + while (c_isspace (c)); + if (c != '"') continue; c = read_c_string_or_comment (infile, -1, false, 0); @@ -1022,7 +1018,8 @@ scan_c_stream (FILE *infile) int scanned = 0; do c = getc (infile); - while (c == ' ' || c == '\n' || c == '\r' || c == '\t'); + while (c_isspace (c)); + if (c < 0) goto eof; ungetc (c, infile); @@ -1072,7 +1069,7 @@ scan_c_stream (FILE *infile) int d = getc (infile); if (d == EOF) goto eof; - while (1) + while (true) { if (c == '*' && d == '/') break; @@ -1087,13 +1084,14 @@ scan_c_stream (FILE *infile) if (c == EOF) goto eof; } - while (c == ' ' || c == '\n' || c == '\r' || c == '\t'); + while (c_isspace (c)); + /* Check for 'attributes:' token. */ if (c == 'a' && stream_match (infile, "ttributes:")) { char *p = input_buffer; /* Collect attributes up to ')'. */ - while (1) + while (true) { c = getc (infile); if (c == EOF) @@ -1115,7 +1113,7 @@ scan_c_stream (FILE *infile) continue; } - while (c == ' ' || c == '\n' || c == '\r' || c == '\t') + while (c_isspace (c)) c = getc (infile); if (c == '"') @@ -1125,17 +1123,18 @@ scan_c_stream (FILE *infile) c = getc (infile); if (c == ',') { - c = getc (infile); - while (c == ' ' || c == '\n' || c == '\r' || c == '\t') + do c = getc (infile); - while ((c >= 'a' && c <= 'z') || (c >= 'Z' && c <= 'Z')) + while (c_isspace (c)); + + while (c_isalpha (c)) c = getc (infile); if (c == ':') { doc_keyword = true; - c = getc (infile); - while (c == ' ' || c == '\n' || c == '\r' || c == '\t') + do c = getc (infile); + while (c_isspace (c)); } } @@ -1186,8 +1185,14 @@ scan_c_stream (FILE *infile) /* Copy arguments into ARGBUF. */ *p++ = c; do - *p++ = c = getc (infile); + { + c = getc (infile); + if (c < 0) + goto eof; + *p++ = c; + } while (c != ')'); + *p = '\0'; /* Output them. */ fputs ("\n\n", stdout); @@ -1243,25 +1248,32 @@ scan_c_stream (FILE *infile) static void skip_white (FILE *infile) { - char c = ' '; - while (c == ' ' || c == '\t' || c == '\n' || c == '\r') + int c; + do c = getc (infile); + while (c_isspace (c)); + ungetc (c, infile); } static void read_lisp_symbol (FILE *infile, char *buffer) { - char c; + int c; char *fillp = buffer; skip_white (infile); - while (1) + while (true) { c = getc (infile); if (c == '\\') - *(++fillp) = getc (infile); - else if (c == ' ' || c == '\t' || c == '\n' || c == '\r' || c == '(' || c == ')') + { + c = getc (infile); + if (c < 0) + return; + *fillp++ = c; + } + else if (c_isspace (c) || c == '(' || c == ')' || c < 0) { ungetc (c, infile); *fillp = 0; @@ -1381,7 +1393,7 @@ scan_lisp_file (const char *filename, const char *mode) /* Read the length. */ while ((c = getc (infile), - c >= '0' && c <= '9')) + c_isdigit (c))) { if (INT_MULTIPLY_WRAPV (length, 10, &length) || INT_ADD_WRAPV (length, c - '0', &length) @@ -1413,7 +1425,7 @@ scan_lisp_file (const char *filename, const char *mode) while (c == '\n' || c == '\r') c = getc (infile); /* Skip the following line. */ - while (c != '\n' && c != '\r') + while (! (c == '\n' || c == '\r' || c < 0)) c = getc (infile); } continue; @@ -1451,7 +1463,7 @@ scan_lisp_file (const char *filename, const char *mode) continue; } else - while (c != ')') + while (! (c == ')' || c < 0)) c = getc (infile); skip_white (infile); @@ -1595,7 +1607,8 @@ scan_lisp_file (const char *filename, const char *mode) } } skip_white (infile); - if ((c = getc (infile)) != '\"') + c = getc (infile); + if (c != '\"') { fprintf (stderr, "## autoload of %s unparsable (%s)\n", buffer, filename); commit d6e78de50bac51da6927ca511cca2d6a176793bb Author: Glenn Morris Date: Thu Mar 1 17:48:21 2018 -0500 * lisp/vc/add-log.el (add-change-log-entry): Replace obsolete alias. diff --git a/lisp/vc/add-log.el b/lisp/vc/add-log.el index 773930f32f..cbfd10affd 100644 --- a/lisp/vc/add-log.el +++ b/lisp/vc/add-log.el @@ -898,7 +898,7 @@ non-nil, otherwise in local time." (insert (if use-hard-newlines hard-newline "\n") (if use-hard-newlines hard-newline "\n")) (forward-line -2) - (indent-relative-maybe)) + (indent-relative-first-indent-point)) (t ;; Make a new item. (while (looking-at "\\sW") commit e58f9a45d6a31be4ca379e10a866766e0993f49e Author: Glenn Morris Date: Thu Mar 1 17:37:10 2018 -0500 * lisp/emulation/viper-ex.el (ex-cmd-read-exit): Silence compiler. diff --git a/lisp/emulation/viper-ex.el b/lisp/emulation/viper-ex.el index 347e66f8ff..d95a828614 100644 --- a/lisp/emulation/viper-ex.el +++ b/lisp/emulation/viper-ex.el @@ -548,9 +548,13 @@ reversed." (setq viper-ex-work-buf (get-buffer-create viper-ex-work-buf-name)) (set-buffer viper-ex-work-buf) (goto-char (point-max))) - (cond ((looking-back quit-regex1) (exit-minibuffer)) - ((looking-back stay-regex) (insert " ")) - ((looking-back quit-regex2) (exit-minibuffer)) + (cond ((looking-back quit-regex1 (line-beginning-position)) + (exit-minibuffer)) + ;; Almost certainly point-min should be line-beginning-position, + ;; but probably the two are identical anyway, and who really cares? + ((looking-back stay-regex (point-min)) (insert " ")) + ((looking-back quit-regex2 (line-beginning-position)) + (exit-minibuffer)) (t (insert " "))))) (declare-function viper-tmp-insert-at-eob "viper-cmd" (msg)) commit da185080290e5f3c9bc589a6ebb87e136894a020 Author: Glenn Morris Date: Thu Mar 1 13:11:29 2018 -0500 Quieten defun-mh compilation * lisp/mh-e/mh-acros.el (defun-mh): Rewrite so the compiler can see it always defines target function. diff --git a/lisp/mh-e/mh-acros.el b/lisp/mh-e/mh-acros.el index ac31127ce6..fb8a16bd81 100644 --- a/lisp/mh-e/mh-acros.el +++ b/lisp/mh-e/mh-acros.el @@ -90,9 +90,10 @@ loads \"cl\" appropriately." "Create function NAME. If FUNCTION exists, then NAME becomes an alias for FUNCTION. Otherwise, create function NAME with ARG-LIST and BODY." - `(if (fboundp ',function) - (defalias ',name ',function) - (defun ,name ,arg-list ,@body))) + `(defalias ',name + (if (fboundp ',function) + ',function + (lambda ,arg-list ,@body)))) (put 'defun-mh 'lisp-indent-function 'defun) (put 'defun-mh 'doc-string-elt 4) commit 321e1a61e12bfb24554e0795a57fe77b49706635 Author: Glenn Morris Date: Thu Mar 1 13:10:37 2018 -0500 Quieten mh-compat compilation * lisp/mh-e/mh-compat.el (mh-assoc-string) (mh-replace-regexp-in-string): Silence compiler warnings. diff --git a/lisp/mh-e/mh-compat.el b/lisp/mh-e/mh-compat.el index 2307812736..ffeb6937f7 100644 --- a/lisp/mh-e/mh-compat.el +++ b/lisp/mh-e/mh-compat.el @@ -65,7 +65,8 @@ Simulate NOERROR argument in XEmacs which lacks it." Case is ignored if CASE-FOLD is non-nil. This function is used by Emacs versions that lack `assoc-string', introduced in Emacs 22." - (if case-fold + ;; Test for fboundp is solely to silence compiler for Emacs >= 22.1. + (if (and case-fold (fboundp 'assoc-ignore-case)) (assoc-ignore-case key list) (assoc key list))) @@ -307,7 +308,8 @@ This function is used by XEmacs that lacks `replace-regexp-in-string'. The function `replace-in-string' is used instead. The arguments FIXEDCASE, SUBEXP, and START, used by `replace-in-string' are ignored." - (replace-in-string string regexp rep literal)) + (if (featurep 'xemacs) ; silence Emacs compiler + (replace-in-string string regexp rep literal))) (defun-mh mh-test-completion test-completion (string collection &optional predicate) commit c16ef04f83965ad43e64e14f362c4182f4e59330 Author: Glenn Morris Date: Thu Mar 1 13:08:47 2018 -0500 Simplify mh-thread-set-tables * lisp/mh-e/mh-thread.el (mh-thread-set-tables): Rewrite to simplify and remove compiler warning. diff --git a/lisp/mh-e/mh-thread.el b/lisp/mh-e/mh-thread.el index 41a79b6f0b..ff8e6602e5 100644 --- a/lisp/mh-e/mh-thread.el +++ b/lisp/mh-e/mh-thread.el @@ -647,20 +647,17 @@ Only information about messages in MSG-LIST are added to the tree." (defun mh-thread-set-tables (folder) "Use the tables of FOLDER in current buffer." - (mh-flet - ((mh-get-table (symbol) - (with-current-buffer folder - (symbol-value symbol)))) - (setq mh-thread-id-hash (mh-get-table 'mh-thread-id-hash)) - (setq mh-thread-subject-hash (mh-get-table 'mh-thread-subject-hash)) - (setq mh-thread-id-table (mh-get-table 'mh-thread-id-table)) - (setq mh-thread-id-index-map (mh-get-table 'mh-thread-id-index-map)) - (setq mh-thread-index-id-map (mh-get-table 'mh-thread-index-id-map)) - (setq mh-thread-scan-line-map (mh-get-table 'mh-thread-scan-line-map)) - (setq mh-thread-subject-container-hash - (mh-get-table 'mh-thread-subject-container-hash)) - (setq mh-thread-duplicates (mh-get-table 'mh-thread-duplicates)) - (setq mh-thread-history (mh-get-table 'mh-thread-history)))) + (dolist (v '(mh-thread-id-hash + mh-thread-subject-hash + mh-thread-id-table + mh-thread-id-index-map + mh-thread-index-id-map + mh-thread-scan-line-map + mh-thread-subject-container-hash + mh-thread-duplicates + mh-thread-history)) + ;; Emacs >= 22.1: (buffer-local-value v folder). + (set v (with-current-buffer folder (symbol-value v))))) (defun mh-thread-process-in-reply-to (reply-to-header) "Extract message id's from REPLY-TO-HEADER. commit 02a71e6c2f2e0e17756ef4d040453d96637d76c7 Author: Glenn Morris Date: Thu Mar 1 13:07:42 2018 -0500 Use select-message-coding-system in mh-comp * lisp/mh-e/mh-comp.el (mh-send-letter): Use select-message-coding-system. (Bug#30060) diff --git a/lisp/mh-e/mh-comp.el b/lisp/mh-e/mh-comp.el index a9f809cfa1..cfdd2ae5ab 100644 --- a/lisp/mh-e/mh-comp.el +++ b/lisp/mh-e/mh-comp.el @@ -305,17 +305,19 @@ message and scan line." (file-name buffer-file-name) (config mh-previous-window-config) (coding-system-for-write - (if (and (local-variable-p 'buffer-file-coding-system - (current-buffer)) ;XEmacs needs two args - ;; We're not sure why, but buffer-file-coding-system - ;; tends to get set to undecided-unix. - (not (memq buffer-file-coding-system - '(undecided undecided-unix undecided-dos)))) - buffer-file-coding-system - (or (and (boundp 'sendmail-coding-system) sendmail-coding-system) - (and (default-boundp 'buffer-file-coding-system) - (default-value 'buffer-file-coding-system)) - 'iso-latin-1)))) + (if (fboundp 'select-message-coding-system) + (select-message-coding-system) ; Emacs has this since at least 21.1 + (if (and (local-variable-p 'buffer-file-coding-system + (current-buffer)) ;XEmacs needs two args + ;; We're not sure why, but buffer-file-coding-system + ;; tends to get set to undecided-unix. + (not (memq buffer-file-coding-system + '(undecided undecided-unix undecided-dos)))) + buffer-file-coding-system + (or (and (boundp 'sendmail-coding-system) sendmail-coding-system) + (and (default-boundp 'buffer-file-coding-system) + (default-value 'buffer-file-coding-system)) + 'iso-latin-1))))) ;; Older versions of spost do not support -msgid and -mime. (unless mh-send-uses-spost-flag ;; Adding a Message-ID field looks good, makes it easier to search for commit 5fe0387d9c6c968653c0e87ff5b436a6e960b8f4 Author: Eli Zaretskii Date: Thu Mar 1 17:51:25 2018 +0200 Improve the Emacs manual * doc/emacs/xresources.texi (Table of Resources): Mention that some resources are ignored by toolkit builds. * doc/emacs/custom.texi (Key Bindings): Improve indexing. (Bug#30530) diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi index 9ba7e21101..0ffc2a0c30 100644 --- a/doc/emacs/custom.texi +++ b/doc/emacs/custom.texi @@ -1417,6 +1417,8 @@ commands, and @dfn{keymaps}, which record key bindings. It also explains how to customize key bindings, which is done by editing your init file (@pxref{Init Rebinding}). +@cindex reserved key bindings +@cindex keys, reserved Since most modes define their own key bindings, activating a mode might override your custom key bindings. A small number of keys are reserved for user-defined bindings, and should not be used by modes, diff --git a/doc/emacs/xresources.texi b/doc/emacs/xresources.texi index 8d0127f910..db2c6ffafd 100644 --- a/doc/emacs/xresources.texi +++ b/doc/emacs/xresources.texi @@ -138,9 +138,10 @@ specifications. @node Table of Resources @appendixsec Table of X Resources for Emacs - This table lists the X resource names that Emacs recognizes, -excluding those that control the appearance of graphical widgets like -the menu bar: + The table below lists the X resource names that Emacs recognizes. +Note that some of the resources have no effect in Emacs compiled with +various X toolkits (GTK+, Lucid, etc.)---we indicate below when this +is the case. @table @asis @item @code{background} (class @code{Background}) commit 56ab8e3bac9f9cc46ac9f7d4d8f8316310f61498 Author: Eli Zaretskii Date: Thu Mar 1 17:31:21 2018 +0200 * lisp/dired-aux.el (dired-do-create-files): Doc fix. (Bug#30634) diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index 79833eab28..c336103f80 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -1822,7 +1822,8 @@ Optional arg HOW-TO determines how to treat the target. rfn-list - list of the relative names for the marked files. fn-list - list of the absolute names for the marked files. target - the name of the target itself. - The rest of into-dir are optional arguments. + The rest of elements of the list returned by HOW-TO are optional + arguments for the function that is the first element of the list. For any other return value, TARGET is treated as a directory." (or op1 (setq op1 operation)) (let* ((fn-list (dired-get-marked-files nil arg)) commit 8643de540efcd993381e672808e4cb785ed7dcc2 Author: Eli Zaretskii Date: Thu Mar 1 17:20:32 2018 +0200 Remove redundant test in fns.c * src/fns.c (extract_data_from_object): Remove redundant CHECK_BUFFER test. diff --git a/src/fns.c b/src/fns.c index ff1c049569..94b9d984f0 100644 --- a/src/fns.c +++ b/src/fns.c @@ -4830,8 +4830,6 @@ extract_data_from_object (Lisp_Object spec, record_unwind_current_buffer (); - CHECK_BUFFER (object); - struct buffer *bp = XBUFFER (object); set_buffer_internal (bp); commit 3ee322a95b5cbefe6d34118158c83debc73314be Author: Glenn Morris Date: Thu Mar 1 07:29:26 2018 -0500 ; Auto-commit of loaddefs files. diff --git a/lisp/ldefs-boot.el b/lisp/ldefs-boot.el index ec238a4757..4ad6b5c4eb 100644 --- a/lisp/ldefs-boot.el +++ b/lisp/ldefs-boot.el @@ -1969,7 +1969,8 @@ result. The overhead of the `lambda's is accounted for. (autoload 'benchmark "benchmark" "\ Print the time taken for REPETITIONS executions of FORM. -Interactively, REPETITIONS is taken from the prefix arg. +Interactively, REPETITIONS is taken from the prefix arg, and +the command prompts for the form to benchmark. For non-interactive use see also `benchmark-run' and `benchmark-run-compiled'. @@ -2927,6 +2928,7 @@ Like `bug-reference-mode', but only buttonize in comments and strings. (put 'byte-compile-dynamic 'safe-local-variable 'booleanp) (put 'byte-compile-disable-print-circle 'safe-local-variable 'booleanp) (put 'byte-compile-dynamic-docstrings 'safe-local-variable 'booleanp) +(put 'byte-compile-error-on-warn 'safe-local-variable 'booleanp) (put 'byte-compile-warnings 'safe-local-variable (lambda (v) (or (symbolp v) (null (delq nil (mapcar (lambda (x) (not (symbolp x))) v)))))) @@ -6192,7 +6194,7 @@ For example, the MH-E package updates this alist as follows: The value of PACKAGE needs to be unique and it needs to match the PACKAGE value appearing in the :package-version keyword. Since -the user might see the value in a error message, a good choice is +the user might see the value in an error message, a good choice is the official name of the package, such as MH-E or Gnus.") (defalias 'customize-changed 'customize-changed-options) @@ -9813,8 +9815,11 @@ the mode if ARG is omitted or nil. Electric Pair mode is a global minor mode. When enabled, typing an open parenthesis automatically inserts the corresponding -closing parenthesis. (Likewise for brackets, etc.). To toggle -the mode in a single buffer, use `electric-pair-local-mode'. +closing parenthesis, and vice versa. (Likewise for brackets, etc.). +If the region is active, the parentheses (brackets, etc.) are +inserted around the region instead. + +To toggle the mode in a single buffer, use `electric-pair-local-mode'. \(fn &optional ARG)" t nil) @@ -9893,7 +9898,8 @@ FUNSYM must be a symbol of a defined function. (autoload 'elp-instrument-list "elp" "\ Instrument, for profiling, all functions in `elp-function-list'. Use optional LIST if provided instead. -If called interactively, read LIST using the minibuffer. +If called interactively, prompt for LIST in the minibuffer; +type \"nil\" to use `elp-function-list'. \(fn &optional LIST)" t nil) @@ -15143,7 +15149,7 @@ file name to `*.gz', and sets `grep-highlight-matches' to `always'. (defalias 'rzgrep 'zrgrep) -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "grep" '("rgrep-" "grep-" "kill-grep"))) +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "grep" '("grep-" "rgrep-" "kill-grep"))) ;;;*** @@ -16525,7 +16531,7 @@ See the documentation for `calendar-holidays' for details.") (autoload 'holidays "holidays" "\ Display the holidays for last month, this month, and next month. If called with an optional prefix argument ARG, prompts for month and year. -This function is suitable for execution in a init file. +This function is suitable for execution in an init file. \(fn &optional ARG)" t nil) @@ -16796,7 +16802,7 @@ Extract iCalendar events from current buffer. This function searches the current buffer for the first iCalendar object, reads it and adds all VEVENT elements to the diary -DIARY-FILE. +DIARY-FILENAME. It will ask for each appointment whether to add it to the diary unless DO-NOT-ASK is non-nil. When called interactively, @@ -16809,7 +16815,7 @@ Return code t means that importing worked well, return code nil means that an error has occurred. Error messages will be in the buffer `*icalendar-errors*'. -\(fn &optional DIARY-FILE DO-NOT-ASK NON-MARKING)" t nil) +\(fn &optional DIARY-FILENAME DO-NOT-ASK NON-MARKING)" t nil) (if (fboundp 'register-definition-prefixes) (register-definition-prefixes "icalendar" '("icalendar-"))) @@ -17335,6 +17341,8 @@ Return the name of a buffer selected. PROMPT is the prompt to give to the user. DEFAULT if given is the default buffer to be selected, which will go to the front of the list. If REQUIRE-MATCH is non-nil, an existing buffer must be selected. +Optional arg PREDICATE if non-nil is a function limiting the +buffers that can be considered. \(fn PROMPT &optional DEFAULT REQUIRE-MATCH PREDICATE)" nil nil) @@ -17913,8 +17921,8 @@ If non-nil this pattern is passed to `imenu--generic-function' to create a buffer index. For example, see the value of `fortran-imenu-generic-expression' -used by `fortran-mode' with `imenu-syntax-alist' set locally to -give the characters which normally have \"symbol\" syntax +used by `fortran-mode' with `imenu-syntax-alist' set locally so that +characters which normally have \"symbol\" syntax are considered to have \"word\" syntax during matching.") (put 'imenu-generic-expression 'risky-local-variable t) @@ -22012,7 +22020,7 @@ QUALITY can be: ;;;### (autoloads nil "mwheel" "mwheel.el" (0 0 0 0)) ;;; Generated autoloads from mwheel.el -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "mwheel" '("mwheel-" "mouse-wheel-"))) +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "mwheel" '("mouse-wheel-" "mwheel-"))) ;;;*** @@ -23246,6 +23254,7 @@ Coloring: ;;;### (autoloads nil "org" "org/org.el" (0 0 0 0)) ;;; Generated autoloads from org/org.el +(push (purecopy '(org 9 1 6)) package--builtin-versions) (autoload 'org-babel-do-load-languages "org" "\ Load the languages defined in `org-babel-load-languages'. @@ -24408,8 +24417,6 @@ activate the package system at any time.") Load Emacs Lisp packages, and activate them. The variable `package-load-list' controls which packages to load. If optional arg NO-ACTIVATE is non-nil, don't activate packages. -If `user-init-file' does not mention `(package-initialize)', add -it to the file. If called as part of loading `user-init-file', set `package-enable-at-startup' to nil, to prevent accidentally loading packages twice. @@ -26421,7 +26428,7 @@ Optional argument FACE specifies the face to do the highlighting. ;;;### (autoloads nil "python" "progmodes/python.el" (0 0 0 0)) ;;; Generated autoloads from progmodes/python.el -(push (purecopy '(python 0 25 2)) package--builtin-versions) +(push (purecopy '(python 0 26 1)) package--builtin-versions) (add-to-list 'auto-mode-alist (cons (purecopy "\\.py[iw]?\\'") 'python-mode)) @@ -29843,13 +29850,6 @@ Like `mail' command, but display mail buffer in another frame. (put 'server-auth-dir 'risky-local-variable t) -(defvar server-name "server" "\ -The name of the Emacs server, if this Emacs process creates one. -The command `server-start' makes use of this. It should not be -changed while a server is running.") - -(custom-autoload 'server-name "server" t) - (autoload 'server-start "server" "\ Allow this Emacs process to be a server for client processes. This starts a server communications subprocess through which client @@ -31725,7 +31725,7 @@ Args are NAME BUFFER HOST PORT. NAME is name for process. It is modified if necessary to make it unique. BUFFER is the buffer (or `buffer-name') to associate with the process. Process output goes at end of that buffer, unless you specify - an output stream or filter function to handle the output. + a filter function to handle the output. BUFFER may be also nil, meaning that this process is not associated with any buffer Third arg is name of the host to connect to, or its IP address. @@ -34063,7 +34063,7 @@ Todo mode revisit this file or, with option file was last visited. If you call this command before you have created any todo file in -the current format, and you have an todo file in old format, it +the current format, and you have a todo file in old format, it will ask you whether to convert that file and show it. Otherwise, calling this command before any todo file exists prompts for a file name and an initial category (defaulting to @@ -34313,6 +34313,27 @@ Discard Tramp from loading remote files. ;;;;;; 0 0)) ;;; Generated autoloads from net/tramp-archive.el +(defvar tramp-archive-enabled (featurep 'dbusbind) "\ +Non-nil when file archive support is available.") + +(defconst tramp-archive-suffixes '("7z" "apk" "ar" "cab" "CAB" "cpio" "deb" "depot" "exe" "iso" "jar" "lzh" "LZH" "msu" "MSU" "mtree" "pax" "rar" "rpm" "shar" "tar" "tbz" "tgz" "tlz" "txz" "warc" "xar" "xpi" "xps" "zip" "ZIP") "\ +List of suffixes which indicate a file archive. +It must be supported by libarchive(3).") + +(defconst tramp-archive-compression-suffixes '("bz2" "gz" "lrz" "lz" "lz4" "lzma" "lzo" "uu" "xz" "Z") "\ +List of suffixes which indicate a compressed file. +It must be supported by libarchive(3).") + +(defmacro tramp-archive-autoload-file-name-regexp nil "\ +Regular expression matching archive file names." `(concat "\\`" "\\(" ".+" "\\." (regexp-opt tramp-archive-suffixes) "\\(?:" "\\." (regexp-opt tramp-archive-compression-suffixes) "\\)*" "\\)" "\\(" "/" ".*" "\\)" "\\'")) + +(defun tramp-register-archive-file-name-handler nil "\ +Add archive file name handler to `file-name-handler-alist'." (when tramp-archive-enabled (add-to-list 'file-name-handler-alist (cons (tramp-archive-autoload-file-name-regexp) 'tramp-autoload-file-name-handler)) (put 'tramp-archive-file-name-handler 'safe-magic t))) + +(add-hook 'after-init-hook 'tramp-register-archive-file-name-handler) + +(add-hook 'tramp-archive-unload-hook (lambda nil (remove-hook 'after-init-hook 'tramp-register-archive-file-name-handler))) + (if (fboundp 'register-definition-prefixes) (register-definition-prefixes "tramp-archive" '("tramp-" "with-parsed-tramp-archive-file-name"))) ;;;*** @@ -35867,7 +35888,10 @@ When called interactively with a prefix argument, prompt for REMOTE-LOCATION. \(fn &optional REMOTE-LOCATION)" t nil) (autoload 'vc-region-history "vc" "\ -Show the history of the region FROM..TO. +Show the history of the region between FROM and TO. + +If called interactively, show the history between point and +mark. \(fn FROM TO)" t nil) commit dde91a37ea6527afabbccc0fd3a6ae830187bc1c Author: Glenn Morris Date: Thu Mar 1 06:26:08 2018 -0500 ; Auto-commit of loaddefs files. diff --git a/lisp/ldefs-boot.el b/lisp/ldefs-boot.el index 4ad8763e84..95d5be7734 100644 --- a/lisp/ldefs-boot.el +++ b/lisp/ldefs-boot.el @@ -1969,7 +1969,8 @@ result. The overhead of the `lambda's is accounted for. (autoload 'benchmark "benchmark" "\ Print the time taken for REPETITIONS executions of FORM. -Interactively, REPETITIONS is taken from the prefix arg. +Interactively, REPETITIONS is taken from the prefix arg, and +the command prompts for the form to benchmark. For non-interactive use see also `benchmark-run' and `benchmark-run-compiled'. @@ -2927,6 +2928,7 @@ Like `bug-reference-mode', but only buttonize in comments and strings. (put 'byte-compile-dynamic 'safe-local-variable 'booleanp) (put 'byte-compile-disable-print-circle 'safe-local-variable 'booleanp) (put 'byte-compile-dynamic-docstrings 'safe-local-variable 'booleanp) +(put 'byte-compile-error-on-warn 'safe-local-variable 'booleanp) (put 'byte-compile-warnings 'safe-local-variable (lambda (v) (or (symbolp v) (null (delq nil (mapcar (lambda (x) (not (symbolp x))) v)))))) @@ -6192,7 +6194,7 @@ For example, the MH-E package updates this alist as follows: The value of PACKAGE needs to be unique and it needs to match the PACKAGE value appearing in the :package-version keyword. Since -the user might see the value in a error message, a good choice is +the user might see the value in an error message, a good choice is the official name of the package, such as MH-E or Gnus.") (defalias 'customize-changed 'customize-changed-options) @@ -9809,8 +9811,11 @@ the mode if ARG is omitted or nil. Electric Pair mode is a global minor mode. When enabled, typing an open parenthesis automatically inserts the corresponding -closing parenthesis. (Likewise for brackets, etc.). To toggle -the mode in a single buffer, use `electric-pair-local-mode'. +closing parenthesis, and vice versa. (Likewise for brackets, etc.). +If the region is active, the parentheses (brackets, etc.) are +inserted around the region instead. + +To toggle the mode in a single buffer, use `electric-pair-local-mode'. \(fn &optional ARG)" t nil) @@ -9889,7 +9894,8 @@ FUNSYM must be a symbol of a defined function. (autoload 'elp-instrument-list "elp" "\ Instrument, for profiling, all functions in `elp-function-list'. Use optional LIST if provided instead. -If called interactively, read LIST using the minibuffer. +If called interactively, prompt for LIST in the minibuffer; +type \"nil\" to use `elp-function-list'. \(fn &optional LIST)" t nil) @@ -16725,7 +16731,7 @@ See the documentation for `calendar-holidays' for details.") (autoload 'holidays "holidays" "\ Display the holidays for last month, this month, and next month. If called with an optional prefix argument ARG, prompts for month and year. -This function is suitable for execution in a init file. +This function is suitable for execution in an init file. \(fn &optional ARG)" t nil) @@ -18113,8 +18119,8 @@ If non-nil this pattern is passed to `imenu--generic-function' to create a buffer index. For example, see the value of `fortran-imenu-generic-expression' -used by `fortran-mode' with `imenu-syntax-alist' set locally to -give the characters which normally have \"symbol\" syntax +used by `fortran-mode' with `imenu-syntax-alist' set locally so that +characters which normally have \"symbol\" syntax are considered to have \"word\" syntax during matching.") (put 'imenu-generic-expression 'risky-local-variable t) @@ -23452,6 +23458,7 @@ Coloring: ;;;### (autoloads nil "org" "org/org.el" (0 0 0 0)) ;;; Generated autoloads from org/org.el +(push (purecopy '(org 9 1 6)) package--builtin-versions) (autoload 'org-babel-do-load-languages "org" "\ Load the languages defined in `org-babel-load-languages'. @@ -31931,7 +31938,7 @@ Args are NAME BUFFER HOST PORT. NAME is name for process. It is modified if necessary to make it unique. BUFFER is the buffer (or `buffer-name') to associate with the process. Process output goes at end of that buffer, unless you specify - an output stream or filter function to handle the output. + a filter function to handle the output. BUFFER may be also nil, meaning that this process is not associated with any buffer Third arg is name of the host to connect to, or its IP address. @@ -34271,7 +34278,7 @@ Todo mode revisit this file or, with option file was last visited. If you call this command before you have created any todo file in -the current format, and you have an todo file in old format, it +the current format, and you have a todo file in old format, it will ask you whether to convert that file and show it. Otherwise, calling this command before any todo file exists prompts for a file name and an initial category (defaulting to @@ -36067,7 +36074,10 @@ When called interactively with a prefix argument, prompt for REMOTE-LOCATION. \(fn &optional REMOTE-LOCATION)" t nil) (autoload 'vc-region-history "vc" "\ -Show the history of the region FROM..TO. +Show the history of the region between FROM and TO. + +If called interactively, show the history between point and +mark. \(fn FROM TO)" t nil) commit 304278c040bf0d98ae614da83e08fb2b4df55218 Author: Michael Albinus Date: Thu Mar 1 09:25:55 2018 +0100 Further improvements on manuals * doc/emacs/xresources.texi: * doc/lispref/display.texi: * doc/lispref/keymaps.texi: * doc/misc/dbus.texi: * doc/misc/efaq-w32.texi: Use "GTK+" where applicable. * doc/emacs/xresources.texi (Resources): Mention several use of "-xrm". (Table of Resources) [verticalScrollBars]: Add reference to Scroll Bars. diff --git a/doc/emacs/xresources.texi b/doc/emacs/xresources.texi index 88bfb8261c..8d0127f910 100644 --- a/doc/emacs/xresources.texi +++ b/doc/emacs/xresources.texi @@ -119,19 +119,19 @@ named @samp{Emacs}. If you write @samp{Emacs} instead of regardless of frame titles and regardless of the name of the executable file. -@item -xrm @var{resource-values} +@item -xrm @var{resource-value} @opindex --xrm -@itemx --xrm=@var{resource-values} +@itemx --xrm=@var{resource-value} @cindex resource values, command-line argument This option specifies X resource values for the present Emacs job. -@var{resource-values} should have the same format that you would use -inside a file of X resources. To include multiple resource -specifications in @var{resource-values}, put a newline between them, -just as you would in a file. You can also use @samp{#include -"@var{filename}"} to include a file full of resource specifications. -Resource values specified with @samp{-xrm} take precedence over all -other resource specifications. +@var{resource-value} should have the same format that you would use +inside a file of X resources. Several @samp{-xrm} options are +possible to include multiple resource specifications. You can also +use @samp{#include "@var{filename}"} as @var{resource-value} to +include a file full of resource specifications. Resource values +specified with @samp{-xrm} take precedence over all other resource +specifications. @end table @end ifnottex @@ -323,7 +323,7 @@ might be useful to turn off XIM on slow X client/server links. @item @code{verticalScrollBars} (class @code{ScrollBars}) Give frames scroll bars on the left if @samp{left}, on the right if -@samp{right}; don't have scroll bars if @samp{off}. +@samp{right}; don't have scroll bars if @samp{off} (@pxref{Scroll Bars}). @ifnottex @item @code{visualClass} (class @code{VisualClass}) @@ -513,7 +513,7 @@ The color for the border shadow, on the top and the left. @end ifnottex @node GTK resources -@appendixsec GTK resources +@appendixsec GTK+ resources @cindex GTK+ resources @cindex resource files for GTK+ @cindex @file{~/.gtkrc-2.0} file @@ -558,7 +558,7 @@ system, see @end menu @node GTK Resource Basics -@appendixsubsec GTK Resource Basics +@appendixsubsec GTK+ Resource Basics In a GTK+ 2 resource file (usually @file{~/.emacs.d/gtkrc}), the simplest kind of a resource setting simply assigns a value to a @@ -616,7 +616,7 @@ widget "*verticalScrollBar*" style "scroll" @end smallexample @node GTK Widget Names -@appendixsubsec GTK widget names +@appendixsubsec GTK+ widget names @cindex GTK+ widget names A GTK+ widget is specified by a @dfn{widget name} and a @dfn{widget @@ -661,7 +661,7 @@ widget "*" style "my_style" @end smallexample @node GTK Names in Emacs -@appendixsubsec GTK Widget Names in Emacs +@appendixsubsec GTK+ Widget Names in Emacs @cindex GTK+ widget names in Emacs @cindex GTK+ widget classes @@ -725,7 +725,7 @@ widget_class "*Menu*" style "my_menu_style" @end smallexample @node GTK styles -@appendixsubsec GTK styles +@appendixsubsec GTK+ styles @cindex GTK+ styles Here is an example of two GTK+ style declarations: diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index 64b8c0a22f..dcd2fcffb4 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi @@ -3292,7 +3292,7 @@ nominal heights and widths would suggest. @defun x-list-fonts name &optional reference-face frame maximum width This function returns a list of available font names that match @var{name}. @var{name} should be a string containing a font name in -either the Fontconfig, GTK, or XLFD format (@pxref{Fonts,,, emacs, The +either the Fontconfig, GTK+, or XLFD format (@pxref{Fonts,,, emacs, The GNU Emacs Manual}). Within an XLFD string, wildcard characters may be used: the @samp{*} character matches any substring, and the @samp{?} character matches any single character. Case is ignored when matching @@ -3550,7 +3550,7 @@ specifications are as follows: @table @code @item :name -The font name (a string), in either XLFD, Fontconfig, or GTK format. +The font name (a string), in either XLFD, Fontconfig, or GTK+ format. @xref{Fonts,,, emacs, The GNU Emacs Manual}. @item :family @@ -5993,7 +5993,7 @@ debugging. @cindex embedded widgets @cindex webkit browser widget - Emacs is able to display native widgets, such as GTK WebKit widgets, + Emacs is able to display native widgets, such as GTK+ WebKit widgets, in Emacs buffers when it was built with the necessary support libraries and is running on a graphical terminal. To test whether Emacs supports display of embedded widgets, check that the diff --git a/doc/lispref/keymaps.texi b/doc/lispref/keymaps.texi index e39db7f6d0..cc2e11e0b6 100644 --- a/doc/lispref/keymaps.texi +++ b/doc/lispref/keymaps.texi @@ -2750,7 +2750,7 @@ If the value is @code{grow-only}, the tool bar expands automatically, but does not contract automatically. To contract the tool bar, the user has to redraw the frame by entering @kbd{C-l}. -If Emacs is built with GTK or Nextstep, the tool bar can only show one +If Emacs is built with GTK+ or Nextstep, the tool bar can only show one line, so this variable has no effect. @end defvar diff --git a/doc/misc/dbus.texi b/doc/misc/dbus.texi index b425bb0c00..5b14382d8b 100644 --- a/doc/misc/dbus.texi +++ b/doc/misc/dbus.texi @@ -1815,7 +1815,7 @@ 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 +if Emacs is linked with the GTK+ toolkit, and it runs in a GTK+-aware environment like Gnome, another connection might already be established. @@ -1837,9 +1837,9 @@ Example: You initialize a connection to the AT-SPI bus on your host: @result{} "unix:abstract=/tmp/dbus-2yzWHOCdSD,guid=a490dd26625870ca1298b6e10000fd7f" -;; If Emacs is built with gtk support, and you run in a GTK enabled +;; 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. +;; connection established by GTK+'s atk bindings. (dbus-init-bus my-bus) @result{} 2 diff --git a/doc/misc/efaq-w32.texi b/doc/misc/efaq-w32.texi index dd5bfd9361..af002d7a28 100644 --- a/doc/misc/efaq-w32.texi +++ b/doc/misc/efaq-w32.texi @@ -316,7 +316,7 @@ file for build instructions. You can run Emacs without any extra steps, but if you want icons in your Start Menu, or for Emacs to detect the image libraries that are already -installed on your system as part of GTK, then you should run the program +installed on your system as part of GTK+, then you should run the program @file{addpm.exe}, which is usually installed into the same @file{bin} directory with @file{emacs.exe}. @@ -2206,10 +2206,10 @@ outdated. Tools available here that are useful for Emacs include: @item GifLib - library to support GIF images. @item Grep - for searching through files with @code{grep}. @item Gzip - used by Emacs to automatically decompress .gz files. -@item Jpeg - library to support JPEG images (also in GTK). +@item Jpeg - library to support JPEG images (also in GTK+). @item Lha - used by @code{archive-mode} to edit .lzh files. -@item LibPng - library to support PNG images (also in GTK). -@item LibTiff - library to support TIFF images (also in GTK). +@item LibPng - library to support PNG images (also in GTK+). +@item LibTiff - library to support TIFF images (also in GTK+). @item Make - used by @code{compile} for building projects (also in MinGW) @item OpenSSL - used by @code{gnus} to talk to servers over SSL. @item Patch - used by @code{ediff-patch-file} and others to apply patches. @@ -2218,21 +2218,21 @@ outdated. Tools available here that are useful for Emacs include: @item Unzip - used by @code{archive-mode} for extracting zip files. @item Xpm - library to support XPM images (bundled with Emacs binaries) @item Zip - used by @code{archive-mode} for editing zip files. -@item Zlib - required by LibPng (also in GTK). +@item Zlib - required by LibPng (also in GTK+). @end itemize @node GTK -@section GTK -@cindex GTK image libraries -@cindex image libraries, GTK -@cindex addpm, using GTK image libraries +@section GTK+ +@cindex GTK+ image libraries +@cindex image libraries, GTK+ +@cindex addpm, using GTK+ image libraries -GTK is a potential source for some of the image libraries that Emacs -requires. GTK is installed along with other ports of GUI software, +GTK+ is a potential source for some of the image libraries that Emacs +requires. GTK+ is installed along with other ports of GUI software, such as the GIMP image editor, and Pidgin instant messenger client. -If GTK is installed when you run @command{addpm}, Emacs will use the +If GTK+ is installed when you run @command{addpm}, Emacs will use the image libraries that it provides, even if they are not on the -@env{PATH}. GTK ships with JPEG, PNG and TIFF support. +@env{PATH}. GTK+ ships with JPEG, PNG and TIFF support. @node Read man pages @section How do I read man pages? commit ca8afa7672b830d6ed570c21599f3eadb0958d79 Author: Paul Eggert Date: Wed Feb 28 16:27:06 2018 -0800 Require a larger stack size for threads on macOS (bug#30364) * src/systhread.c (sys_thread_create) [THREADS_ENABLED && HAVE_PTHREAD && DARWIN_OS]: Require at least 8MB stack size for x64 and 4MB for x86 on macOS. Do not merge to master. diff --git a/src/systhread.c b/src/systhread.c index 4ffb7db143..c4dcc4e906 100644 --- a/src/systhread.c +++ b/src/systhread.c @@ -165,6 +165,15 @@ sys_thread_create (sys_thread_t *thread_ptr, const char *name, if (pthread_attr_init (&attr)) return 0; +#ifdef DARWIN_OS + /* Avoid crash on macOS with deeply nested GC (Bug#30364). */ + size_t stack_size; + size_t required_stack_size = sizeof (void *) * 1024 * 1024; + if (pthread_attr_getstacksize (&attr, &stack_size) == 0 + && stack_size < required_stack_size) + pthread_attr_setstacksize (&attr, required_stack_size); +#endif + if (!pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED)) { result = pthread_create (thread_ptr, &attr, func, arg) == 0; commit d5f6ff99c2b594919931b277a2d94d3a289ca764 Author: Glenn Morris Date: Wed Feb 28 16:55:41 2018 -0500 Quieten without-x org compilation * lisp/org/org.el (image-refresh): * lisp/org/ox-odt.el (clear-image-cache, image-size): Declare. diff --git a/lisp/org/org.el b/lisp/org/org.el index 4e4620549c..2f60a07505 100644 --- a/lisp/org/org.el +++ b/lisp/org/org.el @@ -19316,6 +19316,9 @@ INCLUDE-LINKED is passed to `org-display-inline-images'." (org-toggle-inline-images) (org-toggle-inline-images))) +;; For without-x builds. +(declare-function image-refresh "image" (spec &optional frame)) + (defun org-display-inline-images (&optional include-linked refresh beg end) "Display inline images. @@ -22905,7 +22908,7 @@ matches in paragraphs or comments, use it." (match-string 0) ""))))))))))) -(declare-function message-goto-body "message" ()) +(declare-function message-goto-body "message" (&optional interactive)) (defvar message-cite-prefix-regexp) ; From message.el (defun org-fill-element (&optional justify) diff --git a/lisp/org/ox-odt.el b/lisp/org/ox-odt.el index cdee568fc8..1fc697a6a8 100644 --- a/lisp/org/ox-odt.el +++ b/lisp/org/ox-odt.el @@ -2192,6 +2192,10 @@ SHORT-CAPTION are strings." (org-odt-create-manifest-file-entry media-type target-file) target-file)) +;; For --without-x builds. +(declare-function clear-image-cache "image.c" (&optional filter)) +(declare-function image-size "image.c" (spec &optional pixels frame)) + (defun org-odt--image-size (file info &optional user-width user-height scale dpi embed-as) (let* ((--pixels-to-cms commit e1a26cdad98ae101fe03bd5484974f7db1cbfd59 Author: Glenn Morris Date: Wed Feb 28 15:50:37 2018 -0500 Quieten compilation of octave.el * lisp/progmodes/octave.el (compilation-forget-errors): Re-declare. diff --git a/lisp/progmodes/octave.el b/lisp/progmodes/octave.el index c768d8d6f4..f5d764e16c 100644 --- a/lisp/progmodes/octave.el +++ b/lisp/progmodes/octave.el @@ -1165,6 +1165,8 @@ q: Don't fix\n" func file)) "Face used to highlight function comment block.") (eval-when-compile (require 'texinfo)) +;; Undo the effects of texinfo loading tex-mode loading compile. +(declare-function compilation-forget-errors "compile" ()) (defun octave-font-lock-texinfo-comment () (let ((kws commit 55444a5a7aac77b5f12ff9453b16cb99f6c065f5 Author: Glenn Morris Date: Wed Feb 28 15:20:42 2018 -0500 * configure.ac (with_gconf): Respect --without-all. diff --git a/configure.ac b/configure.ac index 7c1f4ca8e6..d2269d6f35 100644 --- a/configure.ac +++ b/configure.ac @@ -372,7 +372,12 @@ OPTION_DEFAULT_OFF([w32], [use native MS Windows GUI in a Cygwin build]) OPTION_DEFAULT_ON([gpm],[don't use -lgpm for mouse support on a GNU/Linux console]) OPTION_DEFAULT_ON([dbus],[don't compile with D-Bus support]) AC_ARG_WITH([gconf],[AS_HELP_STRING([--with-gconf], -[compile with Gconf support (Gsettings replaces this)])],[],[with_gconf=maybe]) +[compile with Gconf support (Gsettings replaces this)])],[], +[if test $with_features = yes; then +with_gconf=maybe +else +with_gconf=no +fi]) OPTION_DEFAULT_ON([gsettings],[don't compile with GSettings support]) OPTION_DEFAULT_ON([selinux],[don't compile with SELinux support]) OPTION_DEFAULT_ON([gnutls],[don't use -lgnutls for SSL/TLS support]) commit 2f25eae17e6cc11e675a0f938ccb1694ce9c2fd4 Author: Glenn Morris Date: Wed Feb 28 14:35:56 2018 -0500 Quieten eshell compilation * lisp/eshell/em-tramp.el: Require esh-cmd. * lisp/eshell/esh-ext.el: Requie esh-io at runtime too. diff --git a/lisp/eshell/em-tramp.el b/lisp/eshell/em-tramp.el index c45453bf28..004c495490 100644 --- a/lisp/eshell/em-tramp.el +++ b/lisp/eshell/em-tramp.el @@ -26,6 +26,7 @@ ;;; Code: (require 'esh-util) +(require 'esh-cmd) (eval-when-compile (require 'esh-mode) diff --git a/lisp/eshell/esh-ext.el b/lisp/eshell/esh-ext.el index 1bfab23c22..ba5182deb4 100644 --- a/lisp/eshell/esh-ext.el +++ b/lisp/eshell/esh-ext.el @@ -37,8 +37,8 @@ (eval-when-compile (require 'cl-lib) - (require 'esh-io) (require 'esh-cmd)) +(require 'esh-io) (require 'esh-arg) (require 'esh-opt) (require 'esh-proc) commit e8721c384927232d4033052d85e2c6ee7f6173c8 Author: Glenn Morris Date: Wed Feb 28 14:35:47 2018 -0500 * lisp/url/url-handlers.el (mm-charset-to-coding-system): Declare. diff --git a/lisp/url/url-handlers.el b/lisp/url/url-handlers.el index 1fe0af65ff..7d0320cb5b 100644 --- a/lisp/url/url-handlers.el +++ b/lisp/url/url-handlers.el @@ -41,6 +41,9 @@ (declare-function mm-decode-string "mm-bodies" (string charset)) ;; mm-decode loads mail-parse. (declare-function mail-content-type-get "mail-parse" (ct attribute)) +;; mm-decode loads mm-bodies, which loads mm-util. +(declare-function mm-charset-to-coding-system "mm-util" + (charset &optional lbt allow-override silent)) ;; Implementation status ;; --------------------- commit 2a7eeef85683449a4e24b305e8bd69c2a343dc38 Author: Glenn Morris Date: Wed Feb 28 13:55:53 2018 -0500 ; Remove debug code left in previous by mistake diff --git a/lisp/cedet/semantic/bovine/grammar.el b/lisp/cedet/semantic/bovine/grammar.el index 65c856a8ca..1746f3e6ff 100644 --- a/lisp/cedet/semantic/bovine/grammar.el +++ b/lisp/cedet/semantic/bovine/grammar.el @@ -511,7 +511,7 @@ Menu items are appended to the common grammar menu.") ;;; Commentary: ;; ;; This file was generated from " - (if (string-match "\\(OFFadmin/grammars/.*\\.by\\)\\'" infile) + (if (string-match "\\(admin/grammars/.*\\.by\\)\\'" infile) (match-string 1 infile) (concat "admin/grammars/" (if (string-equal lang "scm") "scheme" lang) ".by")) commit 088dfdd5d5fb9cd0e59919c7ea236265a5851d00 Author: Glenn Morris Date: Wed Feb 28 13:44:12 2018 -0500 Fix header comment in generated bovine grammar file * lisp/cedet/semantic/bovine/grammar.el (bovine--make-parser-1): Fix header comment in generated scm-by.el. diff --git a/lisp/cedet/semantic/bovine/grammar.el b/lisp/cedet/semantic/bovine/grammar.el index 0eab01b58b..65c856a8ca 100644 --- a/lisp/cedet/semantic/bovine/grammar.el +++ b/lisp/cedet/semantic/bovine/grammar.el @@ -475,6 +475,7 @@ Menu items are appended to the common grammar menu.") ;; This is with-demoted-errors. (condition-case err (with-current-buffer (find-file-noselect infile) + (setq infile buffer-file-name) (if outdir (setq default-directory outdir)) (semantic-grammar-create-package nil t)) (error (message "%s" (error-message-string err)) nil))) @@ -509,8 +510,12 @@ Menu items are appended to the common grammar menu.") ;;; Commentary: ;; -;; This file was generated from admin/grammars/" - lang ".by. +;; This file was generated from " + (if (string-match "\\(OFFadmin/grammars/.*\\.by\\)\\'" infile) + (match-string 1 infile) + (concat "admin/grammars/" + (if (string-equal lang "scm") "scheme" lang) ".by")) +". ;;; Code: ") commit e8edf4ad60d1ebeb3c8b6fd5196da1cae6546baa Author: Glenn Morris Date: Wed Feb 28 13:39:52 2018 -0500 Quieten cedet "might not be defined at runtime" compile warnings * admin/grammars/scheme.by (semantic-parse-region): * lisp/cedet/ede.el (ede--project-inode): * lisp/cedet/semantic/texi.el (semantic-analyze-context): Declare. diff --git a/admin/grammars/scheme.by b/admin/grammars/scheme.by index ce9fff0286..5ea25508fd 100644 --- a/admin/grammars/scheme.by +++ b/admin/grammars/scheme.by @@ -20,6 +20,11 @@ %package semantic-scm-by %provide semantic/bovine/scm-by +%{ +(declare-function semantic-parse-region "semantic" + (start end &optional nonterminal depth returnonerror)) +} + %languagemode scheme-mode %start scheme diff --git a/lisp/cedet/ede.el b/lisp/cedet/ede.el index 76acf8a941..5bbc2d0f85 100644 --- a/lisp/cedet/ede.el +++ b/lisp/cedet/ede.el @@ -1095,6 +1095,7 @@ Flush the dead projects from the project cache." )) (defvar ede--disable-inode) ;Defined in ede/files.el. +(declare-function ede--project-inode "ede/files" (proj)) (defun ede-global-list-sanity-check () "Perform a sanity check to make sure there are no duplicate projects." diff --git a/lisp/cedet/semantic/texi.el b/lisp/cedet/semantic/texi.el index 9769ae8928..7fe1932479 100644 --- a/lisp/cedet/semantic/texi.el +++ b/lisp/cedet/semantic/texi.el @@ -365,6 +365,8 @@ Optional argument POINT is where to look for the environment." (eval-when-compile (require 'semantic/analyze)) +(declare-function semantic-analyze-context "semantic/analyze") + (define-mode-local-override semantic-analyze-current-context texinfo-mode (point) "Analysis context makes no sense for texinfo. Return nil." commit 3959892419eff45a7006deceddcc1962fdbcc1c9 Merge: 51537b9e49 fd50238748 Author: Glenn Morris Date: Wed Feb 28 09:40:40 2018 -0800 Merge from origin/emacs-26 fd50238 (origin/emacs-26) * doc/lispref/streams.texi (Output Variable... 769ea57 Use "GTK+" where applicable in the manual 5e69219 Document print-escape-control-characters c00fea9 Merge branch 'emacs-26' of git.savannah.gnu.org:/srv/git/emac... a2ab0d0 * doc/emacs/killing.texi (Rectangles): Don't use @key for cha... 6288c3d * lisp/emulation/viper.el: Unbreak it. bf3535e More fixes in the Emacs manual c87d04e Avoid aborts in 'md5' 9743f48 Mark keys consistently in manuals ce557a9 Remove @key{} markups from @kindex entries in manuals 71243f0 * doc/emacs/display.texi (Standard Faces): Fix markup of inde... 7a069f3 Fix @kindex entries in manuals 6218933 Fix @cindex entries in manuals 57c9f12 Merge branch 'emacs-26' of git.sv.gnu.org:/srv/git/emacs into... e415309 Fix @cindex entries in org.texi 560a23e Document reserved keys 105d085 * doc/misc/ebrowse.texi: Use @key{} for keys. Conflicts: doc/misc/tramp.texi etc/NEWS commit fd5023874872dcb559cb7acdca6b019273c9de07 Author: Glenn Morris Date: Wed Feb 28 12:35:44 2018 -0500 * doc/lispref/streams.texi (Output Variables): Fix previous. diff --git a/doc/lispref/streams.texi b/doc/lispref/streams.texi index 4c8a747337..ebd806601e 100644 --- a/doc/lispref/streams.texi +++ b/doc/lispref/streams.texi @@ -784,6 +784,7 @@ printed as backslash sequences by the print functions @code{prin1} and @code{print} that print with quoting. If this variable and @code{print-escape-newlines} are both non-@code{nil}, the latter takes precedences for newlines and formfeeds. +@end defvar @defvar print-escape-nonascii If this variable is non-@code{nil}, then unibyte non-@acronym{ASCII} commit 769ea57734f4b7cdb95a65cf0d7da367f2e1db90 Author: Michael Albinus Date: Wed Feb 28 16:28:11 2018 +0100 Use "GTK+" where applicable in the manual * doc/emacs/display.texi (Standard Faces, Standard Faces): * doc/emacs/emacs.texi (Top): * doc/emacs/files.texi (Visiting): * doc/emacs/frames.texi (Scroll Bars): * doc/emacs/xresources.texi: Use "GTK+" where applicable. diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi index 5ddc3d63e7..312f70e13b 100644 --- a/doc/emacs/display.texi +++ b/doc/emacs/display.texi @@ -656,8 +656,8 @@ This face is used to highlight lazy matches for Isearch and Query Replace (matches other than the current one). @item region This face is used for displaying an active region (@pxref{Mark}). -When Emacs is built with GTK support, its colors are taken from the -current GTK theme. +When Emacs is built with GTK+ support, its colors are taken from the +current GTK+ theme. @item secondary-selection This face is used for displaying a secondary X selection (@pxref{Secondary Selection}). @@ -741,7 +741,7 @@ The @code{:background} attribute of this face specifies the color of the text cursor. @xref{Cursor Display}. @item tooltip This face is used for tooltip text. By default, if Emacs is built -with GTK support, tooltips are drawn via GTK and this face has no +with GTK+ support, tooltips are drawn via GTK+ and this face has no effect. @xref{Tooltips}. @item mouse This face determines the color of the mouse pointer. diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi index 163b6f23d8..df644b9587 100644 --- a/doc/emacs/emacs.texi +++ b/doc/emacs/emacs.texi @@ -1222,8 +1222,8 @@ 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 styles:: What can be customized in a GTK widget. +* GTK Names in Emacs:: GTK+ widgets used by Emacs. +* GTK styles:: What can be customized in a GTK+ widget. Emacs and macOS / GNUstep diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi index d7ca1e9161..f1a7a65a80 100644 --- a/doc/emacs/files.texi +++ b/doc/emacs/files.texi @@ -281,7 +281,7 @@ files. Firstly, when Emacs is built with a suitable GUI toolkit, commands invoked with the mouse (by clicking on the menu bar or tool bar) use the toolkit's standard file selection dialog instead of prompting for the file name in the minibuffer. On GNU/Linux and Unix -platforms, Emacs does this when built with GTK, LessTif, and Motif +platforms, Emacs does this when built with GTK+, LessTif, and Motif toolkits; on MS-Windows and Mac, the GUI version does that by default. For information on how to customize this, see @ref{Dialog Boxes}. diff --git a/doc/emacs/frames.texi b/doc/emacs/frames.texi index 8cc4d649bb..17f6f35a8a 100644 --- a/doc/emacs/frames.texi +++ b/doc/emacs/frames.texi @@ -1001,9 +1001,9 @@ when the entire buffer is visible. @cindex @code{scroll-bar} face The visual appearance of the scroll bars is controlled by the -@code{scroll-bar} face. (Some toolkits, such as GTK and MS-Windows, +@code{scroll-bar} face. (Some toolkits, such as GTK+ and MS-Windows, ignore this face; the scroll-bar appearance there can only be -customized system-wide, for GTK @pxref{GTK resources}). +customized system-wide, for GTK+ @pxref{GTK resources}). @cindex vertical border On graphical frames, vertical scroll bars implicitly serve to separate diff --git a/doc/emacs/xresources.texi b/doc/emacs/xresources.texi index 69832fdb60..88bfb8261c 100644 --- a/doc/emacs/xresources.texi +++ b/doc/emacs/xresources.texi @@ -12,10 +12,10 @@ resources, as is usual for programs that use X. graphical widgets, such as the menu-bar, scroll-bar, and dialog boxes, is determined by @ifnottex -GTK resources, which we will also describe. +GTK+ resources, which we will also describe. @end ifnottex @iftex -GTK resources. +GTK+ resources. @end iftex When Emacs is built without GTK+ support, the appearance of these widgets is determined by additional X resources. @@ -28,7 +28,7 @@ system registry (@pxref{MS-Windows Registry}). * Table of Resources:: Table of specific X resources that affect Emacs. * Lucid Resources:: X resources for Lucid menus. * Motif Resources:: X resources for Motif and LessTif menus. -* GTK resources:: Resources for GTK widgets. +* GTK resources:: Resources for GTK+ widgets. @end menu @node Resources @@ -515,7 +515,7 @@ The color for the border shadow, on the top and the left. @node GTK resources @appendixsec GTK resources @cindex GTK+ resources -@cindex resource files for GTK +@cindex resource files for GTK+ @cindex @file{~/.gtkrc-2.0} file @cindex @file{~/.emacs.d/gtkrc} file @@ -530,7 +530,7 @@ resources are specified in either the file @file{~/.emacs.d/gtkrc} (for Emacs-specific GTK+ resources), or @file{~/.gtkrc-2.0} (for general GTK+ resources). We recommend using @file{~/.emacs.d/gtkrc}, since GTK+ seems to ignore @file{~/.gtkrc-2.0} when running GConf with -GNOME@. Note, however, that some GTK themes may override +GNOME@. Note, however, that some GTK+ themes may override customizations in @file{~/.emacs.d/gtkrc}; there is nothing we can do about this. GTK+ resources do not affect aspects of Emacs unrelated to GTK+ widgets, such as fonts and colors in the main Emacs window; @@ -553,8 +553,8 @@ system, see @menu * 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 styles:: What can be customized in a GTK widget. +* GTK Names in Emacs:: GTK+ widgets used by Emacs. +* GTK styles:: What can be customized in a GTK+ widget. @end menu @node GTK Resource Basics @@ -617,7 +617,7 @@ widget "*verticalScrollBar*" style "scroll" @node GTK Widget Names @appendixsubsec GTK widget names -@cindex GTK widget names +@cindex GTK+ widget names A GTK+ widget is specified by a @dfn{widget name} and a @dfn{widget class}. The widget name refers to a specific widget @@ -662,8 +662,8 @@ widget "*" style "my_style" @node GTK Names in Emacs @appendixsubsec GTK Widget Names in Emacs -@cindex GTK widget names in Emacs -@cindex GTK widget classes +@cindex GTK+ widget names in Emacs +@cindex GTK+ widget classes The GTK+ widgets used by an Emacs frame are listed below: @@ -726,7 +726,7 @@ widget_class "*Menu*" style "my_menu_style" @node GTK styles @appendixsubsec GTK styles -@cindex GTK styles +@cindex GTK+ styles Here is an example of two GTK+ style declarations: commit 51537b9e4937d7853647871dc264f0be9412a9fa Author: Michael Albinus Date: Wed Feb 28 15:10:11 2018 +0100 Some minor Tramp tweaks * lisp/net/tramp-adb.el (tramp-adb-get-ls-command): Fix docstring. * lisp/net/tramp-sh.el (tramp-vc-registered-read-file-names): Quote file. * lisp/net/tramp.el (tramp-handle-substitute-in-file-name): Make it more robust. diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el index cb80506786..7ac61b843f 100644 --- a/lisp/net/tramp-adb.el +++ b/lisp/net/tramp-adb.el @@ -458,7 +458,7 @@ pass to the OPERATION." result))))))))) (defun tramp-adb-get-ls-command (vec) - "Determine `ls' command at its arguments." + "Determine `ls' command and its arguments." (with-tramp-connection-property vec "ls" (tramp-message vec 5 "Finding a suitable `ls' command") (cond diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index ff5d404aaa..f619ac3063 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -962,15 +962,16 @@ busybox awk '{}' Date: Wed Feb 28 15:43:40 2018 +0200 Support PREDICATE in ido-read-buffer * lisp/ido.el (ido-predicate): New variable. (ido-read-buffer): Bind it. (ido-make-buffer-list): Use it. diff --git a/lisp/ido.el b/lisp/ido.el index da0c9d463d..7ff3d6820b 100644 --- a/lisp/ido.el +++ b/lisp/ido.el @@ -1135,6 +1135,9 @@ selected.") (defvar ido-current-directory nil "Current directory for `ido-find-file'.") +(defvar ido-predicate nil + "Current completion predicate.") + (defvar ido-auto-merge-timer nil "Delay timer for auto merge.") @@ -3480,6 +3483,11 @@ it is put to the start of the list." (if ido-temp-list (nconc ido-temp-list ido-current-buffers) (setq ido-temp-list ido-current-buffers)) + (if ido-predicate + (setq ido-temp-list (seq-filter + (lambda (name) + (funcall ido-predicate (cons name (get-buffer name)))) + ido-temp-list))) (if default (setq ido-temp-list (cons default (delete default ido-temp-list)))) @@ -4845,10 +4853,13 @@ Modified from `icomplete-completions'." Return the name of a buffer selected. PROMPT is the prompt to give to the user. DEFAULT if given is the default buffer to be selected, which will go to the front of the list. -If REQUIRE-MATCH is non-nil, an existing buffer must be selected." +If REQUIRE-MATCH is non-nil, an existing buffer must be selected. +Optional arg PREDICATE if non-nil is a function limiting the +buffers that can be considered." (let* ((ido-current-directory nil) (ido-directory-nonreadable nil) (ido-directory-too-big nil) + (ido-predicate predicate) (ido-context-switch-command 'ignore) (buf (ido-read-internal 'buffer prompt 'ido-buffer-history default require-match))) (if (eq ido-exit 'fallback) commit 5e69219fdaf37445e4508c3413084d66057bc99f Author: Paul Eggert Date: Tue Feb 27 20:13:00 2018 -0800 Document print-escape-control-characters * doc/lispref/streams.texi, etc/NEWS: Add doc. diff --git a/doc/lispref/streams.texi b/doc/lispref/streams.texi index 6172392274..4c8a747337 100644 --- a/doc/lispref/streams.texi +++ b/doc/lispref/streams.texi @@ -778,6 +778,13 @@ In the second expression, the local binding of @code{prin1}, but not during the printing of the result. @end defvar +@defvar print-escape-control-characters +If this variable is non-@code{nil}, control characters in strings are +printed as backslash sequences by the print functions @code{prin1} and +@code{print} that print with quoting. If this variable and +@code{print-escape-newlines} are both non-@code{nil}, the latter takes +precedences for newlines and formfeeds. + @defvar print-escape-nonascii If this variable is non-@code{nil}, then unibyte non-@acronym{ASCII} characters in strings are unconditionally printed as backslash sequences diff --git a/etc/NEWS b/etc/NEWS index a8880d0f32..cb4048dee4 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1219,7 +1219,7 @@ backend", which has been updated to benefit from the new UI features. ** Term --- -*** `term-char-mode' now makes its buffer read-only. +*** 'term-char-mode' now makes its buffer read-only. The buffer is made read-only to prevent changes from being made by anything other than the process filter; and movements of point away @@ -1228,8 +1228,8 @@ correct position after each command. This is needed to avoid states which are inconsistent with the state of the terminal understood by the inferior process. -New user options `term-char-mode-buffer-read-only' and -`term-char-mode-point-at-process-mark' control these behaviors, and +New user options 'term-char-mode-buffer-read-only' and +'term-char-mode-point-at-process-mark' control these behaviors, and are non-nil by default. Customize these options to nil if you want the previous behavior. @@ -1746,6 +1746,10 @@ instead of 0.8, to avoid rounding glitches. when a symbol's value is changed. This is used to implement the new debugger command 'debug-on-variable-change'. ++++ +** New variable 'print-escape-control-characters' causes 'prin1' and +'print' to output control characters as backslash sequences. + +++ ** Time conversion functions that accept a time zone rule argument now allow it to be OFFSET or a list (OFFSET ABBR), where the integer commit 108ce84432d597f92637ea74bd0a094224d157de Author: Dmitry Gutov Date: Wed Feb 28 04:03:16 2018 +0200 xref--next-error-function: Move xref's window point * lisp/progmodes/xref.el (xref--next-error-function): Move xref's window point if it's visible. When we don't do that, navigation can start looping after a while. diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index 1c1fc597c5..5a9a7a925a 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -693,6 +693,10 @@ references displayed in the current *xref* buffer." (dotimes (_ n) (setq xref (xref--search-property 'xref-item backward))) (cond (xref + ;; Save the current position (when the buffer is visible, + ;; it gets reset to that window's point from time to time). + (let ((win (get-buffer-window (current-buffer)))) + (and win (set-window-point win (point)))) (xref--show-location (xref-item-location xref) t)) (t (error "No %s xref" (if backward "previous" "next")))))) commit 11c58c4fc495ea4f7bff52ca077fd3e4382aa900 Author: Dmitry Gutov Date: Wed Feb 28 03:38:37 2018 +0200 Fix xref--next-error-function behavior WRT current buffer * lisp/progmodes/xref.el (xref--show-location): Make sure to make the target window selected at the end, and its buffer current (bug#20489). diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index e0f5b2d367..1c1fc597c5 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -501,8 +501,9 @@ SELECT is `quit', also quit the *xref* window." (xref-buffer (current-buffer))) (cond (select (if (eq select 'quit) (quit-window nil nil)) - (with-current-buffer xref-buffer - (select-window (xref--show-pos-in-buf marker buf)))) + (select-window + (with-current-buffer xref-buffer + (xref--show-pos-in-buf marker buf)))) (t (save-selected-window (xref--with-dedicated-window commit 7a8f3311a79d63c221dda6e680747669bb3d555d Author: Stefan Monnier Date: Tue Feb 27 20:47:23 2018 -0500 * lisp/gnus/mm-decode.el: Use lexical-binding and use cl-lib (mm-display-parts): Remove unused arg 'no-default'. Use 'cond'. (mm-display-external): Use closures rather than `(lambda ...). Don't bother with 'lexical-let'. (mm-insert-part): No need for string-to-multibyte now that 'insert' will do that for us now (it used to behave more like string-make-multibyte). (mm-pipe-part): Remove unused var 'name'. (shr-width, shr-content-function, shr-inhibit-images): Declare. (mm-shr): Use a closure rather than `(lambda ...). diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el index e1a0435b55..372b6da44b 100644 --- a/lisp/gnus/mm-decode.el +++ b/lisp/gnus/mm-decode.el @@ -1,4 +1,4 @@ -;;; mm-decode.el --- Functions for decoding MIME things +;;; mm-decode.el --- Functions for decoding MIME things -*- lexical-binding:t -*- ;; Copyright (C) 1998-2018 Free Software Foundation, Inc. @@ -773,15 +773,16 @@ MIME-Version header before proceeding." (insert-buffer-substring obuf beg) (current-buffer)))) -(defun mm-display-parts (handle &optional no-default) - (if (stringp (car handle)) - (mapcar 'mm-display-parts (cdr handle)) - (if (bufferp (car handle)) - (save-restriction - (narrow-to-region (point) (point)) - (mm-display-part handle) - (goto-char (point-max))) - (mapcar 'mm-display-parts handle)))) +(defun mm-display-parts (handle) + (cond + ((stringp (car handle)) (mapcar #'mm-display-parts (cdr handle))) + ((bufferp (car handle)) + (save-restriction + (narrow-to-region (point) (point)) + (mm-display-part handle) + (goto-char (point-max)))) + (t + (mapcar #'mm-display-parts handle)))) (autoload 'mailcap-parse-mailcaps "mailcap") (autoload 'mailcap-mime-info "mailcap") @@ -961,15 +962,15 @@ external if displayed external." mm-external-terminal-program "-e" shell-file-name shell-command-switch command) - `(lambda (process state) - (if (eq 'exit (process-status process)) - (run-at-time - 60.0 nil - (lambda () - (ignore-errors (delete-file ,file)) - (ignore-errors (delete-directory - ,(file-name-directory - file)))))))) + (lambda (process _state) + (if (eq 'exit (process-status process)) + (run-at-time + 60.0 nil + (lambda () + (ignore-errors (delete-file file)) + (ignore-errors (delete-directory + (file-name-directory + file)))))))) (require 'term) (require 'gnus-win) (set-buffer @@ -982,13 +983,13 @@ external if displayed external." (term-char-mode) (set-process-sentinel (get-buffer-process buffer) - `(lambda (process state) - (when (eq 'exit (process-status process)) - (ignore-errors (delete-file ,file)) - (ignore-errors - (delete-directory ,(file-name-directory file))) - (gnus-configure-windows - ',gnus-current-window-configuration)))) + (let ((wc gnus-current-window-configuration)) + (lambda (process _state) + (when (eq 'exit (process-status process)) + (ignore-errors (delete-file file)) + (ignore-errors + (delete-directory (file-name-directory file))) + (gnus-configure-windows wc))))) (gnus-configure-windows 'display-term)) (mm-handle-set-external-undisplayer handle (cons file buffer)) (add-to-list 'mm-temp-files-to-be-deleted file t)) @@ -1032,34 +1033,29 @@ external if displayed external." shell-command-switch command) (set-process-sentinel (get-buffer-process buffer) - (lexical-let ((outbuf outbuf) - (file file) - (buffer buffer) - (command command) - (handle handle)) - (lambda (process state) - (when (eq (process-status process) 'exit) - (run-at-time - 60.0 nil - (lambda () - (ignore-errors (delete-file file)) - (ignore-errors (delete-directory - (file-name-directory file))))) - (when (buffer-live-p outbuf) - (with-current-buffer outbuf - (let ((buffer-read-only nil) - (point (point))) - (forward-line 2) - (let ((start (point))) - (mm-insert-inline - handle (with-current-buffer buffer - (buffer-string))) - (put-text-property start (point) - 'face 'mm-command-output)) - (goto-char point)))) - (when (buffer-live-p buffer) - (kill-buffer buffer))) - (message "Displaying %s...done" command))))) + (lambda (process _state) + (when (eq (process-status process) 'exit) + (run-at-time + 60.0 nil + (lambda () + (ignore-errors (delete-file file)) + (ignore-errors (delete-directory + (file-name-directory file))))) + (when (buffer-live-p outbuf) + (with-current-buffer outbuf + (let ((buffer-read-only nil) + (point (point))) + (forward-line 2) + (let ((start (point))) + (mm-insert-inline + handle (with-current-buffer buffer + (buffer-string))) + (put-text-property start (point) + 'face 'mm-command-output)) + (goto-char point)))) + (when (buffer-live-p buffer) + (kill-buffer buffer))) + (message "Displaying %s...done" command)))) (mm-handle-set-external-undisplayer handle (cons file buffer)) (add-to-list 'mm-temp-files-to-be-deleted file t)) @@ -1170,9 +1166,9 @@ external if displayed external." (goto-char (point-min)))) (defun mm-assoc-string-match (alist type) - (dolist (elem alist) + (cl-dolist (elem alist) (when (string-match (car elem) type) - (return elem)))) + (cl-return elem)))) (defun mm-automatic-display-p (handle) "Say whether the user wants HANDLE to be displayed automatically." @@ -1302,8 +1298,6 @@ are ignored." 'gnus-decoded) (with-current-buffer (mm-handle-buffer handle) (buffer-string))) - ((mm-multibyte-p) - (string-to-multibyte (mm-get-part handle no-cache))) (t (mm-get-part handle no-cache))))) (save-restriction @@ -1448,8 +1442,7 @@ text/html\\(?:;\\s-*charset=\\([^\t\n\r \"'>]+\\)\\)?[^>]*>" nil t) (defun mm-pipe-part (handle &optional cmd) "Pipe HANDLE to a process. Use CMD as the process." - (let ((name (mail-content-type-get (mm-handle-type handle) 'name)) - (command (or cmd + (let ((command (or cmd (read-shell-command "Shell command on MIME part: " mm-last-shell-command)))) (mm-with-unibyte-buffer @@ -1784,6 +1777,9 @@ If RECURSIVE, search recursively." (declare-function shr-insert-document "shr" (dom)) (defvar shr-blocked-images) (defvar shr-use-fonts) +(defvar shr-width) +(defvar shr-content-function) +(defvar shr-inhibit-images) (defun mm-shr (handle) ;; Require since we bind its variables. @@ -1840,10 +1836,11 @@ text/html;\\s-*charset=\\([^\t\n\r \"'>]+\\)[^>]*>" nil t) (mm-convert-shr-links) (mm-handle-set-undisplayer handle - `(lambda () - (let ((inhibit-read-only t)) - (delete-region ,(point-min-marker) - ,(point-max-marker)))))))) + (let ((min (point-min-marker)) + (max (point-max-marker))) + (lambda () + (let ((inhibit-read-only t)) + (delete-region min max)))))))) (defvar shr-image-map) commit c005b089d1997218cba5540d37be0a5dfc2c4e1c Author: Stefan Monnier Date: Tue Feb 27 20:39:06 2018 -0500 * lisp/gnus/mm-extern.el: Use lexical-binding Don't require 'cl'. (mm-extern-anon-ftp): Remove unused var 'mode'. diff --git a/lisp/gnus/mm-extern.el b/lisp/gnus/mm-extern.el index e2f8bd4af3..fbae669ce9 100644 --- a/lisp/gnus/mm-extern.el +++ b/lisp/gnus/mm-extern.el @@ -1,4 +1,4 @@ -;;; mm-extern.el --- showing message/external-body +;;; mm-extern.el --- showing message/external-body -*- lexical-binding:t -*- ;; Copyright (C) 2000-2018 Free Software Foundation, Inc. @@ -24,8 +24,6 @@ ;;; Code: -(eval-when-compile (require 'cl)) - (require 'mm-util) (require 'mm-decode) (require 'mm-url) @@ -33,13 +31,13 @@ (defvar gnus-article-mime-handles) (defvar mm-extern-function-alist - '((local-file . mm-extern-local-file) - (url . mm-extern-url) - (anon-ftp . mm-extern-anon-ftp) - (ftp . mm-extern-ftp) -;;; (tftp . mm-extern-tftp) - (mail-server . mm-extern-mail-server) -;;; (afs . mm-extern-afs)) + `((local-file . ,#'mm-extern-local-file) + (url . ,#'mm-extern-url) + (anon-ftp . ,#'mm-extern-anon-ftp) + (ftp . ,#'mm-extern-ftp) + ;; (tftp . ,#'mm-extern-tftp) + (mail-server . ,#'mm-extern-mail-server) + ;; (afs . ,#'mm-extern-afs)) )) (defvar mm-extern-anonymous "anonymous") @@ -72,7 +70,6 @@ (name (cdr (assq 'name params))) (site (cdr (assq 'site params))) (directory (cdr (assq 'directory params))) - (mode (cdr (assq 'mode params))) (path (concat "/" (or mm-extern-anonymous (read-string (format "ID for %s: " site))) "@" site ":" directory "/" name)) commit 2291d9ae888961ce7e4f22675244f535db54df56 Author: Noam Postavsky Date: Tue Feb 27 19:44:35 2018 -0500 Fix python.el for Emacs 24, bump ELPA version to 0.26.1 (Bug#30633) Since python.el is distributed via GNU ELPA, it should be functional in earlier Emacs versions. Also fix some compile warnings. * lisp/progmodes/python.el: Bump version to 0.26.1. Define `prog-first-column' and `file-local-name' also at compile time, as needed. (inferior-python-mode-hook): Declare for the benefit of Emacs 24.3. (python-nav-end-of-statement): Fix format string for assertion error. (python-shell-tramp-refresh-process-environment): Don't `function' quote a symbol which might not be fbound. (python-mode): Only use prettify-symbols settings if they're bound. diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 530eb2fb95..142e6eb3f3 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -4,7 +4,7 @@ ;; Author: Fabián E. Gallina ;; URL: https://github.com/fgallina/python.el -;; Version: 0.26 +;; Version: 0.26.1 ;; Package-Requires: ((emacs "24.1") (cl-lib "1.0")) ;; Maintainer: emacs-devel@gnu.org ;; Created: Jul 2010 @@ -287,9 +287,20 @@ ;;; 24.x Compat -(unless (fboundp 'prog-first-column) - (defun prog-first-column () - 0)) +(eval-and-compile + (unless (fboundp 'prog-first-column) + (defun prog-first-column () + 0)) + (unless (fboundp 'file-local-name) + (defun file-local-name (file) + "Return the local name component of FILE. +It returns a file name which can be used directly as argument of +`process-file', `start-file-process', or `shell-command'." + (or (file-remote-p file 'localname) file)))) + +;; In Emacs 24.3 and earlier, `define-derived-mode' does not define +;; the hook variable, it only puts documentation on the symbol. +(defvar inferior-python-mode-hook) ;;; Bindings @@ -1509,7 +1520,8 @@ of the statement." ;; narrowing. (cl-assert (> string-start last-string-end) :show-args - "Overlapping strings detected") + " +Overlapping strings detected (start=%d, last-end=%d)") (goto-char string-start) (if (python-syntax-context 'paren) ;; Ended up inside a paren, roll again. @@ -2148,7 +2160,7 @@ of `exec-path'." (defun python-shell-tramp-refresh-process-environment (vec env) "Update VEC's process environment with ENV." ;; Stolen from `tramp-open-connection-setup-interactive-shell'. - (let ((env (append (when (fboundp #'tramp-get-remote-locale) + (let ((env (append (when (fboundp 'tramp-get-remote-locale) ;; Emacs<24.4 compat. (list (tramp-get-remote-locale vec))) (copy-sequence env))) @@ -5381,8 +5393,10 @@ REPORT-FN is Flymake's callback function." "`outline-level' function for Python mode." (1+ (/ (current-indentation) python-indent-offset)))) - (set (make-local-variable 'prettify-symbols-alist) - python--prettify-symbols-alist) + (when (and (boundp 'prettify-symbols-alist) + (boundp 'python--prettify-symbols-alist)) + (set (make-local-variable 'prettify-symbols-alist) + python--prettify-symbols-alist)) (python-skeleton-add-menu-items) commit 4494c4cb63808df8f962e90e5d1ac4cf0d5d2f83 Author: Glenn Morris Date: Tue Feb 27 18:44:35 2018 -0500 * lisp/nxml/nxml-mode.el (nxml-mode): Remove warning due to #'. diff --git a/lisp/nxml/nxml-mode.el b/lisp/nxml/nxml-mode.el index 7dc0be8c8e..1df410e505 100644 --- a/lisp/nxml/nxml-mode.el +++ b/lisp/nxml/nxml-mode.el @@ -493,7 +493,7 @@ Many aspects this mode can be customized using ;; FIXME: Use the fact that we're parsing the document already ;; rather than using regex-based filtering. (setq-local tildify-foreach-region-function - (apply-partially #'tildify-foreach-ignore-environments + (apply-partially 'tildify-foreach-ignore-environments '(("") ("<" . ">")))) (setq-local mode-line-process '((nxml-degraded "/degraded"))) ;; We'll determine the fill prefix ourselves commit e554c0c02b4ca77f0b3aa97ecec0243b19e23320 Author: Glenn Morris Date: Tue Feb 27 18:43:23 2018 -0500 Quieten without-x gnus compilation * lisp/gnus/gnus-group.el (image-load-path-for-library): * lisp/gnus/gnus-sum.el (image-load-path-for-library): * lisp/gnus/message.el (image-load-path-for-library): Declare. * lisp/gnus/gnus-cloud.el (gnus-group-refresh-group): * lisp/gnus/mml.el (image-property): Autoload. diff --git a/lisp/gnus/gnus-cloud.el b/lisp/gnus/gnus-cloud.el index 2693c01dcb..ac5ff7d47c 100644 --- a/lisp/gnus/gnus-cloud.el +++ b/lisp/gnus/gnus-cloud.el @@ -362,6 +362,8 @@ Use old data if FORCE-OLDER is not nil." (interactive) (gnus-cloud-upload-data t)) +(autoload 'gnus-group-refresh-group "gnus-group") + (defun gnus-cloud-upload-data (&optional full) "Upload data (newsrc and files) to the Gnus Cloud. When FULL is t, upload everything, not just a difference from the last full." diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index 48dbc82889..3e655cc56c 100644 --- a/lisp/gnus/gnus-group.el +++ b/lisp/gnus/gnus-group.el @@ -1086,6 +1086,8 @@ See `gmm-tool-bar-from-list' for the format of the list." (defvar image-load-path) (defvar tool-bar-map) +(declare-function image-load-path-for-library "image" + (library image &optional path no-error)) (defun gnus-group-make-tool-bar (&optional force) "Make a group mode tool bar from `gnus-group-tool-bar'. diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index b6e9ea91b6..a28c00be94 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -2944,6 +2944,8 @@ See `gmm-tool-bar-from-list' for the format of the list." (defvar image-load-path) (defvar tool-bar-map) +(declare-function image-load-path-for-library "image" + (library image &optional path no-error)) (defun gnus-summary-make-tool-bar (&optional force) "Make a summary mode tool bar from `gnus-summary-tool-bar'. diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 4f4ec3b408..e452c80e26 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -7854,6 +7854,8 @@ See `gmm-tool-bar-from-list' for the format of the list." :group 'message) (defvar image-load-path) +(declare-function image-load-path-for-library "image" + (library image &optional path no-error)) (defun message-make-tool-bar (&optional force) "Make a message mode tool bar from `message-tool-bar-list'. diff --git a/lisp/gnus/mml.el b/lisp/gnus/mml.el index 3c9476333f..38be0dc4e4 100644 --- a/lisp/gnus/mml.el +++ b/lisp/gnus/mml.el @@ -548,6 +548,9 @@ be \"related\" or \"alternate\"." ">"))))))) cont)))) +(autoload 'image-property "image") + +;; FIXME presumably (built-in) ImageMagick could replace exiftool? (defun mml--possibly-alter-image (file-name image) (if (or (null image) (not (consp image)) commit 450b0d1c0dabc2a9f4a5e63db87590e9681b9319 Author: Juri Linkov Date: Tue Feb 27 23:38:04 2018 +0200 * lisp/simple.el (next-error-find-buffer-function): Set default to #'ignore. (next-error-find-buffer): Don't check next-error-find-buffer-function for nil. (Bug#20489) diff --git a/lisp/simple.el b/lisp/simple.el index 2101cfe833..edcb73ce2e 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -170,11 +170,11 @@ rejected, and the function returns nil." (and extra-test-inclusive (funcall extra-test-inclusive)))))) -(defcustom next-error-find-buffer-function nil +(defcustom next-error-find-buffer-function #'ignore "Function called to find a `next-error' capable buffer." :type '(choice (const :tag "Single next-error capable buffer on selected frame" next-error-buffer-on-selected-frame) - (const :tag "No default" nil) + (const :tag "No default" ignore) (function :tag "Other function")) :group 'next-error :version "27.1") @@ -212,10 +212,9 @@ that would normally be considered usable. If it returns nil, that buffer is rejected." (or ;; 1. If a customizable function returns a buffer, use it. - (when next-error-find-buffer-function - (funcall next-error-find-buffer-function avoid-current - extra-test-inclusive - extra-test-exclusive)) + (funcall next-error-find-buffer-function avoid-current + extra-test-inclusive + extra-test-exclusive) ;; 2. If next-error-last-buffer is an acceptable buffer, use that. (if (and next-error-last-buffer (next-error-buffer-p next-error-last-buffer avoid-current commit d56b8fa3296c5b1b7abe6cc4048142949a64ac02 Author: Stefan Monnier Date: Tue Feb 27 16:18:30 2018 -0500 * lisp/dired.el (dired-get-filename): Don't string-to-multibyte We don't need to convert manually to multibyte now that Emacs doesn't silently convert (uni)bytes into latin-N chars depending on locale any more. diff --git a/lisp/dired.el b/lisp/dired.el index ef069d2345..1c283c5de3 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -2352,12 +2352,7 @@ Otherwise, an error occurs in these cases." (setq start (match-end 0)))))) ;; Hence we don't need to worry about converting `\\' back to `\'. - (setq file (read (concat "\"" file "\""))) - ;; The above `read' will return a unibyte string if FILE - ;; contains eight-bit-control/graphic characters. - (if (and enable-multibyte-characters - (not (multibyte-string-p file))) - (setq file (string-to-multibyte file))))) + (setq file (read (concat "\"" file "\""))))) (and file (files--name-absolute-system-p file) (setq already-absolute t)) (cond commit 49408d74180da4f682c5aa2d584ea417e27baacd Author: Glenn Morris Date: Tue Feb 27 15:38:47 2018 -0500 Remove last vestiges of obsolete font-lock-face-attributes * lisp/ps-print.el (ps-font-lock-face-attributes): Remove function. (ps-build-reference-face-lists): No longer call ps-font-lock-face-attributes. * lisp/font-lock.el (font-lock-face-attributes): Remove stale declaration. diff --git a/lisp/font-lock.el b/lisp/font-lock.el index 29d3bc5864..0ed94bd0e8 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el @@ -631,10 +631,7 @@ Major/minor modes can set this variable if they know which option applies.") (declare (indent 0) (debug t)) `(let ((inhibit-point-motion-hooks t)) (with-silent-modifications - ,@body))) - ;; - ;; Shut up the byte compiler. - (defvar font-lock-face-attributes)) ; Obsolete but respected if set. + ,@body)))) (defvar-local font-lock-set-defaults nil) ; Whether we have set up defaults. diff --git a/lisp/ps-print.el b/lisp/ps-print.el index 59b37dd0ac..28f93f4e20 100644 --- a/lisp/ps-print.el +++ b/lisp/ps-print.el @@ -4139,48 +4139,6 @@ If EXTENSION is any other symbol, it is ignored." face-bit)) -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Adapted from font-lock: (obsolete stuff) -;; Originally face attributes were specified via `font-lock-face-attributes'. -;; Users then changed the default face attributes by setting that variable. -;; However, we try and be back-compatible and respect its value if set except -;; for faces where M-x customize has been used to save changes for the face. - - -(defun ps-font-lock-face-attributes () - (and (boundp 'font-lock-mode) (symbol-value 'font-lock-mode) - (boundp 'font-lock-face-attributes) - (let ((face-attributes (symbol-value 'font-lock-face-attributes))) - (while face-attributes - (let* ((face-attribute - (car (prog1 face-attributes - (setq face-attributes (cdr face-attributes))))) - (face (car face-attribute))) - ;; Rustle up a `defface' SPEC from a - ;; `font-lock-face-attributes' entry. - (unless (get face 'saved-face) - (let ((foreground (nth 1 face-attribute)) - (background (nth 2 face-attribute)) - (bold-p (nth 3 face-attribute)) - (italic-p (nth 4 face-attribute)) - (underline-p (nth 5 face-attribute)) - face-spec) - (when foreground - (setq face-spec (cons ':foreground - (cons foreground face-spec)))) - (when background - (setq face-spec (cons ':background - (cons background face-spec)))) - (when bold-p - (setq face-spec (append '(:weight bold) face-spec))) - (when italic-p - (setq face-spec (append '(:slant italic) face-spec))) - (when underline-p - (setq face-spec (append '(:underline t) face-spec))) - (custom-declare-face face (list (list t face-spec)) nil) - ))))))) - - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Internal functions and variables @@ -6350,10 +6308,6 @@ If FACE is not a valid face name, use default face." (defun ps-build-reference-face-lists () - ;; Ensure that face database is updated with faces on - ;; `font-lock-face-attributes' (obsolete stuff) - (ps-font-lock-face-attributes) - ;; Now, rebuild reference face lists (setq ps-print-face-alist nil) (if ps-auto-font-detect (mapc 'ps-map-face (face-list)) commit f8df49c3a9522780a04facad1fc11fef3508716b Author: Glenn Morris Date: Tue Feb 27 13:02:02 2018 -0500 Remove free variable warning when compiling viper using .el files * lisp/emulation/viper-cmd.el (viper-saved-mark): Move definition... * lisp/emulation/viper-util.el (viper-saved-mark): ... to here. diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el index fe57535a14..224ce5802c 100644 --- a/lisp/emulation/viper-cmd.el +++ b/lisp/emulation/viper-cmd.el @@ -131,9 +131,6 @@ ;; define viper-vi-command-p (viper-test-com-defun viper-vi-command) -;; Where viper saves mark. This mark is resurrected by m^ -(defvar viper-saved-mark nil) - ;; Contains user settings for vars affected by viper-set-expert-level function. ;; Not a user option. (defvar viper-saved-user-settings nil) diff --git a/lisp/emulation/viper-util.el b/lisp/emulation/viper-util.el index f054040180..9fd68b7a61 100644 --- a/lisp/emulation/viper-util.el +++ b/lisp/emulation/viper-util.el @@ -39,7 +39,6 @@ (defvar ex-unix-type-shell-options) (defvar viper-ex-tmp-buf-name) (defvar viper-syntax-preference) -(defvar viper-saved-mark) (require 'ring) @@ -886,6 +885,9 @@ Otherwise return the normal value." (if (featurep 'xemacs) (mark-marker t) (mark-marker))) +(defvar viper-saved-mark nil + "Where viper saves mark. This mark is resurrected by m^.") + ;; like (set-mark-command nil) but doesn't push twice, if (car mark-ring) ;; is the same as (mark t). (defsubst viper-set-mark-if-necessary () commit c00fea918e1ab387d88fde3ff4950b9f7fe6e04a Merge: a2ab0d0c9b 6288c3d76a Author: Eli Zaretskii Date: Tue Feb 27 19:59:19 2018 +0200 Merge branch 'emacs-26' of git.savannah.gnu.org:/srv/git/emacs into emacs-26 commit a2ab0d0c9bc15d17a51c728a48a2e1799196b1d8 Author: Eli Zaretskii Date: Tue Feb 27 19:58:33 2018 +0200 * doc/emacs/killing.texi (Rectangles): Don't use @key for characters. diff --git a/doc/emacs/killing.texi b/doc/emacs/killing.texi index 35096cdf53..4c47c8b047 100644 --- a/doc/emacs/killing.texi +++ b/doc/emacs/killing.texi @@ -857,7 +857,8 @@ region is active. Unlike the standard region, the region-rectangle can have its corners extended past the end of buffer, or inside stretches of white space -that point normally cannot enter, like the @key{TAB}. +that point normally cannot enter, like in the middle of a TAB +character. @findex rectangle-exchange-point-and-mark @findex exchange-point-and-mark@r{, in rectangle-mark-mode} commit 6288c3d76a4138bd89d148a0d6fc9b29b65eea50 Author: Glenn Morris Date: Tue Feb 27 12:55:04 2018 -0500 * lisp/emulation/viper.el: Unbreak it. Since 2017-03-19, M-x viper failed with function void cl-member-if. Perhaps it isn't used much. diff --git a/lisp/emulation/viper.el b/lisp/emulation/viper.el index 7292fd58c1..13a88ad11f 100644 --- a/lisp/emulation/viper.el +++ b/lisp/emulation/viper.el @@ -300,6 +300,8 @@ ;;; Code: +(require 'cl-lib) + ;; compiler pacifier (defvar mark-even-if-inactive) (defvar quail-mode) commit bf3535ec7a4a9d962df8974ccb51f4a653350391 Author: Eli Zaretskii Date: Tue Feb 27 19:46:06 2018 +0200 More fixes in the Emacs manual * doc/emacs/xresources.texi (Table of Resources, Lucid Resources): Sort the resources. (Lucid Resources): Add cross-references. (GTK Resource Basics): Fix wording. (GTK styles): Add empty lines in a @table. Suggested by Michael Albinus in emacs-manual-bugs@gnu.org. diff --git a/doc/emacs/xresources.texi b/doc/emacs/xresources.texi index 096e747a04..69832fdb60 100644 --- a/doc/emacs/xresources.texi +++ b/doc/emacs/xresources.texi @@ -160,16 +160,16 @@ Width of the frame's external border, in pixels. This has no effect if Emacs is compiled with GTK+ support. @end ifnottex -@item @code{cursorColor} (class @code{Foreground}) -Text cursor color. If this resource is specified when Emacs starts -up, Emacs sets its value as the background color of the @code{cursor} -face (@pxref{Faces}). - @item @code{cursorBlink} (class @code{CursorBlink}) If the value of this resource is @samp{off} or @samp{false} or @samp{0} at startup, Emacs disables Blink Cursor mode (@pxref{Cursor Display}). +@item @code{cursorColor} (class @code{Foreground}) +Text cursor color. If this resource is specified when Emacs starts +up, Emacs sets its value as the background color of the @code{cursor} +face (@pxref{Faces}). + @item @code{font} (class @code{Font}) Font name for the @code{default} face (@pxref{Fonts}). You can also specify a fontset name (@pxref{Fontsets}). @@ -184,6 +184,13 @@ in which case Emacs tries using all available font backends. @item @code{foreground} (class @code{Foreground}) Default foreground color for text. +@item @code{fullscreen} (class @code{Fullscreen}) +The desired fullscreen size. The value can be one of @code{fullboth}, +@code{maximized}, @code{fullwidth} or @code{fullheight}, which +correspond to the command-line options @samp{-fs}, @samp{-mm}, +@samp{-fw}, and @samp{-fh} (@pxref{Window Size X}). Note that this +applies to the initial frame only. + @item @code{geometry} (class @code{Geometry}) Window size and position. The value should be a size and position specification, of the same form as in the @samp{-g} or @@ -193,18 +200,15 @@ The size applies to all frames in the Emacs session, but the position applies only to the initial Emacs frame (or, in the case of a resource for a specific frame name, only that frame). - Be careful not to specify this resource as @samp{emacs*geometry}, as that may affect individual menus as well as the main Emacs frame. -@item @code{fullscreen} (class @code{Fullscreen}) -The desired fullscreen size. The value can be one of @code{fullboth}, -@code{maximized}, @code{fullwidth} or @code{fullheight}, which -correspond to the command-line options @samp{-fs}, @samp{-mm}, -@samp{-fw}, and @samp{-fh} (@pxref{Window Size X}). Note that this -applies to the initial frame only. - @ifnottex +@item @code{horizontalScrollBars} (class @code{ScrollBars}) +If the value of this resource is @samp{off} or @samp{false} or +@samp{0}, Emacs disables Horizontal Scroll Bar mode at startup +(@pxref{Scroll Bars}). + @item @code{iconName} (class @code{Title}) Name to display in the icon. @@ -318,8 +322,8 @@ This is only relevant if your Emacs is built with XIM support. It might be useful to turn off XIM on slow X client/server links. @item @code{verticalScrollBars} (class @code{ScrollBars}) -Give frames scroll bars if @samp{on}; don't have scroll bars if -@samp{off}. +Give frames scroll bars on the left if @samp{left}, on the right if +@samp{right}; don't have scroll bars if @samp{off}. @ifnottex @item @code{visualClass} (class @code{VisualClass}) @@ -346,13 +350,13 @@ resources. @xref{Face Customization}. @cindex Lucid Widget X Resources If Emacs is compiled with the X toolkit support using Lucid widgets, -you can use X resources to customize the appearance of the menu bar, -pop-up menus, and dialog boxes. The resources for the menu bar fall -in the @samp{pane.menubar} class (following, as always, either the -name of the Emacs executable or @samp{Emacs} for all Emacs -invocations). The resources for the pop-up menu are in the -@samp{menu*} class. The resources for dialog boxes are in the -@samp{dialog*} class. +you can use X resources to customize the appearance of the menu bar +(@pxref{Menu Bar}), pop-up menus, and dialog boxes (@pxref{Dialog +Boxes}). The resources for the menu bar fall in the +@samp{pane.menubar} class (following, as always, either the name of +the Emacs executable or @samp{Emacs} for all Emacs invocations). The +resources for the pop-up menu are in the @samp{menu*} class. The +resources for dialog boxes are in the @samp{dialog*} class. For example, to display menu bar entries with the @samp{Courier-12} font (@pxref{Fonts}), write this: @@ -374,12 +378,12 @@ Here is a list of resources for menu bars, pop-up menus, and dialogs: Font for menu item text. @item fontSet Fontset for menu item text. -@item foreground -Foreground color. @item background Background color. @item buttonForeground Foreground color for a selected item. +@item foreground +Foreground color. @ifnottex @item horizontalSpacing Horizontal spacing in pixels between items. Default is 3. @@ -403,14 +407,15 @@ Margin of the menu bar, in characters. Default is 1. If Emacs is compiled with the X toolkit support using Motif or LessTif widgets, you can use X resources to customize the appearance -of the menu bar, pop-up menus, and dialog boxes. However, the -resources are organized differently from Lucid widgets. +of the menu bar (@pxref{Menu Bar}), pop-up menus, and dialog boxes +(@pxref{Dialog Boxes}). However, the resources are organized +differently from Lucid widgets. The resource names for the menu bar are in the @samp{pane.menubar} class, and they must be specified in this form: @smallexample -Emacs.pane.menubar.@var{subwidget}.@var{resource}: @var{value} +Emacs.pane.menubar.@var{subwidget}.@var{resource}: @var{value} @end smallexample @noindent @@ -427,7 +432,7 @@ For example, to specify the font @samp{8x16} for all menu bar items, including submenus, write this: @smallexample -Emacs.pane.menubar.*.fontList: 8x16 +Emacs.pane.menubar.*.fontList: 8x16 @end smallexample Each item in a submenu also has its own name for X resources; for @@ -471,7 +476,7 @@ itself, you must first specify the resource for all of them, then override the value for submenus alone. Here is an example: @smallexample -Emacs.pane.menubar.*.fontList: 8x16 +Emacs.pane.menubar.*.fontList: 9x18 Emacs.pane.menubar.popup_*.fontList: 8x16 @end smallexample @@ -556,7 +561,7 @@ system, see @appendixsubsec GTK Resource Basics In a GTK+ 2 resource file (usually @file{~/.emacs.d/gtkrc}), the -simplest kinds of resource settings simply assign a value to a +simplest kind of a resource setting simply assigns a value to a variable. For example, putting the following line in the resource file changes the font on all GTK+ widgets to @samp{courier-12}: @@ -770,20 +775,24 @@ possible states are: @table @code @item NORMAL This is the default state for widgets. + @item ACTIVE This is the state for a widget that is ready to do something. It is also for the trough of a scroll bar, i.e., @code{bg[ACTIVE] = "red"} sets the scroll bar trough to red. Buttons that have been armed (pressed but not released yet) are in this state. + @item PRELIGHT This is the state for a widget that can be manipulated, when the mouse pointer is over it---for example when the mouse is over the thumb in the scroll bar or over a menu item. When the mouse is over a button that is not pressed, the button is in this state. + @item SELECTED This is the state for data that has been selected by the user. It can be selected text or items selected in a list. This state is not used in Emacs. + @item INSENSITIVE This is the state for widgets that are visible, but they cannot be manipulated in the usual way---for example, buttons that can't be @@ -805,14 +814,14 @@ dialog. @item bg_pixmap[@var{state}] = "@var{pixmap}" This specifies an image background (instead of a background color). -@var{pixmap} should be the image file name. GTK can use a number of +@var{pixmap} should be the image file name. GTK+ can use a number of image file formats, including XPM, XBM, GIF, JPEG and PNG@. If you want a widget to use the same image as its parent, use @samp{}. If you don't want any image, use @samp{}. @samp{} is the way to cancel a background image inherited from a parent style. -You can't specify the file by its absolute file name. GTK looks for +You can't specify the file by its absolute file name. GTK+ looks for the pixmap file in directories specified in @code{pixmap_path}. @code{pixmap_path} is a colon-separated list of directories within double quotes, specified at the top level in a @file{gtkrc} file commit e7a5b1bb671f0bc1c4dfbbbfc7b5ba1de1f39897 Author: Aaron Jensen Date: Tue Feb 27 09:15:40 2018 -0800 Require a larger stack size for threads (bug#30364) * src/systhread.c (sys_thread_create) [THREADS_ENABLED && HAVE_PTHREAD]: Require at least 8MB stack size for x64 and 4MB for x86. diff --git a/src/systhread.c b/src/systhread.c index 3f162a2bcb..e972ed398a 100644 --- a/src/systhread.c +++ b/src/systhread.c @@ -177,6 +177,13 @@ sys_thread_create (sys_thread_t *thread_ptr, const char *name, if (pthread_attr_init (&attr)) return 0; + /* Avoid crash on macOS with deeply nested GC (Bug#30364). */ + size_t stack_size; + size_t required_stack_size = sizeof (void *) * 1024 * 1024; + if (pthread_attr_getstacksize (&attr, &stack_size) == 0 + && stack_size < required_stack_size) + pthread_attr_setstacksize (&attr, required_stack_size); + if (!pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED)) { result = pthread_create (thread_ptr, &attr, func, arg) == 0; commit b38cb1495d8916ce70785a33fb4dacf64edc904b Author: Paul Eggert Date: Tue Feb 27 09:09:33 2018 -0800 Update from gnulib This includes: 2018-02-27 environ: fix link error on 32-bit Cygwin * doc/misc/texinfo.tex, lib/unistd.in.h: Copy from gnulib. diff --git a/doc/misc/texinfo.tex b/doc/misc/texinfo.tex index c614e02405..0af2f09b52 100644 --- a/doc/misc/texinfo.tex +++ b/doc/misc/texinfo.tex @@ -3,7 +3,7 @@ % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % -\def\texinfoversion{2018-01-09.11} +\def\texinfoversion{2018-02-24.16} % % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, diff --git a/lib/unistd.in.h b/lib/unistd.in.h index 13f4bb6cd1..beeb8e1d6f 100644 --- a/lib/unistd.in.h +++ b/lib/unistd.in.h @@ -400,7 +400,7 @@ _GL_WARN_ON_USE (dup3, "dup3 is unportable - " #if @GNULIB_ENVIRON@ -# if defined __CYGWIN__ +# if defined __CYGWIN__ && !defined __i386__ /* The 'environ' variable is defined in a DLL. Therefore its declaration needs the '__declspec(dllimport)' attribute, but the system's lacks it. This leads to a link error on 64-bit Cygwin when the option commit c87d04e05ebeaf9e72eaa81cbd98fb4910772667 Author: Eli Zaretskii Date: Tue Feb 27 18:44:15 2018 +0200 Avoid aborts in 'md5' * src/fns.c (extract_data_from_object): Don't crash if called with an invalid object. (Bug#30627) diff --git a/src/fns.c b/src/fns.c index aba34fd261..de1dad3736 100644 --- a/src/fns.c +++ b/src/fns.c @@ -4952,6 +4952,9 @@ extract_data_from_object (Lisp_Object spec, #endif } + if (!STRINGP (object)) + signal_error ("Invalid object argument", + NILP (object) ? build_string ("nil") : object); return SSDATA (object); } commit 18ff4be3ea9b402b38a904352f0c819397842c3c Author: Stefan Monnier Date: Tue Feb 27 10:12:36 2018 -0500 * lisp/gnus/mm-util.el: Use lexical-binding and use cl-lib (mm-iso-8859-x-to-15-region): Remove unused var 'charset'. (mm-with-unibyte-buffer, mm-with-multibyte-buffer): Use 'declare'. (mm-with-unibyte-current-buffer): Remove. diff --git a/lisp/gnus/mm-util.el b/lisp/gnus/mm-util.el index 9ff346041d..98f993367e 100644 --- a/lisp/gnus/mm-util.el +++ b/lisp/gnus/mm-util.el @@ -1,4 +1,4 @@ -;;; mm-util.el --- Utility functions for Mule and low level things +;;; mm-util.el --- Utility functions for Mule and low level things -*- lexical-binding:t -*- ;; Copyright (C) 1998-2018 Free Software Foundation, Inc. @@ -23,7 +23,7 @@ ;;; Code: -(eval-when-compile (require 'cl)) +(eval-when-compile (require 'cl-lib)) (require 'mail-prsvr) (require 'timer) @@ -521,7 +521,7 @@ If POS is out of range, the value is nil." enable-multibyte-characters) (defun mm-iso-8859-x-to-15-region (&optional b e) - (let (charset item c inconvertible) + (let (item c inconvertible) (save-restriction (if e (narrow-to-region b e)) (goto-char (point-min)) @@ -597,7 +597,7 @@ charset, and a longer list means no appropriate charset." ;; We're not multibyte, or a single coding system won't cover it. (setq charsets (delete-dups - (mapcar 'mm-mime-charset + (mapcar #'mm-mime-charset (delq 'ascii (mm-find-charset-region b e)))))) (if (and (> (length charsets) 1) @@ -612,40 +612,18 @@ charset, and a longer list means no appropriate charset." charsets)) (defmacro mm-with-unibyte-buffer (&rest forms) - "Create a temporary buffer, and evaluate FORMS there like `progn'. -Use unibyte mode for this." + "Create a temporary unibyte buffer, and evaluate FORMS there like `progn'." + (declare (indent 0) (debug t)) `(with-temp-buffer (mm-disable-multibyte) ,@forms)) -(put 'mm-with-unibyte-buffer 'lisp-indent-function 0) -(put 'mm-with-unibyte-buffer 'edebug-form-spec '(body)) (defmacro mm-with-multibyte-buffer (&rest forms) - "Create a temporary buffer, and evaluate FORMS there like `progn'. -Use multibyte mode for this." + "Create a temporary multibyte buffer, and evaluate FORMS there like `progn'." + (declare (indent 0) (debug t)) `(with-temp-buffer (mm-enable-multibyte) ,@forms)) -(put 'mm-with-multibyte-buffer 'lisp-indent-function 0) -(put 'mm-with-multibyte-buffer 'edebug-form-spec '(body)) - -(defmacro mm-with-unibyte-current-buffer (&rest forms) - "Evaluate FORMS with current buffer temporarily made unibyte. - -Note: We recommend not using this macro any more; there should be -better ways to do a similar thing. The previous version of this macro -bound the default value of `enable-multibyte-characters' to nil while -evaluating FORMS but it is no longer done. So, some programs assuming -it if any may malfunction." - (declare (obsolete nil "25.1") (indent 0) (debug t)) - (let ((multibyte (make-symbol "multibyte"))) - `(let ((,multibyte enable-multibyte-characters)) - (when ,multibyte - (set-buffer-multibyte nil)) - (prog1 - (progn ,@forms) - (when ,multibyte - (set-buffer-multibyte t)))))) (defun mm-find-charset-region (b e) "Return a list of Emacs charsets in the region B to E." @@ -699,21 +677,26 @@ to advanced Emacs features, such as file-name-handlers, format decoding, `find-file-hook', etc. If INHIBIT is non-nil, inhibit `mm-inhibit-file-name-handlers'. This function ensures that none of these modifications will take place." - (letf* ((format-alist nil) - (auto-mode-alist (if inhibit nil (mm-auto-mode-alist))) - ((default-value 'major-mode) 'fundamental-mode) - (enable-local-variables nil) - (after-insert-file-functions nil) - (enable-local-eval nil) - (inhibit-file-name-operation (if inhibit - 'insert-file-contents - inhibit-file-name-operation)) - (inhibit-file-name-handlers - (if inhibit - (append mm-inhibit-file-name-handlers - inhibit-file-name-handlers) - inhibit-file-name-handlers)) - (find-file-hook nil)) + (cl-letf* ((format-alist nil) + ;; FIXME: insert-file-contents doesn't look at auto-mode-alist, + ;; nor at (default-value 'major-mode)! + (auto-mode-alist (if inhibit nil (mm-auto-mode-alist))) + ((default-value 'major-mode) 'fundamental-mode) + ;; FIXME: neither enable-local-variables nor enable-local-eval are + ;; run by insert-file-contents, AFAICT?! + (enable-local-variables nil) + (after-insert-file-functions nil) + (enable-local-eval nil) + (inhibit-file-name-operation (if inhibit + 'insert-file-contents + inhibit-file-name-operation)) + (inhibit-file-name-handlers + (if inhibit + (append mm-inhibit-file-name-handlers + inhibit-file-name-handlers) + inhibit-file-name-handlers)) + ;; FIXME: insert-file-contents doesn't run find-file-hook anyway! + (find-file-hook nil)) (insert-file-contents filename visit beg end replace))) (defun mm-append-to-file (start end filename &optional codesys inhibit) @@ -838,17 +821,18 @@ decompressed data. The buffer's multibyteness must be turned off." prog t (list t err-file) nil args) jka-compr-acceptable-retval-list) (erase-buffer) - (insert (mapconcat 'identity + (insert (mapconcat #'identity (split-string (prog2 (insert-file-contents err-file) (buffer-string) - (erase-buffer)) t) + (erase-buffer)) + t) " ") "\n") (setq err-msg (format "Error while executing \"%s %s < %s\"" - prog (mapconcat 'identity args " ") + prog (mapconcat #'identity args " ") filename))) (setq retval (buffer-string))) (error commit 913bdb3c5a8276dd839f351cb731583b227e853e Author: Michael Albinus Date: Tue Feb 27 15:26:09 2018 +0100 Add ".msu" to Tramp file archives * doc/misc/tramp.texi (Archive file names): * lisp/net/tramp-archive.el (tramp-archive-suffixes): Add ".msu". diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index 5038143f77..f2530cd6ea 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi @@ -3040,13 +3040,20 @@ Java archives @cindex @file{jar} file archive suffix @cindex file archive suffix @file{jar} -@item @samp{.lzh}, @samp{LZH} --- +@item @samp{.lzh}, @samp{.LZH} --- Microsoft Windows compressed LHA archives @cindex @file{lzh} file archive suffix @cindex @file{LZH} file archive suffix @cindex file archive suffix @file{lzh} @cindex file archive suffix @file{LZH} +@item @samp{.msu}, @samp{.MSU} --- +Microsoft Windows Update packages +@cindex @file{msu} file archive suffix +@cindex @file{MSU} file archive suffix +@cindex file archive suffix @file{msu} +@cindex file archive suffix @file{MSU} + @item @samp{.mtree} --- BSD mtree format @cindex @file{mtree} file archive suffix @@ -3072,7 +3079,7 @@ Shell archives @cindex @file{shar} file archive suffix @cindex file archive suffix @file{shar} -@item @samp{.tar}, @samp{tbz}, @samp{tgz}, @samp{tlz}, @samp{txz} --- +@item @samp{.tar}, @samp{.tbz}, @samp{.tgz}, @samp{.tlz}, @samp{.txz} --- (Compressed) tape archives @cindex @file{tar} file archive suffix @cindex @file{tbz} file archive suffix diff --git a/lisp/net/tramp-archive.el b/lisp/net/tramp-archive.el index 2ed803a7dd..87b69767f0 100644 --- a/lisp/net/tramp-archive.el +++ b/lisp/net/tramp-archive.el @@ -59,13 +59,14 @@ ;; * ".exe" - Self extracting Microsoft Windows EXE files ;; * ".iso" - ISO 9660 images ;; * ".jar" - Java archives -;; * ".lzh", "LZH" - Microsoft Windows compressed LHA archives +;; * ".lzh", ".LZH" - Microsoft Windows compressed LHA archives +;; * ".msu", ".MSU" - Microsoft Windows Update packages ;; * ".mtree" - BSD mtree format ;; * ".pax" - Posix archives ;; * ".rar" - RAR archives ;; * ".rpm" - Red Hat packages ;; * ".shar" - Shell archives -;; * ".tar", "tbz", "tgz", "tlz", "txz" - (Compressed) tape archives +;; * ".tar", ".tbz", ".tgz", ".tlz", ".txz" - (Compressed) tape archives ;; * ".warc" - Web archives ;; * ".xar" - macOS XAR archives ;; * ".xpi" - XPInstall Mozilla addons @@ -139,6 +140,7 @@ "iso" ;; ISO 9660 images. "jar" ;; Java archives. Not in libarchive testsuite. "lzh" "LZH" ;; Microsoft Windows compressed LHA archives. + "msu" "MSU" ;; Microsoft Windows Update packages. Not in testsuite. "mtree" ;; BSD mtree format. "pax" ;; Posix archives. "rar" ;; RAR archives. commit 2871de24a35c4ead76fdda6430217c95155a4e64 Author: Glenn Morris Date: Mon Feb 26 23:40:13 2018 -0800 * lisp/dired-aux.el (dired-create-destination-dirs): Doc fix. diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index 6e3e336009..b837fb4e5e 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -1552,7 +1552,7 @@ Special value `always' suppresses confirmation." (defcustom dired-create-destination-dirs nil "Whether Dired should create destination dirs when copying/removing files. If nil, don't create them. -If `always', create them without ask. +If `always', create them without asking. If `ask', ask for user confirmation." :type '(choice (const :tag "Never create non-existent dirs" nil) (const :tag "Always create non-existent dirs" always) commit bc08ffbd2c44668c1653780522d11fb58edf0bd2 Author: Mathieu Othacehe Date: Mon Feb 26 16:43:46 2018 +0100 Add coreutils 'ls' support for tramp adb * lisp/net/tramp-adb.el (tramp-adb-ls-toolbox-regexp): Allow '.' character in file permissions. It indicates an SELinux security context. (tramp-adb-get-ls-command): Detect Coreutils version of 'ls'. Use 'ls -1' instead of passing COLUMNS=1 env variable. This is isofunctional. (Bug#30594) Copyright-paperwork-exempt: yes diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el index f5c45f68e9..cb80506786 100644 --- a/lisp/net/tramp-adb.el +++ b/lisp/net/tramp-adb.el @@ -71,7 +71,7 @@ It is used for TCP/IP devices." (defconst tramp-adb-ls-toolbox-regexp (concat - "^[[:space:]]*\\([-[:alpha:]]+\\)" ; \1 permissions + "^[[:space:]]*\\([-.[:alpha:]]+\\)" ; \1 permissions "\\(?:[[:space:]]+[[:digit:]]+\\)?" ; links (Android 7/toybox) "[[:space:]]*\\([^[:space:]]+\\)" ; \2 username "[[:space:]]+\\([^[:space:]]+\\)" ; \3 group @@ -462,9 +462,15 @@ pass to the OPERATION." (with-tramp-connection-property vec "ls" (tramp-message vec 5 "Finding a suitable `ls' command") (cond + ;; Support Android derived systems where "ls" command is provided + ;; by GNU Coreutils. Force "ls" to print one column and set + ;; time-style to imitate other "ls" flavours. + ((tramp-adb-send-command-and-check + vec "ls --time-style=long-iso /dev/null") + "ls -1 --time-style=long-iso") ;; Can't disable coloring explicitly for toybox ls command. We - ;; must force "ls" to print just one column. - ((tramp-adb-send-command-and-check vec "toybox") "env COLUMNS=1 ls") + ;; also must force "ls" to print just one column. + ((tramp-adb-send-command-and-check vec "toybox") "ls -1") ;; On CyanogenMod based system BusyBox is used and "ls" output ;; coloring is enabled by default. So we try to disable it when ;; possible. commit a566062722a194a7f528867b9a8211a3337d0aa7 Author: Michael Albinus Date: Mon Feb 26 16:23:21 2018 +0100 Fix problem in tramp-handle-substitute-in-file-name * lisp/net/tramp.el (tramp-handle-substitute-in-file-name): Concat "/" only for local file "~". diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 618d026abd..bae039dba1 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -3564,7 +3564,7 @@ support symbolic links." (concat (file-remote-p filename) (substitute-in-file-name localname)))))) ;; "/m:h:~" does not work for completion. We use "/m:h:~/". - (if (string-match "~$" filename) + (if (string-match "^~$" localname) (concat filename "/") filename)))) commit 7c843eedaf087afb95aacff5d11e6e024e30407a Author: Glenn Morris Date: Mon Feb 26 23:11:20 2018 -0800 Remove leading * from two defcustom doc strings * lisp/gnus/mm-util.el (mm-extra-numeric-entities): * lisp/progmodes/cperl-mode.el (cperl-indent-subs-specially): Remove obsolete leading * from defcustom doc string. diff --git a/lisp/gnus/mm-util.el b/lisp/gnus/mm-util.el index fcd97f2b27..9ff346041d 100644 --- a/lisp/gnus/mm-util.el +++ b/lisp/gnus/mm-util.el @@ -431,7 +431,7 @@ mail with multiple parts is preferred to sending a Unicode one.") (#x94 . #x201D) (#x95 . #x2022) (#x96 . #x2013) (#x97 . #x2014) (#x98 . #x02DC) (#x99 . #x2122) (#x9A . #x0161) (#x9B . #x203A) (#x9C . #x0153) (#x9E . #x017E) (#x9F . #x0178))) - "*Alist of extra numeric entities and characters other than ISO 10646. + "Alist of extra numeric entities and characters other than ISO 10646. This table is used for decoding extra numeric entities to characters, like \"€\" to the euro sign, mainly in html messages." :type '(alist :key-type character :value-type character) diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el index a62a974a99..8c0682ac1c 100644 --- a/lisp/progmodes/cperl-mode.el +++ b/lisp/progmodes/cperl-mode.el @@ -267,7 +267,7 @@ Versions 5.2 ... 5.20 behaved as if this were nil." :group 'cperl-indentation-details) (defcustom cperl-indent-subs-specially t - "*Non-nil means indent subs that are inside other blocks (hash values, for example) relative to the beginning of the \"sub\" keyword, rather than relative to the statement that contains the declaration." + "Non-nil means indent subs that are inside other blocks (hash values, for example) relative to the beginning of the \"sub\" keyword, rather than relative to the statement that contains the declaration." :type 'boolean :group 'cperl-indentation-details) commit ea2008aeebaaaca7571dd665d54eeddcd6d2c84c Author: Glenn Morris Date: Mon Feb 26 22:47:27 2018 -0800 Quieten without-x, without-xml2 builds * lisp/help.el (x-display-pixel-height, x-display-pixel-width): * lisp/image.el (image-flush, image-size): * lisp/textmodes/sgml-mode.el (libxml-parse-html-region): Declare for compiler. diff --git a/lisp/help.el b/lisp/help.el index dcf1f32069..e923546032 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -1059,6 +1059,9 @@ is currently activated with completion." (setq minor-modes (cdr minor-modes))))) result)) +(declare-function x-display-pixel-height "xfns.c" (&optional terminal)) +(declare-function x-display-pixel-width "xfns.c" (&optional terminal)) + ;;; Automatic resizing of temporary buffers. (defcustom temp-buffer-max-height (lambda (_buffer) diff --git a/lisp/image.el b/lisp/image.el index b5f2235137..b69bf93054 100644 --- a/lisp/image.el +++ b/lisp/image.el @@ -29,6 +29,7 @@ "Image support." :group 'multimedia) +(declare-function image-flush "image.c" (spec &optional frame)) (defalias 'image-refresh 'image-flush) (defconst image-type-header-regexps @@ -1001,6 +1002,8 @@ default is 20%." (setq new (nconc new (list key val)))))) new))) +(declare-function image-size "image.c" (spec &optional pixels frame)) + (defun image--current-scaling (image new-image) ;; The image may be scaled due to many reasons (:scale, :max-width, ;; etc), so find out what the current scaling is based on the diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el index eb6ebf5280..f6bdfc6384 100644 --- a/lisp/textmodes/sgml-mode.el +++ b/lisp/textmodes/sgml-mode.el @@ -2232,6 +2232,9 @@ buffer's tick counter (as produced by `buffer-modified-tick'), and the CDR is the list of class names found in the buffer.") (make-variable-buffer-local 'html--buffer-ids-cache) +(declare-function libxml-parse-html-region "xml.c" + (start end &optional base-url discard-comments)) + (defun html-current-buffer-classes () "Return a list of class names used in the current buffer. The result is cached in `html--buffer-classes-cache'." commit fe9b612123cbcb74b79c3f8eb4043a1ad3ebb3a6 Author: Glenn Morris Date: Mon Feb 26 17:05:04 2018 -0500 Quieten without-x mwheel.el compilation * lisp/mwheel.el (mwheel-tilt-scroll-p, mwheel-flip-direction) (mwheel-scroll-left-function, mwheel-scroll-right-function) (mouse-wheel-left-event, mouse-wheel-right-event): Move definitions before use. diff --git a/lisp/mwheel.el b/lisp/mwheel.el index 9718ab87d3..cbd7813762 100644 --- a/lisp/mwheel.el +++ b/lisp/mwheel.el @@ -148,6 +148,32 @@ This can be slightly disconcerting, but some people prefer it." :group 'mouse :type 'boolean) +;;; For tilt-scroll +;;; +(defcustom mwheel-tilt-scroll-p nil + "Enable scroll using tilting mouse wheel." + :group 'mouse + :type 'boolean + :version "26.1") + +(defcustom mwheel-flip-direction nil + "Swap direction of 'wheel-right and 'wheel-left." + :group 'mouse + :type 'boolean + :version "26.1") + +(defcustom mwheel-scroll-left-function 'scroll-left + "Function that does the job of scrolling left." + :group 'mouse + :type 'function + :version "26.1") + +(defcustom mwheel-scroll-right-function 'scroll-right + "Function that does the job of scrolling right." + :group 'mouse + :type 'function + :version "26.1") + (eval-and-compile (if (fboundp 'event-button) (fset 'mwheel-event-button 'event-button) @@ -185,6 +211,18 @@ This can be slightly disconcerting, but some people prefer it." (defvar mwheel-scroll-down-function 'scroll-down "Function that does the job of scrolling downward.") +(defvar mouse-wheel-left-event + (if (or (featurep 'w32-win) (featurep 'ns-win)) + 'wheel-left + (intern "mouse-6")) + "Event used for scrolling left.") + +(defvar mouse-wheel-right-event + (if (or (featurep 'w32-win) (featurep 'ns-win)) + 'wheel-right + (intern "mouse-7")) + "Event used for scrolling right.") + (defun mwheel-scroll (event) "Scroll up or down according to the EVENT. This should be bound only to mouse buttons 4, 5, 6, and 7 on @@ -321,45 +359,6 @@ the mode if ARG is omitted or nil." "Enable mouse wheel support." (mouse-wheel-mode (if uninstall -1 1))) - -;;; For tilt-scroll -;;; -(defcustom mwheel-tilt-scroll-p nil - "Enable scroll using tilting mouse wheel." - :group 'mouse - :type 'boolean - :version "26.1") - -(defcustom mwheel-flip-direction nil - "Swap direction of 'wheel-right and 'wheel-left." - :group 'mouse - :type 'boolean - :version "26.1") - -(defcustom mwheel-scroll-left-function 'scroll-left - "Function that does the job of scrolling left." - :group 'mouse - :type 'function - :version "26.1") - -(defcustom mwheel-scroll-right-function 'scroll-right - "Function that does the job of scrolling right." - :group 'mouse - :type 'function - :version "26.1") - -(defvar mouse-wheel-left-event - (if (or (featurep 'w32-win) (featurep 'ns-win)) - 'wheel-left - (intern "mouse-6")) - "Event used for scrolling left.") - -(defvar mouse-wheel-right-event - (if (or (featurep 'w32-win) (featurep 'ns-win)) - 'wheel-right - (intern "mouse-7")) - "Event used for scrolling right.") - (provide 'mwheel) ;;; mwheel.el ends here commit f1b2c2311768f6e5d8ad8e55c1daac37546c2f91 Author: Glenn Morris Date: Mon Feb 26 17:00:41 2018 -0500 * lisp/net/zeroconf.el (dbus-debug): Declare for builds without dbus. diff --git a/lisp/net/zeroconf.el b/lisp/net/zeroconf.el index 351fc9fc30..0a3f2777b9 100644 --- a/lisp/net/zeroconf.el +++ b/lisp/net/zeroconf.el @@ -382,6 +382,8 @@ TYPE. The resulting list has the format ;; `zeroconf-services-hash'. (gethash (concat name "/" type) zeroconf-services-hash nil)) +(defvar dbus-debug) + (defun zeroconf-resolve-service (service) "Return all service attributes SERVICE as list. NAME must be a string. The service must be of service type commit 12a18d01b90839556fb37815874d043aedd24c9f Author: Glenn Morris Date: Mon Feb 26 16:59:42 2018 -0500 Quieten without-x lisp compilation * lisp/international/fontset.el (fontset-alias-alist): * lisp/term/ns-win.el (mouse-wheel-scroll-amount) (mouse-wheel-progressive-speed): Declare for without-x builds. diff --git a/lisp/international/fontset.el b/lisp/international/fontset.el index 6f91207451..4a7b754791 100644 --- a/lisp/international/fontset.el +++ b/lisp/international/fontset.el @@ -1144,6 +1144,8 @@ given from DEFAULT-SPEC." (setcar (cdr elt) spec))) fontlist)) +(defvar fontset-alias-alist) + (defun fontset-name-p (fontset) "Return non-nil if FONTSET is valid as fontset name. A valid fontset name should conform to XLFD (X Logical Font Description) diff --git a/lisp/term/ns-win.el b/lisp/term/ns-win.el index b0d1731857..1c7dd8a63f 100644 --- a/lisp/term/ns-win.el +++ b/lisp/term/ns-win.el @@ -739,6 +739,8 @@ See the documentation of `create-fontset-from-fontset-spec' for the format.") ;;;; macOS 10.7+. (defvar ns-version-string) +(defvar mouse-wheel-scroll-amount) +(defvar mouse-wheel-progressive-speed) ;; FIXME: This doesn't look right. Is there a better way to do this ;; that keeps customize happy? commit 0959c777fd88ec64718c6497505f3fca80409188 Author: Glenn Morris Date: Mon Feb 26 15:41:02 2018 -0500 * lisp/net/rcirc.el (rcirc-prompt-start-marker): Define before using. diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el index 5acbec7dcb..abd969216f 100644 --- a/lisp/net/rcirc.el +++ b/lisp/net/rcirc.el @@ -182,6 +182,8 @@ underneath each nick." :type '(repeat string) :group 'rcirc) +(defvar rcirc-prompt-start-marker nil) + (define-minor-mode rcirc-omit-mode "Toggle the hiding of \"uninteresting\" lines. With a prefix argument ARG, enable Rcirc-Omit mode if ARG is @@ -401,7 +403,6 @@ will be killed." (defvar rcirc-nick nil) -(defvar rcirc-prompt-start-marker nil) (defvar rcirc-prompt-end-marker nil) (defvar rcirc-nick-table nil) commit a55b3fee40a17a0e34eb89c7722ee986b28d8e96 Author: Glenn Morris Date: Mon Feb 26 15:40:02 2018 -0500 * lisp/term/ns-win.el (ns-version-string): Declare for non-ns builds. diff --git a/lisp/term/ns-win.el b/lisp/term/ns-win.el index 7d89ec33a4..b0d1731857 100644 --- a/lisp/term/ns-win.el +++ b/lisp/term/ns-win.el @@ -738,6 +738,8 @@ See the documentation of `create-fontset-from-fontset-spec' for the format.") ;;;; macOS-like defaults for trackpad and mouse wheel scrolling on ;;;; macOS 10.7+. +(defvar ns-version-string) + ;; FIXME: This doesn't look right. Is there a better way to do this ;; that keeps customize happy? (when (featurep 'cocoa) commit 84ea61a838a4be33206c5b2e542d52355d79e187 Author: Glenn Morris Date: Mon Feb 26 13:51:01 2018 -0500 Remove compiler warnings due to #' * lisp/gnus/mm-decode.el (mm-convert-shr-links): * lisp/ps-print.el (ps-print-region-function): Remove compiler warnings due to #'. diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el index 87941b8845..e1a0435b55 100644 --- a/lisp/gnus/mm-decode.el +++ b/lisp/gnus/mm-decode.el @@ -1865,7 +1865,7 @@ text/html;\\s-*charset=\\([^\t\n\r \"'>]+\\)[^>]*>" nil t) ;; Mask keys that launch `widget-button-click'. ;; Those bindings are provided by `widget-keymap' ;; that is a parent of `gnus-article-mode-map'. - (dolist (key (where-is-internal #'widget-button-click widget-keymap)) + (dolist (key (where-is-internal 'widget-button-click widget-keymap)) (unless (lookup-key keymap key) (define-key keymap key #'ignore))) ;; Avoid `shr-next-link' and `shr-previous-link' in `keymap' so diff --git a/lisp/ps-print.el b/lisp/ps-print.el index baf290f4be..59b37dd0ac 100644 --- a/lisp/ps-print.el +++ b/lisp/ps-print.el @@ -1773,7 +1773,7 @@ See `ps-lpr-command'." (defcustom ps-print-region-function (if (memq system-type '(ms-dos windows-nt)) - #'w32-direct-ps-print-region-function + 'w32-direct-ps-print-region-function #'call-process-region) "Specify a function to print the region on a PostScript printer. See definition of `call-process-region' for calling conventions. The fourth commit 2ea62d635dd71ddb3368dd743ea9deb2bd68d34d Author: Glenn Morris Date: Mon Feb 26 13:35:30 2018 -0500 Update some lisp function declarations diff --git a/lisp/gnus/mm-extern.el b/lisp/gnus/mm-extern.el index b7c602030d..e2f8bd4af3 100644 --- a/lisp/gnus/mm-extern.el +++ b/lisp/gnus/mm-extern.el @@ -86,7 +86,7 @@ (let (mm-extern-anonymous) (mm-extern-anon-ftp handle))) -(declare-function message-goto-body "message" ()) +(declare-function message-goto-body "message" (&optional interactive)) (defun mm-extern-mail-server (handle) (require 'message) diff --git a/lisp/mail/hashcash.el b/lisp/mail/hashcash.el index b5fb1aec00..37b2d94e5f 100644 --- a/lisp/mail/hashcash.el +++ b/lisp/mail/hashcash.el @@ -133,7 +133,7 @@ For example, you may want to set this to (\"-Z2\") to reduce header length." (declare-function message-narrow-to-headers-or-head "message" ()) (declare-function message-fetch-field "message" (header &optional not-all)) -(declare-function message-goto-eoh "message" ()) +(declare-function message-goto-eoh "message" (&optional interactive)) (declare-function message-narrow-to-headers "message" ()) (defun hashcash-token-substring () diff --git a/lisp/net/imap.el b/lisp/net/imap.el index 36b96ca10a..2a2ce8b9c9 100644 --- a/lisp/net/imap.el +++ b/lisp/net/imap.el @@ -141,10 +141,10 @@ (require 'rfc2104) ;; Hmm... digest-md5 is not part of Emacs. ;; FIXME: Should/can we use sasl-digest.el instead? -(declare-function digest-md5-parse-digest-challenge "digest-md5") -(declare-function digest-md5-digest-response "digest-md5") -(declare-function digest-md5-digest-uri "digest-md5") -(declare-function digest-md5-challenge "digest-md5") +(declare-function digest-md5-parse-digest-challenge "ext:digest-md5") +(declare-function digest-md5-digest-response "ext:digest-md5") +(declare-function digest-md5-digest-uri "ext:digest-md5") +(declare-function digest-md5-challenge "ext:digest-md5") ;; User variables. diff --git a/lisp/term/w32-win.el b/lisp/term/w32-win.el index 28eaeff605..dc57160d04 100644 --- a/lisp/term/w32-win.el +++ b/lisp/term/w32-win.el @@ -392,8 +392,12 @@ See the documentation of `create-fontset-from-fontset-spec' for the format.") (declare-function w32-set-clipboard-data "w32select.c" (string &optional ignored)) -(declare-function w32-get-clipboard-data "w32select.c") -(declare-function w32-selection-exists-p "w32select.c") +(declare-function w32-get-clipboard-data "w32select.c" + (&optional ignored)) +(declare-function w32-selection-exists-p "w32select.c" + (&optional selection terminal)) +(declare-function w32-selection-targets "w32select.c" + (&optional selection terminal)) ;;; Fix interface to (X-specific) mouse.el (defun w32--set-selection (type value) diff --git a/lisp/vc/ediff.el b/lisp/vc/ediff.el index cd2b2c4e62..a5e8022f1c 100644 --- a/lisp/vc/ediff.el +++ b/lisp/vc/ediff.el @@ -153,7 +153,7 @@ (declare-function dired-get-filename "dired" (&optional localp no-error-if-not-filep)) (declare-function dired-get-marked-files "dired" - (&optional localp arg filter distinguish-one-marked)) + (&optional localp arg filter distinguish-one-marked error)) ;; Return a plausible default for ediff's first file: ;; In dired, return the file number FILENO (or 0) in the list commit 25271a63a01f5cfd7983713fb7a67b21c3c72b1c Author: Daniel Colascione Date: Mon Feb 26 09:18:02 2018 -0800 Make bare "make" in src actually build emacs again * src/Makefile.in (all): Move target ahead of dep-file inclusion. diff --git a/src/Makefile.in b/src/Makefile.in index 1f1ae40efe..1d23425969 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -442,6 +442,10 @@ otherobj= $(TERMCAP_OBJ) $(PRE_ALLOC_OBJ) $(GMALLOC_OBJ) $(RALLOC_OBJ) \ FIRSTFILE_OBJ=@FIRSTFILE_OBJ@ ALLOBJS = $(FIRSTFILE_OBJ) $(VMLIMIT_OBJ) $(obj) $(otherobj) +# Must be first, before dep inclusion! +all: emacs$(EXEEXT) $(OTHER_FILES) +.PHONY: all + AUTO_DEPEND = @AUTO_DEPEND@ DEPDIR = deps ifeq ($(AUTO_DEPEND),yes) @@ -452,9 +456,6 @@ else include $(srcdir)/deps.mk endif -all: emacs$(EXEEXT) $(OTHER_FILES) -.PHONY: all - ## This is the list of all Lisp files that might be loaded into the ## dumped Emacs. Some of them are not loaded on all platforms, but ## the DOC file on every platform uses them (because the DOC file is commit 7df482a82065f3c4ea78a4f53462c627fa820860 Author: Paul Eggert Date: Mon Feb 26 08:57:44 2018 -0800 Update from gnulib * build-aux/config.guess, build-aux/config.sub: Copy from gnulib. diff --git a/build-aux/config.guess b/build-aux/config.guess index 9baaa270bf..f50dcdb6de 100755 --- a/build-aux/config.guess +++ b/build-aux/config.guess @@ -2,7 +2,7 @@ # Attempt to guess a canonical system name. # Copyright 1992-2018 Free Software Foundation, Inc. -timestamp='2018-01-26' +timestamp='2018-02-24' # 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 @@ -1046,7 +1046,11 @@ EOF echo "$UNAME_MACHINE"-dec-linux-"$LIBC" exit ;; x86_64:Linux:*:*) - echo "$UNAME_MACHINE"-pc-linux-"$LIBC" + if objdump -f /bin/sh | grep -q elf32-x86-64; then + echo "$UNAME_MACHINE"-pc-linux-"$LIBC"x32 + else + echo "$UNAME_MACHINE"-pc-linux-"$LIBC" + fi exit ;; xtensa*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" diff --git a/build-aux/config.sub b/build-aux/config.sub index 818892c1c3..1d8e98bcee 100755 --- a/build-aux/config.sub +++ b/build-aux/config.sub @@ -2,7 +2,7 @@ # Configuration validation subroutine script. # Copyright 1992-2018 Free Software Foundation, Inc. -timestamp='2018-01-15' +timestamp='2018-02-22' # 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 @@ -1389,7 +1389,8 @@ case $os in | -morphos* | -superux* | -rtmk* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ - | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme*) + | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \ + | -midnightbsd*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) commit 9743f48de7325bd95a42e1a27acbf6635f8d086b Author: Michael Albinus Date: Mon Feb 26 13:53:37 2018 +0100 Mark keys consistently in manuals * doc/emacs/killing.texi: * doc/lispintro/emacs-lisp-intro.texi: * doc/misc/calc.texi: * doc/misc/cc-mode.texi: * doc/misc/dired-x.texi: * doc/misc/ede.texi: * doc/misc/edt.texi: * doc/misc/efaq.texi: * doc/misc/erc.texi: * doc/misc/eshell.texi: * doc/misc/gnus-faq.texi: * doc/misc/gnus-news.texi: * doc/misc/idlwave.texi: * doc/misc/ido.texi: * doc/misc/mairix-el.texi: * doc/misc/message.texi: * doc/misc/mh-e.texi: * doc/misc/newsticker.texi: * doc/misc/org.texi: * doc/misc/pcl-cvs.texi: * doc/misc/ses.texi: * doc/misc/sieve.texi: * doc/misc/smtpmail.texi: * doc/misc/speedbar.texi: * doc/misc/srecode.texi: * doc/misc/vhdl-mode.texi: * doc/misc/vip.texi: * doc/misc/viper.texi: Mark keys consistently. diff --git a/doc/emacs/killing.texi b/doc/emacs/killing.texi index 4118b752e6..35096cdf53 100644 --- a/doc/emacs/killing.texi +++ b/doc/emacs/killing.texi @@ -857,7 +857,7 @@ region is active. Unlike the standard region, the region-rectangle can have its corners extended past the end of buffer, or inside stretches of white space -that point normally cannot enter, like the TAB. +that point normally cannot enter, like the @key{TAB}. @findex rectangle-exchange-point-and-mark @findex exchange-point-and-mark@r{, in rectangle-mark-mode} diff --git a/doc/lispintro/emacs-lisp-intro.texi b/doc/lispintro/emacs-lisp-intro.texi index 7966340821..b79432e719 100644 --- a/doc/lispintro/emacs-lisp-intro.texi +++ b/doc/lispintro/emacs-lisp-intro.texi @@ -13254,7 +13254,7 @@ If you are reading this inside of GNU Emacs and you want to see the whole function, you can type @kbd{C-h f} (@code{describe-function}) and the name of the function. This gives you the function documentation and the name of the library containing the function's -source. Place point over the name of the library and press the RET +source. Place point over the name of the library and press the @key{RET} key; you will be taken directly to the source. (Be sure to install your sources! Without them, you are like a person who tries to drive a car with his eyes shut!) @@ -14739,7 +14739,7 @@ In Emacs 22 "Edit file FILENAME. Switch to a buffer visiting file FILENAME, creating one if none already exists. -Interactively, the default if you just type RET is the current directory, +Interactively, the default if you just type @key{RET} is the current directory, but the visited file name is available through the minibuffer history: type M-n to pull it into the minibuffer. @@ -15917,8 +15917,8 @@ a regular expression, including functions that are not interactive. What we want to look for is some command that prints or inserts columns. Very likely, the name of the function will contain either the word ``print'' or the word ``insert'' or the word ``column''. -Therefore, we can simply type @kbd{M-x apropos RET -print\|insert\|column RET} and look at the result. On my system, this +Therefore, we can simply type @kbd{M-x apropos @key{RET} +print\|insert\|column @key{RET}} and look at the result. On my system, this command once took quite some time, and then produced a list of 79 functions and variables. Now it does not take much time at all and produces a list of 211 functions and variables. Scanning down the @@ -18147,7 +18147,7 @@ You can enter the debugger when you call the function by calling Type: @smallexample -M-x debug-on-entry RET triangle-bugged RET +M-x debug-on-entry @key{RET} triangle-bugged @key{RET} @end smallexample @need 1250 @@ -18255,7 +18255,7 @@ To cancel the effect of @code{debug-on-entry}, call @code{cancel-debug-on-entry} and the name of the function, like this: @smallexample -M-x cancel-debug-on-entry RET triangle-bugged RET +M-x cancel-debug-on-entry @key{RET} triangle-bugged @key{RET} @end smallexample @noindent @@ -18341,7 +18341,7 @@ this by positioning your cursor within or just after the definition and typing @smallexample -M-x edebug-defun RET +M-x edebug-defun @key{RET} @end smallexample @noindent @@ -18552,7 +18552,7 @@ one of those long, but decipherable functions. You can look up In this instance, since the code is Lisp, the @file{*Help*} buffer contains the name of the library containing the function's source. -You can put point over the name of the library and press the RET key, +You can put point over the name of the library and press the @key{RET} key, which in this situation is bound to @code{help-follow}, and be taken directly to the source, in the same way as @kbd{M-.} (@code{find-tag}). diff --git a/doc/misc/calc.texi b/doc/misc/calc.texi index cd2f66d24e..1fe7948ab8 100644 --- a/doc/misc/calc.texi +++ b/doc/misc/calc.texi @@ -35348,13 +35348,13 @@ followed by @kbd{=}, @kbd{&}, @kbd{#}, @kbd{\}, @kbd{/}, @kbd{+} or @kbd{-} as well as @kbd{*} to start Calc, and so in many cases the last character of the prefix can simply be typed twice. -Calc is controlled by many variables, most of which can be reset -from within Calc. Some variables are less involved with actual -calculation and can be set outside of Calc using Emacs's -customization facilities. These variables are listed below. -Typing @kbd{M-x customize-variable RET @var{variable-name} RET} -will bring up a buffer in which the variable's value can be redefined. -Typing @kbd{M-x customize-group RET calc RET} will bring up a buffer which +Calc is controlled by many variables, most of which can be reset from +within Calc. Some variables are less involved with actual calculation +and can be set outside of Calc using Emacs's customization facilities. +These variables are listed below. Typing @kbd{M-x customize-variable +@key{RET} @var{variable-name} @key{RET}} will bring up a buffer in +which the variable's value can be redefined. Typing @kbd{M-x +customize-group @key{RET} calc @key{RET}} will bring up a buffer which contains all of Calc's customizable variables. (These variables can also be reset by putting the appropriate lines in your .emacs file; @xref{Init File, ,Init File, emacs, The GNU Emacs Manual}.) diff --git a/doc/misc/cc-mode.texi b/doc/misc/cc-mode.texi index 52cd97bca6..d0d39d44e9 100644 --- a/doc/misc/cc-mode.texi +++ b/doc/misc/cc-mode.texi @@ -577,9 +577,9 @@ for the latest information on Emacs version and package compatibility @deffn Command c-version @findex version @r{(c-)} -You can find out what version of @ccmode{} you are using by visiting a C -file and entering @kbd{M-x c-version RET}. You should see this message in -the echo area: +You can find out what version of @ccmode{} you are using by visiting a +C file and entering @kbd{M-x c-version @key{RET}}. You should see +this message in the echo area: @example Using CC Mode version 5.XX @@ -1708,7 +1708,7 @@ nomenclature and treat them as separate words: @item @kbd{M-b} @tab @code{backward-word} @tab @code{c-backward-subword} @item @kbd{M-@@} @tab @code{mark-word} @tab @code{c-mark-subword} @item @kbd{M-d} @tab @code{kill-word} @tab @code{c-kill-subword} -@item @kbd{M-DEL} @tab @code{backward-kill-word} @tab @code{c-backward-kill-subword} +@item @kbd{M-@key{DEL}} @tab @code{backward-kill-word} @tab @code{c-backward-kill-subword} @item @kbd{M-t} @tab @code{transpose-words} @tab @code{c-transpose-subwords} @item @kbd{M-c} @tab @code{capitalize-word} @tab @code{c-capitalize-subword} @item @kbd{M-u} @tab @code{upcase-word} @tab @code{c-upcase-subword} diff --git a/doc/misc/dired-x.texi b/doc/misc/dired-x.texi index 130c06b40e..60e978c9d9 100644 --- a/doc/misc/dired-x.texi +++ b/doc/misc/dired-x.texi @@ -995,7 +995,7 @@ If there are several Dired buffers for a directory, the most recently used is chosen. Dired avoids switching to the current buffer, so that if you have a -normal and a wildcard buffer for the same directory, @kbd{C-x d RET} +normal and a wildcard buffer for the same directory, @kbd{C-x d @key{RET}} will toggle between those two. @end table diff --git a/doc/misc/ede.texi b/doc/misc/ede.texi index fbe3ac6a10..7feb5166fc 100644 --- a/doc/misc/ede.texi +++ b/doc/misc/ede.texi @@ -160,8 +160,8 @@ First, lets create a directory for our project. For this example, we'll start with something in @file{/tmp}. @example -C-x C-f /tmp/myproject/README RET -M-x make-directory RET RET +C-x C-f /tmp/myproject/README @key{RET} +M-x make-directory @key{RET} @key{RET} @end example Now put some plain text in your README file to start. @@ -169,7 +169,7 @@ Now put some plain text in your README file to start. Now, lets create the project: @example -M-x ede-new RET Automake RET myproject RET +M-x ede-new @key{RET} Automake @key{RET} myproject @key{RET} @end example @@ -191,8 +191,8 @@ We'll make a more complex project, so use dired to create some more directories using the @kbd{+} key, and typing in new directories: @example -+ include RET -+ src RET ++ include @key{RET} ++ src @key{RET} @end example Now I'll short-cut in this tutorial. Create the following files: @@ -252,13 +252,13 @@ now create those projects. With @file{main.cpp} as your current buffer, type: @example -M-x ede-new RET Automake RET src RET +M-x ede-new @key{RET} Automake @key{RET} src @key{RET} @end example and in @file{myproj.hh} as your current buffer, type: @example -M-x ede-new RET Automake RET include RET +M-x ede-new @key{RET} Automake @key{RET} include @key{RET} @end example These steps effectively only create the Project.ede file in which you @@ -272,7 +272,7 @@ Projects. You can create targets either from a buffer, or from a Note: If for some reason a directory list buffer, or file does not have the @samp{Project} menu item, or if @ede{} keybindings don't work, just -use @kbd{M-x revert-buffer RET} to force a refresh. Sometimes +use @kbd{M-x revert-buffer @key{RET}} to force a refresh. Sometimes creating a new project doesn't restart buffers correctly. Lets start with the header file. In @file{include/myproj.hh}, you @@ -280,7 +280,7 @@ could use the menu, but we will now start using the @ede{} command prefix which is @kbd{C-c .}. @example -C-c . t includes RET miscellaneous RET y +C-c . t includes @key{RET} miscellaneous @key{RET} y @end example @@ -292,7 +292,7 @@ Next, visit the @file{src} directory using dired. There should be a @samp{Project} menu. You can create a new target with @example -. t myprogram RET program RET +. t myprogram @key{RET} program @key{RET} @end example Note that @kbd{. t} is a command for creating a target. This command @@ -304,7 +304,7 @@ Next, place the cursor on @file{main.cpp}, and use @kbd{. a} to add that file to your target. @example -. a myprogram RET +. a myprogram @key{RET} @end example Note that these prompts often have completion, so you can just press @@ -316,8 +316,8 @@ all in your dired buffer, and add them all at the same time. Next, do the same for the library by placing the cursor on @file{mylib.cpp}. @example -. t mylib RET sharedobject RET -. a mylib RET +. t mylib @key{RET} sharedobject @key{RET} +. a mylib @key{RET} @end example @section Step 5: Compile, and fail @@ -350,7 +350,7 @@ To fix the failed compile, we need to add Visit @file{main.cpp}. @example -M-x customize-project RET +M-x customize-project @key{RET} @end example Select the @samp{[Settings]} subgroup of options. Under @@ -407,7 +407,7 @@ project. This is because variables such as the include path are treated globally, whereas dependencies for a target are target specific. @example -M-x customize-target RET +M-x customize-target @key{RET} @end example On the first page, you will see an Ldlibs-local section. Add mylib to @@ -437,7 +437,7 @@ C-c . C You can run your program directly from @ede{}. @example -C-c . R RET RET +C-c . R @key{RET} @key{RET} @end example If your program takes command line arguments, you can type them in diff --git a/doc/misc/edt.texi b/doc/misc/edt.texi index ed486597a7..754e3c82b2 100644 --- a/doc/misc/edt.texi +++ b/doc/misc/edt.texi @@ -195,10 +195,10 @@ EDT Emulation. (Note: In a few rare circumstances this does not work properly. In particular, it does not work if a subset of the leading @acronym{ASCII} characters in a key sequence are recognized by Emacs as having an existing binding. For example, if the keypad 7 (@key{KP7}) -key generates the sequence @samp{Ow} and @samp{O} is already +key generates the sequence @samp{@key{ESC}Ow} and @samp{@key{ESC}O} is already bound to a function, pressing @key{KP7} when told to do so by @file{edt-mapper.el} will result in @file{edt-mapper.el} incorrectly -mapping @samp{O} to @key{KP7} and @samp{w} to @key{KP8}. If +mapping @samp{@key{ESC}O} to @key{KP7} and @samp{w} to @key{KP8}. If something like this happens to you, it is probably a bug in the support for your keyboard within Emacs @strong{or} a bug in the Unix termcap/terminfo support for your terminal @strong{or} a bug in the diff --git a/doc/misc/efaq.texi b/doc/misc/efaq.texi index 0c979b1d3e..6f4977779f 100644 --- a/doc/misc/efaq.texi +++ b/doc/misc/efaq.texi @@ -173,7 +173,7 @@ Key sequences longer than one key (and some single-key sequences) are written inside quotes or on lines by themselves, like this: @display - @kbd{M-x frobnicate-while-foo RET} + @kbd{M-x frobnicate-while-foo @key{RET}} @end display @noindent @@ -3778,9 +3778,9 @@ defines the @kbd{M-@key{TAB}} key sequence. @node Backspace invokes help @section Why does the @key{Backspace} key invoke help? -@cindex Backspace key invokes help -@cindex Help invoked by Backspace -@cindex DEL key does not delete +@cindex @key{Backspace} key invokes help +@cindex Help invoked by @key{Backspace} +@cindex @key{DEL} key does not delete The @key{Backspace} key (on most keyboards) generates @acronym{ASCII} code 8. @kbd{C-h} sends the same code. In Emacs by default @kbd{C-h} invokes @@ -4125,7 +4125,7 @@ This will disable the use of the extra keysyms systemwide, which may be undesirable if you actually intend to use them. @node SPC no longer completes file names -@section Why doesn't SPC complete file names anymore? +@section Why doesn't @key{SPC} complete file names anymore? @cindex @kbd{SPC} file name completion Starting with Emacs 22.1, @kbd{SPC} no longer completes file names in diff --git a/doc/misc/erc.texi b/doc/misc/erc.texi index 466a4fc4b8..55556c5281 100644 --- a/doc/misc/erc.texi +++ b/doc/misc/erc.texi @@ -117,10 +117,11 @@ connect to. If you want to place ERC settings in their own file, you can place them in @file{~/.emacs.d/.ercrc.el}, creating it if necessary. -If you would rather use the Customize interface to change how ERC works, -do @kbd{M-x customize-group RET erc RET}. In particular, ERC comes with -lots of modules that may be enabled or disabled; to select which ones -you want, do @kbd{M-x customize-variable RET erc-modules RET}. +If you would rather use the Customize interface to change how ERC +works, do @kbd{M-x customize-group @key{RET} erc @key{RET}}. In +particular, ERC comes with lots of modules that may be enabled or +disabled; to select which ones you want, do @kbd{M-x +customize-variable @key{RET} erc-modules @key{RET}}. @menu * Sample Session:: Example of connecting to the #emacs channel @@ -269,14 +270,14 @@ This is a summary of keystrokes available in every ERC buffer. @item C-a or (@code{erc-bol}) Go to beginning of line or end of prompt. -@item RET (@code{erc-send-current-line}) +@item @key{RET} (@code{erc-send-current-line}) Send the current line -@item TAB (@code{erc-complete-word}) +@item @key{TAB} (@code{erc-complete-word}) If at prompt, complete the current word. Otherwise, move to the next link or button. -@item M-TAB (@code{ispell-complete-word}) +@item M-@key{TAB} (@code{ispell-complete-word}) Complete the given word, using ispell. @item C-c C-a (@code{erc-bol}) @@ -297,7 +298,7 @@ Toggle automatic CTCP replies (like VERSION and PING). @item C-c C-f (@code{erc-toggle-flood-control}) Toggle use of flood control on sent messages. -@item C-c TAB (@code{erc-invite-only-mode}) +@item C-c @key{TAB} (@code{erc-invite-only-mode}) Turn on the invite only mode (+i) for the current channel. @item C-c C-j (@code{erc-join-channel}) @@ -349,8 +350,9 @@ One way to add functionality to ERC is to customize which of its many modules are loaded. There is a spiffy customize interface, which may be reached by typing -@kbd{M-x customize-option erc-modules RET}. Alternatively, set -@code{erc-modules} manually and then call @code{erc-update-modules}. +@kbd{M-x customize-option @key{RET} erc-modules @key{RET}}. +Alternatively, set @code{erc-modules} manually and then call +@code{erc-update-modules}. The following is a list of available modules. @@ -743,7 +745,7 @@ stuff, to the current ERC buffer." This section is extremely incomplete. For now, the easiest way to check out all the available options for ERC is to do -@kbd{M-x customize-group erc RET}. +@kbd{M-x customize-group @key{RET} erc @key{RET}}. @defopt erc-hide-list If non, @code{nil}, this is a list of IRC message types to hide, e.g.: diff --git a/doc/misc/eshell.texi b/doc/misc/eshell.texi index 1789767dbe..80077e5ccd 100644 --- a/doc/misc/eshell.texi +++ b/doc/misc/eshell.texi @@ -894,7 +894,7 @@ will happen as it should (albeit slowly). @item Make sure syntax table is correct in Eshell mode -So that @kbd{M-DEL} acts in a predictable manner, etc. +So that @kbd{M-@key{DEL}} acts in a predictable manner, etc. @item Allow all Eshell buffers to share the same history and list-dir @@ -908,19 +908,19 @@ output from all subsequent commands is swallowed. Make it similar to the way that @file{esh-arg.el} is structured. Then add parsing of @samp{$[?\n]}. -@item After pressing @kbd{M-RET}, redisplay before running the next command +@item After pressing @kbd{M-@key{RET}}, redisplay before running the next command @item Argument predicates and modifiers should work anywhere in a path @example -/usr/local/src/editors/vim $ vi **/CVS(/)/Root(.) -Invalid regexp: "Unmatched ( or \\(" +/usr/local/src/editors/vim $ vi **/CVS(/)/Root(.) Invalid regexp: +"Unmatched ( or \\(" @end example With @command{zsh}, the glob above expands to all files named @file{Root} in directories named @file{CVS}. -@item Typing @samp{echo $@{locate locate@}/bin} results in a Lisp error +@item Typing @samp{echo $@{locate locate@}/bin@key{TAB}} results in a Lisp error Perhaps it should interpolate all permutations, and make that the globbing result, since otherwise hitting return here will result in @@ -960,7 +960,7 @@ At the moment, this is not supported. An error should be generated only if @code{eshell-error-if-no-glob} is non-@code{nil}. -@item @samp{(+ RET SPC TAB} does not cause @code{indent-according-to-mode} to occur +@item @samp{(+ @key{RET} @key{SPC} @key{TAB}} does not cause @code{indent-according-to-mode} to occur @item Create @code{eshell-auto-accumulate-list} @@ -1172,8 +1172,8 @@ only. That way, it could be listed as a login shell. @item Make @kbd{/} electric So that it automatically expands and corrects pathnames. Or make -pathname completion for Pcomplete auto-expand @samp{/u/i/std} to -@samp{/usr/include/std}. +pathname completion for Pcomplete auto-expand @samp{/u/i/std@key{TAB}} to +@samp{/usr/include/std@key{TAB}}. @item Write the @command{pushd} stack to disk along with @code{last-dir-ring} @@ -1221,7 +1221,7 @@ If the first thing that I do after entering Emacs is to run @code{eshell-command} and invoke @command{ls}, and then use @kbd{M-x eshell}, it doesn't display anything. -@item @kbd{M-RET} during a long command (using smart display) doesn't work +@item @kbd{M-@key{RET}} during a long command (using smart display) doesn't work Since it keeps the cursor up where the command was invoked. diff --git a/doc/misc/gnus-faq.texi b/doc/misc/gnus-faq.texi index 4175c88754..efef01f697 100644 --- a/doc/misc/gnus-faq.texi +++ b/doc/misc/gnus-faq.texi @@ -397,7 +397,7 @@ The ~/ means the home directory where Gnus and Emacs look for the configuration files. However, you don't really need to know what this means, it suffices that Emacs knows what it means :-) You can type -@samp{C-x C-f ~/.gnus.el RET } +@samp{C-x C-f ~/.gnus.el @key{RET}} (yes, with the forward slash, even on Windows), and Emacs will open the right file for you. (It will most likely be new, and thus empty.) @@ -422,7 +422,7 @@ possibility to set environment variables. Create a new one with name HOME and value C:\myhome. Rebooting is not necessary. Now to create @file{~/.gnus.el}, say -@samp{C-x C-f ~/.gnus.el RET C-x C-s}. +@samp{C-x C-f ~/.gnus.el @key{RET} C-x C-s}. in Emacs. @node FAQ 3-3 @@ -459,11 +459,11 @@ subscribe to a group. @subsubheading Answer If you know the name of the group say @samp{U -name.of.group RET} in group buffer (use the +name.of.group @key{RET}} in group buffer (use the tab-completion Luke). Otherwise hit ^ in group buffer, this brings you to the server buffer. Now place point (the cursor) over the server which carries the group you want, -hit @samp{RET}, move point to the group +hit @samp{@key{RET}}, move point to the group you want to subscribe to and say @samp{u} to subscribe to it. @@ -753,11 +753,11 @@ When I enter a group, all read messages are gone. How to view them again? @subsubheading Answer If you enter the group by saying -@samp{RET} +@samp{@key{RET}} in group buffer with point over the group, only unread and ticked messages are loaded. Say -@samp{C-u RET} +@samp{C-u @key{RET}} instead to load all available messages. If you want only the 300 newest say -@samp{C-u 300 RET} +@samp{C-u 300 @key{RET}} Loading only unread messages can be annoying if you have threaded view enabled, say @@ -1019,7 +1019,7 @@ back ends. Gnus thinks ``highest-article-number @minus{} lowest-article-number = total-number-of-articles''. This works OK for Usenet groups, but if you delete and move many messages in mail groups, this fails. To cure the -symptom, enter the group via @samp{C-u RET} +symptom, enter the group via @samp{C-u @key{RET}} (this makes Gnus get all messages), then hit @samp{M P b} to mark all messages and then say @samp{B m name.of.group} to move @@ -1494,8 +1494,8 @@ place them in ~/.emacs: @end example @noindent -Now you should be ready to go. Say @samp{M-x bbdb RET -RET} to open a bbdb buffer showing all +Now you should be ready to go. Say @samp{M-x bbdb @key{RET} +@key{RET}} to open a bbdb buffer showing all entries. Say @samp{c} to create a new entry, @samp{b} to search your BBDB and @samp{C-o} to add a new field to an @@ -1734,15 +1734,15 @@ world, you may find tools at Now you've got to import this mbox file into Gnus. To do this, create a nndoc group based on the mbox file by -saying @samp{G f /path/file.mbox RET} in +saying @samp{G f /path/file.mbox @key{RET}} in Group buffer. You now have read-only access to your mail. If you want to import the messages to your normal Gnus mail groups hierarchy, enter the nndoc group you've -just created by saying @samp{C-u RET} +just created by saying @samp{C-u @key{RET}} (thus making sure all messages are retrieved), mark all messages by saying @samp{M P b} and either copy them to the desired group by saying -@samp{B c name.of.group RET} or send them +@samp{B c name.of.group @key{RET}} or send them through nnmail-split-methods (respool them) by saying @samp{B r}. @@ -1809,7 +1809,7 @@ a Usenet group the easiest solution is probably to ask @uref{http://groups.google.com, groups.google.com}, if you found the posting there, tell Google to display the raw message, look for the message-id, and say -@samp{M-^ the@@message.id RET} in a +@samp{M-^ the@@message.id @key{RET}} in a summary buffer. Since Gnus 5.10 there's also a Gnus interface for groups.google.com which you can call with @@ -1853,7 +1853,7 @@ How to get rid of old unwanted mail? You can of course just mark the mail you don't need anymore by saying @samp{#} with point -over the mail and then say @samp{B DEL} +over the mail and then say @samp{B @key{DEL}} to get rid of them forever. You could also instead of actually deleting them, send them to a junk-group by saying @samp{B m nnml:trash-bin} which @@ -2089,7 +2089,7 @@ How to find information and help inside Emacs? @subsubheading Answer The first stop should be the Gnus manual (Say -@samp{C-h i d m Gnus RET} to start the +@samp{C-h i d m Gnus @key{RET}} to start the Gnus manual, then walk through the menus or do a full-text search with @samp{s}). Then there are the general Emacs help commands starting with @@ -2191,8 +2191,8 @@ The reason for this could be the way Gnus reads its active file, see the node "The Active File" in the Gnus manual for things you might try to speed the process up. An other idea would be to byte compile your @file{~/.gnus.el} (say -@samp{M-x byte-compile-file RET ~/.gnus.el -RET} to do it). Finally, if you have require +@samp{M-x byte-compile-file @key{RET} ~/.gnus.el +@key{RET}} to do it). Finally, if you have require statements in your .gnus, you could replace them with @code{with-eval-after-load}, which loads the stuff not at startup time, but when it's needed. Say you've got this in your diff --git a/doc/misc/gnus-news.texi b/doc/misc/gnus-news.texi index 91908584c9..171f59a3ad 100644 --- a/doc/misc/gnus-news.texi +++ b/doc/misc/gnus-news.texi @@ -324,7 +324,7 @@ messages are deleted again). @itemize @bullet @item The tool bar has been updated to use GNOME icons. -You can also customize the tool bars: @kbd{M-x customize-apropos RET +You can also customize the tool bars: @kbd{M-x customize-apropos @key{RET} -tool-bar$} should get you started. (Only for Emacs, not in XEmacs.) @c FIXME: Document this in the manual diff --git a/doc/misc/idlwave.texi b/doc/misc/idlwave.texi index 44a3831b1c..204a449925 100644 --- a/doc/misc/idlwave.texi +++ b/doc/misc/idlwave.texi @@ -4064,7 +4064,7 @@ sure you check the following things: @itemize @bullet @item When you download the IDLWAVE distribution, make sure you save the file under the names @file{idlwave.tar.gz}. -@item M-TAB switches among running programs---use Esc-TAB +@item M-@key{TAB} switches among running programs---use @key{ESC}-@key{TAB} instead. @item Other issues as yet unnamed... @end itemize diff --git a/doc/misc/ido.texi b/doc/misc/ido.texi index bc37429973..098b28ee52 100644 --- a/doc/misc/ido.texi +++ b/doc/misc/ido.texi @@ -456,14 +456,14 @@ You can toggle display of the hidden buffers and files with @kbd{C-a} You can customize the @code{ido} group to change Ido functionality: @example -M-x customize-group RET ido RET +M-x customize-group @key{RET} ido @key{RET} @end example @noindent or customize a certain variable: @example -M-x customize-variable RET ido-xxxxx +M-x customize-variable @key{RET} ido-xxxxx @key{RET} @end example To modify the keybindings, use the @code{ido-setup-hook}. For example: diff --git a/doc/misc/mairix-el.texi b/doc/misc/mairix-el.texi index 401ba1d7b5..8d620c720e 100644 --- a/doc/misc/mairix-el.texi +++ b/doc/misc/mairix-el.texi @@ -169,13 +169,13 @@ the updates incrementally and hence is very fast. First, put @code{mairix.el} in your Emacs search path and put @code{(require 'mairix)} into your @file{.emacs} file. Then, use -@kbd{M-x customize-group mairix RET} to set your preferences for -mairix.el. The most important items are @emph{Mairix File Path}, -@emph{Mairix Search File} and @emph{Mairix Mail Program}. The latter -specifies which mail program should be used to display the mairix search -results. Currently, RMail, Gnus with mbox files, and VM are supported. -If you use Gnus with maildir or mh, use the native Gnus back end -nnmairix instead. +@kbd{M-x customize-group @key{RET} mairix @key{RET}} to set your +preferences for mairix.el. The most important items are @emph{Mairix +File Path}, @emph{Mairix Search File} and @emph{Mairix Mail Program}. +The latter specifies which mail program should be used to display the +mairix search results. Currently, RMail, Gnus with mbox files, and VM +are supported. If you use Gnus with maildir or mh, use the native +Gnus back end nnmairix instead. If you use another Emacs mail program which is not yet supported by mairix.el, it is pretty easy to integrate it. @xref{Extending}, diff --git a/doc/misc/message.texi b/doc/misc/message.texi index a1532bb614..be1c806c82 100644 --- a/doc/misc/message.texi +++ b/doc/misc/message.texi @@ -104,7 +104,7 @@ sending it. @end menu You can customize the Message Mode tool bar, see @kbd{M-x -customize-apropos RET message-tool-bar}. This feature is only available +customize-apropos @key{RET} message-tool-bar}. This feature is only available in Emacs. @node New Mail Message @@ -919,7 +919,7 @@ is fully available) @acronym{IDNA} encoding happens automatically. @findex message-idna-to-ascii-rhs If you want to experiment with the @acronym{IDNA} encoding, you can -invoke @kbd{M-x message-idna-to-ascii-rhs RET} in the message buffer +invoke @kbd{M-x message-idna-to-ascii-rhs @key{RET}} in the message buffer to have the non-@acronym{ASCII} domain names encoded while you edit the message. @@ -1082,7 +1082,7 @@ Since signing and especially encryption often is used when sensitive information is sent, you may want to have some way to ensure that your mail is actually signed or encrypted. After invoking the above sign/encrypt commands, it is possible to preview the raw article by -using @kbd{C-u C-c RET P} (@code{mml-preview}). Then you can +using @kbd{C-u C-c @key{RET} P} (@code{mml-preview}). Then you can verify that your long rant about what your ex-significant other or whomever actually did with that funny looking person at that strange party the other night, actually will be sent encrypted. @@ -1174,7 +1174,7 @@ without some kind of configuration. Especially, you need to tell it where your private key and your certificate is stored. @acronym{MML} uses an Emacs interface to OpenSSL, aptly named @code{smime.el}, and it contain a @code{custom} group used for this configuration. So, try -@kbd{M-x customize-group RET smime RET} and look around. +@kbd{M-x customize-group @key{RET} smime @key{RET}} and look around. Currently there is no support for talking to a CA (or RA) to create your own certificate. None is planned either. You need to do this diff --git a/doc/misc/mh-e.texi b/doc/misc/mh-e.texi index 68d8b210ab..74b17264d2 100644 --- a/doc/misc/mh-e.texi +++ b/doc/misc/mh-e.texi @@ -3844,9 +3844,9 @@ buffers that you would rather remove, you can use both You can use dired to manipulate the folders themselves. For example, I renamed my @samp{+out} folder to the more common @samp{+outbox} by -running dired on my mail directory (@kbd{M-x dired RET ~/Mail RET}), -moving my cursor to @samp{out} and using the command @kbd{R} -(@code{dired-do-rename}). +running dired on my mail directory (@kbd{M-x dired @key{RET} ~/Mail +@key{RET}}), moving my cursor to @samp{out} and using the command +@kbd{R} (@code{dired-do-rename}). @node Sending Mail, Editing Drafts, Folders, Top @chapter Sending Mail diff --git a/doc/misc/newsticker.texi b/doc/misc/newsticker.texi index f7a28d3827..ac29ced8fb 100644 --- a/doc/misc/newsticker.texi +++ b/doc/misc/newsticker.texi @@ -397,8 +397,8 @@ Mark current item as immortal. Immortal items are kept forever. @table @kbd @cindex Get News @item v -@itemx RET -@itemx +@itemx @key{RET} +@itemx mouse-1 @findex newsticker-treeview-browse-url Open the link to the full article (as contained in the current headline) in your web browser @code{newsticker-treeview-browse-url}). diff --git a/doc/misc/org.texi b/doc/misc/org.texi index eeace47dbe..cd61259518 100644 --- a/doc/misc/org.texi +++ b/doc/misc/org.texi @@ -749,7 +749,7 @@ Specific header arguments Miscellaneous -* Completion:: M-TAB guesses completions +* Completion:: M-@key{TAB} guesses completions * Easy templates:: Quick insertion of structural elements * Speed keys:: Electric commands at the beginning of a headline * Code evaluation security:: Org mode files evaluate inline code @@ -884,7 +884,8 @@ We @b{strongly recommend} to stick to a single installation method. @subsubheading Using Emacs packaging system Recent Emacs distributions include a packaging system which lets you install -Elisp libraries. You can install Org with @kbd{M-x package-install RET org}. +Elisp libraries. You can install Org with @kbd{M-x package-install @key{RET} +org}. @noindent @b{Important}: you need to do this in a session where no @code{.org} file has been visited, i.e., where no Org built-in function have been loaded. @@ -1013,10 +1014,10 @@ version of Org available---if you are running an outdated version, it is quite possible that the bug has been fixed already. If the bug persists, prepare a report and provide as much information as possible, including the version information of Emacs (@kbd{M-x emacs-version @key{RET}}) and Org -(@kbd{M-x org-version RET}), as well as the Org related setup in the Emacs -init file. The easiest way to do this is to use the command +(@kbd{M-x org-version @key{RET}}), as well as the Org related setup in the +Emacs init file. The easiest way to do this is to use the command @example -@kbd{M-x org-submit-bug-report RET} +@kbd{M-x org-submit-bug-report @key{RET}} @end example @noindent which will put all this information into an Emacs mail buffer so that you only need to add your description. If you are not sending the Email @@ -1076,7 +1077,7 @@ Reload uncompiled versions of all Org mode Lisp files. The backtrace contains much more information if it is produced with uncompiled code. To do this, use @example -@kbd{C-u M-x org-reload RET} +@kbd{C-u M-x org-reload @key{RET}} @end example @noindent or select @code{Org -> Refresh/Reload -> Reload Org uncompiled} from the @@ -1875,7 +1876,7 @@ export output. Property drawers are not affected by this variable: configure Org mode uses begin...end blocks for various purposes from including source code examples (@pxref{Literal examples}) to capturing time logging information (@pxref{Clocking work time}). These blocks can be folded and -unfolded by pressing TAB in the begin line. You can also get all blocks +unfolded by pressing @key{TAB} in the begin line. You can also get all blocks folded at startup by configuring the option @code{org-hide-block-startup} or on a per-file basis by using @@ -1999,7 +2000,7 @@ a separate window. The window can be closed by pressing @kbd{C-c '}. If you like the intuitive way the Org mode structure editing and list formatting works, you might want to use these commands in other modes like Text mode or Mail mode as well. The minor mode @code{orgstruct-mode} makes -this possible. Toggle the mode with @kbd{M-x orgstruct-mode RET}, or +this possible. Toggle the mode with @kbd{M-x orgstruct-mode @key{RET}}, or turn it on by default, for example in Message mode, with one of: @lisp @@ -2040,7 +2041,7 @@ file falls into one of the categories above. To explore the abstract structure of an Org buffer, run this in a buffer: @lisp -M-: (org-element-parse-buffer) RET +M-: (org-element-parse-buffer) @key{RET} @end lisp It will output a list containing the buffer's content represented as an @@ -2134,10 +2135,10 @@ table. But it is easier just to start typing, like @orgcmd{C-c C-c,org-table-align} Re-align the table and don't move to another field. @c -@orgcmd{C-c SPC,org-table-blank-field} +@orgcmd{C-c @key{SPC},org-table-blank-field} Blank the field at point. @c -@orgcmd{TAB,org-table-next-field} +@orgcmd{@key{TAB},org-table-next-field} Re-align the table, move to the next field. Creates a new row if necessary. @c @@ -2252,7 +2253,7 @@ window follow the cursor through the table and always show the current field. The follow mode exits automatically when the cursor leaves the table, or when you repeat this command with @kbd{C-u C-u C-c `}. @c -@item M-x org-table-import RET +@item M-x org-table-import @key{RET} Import a file as a table. The table should be TAB or whitespace separated. Use, for example, to import a spreadsheet table or data from a database, because these programs generally can write @@ -2265,7 +2266,7 @@ Tables can also be imported by pasting tabular text into the Org buffer, selecting the pasted text with @kbd{C-x C-x} and then using the @kbd{C-c |} command (see above under @i{Creation and conversion}). @c -@item M-x org-table-export RET +@item M-x org-table-export @key{RET} @findex org-table-export @vindex org-table-export-default-format Export the table, by default as a TAB-separated file. Use for data @@ -2390,11 +2391,11 @@ every vertical line you would like to have: @cindex Orgtbl mode @cindex minor mode for tables -If you like the intuitive way the Org table editor works, you -might also want to use it in other modes like Text mode or Mail mode. -The minor mode Orgtbl mode makes this possible. You can always toggle -the mode with @kbd{M-x orgtbl-mode RET}. To turn it on by default, for -example in Message mode, use +If you like the intuitive way the Org table editor works, you might also want +to use it in other modes like Text mode or Mail mode. The minor mode Orgtbl +mode makes this possible. You can always toggle the mode with @kbd{M-x +orgtbl-mode @key{RET}}. To turn it on by default, for example in Message +mode, use @lisp (add-hook 'message-mode-hook 'turn-on-orgtbl) @@ -3133,10 +3134,10 @@ hline are left alone, assuming that these are part of the table header. Iterate the table by recomputing it until no further changes occur. This may be necessary if some computed fields use the value of other fields that are computed @i{later} in the calculation sequence. -@item M-x org-table-recalculate-buffer-tables RET +@item M-x org-table-recalculate-buffer-tables @key{RET} @findex org-table-recalculate-buffer-tables Recompute all tables in the current buffer. -@item M-x org-table-iterate-buffer-tables RET +@item M-x org-table-iterate-buffer-tables @key{RET} @findex org-table-iterate-buffer-tables Iterate all tables in the current buffer, in order to converge table-to-table dependencies. @@ -4231,8 +4232,8 @@ each keyword, in parentheses@footnote{All characters are allowed except @end lisp @vindex org-fast-tag-selection-include-todo -If you then press @kbd{C-c C-t} followed by the selection key, the entry -will be switched to this state. @kbd{SPC} can be used to remove any TODO +If you then press @kbd{C-c C-t} followed by the selection key, the entry will +be switched to this state. @kbd{@key{SPC}} can be used to remove any TODO keyword from an entry.@footnote{Check also the option @code{org-fast-tag-selection-include-todo}, it allows you to change the TODO state through the tags interface (@pxref{Setting tags}), in case you like to @@ -4421,7 +4422,7 @@ Then each time you turn an entry from a TODO (not-done) state into any of the DONE states, a line @samp{CLOSED: [timestamp]} will be inserted just after the headline. If you turn the entry back into a TODO item through further state cycling, that line will be removed again. If you turn the entry back -to a non-TODO state (by pressing @key{C-c C-t SPC} for example), that line +to a non-TODO state (by pressing @key{C-c C-t @key{SPC}} for example), that line will also be removed, unless you set @code{org-closed-keep-when-no-todo} to non-@code{nil}. If you want to record a note along with the timestamp, use@footnote{The corresponding in-buffer setting is: @code{#+STARTUP: @@ -4451,8 +4452,8 @@ headline as an itemized list, newest first@footnote{See the option want to get the notes out of the way into a drawer (@pxref{Drawers}). Customize @code{org-log-into-drawer} to get this behavior---the recommended drawer for this is called @code{LOGBOOK}@footnote{Note that the -@code{LOGBOOK} drawer is unfolded when pressing @key{SPC} in the agenda to -show an entry---use @key{C-u SPC} to keep it folded here}. You can also +@code{LOGBOOK} drawer is unfolded when pressing @kbd{@key{SPC}} in the agenda to +show an entry---use @kbd{C-u @key{SPC}} to keep it folded here}. You can also overrule the setting of this variable for a subtree by setting a @code{LOG_INTO_DRAWER} property. @@ -5385,7 +5386,7 @@ in the current file will be offered as possible completions. @orgcmd{C-c C-x p,org-set-property} Set a property. This prompts for a property name and a value. If necessary, the property drawer is created as well. -@item C-u M-x org-insert-drawer RET +@item C-u M-x org-insert-drawer @key{RET} @cindex @code{org-insert-drawer} Insert a property drawer into the current entry. The drawer will be inserted early in the entry, but after the lines with planning @@ -5792,7 +5793,7 @@ global @r{make a global view, including all headings in the file} @r{run column view at the top of this file} "@var{ID}" @r{call column view in the tree that has an @code{:ID:}} @r{property with the value @i{label}. You can use} - @r{@kbd{M-x org-id-copy RET} to create a globally unique @code{ID} for} + @r{@kbd{M-x org-id-copy @key{RET}} to create a globally unique @code{ID} for} @r{the current entry and copy it to the kill-ring.} @end example @item :hlines @@ -6806,7 +6807,8 @@ identical to dealing with away time due to idleness; it is just happening due to a recovery event rather than a set amount of idle time. You can also check all the files visited by your Org agenda for dangling -clocks at any time using @kbd{M-x org-resolve-clocks RET} (or @kbd{C-c C-x C-z}). +clocks at any time using @kbd{M-x org-resolve-clocks @key{RET}} (or @kbd{C-c +C-x C-z}). @subsubheading Continuous clocking @cindex continuous clocking @@ -6966,7 +6968,7 @@ If your configuration depends on @file{org-remember.el}, you need to update it and use the setup described below. To convert your @code{org-remember-templates}, run the command @example -@kbd{M-x org-capture-import-remember-templates RET} +@kbd{M-x org-capture-import-remember-templates @key{RET}} @end example @noindent and then customize the new variable with @kbd{M-x customize-variable org-capture-templates}, check the result, and save the @@ -7910,7 +7912,7 @@ To do this, each subtree is checked for open TODO entries. If none are found, the command offers to set the ARCHIVE tag for the child. If the cursor is @emph{not} on a headline when this command is invoked, the level 1 trees will be checked. -@orgcmd{C-@kbd{TAB},org-force-cycle-archived} +@orgcmd{C-@key{TAB},org-force-cycle-archived} Cycle a tree even if it is tagged with ARCHIVE. @orgcmd{C-c C-x A,org-archive-to-archive-sibling} Move the current entry to the @emph{Archive Sibling}. This is a sibling of @@ -8022,7 +8024,7 @@ Remove current file from the list of agenda files. @orgcmd{C-',org-cycle-agenda-files} @itemx C-, Cycle through agenda file list, visiting one file after the other. -@item M-x org-iswitchb RET +@item M-x org-iswitchb @key{RET} Command to use an @code{iswitchb}-like interface to switch to and between Org buffers. @end table @@ -8788,12 +8790,13 @@ excluding the next tag. Org also supports automatic, context-aware tag filtering. If the variable @code{org-agenda-auto-exclude-function} is set to a user-defined function, that function can decide which tags should be excluded from the agenda -automatically. Once this is set, the @kbd{/} command then accepts @kbd{RET} -as a sub-option key and runs the auto exclusion logic. For example, let's -say you use a @code{Net} tag to identify tasks which need network access, an -@code{Errand} tag for errands in town, and a @code{Call} tag for making phone -calls. You could auto-exclude these tags based on the availability of the -Internet, and outside of business hours, with something like this: +automatically. Once this is set, the @kbd{/} command then accepts +@kbd{@key{RET}} as a sub-option key and runs the auto exclusion logic. For +example, let's say you use a @code{Net} tag to identify tasks which need +network access, an @code{Errand} tag for errands in town, and a @code{Call} +tag for making phone calls. You could auto-exclude these tags based on the +availability of the Internet, and outside of business hours, with something +like this: @smalllisp @group @@ -9004,7 +9007,7 @@ Delete other windows. @xorgcmd{v t,org-agenda-fortnight-view} @xorgcmd{v m,org-agenda-month-view} @xorgcmd{v y,org-agenda-year-view} -@xorgcmd{v SPC,org-agenda-reset-view} +@xorgcmd{v @key{SPC},org-agenda-reset-view} @vindex org-agenda-span Switch to day/week/month/year view. When switching to day or week view, this setting becomes the default for subsequent agenda refreshes. Since month and @@ -9423,7 +9426,7 @@ calendars. @orgcmd{H,org-agenda-holidays} Show holidays for three months around the cursor date. -@item M-x org-icalendar-combine-agenda-files RET +@item M-x org-icalendar-combine-agenda-files @key{RET} Export a single iCalendar file containing entries from all agenda files. This is a globally available command, and also available in the agenda menu. @@ -10407,14 +10410,14 @@ To disable it, simply use CD@LaTeX{} mode is a minor mode that is normally used in combination with a major @LaTeX{} mode like AUC@TeX{} in order to speed-up insertion of -environments and math templates. Inside Org mode, you can make use of -some of the features of CD@LaTeX{} mode. You need to install -@file{cdlatex.el} and @file{texmathp.el} (the latter comes also with -AUC@TeX{}) from @url{https://staff.fnwi.uva.nl/c.dominik/Tools/cdlatex}. -Don't use CD@LaTeX{} mode itself under Org mode, but use the light -version @code{org-cdlatex-mode} that comes as part of Org mode. Turn it -on for the current buffer with @kbd{M-x org-cdlatex-mode RET}, or for all -Org files with +environments and math templates. Inside Org mode, you can make use of some +of the features of CD@LaTeX{} mode. You need to install @file{cdlatex.el} +and @file{texmathp.el} (the latter comes also with AUC@TeX{}) from +@url{https://staff.fnwi.uva.nl/c.dominik/Tools/cdlatex}. Don't use +CD@LaTeX{} mode itself under Org mode, but use the light version +@code{org-cdlatex-mode} that comes as part of Org mode. Turn it on for the +current buffer with @kbd{M-x org-cdlatex-mode @key{RET}}, or for all Org +files with @lisp (add-hook 'org-mode-hook 'turn-on-org-cdlatex) @@ -10438,7 +10441,8 @@ the second brace. Even outside fragments, @key{TAB} will expand environment abbreviations at the beginning of a line. For example, if you write @samp{equ} at the beginning of a line and press @key{TAB}, this abbreviation will be expanded to an @code{equation} environment. -To get a list of all abbreviations, type @kbd{M-x cdlatex-command-help RET}. +To get a list of all abbreviations, type @kbd{M-x cdlatex-command-help +@key{RET}}. @item @kindex _ @kindex ^ @@ -10616,8 +10620,8 @@ inserted from the export dispatcher (@pxref{The export dispatcher}) using the @code{Insert template} command by pressing @key{#}. To insert keywords individually, a good way to make sure the keyword is correct is to type @code{#+} and then to use @kbd{M-@key{TAB}}@footnote{Many desktops intercept -@kbd{M-TAB} to switch windows. Use @kbd{C-M-i} or @kbd{@key{ESC} @key{TAB}} -instead.} for completion. +@kbd{M-@key{TAB}} to switch windows. Use @kbd{C-M-i} or @kbd{@key{ESC} +@key{TAB}} instead.} for completion. The export keywords available for every back-end, and their equivalent global variables, include: @@ -12847,7 +12851,7 @@ generic commands: @vindex org-odt-convert @table @kbd -@item M-x org-odt-convert RET +@item M-x org-odt-convert @key{RET} Convert an existing document from one format to another. With a prefix argument, opens the newly produced file. @end table @@ -13122,10 +13126,10 @@ To quickly verify the reliability of the @LaTeX{}-to-MathML converter, use the following commands: @table @kbd -@item M-x org-odt-export-as-odf RET +@item M-x org-odt-export-as-odf @key{RET} Convert a @LaTeX{} math snippet to an OpenDocument formula (@file{.odf}) file. -@item M-x org-odt-export-as-odf-and-open RET +@item M-x org-odt-export-as-odf-and-open @key{RET} Convert a @LaTeX{} math snippet to an OpenDocument formula (@file{.odf}) file and open the formula file with the system-registered application. @end table @@ -14429,7 +14433,7 @@ In-place conversions are particularly handy for quick conversion of tables and lists in foreign buffers. For example, turn on the minor mode @code{M-x orgstruct-mode} in an HTML buffer, then use the convenient Org keyboard commands to create a list, select it, and covert it to HTML with @code{M-x -org-html-convert-region-to-html RET}. +org-html-convert-region-to-html @key{RET}}. @node Publishing @@ -16146,7 +16150,7 @@ Interpreted as raw Org mode. Inserted directly into the buffer. Aligned if it is a table. Usage example: @code{:results value raw}. @item @code{org} Results enclosed in a @code{BEGIN_SRC org} block. For comma-escape, either -@kbd{TAB} in the block, or export the file. Usage example: @code{:results +@key{TAB} in the block, or export the file. Usage example: @code{:results value org}. @item @code{html} Results enclosed in a @code{BEGIN_EXPORT html} block. Usage example: @@ -16233,7 +16237,7 @@ output file, @code{:dir} specifies the default directory during @samp{src} code block execution. If it is absent, then the directory associated with the current buffer is used. In other words, supplying @code{:dir path} temporarily has the same effect as changing the current directory with -@kbd{M-x cd path RET}, and then not supplying @code{:dir}. Under the +@kbd{M-x cd path @key{RET}}, and then not supplying @code{:dir}. Under the surface, @code{:dir} simply sets the value of the Emacs variable @code{default-directory}. @@ -17247,7 +17251,7 @@ emacs -Q --batch --eval " @chapter Miscellaneous @menu -* Completion:: M-TAB guesses completions +* Completion:: M-@key{TAB} guesses completions * Easy templates:: Quick insertion of structural elements * Speed keys:: Electric commands at the beginning of a headline * Code evaluation security:: Org mode files evaluate inline code @@ -17457,8 +17461,8 @@ Org executes formulas in tables (@pxref{The spreadsheet}) either through the @cindex variables, for customization Org has more than 500 variables for customization. They can be accessed -through the usual @kbd{M-x org-customize RET} command. Or through the Org -menu, @code{Org->Customization->Browse Org Group}. Org also has per-file +through the usual @kbd{M-x org-customize @key{RET}} command. Or through the +Org menu, @code{Org->Customization->Browse Org Group}. Org also has per-file settings for some variables (@pxref{In-buffer settings}). @node In-buffer settings @@ -17912,7 +17916,8 @@ one of the following lines: @end example To switch between single and double stars layouts, use @kbd{M-x -org-convert-to-odd-levels RET} and @kbd{M-x org-convert-to-oddeven-levels}. +org-convert-to-odd-levels @key{RET}} and @kbd{M-x +org-convert-to-oddeven-levels @key{RET}}. @end enumerate @node TTY keys @@ -18058,9 +18063,9 @@ bindings in Org files, and in the agenda buffer (but not during date selection). @example -S-UP @result{} M-p S-DOWN @result{} M-n -S-LEFT @result{} M-- S-RIGHT @result{} M-+ -C-S-LEFT @result{} M-S-- C-S-RIGHT @result{} M-S-+ +S-@key{UP} @result{} M-p S-@key{DOWN} @result{} M-n +S-@key{LEFT} @result{} M-- S-@key{RIGHT} @result{} M-+ +C-S-@key{LEFT} @result{} M-S-- C-S-@key{RIGHT} @result{} M-S-+ @end example @vindex org-disputed-keys @@ -18465,7 +18470,7 @@ Put the table after an @samp{END} statement. For example @samp{\bye} in @TeX{} and @samp{\end@{document@}} in @LaTeX{}. @item Comment and uncomment each line of the table during edits. The @kbd{M-x -orgtbl-toggle-comment RET} command makes toggling easy. +orgtbl-toggle-comment @key{RET}} command makes toggling easy. @end itemize @node A @LaTeX{} example @@ -18478,8 +18483,8 @@ provided by @file{comment.sty}. To activate it, put radio table skeleton@footnote{By default this works only for @LaTeX{}, HTML, and Texinfo. Configure the variable @code{orgtbl-radio-table-templates} to install templates for other export formats.} with the command @kbd{M-x -orgtbl-insert-radio-table RET}, which prompts for a table name. For example, -if @samp{salesfigures} is the name, the template inserts: +orgtbl-insert-radio-table @key{RET}}, which prompts for a table name. For +example, if @samp{salesfigures} is the name, the template inserts: @cindex @code{#+ORGTBL}, @samp{SEND} @example diff --git a/doc/misc/pcl-cvs.texi b/doc/misc/pcl-cvs.texi index 1163530e7a..4c61aed5b3 100644 --- a/doc/misc/pcl-cvs.texi +++ b/doc/misc/pcl-cvs.texi @@ -63,10 +63,11 @@ modify this GNU manual.'' @node Top @top PCL-CVS -This manual describes PCL-CVS, the GNU Emacs front-end to CVS@. It -is nowhere near complete, so you are advised to use @kbd{M-x -customize-group RET pcl-cvs @key{RET}} and to look at the documentation strings -of the various commands and major modes for further information. +This manual describes PCL-CVS, the GNU Emacs front-end to CVS@. It is +nowhere near complete, so you are advised to use @kbd{M-x +customize-group @key{RET} pcl-cvs @key{RET}} and to look at the +documentation strings of the various commands and major modes for +further information. @c This manual is updated to release 2.5 of PCL-CVS. @insertcopying @@ -1109,7 +1110,7 @@ Tag all selected files by running @samp{cvs tag} on them (@code{cvs-mode-tag}). It's usually preferable to tag a directory at a time. Rather than selecting all files (which too often doesn't select all files but only the few that are displayed), clear the -selection with @kbd{M-DEL} (@code{cvs-mode-unmark-all-files}), position +selection with @kbd{M-@key{DEL}} (@code{cvs-mode-unmark-all-files}), position the cursor on the directory you want to tag and hit @kbd{t}. @end table diff --git a/doc/misc/ses.texi b/doc/misc/ses.texi index 4db5fda34a..aa4fe81ba5 100644 --- a/doc/misc/ses.texi +++ b/doc/misc/ses.texi @@ -209,7 +209,7 @@ remove blank cells from the returned list, which allows to use @findex keyboard-quit To create a new spreadsheet, visit a nonexistent file whose name ends - with ".ses". For example, @kbd{C-x C-f test.ses RET}. +with ".ses". For example, @kbd{C-x C-f test.ses @key{RET}}. A @dfn{cell identifier} is a symbol with a column letter and a row @@ -310,7 +310,7 @@ To enter something else (e.g., a vector), begin with a digit, then erase the digit and type whatever you want. @table @kbd -@item RET +@item @key{RET} Edit the existing formula in the current cell (@code{ses-edit-cell}). @item C-c C-c @@ -357,7 +357,7 @@ Basic commands: @item w (@code{ses-set-column-width}) -@item TAB +@item @key{TAB} Moves point to the next rightward cell, or inserts a new column if already at last cell on line, or inserts a new row if at endline (@code{ses-forward-or-insert}). @@ -639,7 +639,7 @@ or a non-string is displayed as an error by using @code{#} filling. These commands set both formula and printer to @code{nil}: @table @kbd -@item DEL +@item @key{DEL} Clear cell and move left (@code{ses-clear-cell-backward}). @item C-d diff --git a/doc/misc/sieve.texi b/doc/misc/sieve.texi index 37bb707f63..2d290b3688 100644 --- a/doc/misc/sieve.texi +++ b/doc/misc/sieve.texi @@ -123,7 +123,7 @@ bindings to manage Sieve scripts remotely. @xref{Managing Sieve}. @table @kbd -@item C-c RET +@item C-c @key{RET} @kindex C-c RET @findex sieve-manage @cindex manage remote sieve script @@ -160,8 +160,8 @@ press RET on to create a new script. @end example One of the scripts are highlighted, and standard point navigation -commands (@kbd{}, @kbd{} etc.)@: can be used to navigate the -list. +commands (@kbd{@key{UP}}, @kbd{@key{DOWN}} etc.)@: can be used to +navigate the list. The following commands are available in the Manage Sieve buffer: @@ -187,7 +187,7 @@ Deactivates all scripts. @findex sieve-remove Remove currently highlighted script. -@item RET +@item @key{RET} @item mouse-2 @item f @kindex RET @@ -272,7 +272,7 @@ The @file{sieve-manage.el} library contains low-level functionality for talking to a server with the @sc{managesieve} protocol. A number of user-visible variables exist, which all can be customized -in the @code{sieve} group (@kbd{M-x customize-group RET sieve RET}): +in the @code{sieve} group (@kbd{M-x customize-group @key{RET} sieve @key{RET}}): @table @code diff --git a/doc/misc/smtpmail.texi b/doc/misc/smtpmail.texi index 6da51f798d..c3387054ba 100644 --- a/doc/misc/smtpmail.texi +++ b/doc/misc/smtpmail.texi @@ -354,7 +354,7 @@ directory to hold queued messages. It defaults to The function @code{smtpmail-send-queued-mail} can be used to send any queued mail when @code{smtpmail-queue-mail} is enabled. It is typically invoked interactively with @kbd{M-x -smtpmail-send-queued-mail RET} when you are connected to the internet. +smtpmail-send-queued-mail @key{RET}} when you are connected to the internet. @node Server workarounds @chapter Server workarounds diff --git a/doc/misc/speedbar.texi b/doc/misc/speedbar.texi index 6286ac12a9..1c1b014f54 100644 --- a/doc/misc/speedbar.texi +++ b/doc/misc/speedbar.texi @@ -87,7 +87,7 @@ on. @xref{Basic Navigation}. @chapter Introduction @cindex introduction -To start using speedbar use the command @kbd{M-x speedbar RET} or +To start using speedbar use the command @kbd{M-x speedbar @key{RET}} or select it from the @samp{Options->Show/Hide} sub-menu. This command will open a new frame to summarize the local files. On X Window systems or on MS-Windows, speedbar's frame is twenty characters wide, @@ -188,7 +188,7 @@ these are available, some additional common bindings are available. @cindex common keys @table @kbd -@item RET +@item @key{RET} @itemx e Edit/Open the current group or tag. This behavior is dependent on the mode. In general, files or buffers are opened in the attached frame, diff --git a/doc/misc/srecode.texi b/doc/misc/srecode.texi index afa3af1035..2987f62974 100644 --- a/doc/misc/srecode.texi +++ b/doc/misc/srecode.texi @@ -105,11 +105,11 @@ item should appear. To toggle @srecode{} minor mode on and off use: @example -M-x srecode-minor-mode RET +M-x srecode-minor-mode @key{RET} @end example or @example -M-x global-srecode-minor-mode RET +M-x global-srecode-minor-mode @key{RET} @end example or add @@ -276,7 +276,8 @@ If the variable @code{srecode-insert-ask-variable-method} is set to instead create ``fields'' in the buffer. A field-editing layer provides simple interaction through the fields. Typing in a field will cause all variable locations that are the same to edit at the -same time. Pressing TAB on a field will move you to the next field. +same time. Pressing @kbd{@key{TAB}} on a field will move you to the +next field. @node SRecode Minor Mode @chapter SRecode Minor Mode @@ -284,17 +285,17 @@ same time. Pressing TAB on a field will move you to the next field. The Semantic Recode minor mode enables a keymap and menu that provides simple access to different templates or template applications. -The key prefix is @key{C-c /}. +The key prefix is @kbd{C-c /}. If the variable @code{srecode-takeover-INS-key} is set, then the key -@key{} can also be used. +@kbd{@key{INSERT}} can also be used. The most important key is bound to @code{srecode-insert} which is -@key{C-c / /}, or @key{insert insert}. @ref{Quick Start}. +@kbd{C-c / /}, or @kbd{@key{INSERT} @key{INSERT}}. @ref{Quick Start}. Major keybindings are: -@table @key +@table @kbd @item C-c / / Insert a template whose name is typed into the minibuffer. @item C-c / @@ -338,7 +339,7 @@ will not be prompted to fill in values while the template is inserted. Instead, short regions will be highlighted, and the cursor placed in a field. Typing in the field will then fill in the value. Several fields might be linked together. In that case, typing in one -area will modify the other linked areas. Pressing TAB will move +area will modify the other linked areas. Pressing @key{TAB} will move between editable fields in the template. Once the cursor moves out of the are inserted by the template, all the diff --git a/doc/misc/vhdl-mode.texi b/doc/misc/vhdl-mode.texi index c061fb8e43..8fc75106d5 100644 --- a/doc/misc/vhdl-mode.texi +++ b/doc/misc/vhdl-mode.texi @@ -100,7 +100,7 @@ How to customize the indentation engine. The major version number was incremented to 3 with the addition of many new features for editing VHDL code to the new indentation engine, which was introduced in major version 2. To find the minor revision -number of this release, use @kbd{M-x vhdl-version RET}. +number of this release, use @kbd{M-x vhdl-version @key{RET}}. A special word of thanks goes to Rod Whitby, who wrote the VHDL Mode indentation engine, and to Barry Warsaw, who wrote @@ -119,7 +119,7 @@ makes everything highly self-explaining. @cindex Getting Connected To get started, simply visit a @file{.vhd} file in Emacs; or type -@kbd{M-x vhdl-mode RET}. +@kbd{M-x vhdl-mode @key{RET}}. @node New Indentation Engine @chapter New Indentation Engine @@ -302,11 +302,11 @@ being used. @vindex vhdl-echo-syntactic-information-p @vindex echo-syntactic-information-p @r{(vhdl-)} -@cindex TAB +@cindex @key{TAB} To help you configure VHDL Mode, you can set the variable @code{vhdl-echo-syntactic-information-p} to non-@code{nil} so that the syntactic component list and calculated offset will always be echoed in -the minibuffer when you hit @kbd{TAB}. +the minibuffer when you hit @kbd{@key{TAB}}. @ignore @@ -548,7 +548,7 @@ already built-in. These include: @findex vhdl-set-style @findex set-style @r{(vhdl-)} If you'd like to experiment with these built-in styles you can simply -type @kbd{M-x vhdl-set-style RET} in a VHDL Mode buffer. +type @kbd{M-x vhdl-set-style @key{RET}} in a VHDL Mode buffer. You will be prompted for one of the above styles (with completion). Enter one of the styles and hit @kbd{RET}. Note however that setting a diff --git a/doc/misc/vip.texi b/doc/misc/vip.texi index 5efd6ed684..59df749231 100644 --- a/doc/misc/vip.texi +++ b/doc/misc/vip.texi @@ -553,7 +553,7 @@ details. In Vi, @kbd{C-g} is used to get information about the file associated to the current buffer. Here, @kbd{g} will do that, and @kbd{C-g} is used to abort a command (this is for compatibility with emacs mode.) -@item SPC +@item @key{SPC} @itemx @key{RET} @kindex 040 SPC @r{(}@code{vip-scroll}@r{)} @kindex 015 RET @r{(}@code{vip-scroll-back}@r{)} @@ -1258,7 +1258,7 @@ Search forward incrementally. See GNU Emacs Manual for details Search backward incrementally (@code{isearch-backward}). @cindex vanilla (replacement) @cindex regular expression (replacement) -@item R @var{string} RET @var{newstring} +@item R @var{string} @key{RET} @var{newstring} @kindex 122 R @r{(}@code{vip-replace-string}@r{)} There are two modes of replacement, @dfn{vanilla} and @dfn{regular expression}. If the mode is @i{vanilla} you will get a prompt @samp{Replace string:}, @@ -1269,7 +1269,7 @@ vanilla, this command replaces every occurrence of @var{string} with @var{newstring}. If the mode is regular expression, @var{string} is treated as a regular expression and every string matching the regular expression is replaced with @var{newstring} (@code{vip-replace-string}). -@item Q @var{string} RET @var{newstring} +@item Q @var{string} @key{RET} @var{newstring} @kindex 121 Q @r{(}@code{vip-query-replace}@r{)} Same as @kbd{R} except that you will be asked form confirmation before each replacement @@ -1569,7 +1569,7 @@ keymap. See GNU Emacs Manual for details. @item C-@@ @kindex 000 C-@@ @r{(}@code{set-mark-command}@r{)} Set mark and push previous mark on mark ring (@code{set-mark-command}). -@item TAB +@item @key{TAB} @kindex 011 TAB @r{(}@code{indent-for-tab-command}@r{)} Indent line for current major mode (@code{indent-for-tab-command}). @item C-j diff --git a/doc/misc/viper.texi b/doc/misc/viper.texi index e1c45fb40e..2b300f6493 100644 --- a/doc/misc/viper.texi +++ b/doc/misc/viper.texi @@ -1083,7 +1083,7 @@ remembered (This is called ``learn mode'' in some editors.) where @samp{register} is any character from @samp{a} through @samp{z}. Then you can execute this macro using @kbd{@@register}. It is, of course, possible to yank some text into a register and execute it using -@kbd{@@register}. Typing @kbd{@@@@}, @kbd{@@RET}, or @kbd{@@C-j} will +@kbd{@@register}. Typing @kbd{@@@@}, @kbd{@@@key{RET}}, or @kbd{@@C-j} will execute the last macro that was executed using @kbd{@@register}. Viper will automatically lowercase the register, so that pressing the commit ce557a924a299650b5e0c93ba276f1ec651f7941 Author: Michael Albinus Date: Mon Feb 26 09:24:39 2018 +0100 Remove @key{} markups from @kindex entries in manuals * doc/emacs/basic.texi: * doc/emacs/buffers.texi: * doc/emacs/building.texi: * doc/emacs/calendar.texi: * doc/emacs/custom.texi: * doc/emacs/dired.texi: * doc/emacs/display.texi: * doc/emacs/files.texi: * doc/emacs/frames.texi: * doc/emacs/help.texi: * doc/emacs/indent.texi: * doc/emacs/killing.texi: * doc/emacs/kmacro.texi: * doc/emacs/mark.texi: * doc/emacs/mini.texi: * doc/emacs/misc.texi: * doc/emacs/modes.texi: * doc/emacs/msdos-xtra.texi: * doc/emacs/msdos.texi: * doc/emacs/mule.texi: * doc/emacs/picture-xtra.texi: * doc/emacs/programs.texi: * doc/emacs/regs.texi: * doc/emacs/rmail.texi: * doc/emacs/screen.texi: * doc/emacs/search.texi: * doc/emacs/sending.texi: * doc/emacs/text.texi: * doc/emacs/trouble.texi: * doc/misc/calc.texi: * doc/misc/cc-mode.texi: * doc/misc/ediff.texi: * doc/misc/ert.texi: * doc/misc/eww.texi: * doc/misc/forms.texi: * doc/misc/gnus.texi: * doc/misc/idlwave.texi: * doc/misc/info.texi: * doc/misc/message.texi: * doc/misc/mh-e.texi: * doc/misc/newsticker.texi: * doc/misc/org.texi: * doc/misc/pcl-cvs.texi: * doc/misc/rcirc.texi: * doc/misc/reftex.texi: * doc/misc/sc.texi: * doc/misc/sieve.texi: * doc/misc/vhdl-mode.texi: * doc/misc/vip.texi: * doc/misc/viper.texi: * doc/misc/woman.texi: Remove @key{} markups from @kindex entries. diff --git a/doc/emacs/basic.texi b/doc/emacs/basic.texi index cc689af6d2..b9e0ce4404 100644 --- a/doc/emacs/basic.texi +++ b/doc/emacs/basic.texi @@ -40,7 +40,7 @@ adds the character to the buffer at point. Insertion moves point forward, so that point remains just after the inserted text. @xref{Point}. -@kindex @key{RET} +@kindex RET @kindex C-j @cindex newline @c @findex electric-indent-just-newline @@ -182,7 +182,7 @@ keyboard commands that move point in more sophisticated ways. Move forward one character (@code{forward-char}). @item @key{RIGHT} -@kindex @key{RIGHT} +@kindex RIGHT @findex right-char This command (@code{right-char}) behaves like @kbd{C-f}, except when point is in a right-to-left paragraph (@pxref{Bidirectional Editing}). @@ -193,7 +193,7 @@ point is in a right-to-left paragraph (@pxref{Bidirectional Editing}). Move backward one character (@code{backward-char}). @item @key{LEFT} -@kindex @key{LEFT} +@kindex LEFT @findex left-char This command (@code{left-char}) behaves like @kbd{C-b}, except if the current paragraph is right-to-left (@pxref{Bidirectional Editing}). @@ -201,7 +201,7 @@ current paragraph is right-to-left (@pxref{Bidirectional Editing}). @item C-n @itemx @key{DOWN} @kindex C-n -@kindex @key{DOWN} +@kindex DOWN @findex next-line Move down one screen line (@code{next-line}). This command attempts to keep the horizontal position unchanged, so if you start in the @@ -210,7 +210,7 @@ middle of one line, you move to the middle of the next. @item C-p @itemx @key{UP} @kindex C-p -@kindex @key{UP} +@kindex UP @findex previous-line Move up one screen line (@code{previous-line}). This command preserves position within the line, like @kbd{C-n}. @@ -218,14 +218,14 @@ preserves position within the line, like @kbd{C-n}. @item C-a @itemx @key{Home} @kindex C-a -@kindex @key{HOME} +@kindex HOME @findex move-beginning-of-line Move to the beginning of the line (@code{move-beginning-of-line}). @item C-e @itemx @key{End} @kindex C-e -@kindex @key{END} +@kindex END @findex move-end-of-line Move to the end of the line (@code{move-end-of-line}). @@ -234,8 +234,8 @@ Move forward one word (@code{forward-word}). @xref{Words}. @item C-@key{RIGHT} @itemx M-@key{RIGHT} -@kindex C-@key{RIGHT} -@kindex M-@key{RIGHT} +@kindex C-RIGHT +@kindex M-RIGHT @findex right-word This command (@code{right-word}) behaves like @kbd{M-f}, except it moves @emph{backward} by one word if the current paragraph is @@ -246,8 +246,8 @@ Move backward one word (@code{backward-word}). @xref{Words}. @item C-@key{LEFT} @itemx M-@key{LEFT} -@kindex C-@key{LEFT} -@kindex M-@key{LEFT} +@kindex C-LEFT +@kindex M-LEFT @findex left-word This command (@code{left-word}) behaves like @kbd{M-b}, except it moves @emph{forward} by one word if the current paragraph is @@ -277,7 +277,7 @@ On graphical displays, @kbd{C-@key{HOME}} does the same. @item M-> @kindex M-> -@kindex C-@key{END} +@kindex C-END @findex end-of-buffer Move to the end of the buffer (@code{end-of-buffer}). On graphical displays, @kbd{C-@key{END}} does the same. @@ -314,7 +314,7 @@ also specify @var{n} by giving @kbd{M-g M-g} a numeric prefix argument. a plain prefix argument. @item M-g @key{TAB} -@kindex M-g @key{TAB} +@kindex M-g TAB @findex move-to-column Read a number @var{n} and move to column @var{n} in the current line. Column 0 is the leftmost column. If called with a prefix argument, diff --git a/doc/emacs/buffers.texi b/doc/emacs/buffers.texi index 2f0bb9740d..f8c1856058 100644 --- a/doc/emacs/buffers.texi +++ b/doc/emacs/buffers.texi @@ -111,8 +111,8 @@ it, Emacs asks for the file name to use, and the buffer's major mode is re-established taking that file name into account (@pxref{Choosing Modes}). -@kindex C-x @key{LEFT} -@kindex C-x @key{RIGHT} +@kindex C-x LEFT +@kindex C-x RIGHT @findex next-buffer @findex previous-buffer For conveniently switching between a few buffers, use the commands @@ -419,13 +419,13 @@ removing the flags. @item @key{DEL} @findex Buffer-menu-backup-unmark -@kindex @key{DEL} @r{(Buffer Menu)} +@kindex DEL @r{(Buffer Menu)} Move to the previous line and remove all flags on that line (@code{Buffer-menu-backup-unmark}). @item M-@key{DEL} @findex Buffer-menu-unmark-all-buffers -@kindex M-@key{DEL} @r{(Buffer Menu)} +@kindex M-DEL @r{(Buffer Menu)} Remove a particular flag from all lines (@code{Buffer-menu-unmark-all-buffers}). This asks for a single character, and unmarks buffers marked with that character; typing @@ -479,7 +479,7 @@ visible buffer is displayed in its place. @itemx f @findex Buffer-menu-this-window @kindex f @r{(Buffer Menu)} -@kindex @key{RET} @r{(Buffer Menu)} +@kindex RET @r{(Buffer Menu)} Select this line's buffer, replacing the @file{*Buffer List*} buffer in its window (@code{Buffer-menu-this-window}). diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi index 52a42a196a..7be96fa85c 100644 --- a/doc/emacs/building.texi +++ b/doc/emacs/building.texi @@ -768,7 +768,7 @@ be bizarre. See the GDB manual entry regarding @code{jump} for details. @item @key{TAB} -@kindex @key{TAB} @r{(GUD)} +@kindex TAB @r{(GUD)} @findex gud-gdb-complete-command With GDB, complete a symbol name (@code{gud-gdb-complete-command}). This key is available only in the GUD interaction buffer. @@ -998,7 +998,7 @@ to the @dfn{current breakpoint} (the breakpoint which point is on): @table @kbd @item @key{SPC} -@kindex @key{SPC} @r{(GDB Breakpoints buffer)} +@kindex SPC @r{(GDB Breakpoints buffer)} @findex gdb-toggle-breakpoint Enable/disable current breakpoint (@code{gdb-toggle-breakpoint}). On a graphical display, this changes the color of the dot in the fringe @@ -1011,7 +1011,7 @@ is enabled, and gray when it is disabled. Delete the current breakpoint (@code{gdb-delete-breakpoint}). @item @key{RET} -@kindex @key{RET} @r{(GDB Breakpoints buffer)} +@kindex RET @r{(GDB Breakpoints buffer)} @findex gdb-goto-breakpoint Visit the source line for the current breakpoint (@code{gdb-goto-breakpoint}). @@ -1204,7 +1204,7 @@ immediate children exceeds the value of the variable To delete a complex watch expression, move point to the root expression in the speedbar and type @kbd{D} (@code{gdb-var-delete}). -@kindex @key{RET} @r{(GDB speedbar)} +@kindex RET @r{(GDB speedbar)} @findex gdb-edit-value To edit a variable with a simple data type, or a simple element of a complex data type, move point there in the speedbar and type @key{RET} @@ -1490,7 +1490,7 @@ Evaluate all the Emacs Lisp expressions in the buffer. @ifinfo @c This uses 'colon' instead of a literal ':' because Info cannot @c cope with a ':' in a menu. -@kindex M-@key{colon} +@kindex M-colon @end ifinfo @ifnotinfo @kindex M-: diff --git a/doc/emacs/calendar.texi b/doc/emacs/calendar.texi index 98089fd20f..c6a84b5ab1 100644 --- a/doc/emacs/calendar.texi +++ b/doc/emacs/calendar.texi @@ -328,7 +328,7 @@ date. (@code{calendar-redraw}) to redraw it. (This can only happen if you use non-Calendar-mode editing commands.) -@kindex @key{SPC} @r{(Calendar mode)} +@kindex SPC @r{(Calendar mode)} In Calendar mode, you can use @key{SPC} (@code{scroll-other-window}) and @key{DEL} (@code{scroll-other-window-down}) to scroll the other window (if there is one) up or down, respectively. This is handy when diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi index da8f6f76a8..9ba7e21101 100644 --- a/doc/emacs/custom.texi +++ b/doc/emacs/custom.texi @@ -123,8 +123,8 @@ or moving point there and typing @kbd{@key{RET}}. For example, the group names like @samp{[Editing]} are links; activating one of these links brings up the customization buffer for that group. -@kindex @key{TAB} @r{(customization buffer)} -@kindex @key{S-TAB} @r{(customization buffer)} +@kindex TAB @r{(customization buffer)} +@kindex S-TAB @r{(customization buffer)} @findex widget-forward @findex widget-backward In the customization buffer, you can type @kbd{@key{TAB}} @@ -243,7 +243,7 @@ You don't have to worry about specifying a value that is not valid; the @samp{Set for Current Session} operation checks for validity and will not install an unacceptable value. -@kindex M-@key{TAB} @r{(customization buffer)} +@kindex M-TAB @r{(customization buffer)} @kindex C-M-i @r{(customization buffer)} @findex widget-complete While editing certain kinds of values, such as file names, directory diff --git a/doc/emacs/dired.texi b/doc/emacs/dired.texi index 2c2d9dded2..15c9cb5687 100644 --- a/doc/emacs/dired.texi +++ b/doc/emacs/dired.texi @@ -136,7 +136,7 @@ buffers. The keys @kbd{C-n} and @kbd{C-p} are redefined to put the cursor at the beginning of the file name on the line, rather than at the beginning of the line. -@kindex @key{SPC} @r{(Dired)} +@kindex SPC @r{(Dired)} For extra convenience, @key{SPC} and @kbd{n} in Dired are equivalent to @kbd{C-n}. @kbd{p} is equivalent to @kbd{C-p}. (Moving by lines is so common in Dired that it deserves to be easy to type.) @key{DEL} @@ -204,7 +204,7 @@ region for deletion; in this case, the command does not move point, and ignores any prefix argument. @kindex u @r{(Dired deletion)} -@kindex @key{DEL} @r{(Dired)} +@kindex DEL @r{(Dired)} The reason for flagging files for deletion, rather than deleting files immediately, is to reduce the danger of deleting a file accidentally. Until you direct Dired to delete the flagged files, you @@ -348,7 +348,7 @@ and supplying that file name (@code{dired-find-file}). @xref{Visiting}. @item @key{RET} @itemx e -@kindex @key{RET} @r{(Dired)} +@kindex RET @r{(Dired)} @kindex e @r{(Dired)} Equivalent to @kbd{f}. @@ -464,7 +464,7 @@ unmark the previous @minus{}@var{n} files). @item @key{DEL} @itemx * @key{DEL} -@kindex * @key{DEL} @r{(Dired)} +@kindex * DEL @r{(Dired)} @findex dired-unmark-backward @cindex unmarking files (in Dired) Move point to previous line and remove any mark on that line @@ -485,7 +485,7 @@ Remove all marks from all the files in this Dired buffer @item * ? @var{markchar} @itemx M-@key{DEL} @kindex * ? @r{(Dired)} -@kindex M-@key{DEL} @r{(Dired)} +@kindex M-DEL @r{(Dired)} @findex dired-unmark-all-files Remove all marks that use the character @var{markchar} (@code{dired-unmark-all-files}). If invoked with @kbd{M-@key{DEL}}, diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi index fdd18896f2..5ddc3d63e7 100644 --- a/doc/emacs/display.texi +++ b/doc/emacs/display.texi @@ -79,10 +79,10 @@ Scroll backward (@code{scroll-down-command}). @kindex C-v @kindex M-v -@kindex @key{next} -@kindex @key{prior} -@kindex @key{PageDown} -@kindex @key{PageUp} +@kindex next +@kindex prior +@kindex PageDown +@kindex PageUp @findex scroll-up-command @findex scroll-down-command @kbd{C-v} (@code{scroll-up-command}) scrolls forward by nearly the @@ -447,8 +447,8 @@ it. @xref{Disabling}. @cindex mode, View @kindex s @r{(View mode)} -@kindex @key{SPC} @r{(View mode)} -@kindex @key{DEL} @r{(View mode)} +@kindex SPC @r{(View mode)} +@kindex DEL @r{(View mode)} View mode is a minor mode that lets you scan a buffer by sequential screenfuls. It provides commands for scrolling through the buffer conveniently but not for changing it. Apart from the usual Emacs diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi index 9c2a922bfc..d7ca1e9161 100644 --- a/doc/emacs/files.texi +++ b/doc/emacs/files.texi @@ -1966,7 +1966,7 @@ then specifying @file{/tmp/foo*bar} will visit only @cindex file name caching @cindex cache of file names @pindex find -@kindex C-@key{TAB} +@kindex C-TAB @findex file-cache-minibuffer-complete You can use the @dfn{file name cache} to make it easy to locate a file by name, without having to remember exactly where it is located. diff --git a/doc/emacs/frames.texi b/doc/emacs/frames.texi index 4eb44ba96b..8cc4d649bb 100644 --- a/doc/emacs/frames.texi +++ b/doc/emacs/frames.texi @@ -480,13 +480,13 @@ cycles through all the frames on your terminal. Delete all frames on the current terminal, except the selected one. @item M-@key{F10} -@kindex M-@key{F10} +@kindex M-F10 @findex toggle-frame-maximized Toggle the maximization state of the current frame. When a frame is maximized, it fills the screen. @item @key{F11>} -@kindex @key{F11} +@kindex F11 @findex toggle-frame-fullscreen Toggle full-screen mode for the current frame. (The difference between full-screen and maximized is normally that the former diff --git a/doc/emacs/help.texi b/doc/emacs/help.texi index 4abd267276..a5700760d4 100644 --- a/doc/emacs/help.texi +++ b/doc/emacs/help.texi @@ -8,7 +8,7 @@ @cindex self-documentation @findex help-command @kindex C-h -@kindex @key{F1} +@kindex F1 @kindex C-h C-h @findex help-for-help @@ -431,7 +431,7 @@ Go back to the previous help topic (@code{help-go-back}). @findex help-follow @findex help-go-back @findex help-go-forward -@kindex @key{RET} @r{(Help mode)} +@kindex RET @r{(Help mode)} @kindex C-c C-b @r{(Help mode)} @kindex l @r{(Help mode)} @kindex C-c C-f @r{(Help mode)} @@ -455,9 +455,9 @@ code definitions, and URLs (web pages). The first two are opened in Emacs, and the third using a web browser via the @code{browse-url} command (@pxref{Browse-URL}). -@kindex @key{TAB} @r{(Help mode)} +@kindex TAB @r{(Help mode)} @findex forward-button -@kindex S-@key{TAB} @r{(Help mode)} +@kindex S-TAB @r{(Help mode)} @findex backward-button In a help buffer, @key{TAB} (@code{forward-button}) moves point forward to the next hyperlink, while @kbd{S-@key{TAB}} diff --git a/doc/emacs/indent.texi b/doc/emacs/indent.texi index eae334449c..b38e85819c 100644 --- a/doc/emacs/indent.texi +++ b/doc/emacs/indent.texi @@ -17,7 +17,7 @@ programming language modes. @xref{Program Indent}, for additional documentation about indenting in programming modes. @findex indent-for-tab-command -@kindex @key{TAB} @r{(indentation)} +@kindex TAB @r{(indentation)} The simplest way to perform indentation is the @key{TAB} key. In most major modes, this runs the command @code{indent-for-tab-command}. (In C and related modes, @key{TAB} runs the command @@ -120,7 +120,7 @@ If a numeric argument is supplied, indent every line in the region to that column number. @item C-x @key{TAB} -@kindex C-x @key{TAB} +@kindex C-x TAB @findex indent-rigidly @cindex remove indentation This command is used to change the indentation of all lines that begin diff --git a/doc/emacs/killing.texi b/doc/emacs/killing.texi index 7b89dce4e6..4118b752e6 100644 --- a/doc/emacs/killing.texi +++ b/doc/emacs/killing.texi @@ -111,7 +111,7 @@ active (@pxref{Using Region}). @kindex M-\ @findex delete-horizontal-space -@kindex M-@key{SPC} +@kindex M-SPC @findex just-one-space @findex cycle-spacing The other delete commands are those that delete only whitespace diff --git a/doc/emacs/kmacro.texi b/doc/emacs/kmacro.texi index 83fe1979e0..8528c9f6bd 100644 --- a/doc/emacs/kmacro.texi +++ b/doc/emacs/kmacro.texi @@ -64,8 +64,8 @@ Run the last keyboard macro on each line that begins in the region (@code{apply-macro-to-region-lines}). @end table -@kindex @key{F3} -@kindex @key{F4} +@kindex F3 +@kindex F4 @findex kmacro-start-macro-or-insert-counter @findex kmacro-end-or-call-macro @findex kmacro-end-and-call-macro @@ -481,7 +481,7 @@ Edit the last 300 keystrokes as a keyboard macro @findex kmacro-edit-macro @kindex C-x C-k C-e -@kindex C-x C-k @key{RET} +@kindex C-x C-k RET You can edit the last keyboard macro by typing @kbd{C-x C-k C-e} or @kbd{C-x C-k @key{RET}} (@code{kmacro-edit-macro}). This formats the macro definition in a buffer and enters a specialized major mode for @@ -505,7 +505,7 @@ keyboard input that you would use to invoke the macro---@kbd{C-x e} or @section Stepwise Editing a Keyboard Macro @findex kmacro-step-edit-macro -@kindex C-x C-k @key{SPC} +@kindex C-x C-k SPC You can interactively replay and edit the last keyboard macro, one command at a time, by typing @kbd{C-x C-k @key{SPC}} (@code{kmacro-step-edit-macro}). Unless you quit the macro using diff --git a/doc/emacs/mark.texi b/doc/emacs/mark.texi index 20cc67a1e7..0ffa9f74ac 100644 --- a/doc/emacs/mark.texi +++ b/doc/emacs/mark.texi @@ -79,7 +79,7 @@ Set the mark at point if the mark is inactive, then move point. @xref{Shift Selection}. @end table -@kindex C-@key{SPC} +@kindex C-SPC @kindex C-@@ @findex set-mark-command The most common way to set the mark is with @kbd{C-@key{SPC}} @@ -309,7 +309,7 @@ Move point to where the mark was, and restore the mark from the ring of former marks. @end table -@kindex C-@key{SPC} C-@key{SPC} +@kindex C-SPC C-SPC The command @kbd{C-@key{SPC} C-@key{SPC}} is handy when you want to use the mark to remember a position to which you may wish to return. It pushes the current point onto the mark ring, without activating the @@ -320,7 +320,7 @@ and the second @kbd{C-@key{SPC}} deactivates it. (When Transient Mark mode is off, @kbd{C-@key{SPC} C-@key{SPC}} instead activates Transient Mark mode temporarily; @pxref{Disabled Transient Mark}.) -@kindex C-u C-@key{SPC} +@kindex C-u C-SPC To return to a marked position, use @code{set-mark-command} with a prefix argument: @kbd{C-u C-@key{SPC}}. This moves point to where the mark was, and deactivates the mark if it was active. Each subsequent @@ -365,7 +365,7 @@ of buffers that you have been in, and, for each buffer, a place where you set the mark. The length of the global mark ring is controlled by @code{global-mark-ring-max}, and is 16 by default. -@kindex C-x C-@key{SPC} +@kindex C-x C-SPC @findex pop-global-mark The command @kbd{C-x C-@key{SPC}} (@code{pop-global-mark}) jumps to the buffer and position of the latest entry in the global ring. It also @@ -447,7 +447,7 @@ using @kbd{C-@key{SPC} C-@key{SPC}} or @kbd{C-u C-x C-x}. @table @kbd @item C-@key{SPC} C-@key{SPC} -@kindex C-@key{SPC} C-@key{SPC}@r{, disabling Transient Mark} +@kindex C-SPC C-SPC@r{, disabling Transient Mark} Set the mark at point (like plain @kbd{C-@key{SPC}}) and enable Transient Mark mode just once, until the mark is deactivated. (This is not really a separate command; you are using the @kbd{C-@key{SPC}} diff --git a/doc/emacs/mini.texi b/doc/emacs/mini.texi index 2a77b840e1..579697f47b 100644 --- a/doc/emacs/mini.texi +++ b/doc/emacs/mini.texi @@ -266,7 +266,7 @@ Completion}. @node Completion Example @subsection Completion Example -@kindex @key{TAB} @r{(completion example)} +@kindex TAB @r{(completion example)} A simple example may help here. @kbd{M-x} uses the minibuffer to read the name of a command, so completion works by matching the minibuffer text against the names of existing Emacs commands. Suppose @@ -318,7 +318,7 @@ first (@code{minibuffer-complete-and-exit}). @xref{Completion Exit}. Display a list of completions (@code{minibuffer-completion-help}). @end table -@kindex @key{TAB} @r{(completion)} +@kindex TAB @r{(completion)} @findex minibuffer-complete @key{TAB} (@code{minibuffer-complete}) is the most fundamental completion command. It searches for all possible completions that @@ -326,7 +326,7 @@ match the existing minibuffer text, and attempts to complete as much as it can. @xref{Completion Styles}, for how completion alternatives are chosen. -@kindex @key{SPC} @r{(completion)} +@kindex SPC @r{(completion)} @findex minibuffer-complete-word @key{SPC} (@code{minibuffer-complete-word}) completes like @key{TAB}, but only up to the next hyphen or space. If you have @@ -379,7 +379,7 @@ completion alternative (@code{previous-completion}). @node Completion Exit @subsection Completion Exit -@kindex @key{RET} @r{(completion in minibuffer)} +@kindex RET @r{(completion in minibuffer)} @findex minibuffer-complete-and-exit When a command reads an argument using the minibuffer with completion, it also controls what happens when you type @key{RET} @@ -655,8 +655,8 @@ directory. @findex previous-line-or-history-element @findex next-line-or-history-element -@kindex @key{UP} @r{(minibuffer history)} -@kindex @key{DOWN} @r{(minibuffer history)} +@kindex UP @r{(minibuffer history)} +@kindex DOWN @r{(minibuffer history)} The arrow keys @kbd{@key{UP}} and @kbd{@key{DOWN}} work like @kbd{M-p} and @kbd{M-n}, but if the current history item is longer than a single line, they allow you to move to the previous or next @@ -727,7 +727,7 @@ Display the entire command history, showing all the commands @kbd{C-x @key{ESC} @key{ESC}} can repeat, most recent first. @end table -@kindex C-x @key{ESC} @key{ESC} +@kindex C-x ESC ESC @findex repeat-complex-command @kbd{C-x @key{ESC} @key{ESC}} re-executes a recent command that used the minibuffer. With no argument, it repeats the last such command. diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi index 7f2a0a1107..e1b8070f43 100644 --- a/doc/emacs/misc.texi +++ b/doc/emacs/misc.texi @@ -129,7 +129,7 @@ sessions. The following commands are available in the Gnus group buffer: @table @kbd -@kindex @key{SPC} @r{(Gnus Group mode)} +@kindex SPC @r{(Gnus Group mode)} @findex gnus-group-read-group @item @key{SPC} Switch to the summary buffer for the group on the current line. @@ -177,7 +177,7 @@ Kill the group on the current line. Killed groups are not recorded in the @file{.newsrc} file, and they are not shown in the @kbd{l} or @kbd{L} listings. -@kindex @key{DEL} @r{(Gnus Group mode)} +@kindex DEL @r{(Gnus Group mode)} @item @key{DEL} Move point to the previous group containing unread articles. @@ -203,7 +203,7 @@ Update your Gnus settings, and quit Gnus. The following commands are available in the Gnus summary buffer: @table @kbd -@kindex @key{SPC} @r{(Gnus Summary mode)} +@kindex SPC @r{(Gnus Summary mode)} @findex gnus-summary-next-page @item @key{SPC} If there is no article selected, select the article on the current @@ -214,7 +214,7 @@ buffer, select the next unread article. Thus, you can read through all articles by repeatedly typing @key{SPC}. -@kindex @key{DEL} @r{(Gnus Summary mode)} +@kindex DEL @r{(Gnus Summary mode)} @findex gnus-summary-prev-page @item @key{DEL} Scroll the text of the article backwards. @@ -481,8 +481,8 @@ page, type @kbd{p}, @key{prior} or @kbd{C-x [} @findex doc-view-scroll-up-or-next-page @findex doc-view-scroll-down-or-previous-page -@kindex @key{SPC} @r{(DocView mode)} -@kindex @key{DEL} @r{(DocView mode)} +@kindex SPC @r{(DocView mode)} +@kindex DEL @r{(DocView mode)} @key{SPC} (@code{doc-view-scroll-up-or-next-page}) is a convenient way to advance through the document. It scrolls within the current page or advances to the next. @key{DEL} moves backwards in a similar @@ -826,7 +826,7 @@ commands: @table @kbd @item @key{RET} -@kindex @key{RET} @r{(Shell mode)} +@kindex RET @r{(Shell mode)} @findex comint-send-input Send the current line as input to the subshell (@code{comint-send-input}). Any shell prompt at the beginning of the @@ -836,7 +836,7 @@ interactive shell. However, you can also invoke @key{RET} elsewhere in the shell buffer to submit the current line as input. @item @key{TAB} -@kindex @key{TAB} @r{(Shell mode)} +@kindex TAB @r{(Shell mode)} @findex completion-at-point@r{, in Shell Mode} @cindex shell completion Complete the command name or file name before point in the shell @@ -1182,7 +1182,7 @@ Move point to the previous prompt (@code{comint-previous-prompt}). @item C-c C-n Move point to the following prompt (@code{comint-next-prompt}). -@kindex C-c @key{RET} @r{(Shell mode)} +@kindex C-c RET @r{(Shell mode)} @findex comint-copy-old-input @item C-c @key{RET} Copy the input command at point, inserting the copy at the end of the @@ -2796,7 +2796,7 @@ the package commentary by typing @kbd{C-h P browse-url @key{RET}}. Activate URLs and e-mail addresses in the current buffer. @end table -@kindex C-c @key{RET} @r{(Goto Address mode)} +@kindex C-c RET @r{(Goto Address mode)} @findex goto-address-at-point You can make Emacs mark out URLs specially in the current buffer, by typing @kbd{M-x goto-address-mode}. When this buffer-local minor mode diff --git a/doc/emacs/modes.texi b/doc/emacs/modes.texi index fd8f0110a3..2bbc17b26d 100644 --- a/doc/emacs/modes.texi +++ b/doc/emacs/modes.texi @@ -33,8 +33,8 @@ one another, and of the selected major mode. @section Major Modes @cindex major modes @cindex mode, major -@kindex @key{TAB} @r{(and major modes)} -@kindex @key{DEL} @r{(and major modes)} +@kindex TAB @r{(and major modes)} +@kindex DEL @r{(and major modes)} @kindex C-j @r{(and major modes)} Every buffer possesses a major mode, which determines the editing @@ -236,7 +236,7 @@ called Outline mode. @xref{Outline Mode}. @cindex Overwrite mode @cindex mode, Overwrite @findex overwrite-mode -@kindex @key{INSERT} +@kindex INSERT @item Overwrite mode causes ordinary printing characters to replace existing text instead of shoving it to the right. For example, if point is in diff --git a/doc/emacs/msdos-xtra.texi b/doc/emacs/msdos-xtra.texi index 94e4161c15..406ebd1905 100644 --- a/doc/emacs/msdos-xtra.texi +++ b/doc/emacs/msdos-xtra.texi @@ -47,8 +47,8 @@ about Emacs's special handling of text files under MS-DOS (and Windows). @node MS-DOS Keyboard @subsection Keyboard Usage on MS-DOS -@kindex @key{DEL} @r{(MS-DOS)} -@kindex @key{BS} @r{(MS-DOS)} +@kindex DEL @r{(MS-DOS)} +@kindex BS @r{(MS-DOS)} The key that is called @key{DEL} in Emacs (because that's how it is designated on most workstations) is known as @key{BS} (backspace) on a PC@. That is why the PC-specific terminal initialization remaps the @@ -56,7 +56,7 @@ PC@. That is why the PC-specific terminal initialization remaps the as @kbd{C-d} for the same reasons. @kindex C-g @r{(MS-DOS)} -@kindex C-@key{Break} @r{(MS-DOS)} +@kindex C-Break @r{(MS-DOS)} @cindex quitting on MS-DOS Emacs built for MS-DOS recognizes @kbd{C-@key{Break}} as a quit character, just like @kbd{C-g}. This is because Emacs cannot detect diff --git a/doc/emacs/msdos.texi b/doc/emacs/msdos.texi index 9af0edaa12..b3b40d476e 100644 --- a/doc/emacs/msdos.texi +++ b/doc/emacs/msdos.texi @@ -579,7 +579,7 @@ modifier with the trailing dash but with no key indicates that all Windows defined hotkeys for that modifier are to be overridden in the favor of Emacs. -@kindex M-@key{TAB}@r{, (MS-Windows)} +@kindex M-TAB@r{, (MS-Windows)} @cindex @kbd{M-@key{TAB}} vs @kbd{@key{Alt}-@key{TAB}} (MS-Windows) @cindex @kbd{@key{Alt}-@key{TAB}} vs @kbd{M-@key{TAB}} (MS-Windows) For example, @code{(w32-register-hot-key [M-tab])} lets you use @@ -693,7 +693,7 @@ its normal effect: for example, @kbd{@key{Lwindow}} opens the @code{Start} menu, etc. @vindex w32-recognize-altgr -@kindex @key{AltGr} @r{(MS-Windows)} +@kindex AltGr @r{(MS-Windows)} @cindex @key{AltGr} key (MS-Windows) The variable @code{w32-recognize-altgr} controls whether the @key{AltGr} key (if it exists on your keyboard), or its equivalent, diff --git a/doc/emacs/mule.texi b/doc/emacs/mule.texi index 487285f8d3..dc80bc9217 100644 --- a/doc/emacs/mule.texi +++ b/doc/emacs/mule.texi @@ -130,7 +130,7 @@ various @dfn{input methods}, typically one for each script or language, which make it easier to type characters in the script. @xref{Input Methods}. -@kindex C-x @key{RET} +@kindex C-x RET The prefix key @kbd{C-x @key{RET}} is used for commands that pertain to multibyte characters, coding systems, and input methods. @@ -577,7 +577,7 @@ Display a list of all the supported input methods. @findex set-input-method @vindex current-input-method -@kindex C-x @key{RET} C-\ +@kindex C-x RET C-\ To choose an input method for the current buffer, use @kbd{C-x @key{RET} C-\} (@code{set-input-method}). This command reads the input method name from the minibuffer; the name normally starts with the @@ -1021,7 +1021,7 @@ Convert a region that was decoded using coding system @var{wrong}, decoding it using coding system @var{right} instead. @end table -@kindex C-x @key{RET} f +@kindex C-x RET f @findex set-buffer-file-coding-system The command @kbd{C-x @key{RET} f} (@code{set-buffer-file-coding-system}) sets the file coding system for @@ -1043,7 +1043,7 @@ current buffer. For example, @kbd{C-x @key{RET} f dos @key{RET}} will cause Emacs to save the current buffer's text with DOS-style carriage-return linefeed line endings. -@kindex C-x @key{RET} c +@kindex C-x RET c @findex universal-coding-system-argument Another way to specify the coding system for a file is when you visit the file. First use the command @kbd{C-x @key{RET} c} @@ -1077,7 +1077,7 @@ then save it in a file. Selecting a language environment typically sets this variable to a good choice of default coding system for that language environment. -@kindex C-x @key{RET} r +@kindex C-x RET r @findex revert-buffer-with-coding-system If you visit a file with a wrong coding system, you can correct this with @kbd{C-x @key{RET} r} (@code{revert-buffer-with-coding-system}). @@ -1113,8 +1113,8 @@ subprocess input and output in the current buffer (@code{set-buffer-process-coding-system}). @end table -@kindex C-x @key{RET} x -@kindex C-x @key{RET} X +@kindex C-x RET x +@kindex C-x RET X @findex set-selection-coding-system @findex set-next-selection-coding-system The command @kbd{C-x @key{RET} x} (@code{set-selection-coding-system}) @@ -1139,7 +1139,7 @@ list of some of these symbols, Emacs tries only the request types in the list, in order, until one of them succeeds, or until the list is exhausted. -@kindex C-x @key{RET} p +@kindex C-x RET p @findex set-buffer-process-coding-system The command @kbd{C-x @key{RET} p} (@code{set-buffer-process-coding-system}) specifies the coding system for input and output to a subprocess. This @@ -1181,7 +1181,7 @@ names (@code{set-file-name-coding-system}). @end table @findex set-file-name-coding-system -@kindex C-x @key{RET} F +@kindex C-x RET F @cindex file names with non-@acronym{ASCII} characters The command @kbd{C-x @key{RET} F} (@code{set-file-name-coding-system}) specifies a coding system to use for encoding file @emph{names}. It @@ -1247,7 +1247,7 @@ Use coding system @var{coding} for keyboard input (@code{set-keyboard-coding-system}). @end table -@kindex C-x @key{RET} t +@kindex C-x RET t @findex set-terminal-coding-system The command @kbd{C-x @key{RET} t} (@code{set-terminal-coding-system}) specifies the coding system for terminal output. If you specify a @@ -1264,7 +1264,7 @@ Emacs knows which characters the terminal can actually handle. Emacs can deduce the proper coding system from your terminal type or your locale specification (@pxref{Language Environments}). -@kindex C-x @key{RET} k +@kindex C-x RET k @findex set-keyboard-coding-system @vindex keyboard-coding-system The command @kbd{C-x @key{RET} k} (@code{set-keyboard-coding-system}), @@ -1843,8 +1843,8 @@ character positions may look discontinuous if the region spans reordered text. This is normal and similar to the behavior of other programs that support bidirectional text. -@kindex @key{RIGHT}@r{, and bidirectional text} -@kindex @key{LEFT}@r{, and bidirectional text} +@kindex RIGHT@r{, and bidirectional text} +@kindex LEFT@r{, and bidirectional text} @findex right-char@r{, and bidirectional text} @findex left-char@r{, and bidirectional text} Cursor motion commands bound to arrow keys, such as @key{LEFT} and diff --git a/doc/emacs/picture-xtra.texi b/doc/emacs/picture-xtra.texi index 35387a07b0..39c353b0ff 100644 --- a/doc/emacs/picture-xtra.texi +++ b/doc/emacs/picture-xtra.texi @@ -191,7 +191,7 @@ C-b} (@code{picture-motion-reverse}) moves in the opposite direction. @node Tabs in Picture @subsection Picture Mode Tabs -@kindex M-@key{TAB} @r{(Picture mode)} +@kindex M-TAB @r{(Picture mode)} @findex picture-tab-search @vindex picture-tab-chars Two kinds of tab-like action are provided in Picture mode. Use @@ -214,7 +214,7 @@ current tab stop settings; it is the Picture mode equivalent of @code{tab-to-tab-stop}. Normally it just moves point, but with a numeric argument it clears the text that it moves over. -@kindex C-c @key{TAB} @r{(Picture mode)} +@kindex C-c TAB @r{(Picture mode)} @findex picture-set-tab-stops The context-based and tab-stop-based forms of tabbing are brought together by the command @kbd{C-c @key{TAB}} (@code{picture-set-tab-stops}). diff --git a/doc/emacs/programs.texi b/doc/emacs/programs.texi index 76a7b89645..3a4330ea89 100644 --- a/doc/emacs/programs.texi +++ b/doc/emacs/programs.texi @@ -100,7 +100,7 @@ language that you might want to edit. If it doesn't have a mode for your favorite language, the mode might be implemented in a package not distributed with Emacs (@pxref{Packages}); or you can contribute one. -@kindex @key{DEL} @r{(programming modes)} +@kindex DEL @r{(programming modes)} @findex backward-delete-char-untabify In most programming languages, indentation should vary from line to line to illustrate the structure of the program. Therefore, in most @@ -381,7 +381,7 @@ Insert a newline, then adjust indentation of following line (@code{newline}). @end table -@kindex @key{TAB} @r{(programming modes)} +@kindex TAB @r{(programming modes)} @findex indent-line-function The basic indentation command is @kbd{@key{TAB}} (@code{indent-for-tab-command}), which was documented in @@ -446,7 +446,7 @@ indentation of the line where the grouping starts). The function that etc. To correct the overall indentation as well, type @kbd{@key{TAB}} first. -@kindex C-u @key{TAB} +@kindex C-u TAB If you like the relative indentation within a grouping but not the indentation of its first line, move point to that first line and type @kbd{C-u @key{TAB}}. In Lisp, C, and some other major modes, @@ -718,7 +718,7 @@ argument moves the previous balanced expression backwards across those before it. An argument of zero, rather than doing nothing, transposes the balanced expressions ending at or after point and the mark. -@kindex C-M-@key{SPC} +@kindex C-M-SPC To operate on balanced expressions with a command which acts on the region, type @kbd{C-M-@key{SPC}} (@code{mark-sexp}). This sets the mark where @kbd{C-M-f} would move to. While the mark is active, each @@ -1380,7 +1380,7 @@ nor comments). The default value is @code{code}. Completion is normally done in the minibuffer (@pxref{Completion}), but you can also complete symbol names in ordinary Emacs buffers. -@kindex M-@key{TAB} +@kindex M-TAB @kindex C-M-i In programming language modes, type @kbd{C-M-i} or @kbd{M-@key{TAB}} to complete the partial symbol before point. On graphical displays, @@ -1486,7 +1486,7 @@ Prompt for the name of a function defined in any file Emacs has parsed, and move point there (@code{semantic-complete-jump}). @item C-c , @key{SPC} -@kindex C-c , @key{SPC} +@kindex C-c , SPC Display a list of possible completions for the symbol at point (@code{semantic-complete-analyze-inline}). This also activates a set of special key bindings for choosing a completion: @kbd{@key{RET}} @@ -1736,8 +1736,8 @@ preprocessor commands. @item C-c C-@key{DEL} @itemx C-c @key{DEL} @findex c-hungry-delete-backwards -@kindex C-c C-@key{DEL} @r{(C Mode)} -@kindex C-c @key{DEL} @r{(C Mode)} +@kindex C-c C-DEL @r{(C Mode)} +@kindex C-c DEL @r{(C Mode)} Delete the entire block of whitespace preceding point (@code{c-hungry-delete-backwards}). @item C-c C-d @@ -1745,8 +1745,8 @@ Delete the entire block of whitespace preceding point (@code{c-hungry-delete-bac @itemx C-c @key{Delete} @findex c-hungry-delete-forward @kindex C-c C-d @r{(C Mode)} -@kindex C-c C-@key{Delete} @r{(C Mode)} -@kindex C-c @key{Delete} @r{(C Mode)} +@kindex C-c C-Delete @r{(C Mode)} +@kindex C-c Delete @r{(C Mode)} Delete the entire block of whitespace after point (@code{c-hungry-delete-forward}). @end table diff --git a/doc/emacs/regs.texi b/doc/emacs/regs.texi index 37a69347f4..8ff36ca554 100644 --- a/doc/emacs/regs.texi +++ b/doc/emacs/regs.texi @@ -70,7 +70,7 @@ Jump to the position and buffer saved in register @var{r} (@code{jump-to-register}). @end table -@kindex C-x r @key{SPC} +@kindex C-x r SPC @findex point-to-register Typing @kbd{C-x r @key{SPC}} (@code{point-to-register}), followed by a character @kbd{@var{r}}, saves both the position of point and the diff --git a/doc/emacs/rmail.texi b/doc/emacs/rmail.texi index 15d66a3840..e9371f39a9 100644 --- a/doc/emacs/rmail.texi +++ b/doc/emacs/rmail.texi @@ -109,9 +109,9 @@ Scroll to start of message (@code{rmail-beginning-of-message}). Scroll to end of message (@code{rmail-end-of-message}). @end table -@kindex @key{SPC} @r{(Rmail)} -@kindex @key{DEL} @r{(Rmail)} -@kindex S-@key{SPC} @r{(Rmail)} +@kindex SPC @r{(Rmail)} +@kindex DEL @r{(Rmail)} +@kindex S-SPC @r{(Rmail)} Since the most common thing to do while reading a message is to scroll through it by screenfuls, Rmail makes @key{SPC} and @key{DEL} (or @kbd{S-@key{SPC}}) do the same as @kbd{C-v} (@code{scroll-up-command}) diff --git a/doc/emacs/screen.texi b/doc/emacs/screen.texi index 674d1165d8..19a4a9e4b6 100644 --- a/doc/emacs/screen.texi +++ b/doc/emacs/screen.texi @@ -304,7 +304,7 @@ the full command name and documentation for a menu item, type @kbd{C-h k}, and then select the menu bar with the mouse in the usual way (@pxref{Key Help}). -@kindex @key{F10} +@kindex F10 @findex menu-bar-open @cindex menu bar access using keyboard Instead of using the mouse, you can also invoke the first menu bar diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi index 7ca73f9b6d..723bdf1ad8 100644 --- a/doc/emacs/search.texi +++ b/doc/emacs/search.texi @@ -397,7 +397,7 @@ or @code{query-replace-regexp} (depending on search mode) with the current search string used as the string to replace. A negative prefix argument means to replace backward. @xref{Query Replace}. -@kindex M-@key{TAB} @r{(Incremental search)} +@kindex M-TAB @r{(Incremental search)} Typing @kbd{M-@key{TAB}} in incremental search invokes @code{isearch-complete}, which attempts to complete the search string using the search ring (the previous search strings you used) as a list @@ -1186,8 +1186,8 @@ differences usually don't matter; etc. This is known as tailor them to your needs. @cindex lax space matching in search -@kindex M-s @key{SPC} @r{(Incremental search)} -@kindex @key{SPC} @r{(Incremental search)} +@kindex M-s SPC @r{(Incremental search)} +@kindex SPC @r{(Incremental search)} @findex isearch-toggle-lax-whitespace @vindex search-whitespace-regexp By default, search commands perform @dfn{lax space matching}: @@ -1570,10 +1570,10 @@ read-only text. The default is not to ignore them. or regexp are: @ignore @c Not worth it. -@kindex @key{SPC} @r{(query-replace)} -@kindex @key{DEL} @r{(query-replace)} +@kindex SPC @r{(query-replace)} +@kindex DEL @r{(query-replace)} @kindex , @r{(query-replace)} -@kindex @key{RET} @r{(query-replace)} +@kindex RET @r{(query-replace)} @kindex . @r{(query-replace)} @kindex ! @r{(query-replace)} @kindex ^ @r{(query-replace)} @@ -1770,7 +1770,7 @@ Note that matches for the regexp you type are extended to include complete lines, and a match that starts before the previous match ends is not considered a match. -@kindex @key{RET} @r{(Occur mode)} +@kindex RET @r{(Occur mode)} @kindex o @r{(Occur mode)} @kindex C-o @r{(Occur mode)} In the @file{*Occur*} buffer, you can click on each entry, or move diff --git a/doc/emacs/sending.texi b/doc/emacs/sending.texi index c7cc005a21..b7bdd69c7c 100644 --- a/doc/emacs/sending.texi +++ b/doc/emacs/sending.texi @@ -461,7 +461,7 @@ just after the header separator line---that is, to the beginning of the body. @findex message-tab -@kindex @key{TAB} @r{(Message mode)} +@kindex TAB @r{(Message mode)} While editing a header field that contains addresses, such as @samp{To:}, @samp{Cc:} and @samp{Bcc:}, you can complete an address by typing @key{TAB} (@code{message-tab}). This attempts to insert the diff --git a/doc/emacs/text.texi b/doc/emacs/text.texi index 2170e8648b..e00c550343 100644 --- a/doc/emacs/text.texi +++ b/doc/emacs/text.texi @@ -137,7 +137,7 @@ kill only the next word but not the punctuation before it, simply do @kbd{M-@key{DEL}}.) @kbd{M-d} takes arguments just like @kbd{M-f}. @findex backward-kill-word -@kindex M-@key{DEL} +@kindex M-DEL @kbd{M-@key{DEL}} (@code{backward-kill-word}) kills the word before point. It kills everything from point back to where @kbd{M-b} would move to. For instance, if point is after the space in @w{@samp{FOO, @@ -214,7 +214,7 @@ of the sentence. With a positive numeric argument @var{n}, it kills the next @var{n} sentences; with a negative argument @minus{}@var{n}, it kills back to the beginning of the @var{n}th preceding sentence. -@kindex C-x @key{DEL} +@kindex C-x DEL @findex backward-kill-sentence The @kbd{C-x @key{DEL}} (@code{backward-kill-sentence}) kills back to the beginning of a sentence. @@ -878,7 +878,7 @@ paragraphs. As a result, paragraphs can be indented, and adaptive filling determines what indentation to use when filling a paragraph. @xref{Adaptive Fill}. -@kindex @key{TAB} @r{(Text mode)} +@kindex TAB @r{(Text mode)} In Text mode, the @key{TAB} (@code{indent-for-tab-command}) command usually inserts whitespace up to the next tab stop, instead of indenting the current line. @xref{Indentation}, for details. @@ -905,7 +905,7 @@ paragraph-indent-minor-mode} to enable an equivalent minor mode for situations where you shouldn't change the major mode---in mail composition, for instance. -@kindex M-@key{TAB} @r{(Text mode)} +@kindex M-TAB @r{(Text mode)} Text mode binds @kbd{M-@key{TAB}} to @code{ispell-complete-word}. This command performs completion of the partial word in the buffer before point, using the spelling dictionary as the space of possible @@ -1352,7 +1352,7 @@ starts with one or more @samp{*} characters. @xref{Outline Format}. In addition, any line that begins with the @samp{#} character is treated as a comment. -@kindex @key{TAB} @r{(Org Mode)} +@kindex TAB @r{(Org Mode)} @findex org-cycle Org mode provides commands for easily viewing and manipulating the outline structure. The simplest of these commands is @key{TAB} @@ -1363,17 +1363,17 @@ of its direct children, if any, and (iii) showing the entire subtree. If invoked in a body line, the global binding for @key{TAB} is executed. -@kindex S-@key{TAB} @r{(Org Mode)} +@kindex S-TAB @r{(Org Mode)} @findex org-shifttab Typing @kbd{S-@key{TAB}} (@code{org-shifttab}) anywhere in an Org mode buffer cycles the visibility of the entire outline structure, between (i) showing only top-level heading lines, (ii) showing all heading lines but no body lines, and (iii) showing everything. -@kindex M-@key{UP} @r{(Org Mode)} -@kindex M-@key{DOWN} @r{(Org Mode)} -@kindex M-@key{LEFT} @r{(Org Mode)} -@kindex M-@key{RIGHT} @r{(Org Mode)} +@kindex M-UP @r{(Org Mode)} +@kindex M-DOWN @r{(Org Mode)} +@kindex M-LEFT @r{(Org Mode)} +@kindex M-RIGHT @r{(Org Mode)} @findex org-metaup @findex org-metadown @findex org-metaleft @@ -1852,7 +1852,7 @@ in a local variable list in each of the subfiles. @xref{File Variables}. @findex tex-bibtex-file -@kindex C-c @key{TAB} @r{(@TeX{} mode)} +@kindex C-c TAB @r{(@TeX{} mode)} @vindex tex-bibtex-command For @LaTeX{} files, you can use Bib@TeX{} to process the auxiliary file for the current buffer's file. Bib@TeX{} looks up bibliographic @@ -1995,7 +1995,7 @@ Run a shell command (which you must specify) to validate the current buffer as SGML (@code{sgml-validate}). @item C-c @key{TAB} -@kindex C-c @key{TAB} @r{(SGML mode)} +@kindex C-c TAB @r{(SGML mode)} @findex sgml-tags-invisible Toggle the visibility of existing tags in the buffer. This can be used as a cheap preview (@code{sgml-tags-invisible}). @@ -2308,7 +2308,7 @@ These margins also affect fill commands such as @kbd{M-q} for specifying indentation: @table @code -@kindex C-x @key{TAB} @r{(Enriched mode)} +@kindex C-x TAB @r{(Enriched mode)} @findex increase-left-margin @item Indent More Indent the region by 4 columns (@code{increase-left-margin}). In @@ -2848,7 +2848,7 @@ buffer. There are three ways to enter two-column mode: @table @asis @item @kbd{@key{F2} 2} or @kbd{C-x 6 2} -@kindex @key{F2} 2 +@kindex F2 2 @kindex C-x 6 2 @findex 2C-two-columns Enter two-column mode with the current buffer on the left, and on the @@ -2861,7 +2861,7 @@ This command is appropriate when the current buffer is empty or contains just one column and you want to add another column. @item @kbd{@key{F2} s} or @kbd{C-x 6 s} -@kindex @key{F2} s +@kindex F2 s @kindex C-x 6 s @findex 2C-split Split the current buffer, which contains two-column text, into two @@ -2876,7 +2876,7 @@ two-column text, and you wish to separate the columns temporarily. @item @kbd{@key{F2} b @var{buffer} @key{RET}} @itemx @kbd{C-x 6 b @var{buffer} @key{RET}} -@kindex @key{F2} b +@kindex F2 b @kindex C-x 6 b @findex 2C-associate-buffer Enter two-column mode using the current buffer as the left-hand buffer, @@ -2900,15 +2900,15 @@ way to write a line that spans both columns while in two-column mode: write it in the left-hand buffer, and put an empty line in the right-hand buffer.) -@kindex @key{F2} @key{RET} -@kindex C-x 6 @key{RET} +@kindex F2 RET +@kindex C-x 6 RET @findex 2C-newline The command @kbd{C-x 6 @key{RET}} or @kbd{@key{F2} @key{RET}} (@code{2C-newline}) inserts a newline in each of the two buffers at corresponding positions. This is the easiest way to add a new line to the two-column text while editing it in split buffers. -@kindex @key{F2} 1 +@kindex F2 1 @kindex C-x 6 1 @findex 2C-merge When you have edited both buffers as you wish, merge them with @@ -2916,7 +2916,7 @@ the two-column text while editing it in split buffers. text from the right-hand buffer as a second column in the other buffer. To go back to two-column editing, use @kbd{@key{F2} s}. -@kindex @key{F2} d +@kindex F2 d @kindex C-x 6 d @findex 2C-dissociate Use @kbd{@key{F2} d} or @kbd{C-x 6 d} to dissociate the two buffers, diff --git a/doc/emacs/trouble.texi b/doc/emacs/trouble.texi index 1b81797f0d..c0dc3d472e 100644 --- a/doc/emacs/trouble.texi +++ b/doc/emacs/trouble.texi @@ -104,7 +104,7 @@ argument, you can cancel that argument with @kbd{C-g} and remain in the recursive edit. @findex keyboard-escape-quit -@kindex @key{ESC} @key{ESC} @key{ESC} +@kindex ESC ESC ESC The sequence @kbd{@key{ESC} @key{ESC} @key{ESC}} (@code{keyboard-escape-quit}) can either quit or abort. (We defined it this way because @key{ESC} means ``get out'' in many PC programs.) diff --git a/doc/misc/calc.texi b/doc/misc/calc.texi index a29097cfda..cd2f66d24e 100644 --- a/doc/misc/calc.texi +++ b/doc/misc/calc.texi @@ -9710,7 +9710,7 @@ The @kbd{C-x * x} command also turns the Calculator off, no matter which user interface (standard, Keypad, or Embedded) is currently active. It also cancels @code{calc-edit} mode if used from there. -@kindex d @key{SPC} +@kindex d SPC @pindex calc-refresh @cindex Refreshing a garbled display @cindex Garbled displays, refreshing @@ -10268,7 +10268,7 @@ information is cleared whenever you give any command that adds new undo information, i.e., if you undo, then enter a number on the stack or make any other change, then it will be too late to redo. -@kindex M-@key{RET} +@kindex M-RET @pindex calc-last-args @cindex Last-arguments feature @cindex Arguments, restoring @@ -11732,8 +11732,8 @@ type, such as numbers, vectors, formulas, and incomplete objects.) @section Stack Manipulation Commands @noindent -@kindex @key{RET} -@kindex @key{SPC} +@kindex RET +@kindex SPC @pindex calc-enter @cindex Duplicating stack entries To duplicate the top object on the stack, press @key{RET} or @key{SPC} @@ -11749,7 +11749,7 @@ For example, with @samp{10 20 30} on the stack, @kbd{C-u - 2 @key{RET}} creates @samp{10 20 30 20}, and @kbd{C-u 0 @key{RET}} creates @samp{10 20 30 10 20 30}. -@kindex @key{LFD} +@kindex LFD @pindex calc-over The @key{LFD} (@code{calc-over}) command (on a key marked Line-Feed if you have it, else on @kbd{C-j}) is like @code{calc-enter} @@ -11759,7 +11759,7 @@ Thus with @samp{10 20 30} on the stack, @key{LFD} and @kbd{C-u 2 @key{LFD}} are both equivalent to @kbd{C-u - 2 @key{RET}}, producing @samp{10 20 30 20}. -@kindex @key{DEL} +@kindex DEL @kindex C-d @pindex calc-pop @cindex Removing stack entries @@ -11777,7 +11777,7 @@ For example, with @samp{10 20 30} on the stack, @kbd{C-u - 2 @key{DEL}} leaves @samp{10 30}, and @kbd{C-u 0 @key{DEL}} leaves an empty stack. -@kindex M-@key{DEL} +@kindex M-DEL @pindex calc-pop-above The @kbd{M-@key{DEL}} (@code{calc-pop-above}) command is to @key{DEL} what @key{LFD} is to @key{RET}: It interprets the sign of the numeric @@ -11798,7 +11798,7 @@ specified element of the stack regardless of the cursor position. Similarly, @key{DEL} will remove the corresponding elements from the stack. -@kindex @key{TAB} +@kindex TAB @pindex calc-roll-down To exchange the top two elements of the stack, press @key{TAB} (@code{calc-roll-down}). Given a positive numeric prefix argument, the @@ -11812,7 +11812,7 @@ For example, with @samp{10 20 30 40 50} on the stack, @kbd{C-u - 2 @key{TAB}} creates @samp{40 50 10 20 30}, and @kbd{C-u 0 @key{TAB}} creates @samp{50 40 30 20 10}. -@kindex M-@key{TAB} +@kindex M-TAB @pindex calc-roll-up The command @kbd{M-@key{TAB}} (@code{calc-roll-up}) is analogous to @key{TAB} except that it rotates upward instead of downward. Also, the default @@ -13075,7 +13075,7 @@ refresh the stack to leave the stack display alone. The word ``Dirty'' will appear in the mode line when Calc thinks the stack display may not reflect the latest mode settings. -@kindex d @key{RET} +@kindex d RET @pindex calc-refresh-top The @kbd{d @key{RET}} (@code{calc-refresh-top}) command reformats the top stack entry according to all the current modes. Positive prefix @@ -21942,7 +21942,7 @@ If you select an element of a vector and press @key{DEL}, that element is deleted from the vector. If you delete one side of an equation or inequality, only the opposite side remains. -@kindex j @key{DEL} +@kindex j DEL @pindex calc-del-selection The @kbd{j @key{DEL}} (@code{calc-del-selection}) command is like @key{DEL} but with the auto-selecting behavior of @kbd{j '} and @@ -21950,7 +21950,7 @@ The @kbd{j @key{DEL}} (@code{calc-del-selection}) command is like indicated by the cursor, or, in the absence of a selection, it deletes the sub-formula indicated by the cursor position. -@kindex j @key{RET} +@kindex j RET @pindex calc-grab-selection (There is also an auto-selecting @kbd{j @key{RET}} (@code{calc-copy-selection}) command.) diff --git a/doc/misc/cc-mode.texi b/doc/misc/cc-mode.texi index 438919b2d8..52cd97bca6 100644 --- a/doc/misc/cc-mode.texi +++ b/doc/misc/cc-mode.texi @@ -671,7 +671,7 @@ These commands indent code: @table @asis @item @kbd{@key{TAB}} (@code{c-indent-command}) -@kindex @key{TAB} +@kindex TAB @findex c-indent-command @findex indent-command @r{(c-)} This command indents the current line. That is all you need to know @@ -1518,7 +1518,7 @@ deletion. @table @asis @item @kbd{@key{DEL}} (@code{c-electric-backspace}) -@kindex @key{DEL} +@kindex DEL @findex c-electric-backspace @findex electric-backspace @r{(c-)} This command is run by default when you hit the @kbd{@key{DEL}} key. When @@ -1567,10 +1567,10 @@ rather than using the minor mode toggling. @table @asis @item @kbd{C-c C-@key{DEL}}, or @kbd{C-c @key{DEL}} (@code{c-hungry-delete-backwards})@footnote{This command was formerly known as @code{c-hungry-backspace}.} -@kindex C-c C-@key{Backspace} -@kindex C-c @key{Backspace} -@kindex C-c C-@key{DEL} -@kindex C-c @key{DEL} +@kindex C-c C-Backspace +@kindex C-c Backspace +@kindex C-c C-DEL +@kindex C-c DEL @findex c-hungry-delete-backwards @findex hungry-delete-backwards @r{(c-)} Delete any amount of whitespace in the backwards direction (regardless @@ -1581,8 +1581,8 @@ a character terminal. @item @kbd{C-c C-d}, @kbd{C-c C-@key{DELETE}}, or @kbd{C-c @key{DELETE}} (@code{c-hungry-delete-forward}) @kindex C-c C-d -@kindex C-c C-@key{Delete} -@kindex C-c @key{Delete} +@kindex C-c C-Delete +@kindex C-c Delete @findex c-hungry-delete-forward @findex hungry-delete-forward @r{(c-)} Delete any amount of whitespace in the forward direction (regardless @@ -1592,8 +1592,8 @@ same reason as for @key{DEL} above. @end table @end table -@kindex @key{Delete} -@kindex @key{Backspace} +@kindex Delete +@kindex Backspace When we talk about @kbd{@key{DEL}}, and @kbd{@key{Delete}} above, we actually do so without connecting them to the physical keys commonly @@ -7248,7 +7248,7 @@ early on: Set the variable @code{c-basic-offset}. @xref{Getting Started}. @item -@kindex @key{RET} +@kindex RET @kindex C-j @emph{Why does/doesn't the @kbd{@key{RET}} key indent the new line?} diff --git a/doc/misc/ediff.texi b/doc/misc/ediff.texi index 86b93056d1..8ffa90fb5b 100644 --- a/doc/misc/ediff.texi +++ b/doc/misc/ediff.texi @@ -543,12 +543,12 @@ The command @kbd{rb} undoes this. @item p @itemx @key{DEL} @kindex p -@kindex @key{DEL} +@kindex DEL Makes the previous difference region current. @item n @itemx @key{SPC} @kindex n -@kindex @key{SPC} +@kindex SPC Makes the next difference region current. @item j diff --git a/doc/misc/ert.texi b/doc/misc/ert.texi index f80b23f374..6942e85329 100644 --- a/doc/misc/ert.texi +++ b/doc/misc/ert.texi @@ -260,8 +260,8 @@ unexpected result. In the example above, there are two failures, both due to failed @code{should} forms. @xref{Understanding Explanations}, for more details. -@kindex @key{TAB}@r{, in ert results buffer} -@kindex S-@key{TAB}@r{, in ert results buffer} +@kindex TAB@r{, in ert results buffer} +@kindex S-TAB@r{, in ert results buffer} In the ERT results buffer, @kbd{@key{TAB}} and @kbd{S-@key{TAB}} cycle between buttons. Each name of a function or macro in this buffer is a button; moving point to it and typing @kbd{@key{RET}} jumps to its definition. diff --git a/doc/misc/eww.texi b/doc/misc/eww.texi index 0b1fb6598b..43adc2eda0 100644 --- a/doc/misc/eww.texi +++ b/doc/misc/eww.texi @@ -98,7 +98,7 @@ web page hit @kbd{g} (@code{eww-reload}). Pressing @kbd{w} (@code{eww-copy-page-url}) will copy the current URL to the kill ring. @findex eww-open-in-new-buffer -@kindex M-@key{RET} +@kindex M-RET The @kbd{M-@key{RET}} command (@code{eww-open-in-new-buffer}) opens the URL at point in a new EWW buffer, akin to opening a link in a new ``tab'' in other browsers. diff --git a/doc/misc/forms.texi b/doc/misc/forms.texi index 41847dfcff..70463419e8 100644 --- a/doc/misc/forms.texi +++ b/doc/misc/forms.texi @@ -226,9 +226,9 @@ Jump to the last record (@code{forms-last-record}). This command also recalculates the number of records in the data file. @findex forms-next-field -@kindex @key{TAB} +@kindex TAB @item @key{TAB} -@kindex C-c @key{TAB} +@kindex C-c TAB @itemx C-c @key{TAB} Jump to the next field in the current record (@code{forms-next-field}). With a numeric argument @var{n}, jump forward @var{n} fields. If this command @@ -263,14 +263,14 @@ prompted for confirmation before the record is deleted unless a numeric argument has been provided. @findex forms-search-forward -@kindex C-c C-s @var{regexp} @key{RET} +@kindex C-c C-s @var{regexp} RET @item C-c C-s @var{regexp} @key{RET} Search forward for @var{regexp} in all records following this one (@code{forms-search-forward}). If found, this record is shown. If you give an empty argument, the previous regexp is used again. @findex forms-search-backward -@kindex C-c C-r @var{regexp} @key{RET} +@kindex C-c C-r @var{regexp} RET @item C-c C-r @var{regexp} @key{RET} Search backward for @var{regexp} in all records following this one (@code{forms-search-backward}). If found, this record is shown. @@ -334,23 +334,23 @@ The following function key definitions are set up in Forms mode (whether read-only or not): @table @kbd -@kindex @key{NEXT} +@kindex NEXT @item @key{NEXT} forms-next-record -@kindex @key{PRIOR} +@kindex PRIOR @item @key{PRIOR} forms-prev-record -@kindex @key{BEGIN} +@kindex BEGIN @item @key{BEGIN} forms-first-record -@kindex @key{END} +@kindex END @item @key{END} forms-last-record -@kindex S-@key{TAB} +@kindex S-TAB @findex forms-prev-field @item S-@key{TAB} forms-prev-field diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi index 43d6820c31..a166b33a13 100644 --- a/doc/misc/gnus.texi +++ b/doc/misc/gnus.texi @@ -1991,7 +1991,7 @@ Go to the next group that has unread articles @item p @itemx @key{DEL} -@kindex @key{DEL} @r{(Group)} +@kindex DEL @r{(Group)} @kindex p @r{(Group)} @findex gnus-group-prev-unread-group Go to the previous group that has unread articles @@ -2063,7 +2063,7 @@ Otherwise, the point is set to the group just exited. The default is @table @kbd @item @key{SPC} -@kindex @key{SPC} @r{(Group)} +@kindex SPC @r{(Group)} @findex gnus-group-read-group Select the current group, switch to the summary buffer and display the first unread article (@code{gnus-group-read-group}). If there are no @@ -2083,7 +2083,7 @@ When you are in the group (in the Summary buffer), you can type ones. @item @key{RET} -@kindex @key{RET} @r{(Group)} +@kindex RET @r{(Group)} @findex gnus-group-select-group Select the current group and switch to the summary buffer (@code{gnus-group-select-group}). Takes the same arguments as @@ -2092,7 +2092,7 @@ does not display the first unread article automatically upon group entry. @item M-@key{RET} -@kindex M-@key{RET} @r{(Group)} +@kindex M-RET @r{(Group)} @findex gnus-group-quick-select-group This does the same as the command above, but tries to do it with the minimum amount of fuzz (@code{gnus-group-quick-select-group}). No @@ -2104,14 +2104,14 @@ which is useful if you want to toggle threading before generating the summary buffer (@pxref{Summary Generation Commands}). @item M-@key{SPC} -@kindex M-@key{SPC} @r{(Group)} +@kindex M-SPC @r{(Group)} @findex gnus-group-visible-select-group This is yet one more command that does the same as the @kbd{@key{RET}} command, but this one does it without expunging and hiding dormants (@code{gnus-group-visible-select-group}). @item C-M-@key{RET} -@kindex C-M-@key{RET} @r{(Group)} +@kindex C-M-RET @r{(Group)} @findex gnus-group-select-group-ephemerally Finally, this command selects the current group ephemerally without doing any processing of its contents @@ -2659,7 +2659,7 @@ Make a group based on an @acronym{RSS} feed @xref{RSS}. @item G @key{DEL} -@kindex G @key{DEL} @r{(Group)} +@kindex G DEL @r{(Group)} @findex gnus-group-delete-group This function will delete the current group (@code{gnus-group-delete-group}). If given a prefix, this function will @@ -3617,13 +3617,13 @@ Go to the next group (@code{gnus-group-next-group}). Go to the previous group (@code{gnus-group-prev-group}). @item @key{SPC} -@kindex @key{SPC} @r{(Browse)} +@kindex SPC @r{(Browse)} @findex gnus-browse-read-group Enter the current group and display the first article (@code{gnus-browse-read-group}). @item @key{RET} -@kindex @key{RET} @r{(Browse)} +@kindex RET @r{(Browse)} @findex gnus-browse-select-group Enter the current group (@code{gnus-browse-select-group}). @@ -3656,7 +3656,7 @@ Describe browse mode briefly (well, there's not much to describe, is there) (@code{gnus-browse-describe-briefly}). @item @key{DEL} -@kindex @key{DEL} @r{(Browse)} +@kindex DEL @r{(Browse)} @findex gnus-browse-delete-group This function will delete the current group (@code{gnus-browse-delete-group}). If given a prefix, this function @@ -3802,15 +3802,15 @@ Prompt for a new topic name and create it @item T @key{TAB} @itemx @key{TAB} -@kindex T @key{TAB} @r{(Topic)} -@kindex @key{TAB} @r{(Topic)} +@kindex T TAB @r{(Topic)} +@kindex TAB @r{(Topic)} @findex gnus-topic-indent ``Indent'' the current topic so that it becomes a sub-topic of the previous topic (@code{gnus-topic-indent}). If given a prefix, ``un-indent'' the topic instead. @item M-@key{TAB} -@kindex M-@key{TAB} @r{(Topic)} +@kindex M-TAB @r{(Topic)} @findex gnus-topic-unindent ``Un-indent'' the current topic so that it becomes a sub-topic of the parent of its current parent (@code{gnus-topic-unindent}). @@ -3855,7 +3855,7 @@ key. @table @kbd @item @key{RET} -@kindex @key{RET} @r{(Topic)} +@kindex RET @r{(Topic)} @findex gnus-topic-select-group @itemx @key{SPC} Either select a group or fold a topic (@code{gnus-topic-select-group}). @@ -3962,7 +3962,7 @@ expiry process (if any) Rename a topic (@code{gnus-topic-rename}). @item T @key{DEL} -@kindex T @key{DEL} @r{(Topic)} +@kindex T DEL @r{(Topic)} @findex gnus-topic-delete Delete an empty topic (@code{gnus-topic-delete}). @@ -5301,7 +5301,7 @@ If you want to fetch new articles or redisplay the group, see @table @kbd @item @key{SPC} -@kindex @key{SPC} @r{(Summary)} +@kindex SPC @r{(Summary)} @findex gnus-summary-next-page Select the current article, or, if that one's read already, the next unread article (@code{gnus-summary-next-page}). @@ -5443,7 +5443,7 @@ instead. It will leave marks like @code{gnus-low-score-mark}, @table @kbd @item @key{SPC} -@kindex @key{SPC} @r{(Summary)} +@kindex SPC @r{(Summary)} @findex gnus-summary-next-page Pressing @kbd{@key{SPC}} will scroll the current article forward one page, or, if you have come to the end of the current article, will choose the @@ -5459,18 +5459,18 @@ what is considered uninteresting with pages, no matter how boring, using @kbd{C-M-v}. @item @key{DEL} -@kindex @key{DEL} @r{(Summary)} +@kindex DEL @r{(Summary)} @findex gnus-summary-prev-page Scroll the current article back one page (@code{gnus-summary-prev-page}). @item @key{RET} -@kindex @key{RET} @r{(Summary)} +@kindex RET @r{(Summary)} @findex gnus-summary-scroll-up Scroll the current article one line forward (@code{gnus-summary-scroll-up}). @item M-@key{RET} -@kindex M-@key{RET} @r{(Summary)} +@kindex M-RET @r{(Summary)} @findex gnus-summary-scroll-down Scroll the current article one line backward (@code{gnus-summary-scroll-down}). @@ -7282,7 +7282,7 @@ understand the numeric prefix. @itemx C-M-f @kindex C-M-n @r{(Summary)} @itemx M-@key{DOWN} -@kindex M-@key{DOWN} @r{(Summary)} +@kindex M-DOWN @r{(Summary)} @findex gnus-summary-next-thread Go to the next thread (@code{gnus-summary-next-thread}). @@ -7291,7 +7291,7 @@ Go to the next thread (@code{gnus-summary-next-thread}). @itemx C-M-b @kindex C-M-p @r{(Summary)} @itemx M-@key{UP} -@kindex M-@key{UP} @r{(Summary)} +@kindex M-UP @r{(Summary)} @findex gnus-summary-prev-thread Go to the previous thread (@code{gnus-summary-prev-thread}). @@ -10366,7 +10366,7 @@ thread or article and pick it. (The line number is normally displayed at the beginning of the summary pick lines.) @item @key{SPC} -@kindex @key{SPC} @r{(Pick)} +@kindex SPC @r{(Pick)} @findex gnus-pick-next-page Scroll the summary buffer up one page (@code{gnus-pick-next-page}). If at the end of the buffer, start reading the picked articles. @@ -10382,7 +10382,7 @@ just the article. You can give this key a numerical prefix to unpick the thread or article at that line. @item @key{RET} -@kindex @key{RET} @r{(Pick)} +@kindex RET @r{(Pick)} @findex gnus-pick-start-reading @vindex gnus-pick-display-summary Start reading the picked articles (@code{gnus-pick-start-reading}). If @@ -10624,7 +10624,7 @@ articles eligible for expiry in the current group will disappear forever into that big @file{/dev/null} in the sky. @item B @key{DEL} -@kindex B @key{DEL} @r{(Summary)} +@kindex B DEL @r{(Summary)} @cindex deleting mail @findex gnus-summary-delete-article @c @icon{gnus-summary-mail-delete} @@ -11623,7 +11623,7 @@ The following commands are available when you have placed point over a @table @kbd @findex gnus-article-press-button @item @key{RET} (Article) -@kindex @key{RET} @r{(Article)} +@kindex RET @r{(Article)} @itemx @key{BUTTON-2} (Article) Toggle displaying of the @acronym{MIME} object (@code{gnus-article-press-button}). If built-in viewers can not display @@ -11633,7 +11633,7 @@ object is displayed inline. @findex gnus-mime-view-part @item M-@key{RET} (Article) -@kindex M-@key{RET} @r{(Article)} +@kindex M-RET @r{(Article)} @itemx v (Article) Prompt for a method, and then view the @acronym{MIME} object using this method (@code{gnus-mime-view-part}). @@ -12133,13 +12133,13 @@ A few additional keystrokes are available: @table @kbd @item @key{SPC} -@kindex @key{SPC} @r{(Article)} +@kindex SPC @r{(Article)} @findex gnus-article-next-page Scroll forwards one page (@code{gnus-article-next-page}). This is exactly the same as @kbd{h @key{SPC} h}. @item @key{DEL} -@kindex @key{DEL} @r{(Article)} +@kindex DEL @r{(Article)} @findex gnus-article-prev-page Scroll backwards one page (@code{gnus-article-prev-page}). This is exactly the same as @kbd{h @key{DEL} h}. @@ -12170,13 +12170,13 @@ Give a very brief description of the available keystrokes (@code{gnus-article-describe-briefly}). @item @key{TAB} -@kindex @key{TAB} @r{(Article)} +@kindex TAB @r{(Article)} @findex gnus-article-next-button Go to the next button, if any (@code{gnus-article-next-button}). This only makes sense if you have buttonizing turned on. @item M-@key{TAB} -@kindex M-@key{TAB} @r{(Article)} +@kindex M-TAB @r{(Article)} @findex gnus-article-prev-button Go to the previous button, if any (@code{gnus-article-prev-button}). @@ -13233,7 +13233,7 @@ Edit a server (@code{gnus-server-edit-server}). Show the definition of a server (@code{gnus-server-show-server}). @item @key{SPC} -@kindex @key{SPC} @r{(Server)} +@kindex SPC @r{(Server)} @findex gnus-server-read-server Browse the current server (@code{gnus-server-read-server}). diff --git a/doc/misc/idlwave.texi b/doc/misc/idlwave.texi index e1a6eb66f5..44a3831b1c 100644 --- a/doc/misc/idlwave.texi +++ b/doc/misc/idlwave.texi @@ -935,7 +935,7 @@ IDL code. @cindex String splitting @cindex Splitting, of lines -@kindex M-@key{RET} +@kindex M-RET In IDL, a newline character terminates a statement unless preceded by a @samp{$}. If you would like to start a continuation line, use @kbd{M-@key{RET}}, which calls the command @code{idlwave-split-line}. @@ -1523,7 +1523,7 @@ The case-insensitive heading word in doclib headers to locate the @cindex Function name completion @cindex Procedure name completion -@kindex M-@key{TAB} +@kindex M-TAB @kindex C-c C-i IDLWAVE offers completion for class names, routine names, keywords, system variables, system variable tags, class structure tags, regular diff --git a/doc/misc/info.texi b/doc/misc/info.texi index c617468f57..964a6c6912 100644 --- a/doc/misc/info.texi +++ b/doc/misc/info.texi @@ -311,9 +311,9 @@ You can tell that there is more that is not visible because you can see the text @samp{Top} rather than @samp{All} near the bottom of the screen. -@kindex @key{SPC} @r{(Info mode)} -@kindex @key{DEL} @r{(Info mode)} -@kindex @key{BACKSPACE} @r{(Info mode)} +@kindex SPC @r{(Info mode)} +@kindex DEL @r{(Info mode)} +@kindex BACKSPACE @r{(Info mode)} @findex Info-scroll-up @findex Info-scroll-down The @key{SPC}, @key{BACKSPACE} (or @key{DEL})@footnote{The key which @@ -363,8 +363,8 @@ the menu, one by one. Once you reach the end of a node, and have seen all of its subnodes, @key{SPC} takes you to the next node or to the parent's next node. -@kindex @key{PAGEUP} @r{(Info mode)} -@kindex @key{PAGEDOWN} @r{(Info mode)} +@kindex PAGEUP @r{(Info mode)} +@kindex PAGEDOWN @r{(Info mode)} Many keyboards nowadays have two scroll keys labeled @samp{PageUp} and @samp{PageDown} (or maybe @samp{Prior} and @samp{Next}). If your keyboard has these keys, you can use them to move forward and backward diff --git a/doc/misc/message.texi b/doc/misc/message.texi index f49c91ef7b..a1532bb614 100644 --- a/doc/misc/message.texi +++ b/doc/misc/message.texi @@ -1378,7 +1378,7 @@ Delete all text in the body of the message that is outside the region (@code{message-delete-not-region}). @item M-@key{RET} -@kindex M-@key{RET} +@kindex M-RET @findex message-newline-and-reformat Insert four newlines, and then reformat if inside quoted text. @@ -1407,7 +1407,7 @@ Rename the buffer (@code{message-rename-buffer}). If given a prefix, prompt for a new buffer name. @item @key{TAB} -@kindex @key{TAB} +@kindex TAB @findex message-tab @vindex message-tab-body-function If @code{message-tab-body-function} is non-@code{nil}, execute the diff --git a/doc/misc/mh-e.texi b/doc/misc/mh-e.texi index efb44e4b64..68d8b210ab 100644 --- a/doc/misc/mh-e.texi +++ b/doc/misc/mh-e.texi @@ -442,7 +442,7 @@ either @code{customize-option} or @code{add-hook}. @cindex point @cindex region @kindex C-@@ -@kindex C-@key{SPC} +@kindex C-SPC There are several other terms that are used in Emacs that you should know. The @dfn{point} is where the cursor currently is. You can save @@ -461,8 +461,8 @@ filling paragraphs. A mark can be set with @kbd{C-@@} (or @cindex file completion @cindex folder completion @cindex minibuffer -@kindex @key{SPC} -@kindex @key{TAB} +@kindex SPC +@kindex TAB The @dfn{minibuffer} is the bottom line of the Emacs window, where all prompting and multiple-character input is directed. You can use @@ -787,7 +787,7 @@ use @kbd{F r} to pull all your messages into MH-E. @end quotation @sp 1 -@kindex @key{RET} +@kindex RET @kindex n @kindex p @@ -817,8 +817,8 @@ This is a test message to get the wheels churning... @end cartouche @i{After incorporating new messages} -@kindex @key{DEL} -@kindex @key{SPC} +@kindex DEL +@kindex SPC If you typed a long message, you can view subsequent pages with @key{SPC} and previous pages with @key{DEL}. @@ -827,7 +827,7 @@ If you typed a long message, you can view subsequent pages with @section Processing Mail @cindex processing mail -@kindex @key{RET} +@kindex RET @kindex r The first thing we want to do is reply to the message that we sent @@ -880,7 +880,7 @@ Type C-c C-c to send message, C-c ? for help @kindex C-f @kindex C-n @kindex C-p -@kindex @key{BS} +@kindex BS By default, MH will not add you to the address list of your replies, so if you find that the @samp{To:} header field is missing, don't @@ -895,7 +895,7 @@ editing your message, send it with @kbd{C-c C-c} as before. @cindex @command{refile} @cindex MH commands, @command{refile} @cindex folders -@kindex @key{SPC} +@kindex SPC @kindex o You'll often want to save messages that were sent to you in an @@ -915,7 +915,7 @@ in a moment. @cindex modes, MH-Folder @kindex d @kindex i -@kindex @key{RET} +@kindex RET @kindex n @kindex p @kindex x @@ -1586,7 +1586,7 @@ Display cheat sheet for the MH-E commands (@code{mh-help}). @c ------------------------- @cindex @samp{Message > Show Message} menu item @cindex menu item, @samp{Message > Show Message} -@kindex @key{RET} +@kindex RET @findex mh-show @item @key{RET} Display message (@code{mh-show}). @@ -1612,12 +1612,12 @@ Display message with the default preferred alternative Toggle the value of @code{mh-decode-mime-flag} (@code{mh-toggle-mh-decode-mime-flag}). @c ------------------------- -@kindex @key{SPC} +@kindex SPC @findex mh-page-msg @item @key{SPC} Display next page in message (@code{mh-page-msg}). @c ------------------------- -@kindex @key{BS} +@kindex BS @findex mh-previous-page @item @key{BS} Display previous page in message (@code{mh-previous-page}). @@ -1655,12 +1655,12 @@ Delete range (@code{mh-delete-msg}). Display cheat sheet for the commands of the current prefix in minibuffer (@code{mh-prefix-help}). @c ------------------------- -@kindex D @key{SPC} +@kindex D SPC @findex mh-page-digest @item D @key{SPC} Display next message in digest (@code{mh-page-digest}). @c ------------------------- -@kindex D @key{BS} +@kindex D BS @findex mh-page-digest-backwards @item D @key{BS} Display previous message in digest (@code{mh-page-digest-backwards}). @@ -1691,12 +1691,12 @@ Delete messages with same subject or thread Display cheat sheet for the commands of the current prefix in minibuffer (@code{mh-prefix-help}). @c ------------------------- -@kindex K @key{TAB} +@kindex K TAB @findex mh-next-button @item K @key{TAB} Go to the next button (@code{mh-next-button}). @c ------------------------- -@kindex K S-@key{TAB} +@kindex K S-TAB @findex mh-prev-button @item K S-@key{TAB} Go to the previous button (@code{mh-prev-button}). @@ -1838,7 +1838,7 @@ Move point to mouse event and show message (@code{mh-show-mouse}). Within the MH-Show buffer, the following command is defined. @table @kbd -@kindex @key{RET} +@kindex RET @kindex mouse-1 @kindex mouse-2 @findex mh-press-button @@ -2013,9 +2013,9 @@ detail in the following sections. @findex mh-show-mouse @kindex , @r{(comma)} @kindex . @r{(period)} -@kindex @key{BS} -@kindex @key{RET} -@kindex @key{SPC} +@kindex BS +@kindex RET +@kindex SPC @kindex mouse-2 The command @key{RET} (@code{mh-show}) displays the message that the @@ -2194,7 +2194,7 @@ highlighting of citations entirely, choose @samp{None}. @cindex highlighting email addresses @cindex links, following @findex goto-address-at-point -@kindex C-c @key{RET} +@kindex C-c RET @kindex mouse-2 @vindex goto-address-highlight-p @@ -2328,9 +2328,9 @@ Attachments in MH-E are indicated by @dfn{buttons} like this: @findex mh-next-button @findex mh-press-button @findex mh-prev-button -@kindex @key{RET} -@kindex K @key{TAB} -@kindex K S-@key{TAB} +@kindex RET +@kindex K TAB +@kindex K S-TAB @kindex mouse-1 @kindex mouse-2 @@ -2682,10 +2682,10 @@ buffer, including HTML buffers. @cindex digests @findex mh-page-digest @findex mh-page-digest-backwards -@kindex D @key{BS} -@kindex D @key{SPC} -@kindex @key{BS} -@kindex @key{SPC} +@kindex D BS +@kindex D SPC +@kindex BS +@kindex SPC A digest is a message that contains other messages. Special MH-E commands let you read digests conveniently. You can use @key{SPC} and @@ -2989,7 +2989,7 @@ like to change the initial default directory, customize the option directory for storing the content of these messages. @findex mh-store-buffer -@kindex @key{RET} +@kindex RET @kindex X s By the way, @kbd{X s} calls the Emacs Lisp function @@ -3039,7 +3039,7 @@ message with @kbd{M-<} (@code{mh-first-msg}) and @kbd{M->} @findex previous-line @kindex C-n @kindex C-p -@kindex @key{RET} +@kindex RET You can also use the Emacs commands @kbd{C-p} (@code{previous-line}) and @kbd{C-n} (@code{next-line}) to move up and down the scan lines in @@ -3740,7 +3740,7 @@ The command @kbd{F p} runs @code{mh-pack-folder-hook} after renumbering the messages. A variable that is useful with this hook is @code{mh-current-folder}. -@kindex @key{TAB} +@kindex TAB @vindex mh-recursive-folders-flag By default, operations on folders work only one level at a time. Set @@ -4381,12 +4381,12 @@ commands in addition to the normal Emacs editing commands to help you edit your draft. These can also be found in the @samp{Letter} menu. @table @kbd -@kindex @key{SPC} +@kindex SPC @findex mh-letter-complete-or-space @item @key{SPC} Perform completion or insert space (@code{mh-letter-complete-or-space}). @c ------------------------- -@kindex M-@key{TAB} +@kindex M-TAB @findex mh-letter-complete @item M-@key{TAB} Perform completion on header field or word preceding point @@ -4397,12 +4397,12 @@ Perform completion on header field or word preceding point @item , (comma) Flash alias expansion (@code{mh-letter-confirm-address}). @c ------------------------- -@kindex @key{TAB} +@kindex TAB @findex mh-letter-next-header-field-or-indent @item @key{TAB} Cycle to next field (@code{mh-letter-next-header-field-or-indent}). @c ------------------------- -@kindex S-@key{TAB} +@kindex S-TAB @findex mh-letter-previous-header-field @item S-@key{TAB} Cycle to the previous header field @@ -4807,8 +4807,8 @@ draft. @xref{Folder Selection}. @findex indent-relative @findex mh-letter-next-header-field-or-indent @findex mh-letter-previous-header-field -@kindex @key{TAB} -@kindex S-@key{TAB} +@kindex TAB +@kindex S-TAB @vindex mh-compose-skipped-header-fields @vindex mh-letter-header-field @@ -4834,8 +4834,8 @@ take point to the last field from anywhere in the body. @findex mh-letter-complete-or-space @findex mh-letter-confirm-address @kindex , @r{(comma)} -@kindex @key{SPC} -@kindex M-@key{TAB} +@kindex SPC +@kindex M-TAB @vindex mh-alias-flash-on-comma @vindex mh-compose-space-does-completion-flag @vindex mh-letter-complete-function @@ -5714,12 +5714,12 @@ The following commands are available in MH-Letter mode with the exception of @code{mh-alias-reload} which can be called from anywhere. @table @kbd -@kindex @key{SPC} +@kindex SPC @findex mh-letter-complete-or-space @item @key{SPC} Perform completion or insert space (@code{mh-letter-complete-or-space}). @c ------------------------- -@kindex M-@key{TAB} +@kindex M-TAB @findex mh-letter-complete @item M-@key{TAB} Perform completion on header field or word preceding point @@ -5791,7 +5791,7 @@ Hook run by @code{mh-alias-reload} after loading aliases (default: You can use aliases when you are adding recipients to a message. @findex minibuffer-complete -@kindex @key{TAB} +@kindex TAB @vindex mh-alias-expand-aliases-flag @vindex mh-compose-prompt-flag @@ -5805,8 +5805,8 @@ aliases to be expanded to their respective addresses in the draft. @findex mh-letter-complete @findex mh-letter-complete-or-space -@kindex @key{SPC} -@kindex M-@key{TAB} +@kindex SPC +@kindex M-TAB Otherwise, you can complete aliases in the header of the draft with @kbd{M-@key{TAB}} (@code{mh-letter-complete}) or @key{SPC} @@ -6607,12 +6607,12 @@ Another few commands are available in the MH-Folder buffer resulting from a search. @table @kbd -@kindex @key{TAB} +@kindex TAB @findex mh-index-next-folder @item @key{TAB} Jump to the next folder marker (@code{mh-index-next-folder}). @c ------------------------- -@kindex S-@key{TAB} +@kindex S-TAB @findex mh-index-previous-folder @item S-@key{TAB} Jump to the previous folder marker (@code{mh-index-previous-folder}). @@ -6757,8 +6757,8 @@ method with the pick method by running the command @kbd{C-c C-p} @cindex @samp{+mhe-index} @findex mh-index-next-folder @findex mh-index-previous-folder -@kindex @key{TAB} -@kindex S-@key{TAB} +@kindex TAB +@kindex S-TAB @vindex mh-search-folder The messages that are found are put in a temporary sub-folder of diff --git a/doc/misc/newsticker.texi b/doc/misc/newsticker.texi index b94a96d8aa..f7a28d3827 100644 --- a/doc/misc/newsticker.texi +++ b/doc/misc/newsticker.texi @@ -241,15 +241,15 @@ commands: @table @kbd @item M-@key{UP} @itemx M-@key{DOWN} -@kindex M-@key{UP} -@kindex M-@key{DOWN} +@kindex M-UP +@kindex M-DOWN @findex newsticker-group-shift-feed-up @findex newsticker-group-shift-feed-down Shift the currently selected feed up and down within its group. @item M-S-@key{UP} @itemx M-S-@key{DOWN} -@kindex M-S-@key{UP} -@kindex M-S-@key{DOWN} +@kindex M-S-UP +@kindex M-S-DOWN @findex newsticker-group-shift-group-up @findex newsticker-group-shift-group-down Shift the currently selected group up and down within its parent group. diff --git a/doc/misc/org.texi b/doc/misc/org.texi index ac82254dc8..eeace47dbe 100644 --- a/doc/misc/org.texi +++ b/doc/misc/org.texi @@ -1730,10 +1730,10 @@ one. @end table @table @kbd -@kindex M-S-@key{RET} +@kindex M-S-RET @item M-S-@key{RET} Insert a new item with a checkbox (@pxref{Checkboxes}). -@kindex S-@key{DOWN} +@kindex S-DOWN @item S-up @itemx S-down @cindex shift-selection-mode @@ -1745,21 +1745,21 @@ cycle around items that way, you may customize @code{org-support-shift-select} is off. If not, you can still use paragraph jumping commands like @kbd{C-@key{UP}} and @kbd{C-@key{DOWN}} to quite similar effect. -@kindex M-@key{UP} -@kindex M-@key{DOWN} +@kindex M-UP +@kindex M-DOWN @item M-up @itemx M-down Move the item including subitems up/down@footnote{See @code{org-list-use-circular-motion} for a cyclic behavior.} (swap with previous/next item of same indentation). If the list is ordered, renumbering is automatic. -@kindex M-@key{LEFT} -@kindex M-@key{RIGHT} +@kindex M-LEFT +@kindex M-RIGHT @item M-left @itemx M-right Decrease/increase the indentation of an item, leaving children alone. -@kindex M-S-@key{LEFT} -@kindex M-S-@key{RIGHT} +@kindex M-S-LEFT +@kindex M-S-RIGHT @item M-S-@key{LEFT} @itemx M-S-@key{RIGHT} Decrease/increase the indentation of the item, including subitems. @@ -1799,8 +1799,8 @@ its location). @xref{Structure editing}, for a detailed explanation. Turn the whole plain list into a subtree of the current heading. Checkboxes (@pxref{Checkboxes}) will become TODO (resp. DONE) keywords when unchecked (resp. checked). -@kindex S-@key{LEFT} -@kindex S-@key{RIGHT} +@kindex S-LEFT +@kindex S-RIGHT @item S-@key{LEFT}/@key{RIGHT} @vindex org-support-shift-select This command also cycles bullet styles when the cursor in on the bullet or @@ -3014,10 +3014,10 @@ formula, @key{TAB} re-indents just like in Emacs Lisp mode. Complete Lisp symbols, just like in Emacs Lisp mode.@footnote{Many desktops intercept @kbd{M-@key{TAB}} to switch windows. Use @kbd{C-M-i} or @kbd{@key{ESC} @key{TAB}} instead for completion (@pxref{Completion}).} -@kindex S-@key{UP} -@kindex S-@key{DOWN} -@kindex S-@key{LEFT} -@kindex S-@key{RIGHT} +@kindex S-UP +@kindex S-DOWN +@kindex S-LEFT +@kindex S-RIGHT @findex org-table-fedit-ref-up @findex org-table-fedit-ref-down @findex org-table-fedit-ref-left @@ -4043,8 +4043,8 @@ completion; otherwise force cycling through TODO states with no prompt. When @code{org-use-fast-todo-selection} is set to @code{prefix}, use the fast selection interface. -@kindex S-@key{RIGHT} -@kindex S-@key{LEFT} +@kindex S-RIGHT +@kindex S-LEFT @item S-@key{RIGHT} @ @r{/} @ S-@key{LEFT} @vindex org-treat-S-cursor-todo-selection-as-state-change Select the following/preceding TODO state, similar to cycling. Useful @@ -4192,8 +4192,8 @@ select the correct sequence. Besides the obvious ways like typing a keyword or using completion, you may also apply the following commands: @table @kbd -@kindex C-S-@key{RIGHT} -@kindex C-S-@key{LEFT} +@kindex C-S-RIGHT +@kindex C-S-LEFT @kindex C-u C-u C-c C-t @item C-u C-u C-c C-t @itemx C-S-@key{RIGHT} @@ -4203,8 +4203,8 @@ These keys jump from one TODO subset to the next. In the above example, @code{DONE} to @code{REPORT}, and any of the words in the second row to @code{CANCELED}. Note that the @kbd{C-S-} key binding conflict with @code{shift-selection-mode} (@pxref{Conflicts}). -@kindex S-@key{RIGHT} -@kindex S-@key{LEFT} +@kindex S-RIGHT +@kindex S-LEFT @item S-@key{RIGHT} @itemx S-@key{LEFT} @kbd{S-@key{LEFT}} and @kbd{S-@key{RIGHT}} and walk through @emph{all} @@ -4271,7 +4271,7 @@ A setup for using several sets in parallel would be: @end example @cindex completion, of option keywords -@kindex M-@key{TAB} +@kindex M-TAB @noindent To make sure you are using the correct keyword, type @samp{#+} into the buffer and then use @kbd{M-@key{TAB}} completion. @@ -4933,7 +4933,7 @@ can really speed up agenda generation. @cindex setting tags @cindex tags, setting -@kindex M-@key{TAB} +@kindex M-TAB Tags can simply be typed into the buffer at the end of a headline. After a colon, @kbd{M-@key{TAB}} offers completion on tags. There is also a special command for inserting tags: @@ -5064,17 +5064,17 @@ will turn off any other tags from that group. In this interface, you can also use the following special keys: @table @kbd -@kindex @key{TAB} +@kindex TAB @item @key{TAB} Enter a tag in the minibuffer, even if the tag is not in the predefined list. You will be able to complete on all tags present in the buffer. You can also add several tags: just separate them with a comma. -@kindex @key{SPC} +@kindex SPC @item @key{SPC} Clear all tags for this line. -@kindex @key{RET} +@kindex RET @item @key{RET} Accept the modified set. @@ -5727,8 +5727,8 @@ Exit column view. @tsubheading{Editing values} @item @key{LEFT} @key{RIGHT} @key{UP} @key{DOWN} Move through the column view from field to field. -@kindex S-@key{LEFT} -@kindex S-@key{RIGHT} +@kindex S-LEFT +@kindex S-RIGHT @item S-@key{LEFT}/@key{RIGHT} Switch to the next/previous allowed value of the field. For this, you have to have specified allowed values for a property. @@ -6138,15 +6138,15 @@ from the minibuffer: @kindex M-v @kindex C-v @kindex mouse-1 -@kindex S-@key{RIGHT} -@kindex S-@key{LEFT} -@kindex S-@key{DOWN} -@kindex S-@key{UP} -@kindex M-S-@key{RIGHT} -@kindex M-S-@key{LEFT} -@kindex @key{RET} -@kindex M-S-@key{DOWN} -@kindex M-S-@key{UP} +@kindex S-RIGHT +@kindex S-LEFT +@kindex S-DOWN +@kindex S-UP +@kindex M-S-RIGHT +@kindex M-S-LEFT +@kindex RET +@kindex M-S-DOWN +@kindex M-S-UP @example @key{RET} @r{Choose date at cursor in calendar.} @@ -10427,7 +10427,7 @@ details see the documentation of CD@LaTeX{} mode): @item Environment templates can be inserted with @kbd{C-c @{}. @item -@kindex @key{TAB} +@kindex TAB The @key{TAB} key will do template expansion if the cursor is inside a @LaTeX{} fragment@footnote{Org mode has a method to test if the cursor is inside such a fragment, see the documentation of the function @@ -17127,9 +17127,9 @@ Active key bindings in code blocks: @item @kbd{C-c C-c} @tab @code{org-babel-execute-src-block} @kindex C-c C-o @item @kbd{C-c C-o} @tab @code{org-babel-open-src-block-result} -@kindex M-@key{UP} +@kindex M-UP @item @kbd{M-@key{UP}} @tab @code{org-babel-load-in-session} -@kindex M-@key{DOWN} +@kindex M-DOWN @item @kbd{M-@key{DOWN}} @tab @code{org-babel-switch-to-session} @end multitable @@ -17286,7 +17286,7 @@ is involved. Such mode-specific hot keys have become an integral part of Emacs and Org provides several shortcuts. @table @kbd -@kindex M-@key{TAB} +@kindex M-TAB @item M-@key{TAB} Complete word at point @itemize @bullet diff --git a/doc/misc/pcl-cvs.texi b/doc/misc/pcl-cvs.texi index 32c6a52487..1163530e7a 100644 --- a/doc/misc/pcl-cvs.texi +++ b/doc/misc/pcl-cvs.texi @@ -677,7 +677,7 @@ put in @samp{cvs-status-mode}. @cindex Movement Commands @findex cvs-mode-next-line @findex cvs-mode-previous-line -@kindex @key{SPC}@r{--Move down one file} +@kindex SPC@r{--Move down one file} @kindex n@r{--Move down one file} @kindex p@r{--Move up one file} @@ -705,8 +705,8 @@ This key moves one file backward, towards the beginning of the buffer @kindex m@r{--marking a file} @kindex M@r{--marking all files} @kindex u@r{--unmark a file} -@kindex @key{ESC} @key{DEL}@r{--unmark all files} -@kindex @key{DEL}@r{--unmark previous file} +@kindex ESC DEL@r{--unmark all files} +@kindex DEL@r{--unmark previous file} @kindex %@r{--mark files matching regexp} @kindex S@r{--mark files in a particular state} @kindex T@r{--toggle marks} diff --git a/doc/misc/rcirc.texi b/doc/misc/rcirc.texi index dc715e5d68..2437e020ee 100644 --- a/doc/misc/rcirc.texi +++ b/doc/misc/rcirc.texi @@ -154,7 +154,7 @@ deego: fsbot rules! @cindex nick completion @cindex completion of nicks -@kindex @key{TAB} +@kindex TAB Since this is so common, you can use @key{TAB} to do nick completion. @node Getting started with rcirc @@ -215,7 +215,7 @@ When you have answered these questions, @code{rcirc} will create a server buffer, which will be named something like @file{*irc.freenode.net*}, and a channel buffer for each of the channels you wanted to join. -@kindex @key{RET} +@kindex RET @cindex talking @cindex communicating To talk in a channel, just type what you want to say in a channel @@ -378,7 +378,7 @@ network. A new buffer will be created for this conversation. It works like a channel with only two members. (Also @code{/query fsbot}.) @item C-c @key{RET} -@kindex C-c @key{RET} +@kindex C-c RET @cindex /msg @cindex single message @cindex message sending @@ -617,7 +617,7 @@ daunting task. This chapters tells you how @code{rcirc} can help. @cindex modeline @comment This section copied to the Getting started with rcirc section -@kindex C-c C-@key{SPC} +@kindex C-c C-SPC @vindex rcirc-track-minor-mode @cindex switching channels @cindex tracking activity @@ -663,7 +663,7 @@ Low priority channels have the modeline indicator ``LowPri''. @kbd{C-c C-@key{SPC}} will not switch to low priority channels unless you use the @kbd{C-u} prefix. -@kindex C-c @key{TAB} +@kindex C-c TAB @cindex ignored channels If you prefer a channel to never show up in the modeline, then you have to ignore it. Use @kbd{C-c @key{TAB}} to ignore the current diff --git a/doc/misc/reftex.texi b/doc/misc/reftex.texi index 55060d09b8..3803cb0eb7 100644 --- a/doc/misc/reftex.texi +++ b/doc/misc/reftex.texi @@ -3335,7 +3335,7 @@ have to rescan the buffer in order to see it. @findex reftex-arg-index @findex TeX-arg-index@r{, AUCTeX function} @findex TeX-insert-macro@r{, AUCTeX function} -@kindex C-c @key{RET} +@kindex C-c RET @b{@RefTeX{} supplies macro arguments}@* When you insert a macro interactively with @kbd{C-c @key{RET}}, @AUCTeX{} normally prompts for macro arguments. Internally, it uses the functions diff --git a/doc/misc/sc.texi b/doc/misc/sc.texi index 9faa8fea74..03ca842cd0 100644 --- a/doc/misc/sc.texi +++ b/doc/misc/sc.texi @@ -685,7 +685,7 @@ Set the preferred reference header (i.e., @code{sc-preferred-header-style}) to the currently displayed header. @item @code{sc-eref-exit} (@kbd{C-j}, @key{RET}, and @key{ESC C-c}) -@kindex @key{RET} +@kindex RET @kindex C-j @kindex q @findex sc-eref-exit diff --git a/doc/misc/sieve.texi b/doc/misc/sieve.texi index 2875b163ee..37bb707f63 100644 --- a/doc/misc/sieve.texi +++ b/doc/misc/sieve.texi @@ -124,7 +124,7 @@ bindings to manage Sieve scripts remotely. @xref{Managing Sieve}. @table @kbd @item C-c RET -@kindex C-c @key{RET} +@kindex C-c RET @findex sieve-manage @cindex manage remote sieve script Open a connection to a remote server using the Managesieve protocol. @@ -190,7 +190,7 @@ Remove currently highlighted script. @item RET @item mouse-2 @item f -@kindex @key{RET} +@kindex RET @kindex mouse-2 @kindex f @findex sieve-edit-script diff --git a/doc/misc/vhdl-mode.texi b/doc/misc/vhdl-mode.texi index 5aad1c2ffe..c061fb8e43 100644 --- a/doc/misc/vhdl-mode.texi +++ b/doc/misc/vhdl-mode.texi @@ -271,7 +271,7 @@ example again. @end group @end example -@kindex @key{TAB} +@kindex TAB Let's say point is on line 3 and we hit the @key{TAB} key to re-indent the line. Remember that the syntactic component list for that line is: @@ -822,11 +822,11 @@ symbol currently recognized} @cindex Frequently Asked Questions @kindex C-x h -@kindex @key{ESC} C-\ -@kindex @key{ESC} C-q -@kindex @key{ESC} C-u -@kindex @key{RET} -@kindex @key{LFD} +@kindex ESC C-\ +@kindex ESC C-q +@kindex ESC C-u +@kindex RET +@kindex LFD @findex newline-and-indent @quotation diff --git a/doc/misc/vip.texi b/doc/misc/vip.texi index aa55130e0e..5efd6ed684 100644 --- a/doc/misc/vip.texi +++ b/doc/misc/vip.texi @@ -289,7 +289,7 @@ its content while you are in insert mode. @table @kbd @item @key{ESC} -@kindex 033 @key{ESC} @r{(}@code{vip-change-mode-to-vi}@r{) (insert mode)} +@kindex 033 ESC @r{(}@code{vip-change-mode-to-vi}@r{) (insert mode)} This key will take you back to vi mode. @item C-h @kindex 010 C-h @r{(}@code{vip-delete-backward-char}@r{) (insert mode)} @@ -373,7 +373,7 @@ the buffer as in Vi. You can change this by rebinding the variable @subsection z Command @kindex 1723 z H @r{(}@code{vip-line-to-top}@r{)} -@kindex 1721 z @key{RET} @r{(}@code{vip-line-to-top}@r{)} +@kindex 1721 z RET @r{(}@code{vip-line-to-top}@r{)} @kindex 1723 z M @r{(}@code{vip-line-to-middle}@r{)} @kindex 1722 z . @r{(}@code{vip-line-to-middle}@r{)} @kindex 1723 z L @r{(}@code{vip-line-to-bottom}@r{)} @@ -471,7 +471,7 @@ Forward incremental search. @itemx @key{ESC} @kindex 003 C-c @r{(}@code{vip-ctl-c}@r{)} @kindex 0300 C-x @r{(}@code{vip-ctl-x}@r{)} -@kindex 033 @key{ESC} @r{(}@code{vip-ESC}@r{)} +@kindex 033 ESC @r{(}@code{vip-ESC}@r{)} These keys will exit from vi mode and return to emacs mode temporarily. If you hit one of these keys, Emacs will be in emacs mode and will believe that you hit that key in emacs mode. For example, if you hit @kbd{C-x} @@ -555,8 +555,8 @@ the current buffer. Here, @kbd{g} will do that, and @kbd{C-g} is used to abort a command (this is for compatibility with emacs mode.) @item SPC @itemx @key{RET} -@kindex 040 @key{SPC} @r{(}@code{vip-scroll}@r{)} -@kindex 015 @key{RET} @r{(}@code{vip-scroll-back}@r{)} +@kindex 040 SPC @r{(}@code{vip-scroll}@r{)} +@kindex 015 RET @r{(}@code{vip-scroll-back}@r{)} Now these keys will scroll up and down the text of current window. Convenient for viewing the text. @item s @@ -756,7 +756,7 @@ accessed from vi mode as easily as from emacs mode. @itemx @key{ESC} @kindex 003 C-c @r{(}@code{vip-ctl-c}@r{)} @kindex 0300 C-x @r{(}@code{vip-ctl-x}@r{)} -@kindex 033 @key{ESC} @r{(}@code{vip-ESC}@r{)} +@kindex 033 ESC @r{(}@code{vip-ESC}@r{)} Typing one of these keys have the same effect as typing it in emacs mode. Appropriate command will be executed according as the keys you type after it. You will be in vi mode again after the execution of the command. @@ -940,13 +940,13 @@ buffer. @table @kbd @item @key{SPC} @itemx C-f -@kindex 040 @key{SPC} @r{(}@code{vip-scroll}@r{)} +@kindex 040 SPC @r{(}@code{vip-scroll}@r{)} @kindex 006 C-f @r{(}@code{vip-scroll-back}@r{)} Scroll text of current window upward almost full screen. You can go @i{forward} in the buffer by this command (@code{vip-scroll}). @item @key{RET} @itemx C-b -@kindex 015 @key{RET} @r{(}@code{vip-scroll-back}@r{)} +@kindex 015 RET @r{(}@code{vip-scroll-back}@r{)} @kindex 002 C-b @r{(}@code{vip-scroll-back}@r{)} Scroll text of current window downward almost full screen. You can go @i{backward} in the buffer by this command (@code{vip-scroll-back}). @@ -975,7 +975,7 @@ The following commands reposition point in the window. @item z H @itemx z @key{RET} @kindex 1723 z H @r{(}@code{vip-line-to-top}@r{)} -@kindex 1721 z @key{RET} @r{(}@code{vip-line-to-top}@r{)} +@kindex 1721 z RET @r{(}@code{vip-line-to-top}@r{)} Put point on the top (@i{home}) line in the window. So the current line becomes the top line in the window. Given a count @var{n}, point will be placed in the @var{n}-th line from top (@code{vip-line-to-top}). @@ -1368,7 +1368,7 @@ Delete to the end of a line (@code{vip-kill-line}). Delete a character after point. Given @var{n}, delete @var{n} characters (@code{vip-delete-char}). @item @key{DEL} -@kindex 177 @key{DEL} @r{(}@code{vip-delete-backward-char}@r{)} +@kindex 177 DEL @r{(}@code{vip-delete-backward-char}@r{)} Delete a character before point. Given @var{n}, delete @var{n} characters (@code{vip-delete-backward-char}). @end table @@ -1570,7 +1570,7 @@ keymap. See GNU Emacs Manual for details. @kindex 000 C-@@ @r{(}@code{set-mark-command}@r{)} Set mark and push previous mark on mark ring (@code{set-mark-command}). @item TAB -@kindex 011 @key{TAB} @r{(}@code{indent-for-tab-command}@r{)} +@kindex 011 TAB @r{(}@code{indent-for-tab-command}@r{)} Indent line for current major mode (@code{indent-for-tab-command}). @item C-j @kindex 012 C-j @r{(}@code{electric-newline-and-maybe-indent}@r{)} @@ -1656,7 +1656,7 @@ differently from emacs mode. @table @kbd @item @key{ESC} -@kindex 033 @key{ESC} @r{(}@code{vip-change-mode-to-vi}@r{) (insert mode)} +@kindex 033 ESC @r{(}@code{vip-change-mode-to-vi}@r{) (insert mode)} This key will take you back to vi mode (@code{vip-change-mode-to-vi}). @item C-h @kindex 010 C-h @r{(}@code{delete-backward-char}@r{) (insert mode)} diff --git a/doc/misc/viper.texi b/doc/misc/viper.texi index 366d576da2..e1c45fb40e 100644 --- a/doc/misc/viper.texi +++ b/doc/misc/viper.texi @@ -369,7 +369,7 @@ toggles Viperization of Emacs on and off. @section States in Viper @kindex C-z -@kindex @key{ESC} +@kindex ESC @kindex i @cindex Emacs state @cindex Vi state @@ -2671,8 +2671,8 @@ purpose of mouse search and mouse insert. By default, this is set to @end table @kindex S-mouse-1 @kindex S-mouse-2 -@kindex @key{META} @key{SHIFT} button1up -@kindex @key{META} @key{SHIFT} button2up +@kindex META SHIFT button1up +@kindex META SHIFT button2up @vindex viper-multiclick-timeout @findex viper-mouse-click-insert-word @findex viper-mouse-click-search-word @@ -3423,14 +3423,14 @@ in your Viper customization file. @kindex f @kindex | @kindex 0 -@kindex @key{CR} +@kindex CR @kindex + @kindex - @kindex ^ @kindex $ @kindex C-p -@kindex @key{LF} -@kindex @key{SPC} +@kindex LF +@kindex SPC @kindex C-n @kindex C-h @kindex h @@ -4447,8 +4447,8 @@ already bound to something else. @end table @kindex S-mouse-1 @kindex S-mouse-2 -@kindex @key{META} button1up -@kindex @key{META} button2up +@kindex META button1up +@kindex META button2up @node GNU Free Documentation License @appendix GNU Free Documentation License diff --git a/doc/misc/woman.texi b/doc/misc/woman.texi index 07dd55e604..f8ddbd2aff 100644 --- a/doc/misc/woman.texi +++ b/doc/misc/woman.texi @@ -625,14 +625,14 @@ the @code{man} key bindings. @table @kbd @item @key{SPC} -@kindex @key{SPC} +@kindex SPC @findex scroll-up Scroll the man page up the window (@code{scroll-up}). @item @key{DEL} @itemx @kbd{S-@key{SPC}} -@kindex @key{DEL} -@kindex S-@key{SPC} +@kindex DEL +@kindex S-SPC @findex scroll-down Scroll the man page down the window (@code{scroll-down}). @@ -690,7 +690,7 @@ word must be mouse-highlighted unless @code{woman-mouse-2} is used with the Meta key. @item @key{RET} -@kindex @key{RET} +@kindex RET @findex man-follow Get the man page for the topic under (or nearest to) point (@code{man-follow}). commit 71243f0b1334c224836eae50bc1db29e787bd593 Author: Eli Zaretskii Date: Sun Feb 25 17:52:15 2018 +0200 * doc/emacs/display.texi (Standard Faces): Fix markup of index entry. diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi index e86c3e8fc9..fdd18896f2 100644 --- a/doc/emacs/display.texi +++ b/doc/emacs/display.texi @@ -765,7 +765,7 @@ This face determines the color of tool bar icons. @xref{Tool Bars}. This face determines the colors and font of Emacs's menus. @xref{Menu Bars}. @item tty-menu-enabled-face -@cindex faces for @code{text-mode} menus +@cindex faces for text-mode menus @cindex TTY menu faces This face is used to display enabled menu items on text-mode terminals. commit 7a069f35d4ce002dc10d666fde2850d8e6eee427 Author: Michael Albinus Date: Sun Feb 25 16:29:39 2018 +0100 Fix @kindex entries in manuals * doc/emacs/basic.texi: * doc/emacs/buffers.texi: * doc/emacs/building.texi: * doc/emacs/calendar.texi: * doc/emacs/custom.texi: * doc/emacs/dired.texi: * doc/emacs/display.texi: * doc/emacs/files.texi: * doc/emacs/frames.texi: * doc/emacs/help.texi: * doc/emacs/indent.texi: * doc/emacs/killing.texi: * doc/emacs/kmacro.texi: * doc/emacs/mark.texi: * doc/emacs/mini.texi: * doc/emacs/misc.texi: * doc/emacs/modes.texi: * doc/emacs/msdos-xtra.texi: * doc/emacs/msdos.texi: * doc/emacs/mule.texi: * doc/emacs/picture-xtra.texi: * doc/emacs/programs.texi: * doc/emacs/regs.texi: * doc/emacs/rmail.texi: * doc/emacs/screen.texi: * doc/emacs/search.texi: * doc/emacs/sending.texi: * doc/emacs/text.texi: * doc/emacs/trouble.texi: * doc/lispref/files.texi: * doc/misc/calc.texi: * doc/misc/cc-mode.texi: * doc/misc/ediff.texi: * doc/misc/epa.texi: * doc/misc/ert.texi: * doc/misc/eww.texi: * doc/misc/forms.texi: * doc/misc/gnus.texi: * doc/misc/info.texi: * doc/misc/mairix-el.texi: * doc/misc/message.texi: * doc/misc/mh-e.texi: * doc/misc/newsticker.texi: * doc/misc/org.texi: * doc/misc/pcl-cvs.texi: * doc/misc/rcirc.texi: * doc/misc/sc.texi: * doc/misc/sieve.texi: * doc/misc/vhdl-mode.texi: * doc/misc/vip.texi: * doc/misc/viper.texi: * doc/misc/woman.texi: Fix @kindex entries. Mark keys consistently. diff --git a/doc/emacs/basic.texi b/doc/emacs/basic.texi index aa91f0555e..cc689af6d2 100644 --- a/doc/emacs/basic.texi +++ b/doc/emacs/basic.texi @@ -40,7 +40,7 @@ adds the character to the buffer at point. Insertion moves point forward, so that point remains just after the inserted text. @xref{Point}. -@kindex RET +@kindex @key{RET} @kindex C-j @cindex newline @c @findex electric-indent-just-newline @@ -182,7 +182,7 @@ keyboard commands that move point in more sophisticated ways. Move forward one character (@code{forward-char}). @item @key{RIGHT} -@kindex RIGHT +@kindex @key{RIGHT} @findex right-char This command (@code{right-char}) behaves like @kbd{C-f}, except when point is in a right-to-left paragraph (@pxref{Bidirectional Editing}). @@ -193,7 +193,7 @@ point is in a right-to-left paragraph (@pxref{Bidirectional Editing}). Move backward one character (@code{backward-char}). @item @key{LEFT} -@kindex LEFT +@kindex @key{LEFT} @findex left-char This command (@code{left-char}) behaves like @kbd{C-b}, except if the current paragraph is right-to-left (@pxref{Bidirectional Editing}). @@ -201,7 +201,7 @@ current paragraph is right-to-left (@pxref{Bidirectional Editing}). @item C-n @itemx @key{DOWN} @kindex C-n -@kindex DOWN +@kindex @key{DOWN} @findex next-line Move down one screen line (@code{next-line}). This command attempts to keep the horizontal position unchanged, so if you start in the @@ -210,7 +210,7 @@ middle of one line, you move to the middle of the next. @item C-p @itemx @key{UP} @kindex C-p -@kindex UP +@kindex @key{UP} @findex previous-line Move up one screen line (@code{previous-line}). This command preserves position within the line, like @kbd{C-n}. @@ -218,14 +218,14 @@ preserves position within the line, like @kbd{C-n}. @item C-a @itemx @key{Home} @kindex C-a -@kindex HOME key +@kindex @key{HOME} @findex move-beginning-of-line Move to the beginning of the line (@code{move-beginning-of-line}). @item C-e @itemx @key{End} @kindex C-e -@kindex END key +@kindex @key{END} @findex move-end-of-line Move to the end of the line (@code{move-end-of-line}). @@ -234,8 +234,8 @@ Move forward one word (@code{forward-word}). @xref{Words}. @item C-@key{RIGHT} @itemx M-@key{RIGHT} -@kindex C-RIGHT -@kindex M-RIGHT +@kindex C-@key{RIGHT} +@kindex M-@key{RIGHT} @findex right-word This command (@code{right-word}) behaves like @kbd{M-f}, except it moves @emph{backward} by one word if the current paragraph is @@ -246,8 +246,8 @@ Move backward one word (@code{backward-word}). @xref{Words}. @item C-@key{LEFT} @itemx M-@key{LEFT} -@kindex C-LEFT -@kindex M-LEFT +@kindex C-@key{LEFT} +@kindex M-@key{LEFT} @findex left-word This command (@code{left-word}) behaves like @kbd{M-b}, except it moves @emph{forward} by one word if the current paragraph is @@ -314,7 +314,7 @@ also specify @var{n} by giving @kbd{M-g M-g} a numeric prefix argument. a plain prefix argument. @item M-g @key{TAB} -@kindex M-g TAB +@kindex M-g @key{TAB} @findex move-to-column Read a number @var{n} and move to column @var{n} in the current line. Column 0 is the leftmost column. If called with a prefix argument, diff --git a/doc/emacs/buffers.texi b/doc/emacs/buffers.texi index f8c1856058..2f0bb9740d 100644 --- a/doc/emacs/buffers.texi +++ b/doc/emacs/buffers.texi @@ -111,8 +111,8 @@ it, Emacs asks for the file name to use, and the buffer's major mode is re-established taking that file name into account (@pxref{Choosing Modes}). -@kindex C-x LEFT -@kindex C-x RIGHT +@kindex C-x @key{LEFT} +@kindex C-x @key{RIGHT} @findex next-buffer @findex previous-buffer For conveniently switching between a few buffers, use the commands @@ -419,13 +419,13 @@ removing the flags. @item @key{DEL} @findex Buffer-menu-backup-unmark -@kindex DEL @r{(Buffer Menu)} +@kindex @key{DEL} @r{(Buffer Menu)} Move to the previous line and remove all flags on that line (@code{Buffer-menu-backup-unmark}). @item M-@key{DEL} @findex Buffer-menu-unmark-all-buffers -@kindex M-DEL @r{(Buffer Menu)} +@kindex M-@key{DEL} @r{(Buffer Menu)} Remove a particular flag from all lines (@code{Buffer-menu-unmark-all-buffers}). This asks for a single character, and unmarks buffers marked with that character; typing @@ -479,7 +479,7 @@ visible buffer is displayed in its place. @itemx f @findex Buffer-menu-this-window @kindex f @r{(Buffer Menu)} -@kindex RET @r{(Buffer Menu)} +@kindex @key{RET} @r{(Buffer Menu)} Select this line's buffer, replacing the @file{*Buffer List*} buffer in its window (@code{Buffer-menu-this-window}). diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi index 7f86470ad4..52a42a196a 100644 --- a/doc/emacs/building.texi +++ b/doc/emacs/building.texi @@ -768,7 +768,7 @@ be bizarre. See the GDB manual entry regarding @code{jump} for details. @item @key{TAB} -@kindex TAB @r{(GUD)} +@kindex @key{TAB} @r{(GUD)} @findex gud-gdb-complete-command With GDB, complete a symbol name (@code{gud-gdb-complete-command}). This key is available only in the GUD interaction buffer. @@ -998,7 +998,7 @@ to the @dfn{current breakpoint} (the breakpoint which point is on): @table @kbd @item @key{SPC} -@kindex SPC @r{(GDB Breakpoints buffer)} +@kindex @key{SPC} @r{(GDB Breakpoints buffer)} @findex gdb-toggle-breakpoint Enable/disable current breakpoint (@code{gdb-toggle-breakpoint}). On a graphical display, this changes the color of the dot in the fringe @@ -1011,7 +1011,7 @@ is enabled, and gray when it is disabled. Delete the current breakpoint (@code{gdb-delete-breakpoint}). @item @key{RET} -@kindex RET @r{(GDB Breakpoints buffer)} +@kindex @key{RET} @r{(GDB Breakpoints buffer)} @findex gdb-goto-breakpoint Visit the source line for the current breakpoint (@code{gdb-goto-breakpoint}). @@ -1204,7 +1204,7 @@ immediate children exceeds the value of the variable To delete a complex watch expression, move point to the root expression in the speedbar and type @kbd{D} (@code{gdb-var-delete}). -@kindex RET @r{(GDB speedbar)} +@kindex @key{RET} @r{(GDB speedbar)} @findex gdb-edit-value To edit a variable with a simple data type, or a simple element of a complex data type, move point there in the speedbar and type @key{RET} diff --git a/doc/emacs/calendar.texi b/doc/emacs/calendar.texi index c6a84b5ab1..98089fd20f 100644 --- a/doc/emacs/calendar.texi +++ b/doc/emacs/calendar.texi @@ -328,7 +328,7 @@ date. (@code{calendar-redraw}) to redraw it. (This can only happen if you use non-Calendar-mode editing commands.) -@kindex SPC @r{(Calendar mode)} +@kindex @key{SPC} @r{(Calendar mode)} In Calendar mode, you can use @key{SPC} (@code{scroll-other-window}) and @key{DEL} (@code{scroll-other-window-down}) to scroll the other window (if there is one) up or down, respectively. This is handy when diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi index 9ba7e21101..da8f6f76a8 100644 --- a/doc/emacs/custom.texi +++ b/doc/emacs/custom.texi @@ -123,8 +123,8 @@ or moving point there and typing @kbd{@key{RET}}. For example, the group names like @samp{[Editing]} are links; activating one of these links brings up the customization buffer for that group. -@kindex TAB @r{(customization buffer)} -@kindex S-TAB @r{(customization buffer)} +@kindex @key{TAB} @r{(customization buffer)} +@kindex @key{S-TAB} @r{(customization buffer)} @findex widget-forward @findex widget-backward In the customization buffer, you can type @kbd{@key{TAB}} @@ -243,7 +243,7 @@ You don't have to worry about specifying a value that is not valid; the @samp{Set for Current Session} operation checks for validity and will not install an unacceptable value. -@kindex M-TAB @r{(customization buffer)} +@kindex M-@key{TAB} @r{(customization buffer)} @kindex C-M-i @r{(customization buffer)} @findex widget-complete While editing certain kinds of values, such as file names, directory diff --git a/doc/emacs/dired.texi b/doc/emacs/dired.texi index 15c9cb5687..2c2d9dded2 100644 --- a/doc/emacs/dired.texi +++ b/doc/emacs/dired.texi @@ -136,7 +136,7 @@ buffers. The keys @kbd{C-n} and @kbd{C-p} are redefined to put the cursor at the beginning of the file name on the line, rather than at the beginning of the line. -@kindex SPC @r{(Dired)} +@kindex @key{SPC} @r{(Dired)} For extra convenience, @key{SPC} and @kbd{n} in Dired are equivalent to @kbd{C-n}. @kbd{p} is equivalent to @kbd{C-p}. (Moving by lines is so common in Dired that it deserves to be easy to type.) @key{DEL} @@ -204,7 +204,7 @@ region for deletion; in this case, the command does not move point, and ignores any prefix argument. @kindex u @r{(Dired deletion)} -@kindex DEL @r{(Dired)} +@kindex @key{DEL} @r{(Dired)} The reason for flagging files for deletion, rather than deleting files immediately, is to reduce the danger of deleting a file accidentally. Until you direct Dired to delete the flagged files, you @@ -348,7 +348,7 @@ and supplying that file name (@code{dired-find-file}). @xref{Visiting}. @item @key{RET} @itemx e -@kindex RET @r{(Dired)} +@kindex @key{RET} @r{(Dired)} @kindex e @r{(Dired)} Equivalent to @kbd{f}. @@ -464,7 +464,7 @@ unmark the previous @minus{}@var{n} files). @item @key{DEL} @itemx * @key{DEL} -@kindex * DEL @r{(Dired)} +@kindex * @key{DEL} @r{(Dired)} @findex dired-unmark-backward @cindex unmarking files (in Dired) Move point to previous line and remove any mark on that line @@ -485,7 +485,7 @@ Remove all marks from all the files in this Dired buffer @item * ? @var{markchar} @itemx M-@key{DEL} @kindex * ? @r{(Dired)} -@kindex M-DEL @r{(Dired)} +@kindex M-@key{DEL} @r{(Dired)} @findex dired-unmark-all-files Remove all marks that use the character @var{markchar} (@code{dired-unmark-all-files}). If invoked with @kbd{M-@key{DEL}}, diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi index 42b07cc0fe..e86c3e8fc9 100644 --- a/doc/emacs/display.texi +++ b/doc/emacs/display.texi @@ -79,10 +79,10 @@ Scroll backward (@code{scroll-down-command}). @kindex C-v @kindex M-v -@kindex next -@kindex prior -@kindex PageDown -@kindex PageUp +@kindex @key{next} +@kindex @key{prior} +@kindex @key{PageDown} +@kindex @key{PageUp} @findex scroll-up-command @findex scroll-down-command @kbd{C-v} (@code{scroll-up-command}) scrolls forward by nearly the @@ -447,8 +447,8 @@ it. @xref{Disabling}. @cindex mode, View @kindex s @r{(View mode)} -@kindex SPC @r{(View mode)} -@kindex DEL @r{(View mode)} +@kindex @key{SPC} @r{(View mode)} +@kindex @key{DEL} @r{(View mode)} View mode is a minor mode that lets you scan a buffer by sequential screenfuls. It provides commands for scrolling through the buffer conveniently but not for changing it. Apart from the usual Emacs diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi index d7ca1e9161..9c2a922bfc 100644 --- a/doc/emacs/files.texi +++ b/doc/emacs/files.texi @@ -1966,7 +1966,7 @@ then specifying @file{/tmp/foo*bar} will visit only @cindex file name caching @cindex cache of file names @pindex find -@kindex C-TAB +@kindex C-@key{TAB} @findex file-cache-minibuffer-complete You can use the @dfn{file name cache} to make it easy to locate a file by name, without having to remember exactly where it is located. diff --git a/doc/emacs/frames.texi b/doc/emacs/frames.texi index 6f19576bb6..4eb44ba96b 100644 --- a/doc/emacs/frames.texi +++ b/doc/emacs/frames.texi @@ -479,14 +479,14 @@ cycles through all the frames on your terminal. @findex delete-other-frames Delete all frames on the current terminal, except the selected one. -@item M- -@kindex M- +@item M-@key{F10} +@kindex M-@key{F10} @findex toggle-frame-maximized Toggle the maximization state of the current frame. When a frame is maximized, it fills the screen. -@item -@kindex +@item @key{F11>} +@kindex @key{F11} @findex toggle-frame-fullscreen Toggle full-screen mode for the current frame. (The difference between full-screen and maximized is normally that the former diff --git a/doc/emacs/help.texi b/doc/emacs/help.texi index e005fe358d..4abd267276 100644 --- a/doc/emacs/help.texi +++ b/doc/emacs/help.texi @@ -4,12 +4,11 @@ @c See file emacs.texi for copying conditions. @node Help @chapter Help -@kindex Help @cindex help @cindex self-documentation @findex help-command @kindex C-h -@kindex F1 +@kindex @key{F1} @kindex C-h C-h @findex help-for-help @@ -432,7 +431,7 @@ Go back to the previous help topic (@code{help-go-back}). @findex help-follow @findex help-go-back @findex help-go-forward -@kindex RET @r{(Help mode)} +@kindex @key{RET} @r{(Help mode)} @kindex C-c C-b @r{(Help mode)} @kindex l @r{(Help mode)} @kindex C-c C-f @r{(Help mode)} @@ -456,9 +455,9 @@ code definitions, and URLs (web pages). The first two are opened in Emacs, and the third using a web browser via the @code{browse-url} command (@pxref{Browse-URL}). -@kindex TAB @r{(Help mode)} +@kindex @key{TAB} @r{(Help mode)} @findex forward-button -@kindex S-TAB @r{(Help mode)} +@kindex S-@key{TAB} @r{(Help mode)} @findex backward-button In a help buffer, @key{TAB} (@code{forward-button}) moves point forward to the next hyperlink, while @kbd{S-@key{TAB}} diff --git a/doc/emacs/indent.texi b/doc/emacs/indent.texi index b38e85819c..eae334449c 100644 --- a/doc/emacs/indent.texi +++ b/doc/emacs/indent.texi @@ -17,7 +17,7 @@ programming language modes. @xref{Program Indent}, for additional documentation about indenting in programming modes. @findex indent-for-tab-command -@kindex TAB @r{(indentation)} +@kindex @key{TAB} @r{(indentation)} The simplest way to perform indentation is the @key{TAB} key. In most major modes, this runs the command @code{indent-for-tab-command}. (In C and related modes, @key{TAB} runs the command @@ -120,7 +120,7 @@ If a numeric argument is supplied, indent every line in the region to that column number. @item C-x @key{TAB} -@kindex C-x TAB +@kindex C-x @key{TAB} @findex indent-rigidly @cindex remove indentation This command is used to change the indentation of all lines that begin diff --git a/doc/emacs/killing.texi b/doc/emacs/killing.texi index 4118b752e6..7b89dce4e6 100644 --- a/doc/emacs/killing.texi +++ b/doc/emacs/killing.texi @@ -111,7 +111,7 @@ active (@pxref{Using Region}). @kindex M-\ @findex delete-horizontal-space -@kindex M-SPC +@kindex M-@key{SPC} @findex just-one-space @findex cycle-spacing The other delete commands are those that delete only whitespace diff --git a/doc/emacs/kmacro.texi b/doc/emacs/kmacro.texi index 8528c9f6bd..83fe1979e0 100644 --- a/doc/emacs/kmacro.texi +++ b/doc/emacs/kmacro.texi @@ -64,8 +64,8 @@ Run the last keyboard macro on each line that begins in the region (@code{apply-macro-to-region-lines}). @end table -@kindex F3 -@kindex F4 +@kindex @key{F3} +@kindex @key{F4} @findex kmacro-start-macro-or-insert-counter @findex kmacro-end-or-call-macro @findex kmacro-end-and-call-macro @@ -481,7 +481,7 @@ Edit the last 300 keystrokes as a keyboard macro @findex kmacro-edit-macro @kindex C-x C-k C-e -@kindex C-x C-k RET +@kindex C-x C-k @key{RET} You can edit the last keyboard macro by typing @kbd{C-x C-k C-e} or @kbd{C-x C-k @key{RET}} (@code{kmacro-edit-macro}). This formats the macro definition in a buffer and enters a specialized major mode for @@ -505,7 +505,7 @@ keyboard input that you would use to invoke the macro---@kbd{C-x e} or @section Stepwise Editing a Keyboard Macro @findex kmacro-step-edit-macro -@kindex C-x C-k SPC +@kindex C-x C-k @key{SPC} You can interactively replay and edit the last keyboard macro, one command at a time, by typing @kbd{C-x C-k @key{SPC}} (@code{kmacro-step-edit-macro}). Unless you quit the macro using diff --git a/doc/emacs/mark.texi b/doc/emacs/mark.texi index 0ffa9f74ac..20cc67a1e7 100644 --- a/doc/emacs/mark.texi +++ b/doc/emacs/mark.texi @@ -79,7 +79,7 @@ Set the mark at point if the mark is inactive, then move point. @xref{Shift Selection}. @end table -@kindex C-SPC +@kindex C-@key{SPC} @kindex C-@@ @findex set-mark-command The most common way to set the mark is with @kbd{C-@key{SPC}} @@ -309,7 +309,7 @@ Move point to where the mark was, and restore the mark from the ring of former marks. @end table -@kindex C-SPC C-SPC +@kindex C-@key{SPC} C-@key{SPC} The command @kbd{C-@key{SPC} C-@key{SPC}} is handy when you want to use the mark to remember a position to which you may wish to return. It pushes the current point onto the mark ring, without activating the @@ -320,7 +320,7 @@ and the second @kbd{C-@key{SPC}} deactivates it. (When Transient Mark mode is off, @kbd{C-@key{SPC} C-@key{SPC}} instead activates Transient Mark mode temporarily; @pxref{Disabled Transient Mark}.) -@kindex C-u C-SPC +@kindex C-u C-@key{SPC} To return to a marked position, use @code{set-mark-command} with a prefix argument: @kbd{C-u C-@key{SPC}}. This moves point to where the mark was, and deactivates the mark if it was active. Each subsequent @@ -365,7 +365,7 @@ of buffers that you have been in, and, for each buffer, a place where you set the mark. The length of the global mark ring is controlled by @code{global-mark-ring-max}, and is 16 by default. -@kindex C-x C-SPC +@kindex C-x C-@key{SPC} @findex pop-global-mark The command @kbd{C-x C-@key{SPC}} (@code{pop-global-mark}) jumps to the buffer and position of the latest entry in the global ring. It also @@ -447,7 +447,7 @@ using @kbd{C-@key{SPC} C-@key{SPC}} or @kbd{C-u C-x C-x}. @table @kbd @item C-@key{SPC} C-@key{SPC} -@kindex C-SPC C-SPC@r{, disabling Transient Mark} +@kindex C-@key{SPC} C-@key{SPC}@r{, disabling Transient Mark} Set the mark at point (like plain @kbd{C-@key{SPC}}) and enable Transient Mark mode just once, until the mark is deactivated. (This is not really a separate command; you are using the @kbd{C-@key{SPC}} diff --git a/doc/emacs/mini.texi b/doc/emacs/mini.texi index 579697f47b..2a77b840e1 100644 --- a/doc/emacs/mini.texi +++ b/doc/emacs/mini.texi @@ -266,7 +266,7 @@ Completion}. @node Completion Example @subsection Completion Example -@kindex TAB @r{(completion example)} +@kindex @key{TAB} @r{(completion example)} A simple example may help here. @kbd{M-x} uses the minibuffer to read the name of a command, so completion works by matching the minibuffer text against the names of existing Emacs commands. Suppose @@ -318,7 +318,7 @@ first (@code{minibuffer-complete-and-exit}). @xref{Completion Exit}. Display a list of completions (@code{minibuffer-completion-help}). @end table -@kindex TAB @r{(completion)} +@kindex @key{TAB} @r{(completion)} @findex minibuffer-complete @key{TAB} (@code{minibuffer-complete}) is the most fundamental completion command. It searches for all possible completions that @@ -326,7 +326,7 @@ match the existing minibuffer text, and attempts to complete as much as it can. @xref{Completion Styles}, for how completion alternatives are chosen. -@kindex SPC @r{(completion)} +@kindex @key{SPC} @r{(completion)} @findex minibuffer-complete-word @key{SPC} (@code{minibuffer-complete-word}) completes like @key{TAB}, but only up to the next hyphen or space. If you have @@ -379,7 +379,7 @@ completion alternative (@code{previous-completion}). @node Completion Exit @subsection Completion Exit -@kindex RET @r{(completion in minibuffer)} +@kindex @key{RET} @r{(completion in minibuffer)} @findex minibuffer-complete-and-exit When a command reads an argument using the minibuffer with completion, it also controls what happens when you type @key{RET} @@ -655,8 +655,8 @@ directory. @findex previous-line-or-history-element @findex next-line-or-history-element -@kindex UP @r{(minibuffer history)} -@kindex DOWN @r{(minibuffer history)} +@kindex @key{UP} @r{(minibuffer history)} +@kindex @key{DOWN} @r{(minibuffer history)} The arrow keys @kbd{@key{UP}} and @kbd{@key{DOWN}} work like @kbd{M-p} and @kbd{M-n}, but if the current history item is longer than a single line, they allow you to move to the previous or next @@ -727,7 +727,7 @@ Display the entire command history, showing all the commands @kbd{C-x @key{ESC} @key{ESC}} can repeat, most recent first. @end table -@kindex C-x ESC ESC +@kindex C-x @key{ESC} @key{ESC} @findex repeat-complex-command @kbd{C-x @key{ESC} @key{ESC}} re-executes a recent command that used the minibuffer. With no argument, it repeats the last such command. diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi index e1b8070f43..7f2a0a1107 100644 --- a/doc/emacs/misc.texi +++ b/doc/emacs/misc.texi @@ -129,7 +129,7 @@ sessions. The following commands are available in the Gnus group buffer: @table @kbd -@kindex SPC @r{(Gnus Group mode)} +@kindex @key{SPC} @r{(Gnus Group mode)} @findex gnus-group-read-group @item @key{SPC} Switch to the summary buffer for the group on the current line. @@ -177,7 +177,7 @@ Kill the group on the current line. Killed groups are not recorded in the @file{.newsrc} file, and they are not shown in the @kbd{l} or @kbd{L} listings. -@kindex DEL @r{(Gnus Group mode)} +@kindex @key{DEL} @r{(Gnus Group mode)} @item @key{DEL} Move point to the previous group containing unread articles. @@ -203,7 +203,7 @@ Update your Gnus settings, and quit Gnus. The following commands are available in the Gnus summary buffer: @table @kbd -@kindex SPC @r{(Gnus Summary mode)} +@kindex @key{SPC} @r{(Gnus Summary mode)} @findex gnus-summary-next-page @item @key{SPC} If there is no article selected, select the article on the current @@ -214,7 +214,7 @@ buffer, select the next unread article. Thus, you can read through all articles by repeatedly typing @key{SPC}. -@kindex DEL @r{(Gnus Summary mode)} +@kindex @key{DEL} @r{(Gnus Summary mode)} @findex gnus-summary-prev-page @item @key{DEL} Scroll the text of the article backwards. @@ -481,8 +481,8 @@ page, type @kbd{p}, @key{prior} or @kbd{C-x [} @findex doc-view-scroll-up-or-next-page @findex doc-view-scroll-down-or-previous-page -@kindex SPC @r{(DocView mode)} -@kindex DEL @r{(DocView mode)} +@kindex @key{SPC} @r{(DocView mode)} +@kindex @key{DEL} @r{(DocView mode)} @key{SPC} (@code{doc-view-scroll-up-or-next-page}) is a convenient way to advance through the document. It scrolls within the current page or advances to the next. @key{DEL} moves backwards in a similar @@ -826,7 +826,7 @@ commands: @table @kbd @item @key{RET} -@kindex RET @r{(Shell mode)} +@kindex @key{RET} @r{(Shell mode)} @findex comint-send-input Send the current line as input to the subshell (@code{comint-send-input}). Any shell prompt at the beginning of the @@ -836,7 +836,7 @@ interactive shell. However, you can also invoke @key{RET} elsewhere in the shell buffer to submit the current line as input. @item @key{TAB} -@kindex TAB @r{(Shell mode)} +@kindex @key{TAB} @r{(Shell mode)} @findex completion-at-point@r{, in Shell Mode} @cindex shell completion Complete the command name or file name before point in the shell @@ -1182,7 +1182,7 @@ Move point to the previous prompt (@code{comint-previous-prompt}). @item C-c C-n Move point to the following prompt (@code{comint-next-prompt}). -@kindex C-c RET @r{(Shell mode)} +@kindex C-c @key{RET} @r{(Shell mode)} @findex comint-copy-old-input @item C-c @key{RET} Copy the input command at point, inserting the copy at the end of the @@ -2796,7 +2796,7 @@ the package commentary by typing @kbd{C-h P browse-url @key{RET}}. Activate URLs and e-mail addresses in the current buffer. @end table -@kindex C-c RET @r{(Goto Address mode)} +@kindex C-c @key{RET} @r{(Goto Address mode)} @findex goto-address-at-point You can make Emacs mark out URLs specially in the current buffer, by typing @kbd{M-x goto-address-mode}. When this buffer-local minor mode diff --git a/doc/emacs/modes.texi b/doc/emacs/modes.texi index 2bbc17b26d..fd8f0110a3 100644 --- a/doc/emacs/modes.texi +++ b/doc/emacs/modes.texi @@ -33,8 +33,8 @@ one another, and of the selected major mode. @section Major Modes @cindex major modes @cindex mode, major -@kindex TAB @r{(and major modes)} -@kindex DEL @r{(and major modes)} +@kindex @key{TAB} @r{(and major modes)} +@kindex @key{DEL} @r{(and major modes)} @kindex C-j @r{(and major modes)} Every buffer possesses a major mode, which determines the editing @@ -236,7 +236,7 @@ called Outline mode. @xref{Outline Mode}. @cindex Overwrite mode @cindex mode, Overwrite @findex overwrite-mode -@kindex INSERT +@kindex @key{INSERT} @item Overwrite mode causes ordinary printing characters to replace existing text instead of shoving it to the right. For example, if point is in diff --git a/doc/emacs/msdos-xtra.texi b/doc/emacs/msdos-xtra.texi index 406ebd1905..94e4161c15 100644 --- a/doc/emacs/msdos-xtra.texi +++ b/doc/emacs/msdos-xtra.texi @@ -47,8 +47,8 @@ about Emacs's special handling of text files under MS-DOS (and Windows). @node MS-DOS Keyboard @subsection Keyboard Usage on MS-DOS -@kindex DEL @r{(MS-DOS)} -@kindex BS @r{(MS-DOS)} +@kindex @key{DEL} @r{(MS-DOS)} +@kindex @key{BS} @r{(MS-DOS)} The key that is called @key{DEL} in Emacs (because that's how it is designated on most workstations) is known as @key{BS} (backspace) on a PC@. That is why the PC-specific terminal initialization remaps the @@ -56,7 +56,7 @@ PC@. That is why the PC-specific terminal initialization remaps the as @kbd{C-d} for the same reasons. @kindex C-g @r{(MS-DOS)} -@kindex C-Break @r{(MS-DOS)} +@kindex C-@key{Break} @r{(MS-DOS)} @cindex quitting on MS-DOS Emacs built for MS-DOS recognizes @kbd{C-@key{Break}} as a quit character, just like @kbd{C-g}. This is because Emacs cannot detect diff --git a/doc/emacs/msdos.texi b/doc/emacs/msdos.texi index b3ec11d4fd..9af0edaa12 100644 --- a/doc/emacs/msdos.texi +++ b/doc/emacs/msdos.texi @@ -579,7 +579,7 @@ modifier with the trailing dash but with no key indicates that all Windows defined hotkeys for that modifier are to be overridden in the favor of Emacs. -@kindex M-TAB@r{, (MS-Windows)} +@kindex M-@key{TAB}@r{, (MS-Windows)} @cindex @kbd{M-@key{TAB}} vs @kbd{@key{Alt}-@key{TAB}} (MS-Windows) @cindex @kbd{@key{Alt}-@key{TAB}} vs @kbd{M-@key{TAB}} (MS-Windows) For example, @code{(w32-register-hot-key [M-tab])} lets you use @@ -693,8 +693,8 @@ its normal effect: for example, @kbd{@key{Lwindow}} opens the @code{Start} menu, etc. @vindex w32-recognize-altgr -@kindex AltGr @r{(MS-Windows)} -@cindex AltGr key (MS-Windows) +@kindex @key{AltGr} @r{(MS-Windows)} +@cindex @key{AltGr} key (MS-Windows) The variable @code{w32-recognize-altgr} controls whether the @key{AltGr} key (if it exists on your keyboard), or its equivalent, the combination of the right @key{Alt} and left @key{Ctrl} keys diff --git a/doc/emacs/mule.texi b/doc/emacs/mule.texi index dc80bc9217..487285f8d3 100644 --- a/doc/emacs/mule.texi +++ b/doc/emacs/mule.texi @@ -130,7 +130,7 @@ various @dfn{input methods}, typically one for each script or language, which make it easier to type characters in the script. @xref{Input Methods}. -@kindex C-x RET +@kindex C-x @key{RET} The prefix key @kbd{C-x @key{RET}} is used for commands that pertain to multibyte characters, coding systems, and input methods. @@ -577,7 +577,7 @@ Display a list of all the supported input methods. @findex set-input-method @vindex current-input-method -@kindex C-x RET C-\ +@kindex C-x @key{RET} C-\ To choose an input method for the current buffer, use @kbd{C-x @key{RET} C-\} (@code{set-input-method}). This command reads the input method name from the minibuffer; the name normally starts with the @@ -1021,7 +1021,7 @@ Convert a region that was decoded using coding system @var{wrong}, decoding it using coding system @var{right} instead. @end table -@kindex C-x RET f +@kindex C-x @key{RET} f @findex set-buffer-file-coding-system The command @kbd{C-x @key{RET} f} (@code{set-buffer-file-coding-system}) sets the file coding system for @@ -1043,7 +1043,7 @@ current buffer. For example, @kbd{C-x @key{RET} f dos @key{RET}} will cause Emacs to save the current buffer's text with DOS-style carriage-return linefeed line endings. -@kindex C-x RET c +@kindex C-x @key{RET} c @findex universal-coding-system-argument Another way to specify the coding system for a file is when you visit the file. First use the command @kbd{C-x @key{RET} c} @@ -1077,7 +1077,7 @@ then save it in a file. Selecting a language environment typically sets this variable to a good choice of default coding system for that language environment. -@kindex C-x RET r +@kindex C-x @key{RET} r @findex revert-buffer-with-coding-system If you visit a file with a wrong coding system, you can correct this with @kbd{C-x @key{RET} r} (@code{revert-buffer-with-coding-system}). @@ -1113,8 +1113,8 @@ subprocess input and output in the current buffer (@code{set-buffer-process-coding-system}). @end table -@kindex C-x RET x -@kindex C-x RET X +@kindex C-x @key{RET} x +@kindex C-x @key{RET} X @findex set-selection-coding-system @findex set-next-selection-coding-system The command @kbd{C-x @key{RET} x} (@code{set-selection-coding-system}) @@ -1139,7 +1139,7 @@ list of some of these symbols, Emacs tries only the request types in the list, in order, until one of them succeeds, or until the list is exhausted. -@kindex C-x RET p +@kindex C-x @key{RET} p @findex set-buffer-process-coding-system The command @kbd{C-x @key{RET} p} (@code{set-buffer-process-coding-system}) specifies the coding system for input and output to a subprocess. This @@ -1181,7 +1181,7 @@ names (@code{set-file-name-coding-system}). @end table @findex set-file-name-coding-system -@kindex C-x RET F +@kindex C-x @key{RET} F @cindex file names with non-@acronym{ASCII} characters The command @kbd{C-x @key{RET} F} (@code{set-file-name-coding-system}) specifies a coding system to use for encoding file @emph{names}. It @@ -1247,7 +1247,7 @@ Use coding system @var{coding} for keyboard input (@code{set-keyboard-coding-system}). @end table -@kindex C-x RET t +@kindex C-x @key{RET} t @findex set-terminal-coding-system The command @kbd{C-x @key{RET} t} (@code{set-terminal-coding-system}) specifies the coding system for terminal output. If you specify a @@ -1264,7 +1264,7 @@ Emacs knows which characters the terminal can actually handle. Emacs can deduce the proper coding system from your terminal type or your locale specification (@pxref{Language Environments}). -@kindex C-x RET k +@kindex C-x @key{RET} k @findex set-keyboard-coding-system @vindex keyboard-coding-system The command @kbd{C-x @key{RET} k} (@code{set-keyboard-coding-system}), @@ -1843,8 +1843,8 @@ character positions may look discontinuous if the region spans reordered text. This is normal and similar to the behavior of other programs that support bidirectional text. -@kindex RIGHT@r{, and bidirectional text} -@kindex LEFT@r{, and bidirectional text} +@kindex @key{RIGHT}@r{, and bidirectional text} +@kindex @key{LEFT}@r{, and bidirectional text} @findex right-char@r{, and bidirectional text} @findex left-char@r{, and bidirectional text} Cursor motion commands bound to arrow keys, such as @key{LEFT} and diff --git a/doc/emacs/picture-xtra.texi b/doc/emacs/picture-xtra.texi index 39c353b0ff..35387a07b0 100644 --- a/doc/emacs/picture-xtra.texi +++ b/doc/emacs/picture-xtra.texi @@ -191,7 +191,7 @@ C-b} (@code{picture-motion-reverse}) moves in the opposite direction. @node Tabs in Picture @subsection Picture Mode Tabs -@kindex M-TAB @r{(Picture mode)} +@kindex M-@key{TAB} @r{(Picture mode)} @findex picture-tab-search @vindex picture-tab-chars Two kinds of tab-like action are provided in Picture mode. Use @@ -214,7 +214,7 @@ current tab stop settings; it is the Picture mode equivalent of @code{tab-to-tab-stop}. Normally it just moves point, but with a numeric argument it clears the text that it moves over. -@kindex C-c TAB @r{(Picture mode)} +@kindex C-c @key{TAB} @r{(Picture mode)} @findex picture-set-tab-stops The context-based and tab-stop-based forms of tabbing are brought together by the command @kbd{C-c @key{TAB}} (@code{picture-set-tab-stops}). diff --git a/doc/emacs/programs.texi b/doc/emacs/programs.texi index b6bd173e4d..76a7b89645 100644 --- a/doc/emacs/programs.texi +++ b/doc/emacs/programs.texi @@ -100,7 +100,7 @@ language that you might want to edit. If it doesn't have a mode for your favorite language, the mode might be implemented in a package not distributed with Emacs (@pxref{Packages}); or you can contribute one. -@kindex DEL @r{(programming modes)} +@kindex @key{DEL} @r{(programming modes)} @findex backward-delete-char-untabify In most programming languages, indentation should vary from line to line to illustrate the structure of the program. Therefore, in most @@ -381,7 +381,7 @@ Insert a newline, then adjust indentation of following line (@code{newline}). @end table -@kindex TAB @r{(programming modes)} +@kindex @key{TAB} @r{(programming modes)} @findex indent-line-function The basic indentation command is @kbd{@key{TAB}} (@code{indent-for-tab-command}), which was documented in @@ -446,7 +446,7 @@ indentation of the line where the grouping starts). The function that etc. To correct the overall indentation as well, type @kbd{@key{TAB}} first. -@kindex C-u TAB +@kindex C-u @key{TAB} If you like the relative indentation within a grouping but not the indentation of its first line, move point to that first line and type @kbd{C-u @key{TAB}}. In Lisp, C, and some other major modes, @@ -718,7 +718,7 @@ argument moves the previous balanced expression backwards across those before it. An argument of zero, rather than doing nothing, transposes the balanced expressions ending at or after point and the mark. -@kindex C-M-SPC +@kindex C-M-@key{SPC} To operate on balanced expressions with a command which acts on the region, type @kbd{C-M-@key{SPC}} (@code{mark-sexp}). This sets the mark where @kbd{C-M-f} would move to. While the mark is active, each @@ -1043,7 +1043,7 @@ effect as @kbd{C-u M-;} by typing @kbd{M-x comment-kill} (@code{comment-dwim} actually calls @code{comment-kill} as a subroutine when it is given a prefix argument). -@kindex C-c C-c (C mode) +@kindex C-c C-c @r{(C mode)} @findex comment-region @findex uncomment-region The command @kbd{M-x comment-region} is equivalent to calling @@ -1380,7 +1380,7 @@ nor comments). The default value is @code{code}. Completion is normally done in the minibuffer (@pxref{Completion}), but you can also complete symbol names in ordinary Emacs buffers. -@kindex M-TAB +@kindex M-@key{TAB} @kindex C-M-i In programming language modes, type @kbd{C-M-i} or @kbd{M-@key{TAB}} to complete the partial symbol before point. On graphical displays, @@ -1486,7 +1486,7 @@ Prompt for the name of a function defined in any file Emacs has parsed, and move point there (@code{semantic-complete-jump}). @item C-c , @key{SPC} -@kindex C-c , SPC +@kindex C-c , @key{SPC} Display a list of possible completions for the symbol at point (@code{semantic-complete-analyze-inline}). This also activates a set of special key bindings for choosing a completion: @kbd{@key{RET}} @@ -1660,7 +1660,7 @@ behind. A prefix argument acts as a repeat count. With a negative argument, move backward. @item M-a -@kindex M-a (C mode) +@kindex M-a @r{(C mode)} @findex c-beginning-of-statement Move point to the beginning of the innermost C statement (@code{c-beginning-of-statement}). If point is already at the beginning @@ -1671,7 +1671,7 @@ In comments or in strings which span more than one line, this command moves by sentences instead of statements. @item M-e -@kindex M-e (C mode) +@kindex M-e @r{(C mode)} @findex c-end-of-statement Move point to the end of the innermost C statement or sentence; like @kbd{M-a} except that it moves in the other direction @@ -1736,17 +1736,17 @@ preprocessor commands. @item C-c C-@key{DEL} @itemx C-c @key{DEL} @findex c-hungry-delete-backwards -@kindex C-c C-DEL (C Mode) -@kindex C-c DEL (C Mode) +@kindex C-c C-@key{DEL} @r{(C Mode)} +@kindex C-c @key{DEL} @r{(C Mode)} Delete the entire block of whitespace preceding point (@code{c-hungry-delete-backwards}). @item C-c C-d @itemx C-c C-@key{Delete} @itemx C-c @key{Delete} @findex c-hungry-delete-forward -@kindex C-c C-d (C Mode) -@kindex C-c C-Delete (C Mode) -@kindex C-c Delete (C Mode) +@kindex C-c C-d @r{(C Mode)} +@kindex C-c C-@key{Delete} @r{(C Mode)} +@kindex C-c @key{Delete} @r{(C Mode)} Delete the entire block of whitespace after point (@code{c-hungry-delete-forward}). @end table diff --git a/doc/emacs/regs.texi b/doc/emacs/regs.texi index 8ff36ca554..37a69347f4 100644 --- a/doc/emacs/regs.texi +++ b/doc/emacs/regs.texi @@ -70,7 +70,7 @@ Jump to the position and buffer saved in register @var{r} (@code{jump-to-register}). @end table -@kindex C-x r SPC +@kindex C-x r @key{SPC} @findex point-to-register Typing @kbd{C-x r @key{SPC}} (@code{point-to-register}), followed by a character @kbd{@var{r}}, saves both the position of point and the diff --git a/doc/emacs/rmail.texi b/doc/emacs/rmail.texi index e9371f39a9..15d66a3840 100644 --- a/doc/emacs/rmail.texi +++ b/doc/emacs/rmail.texi @@ -109,9 +109,9 @@ Scroll to start of message (@code{rmail-beginning-of-message}). Scroll to end of message (@code{rmail-end-of-message}). @end table -@kindex SPC @r{(Rmail)} -@kindex DEL @r{(Rmail)} -@kindex S-SPC @r{(Rmail)} +@kindex @key{SPC} @r{(Rmail)} +@kindex @key{DEL} @r{(Rmail)} +@kindex S-@key{SPC} @r{(Rmail)} Since the most common thing to do while reading a message is to scroll through it by screenfuls, Rmail makes @key{SPC} and @key{DEL} (or @kbd{S-@key{SPC}}) do the same as @kbd{C-v} (@code{scroll-up-command}) diff --git a/doc/emacs/screen.texi b/doc/emacs/screen.texi index 19a4a9e4b6..674d1165d8 100644 --- a/doc/emacs/screen.texi +++ b/doc/emacs/screen.texi @@ -304,7 +304,7 @@ the full command name and documentation for a menu item, type @kbd{C-h k}, and then select the menu bar with the mouse in the usual way (@pxref{Key Help}). -@kindex F10 +@kindex @key{F10} @findex menu-bar-open @cindex menu bar access using keyboard Instead of using the mouse, you can also invoke the first menu bar diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi index 723bdf1ad8..7ca73f9b6d 100644 --- a/doc/emacs/search.texi +++ b/doc/emacs/search.texi @@ -397,7 +397,7 @@ or @code{query-replace-regexp} (depending on search mode) with the current search string used as the string to replace. A negative prefix argument means to replace backward. @xref{Query Replace}. -@kindex M-TAB @r{(Incremental search)} +@kindex M-@key{TAB} @r{(Incremental search)} Typing @kbd{M-@key{TAB}} in incremental search invokes @code{isearch-complete}, which attempts to complete the search string using the search ring (the previous search strings you used) as a list @@ -1186,8 +1186,8 @@ differences usually don't matter; etc. This is known as tailor them to your needs. @cindex lax space matching in search -@kindex M-s SPC @r{(Incremental search)} -@kindex SPC @r{(Incremental search)} +@kindex M-s @key{SPC} @r{(Incremental search)} +@kindex @key{SPC} @r{(Incremental search)} @findex isearch-toggle-lax-whitespace @vindex search-whitespace-regexp By default, search commands perform @dfn{lax space matching}: @@ -1570,10 +1570,10 @@ read-only text. The default is not to ignore them. or regexp are: @ignore @c Not worth it. -@kindex SPC @r{(query-replace)} -@kindex DEL @r{(query-replace)} +@kindex @key{SPC} @r{(query-replace)} +@kindex @key{DEL} @r{(query-replace)} @kindex , @r{(query-replace)} -@kindex RET @r{(query-replace)} +@kindex @key{RET} @r{(query-replace)} @kindex . @r{(query-replace)} @kindex ! @r{(query-replace)} @kindex ^ @r{(query-replace)} @@ -1770,7 +1770,7 @@ Note that matches for the regexp you type are extended to include complete lines, and a match that starts before the previous match ends is not considered a match. -@kindex RET @r{(Occur mode)} +@kindex @key{RET} @r{(Occur mode)} @kindex o @r{(Occur mode)} @kindex C-o @r{(Occur mode)} In the @file{*Occur*} buffer, you can click on each entry, or move diff --git a/doc/emacs/sending.texi b/doc/emacs/sending.texi index b7bdd69c7c..c7cc005a21 100644 --- a/doc/emacs/sending.texi +++ b/doc/emacs/sending.texi @@ -461,7 +461,7 @@ just after the header separator line---that is, to the beginning of the body. @findex message-tab -@kindex TAB @r{(Message mode)} +@kindex @key{TAB} @r{(Message mode)} While editing a header field that contains addresses, such as @samp{To:}, @samp{Cc:} and @samp{Bcc:}, you can complete an address by typing @key{TAB} (@code{message-tab}). This attempts to insert the diff --git a/doc/emacs/text.texi b/doc/emacs/text.texi index 9ee31ab466..2170e8648b 100644 --- a/doc/emacs/text.texi +++ b/doc/emacs/text.texi @@ -137,7 +137,7 @@ kill only the next word but not the punctuation before it, simply do @kbd{M-@key{DEL}}.) @kbd{M-d} takes arguments just like @kbd{M-f}. @findex backward-kill-word -@kindex M-DEL +@kindex M-@key{DEL} @kbd{M-@key{DEL}} (@code{backward-kill-word}) kills the word before point. It kills everything from point back to where @kbd{M-b} would move to. For instance, if point is after the space in @w{@samp{FOO, @@ -214,7 +214,7 @@ of the sentence. With a positive numeric argument @var{n}, it kills the next @var{n} sentences; with a negative argument @minus{}@var{n}, it kills back to the beginning of the @var{n}th preceding sentence. -@kindex C-x DEL +@kindex C-x @key{DEL} @findex backward-kill-sentence The @kbd{C-x @key{DEL}} (@code{backward-kill-sentence}) kills back to the beginning of a sentence. @@ -878,7 +878,7 @@ paragraphs. As a result, paragraphs can be indented, and adaptive filling determines what indentation to use when filling a paragraph. @xref{Adaptive Fill}. -@kindex TAB @r{(Text mode)} +@kindex @key{TAB} @r{(Text mode)} In Text mode, the @key{TAB} (@code{indent-for-tab-command}) command usually inserts whitespace up to the next tab stop, instead of indenting the current line. @xref{Indentation}, for details. @@ -905,7 +905,7 @@ paragraph-indent-minor-mode} to enable an equivalent minor mode for situations where you shouldn't change the major mode---in mail composition, for instance. -@kindex M-TAB @r{(Text mode)} +@kindex M-@key{TAB} @r{(Text mode)} Text mode binds @kbd{M-@key{TAB}} to @code{ispell-complete-word}. This command performs completion of the partial word in the buffer before point, using the spelling dictionary as the space of possible @@ -1352,7 +1352,7 @@ starts with one or more @samp{*} characters. @xref{Outline Format}. In addition, any line that begins with the @samp{#} character is treated as a comment. -@kindex TAB @r{(Org Mode)} +@kindex @key{TAB} @r{(Org Mode)} @findex org-cycle Org mode provides commands for easily viewing and manipulating the outline structure. The simplest of these commands is @key{TAB} @@ -1363,26 +1363,26 @@ of its direct children, if any, and (iii) showing the entire subtree. If invoked in a body line, the global binding for @key{TAB} is executed. -@kindex S-TAB @r{(Org Mode)} +@kindex S-@key{TAB} @r{(Org Mode)} @findex org-shifttab Typing @kbd{S-@key{TAB}} (@code{org-shifttab}) anywhere in an Org mode buffer cycles the visibility of the entire outline structure, between (i) showing only top-level heading lines, (ii) showing all heading lines but no body lines, and (iii) showing everything. -@kindex M- @r{(Org Mode)} -@kindex M- @r{(Org Mode)} -@kindex M- @r{(Org Mode)} -@kindex M- @r{(Org Mode)} +@kindex M-@key{UP} @r{(Org Mode)} +@kindex M-@key{DOWN} @r{(Org Mode)} +@kindex M-@key{LEFT} @r{(Org Mode)} +@kindex M-@key{RIGHT} @r{(Org Mode)} @findex org-metaup @findex org-metadown @findex org-metaleft @findex org-metaright You can move an entire entry up or down in the buffer, including its -body lines and subtree (if any), by typing @kbd{M-} -(@code{org-metaup}) or @kbd{M-} (@code{org-metadown}) on the +body lines and subtree (if any), by typing @kbd{M-@key{UP}} +(@code{org-metaup}) or @kbd{M-@key{DOWN}} (@code{org-metadown}) on the heading line. Similarly, you can promote or demote a heading line -with @kbd{M-} (@code{org-metaleft}) and @kbd{M-} +with @kbd{M-@key{LEFT}} (@code{org-metaleft}) and @kbd{M-@key{RIGHT}} (@code{org-metaright}). These commands execute their global bindings if invoked on a body line. @@ -1852,7 +1852,7 @@ in a local variable list in each of the subfiles. @xref{File Variables}. @findex tex-bibtex-file -@kindex C-c TAB @r{(@TeX{} mode)} +@kindex C-c @key{TAB} @r{(@TeX{} mode)} @vindex tex-bibtex-command For @LaTeX{} files, you can use Bib@TeX{} to process the auxiliary file for the current buffer's file. Bib@TeX{} looks up bibliographic @@ -1995,7 +1995,7 @@ Run a shell command (which you must specify) to validate the current buffer as SGML (@code{sgml-validate}). @item C-c @key{TAB} -@kindex C-c TAB @r{(SGML mode)} +@kindex C-c @key{TAB} @r{(SGML mode)} @findex sgml-tags-invisible Toggle the visibility of existing tags in the buffer. This can be used as a cheap preview (@code{sgml-tags-invisible}). @@ -2308,7 +2308,7 @@ These margins also affect fill commands such as @kbd{M-q} for specifying indentation: @table @code -@kindex C-x TAB @r{(Enriched mode)} +@kindex C-x @key{TAB} @r{(Enriched mode)} @findex increase-left-margin @item Indent More Indent the region by 4 columns (@code{increase-left-margin}). In @@ -2848,7 +2848,7 @@ buffer. There are three ways to enter two-column mode: @table @asis @item @kbd{@key{F2} 2} or @kbd{C-x 6 2} -@kindex F2 2 +@kindex @key{F2} 2 @kindex C-x 6 2 @findex 2C-two-columns Enter two-column mode with the current buffer on the left, and on the @@ -2861,7 +2861,7 @@ This command is appropriate when the current buffer is empty or contains just one column and you want to add another column. @item @kbd{@key{F2} s} or @kbd{C-x 6 s} -@kindex F2 s +@kindex @key{F2} s @kindex C-x 6 s @findex 2C-split Split the current buffer, which contains two-column text, into two @@ -2876,7 +2876,7 @@ two-column text, and you wish to separate the columns temporarily. @item @kbd{@key{F2} b @var{buffer} @key{RET}} @itemx @kbd{C-x 6 b @var{buffer} @key{RET}} -@kindex F2 b +@kindex @key{F2} b @kindex C-x 6 b @findex 2C-associate-buffer Enter two-column mode using the current buffer as the left-hand buffer, @@ -2900,15 +2900,15 @@ way to write a line that spans both columns while in two-column mode: write it in the left-hand buffer, and put an empty line in the right-hand buffer.) -@kindex F2 RET -@kindex C-x 6 RET +@kindex @key{F2} @key{RET} +@kindex C-x 6 @key{RET} @findex 2C-newline The command @kbd{C-x 6 @key{RET}} or @kbd{@key{F2} @key{RET}} (@code{2C-newline}) inserts a newline in each of the two buffers at corresponding positions. This is the easiest way to add a new line to the two-column text while editing it in split buffers. -@kindex F2 1 +@kindex @key{F2} 1 @kindex C-x 6 1 @findex 2C-merge When you have edited both buffers as you wish, merge them with @@ -2916,7 +2916,7 @@ the two-column text while editing it in split buffers. text from the right-hand buffer as a second column in the other buffer. To go back to two-column editing, use @kbd{@key{F2} s}. -@kindex F2 d +@kindex @key{F2} d @kindex C-x 6 d @findex 2C-dissociate Use @kbd{@key{F2} d} or @kbd{C-x 6 d} to dissociate the two buffers, diff --git a/doc/emacs/trouble.texi b/doc/emacs/trouble.texi index c0dc3d472e..1b81797f0d 100644 --- a/doc/emacs/trouble.texi +++ b/doc/emacs/trouble.texi @@ -104,7 +104,7 @@ argument, you can cancel that argument with @kbd{C-g} and remain in the recursive edit. @findex keyboard-escape-quit -@kindex ESC ESC ESC +@kindex @key{ESC} @key{ESC} @key{ESC} The sequence @kbd{@key{ESC} @key{ESC} @key{ESC}} (@code{keyboard-escape-quit}) can either quit or abort. (We defined it this way because @key{ESC} means ``get out'' in many PC programs.) diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi index 5a8eeddcf6..e2eaa03f68 100644 --- a/doc/lispref/files.texi +++ b/doc/lispref/files.texi @@ -3267,7 +3267,7 @@ shown above; the details are crucial for proper behavior in the case of multiple handlers, and for operations that have two file names that may each have handlers. -@kindex safe-magic (@r{property}) +@kindex safe-magic @r{(property)} Handlers that don't really do anything special for actual access to the file---such as the ones that implement completion of host names for remote file names---should have a non-@code{nil} @code{safe-magic} @@ -3277,7 +3277,7 @@ file names, by prefixing them with @samp{/:}. But if the handler that would be used for them has a non-@code{nil} @code{safe-magic} property, the @samp{/:} is not added. -@kindex operations (@r{property}) +@kindex operations @r{(property)} A file name handler can have an @code{operations} property to declare which operations it handles in a nontrivial way. If this property has a non-@code{nil} value, it should be a list of diff --git a/doc/misc/calc.texi b/doc/misc/calc.texi index a4a091f243..a29097cfda 100644 --- a/doc/misc/calc.texi +++ b/doc/misc/calc.texi @@ -10906,27 +10906,27 @@ degrees, minutes, and seconds. @ignore @mindex @null @end ignore -@kindex ' (HMS forms) +@kindex ' @r{(HMS forms)} @ignore @mindex @null @end ignore -@kindex " (HMS forms) +@kindex " @r{(HMS forms)} @ignore @mindex @null @end ignore -@kindex h (HMS forms) +@kindex h @r{(HMS forms)} @ignore @mindex @null @end ignore -@kindex o (HMS forms) +@kindex o @r{(HMS forms)} @ignore @mindex @null @end ignore -@kindex m (HMS forms) +@kindex m @r{(HMS forms)} @ignore @mindex @null @end ignore -@kindex s (HMS forms) +@kindex s @r{(HMS forms)} The default format for HMS values is @samp{@var{hours}@@ @var{mins}' @var{secs}"}. During entry, the letters @samp{h} (for ``hours'') or @@ -11125,7 +11125,7 @@ integers but this is not required. @ignore @mindex M @end ignore -@kindex M (modulo forms) +@kindex M @r{(modulo forms)} @ignore @mindex mod @end ignore @@ -11280,7 +11280,7 @@ would indeed have been negligible. @ignore @mindex p @end ignore -@kindex p (error forms) +@kindex p @r{(error forms)} @tindex +/- To enter an error form during regular numeric entry, use the @kbd{p} (``plus-or-minus'') key to type the @samp{+/-} symbol. (If you try actually @@ -16682,8 +16682,8 @@ or matrix argument, these functions operate element-wise. @ignore @mindex v p @end ignore -@kindex v p (complex) -@kindex V p (complex) +@kindex v p @r{(complex)} +@kindex V p @r{(complex)} @pindex calc-pack The @kbd{v p} (@code{calc-pack}) command can pack the top two numbers on the stack into a composite object such as a complex number. With @@ -16694,8 +16694,8 @@ with an argument of @mathit{-2}, it produces a polar complex number. @ignore @mindex v u @end ignore -@kindex v u (complex) -@kindex V u (complex) +@kindex v u @r{(complex)} +@kindex V u @r{(complex)} @pindex calc-unpack The @kbd{v u} (@code{calc-unpack}) command takes the complex number (or other composite object) on the top of the stack and unpacks it @@ -20234,7 +20234,7 @@ the conjugate transpose of its argument, i.e., @samp{conj(trn(x))}. @ignore @mindex A @end ignore -@kindex A (vectors) +@kindex A @r{(vectors)} @pindex calc-abs (vectors) @ignore @mindex abs @@ -20280,7 +20280,7 @@ exactly three elements. @ignore @mindex & @end ignore -@kindex & (matrices) +@kindex & @r{(matrices)} @pindex calc-inv (matrices) @ignore @mindex inv diff --git a/doc/misc/cc-mode.texi b/doc/misc/cc-mode.texi index e10808954d..438919b2d8 100644 --- a/doc/misc/cc-mode.texi +++ b/doc/misc/cc-mode.texi @@ -671,7 +671,7 @@ These commands indent code: @table @asis @item @kbd{@key{TAB}} (@code{c-indent-command}) -@kindex TAB +@kindex @key{TAB} @findex c-indent-command @findex indent-command @r{(c-)} This command indents the current line. That is all you need to know @@ -920,8 +920,8 @@ must be in column zero. See @ref{Defuns,,,@emacsman{}, @item @kbd{C-M-a} (AWK Mode) (@code{c-awk-beginning-of-defun}) @itemx @kbd{C-M-e} (AWK Mode) (@code{c-awk-end-of-defun}) -@kindex C-M-a (AWK Mode) -@kindex C-M-e (AWK Mode) +@kindex C-M-a @r{(AWK Mode)} +@kindex C-M-e @r{(AWK Mode)} @findex c-awk-beginning-of-defun @findex awk-beginning-of-defun @r{(c-)} @findex c-awk-end-of-defun @@ -1518,10 +1518,10 @@ deletion. @table @asis @item @kbd{@key{DEL}} (@code{c-electric-backspace}) -@kindex DEL +@kindex @key{DEL} @findex c-electric-backspace @findex electric-backspace @r{(c-)} -This command is run by default when you hit the @kbd{DEL} key. When +This command is run by default when you hit the @kbd{@key{DEL}} key. When hungry delete mode is enabled, it deletes any amount of whitespace in the backwards direction. Otherwise, or when used with a prefix argument or in a literal (@pxref{Auto-newlines}), the command just @@ -1567,10 +1567,10 @@ rather than using the minor mode toggling. @table @asis @item @kbd{C-c C-@key{DEL}}, or @kbd{C-c @key{DEL}} (@code{c-hungry-delete-backwards})@footnote{This command was formerly known as @code{c-hungry-backspace}.} -@kindex C-c C- -@kindex C-c -@kindex C-c C-DEL -@kindex C-c DEL +@kindex C-c C-@key{Backspace} +@kindex C-c @key{Backspace} +@kindex C-c C-@key{DEL} +@kindex C-c @key{DEL} @findex c-hungry-delete-backwards @findex hungry-delete-backwards @r{(c-)} Delete any amount of whitespace in the backwards direction (regardless @@ -1581,21 +1581,21 @@ a character terminal. @item @kbd{C-c C-d}, @kbd{C-c C-@key{DELETE}}, or @kbd{C-c @key{DELETE}} (@code{c-hungry-delete-forward}) @kindex C-c C-d -@kindex C-c C- -@kindex C-c +@kindex C-c C-@key{Delete} +@kindex C-c @key{Delete} @findex c-hungry-delete-forward @findex hungry-delete-forward @r{(c-)} Delete any amount of whitespace in the forward direction (regardless whether hungry-delete mode is enabled or not). This command is bound -to both @kbd{C-c C-@key{DELETE}} and @kbd{C-c @key{DELETE}} for the +to both @kbd{C-c C-@key{Delete}} and @kbd{C-c @key{Delete}} for the same reason as for @key{DEL} above. @end table @end table -@kindex -@kindex +@kindex @key{Delete} +@kindex @key{Backspace} -When we talk about @kbd{@key{DEL}}, and @kbd{@key{DELETE}} above, we +When we talk about @kbd{@key{DEL}}, and @kbd{@key{Delete}} above, we actually do so without connecting them to the physical keys commonly known as @key{Backspace} and @key{Delete}. The default bindings to those two keys depends on the flavor of (X)Emacs you are using. @@ -7248,15 +7248,15 @@ early on: Set the variable @code{c-basic-offset}. @xref{Getting Started}. @item -@kindex RET +@kindex @key{RET} @kindex C-j -@emph{Why does/doesn't the @kbd{RET} key indent the new line?} +@emph{Why does/doesn't the @kbd{@key{RET}} key indent the new line?} Emacs's convention used to be that @kbd{RET} just adds a newline, and that @kbd{C-j} adds a newline and indents it. In Emacs-24.4, this convention was reversed. -If you use an older Emacs and you want @kbd{RET} do this +If you use an older Emacs and you want @kbd{@key{RET}} do this too, add this to your @code{c-initialization-hook}: @example diff --git a/doc/misc/ediff.texi b/doc/misc/ediff.texi index e488fc07f8..86b93056d1 100644 --- a/doc/misc/ediff.texi +++ b/doc/misc/ediff.texi @@ -541,14 +541,14 @@ Copies the difference region from buffer C to buffer B@. The command @kbd{rb} undoes this. @item p -@itemx DEL +@itemx @key{DEL} @kindex p -@kindex DEL +@kindex @key{DEL} Makes the previous difference region current. @item n -@itemx SPC +@itemx @key{SPC} @kindex n -@kindex SPC +@kindex @key{SPC} Makes the next difference region current. @item j diff --git a/doc/misc/epa.texi b/doc/misc/epa.texi index 237617a524..d5dfe70760 100644 --- a/doc/misc/epa.texi +++ b/doc/misc/epa.texi @@ -281,22 +281,22 @@ The following keys are assigned. @table @kbd @item : d -@kindex @kbd{: d} +@kindex : d @findex epa-dired-do-decrypt Decrypt marked files. @item : v -@kindex @kbd{: v} +@kindex : v @findex epa-dired-do-verify Verify marked files. @item : s -@kindex @kbd{: s} +@kindex : s @findex epa-dired-do-sign Sign marked files. @item : e -@kindex @kbd{: e} +@kindex : e @findex epa-dired-do-encrypt Encrypt marked files. @@ -322,26 +322,26 @@ interface. Try @kbd{M-x customize-variable epa-global-mail-mode}. @table @kbd @item C-c C-e C-d and C-c C-e d -@kindex @kbd{C-c C-e C-d} -@kindex @kbd{C-c C-e d} +@kindex C-c C-e C-d +@kindex C-c C-e d @findex epa-mail-decrypt Decrypt OpenPGP armors in the current buffer. @item C-c C-e C-v and C-c C-e v -@kindex @kbd{C-c C-e C-v} -@kindex @kbd{C-c C-e v} +@kindex C-c C-e C-v +@kindex C-c C-e v @findex epa-mail-verify Verify OpenPGP cleartext signed messages in the current buffer. @item C-c C-e C-s and C-c C-e s -@kindex @kbd{C-c C-e C-s} -@kindex @kbd{C-c C-e s} +@kindex C-c C-e C-s +@kindex C-c C-e s @findex epa-mail-sign Compose a signed message from the current buffer. @item C-c C-e C-e and C-c C-e e -@kindex @kbd{C-c C-e C-e} -@kindex @kbd{C-c C-e e} +@kindex C-c C-e C-e +@kindex C-c C-e e @findex epa-mail-encrypt @vindex epa-mail-aliases Compose an encrypted message from the current buffer. diff --git a/doc/misc/ert.texi b/doc/misc/ert.texi index 9efca79e95..f80b23f374 100644 --- a/doc/misc/ert.texi +++ b/doc/misc/ert.texi @@ -203,7 +203,7 @@ different Emacs versions. @findex ert You can run the tests that are currently defined in your Emacs with -the command @kbd{@kbd{M-x} ert @kbd{RET} t @kbd{RET}}. (For an +the command @kbd{M-x ert @key{RET} t @key{RET}}. (For an explanation of the @code{t} argument, @pxref{Test Selectors}.) ERT will pop up a new buffer, the ERT results buffer, showing the results of the tests run. It looks like this: @@ -260,11 +260,11 @@ unexpected result. In the example above, there are two failures, both due to failed @code{should} forms. @xref{Understanding Explanations}, for more details. -@kindex TAB@r{, in ert results buffer} -@kindex S-TAB@r{, in ert results buffer} -In the ERT results buffer, @kbd{TAB} and @kbd{S-TAB} cycle between +@kindex @key{TAB}@r{, in ert results buffer} +@kindex S-@key{TAB}@r{, in ert results buffer} +In the ERT results buffer, @kbd{@key{TAB}} and @kbd{S-@key{TAB}} cycle between buttons. Each name of a function or macro in this buffer is a button; -moving point to it and typing @kbd{RET} jumps to its definition. +moving point to it and typing @kbd{@key{RET}} jumps to its definition. @kindex r@r{, in ert results buffer} @kindex d@r{, in ert results buffer} @@ -273,7 +273,7 @@ moving point to it and typing @kbd{RET} jumps to its definition. @cindex backtrace of a failed test Pressing @kbd{r} re-runs the test near point on its own. Pressing @kbd{d} re-runs it with the debugger enabled. @kbd{.} jumps to the -definition of the test near point (@kbd{RET} has the same effect if +definition of the test near point (@kbd{@key{RET}} has the same effect if point is on the name of the test). On a failed test, @kbd{b} shows the backtrace of the failure. @@ -803,7 +803,7 @@ failed. This can be useful to figure out how far it got. @item You can instrument tests for debugging the same way you instrument @code{defun}s for debugging: go to the source code of the test and -type @kbd{@kbd{C-u} @kbd{C-M-x}}. Then, go back to the ERT buffer and +type @kbd{C-u C-M-x}. Then, go back to the ERT buffer and re-run the test with @kbd{r} or @kbd{d}. @cindex discard obsolete test results diff --git a/doc/misc/eww.texi b/doc/misc/eww.texi index 258a2f2bff..0b1fb6598b 100644 --- a/doc/misc/eww.texi +++ b/doc/misc/eww.texi @@ -98,8 +98,8 @@ web page hit @kbd{g} (@code{eww-reload}). Pressing @kbd{w} (@code{eww-copy-page-url}) will copy the current URL to the kill ring. @findex eww-open-in-new-buffer -@kindex M-RET - The @kbd{M-RET} command (@code{eww-open-in-new-buffer}) opens the +@kindex M-@key{RET} + The @kbd{M-@key{RET}} command (@code{eww-open-in-new-buffer}) opens the URL at point in a new EWW buffer, akin to opening a link in a new ``tab'' in other browsers. diff --git a/doc/misc/forms.texi b/doc/misc/forms.texi index 9857a67745..41847dfcff 100644 --- a/doc/misc/forms.texi +++ b/doc/misc/forms.texi @@ -226,9 +226,9 @@ Jump to the last record (@code{forms-last-record}). This command also recalculates the number of records in the data file. @findex forms-next-field -@kindex TAB +@kindex @key{TAB} @item @key{TAB} -@kindex C-c TAB +@kindex C-c @key{TAB} @itemx C-c @key{TAB} Jump to the next field in the current record (@code{forms-next-field}). With a numeric argument @var{n}, jump forward @var{n} fields. If this command @@ -334,25 +334,25 @@ The following function key definitions are set up in Forms mode (whether read-only or not): @table @kbd -@kindex next -@item next +@kindex @key{NEXT} +@item @key{NEXT} forms-next-record -@kindex prior -@item prior +@kindex @key{PRIOR} +@item @key{PRIOR} forms-prev-record -@kindex begin -@item begin +@kindex @key{BEGIN} +@item @key{BEGIN} forms-first-record -@kindex end -@item end +@kindex @key{END} +@item @key{END} forms-last-record -@kindex S-Tab +@kindex S-@key{TAB} @findex forms-prev-field -@item S-Tab +@item S-@key{TAB} forms-prev-field @end table diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi index be00ddabdf..43d6820c31 100644 --- a/doc/misc/gnus.texi +++ b/doc/misc/gnus.texi @@ -959,7 +959,6 @@ Emacs for Heathens If you haven't used Emacs much before using Gnus, read @ref{Emacs for Heathens} first. -@kindex M-x gnus @findex gnus If your system administrator has set things up properly, starting Gnus and reading news is extremely easy---you just type @kbd{M-x gnus} in @@ -969,7 +968,6 @@ minimal setup for posting should also customize the variables @code{user-full-name} and @code{user-mail-address}. @findex gnus-other-frame -@kindex M-x gnus-other-frame If you want to start Gnus in a different frame, you can use the command @kbd{M-x gnus-other-frame} instead. @@ -1000,7 +998,7 @@ terminology section (@pxref{Terminology}). First of all, you should know that there is a special buffer called @file{*Server*} that lists all the servers Gnus knows about. You can press @kbd{^} from the Group buffer to see it. In the Server buffer, -you can press @kbd{RET} on a defined server to see all the groups it +you can press @kbd{@key{RET}} on a defined server to see all the groups it serves (subscribed or not!). You can also add or delete servers, edit a foreign server's definition, agentize or de-agentize a server, and do many other neat things. @xref{Server Buffer}. @@ -1043,7 +1041,7 @@ If that fails as well, Gnus will try to use the machine running Emacs as an @acronym{NNTP} server. That's a long shot, though. @findex gnus-group-browse-foreign-server -@kindex B (Group) +@kindex B @r{(Group)} However, if you use one @acronym{NNTP} server regularly and are just interested in a couple of groups from a different server, you would be better served by using the @kbd{B} command in the group buffer. It will @@ -1087,7 +1085,6 @@ groups, you'll find it difficult to actually do anything in the group buffer. But, hey, that's your problem. Blllrph! @findex gnus-no-server -@kindex M-x gnus-no-server @c @head If you know that the server is definitely down, or you just want to read your mail without bothering with the server at all, you can use the @@ -1354,13 +1351,11 @@ you have read is by keeping track of article numbers. So when you change @code{gnus-select-method}, your @file{.newsrc} file becomes worthless. -@kindex M-x gnus-group-clear-data-on-native-groups @findex gnus-group-clear-data-on-native-groups You can use the @kbd{M-x gnus-group-clear-data-on-native-groups} command to clear out all data that you have on your native groups. Use with caution. -@kindex M-x gnus-group-clear-data @findex gnus-group-clear-data Clear the data from the current group only---nix out marks and the list of read articles (@code{gnus-group-clear-data}). @@ -1704,7 +1699,7 @@ long as Gnus is active. @end menu You can customize the Group Mode tool bar, see @kbd{M-x -customize-apropos RET gnus-group-tool-bar}. This feature is only +customize-apropos @key{RET} gnus-group-tool-bar}. This feature is only available in Emacs. The tool bar icons are now (de)activated correctly depending on the @@ -1989,37 +1984,37 @@ expected, hopefully. @table @kbd @item n -@kindex n (Group) +@kindex n @r{(Group)} @findex gnus-group-next-unread-group Go to the next group that has unread articles (@code{gnus-group-next-unread-group}). @item p -@itemx DEL -@kindex DEL (Group) -@kindex p (Group) +@itemx @key{DEL} +@kindex @key{DEL} @r{(Group)} +@kindex p @r{(Group)} @findex gnus-group-prev-unread-group Go to the previous group that has unread articles (@code{gnus-group-prev-unread-group}). @item N -@kindex N (Group) +@kindex N @r{(Group)} @findex gnus-group-next-group Go to the next group (@code{gnus-group-next-group}). @item P -@kindex P (Group) +@kindex P @r{(Group)} @findex gnus-group-prev-group Go to the previous group (@code{gnus-group-prev-group}). @item M-n -@kindex M-n (Group) +@kindex M-n @r{(Group)} @findex gnus-group-next-unread-group-same-level Go to the next unread group on the same (or lower) level (@code{gnus-group-next-unread-group-same-level}). @item M-p -@kindex M-p (Group) +@kindex M-p @r{(Group)} @findex gnus-group-prev-unread-group-same-level Go to the previous unread group on the same (or lower) level (@code{gnus-group-prev-unread-group-same-level}). @@ -2030,20 +2025,20 @@ Three commands for jumping to groups: @table @kbd @item j -@kindex j (Group) +@kindex j @r{(Group)} @findex gnus-group-jump-to-group Jump to a group (and make it visible if it isn't already) (@code{gnus-group-jump-to-group}). Killed groups can be jumped to, just like living groups. @item , -@kindex , (Group) +@kindex , @r{(Group)} @findex gnus-group-best-unread-group Jump to the unread group with the lowest level (@code{gnus-group-best-unread-group}). @item . -@kindex . (Group) +@kindex . @r{(Group)} @findex gnus-group-first-unread-group Jump to the first group with unread articles (@code{gnus-group-first-unread-group}). @@ -2067,8 +2062,8 @@ Otherwise, the point is set to the group just exited. The default is @table @kbd -@item SPACE -@kindex SPACE (Group) +@item @key{SPC} +@kindex @key{SPC} @r{(Group)} @findex gnus-group-read-group Select the current group, switch to the summary buffer and display the first unread article (@code{gnus-group-read-group}). If there are no @@ -2079,16 +2074,16 @@ determines the number of articles Gnus will fetch. If @var{n} is positive, Gnus fetches the @var{n} newest articles, if @var{n} is negative, Gnus fetches the @code{abs(@var{n})} oldest articles. -Thus, @kbd{SPC} enters the group normally, @kbd{C-u SPC} offers old -articles, @kbd{C-u 4 2 SPC} fetches the 42 newest articles, and @kbd{C-u -- 4 2 SPC} fetches the 42 oldest ones. +Thus, @kbd{@key{SPC}} enters the group normally, @kbd{C-u @key{SPC}} +offers old articles, @kbd{C-u 4 2 @key{SPC}} fetches the 42 newest +articles, and @kbd{C-u - 4 2 @key{SPC}} fetches the 42 oldest ones. When you are in the group (in the Summary buffer), you can type @kbd{M-g} to fetch new articles, or @kbd{C-u M-g} to also show the old ones. -@item RET -@kindex RET (Group) +@item @key{RET} +@kindex @key{RET} @r{(Group)} @findex gnus-group-select-group Select the current group and switch to the summary buffer (@code{gnus-group-select-group}). Takes the same arguments as @@ -2096,27 +2091,27 @@ Select the current group and switch to the summary buffer does not display the first unread article automatically upon group entry. -@item M-RET -@kindex M-RET (Group) +@item M-@key{RET} +@kindex M-@key{RET} @r{(Group)} @findex gnus-group-quick-select-group This does the same as the command above, but tries to do it with the minimum amount of fuzz (@code{gnus-group-quick-select-group}). No scoring/killing will be performed, there will be no highlights and no expunging. This might be useful if you're in a real hurry and have to enter some humongous group. If you give a 0 prefix to this command -(i.e., @kbd{0 M-RET}), Gnus won't even generate the summary buffer, +(i.e., @kbd{0 M-@key{RET}}), Gnus won't even generate the summary buffer, which is useful if you want to toggle threading before generating the summary buffer (@pxref{Summary Generation Commands}). -@item M-SPACE -@kindex M-SPACE (Group) +@item M-@key{SPC} +@kindex M-@key{SPC} @r{(Group)} @findex gnus-group-visible-select-group -This is yet one more command that does the same as the @kbd{RET} +This is yet one more command that does the same as the @kbd{@key{RET}} command, but this one does it without expunging and hiding dormants (@code{gnus-group-visible-select-group}). -@item C-M-RET -@kindex C-M-RET (Group) +@item C-M-@key{RET} +@kindex C-M-@key{RET} @r{(Group)} @findex gnus-group-select-group-ephemerally Finally, this command selects the current group ephemerally without doing any processing of its contents @@ -2164,7 +2159,7 @@ means Gnus never ignores old articles. @vindex gnus-auto-select-first @vindex gnus-auto-select-subject If @code{gnus-auto-select-first} is non-@code{nil}, select an article -automatically when entering a group with the @kbd{SPACE} command. +automatically when entering a group with the @kbd{@key{SPC}} command. Which article this is controlled by the @code{gnus-auto-select-subject} variable. Valid values for this variable are: @@ -2207,15 +2202,15 @@ selected. The following commands allow for managing your subscriptions in the Group buffer. If you want to subscribe to many groups, it's probably more convenient to go to the @ref{Server Buffer}, and choose the -server there using @kbd{RET} or @kbd{SPC}. Then you'll have the +server there using @kbd{@key{RET}} or @kbd{@key{SPC}}. Then you'll have the commands listed in @ref{Browse Foreign Server} at hand. @table @kbd @item S t @itemx u -@kindex S t (Group) -@kindex u (Group) +@kindex S t @r{(Group)} +@kindex u @r{(Group)} @findex gnus-group-unsubscribe-current-group @c @icon{gnus-group-unsubscribe} Toggle subscription to the current group @@ -2223,8 +2218,8 @@ Toggle subscription to the current group @item S s @itemx U -@kindex S s (Group) -@kindex U (Group) +@kindex S s @r{(Group)} +@kindex U @r{(Group)} @findex gnus-group-unsubscribe-group Prompt for a group to subscribe, and then subscribe it. If it was subscribed already, unsubscribe it instead @@ -2232,21 +2227,21 @@ subscribed already, unsubscribe it instead @item S k @itemx C-k -@kindex S k (Group) -@kindex C-k (Group) +@kindex S k @r{(Group)} +@kindex C-k @r{(Group)} @findex gnus-group-kill-group @c @icon{gnus-group-kill-group} Kill the current group (@code{gnus-group-kill-group}). @item S y @itemx C-y -@kindex S y (Group) -@kindex C-y (Group) +@kindex S y @r{(Group)} +@kindex C-y @r{(Group)} @findex gnus-group-yank-group Yank the last killed group (@code{gnus-group-yank-group}). @item C-x C-t -@kindex C-x C-t (Group) +@kindex C-x C-t @r{(Group)} @findex gnus-group-transpose-groups Transpose two groups (@code{gnus-group-transpose-groups}). This isn't really a subscription command, but you can use it instead of a @@ -2254,18 +2249,18 @@ kill-and-yank sequence sometimes. @item S w @itemx C-w -@kindex S w (Group) -@kindex C-w (Group) +@kindex S w @r{(Group)} +@kindex C-w @r{(Group)} @findex gnus-group-kill-region Kill all groups in the region (@code{gnus-group-kill-region}). @item S z -@kindex S z (Group) +@kindex S z @r{(Group)} @findex gnus-group-kill-all-zombies Kill all zombie groups (@code{gnus-group-kill-all-zombies}). @item S C-k -@kindex S C-k (Group) +@kindex S C-k @r{(Group)} @findex gnus-group-kill-level Kill all groups on a certain level (@code{gnus-group-kill-level}). These groups can't be yanked back after killing, so this command should @@ -2286,7 +2281,7 @@ Also @pxref{Group Levels}. @table @kbd @item c -@kindex c (Group) +@kindex c @r{(Group)} @findex gnus-group-catchup-current @vindex gnus-group-catchup-group-hook @c @icon{gnus-group-catchup-current} @@ -2296,19 +2291,18 @@ Mark all unticked articles in this group as read the group buffer. @item C -@kindex C (Group) +@kindex C @r{(Group)} @findex gnus-group-catchup-current-all Mark all articles in this group, even the ticked ones, as read (@code{gnus-group-catchup-current-all}). @item M-c -@kindex M-c (Group) +@kindex M-c @r{(Group)} @findex gnus-group-clear-data Clear the data from the current group---nix out marks and the list of read articles (@code{gnus-group-clear-data}). @item M-x gnus-group-clear-data-on-native-groups -@kindex M-x gnus-group-clear-data-on-native-groups @findex gnus-group-clear-data-on-native-groups If you have switched from one @acronym{NNTP} server to another, all your marks and read ranges have become worthless. You can use this command to @@ -2334,7 +2328,7 @@ Remember: The higher the level of the group, the less important it is. @table @kbd @item S l -@kindex S l (Group) +@kindex S l @r{(Group)} @findex gnus-group-set-current-level Set the level of the current group. If a numeric prefix is given, the next @var{n} groups will have their levels set. The user will be @@ -2478,37 +2472,37 @@ with the process mark and then execute the command. @table @kbd @item # -@kindex # (Group) +@kindex # @r{(Group)} @itemx M m -@kindex M m (Group) +@kindex M m @r{(Group)} @findex gnus-group-mark-group Set the mark on the current group (@code{gnus-group-mark-group}). @item M-# -@kindex M-# (Group) +@kindex M-# @r{(Group)} @itemx M u -@kindex M u (Group) +@kindex M u @r{(Group)} @findex gnus-group-unmark-group Remove the mark from the current group (@code{gnus-group-unmark-group}). @item M U -@kindex M U (Group) +@kindex M U @r{(Group)} @findex gnus-group-unmark-all-groups Remove the mark from all groups (@code{gnus-group-unmark-all-groups}). @item M w -@kindex M w (Group) +@kindex M w @r{(Group)} @findex gnus-group-mark-region Mark all groups between point and mark (@code{gnus-group-mark-region}). @item M b -@kindex M b (Group) +@kindex M b @r{(Group)} @findex gnus-group-mark-buffer Mark all groups in the buffer (@code{gnus-group-mark-buffer}). @item M r -@kindex M r (Group) +@kindex M r @r{(Group)} @findex gnus-group-mark-regexp Mark all groups that match some regular expression (@code{gnus-group-mark-regexp}). @@ -2549,7 +2543,7 @@ variable @code{gnus-parameters}, @xref{Group Parameters}. @table @kbd @item G m -@kindex G m (Group) +@kindex G m @r{(Group)} @findex gnus-group-make-group @cindex making groups Make a new group (@code{gnus-group-make-group}). Gnus will prompt you @@ -2557,13 +2551,13 @@ for a name, a method and possibly an @dfn{address}. For an easier way to subscribe to @acronym{NNTP} groups (@pxref{Browse Foreign Server}). @item G M -@kindex G M (Group) +@kindex G M @r{(Group)} @findex gnus-group-read-ephemeral-group Make an ephemeral group (@code{gnus-group-read-ephemeral-group}). Gnus will prompt you for a name, a method and an @dfn{address}. @item G r -@kindex G r (Group) +@kindex G r @r{(Group)} @findex gnus-group-rename-group @cindex renaming groups Rename the current group to something else @@ -2572,45 +2566,45 @@ groups---mail groups mostly. This command might very well be quite slow on some back ends. @item G c -@kindex G c (Group) +@kindex G c @r{(Group)} @cindex customizing @findex gnus-group-customize Customize the group parameters (@code{gnus-group-customize}). @item G e -@kindex G e (Group) +@kindex G e @r{(Group)} @findex gnus-group-edit-group-method @cindex renaming groups Enter a buffer where you can edit the select method of the current group (@code{gnus-group-edit-group-method}). @item G p -@kindex G p (Group) +@kindex G p @r{(Group)} @findex gnus-group-edit-group-parameters Enter a buffer where you can edit the group parameters (@code{gnus-group-edit-group-parameters}). @item G E -@kindex G E (Group) +@kindex G E @r{(Group)} @findex gnus-group-edit-group Enter a buffer where you can edit the group info (@code{gnus-group-edit-group}). @item G d -@kindex G d (Group) +@kindex G d @r{(Group)} @findex gnus-group-make-directory-group @cindex nndir Make a directory group (@pxref{Directory Groups}). You will be prompted for the directory's name (@code{gnus-group-make-directory-group}). @item G h -@kindex G h (Group) +@kindex G h @r{(Group)} @cindex help group @findex gnus-group-make-help-group Make the Gnus help group (@code{gnus-group-make-help-group}). @item G D -@kindex G D (Group) +@kindex G D @r{(Group)} @findex gnus-group-enter-directory @cindex nneething Read an arbitrary directory as if it were a newsgroup with the @@ -2618,7 +2612,7 @@ Read an arbitrary directory as if it were a newsgroup with the @xref{Anything Groups}. @item G f -@kindex G f (Group) +@kindex G f @r{(Group)} @findex gnus-group-make-doc-group @cindex ClariNet Briefs @cindex nndoc @@ -2634,14 +2628,14 @@ you run this command without a prefix, Gnus will guess at the file type. @xref{Document Groups}. @item G u -@kindex G u (Group) +@kindex G u @r{(Group)} @vindex gnus-useful-groups @findex gnus-group-make-useful-group Create one of the groups mentioned in @code{gnus-useful-groups} (@code{gnus-group-make-useful-group}). @item G w -@kindex G w (Group) +@kindex G w @r{(Group)} @findex gnus-group-make-web-group @cindex Google @cindex nnweb @@ -2658,14 +2652,14 @@ to a particular group by using a match string like @samp{shaving group:alt.sysadmin.recovery}. @item G R -@kindex G R (Group) +@kindex G R @r{(Group)} @findex gnus-group-make-rss-group Make a group based on an @acronym{RSS} feed (@code{gnus-group-make-rss-group}). You will be prompted for an URL@. @xref{RSS}. -@item G DEL -@kindex G DEL (Group) +@item G @key{DEL} +@kindex G @key{DEL} @r{(Group)} @findex gnus-group-delete-group This function will delete the current group (@code{gnus-group-delete-group}). If given a prefix, this function will @@ -2675,13 +2669,13 @@ absolutely sure of what you are doing. This command can't be used on read-only groups (like @code{nntp} groups), though. @item G V -@kindex G V (Group) +@kindex G V @r{(Group)} @findex gnus-group-make-empty-virtual Make a new, fresh, empty @code{nnvirtual} group (@code{gnus-group-make-empty-virtual}). @xref{Virtual Groups}. @item G v -@kindex G v (Group) +@kindex G v @r{(Group)} @findex gnus-group-add-to-virtual Add the current group to an @code{nnvirtual} group (@code{gnus-group-add-to-virtual}). Uses the process/prefix convention. @@ -3260,8 +3254,8 @@ These commands all list various slices of the groups available. @item l @itemx A s -@kindex A s (Group) -@kindex l (Group) +@kindex A s @r{(Group)} +@kindex l @r{(Group)} @findex gnus-group-list-groups List all groups that have unread articles (@code{gnus-group-list-groups}). If the numeric prefix is used, this @@ -3272,8 +3266,8 @@ groups). @item L @itemx A u -@kindex A u (Group) -@kindex L (Group) +@kindex A u @r{(Group)} +@kindex L @r{(Group)} @findex gnus-group-list-all-groups List all groups, whether they have unread articles or not (@code{gnus-group-list-all-groups}). If the numeric prefix is used, @@ -3282,14 +3276,14 @@ it lists groups of level seven or lower (i.e., just subscribed and unsubscribed groups). @item A l -@kindex A l (Group) +@kindex A l @r{(Group)} @findex gnus-group-list-level List all unread groups on a specific level (@code{gnus-group-list-level}). If given a prefix, also list the groups with no unread articles. @item A k -@kindex A k (Group) +@kindex A k @r{(Group)} @findex gnus-group-list-killed List all killed groups (@code{gnus-group-list-killed}). If given a prefix argument, really list all groups that are available, but aren't @@ -3297,23 +3291,23 @@ currently (un)subscribed. This could entail reading the active file from the server. @item A z -@kindex A z (Group) +@kindex A z @r{(Group)} @findex gnus-group-list-zombies List all zombie groups (@code{gnus-group-list-zombies}). @item A m -@kindex A m (Group) +@kindex A m @r{(Group)} @findex gnus-group-list-matching List all unread, subscribed groups with names that match a regexp (@code{gnus-group-list-matching}). @item A M -@kindex A M (Group) +@kindex A M @r{(Group)} @findex gnus-group-list-all-matching List groups that match a regexp (@code{gnus-group-list-all-matching}). @item A A -@kindex A A (Group) +@kindex A A @r{(Group)} @findex gnus-group-list-active List absolutely all groups in the active file(s) of the server(s) you are connected to (@code{gnus-group-list-active}). This @@ -3324,34 +3318,34 @@ don't exist (yet)---these will be listed as if they were killed groups. Take the output with some grains of salt. @item A a -@kindex A a (Group) +@kindex A a @r{(Group)} @findex gnus-group-apropos List all groups that have names that match a regexp (@code{gnus-group-apropos}). @item A d -@kindex A d (Group) +@kindex A d @r{(Group)} @findex gnus-group-description-apropos List all groups that have names or descriptions that match a regexp (@code{gnus-group-description-apropos}). @item A c -@kindex A c (Group) +@kindex A c @r{(Group)} @findex gnus-group-list-cached List all groups with cached articles (@code{gnus-group-list-cached}). @item A ? -@kindex A ? (Group) +@kindex A ? @r{(Group)} @findex gnus-group-list-dormant List all groups with dormant articles (@code{gnus-group-list-dormant}). @item A ! -@kindex A ! (Group) +@kindex A ! @r{(Group)} @findex gnus-group-list-ticked List all groups with ticked articles (@code{gnus-group-list-ticked}). @item A / -@kindex A / (Group) +@kindex A / @r{(Group)} @findex gnus-group-list-limit Further limit groups within the current selection (@code{gnus-group-list-limit}). If you've first limited to groups @@ -3361,12 +3355,12 @@ giving you the groups that have both dormant articles and cached articles. @item A f -@kindex A f (Group) +@kindex A f @r{(Group)} @findex gnus-group-list-flush Flush groups from the current selection (@code{gnus-group-list-flush}). @item A p -@kindex A p (Group) +@kindex A p @r{(Group)} @findex gnus-group-list-plus List groups plus the current selection (@code{gnus-group-list-plus}). @@ -3390,7 +3384,7 @@ groups. It is @code{t} by default. @section Sorting Groups @cindex sorting groups -@kindex C-c C-s (Group) +@kindex C-c C-s @r{(Group)} @findex gnus-group-sort-groups @vindex gnus-group-sort-function The @kbd{C-c C-s} (@code{gnus-group-sort-groups}) command sorts the @@ -3446,43 +3440,43 @@ some sorting criteria: @table @kbd @item G S a -@kindex G S a (Group) +@kindex G S a @r{(Group)} @findex gnus-group-sort-groups-by-alphabet Sort the group buffer alphabetically by group name (@code{gnus-group-sort-groups-by-alphabet}). @item G S u -@kindex G S u (Group) +@kindex G S u @r{(Group)} @findex gnus-group-sort-groups-by-unread Sort the group buffer by the number of unread articles (@code{gnus-group-sort-groups-by-unread}). @item G S l -@kindex G S l (Group) +@kindex G S l @r{(Group)} @findex gnus-group-sort-groups-by-level Sort the group buffer by group level (@code{gnus-group-sort-groups-by-level}). @item G S v -@kindex G S v (Group) +@kindex G S v @r{(Group)} @findex gnus-group-sort-groups-by-score Sort the group buffer by group score (@code{gnus-group-sort-groups-by-score}). @xref{Group Score}. @item G S r -@kindex G S r (Group) +@kindex G S r @r{(Group)} @findex gnus-group-sort-groups-by-rank Sort the group buffer by group rank (@code{gnus-group-sort-groups-by-rank}). @xref{Group Score}. @item G S m -@kindex G S m (Group) +@kindex G S m @r{(Group)} @findex gnus-group-sort-groups-by-method Sort the group buffer alphabetically by back end name@* (@code{gnus-group-sort-groups-by-method}). @item G S n -@kindex G S n (Group) +@kindex G S n @r{(Group)} @findex gnus-group-sort-groups-by-real-name Sort the group buffer alphabetically by real (unprefixed) group name (@code{gnus-group-sort-groups-by-real-name}). @@ -3499,49 +3493,49 @@ You can also sort a subset of the groups: @table @kbd @item G P a -@kindex G P a (Group) +@kindex G P a @r{(Group)} @findex gnus-group-sort-selected-groups-by-alphabet Sort the groups alphabetically by group name (@code{gnus-group-sort-selected-groups-by-alphabet}). @item G P u -@kindex G P u (Group) +@kindex G P u @r{(Group)} @findex gnus-group-sort-selected-groups-by-unread Sort the groups by the number of unread articles (@code{gnus-group-sort-selected-groups-by-unread}). @item G P l -@kindex G P l (Group) +@kindex G P l @r{(Group)} @findex gnus-group-sort-selected-groups-by-level Sort the groups by group level (@code{gnus-group-sort-selected-groups-by-level}). @item G P v -@kindex G P v (Group) +@kindex G P v @r{(Group)} @findex gnus-group-sort-selected-groups-by-score Sort the groups by group score (@code{gnus-group-sort-selected-groups-by-score}). @xref{Group Score}. @item G P r -@kindex G P r (Group) +@kindex G P r @r{(Group)} @findex gnus-group-sort-selected-groups-by-rank Sort the groups by group rank (@code{gnus-group-sort-selected-groups-by-rank}). @xref{Group Score}. @item G P m -@kindex G P m (Group) +@kindex G P m @r{(Group)} @findex gnus-group-sort-selected-groups-by-method Sort the groups alphabetically by back end name@* (@code{gnus-group-sort-selected-groups-by-method}). @item G P n -@kindex G P n (Group) +@kindex G P n @r{(Group)} @findex gnus-group-sort-selected-groups-by-real-name Sort the groups alphabetically by real (unprefixed) group name (@code{gnus-group-sort-selected-groups-by-real-name}). @item G P s -@kindex G P s (Group) +@kindex G P s @r{(Group)} @findex gnus-group-sort-selected-groups Sort the groups according to @code{gnus-group-sort-function}. @@ -3557,13 +3551,13 @@ move groups around. @table @kbd @item b -@kindex b (Group) +@kindex b @r{(Group)} @findex gnus-group-check-bogus-groups Find bogus groups and delete them (@code{gnus-group-check-bogus-groups}). @item F -@kindex F (Group) +@kindex F @r{(Group)} @findex gnus-group-find-new-groups Find new groups and process them (@code{gnus-group-find-new-groups}). With 1 @kbd{C-u}, use the @code{ask-server} method to query the server @@ -3572,7 +3566,7 @@ to query the server for new groups, and subscribe the new groups as zombies. @item C-c C-x -@kindex C-c C-x (Group) +@kindex C-c C-x @r{(Group)} @findex gnus-group-expire-articles @cindex expiring mail Run all expirable articles in the current group through the expiry @@ -3581,7 +3575,7 @@ all expirable articles in the group that have been around for a while. (@pxref{Expiring Mail}). @item C-c C-M-x -@kindex C-c C-M-x (Group) +@kindex C-c C-M-x @r{(Group)} @findex gnus-group-expire-all-groups @cindex expiring mail Run all expirable articles in all groups through the expiry process @@ -3597,7 +3591,7 @@ Run all expirable articles in all groups through the expiry process @table @kbd @item B -@kindex B (Group) +@kindex B @r{(Group)} @findex gnus-group-browse-foreign-server You will be queried for a select method and a server name. Gnus will then attempt to contact this server and let you browse the groups there @@ -3613,28 +3607,28 @@ Here's a list of keystrokes available in the browse mode: @table @kbd @item n -@kindex n (Browse) +@kindex n @r{(Browse)} @findex gnus-group-next-group Go to the next group (@code{gnus-group-next-group}). @item p -@kindex p (Browse) +@kindex p @r{(Browse)} @findex gnus-group-prev-group Go to the previous group (@code{gnus-group-prev-group}). -@item SPACE -@kindex SPACE (Browse) +@item @key{SPC} +@kindex @key{SPC} @r{(Browse)} @findex gnus-browse-read-group Enter the current group and display the first article (@code{gnus-browse-read-group}). -@item RET -@kindex RET (Browse) +@item @key{RET} +@kindex @key{RET} @r{(Browse)} @findex gnus-browse-select-group Enter the current group (@code{gnus-browse-select-group}). @item u -@kindex u (Browse) +@kindex u @r{(Browse)} @findex gnus-browse-unsubscribe-current-group @vindex gnus-browse-subscribe-newsgroup-method Unsubscribe to the current group, or, as will be the case here, @@ -3645,24 +3639,24 @@ using the variable @code{gnus-browse-subscribe-newsgroup-method}. See @item l @itemx q -@kindex q (Browse) -@kindex l (Browse) +@kindex q @r{(Browse)} +@kindex l @r{(Browse)} @findex gnus-browse-exit Exit browse mode (@code{gnus-browse-exit}). @item d -@kindex d (Browse) +@kindex d @r{(Browse)} @findex gnus-browse-describe-group Describe the current group (@code{gnus-browse-describe-group}). @item ? -@kindex ? (Browse) +@kindex ? @r{(Browse)} @findex gnus-browse-describe-briefly Describe browse mode briefly (well, there's not much to describe, is there) (@code{gnus-browse-describe-briefly}). -@item DEL -@kindex DEL (Browse) +@item @key{DEL} +@kindex @key{DEL} @r{(Browse)} @findex gnus-browse-delete-group This function will delete the current group (@code{gnus-browse-delete-group}). If given a prefix, this function @@ -3680,20 +3674,20 @@ Yes, Gnus is ex(c)iting. @table @kbd @item z -@kindex z (Group) +@kindex z @r{(Group)} @findex gnus-group-suspend Suspend Gnus (@code{gnus-group-suspend}). This doesn't really exit Gnus, but it kills all buffers except the Group buffer. I'm not sure why this is a gain, but then who am I to judge? @item q -@kindex q (Group) +@kindex q @r{(Group)} @findex gnus-group-exit @c @icon{gnus-group-exit} Quit Gnus (@code{gnus-group-exit}). @item Q -@kindex Q (Group) +@kindex Q @r{(Group)} @findex gnus-group-quit Quit Gnus without saving the @file{.newsrc} files (@code{gnus-group-quit}). The dribble file will be saved, though (@pxref{Auto Save}). @@ -3752,7 +3746,7 @@ Gnus @end example @findex gnus-topic-mode -@kindex t (Group) +@kindex t @r{(Group)} To get this @emph{fab} functionality you simply turn on (ooh!) the @code{gnus-topic} minor mode---type @kbd{t} in the group buffer. (This is a toggling command.) @@ -3801,22 +3795,22 @@ the way you like. @table @kbd @item T n -@kindex T n (Topic) +@kindex T n @r{(Topic)} @findex gnus-topic-create-topic Prompt for a new topic name and create it (@code{gnus-topic-create-topic}). -@item T TAB -@itemx TAB -@kindex T TAB (Topic) -@kindex TAB (Topic) +@item T @key{TAB} +@itemx @key{TAB} +@kindex T @key{TAB} @r{(Topic)} +@kindex @key{TAB} @r{(Topic)} @findex gnus-topic-indent ``Indent'' the current topic so that it becomes a sub-topic of the previous topic (@code{gnus-topic-indent}). If given a prefix, ``un-indent'' the topic instead. -@item M-TAB -@kindex M-TAB (Topic) +@item M-@key{TAB} +@kindex M-@key{TAB} @r{(Topic)} @findex gnus-topic-unindent ``Un-indent'' the current topic so that it becomes a sub-topic of the parent of its current parent (@code{gnus-topic-unindent}). @@ -3831,13 +3825,13 @@ kill and yank rather than cut and paste. @table @kbd @item C-k -@kindex C-k (Topic) +@kindex C-k @r{(Topic)} @findex gnus-topic-kill-group Kill a group or topic (@code{gnus-topic-kill-group}). All groups in the topic will be removed along with the topic. @item C-y -@kindex C-y (Topic) +@kindex C-y @r{(Topic)} @findex gnus-topic-yank-group Yank the previously killed group or topic (@code{gnus-topic-yank-group}). Note that all topics will be yanked @@ -3860,10 +3854,10 @@ key. @table @kbd -@item RET -@kindex RET (Topic) +@item @key{RET} +@kindex @key{RET} @r{(Topic)} @findex gnus-topic-select-group -@itemx SPACE +@itemx @key{SPC} Either select a group or fold a topic (@code{gnus-topic-select-group}). When you perform this command on a group, you'll enter the group, as usual. When done on a topic line, the topic will be folded (if it was @@ -3878,38 +3872,38 @@ Now for a list of other commands, in no particular order. @table @kbd @item T m -@kindex T m (Topic) +@kindex T m @r{(Topic)} @findex gnus-topic-move-group Move the current group to some other topic (@code{gnus-topic-move-group}). This command uses the process/prefix convention (@pxref{Process/Prefix}). @item T j -@kindex T j (Topic) +@kindex T j @r{(Topic)} @findex gnus-topic-jump-to-topic Go to a topic (@code{gnus-topic-jump-to-topic}). @item T c -@kindex T c (Topic) +@kindex T c @r{(Topic)} @findex gnus-topic-copy-group Copy the current group to some other topic (@code{gnus-topic-copy-group}). This command uses the process/prefix convention (@pxref{Process/Prefix}). @item T h -@kindex T h (Topic) +@kindex T h @r{(Topic)} @findex gnus-topic-hide-topic Hide the current topic (@code{gnus-topic-hide-topic}). If given a prefix, hide the topic permanently. @item T s -@kindex T s (Topic) +@kindex T s @r{(Topic)} @findex gnus-topic-show-topic Show the current topic (@code{gnus-topic-show-topic}). If given a prefix, show the topic permanently. @item T D -@kindex T D (Topic) +@kindex T D @r{(Topic)} @findex gnus-topic-remove-group Remove a group from the current topic (@code{gnus-topic-remove-group}). This command is mainly useful if you have the same group in several @@ -3923,39 +3917,39 @@ This command uses the process/prefix convention (@pxref{Process/Prefix}). @item T M -@kindex T M (Topic) +@kindex T M @r{(Topic)} @findex gnus-topic-move-matching Move all groups that match some regular expression to a topic (@code{gnus-topic-move-matching}). @item T C -@kindex T C (Topic) +@kindex T C @r{(Topic)} @findex gnus-topic-copy-matching Copy all groups that match some regular expression to a topic (@code{gnus-topic-copy-matching}). @item T H -@kindex T H (Topic) +@kindex T H @r{(Topic)} @findex gnus-topic-toggle-display-empty-topics Toggle hiding empty topics (@code{gnus-topic-toggle-display-empty-topics}). @item T # -@kindex T # (Topic) +@kindex T # @r{(Topic)} @findex gnus-topic-mark-topic Mark all groups in the current topic with the process mark (@code{gnus-topic-mark-topic}). This command works recursively on sub-topics unless given a prefix. @item T M-# -@kindex T M-# (Topic) +@kindex T M-# @r{(Topic)} @findex gnus-topic-unmark-topic Remove the process mark from all groups in the current topic (@code{gnus-topic-unmark-topic}). This command works recursively on sub-topics unless given a prefix. @item C-c C-x -@kindex C-c C-x (Topic) +@kindex C-c C-x @r{(Topic)} @findex gnus-topic-expire-articles @cindex expiring mail Run all expirable articles in the current group or topic through the @@ -3963,33 +3957,33 @@ expiry process (if any) (@code{gnus-topic-expire-articles}). (@pxref{Expiring Mail}). @item T r -@kindex T r (Topic) +@kindex T r @r{(Topic)} @findex gnus-topic-rename Rename a topic (@code{gnus-topic-rename}). -@item T DEL -@kindex T DEL (Topic) +@item T @key{DEL} +@kindex T @key{DEL} @r{(Topic)} @findex gnus-topic-delete Delete an empty topic (@code{gnus-topic-delete}). @item A T -@kindex A T (Topic) +@kindex A T @r{(Topic)} @findex gnus-topic-list-active List all groups that Gnus knows about in a topics-ified way (@code{gnus-topic-list-active}). @item T M-n -@kindex T M-n (Topic) +@kindex T M-n @r{(Topic)} @findex gnus-topic-goto-next-topic Go to the next topic (@code{gnus-topic-goto-next-topic}). @item T M-p -@kindex T M-p (Topic) +@kindex T M-p @r{(Topic)} @findex gnus-topic-goto-previous-topic Go to the previous topic (@code{gnus-topic-goto-previous-topic}). @item G p -@kindex G p (Topic) +@kindex G p @r{(Topic)} @findex gnus-topic-edit-parameters @cindex group parameters @cindex topic parameters @@ -4052,49 +4046,49 @@ commands: @table @kbd @item T S a -@kindex T S a (Topic) +@kindex T S a @r{(Topic)} @findex gnus-topic-sort-groups-by-alphabet Sort the current topic alphabetically by group name (@code{gnus-topic-sort-groups-by-alphabet}). @item T S u -@kindex T S u (Topic) +@kindex T S u @r{(Topic)} @findex gnus-topic-sort-groups-by-unread Sort the current topic by the number of unread articles (@code{gnus-topic-sort-groups-by-unread}). @item T S l -@kindex T S l (Topic) +@kindex T S l @r{(Topic)} @findex gnus-topic-sort-groups-by-level Sort the current topic by group level (@code{gnus-topic-sort-groups-by-level}). @item T S v -@kindex T S v (Topic) +@kindex T S v @r{(Topic)} @findex gnus-topic-sort-groups-by-score Sort the current topic by group score (@code{gnus-topic-sort-groups-by-score}). @xref{Group Score}. @item T S r -@kindex T S r (Topic) +@kindex T S r @r{(Topic)} @findex gnus-topic-sort-groups-by-rank Sort the current topic by group rank (@code{gnus-topic-sort-groups-by-rank}). @xref{Group Score}. @item T S m -@kindex T S m (Topic) +@kindex T S m @r{(Topic)} @findex gnus-topic-sort-groups-by-method Sort the current topic alphabetically by back end name (@code{gnus-topic-sort-groups-by-method}). @item T S e -@kindex T S e (Topic) +@kindex T S e @r{(Topic)} @findex gnus-topic-sort-groups-by-server Sort the current topic alphabetically by server name (@code{gnus-topic-sort-groups-by-server}). @item T S s -@kindex T S s (Topic) +@kindex T S s @r{(Topic)} @findex gnus-topic-sort-groups Sort the current topic according to the function(s) given by the @code{gnus-group-sort-function} variable @@ -4369,7 +4363,7 @@ header will be displayed incorrectly in the article buffer. @table @kbd @item v -@kindex v (Group) +@kindex v @r{(Group)} @cindex keys, reserved for users (Group) The key @kbd{v} is reserved for users. You can bind it to some command or better use it as a prefix key. For example: @@ -4385,13 +4379,13 @@ On keys reserved for users in Emacs and on keybindings in general @xref{Keymaps, Keymaps, , emacs, The Emacs Editor}. @item ^ -@kindex ^ (Group) +@kindex ^ @r{(Group)} @findex gnus-group-enter-server-mode Enter the server buffer (@code{gnus-group-enter-server-mode}). @xref{Server Buffer}. @item a -@kindex a (Group) +@kindex a @r{(Group)} @findex gnus-group-post-news Start composing a message (a news by default) (@code{gnus-group-post-news}). If given a prefix, post to the group @@ -4401,7 +4395,7 @@ article might be a mail instead of a news, if a mail group is specified with the prefix argument. @xref{Composing Messages}. @item m -@kindex m (Group) +@kindex m @r{(Group)} @findex gnus-group-mail Mail a message somewhere (@code{gnus-group-mail}). If given a prefix, use the posting style of the group under the point. If the prefix is 1, @@ -4409,7 +4403,7 @@ prompt for a group name to find the posting style. @xref{Composing Messages}. @item i -@kindex i (Group) +@kindex i @r{(Group)} @findex gnus-group-news Start composing a news (@code{gnus-group-news}). If given a prefix, post to the group under the point. If the prefix is 1, prompt @@ -4422,7 +4416,7 @@ in question. The corresponding back end must have a request-post method for this to work though. @item G z -@kindex G z (Group) +@kindex G z @r{(Group)} @findex gnus-group-compact-group Compact the group under point (@code{gnus-group-compact-group}). @@ -4467,7 +4461,7 @@ whether they are empty or not. @table @kbd @item g -@kindex g (Group) +@kindex g @r{(Group)} @findex gnus-group-get-new-news @c @icon{gnus-group-get-new-news} Check the server(s) for new articles. If the numerical prefix is used, @@ -4477,7 +4471,7 @@ command will force a total re-reading of the active file(s) from the back end(s). @item M-g -@kindex M-g (Group) +@kindex M-g @r{(Group)} @findex gnus-group-get-new-news-this-group @vindex gnus-goto-next-group-when-activating @c @icon{gnus-group-get-new-news-this-group} @@ -4489,11 +4483,11 @@ to move point to the next group or not. It is @code{t} by default. @findex gnus-activate-all-groups @cindex activating groups @item C-c M-g -@kindex C-c M-g (Group) +@kindex C-c M-g @r{(Group)} Activate absolutely all groups (@code{gnus-activate-all-groups}). @item R -@kindex R (Group) +@kindex R @r{(Group)} @cindex restarting @findex gnus-group-restart Restart Gnus (@code{gnus-group-restart}). This saves the @file{.newsrc} @@ -4521,8 +4515,8 @@ news. @item H d @itemx C-c C-d @c @icon{gnus-group-describe-group} -@kindex H d (Group) -@kindex C-c C-d (Group) +@kindex H d @r{(Group)} +@kindex C-c C-d @r{(Group)} @cindex describing groups @cindex group description @findex gnus-group-describe-group @@ -4530,26 +4524,26 @@ Describe the current group (@code{gnus-group-describe-group}). If given a prefix, force Gnus to re-read the description from the server. @item M-d -@kindex M-d (Group) +@kindex M-d @r{(Group)} @findex gnus-group-describe-all-groups Describe all groups (@code{gnus-group-describe-all-groups}). If given a prefix, force Gnus to re-read the description file from the server. @item H v @itemx V -@kindex V (Group) -@kindex H v (Group) +@kindex V @r{(Group)} +@kindex H v @r{(Group)} @cindex version @findex gnus-version Display current Gnus version numbers (@code{gnus-version}). @item ? -@kindex ? (Group) +@kindex ? @r{(Group)} @findex gnus-group-describe-briefly Give a very short help message (@code{gnus-group-describe-briefly}). @item C-c C-i -@kindex C-c C-i (Group) +@kindex C-c C-i @r{(Group)} @cindex info @cindex manual @findex gnus-info-find-node @@ -4623,7 +4617,7 @@ either. @table @kbd @item r -@kindex r (Group) +@kindex r @r{(Group)} @findex gnus-group-read-init-file @vindex gnus-init-file @cindex reading init file @@ -4631,7 +4625,7 @@ Re-read the init file (@code{gnus-init-file}, which defaults to @file{~/.gnus.el}) (@code{gnus-group-read-init-file}). @item s -@kindex s (Group) +@kindex s @r{(Group)} @findex gnus-group-save-newsrc @cindex saving .newsrc Save the @file{.newsrc.eld} file (and @file{.newsrc} if wanted) @@ -4639,7 +4633,7 @@ Save the @file{.newsrc.eld} file (and @file{.newsrc} if wanted) file(s) whether Gnus thinks it is necessary or not. @c @item Z -@c @kindex Z (Group) +@c @kindex Z @r{(Group)} @c @findex gnus-group-clear-dribble @c Clear the dribble buffer (@code{gnus-group-clear-dribble}). @@ -4689,7 +4683,7 @@ if address "sender" "owner-ding@@hpc.uh.edu" @{ @table @kbd @item D g -@kindex D g (Group) +@kindex D g @r{(Group)} @findex gnus-sieve-generate @vindex gnus-sieve-file @cindex generating sieve script @@ -4697,7 +4691,7 @@ Regenerate a Sieve script from the @code{sieve} group parameters and put you into the @code{gnus-sieve-file} without saving it. @item D u -@kindex D u (Group) +@kindex D u @r{(Group)} @findex gnus-sieve-update @vindex gnus-sieve-file @cindex updating sieve script @@ -4721,10 +4715,10 @@ group buffer (@pxref{Selecting a Group}). You can have as many summary buffers open as you wish. You can customize the Summary Mode tool bar, see @kbd{M-x -customize-apropos RET gnus-summary-tool-bar}. This feature is only +customize-apropos @key{RET} gnus-summary-tool-bar}. This feature is only available in Emacs. -@kindex v (Summary) +@kindex v @r{(Summary)} @cindex keys, reserved for users (Summary) The key @kbd{v} is reserved for users. You can bind it to some command or better use it as a prefix key. For example: @@ -5204,22 +5198,22 @@ None of these commands select articles. @table @kbd @item G M-n @itemx M-n -@kindex M-n (Summary) -@kindex G M-n (Summary) +@kindex M-n @r{(Summary)} +@kindex G M-n @r{(Summary)} @findex gnus-summary-next-unread-subject Go to the next summary line of an unread article (@code{gnus-summary-next-unread-subject}). @item G M-p @itemx M-p -@kindex M-p (Summary) -@kindex G M-p (Summary) +@kindex M-p @r{(Summary)} +@kindex G M-p @r{(Summary)} @findex gnus-summary-prev-unread-subject Go to the previous summary line of an unread article (@code{gnus-summary-prev-unread-subject}). @item G g -@kindex G g (Summary) +@kindex G g @r{(Summary)} @findex gnus-summary-goto-subject Ask for an article number and then go to the summary line of that article without displaying the article (@code{gnus-summary-goto-subject}). @@ -5281,7 +5275,7 @@ the given number of lines from the top. @item gnus-summary-stop-at-end-of-message @vindex gnus-summary-stop-at-end-of-message If non-@code{nil}, don't go to the next article when hitting -@kbd{SPC}, and you're at the end of the article. +@kbd{@key{SPC}}, and you're at the end of the article. @end table @@ -5306,69 +5300,69 @@ If you want to fetch new articles or redisplay the group, see @ref{Exiting the Summary Buffer}. @table @kbd -@item SPACE -@kindex SPACE (Summary) +@item @key{SPC} +@kindex @key{SPC} @r{(Summary)} @findex gnus-summary-next-page Select the current article, or, if that one's read already, the next unread article (@code{gnus-summary-next-page}). -If you have an article window open already and you press @kbd{SPACE} +If you have an article window open already and you press @kbd{@key{SPC}} again, the article will be scrolled. This lets you conveniently -@kbd{SPACE} through an entire newsgroup. @xref{Paging the Article}. +@kbd{@key{SPC}} through an entire newsgroup. @xref{Paging the Article}. @item G n @itemx n -@kindex n (Summary) -@kindex G n (Summary) +@kindex n @r{(Summary)} +@kindex G n @r{(Summary)} @findex gnus-summary-next-unread-article @c @icon{gnus-summary-next-unread} Go to next unread article (@code{gnus-summary-next-unread-article}). @item G p @itemx p -@kindex p (Summary) +@kindex p @r{(Summary)} @findex gnus-summary-prev-unread-article @c @icon{gnus-summary-prev-unread} Go to previous unread article (@code{gnus-summary-prev-unread-article}). @item G N @itemx N -@kindex N (Summary) -@kindex G N (Summary) +@kindex N @r{(Summary)} +@kindex G N @r{(Summary)} @findex gnus-summary-next-article Go to the next article (@code{gnus-summary-next-article}). @item G P @itemx P -@kindex P (Summary) -@kindex G P (Summary) +@kindex P @r{(Summary)} +@kindex G P @r{(Summary)} @findex gnus-summary-prev-article Go to the previous article (@code{gnus-summary-prev-article}). @item G C-n -@kindex G C-n (Summary) +@kindex G C-n @r{(Summary)} @findex gnus-summary-next-same-subject Go to the next article with the same subject (@code{gnus-summary-next-same-subject}). @item G C-p -@kindex G C-p (Summary) +@kindex G C-p @r{(Summary)} @findex gnus-summary-prev-same-subject Go to the previous article with the same subject (@code{gnus-summary-prev-same-subject}). @item G f @itemx . -@kindex G f (Summary) -@kindex . (Summary) +@kindex G f @r{(Summary)} +@kindex . @r{(Summary)} @findex gnus-summary-first-unread-article Go to the first unread article (@code{gnus-summary-first-unread-article}). @item G b @itemx , -@kindex G b (Summary) -@kindex , (Summary) +@kindex G b @r{(Summary)} +@kindex , @r{(Summary)} @findex gnus-summary-best-unread-article Go to the unread article with the highest score (@code{gnus-summary-best-unread-article}). If given a prefix argument, @@ -5376,13 +5370,13 @@ go to the first unread article that has a score over the default score. @item G l @itemx l -@kindex l (Summary) -@kindex G l (Summary) +@kindex l @r{(Summary)} +@kindex G l @r{(Summary)} @findex gnus-summary-goto-last-article Go to the previous article read (@code{gnus-summary-goto-last-article}). @item G o -@kindex G o (Summary) +@kindex G o @r{(Summary)} @findex gnus-summary-pop-article @cindex history @cindex article history @@ -5395,8 +5389,8 @@ For a somewhat related issue (if you use these commands a lot), @item G j @itemx j -@kindex j (Summary) -@kindex G j (Summary) +@kindex j @r{(Summary)} +@kindex G j @r{(Summary)} @findex gnus-summary-goto-article Ask for an article number or @code{Message-ID}, and then go to that article (@code{gnus-summary-goto-article}). @@ -5448,10 +5442,10 @@ instead. It will leave marks like @code{gnus-low-score-mark}, @table @kbd -@item SPACE -@kindex SPACE (Summary) +@item @key{SPC} +@kindex @key{SPC} @r{(Summary)} @findex gnus-summary-next-page -Pressing @kbd{SPACE} will scroll the current article forward one page, +Pressing @kbd{@key{SPC}} will scroll the current article forward one page, or, if you have come to the end of the current article, will choose the next article (@code{gnus-summary-next-page}). @@ -5464,27 +5458,27 @@ what is considered uninteresting with @code{gnus-article-boring-faces}. You can manually view the article's pages, no matter how boring, using @kbd{C-M-v}. -@item DEL -@kindex DEL (Summary) +@item @key{DEL} +@kindex @key{DEL} @r{(Summary)} @findex gnus-summary-prev-page Scroll the current article back one page (@code{gnus-summary-prev-page}). -@item RET -@kindex RET (Summary) +@item @key{RET} +@kindex @key{RET} @r{(Summary)} @findex gnus-summary-scroll-up Scroll the current article one line forward (@code{gnus-summary-scroll-up}). -@item M-RET -@kindex M-RET (Summary) +@item M-@key{RET} +@kindex M-@key{RET} @r{(Summary)} @findex gnus-summary-scroll-down Scroll the current article one line backward (@code{gnus-summary-scroll-down}). @item A g @itemx g -@kindex A g (Summary) -@kindex g (Summary) +@kindex A g @r{(Summary)} +@kindex g @r{(Summary)} @findex gnus-summary-show-article @vindex gnus-summary-show-article-charset-alist (Re)fetch the current article (@code{gnus-summary-show-article}). If @@ -5495,7 +5489,7 @@ treatment functions. @cindex charset, view article with different charset If given a numerical prefix, you can do semi-manual charset stuff. -@kbd{C-u 0 g cn-gb-2312 RET} will decode the message as if it were +@kbd{C-u 0 g cn-gb-2312 @key{RET}} will decode the message as if it were encoded in the @code{cn-gb-2312} charset. If you have @lisp @@ -5508,29 +5502,29 @@ then you can say @kbd{C-u 1 g} to get the same effect. @item A < @itemx < -@kindex < (Summary) -@kindex A < (Summary) +@kindex < @r{(Summary)} +@kindex A < @r{(Summary)} @findex gnus-summary-beginning-of-article Scroll to the beginning of the article (@code{gnus-summary-beginning-of-article}). @item A > @itemx > -@kindex > (Summary) -@kindex A > (Summary) +@kindex > @r{(Summary)} +@kindex A > @r{(Summary)} @findex gnus-summary-end-of-article Scroll to the end of the article (@code{gnus-summary-end-of-article}). @item A s @itemx s -@kindex A s (Summary) -@kindex s (Summary) +@kindex A s @r{(Summary)} +@kindex s @r{(Summary)} @findex gnus-summary-isearch-article Perform an isearch in the article buffer (@code{gnus-summary-isearch-article}). @item h -@kindex h (Summary) +@kindex h @r{(Summary)} @findex gnus-summary-select-article-buffer Select the article buffer (@code{gnus-summary-select-article-buffer}). @@ -5559,8 +5553,8 @@ Commands for composing a mail message: @item S r @itemx r -@kindex S r (Summary) -@kindex r (Summary) +@kindex S r @r{(Summary)} +@kindex r @r{(Summary)} @findex gnus-summary-reply @c @icon{gnus-summary-mail-reply} @c @icon{gnus-summary-reply} @@ -5569,8 +5563,8 @@ Mail a reply to the author of the current article @item S R @itemx R -@kindex R (Summary) -@kindex S R (Summary) +@kindex R @r{(Summary)} +@kindex S R @r{(Summary)} @findex gnus-summary-reply-with-original @c @icon{gnus-summary-reply-with-original} Mail a reply to the author of the current article and include the @@ -5578,7 +5572,7 @@ original message (@code{gnus-summary-reply-with-original}). This command uses the process/prefix convention. @item S w -@kindex S w (Summary) +@kindex S w @r{(Summary)} @findex gnus-summary-wide-reply Mail a wide reply to the author of the current article (@code{gnus-summary-wide-reply}). A @dfn{wide reply} is a reply that @@ -5587,7 +5581,7 @@ goes out to all people listed in the @code{To}, @code{From} (or present, that's used instead. @item S W -@kindex S W (Summary) +@kindex S W @r{(Summary)} @findex gnus-summary-wide-reply-with-original Mail a wide reply to the current article and include the original message (@code{gnus-summary-wide-reply-with-original}). This command uses @@ -5595,14 +5589,14 @@ the process/prefix convention, but only uses the headers from the first article to determine the recipients. @item S L -@kindex S L (Summary) +@kindex S L @r{(Summary)} @findex gnus-summary-reply-to-list-with-original When replying to a message from a mailing list, send a reply to that message to the mailing list, and include the original message (@code{gnus-summary-reply-to-list-with-original}). @item S v -@kindex S v (Summary) +@kindex S v @r{(Summary)} @findex gnus-summary-very-wide-reply Mail a very wide reply to the author of the current article (@code{gnus-summary-wide-reply}). A @dfn{very wide reply} is a reply @@ -5611,14 +5605,14 @@ that goes out to all people listed in the @code{To}, @code{From} (or articles. This command uses the process/prefix convention. @item S V -@kindex S V (Summary) +@kindex S V @r{(Summary)} @findex gnus-summary-very-wide-reply-with-original Mail a very wide reply to the author of the current article and include the original message (@code{gnus-summary-very-wide-reply-with-original}). This command uses the process/prefix convention. @item S B r -@kindex S B r (Summary) +@kindex S B r @r{(Summary)} @findex gnus-summary-reply-broken-reply-to Mail a reply to the author of the current article but ignore the @code{Reply-To} field (@code{gnus-summary-reply-broken-reply-to}). @@ -5628,7 +5622,7 @@ the @code{broken-reply-to} group parameter instead, so things will work correctly. @xref{Group Parameters}. @item S B R -@kindex S B R (Summary) +@kindex S B R @r{(Summary)} @findex gnus-summary-reply-broken-reply-to-with-original Mail a reply to the author of the current article and include the original message but ignore the @code{Reply-To} field @@ -5636,8 +5630,8 @@ original message but ignore the @code{Reply-To} field @item S o m @itemx C-c C-f -@kindex S o m (Summary) -@kindex C-c C-f (Summary) +@kindex S o m @r{(Summary)} +@kindex C-c C-f @r{(Summary)} @findex gnus-summary-mail-forward @c @icon{gnus-summary-mail-forward} Forward the current article to some other person @@ -5654,8 +5648,8 @@ section. @item S m @itemx m -@kindex m (Summary) -@kindex S m (Summary) +@kindex m @r{(Summary)} +@kindex S m @r{(Summary)} @findex gnus-summary-mail-other-window @c @icon{gnus-summary-mail-originate} Prepare a mail (@code{gnus-summary-mail-other-window}). By default, use @@ -5663,7 +5657,7 @@ the posting style of the current group. If given a prefix, disable that. If the prefix is 1, prompt for a group name to find the posting style. @item S i -@kindex S i (Summary) +@kindex S i @r{(Summary)} @findex gnus-summary-news-other-window Prepare a news (@code{gnus-summary-news-other-window}). By default, post to the current group. If given a prefix, disable that. If the @@ -5676,7 +5670,7 @@ in question. The corresponding back end must have a request-post method for this to work though. @item S D b -@kindex S D b (Summary) +@kindex S D b @r{(Summary)} @findex gnus-summary-resend-bounced-mail @cindex bouncing mail If you have sent a mail, but the mail was bounced back to you for some @@ -5689,7 +5683,7 @@ that mail and display it for easy perusal of its headers. This might very well fail, though. @item S D r -@kindex S D r (Summary) +@kindex S D r @r{(Summary)} @findex gnus-summary-resend-message Not to be confused with the previous command, @code{gnus-summary-resend-message} will prompt you for an address to @@ -5710,21 +5704,21 @@ This command understands the process/prefix convention (@pxref{Process/Prefix}). @item S D e -@kindex S D e (Summary) +@kindex S D e @r{(Summary)} @findex gnus-summary-resend-message-edit Like the previous command, but will allow you to edit the message as if it were a new message before resending. @item S O m -@kindex S O m (Summary) +@kindex S O m @r{(Summary)} @findex gnus-uu-digest-mail-forward Digest the current series (@pxref{Decoding Articles}) and forward the result using mail (@code{gnus-uu-digest-mail-forward}). This command uses the process/prefix convention (@pxref{Process/Prefix}). @item S M-c -@kindex S M-c (Summary) +@kindex S M-c @r{(Summary)} @findex gnus-summary-mail-crosspost-complaint @cindex crossposting @cindex excessive crossposting @@ -5754,8 +5748,8 @@ Commands for posting a news article: @table @kbd @item S p @itemx a -@kindex a (Summary) -@kindex S p (Summary) +@kindex a @r{(Summary)} +@kindex S p @r{(Summary)} @findex gnus-summary-post-news @c @icon{gnus-summary-post-news} Prepare for posting an article (@code{gnus-summary-post-news}). By @@ -5764,16 +5758,16 @@ If the prefix is 1, prompt for another group instead. @item S f @itemx f -@kindex f (Summary) -@kindex S f (Summary) +@kindex f @r{(Summary)} +@kindex S f @r{(Summary)} @findex gnus-summary-followup @c @icon{gnus-summary-followup} Post a followup to the current article (@code{gnus-summary-followup}). @item S F @itemx F -@kindex S F (Summary) -@kindex F (Summary) +@kindex S F @r{(Summary)} +@kindex F @r{(Summary)} @c @icon{gnus-summary-followup-with-original} @findex gnus-summary-followup-with-original Post a followup to the current article and include the original message @@ -5781,13 +5775,13 @@ Post a followup to the current article and include the original message process/prefix convention. @item S n -@kindex S n (Summary) +@kindex S n @r{(Summary)} @findex gnus-summary-followup-to-mail Post a followup to the current article via news, even if you got the message through mail (@code{gnus-summary-followup-to-mail}). @item S N -@kindex S N (Summary) +@kindex S N @r{(Summary)} @findex gnus-summary-followup-to-mail-with-original Post a followup to the current article via news, even if you got the message through mail and include the original message @@ -5795,7 +5789,7 @@ message through mail and include the original message the process/prefix convention. @item S o p -@kindex S o p (Summary) +@kindex S o p @r{(Summary)} @findex gnus-summary-post-forward Forward the current article to a newsgroup (@code{gnus-summary-post-forward}). @@ -5810,7 +5804,7 @@ but use the flipped value of (@code{message-forward-as-mime}). By default, the message is decoded and forwarded as an rfc822 @acronym{MIME} section. @item S O p -@kindex S O p (Summary) +@kindex S O p @r{(Summary)} @findex gnus-uu-digest-post-forward @cindex digests @cindex making digests @@ -5819,7 +5813,7 @@ Digest the current series and forward the result to a newsgroup process/prefix convention. @item S u -@kindex S u (Summary) +@kindex S u @r{(Summary)} @findex gnus-uu-post-news @c @icon{gnus-uu-post-news} Uuencode a file, split it into parts, and post it as a series @@ -5835,7 +5829,7 @@ Manual}, for more information. @table @kbd @item S y -@kindex S y (Summary) +@kindex S y @r{(Summary)} @findex gnus-summary-yank-message Yank the current article into an already existing Message composition buffer (@code{gnus-summary-yank-message}). This command prompts for @@ -5856,7 +5850,7 @@ really, really wish you hadn't posted that? Well, you can't cancel mail, but you can cancel posts. @findex gnus-summary-cancel-article -@kindex C (Summary) +@kindex C @r{(Summary)} @c @icon{gnus-summary-cancel-article} Find the article you wish to cancel (you can only cancel your own articles, so don't try any funny stuff). Then press @kbd{C} or @kbd{S @@ -5881,7 +5875,7 @@ corrections, you can post a @dfn{superseding} article that will replace your original article. @findex gnus-summary-supersede-article -@kindex S (Summary) +@kindex S @r{(Summary)} Go to the original article and press @kbd{S s} (@code{gnus-summary-supersede-article}). You will be put in a buffer where you can edit the article all you want before sending it off the @@ -6064,7 +6058,7 @@ followups, you can use the @kbd{/ D} command (@pxref{Limiting}). Otherwise (except for the visibility issue), they are just like ticked messages. -@item SPACE +@item @key{SPC} @vindex gnus-unread-mark Marked as unread (@code{gnus-unread-mark}). @@ -6248,8 +6242,8 @@ All the marking commands understand the numeric prefix. @table @kbd @item M c @itemx M-u -@kindex M c (Summary) -@kindex M-u (Summary) +@kindex M c @r{(Summary)} +@kindex M-u @r{(Summary)} @findex gnus-summary-clear-mark-forward @cindex mark as unread Clear all readedness-marks from the current article @@ -6258,38 +6252,38 @@ article as unread. @item M t @itemx ! -@kindex ! (Summary) -@kindex M t (Summary) +@kindex ! @r{(Summary)} +@kindex M t @r{(Summary)} @findex gnus-summary-tick-article-forward Tick the current article (@code{gnus-summary-tick-article-forward}). @xref{Article Caching}. @item M ? @itemx ? -@kindex ? (Summary) -@kindex M ? (Summary) +@kindex ? @r{(Summary)} +@kindex M ? @r{(Summary)} @findex gnus-summary-mark-as-dormant Mark the current article as dormant (@code{gnus-summary-mark-as-dormant}). @xref{Article Caching}. @item M d @itemx d -@kindex M d (Summary) -@kindex d (Summary) +@kindex M d @r{(Summary)} +@kindex d @r{(Summary)} @findex gnus-summary-mark-as-read-forward Mark the current article as read (@code{gnus-summary-mark-as-read-forward}). @item D -@kindex D (Summary) +@kindex D @r{(Summary)} @findex gnus-summary-mark-as-read-backward Mark the current article as read and move point to the previous line (@code{gnus-summary-mark-as-read-backward}). @item M k @itemx k -@kindex k (Summary) -@kindex M k (Summary) +@kindex k @r{(Summary)} +@kindex M k @r{(Summary)} @findex gnus-summary-kill-same-subject-and-select Mark all articles that have the same subject as the current one as read, and then select the next unread article @@ -6297,82 +6291,82 @@ and then select the next unread article @item M K @itemx C-k -@kindex M K (Summary) -@kindex C-k (Summary) +@kindex M K @r{(Summary)} +@kindex C-k @r{(Summary)} @findex gnus-summary-kill-same-subject Mark all articles that have the same subject as the current one as read (@code{gnus-summary-kill-same-subject}). @item M C -@kindex M C (Summary) +@kindex M C @r{(Summary)} @findex gnus-summary-catchup @c @icon{gnus-summary-catchup} Mark all unread articles as read (@code{gnus-summary-catchup}). @item M C-c -@kindex M C-c (Summary) +@kindex M C-c @r{(Summary)} @findex gnus-summary-catchup-all Mark all articles in the group as read---even the ticked and dormant articles (@code{gnus-summary-catchup-all}). @item M H -@kindex M H (Summary) +@kindex M H @r{(Summary)} @findex gnus-summary-catchup-to-here Catchup the current group to point (before the point) (@code{gnus-summary-catchup-to-here}). @item M h -@kindex M h (Summary) +@kindex M h @r{(Summary)} @findex gnus-summary-catchup-from-here Catchup the current group from point (after the point) (@code{gnus-summary-catchup-from-here}). @item C-w -@kindex C-w (Summary) +@kindex C-w @r{(Summary)} @findex gnus-summary-mark-region-as-read Mark all articles between point and mark as read (@code{gnus-summary-mark-region-as-read}). @item M V k -@kindex M V k (Summary) +@kindex M V k @r{(Summary)} @findex gnus-summary-kill-below Kill all articles with scores below the default score (or below the numeric prefix) (@code{gnus-summary-kill-below}). @item M e @itemx E -@kindex M e (Summary) -@kindex E (Summary) +@kindex M e @r{(Summary)} +@kindex E @r{(Summary)} @findex gnus-summary-mark-as-expirable Mark the current article as expirable (@code{gnus-summary-mark-as-expirable}). @item M b -@kindex M b (Summary) +@kindex M b @r{(Summary)} @findex gnus-summary-set-bookmark Set a bookmark in the current article (@code{gnus-summary-set-bookmark}). @item M B -@kindex M B (Summary) +@kindex M B @r{(Summary)} @findex gnus-summary-remove-bookmark Remove the bookmark from the current article (@code{gnus-summary-remove-bookmark}). @item M V c -@kindex M V c (Summary) +@kindex M V c @r{(Summary)} @findex gnus-summary-clear-above Clear all marks from articles with scores over the default score (or over the numeric prefix) (@code{gnus-summary-clear-above}). @item M V u -@kindex M V u (Summary) +@kindex M V u @r{(Summary)} @findex gnus-summary-tick-above Tick all articles with scores over the default score (or over the numeric prefix) (@code{gnus-summary-tick-above}). @item M V m -@kindex M V m (Summary) +@kindex M V m @r{(Summary)} @findex gnus-summary-mark-above Prompt for a mark, and mark all articles with scores over the default score (or over the numeric prefix) with this mark @@ -6385,7 +6379,7 @@ be taken after setting a mark. If non-@code{nil}, point will move to the next/previous unread article. If @code{nil}, point will just move one line up or down. As a special case, if this variable is @code{never}, all the marking commands as well as other commands (like -@kbd{SPACE}) will move to the next article, whether it is unread or not. +@kbd{@key{SPC}}) will move to the next article, whether it is unread or not. The default is @code{t}. @@ -6445,8 +6439,8 @@ articles into the cache. For more information, @item M P p @itemx # -@kindex # (Summary) -@kindex M P p (Summary) +@kindex # @r{(Summary)} +@kindex M P p @r{(Summary)} @findex gnus-summary-mark-as-processable Mark the current article with the process mark (@code{gnus-summary-mark-as-processable}). @@ -6454,99 +6448,99 @@ Mark the current article with the process mark @item M P u @itemx M-# -@kindex M P u (Summary) -@kindex M-# (Summary) +@kindex M P u @r{(Summary)} +@kindex M-# @r{(Summary)} Remove the process mark, if any, from the current article (@code{gnus-summary-unmark-as-processable}). @item M P U -@kindex M P U (Summary) +@kindex M P U @r{(Summary)} @findex gnus-summary-unmark-all-processable Remove the process mark from all articles (@code{gnus-summary-unmark-all-processable}). @item M P i -@kindex M P i (Summary) +@kindex M P i @r{(Summary)} @findex gnus-uu-invert-processable Invert the list of process marked articles (@code{gnus-uu-invert-processable}). @item M P R -@kindex M P R (Summary) +@kindex M P R @r{(Summary)} @findex gnus-uu-mark-by-regexp Mark articles that have a @code{Subject} header that matches a regular expression (@code{gnus-uu-mark-by-regexp}). @item M P G -@kindex M P G (Summary) +@kindex M P G @r{(Summary)} @findex gnus-uu-unmark-by-regexp Unmark articles that have a @code{Subject} header that matches a regular expression (@code{gnus-uu-unmark-by-regexp}). @item M P r -@kindex M P r (Summary) +@kindex M P r @r{(Summary)} @findex gnus-uu-mark-region Mark articles in region (@code{gnus-uu-mark-region}). @item M P g -@kindex M P g (Summary) +@kindex M P g @r{(Summary)} @findex gnus-uu-unmark-region Unmark articles in region (@code{gnus-uu-unmark-region}). @item M P t -@kindex M P t (Summary) +@kindex M P t @r{(Summary)} @findex gnus-uu-mark-thread Mark all articles in the current (sub)thread (@code{gnus-uu-mark-thread}). @item M P T -@kindex M P T (Summary) +@kindex M P T @r{(Summary)} @findex gnus-uu-unmark-thread Unmark all articles in the current (sub)thread (@code{gnus-uu-unmark-thread}). @item M P v -@kindex M P v (Summary) +@kindex M P v @r{(Summary)} @findex gnus-uu-mark-over Mark all articles that have a score above the prefix argument (@code{gnus-uu-mark-over}). @item M P s -@kindex M P s (Summary) +@kindex M P s @r{(Summary)} @findex gnus-uu-mark-series Mark all articles in the current series (@code{gnus-uu-mark-series}). @item M P S -@kindex M P S (Summary) +@kindex M P S @r{(Summary)} @findex gnus-uu-mark-sparse Mark all series that have already had some articles marked (@code{gnus-uu-mark-sparse}). @item M P a -@kindex M P a (Summary) +@kindex M P a @r{(Summary)} @findex gnus-uu-mark-all Mark all articles in series order (@code{gnus-uu-mark-all}). @item M P b -@kindex M P b (Summary) +@kindex M P b @r{(Summary)} @findex gnus-uu-mark-buffer Mark all articles in the buffer in the order they appear (@code{gnus-uu-mark-buffer}). @item M P k -@kindex M P k (Summary) +@kindex M P k @r{(Summary)} @findex gnus-summary-kill-process-mark Push the current process mark set onto the stack and unmark all articles (@code{gnus-summary-kill-process-mark}). @item M P y -@kindex M P y (Summary) +@kindex M P y @r{(Summary)} @findex gnus-summary-yank-process-mark Pop the previous process mark set from the stack and restore it (@code{gnus-summary-yank-process-mark}). @item M P w -@kindex M P w (Summary) +@kindex M P w @r{(Summary)} @findex gnus-summary-save-process-mark Push the current process mark set onto the stack (@code{gnus-summary-save-process-mark}). @@ -6574,42 +6568,42 @@ articles. @item / / @itemx / s -@kindex / / (Summary) +@kindex / / @r{(Summary)} @findex gnus-summary-limit-to-subject Limit the summary buffer to articles that match some subject (@code{gnus-summary-limit-to-subject}). If given a prefix, exclude matching articles. @item / a -@kindex / a (Summary) +@kindex / a @r{(Summary)} @findex gnus-summary-limit-to-author Limit the summary buffer to articles that match some author (@code{gnus-summary-limit-to-author}). If given a prefix, exclude matching articles. @item / R -@kindex / R (Summary) +@kindex / R @r{(Summary)} @findex gnus-summary-limit-to-recipient Limit the summary buffer to articles that match some recipient (@code{gnus-summary-limit-to-recipient}). If given a prefix, exclude matching articles. @item / A -@kindex / A (Summary) +@kindex / A @r{(Summary)} @findex gnus-summary-limit-to-address Limit the summary buffer to articles in which contents of From, To or Cc header match a given address (@code{gnus-summary-limit-to-address}). If given a prefix, exclude matching articles. @item / S -@kindex / S (Summary) +@kindex / S @r{(Summary)} @findex gnus-summary-limit-to-singletons Limit the summary buffer to articles that aren't part of any displayed threads (@code{gnus-summary-limit-to-singletons}). If given a prefix, limit to articles that are part of displayed threads. @item / x -@kindex / x (Summary) +@kindex / x @r{(Summary)} @findex gnus-summary-limit-to-extra Limit the summary buffer to articles that match one of the ``extra'' headers (@pxref{To From Newsgroups}) @@ -6618,8 +6612,8 @@ matching articles. @item / u @itemx x -@kindex / u (Summary) -@kindex x (Summary) +@kindex / u @r{(Summary)} +@kindex x @r{(Summary)} @findex gnus-summary-limit-to-unread Limit the summary buffer to articles not marked as read (@code{gnus-summary-limit-to-unread}). If given a prefix, limit the @@ -6627,46 +6621,46 @@ buffer to articles strictly unread. This means that ticked and dormant articles will also be excluded. @item / m -@kindex / m (Summary) +@kindex / m @r{(Summary)} @findex gnus-summary-limit-to-marks Ask for a mark and then limit to all articles that have been marked with that mark (@code{gnus-summary-limit-to-marks}). @item / t -@kindex / t (Summary) +@kindex / t @r{(Summary)} @findex gnus-summary-limit-to-age Ask for a number and then limit the summary buffer to articles older than (or equal to) that number of days (@code{gnus-summary-limit-to-age}). If given a prefix, limit to articles younger than that number of days. @item / n -@kindex / n (Summary) +@kindex / n @r{(Summary)} @findex gnus-summary-limit-to-articles With prefix @samp{n}, limit the summary buffer to the next @samp{n} articles. If not given a prefix, use the process marked articles instead. (@code{gnus-summary-limit-to-articles}). @item / w -@kindex / w (Summary) +@kindex / w @r{(Summary)} @findex gnus-summary-pop-limit Pop the previous limit off the stack and restore it (@code{gnus-summary-pop-limit}). If given a prefix, pop all limits off the stack. @item / . -@kindex / . (Summary) +@kindex / . @r{(Summary)} @findex gnus-summary-limit-to-unseen Limit the summary buffer to the unseen articles (@code{gnus-summary-limit-to-unseen}). @item / v -@kindex / v (Summary) +@kindex / v @r{(Summary)} @findex gnus-summary-limit-to-score Limit the summary buffer to articles that have a score at or above some score (@code{gnus-summary-limit-to-score}). @item / p -@kindex / p (Summary) +@kindex / p @r{(Summary)} @findex gnus-summary-limit-to-display-predicate Limit the summary buffer to articles that satisfy the @code{display} group parameter predicate @@ -6674,7 +6668,7 @@ group parameter predicate Parameters}, for more on this predicate. @item / r -@kindex / r (Summary) +@kindex / r @r{(Summary)} @findex gnus-summary-limit-to-replied Limit the summary buffer to replied articles (@code{gnus-summary-limit-to-replied}). If given a prefix, exclude @@ -6682,55 +6676,55 @@ replied articles. @item / E @itemx M S -@kindex M S (Summary) -@kindex / E (Summary) +@kindex M S @r{(Summary)} +@kindex / E @r{(Summary)} @findex gnus-summary-limit-include-expunged Include all expunged articles in the limit (@code{gnus-summary-limit-include-expunged}). @item / D -@kindex / D (Summary) +@kindex / D @r{(Summary)} @findex gnus-summary-limit-include-dormant Include all dormant articles in the limit (@code{gnus-summary-limit-include-dormant}). @item / * -@kindex / * (Summary) +@kindex / * @r{(Summary)} @findex gnus-summary-limit-include-cached Include all cached articles in the limit (@code{gnus-summary-limit-include-cached}). @item / d -@kindex / d (Summary) +@kindex / d @r{(Summary)} @findex gnus-summary-limit-exclude-dormant Exclude all dormant articles from the limit (@code{gnus-summary-limit-exclude-dormant}). @item / M -@kindex / M (Summary) +@kindex / M @r{(Summary)} @findex gnus-summary-limit-exclude-marks Exclude all marked articles (@code{gnus-summary-limit-exclude-marks}). @item / T -@kindex / T (Summary) +@kindex / T @r{(Summary)} @findex gnus-summary-limit-include-thread Include all the articles in the current thread in the limit. @item / c -@kindex / c (Summary) +@kindex / c @r{(Summary)} @findex gnus-summary-limit-exclude-childless-dormant Exclude all dormant articles that have no children from the limit@* (@code{gnus-summary-limit-exclude-childless-dormant}). @item / C -@kindex / C (Summary) +@kindex / C @r{(Summary)} @findex gnus-summary-limit-mark-excluded-as-read Mark all excluded unread articles as read (@code{gnus-summary-limit-mark-excluded-as-read}). If given a prefix, also mark excluded ticked and dormant articles as read. @item / b -@kindex / b (Summary) +@kindex / b @r{(Summary)} @findex gnus-summary-limit-to-bodies Limit the summary buffer to articles that have bodies that match a certain regexp (@code{gnus-summary-limit-to-bodies}). If given a @@ -6738,7 +6732,7 @@ prefix, reverse the limit. This command is quite slow since it requires selecting each article to find the matches. @item / h -@kindex / h (Summary) +@kindex / h @r{(Summary)} @findex gnus-summary-limit-to-headers Like the previous command, only limit to headers instead (@code{gnus-summary-limit-to-headers}). @@ -6751,13 +6745,13 @@ prefix as well. @table @kbd @item / N -@kindex / N (Summary) +@kindex / N @r{(Summary)} @findex gnus-summary-insert-new-articles Insert all new articles in the summary buffer. It scans for new emails if @var{back-end}@code{-get-new-mail} is non-@code{nil}. @item / o -@kindex / o (Summary) +@kindex / o @r{(Summary)} @findex gnus-summary-insert-old-articles Insert all old articles in the summary buffer. If given a numbered prefix, fetch this number of articles. @@ -7197,8 +7191,8 @@ meaningful. Here's one example: @item T k @itemx C-M-k -@kindex T k (Summary) -@kindex C-M-k (Summary) +@kindex T k @r{(Summary)} +@kindex C-M-k @r{(Summary)} @findex gnus-summary-kill-thread Mark all articles in the current (sub-)thread as read (@code{gnus-summary-kill-thread}). If the prefix argument is positive, @@ -7207,71 +7201,71 @@ articles instead. @item T l @itemx C-M-l -@kindex T l (Summary) -@kindex C-M-l (Summary) +@kindex T l @r{(Summary)} +@kindex C-M-l @r{(Summary)} @findex gnus-summary-lower-thread Lower the score of the current (sub-)thread (@code{gnus-summary-lower-thread}). @item T i -@kindex T i (Summary) +@kindex T i @r{(Summary)} @findex gnus-summary-raise-thread Increase the score of the current (sub-)thread (@code{gnus-summary-raise-thread}). @item T # -@kindex T # (Summary) +@kindex T # @r{(Summary)} @findex gnus-uu-mark-thread Set the process mark on the current (sub-)thread (@code{gnus-uu-mark-thread}). @item T M-# -@kindex T M-# (Summary) +@kindex T M-# @r{(Summary)} @findex gnus-uu-unmark-thread Remove the process mark from the current (sub-)thread (@code{gnus-uu-unmark-thread}). @item T T -@kindex T T (Summary) +@kindex T T @r{(Summary)} @findex gnus-summary-toggle-threads Toggle threading (@code{gnus-summary-toggle-threads}). @item T s -@kindex T s (Summary) +@kindex T s @r{(Summary)} @findex gnus-summary-show-thread Expose the (sub-)thread hidden under the current article, if any@* (@code{gnus-summary-show-thread}). @item T h -@kindex T h (Summary) +@kindex T h @r{(Summary)} @findex gnus-summary-hide-thread Hide the current (sub-)thread (@code{gnus-summary-hide-thread}). @item T S -@kindex T S (Summary) +@kindex T S @r{(Summary)} @findex gnus-summary-show-all-threads Expose all hidden threads (@code{gnus-summary-show-all-threads}). @item T H -@kindex T H (Summary) +@kindex T H @r{(Summary)} @findex gnus-summary-hide-all-threads Hide all threads (@code{gnus-summary-hide-all-threads}). @item T t -@kindex T t (Summary) +@kindex T t @r{(Summary)} @findex gnus-summary-rethread-current Re-thread the current article's thread (@code{gnus-summary-rethread-current}). This works even when the summary buffer is otherwise unthreaded. @item T ^ -@kindex T ^ (Summary) +@kindex T ^ @r{(Summary)} @findex gnus-summary-reparent-thread Make the current article the child of the marked (or previous) article (@code{gnus-summary-reparent-thread}). @item T M-^ -@kindex T M-^ (Summary) +@kindex T M-^ @r{(Summary)} @findex gnus-summary-reparent-children Make the current article the parent of the marked articles (@code{gnus-summary-reparent-children}). @@ -7284,35 +7278,35 @@ understand the numeric prefix. @table @kbd @item T n -@kindex T n (Summary) +@kindex T n @r{(Summary)} @itemx C-M-f -@kindex C-M-n (Summary) -@itemx M-down -@kindex M-down (Summary) +@kindex C-M-n @r{(Summary)} +@itemx M-@key{DOWN} +@kindex M-@key{DOWN} @r{(Summary)} @findex gnus-summary-next-thread Go to the next thread (@code{gnus-summary-next-thread}). @item T p -@kindex T p (Summary) +@kindex T p @r{(Summary)} @itemx C-M-b -@kindex C-M-p (Summary) -@itemx M-up -@kindex M-up (Summary) +@kindex C-M-p @r{(Summary)} +@itemx M-@key{UP} +@kindex M-@key{UP} @r{(Summary)} @findex gnus-summary-prev-thread Go to the previous thread (@code{gnus-summary-prev-thread}). @item T d -@kindex T d (Summary) +@kindex T d @r{(Summary)} @findex gnus-summary-down-thread Descend the thread (@code{gnus-summary-down-thread}). @item T u -@kindex T u (Summary) +@kindex T u @r{(Summary)} @findex gnus-summary-up-thread Ascend the thread (@code{gnus-summary-up-thread}). @item T o -@kindex T o (Summary) +@kindex T o @r{(Summary)} @findex gnus-summary-top-thread Go to the top of the thread (@code{gnus-summary-top-thread}). @end table @@ -7654,12 +7648,12 @@ you use two explicit commands for managing persistent articles: @table @kbd @item * -@kindex * (Summary) +@kindex * @r{(Summary)} @findex gnus-cache-enter-article Make the current article persistent (@code{gnus-cache-enter-article}). @item M-* -@kindex M-* (Summary) +@kindex M-* @r{(Summary)} @findex gnus-cache-remove-article Remove the current article from the persistent articles (@code{gnus-cache-remove-article}). This will normally delete the @@ -7697,7 +7691,7 @@ select another article. You can make an article sticky with: @table @kbd @item A S -@kindex A S (Summary) +@kindex A S @r{(Summary)} @findex gnus-sticky-article Make the current article sticky. If a prefix arg is given, ask for a name for this sticky article buffer. @@ -7707,12 +7701,12 @@ To close a sticky article buffer you can use these commands: @table @kbd @item q -@kindex q (Article) +@kindex q @r{@r{(Article)}} @findex bury-buffer Puts this sticky article buffer at the end of the list of all buffers. @item k -@kindex k (Article) +@kindex k @r{(Article)} @findex gnus-kill-sticky-article-buffer Kills this sticky article buffer. @end table @@ -7778,61 +7772,61 @@ deleted before saving. @item O o @itemx o -@kindex O o (Summary) -@kindex o (Summary) +@kindex O o @r{(Summary)} +@kindex o @r{(Summary)} @findex gnus-summary-save-article @c @icon{gnus-summary-save-article} Save the current article using the default article saver (@code{gnus-summary-save-article}). @item O m -@kindex O m (Summary) +@kindex O m @r{(Summary)} @findex gnus-summary-save-article-mail Save the current article in a Unix mail box (mbox) file (@code{gnus-summary-save-article-mail}). @item O r -@kindex O r (Summary) +@kindex O r @r{(Summary)} @findex gnus-summary-save-article-rmail Save the current article in Rmail format (@code{gnus-summary-save-article-rmail}). This is mbox since Emacs 23, Babyl in older versions. @item O f -@kindex O f (Summary) +@kindex O f @r{(Summary)} @findex gnus-summary-save-article-file @c @icon{gnus-summary-save-article-file} Save the current article in plain file format (@code{gnus-summary-save-article-file}). @item O F -@kindex O F (Summary) +@kindex O F @r{(Summary)} @findex gnus-summary-write-article-file Write the current article in plain file format, overwriting any previous file contents (@code{gnus-summary-write-article-file}). @item O b -@kindex O b (Summary) +@kindex O b @r{(Summary)} @findex gnus-summary-save-article-body-file Save the current article body in plain file format (@code{gnus-summary-save-article-body-file}). @item O h -@kindex O h (Summary) +@kindex O h @r{(Summary)} @findex gnus-summary-save-article-folder Save the current article in mh folder format (@code{gnus-summary-save-article-folder}). @item O v -@kindex O v (Summary) +@kindex O v @r{(Summary)} @findex gnus-summary-save-article-vm Save the current article in a VM folder (@code{gnus-summary-save-article-vm}). @item O p @itemx | -@kindex O p (Summary) -@kindex | (Summary) +@kindex O p @r{(Summary)} +@kindex | @r{(Summary)} @findex gnus-summary-pipe-output @vindex gnus-summary-pipe-output-default-command Save the current article in a pipe. Uhm, like, what I mean is---Pipe @@ -7845,7 +7839,7 @@ to a string containing the default command and options (default @code{nil}). @item O P -@kindex O P (Summary) +@kindex O P @r{(Summary)} @findex gnus-summary-muttprint @vindex gnus-summary-muttprint-program Save the current article into muttprint. That is, print it using the @@ -8152,24 +8146,24 @@ commands, and you have to mark the articles manually with @kbd{#}. @table @kbd @item X u -@kindex X u (Summary) +@kindex X u @r{(Summary)} @findex gnus-uu-decode-uu @c @icon{gnus-uu-decode-uu} Uudecodes the current series (@code{gnus-uu-decode-uu}). @item X U -@kindex X U (Summary) +@kindex X U @r{(Summary)} @findex gnus-uu-decode-uu-and-save Uudecodes and saves the current series (@code{gnus-uu-decode-uu-and-save}). @item X v u -@kindex X v u (Summary) +@kindex X v u @r{(Summary)} @findex gnus-uu-decode-uu-view Uudecodes and views the current series (@code{gnus-uu-decode-uu-view}). @item X v U -@kindex X v U (Summary) +@kindex X v U @r{(Summary)} @findex gnus-uu-decode-uu-and-save-view Uudecodes, views and saves the current series (@code{gnus-uu-decode-uu-and-save-view}). @@ -8210,22 +8204,22 @@ some commands to deal with these: @table @kbd @item X s -@kindex X s (Summary) +@kindex X s @r{(Summary)} @findex gnus-uu-decode-unshar Unshars the current series (@code{gnus-uu-decode-unshar}). @item X S -@kindex X S (Summary) +@kindex X S @r{(Summary)} @findex gnus-uu-decode-unshar-and-save Unshars and saves the current series (@code{gnus-uu-decode-unshar-and-save}). @item X v s -@kindex X v s (Summary) +@kindex X v s @r{(Summary)} @findex gnus-uu-decode-unshar-view Unshars and views the current series (@code{gnus-uu-decode-unshar-view}). @item X v S -@kindex X v S (Summary) +@kindex X v S @r{(Summary)} @findex gnus-uu-decode-unshar-and-save-view Unshars, views and saves the current series (@code{gnus-uu-decode-unshar-and-save-view}). @@ -8239,24 +8233,24 @@ Unshars, views and saves the current series @table @kbd @item X p -@kindex X p (Summary) +@kindex X p @r{(Summary)} @findex gnus-uu-decode-postscript Unpack the current PostScript series (@code{gnus-uu-decode-postscript}). @item X P -@kindex X P (Summary) +@kindex X P @r{(Summary)} @findex gnus-uu-decode-postscript-and-save Unpack and save the current PostScript series (@code{gnus-uu-decode-postscript-and-save}). @item X v p -@kindex X v p (Summary) +@kindex X v p @r{(Summary)} @findex gnus-uu-decode-postscript-view View the current PostScript series (@code{gnus-uu-decode-postscript-view}). @item X v P -@kindex X v P (Summary) +@kindex X v P @r{(Summary)} @findex gnus-uu-decode-postscript-and-save-view View and save the current PostScript series (@code{gnus-uu-decode-postscript-and-save-view}). @@ -8268,19 +8262,19 @@ View and save the current PostScript series @table @kbd @item X o -@kindex X o (Summary) +@kindex X o @r{(Summary)} @findex gnus-uu-decode-save Save the current series (@code{gnus-uu-decode-save}). @item X b -@kindex X b (Summary) +@kindex X b @r{(Summary)} @findex gnus-uu-decode-binhex Unbinhex the current series (@code{gnus-uu-decode-binhex}). This doesn't really work yet. @item X Y -@kindex X Y (Summary) +@kindex X Y @r{(Summary)} @findex gnus-uu-decode-yenc yEnc-decode the current series and save it (@code{gnus-uu-decode-yenc}). @end table @@ -8554,7 +8548,7 @@ you want it to look like technicolor fruit salad. @table @kbd @item W H a -@kindex W H a (Summary) +@kindex W H a @r{(Summary)} @findex gnus-article-highlight @findex gnus-article-maybe-highlight Do much highlighting of the current article @@ -8562,7 +8556,7 @@ Do much highlighting of the current article text, the signature, and adds buttons to the body and the head. @item W H h -@kindex W H h (Summary) +@kindex W H h @r{(Summary)} @findex gnus-article-highlight-headers @vindex gnus-header-face-alist Highlight the headers (@code{gnus-article-highlight-headers}). The @@ -8576,7 +8570,7 @@ the header value. The first match made will be used. Note that @var{regexp} shouldn't have @samp{^} prepended---Gnus will add one. @item W H c -@kindex W H c (Summary) +@kindex W H c @r{(Summary)} @findex gnus-article-highlight-citation Highlight cited text (@code{gnus-article-highlight-citation}). @@ -8637,7 +8631,7 @@ is @code{t}. @item W H s -@kindex W H s (Summary) +@kindex W H s @r{(Summary)} @vindex gnus-signature-separator @vindex gnus-signature-face @findex gnus-article-highlight-signature @@ -8658,7 +8652,7 @@ default. @cindex article emphasis @findex gnus-article-emphasize -@kindex W e (Summary) +@kindex W e @r{(Summary)} People commonly add emphasis to words in news articles by writing things like @samp{_this_} or @samp{*this*} or @samp{/this/}. Gnus can make this look nicer by running the article through the @kbd{W e} @@ -8729,32 +8723,32 @@ too much cruft in most articles. @table @kbd @item W W a -@kindex W W a (Summary) +@kindex W W a @r{(Summary)} @findex gnus-article-hide Do quite a lot of hiding on the article buffer (@kbd{gnus-article-hide}). In particular, this function will hide headers, @acronym{PGP}, cited text and the signature. @item W W h -@kindex W W h (Summary) +@kindex W W h @r{(Summary)} @findex gnus-article-hide-headers Hide headers (@code{gnus-article-hide-headers}). @xref{Hiding Headers}. @item W W b -@kindex W W b (Summary) +@kindex W W b @r{(Summary)} @findex gnus-article-hide-boring-headers Hide headers that aren't particularly interesting (@code{gnus-article-hide-boring-headers}). @xref{Hiding Headers}. @item W W s -@kindex W W s (Summary) +@kindex W W s @r{(Summary)} @findex gnus-article-hide-signature Hide signature (@code{gnus-article-hide-signature}). @xref{Article Signature}. @item W W l -@kindex W W l (Summary) +@kindex W W l @r{(Summary)} @findex gnus-article-hide-list-identifiers @vindex gnus-list-identifiers Strip list identifiers specified in @code{gnus-list-identifiers}. These @@ -8773,13 +8767,13 @@ subject. This can also be a list of regular expressions. @end table @item W W P -@kindex W W P (Summary) +@kindex W W P @r{(Summary)} @findex gnus-article-hide-pem Hide @acronym{PEM} (privacy enhanced messages) cruft (@code{gnus-article-hide-pem}). @item W W B -@kindex W W B (Summary) +@kindex W W B @r{(Summary)} @findex gnus-article-strip-banner @vindex gnus-article-banner-alist @vindex gnus-article-address-banner-alist @@ -8833,7 +8827,7 @@ sends, you can use the following element to remove them: @end table @item W W c -@kindex W W c (Summary) +@kindex W W c @r{(Summary)} @findex gnus-article-hide-citation Hide citation (@code{gnus-article-hide-citation}). Some variables for customizing the hiding: @@ -8869,7 +8863,7 @@ and bottom of the text, respectively, to remain visible. @end table @item W W C-c -@kindex W W C-c (Summary) +@kindex W W C-c @r{(Summary)} @findex gnus-article-hide-citation-maybe Hide citation (@code{gnus-article-hide-citation-maybe}) depending on the @@ -8888,7 +8882,7 @@ is hidden. @end table @item W W C -@kindex W W C (Summary) +@kindex W W C @r{(Summary)} @findex gnus-article-hide-citation-in-followups Hide cited text in articles that aren't roots (@code{gnus-article-hide-citation-in-followups}). This isn't very @@ -8938,14 +8932,14 @@ interactive Washing functions but with all default treatments (@pxref{Customizing Articles}). @item W l -@kindex W l (Summary) +@kindex W l @r{(Summary)} @findex gnus-summary-stop-page-breaking Remove page breaks from the current article (@code{gnus-summary-stop-page-breaking}). @xref{Misc Article}, for page delimiters. @item W r -@kindex W r (Summary) +@kindex W r @r{(Summary)} @findex gnus-summary-caesar-message @c @icon{gnus-summary-caesar-message} Do a Caesar rotate (rot13) on the article buffer @@ -8959,12 +8953,12 @@ positions in the alphabet, e.g., @samp{B} (letter #2) -> @samp{O} (letter is rumored to have employed this form of, uh, somewhat weak encryption. @item W m -@kindex W m (Summary) +@kindex W m @r{(Summary)} @findex gnus-summary-morse-message Morse decode the article buffer (@code{gnus-summary-morse-message}). @item W i -@kindex W i (Summary) +@kindex W i @r{(Summary)} @findex gnus-summary-idna-message Decode IDNA encoded domain names in the current articles. IDNA encoded domain names looks like @samp{xn--bar}. If a string remain @@ -8975,25 +8969,25 @@ to work. @item W t @item t -@kindex W t (Summary) -@kindex t (Summary) +@kindex W t @r{(Summary)} +@kindex t @r{(Summary)} @findex gnus-summary-toggle-header Toggle whether to display all headers in the article buffer (@code{gnus-summary-toggle-header}). @item W v -@kindex W v (Summary) +@kindex W v @r{(Summary)} @findex gnus-summary-verbose-headers Toggle whether to display all headers in the article buffer permanently (@code{gnus-summary-verbose-headers}). @item W o -@kindex W o (Summary) +@kindex W o @r{(Summary)} @findex gnus-article-treat-overstrike Treat overstrike (@code{gnus-article-treat-overstrike}). @item W d -@kindex W d (Summary) +@kindex W d @r{(Summary)} @findex gnus-article-treat-dumbquotes @vindex gnus-article-dumbquotes-map @cindex Smartquotes @@ -9011,7 +9005,7 @@ like @code{\222} or @code{\264} where you're expecting some kind of apostrophe or quotation mark, then try this wash. @item W U -@kindex W U (Summary) +@kindex W U @r{(Summary)} @findex gnus-article-treat-non-ascii @cindex Unicode @cindex Non-@acronym{ASCII} @@ -9022,7 +9016,7 @@ and doesn't show accented characters, ``advanced'' punctuation, and the like. For instance, @samp{»} is translated into @samp{>>}, and so on. @item W Y f -@kindex W Y f (Summary) +@kindex W Y f @r{(Summary)} @findex gnus-article-outlook-deuglify-article @cindex Outlook Express Full deuglify of broken Outlook (Express) articles: Treat dumbquotes, @@ -9030,7 +9024,7 @@ unwrap lines, repair attribution and rearrange citation. (@code{gnus-article-outlook-deuglify-article}). @item W Y u -@kindex W Y u (Summary) +@kindex W Y u @r{(Summary)} @findex gnus-article-outlook-unwrap-lines @vindex gnus-outlook-deuglify-unwrap-min @vindex gnus-outlook-deuglify-unwrap-max @@ -9042,19 +9036,19 @@ maximum length of an unwrapped citation line. (@code{gnus-article-outlook-unwrap-lines}). @item W Y a -@kindex W Y a (Summary) +@kindex W Y a @r{(Summary)} @findex gnus-article-outlook-repair-attribution Repair a broken attribution line.@* (@code{gnus-article-outlook-repair-attribution}). @item W Y c -@kindex W Y c (Summary) +@kindex W Y c @r{(Summary)} @findex gnus-article-outlook-rearrange-citation Repair broken citations by rearranging the text. (@code{gnus-article-outlook-rearrange-citation}). @item W w -@kindex W w (Summary) +@kindex W w @r{(Summary)} @findex gnus-article-fill-cited-article Do word wrap (@code{gnus-article-fill-cited-article}). @@ -9062,18 +9056,18 @@ You can give the command a numerical prefix to specify the width to use when filling. @item W Q -@kindex W Q (Summary) +@kindex W Q @r{(Summary)} @findex gnus-article-fill-long-lines Fill long lines (@code{gnus-article-fill-long-lines}). @item W C -@kindex W C (Summary) +@kindex W C @r{(Summary)} @findex gnus-article-capitalize-sentences Capitalize the first word in each sentence (@code{gnus-article-capitalize-sentences}). @item W c -@kindex W c (Summary) +@kindex W c @r{(Summary)} @findex gnus-article-remove-cr Translate CRLF pairs (i.e., @samp{^M}s on the end of the lines) into LF (this takes care of DOS line endings), and then translate any remaining @@ -9081,7 +9075,7 @@ CRs into LF (this takes care of Mac line endings) (@code{gnus-article-remove-cr}). @item W q -@kindex W q (Summary) +@kindex W q @r{(Summary)} @findex gnus-article-de-quoted-unreadable Treat quoted-printable (@code{gnus-article-de-quoted-unreadable}). Quoted-Printable is one common @acronym{MIME} encoding employed when @@ -9093,7 +9087,7 @@ done automatically by Gnus if the message in question has a has been done. If a prefix is given, a charset will be asked for. @item W 6 -@kindex W 6 (Summary) +@kindex W 6 @r{(Summary)} @findex gnus-article-de-base64-unreadable Treat base64 (@code{gnus-article-de-base64-unreadable}). Base64 is one common @acronym{MIME} encoding employed when sending @@ -9103,14 +9097,14 @@ usually done automatically by Gnus if the message in question has a has been done. If a prefix is given, a charset will be asked for. @item W Z -@kindex W Z (Summary) +@kindex W Z @r{(Summary)} @findex gnus-article-decode-HZ Treat HZ or HZP (@code{gnus-article-decode-HZ}). HZ (or HZP) is one common encoding employed when sending Chinese articles. It typically makes strings look like @samp{~@{<:Ky2;S@{#,NpJ)l6HK!#~@}}. @item W A -@kindex W A (Summary) +@kindex W A @r{(Summary)} @findex gnus-article-treat-ansi-sequences @cindex @acronym{ANSI} control sequences Translate @acronym{ANSI} SGR control sequences into overlays or @@ -9118,7 +9112,7 @@ extents (@code{gnus-article-treat-ansi-sequences}). @acronym{ANSI} sequences are used in some Chinese hierarchies for highlighting. @item W u -@kindex W u (Summary) +@kindex W u @r{(Summary)} @findex gnus-article-unsplit-urls Remove newlines from within URLs. Some mailers insert newlines into outgoing email messages to keep lines short. This reformatting can @@ -9126,7 +9120,7 @@ split long URLs onto multiple lines. Repair those URLs by removing the newlines (@code{gnus-article-unsplit-urls}). @item W h -@kindex W h (Summary) +@kindex W h @r{(Summary)} @findex gnus-article-wash-html Treat @acronym{HTML} (@code{gnus-article-wash-html}). Note that this is usually done automatically by Gnus if the message in question has a @@ -9166,19 +9160,19 @@ Use html2text---a simple @acronym{HTML} converter included with Gnus. @end table @item W b -@kindex W b (Summary) +@kindex W b @r{(Summary)} @findex gnus-article-add-buttons Add clickable buttons to the article (@code{gnus-article-add-buttons}). @xref{Article Buttons}. @item W B -@kindex W B (Summary) +@kindex W B @r{(Summary)} @findex gnus-article-add-buttons-to-head Add clickable buttons to the article headers (@code{gnus-article-add-buttons-to-head}). @item W p -@kindex W p (Summary) +@kindex W p @r{(Summary)} @findex gnus-article-verify-x-pgp-sig Verify a signed control message (@code{gnus-article-verify-x-pgp-sig}). Control messages such as @@ -9189,57 +9183,57 @@ message.@footnote{@acronym{PGP} keys for many hierarchies are available at @uref{https://ftp.isc.org/pub/pgpcontrol/README.html}} @item W s -@kindex W s (Summary) +@kindex W s @r{(Summary)} @findex gnus-summary-force-verify-and-decrypt Verify a signed (@acronym{PGP}, @acronym{PGP/MIME} or @acronym{S/MIME}) message (@code{gnus-summary-force-verify-and-decrypt}). @xref{Security}. @item W a -@kindex W a (Summary) +@kindex W a @r{(Summary)} @findex gnus-article-strip-headers-in-body Strip headers like the @code{X-No-Archive} header from the beginning of article bodies (@code{gnus-article-strip-headers-in-body}). @item W E l -@kindex W E l (Summary) +@kindex W E l @r{(Summary)} @findex gnus-article-strip-leading-blank-lines Remove all blank lines from the beginning of the article (@code{gnus-article-strip-leading-blank-lines}). @item W E m -@kindex W E m (Summary) +@kindex W E m @r{(Summary)} @findex gnus-article-strip-multiple-blank-lines Replace all blank lines with empty lines and then all multiple empty lines with a single empty line. (@code{gnus-article-strip-multiple-blank-lines}). @item W E t -@kindex W E t (Summary) +@kindex W E t @r{(Summary)} @findex gnus-article-remove-trailing-blank-lines Remove all blank lines at the end of the article (@code{gnus-article-remove-trailing-blank-lines}). @item W E a -@kindex W E a (Summary) +@kindex W E a @r{(Summary)} @findex gnus-article-strip-blank-lines Do all the three commands above (@code{gnus-article-strip-blank-lines}). @item W E A -@kindex W E A (Summary) +@kindex W E A @r{(Summary)} @findex gnus-article-strip-all-blank-lines Remove all blank lines (@code{gnus-article-strip-all-blank-lines}). @item W E s -@kindex W E s (Summary) +@kindex W E s @r{(Summary)} @findex gnus-article-strip-leading-space Remove all white space from the beginning of all lines of the article body (@code{gnus-article-strip-leading-space}). @item W E e -@kindex W E e (Summary) +@kindex W E e @r{(Summary)} @findex gnus-article-strip-trailing-space Remove all white space from the end of all lines of the article body (@code{gnus-article-strip-trailing-space}). @@ -9257,24 +9251,24 @@ These commands perform various transformations of article header. @table @kbd @item W G u -@kindex W G u (Summary) +@kindex W G u @r{(Summary)} @findex gnus-article-treat-unfold-headers Unfold folded header lines (@code{gnus-article-treat-unfold-headers}). @item W G n -@kindex W G n (Summary) +@kindex W G n @r{(Summary)} @findex gnus-article-treat-fold-newsgroups Fold the @code{Newsgroups} and @code{Followup-To} headers (@code{gnus-article-treat-fold-newsgroups}). @item W G f -@kindex W G f (Summary) +@kindex W G f @r{(Summary)} @findex gnus-article-treat-fold-headers Fold all the message headers (@code{gnus-article-treat-fold-headers}). @item W E w -@kindex W E w (Summary) +@kindex W E w @r{(Summary)} @findex gnus-article-remove-leading-whitespace Remove excessive whitespace from all headers (@code{gnus-article-remove-leading-whitespace}). @@ -9288,7 +9282,7 @@ Remove excessive whitespace from all headers People often include references to other stuff in articles, and it would be nice if Gnus could just fetch whatever it is that people talk about -with the minimum of fuzz when you hit @kbd{RET} or use the middle mouse +with the minimum of fuzz when you hit @kbd{@key{RET}} or use the middle mouse button on these references. @vindex gnus-button-man-handler @@ -9494,31 +9488,31 @@ when the article was sent. @table @kbd @item W T u -@kindex W T u (Summary) +@kindex W T u @r{(Summary)} @findex gnus-article-date-ut Display the date in UT (aka. GMT, aka ZULU) (@code{gnus-article-date-ut}). @item W T i -@kindex W T i (Summary) +@kindex W T i @r{(Summary)} @findex gnus-article-date-iso8601 @cindex ISO 8601 Display the date in international format, aka. ISO 8601 (@code{gnus-article-date-iso8601}). @item W T l -@kindex W T l (Summary) +@kindex W T l @r{(Summary)} @findex gnus-article-date-local Display the date in the local timezone (@code{gnus-article-date-local}). @item W T p -@kindex W T p (Summary) +@kindex W T p @r{(Summary)} @findex gnus-article-date-english Display the date in a format that's easily pronounceable in English (@code{gnus-article-date-english}). @item W T s -@kindex W T s (Summary) +@kindex W T s @r{(Summary)} @vindex gnus-article-time-format @findex gnus-article-date-user @findex format-time-string @@ -9529,7 +9523,7 @@ to @code{format-time-string}. See the documentation of that variable for a list of possible format specs. @item W T e -@kindex W T e (Summary) +@kindex W T e @r{(Summary)} @findex gnus-article-date-lapsed @findex gnus-start-date-timer @findex gnus-stop-date-timer @@ -9545,7 +9539,7 @@ To make this line updated continually, set the seconds (the default is @code{nil}). @item W T o -@kindex W T o (Summary) +@kindex W T o @r{(Summary)} @findex gnus-article-date-original Display the original date (@code{gnus-article-date-original}). This can be useful if you normally use some other conversion function and are @@ -9589,58 +9583,58 @@ they'll be removed. @table @kbd @item W D x -@kindex W D x (Summary) +@kindex W D x @r{(Summary)} @findex gnus-article-display-x-face Display an @code{X-Face} in the @code{From} header. (@code{gnus-article-display-x-face}). @item W D d -@kindex W D d (Summary) +@kindex W D d @r{(Summary)} @findex gnus-article-display-face Display a @code{Face} in the @code{From} header. (@code{gnus-article-display-face}). @item W D s -@kindex W D s (Summary) +@kindex W D s @r{(Summary)} @findex gnus-treat-smiley Display smileys (@code{gnus-treat-smiley}). @item W D f -@kindex W D f (Summary) +@kindex W D f @r{(Summary)} @findex gnus-treat-from-picon Piconify the @code{From} header (@code{gnus-treat-from-picon}). @item W D m -@kindex W D m (Summary) +@kindex W D m @r{(Summary)} @findex gnus-treat-mail-picon Piconify all mail headers (i.e., @code{Cc}, @code{To}) (@code{gnus-treat-mail-picon}). @item W D n -@kindex W D n (Summary) +@kindex W D n @r{(Summary)} @findex gnus-treat-newsgroups-picon Piconify all news headers (i.e., @code{Newsgroups} and @code{Followup-To}) (@code{gnus-treat-newsgroups-picon}). @item W D g -@kindex W D g (Summary) +@kindex W D g @r{(Summary)} @findex gnus-treat-from-gravatar Gravatarify the @code{From} header (@code{gnus-treat-from-gravatar}). @item W D h -@kindex W D h (Summary) +@kindex W D h @r{(Summary)} @findex gnus-treat-mail-gravatar Gravatarify all mail headers (i.e., @code{Cc}, @code{To}) (@code{gnus-treat-from-gravatar}). @item W D D -@kindex W D D (Summary) +@kindex W D D @r{(Summary)} @findex gnus-article-remove-images Remove all images from the article buffer (@code{gnus-article-remove-images}). @item W D W -@kindex W D W (Summary) +@kindex W D W @r{(Summary)} @findex gnus-html-show-images If you're reading an @acronym{HTML} article rendered with @code{gnus-article-html}, then you can insert any blocked images in @@ -9718,7 +9712,7 @@ signature after all. @table @kbd @item A t -@kindex A t (Summary) +@kindex A t @r{(Summary)} @findex gnus-article-babel Translate the article from one language to another (@code{gnus-article-babel}). @@ -9738,43 +9732,43 @@ instance, @kbd{3 K v} means ``view the third @acronym{MIME} part''. @table @kbd @item b @itemx K v -@kindex b (Summary) -@kindex K v (Summary) +@kindex b @r{(Summary)} +@kindex K v @r{(Summary)} View the @acronym{MIME} part. @item K o -@kindex K o (Summary) +@kindex K o @r{(Summary)} Save the @acronym{MIME} part. @item K O -@kindex K O (Summary) +@kindex K O @r{(Summary)} Prompt for a file name, then save the @acronym{MIME} part and strip it from the article. The stripped @acronym{MIME} object will be referred via the message/external-body @acronym{MIME} type. @item K r -@kindex K r (Summary) +@kindex K r @r{(Summary)} Replace the @acronym{MIME} part with an external body. @item K d -@kindex K d (Summary) +@kindex K d @r{(Summary)} Delete the @acronym{MIME} part and add some information about the removed part. @item K c -@kindex K c (Summary) +@kindex K c @r{(Summary)} Copy the @acronym{MIME} part. @item K e -@kindex K e (Summary) +@kindex K e @r{(Summary)} View the @acronym{MIME} part externally. @item K i -@kindex K i (Summary) +@kindex K i @r{(Summary)} View the @acronym{MIME} part internally. @item K | -@kindex K | (Summary) +@kindex K | @r{(Summary)} Pipe the @acronym{MIME} part to an external command. @end table @@ -9783,7 +9777,7 @@ the same manner: @table @kbd @item K H -@kindex K H (Summary) +@kindex K H @r{(Summary)} @findex gnus-article-browse-html-article View @samp{text/html} parts of the current article with a WWW browser. Inline images embedded in a message using the @code{cid} scheme, as they @@ -9805,13 +9799,13 @@ including images if any to the browser, and deletes them when exiting the group (if you want). @item K b -@kindex K b (Summary) +@kindex K b @r{(Summary)} Make all the @acronym{MIME} parts have buttons in front of them. This is mostly useful if you wish to save (or perform other actions) on inlined parts. @item W M h -@kindex W M h (Summary) +@kindex W M h @r{(Summary)} @findex gnus-mime-buttonize-attachments-in-header @vindex gnus-mime-display-attachment-buttons-in-header Display @acronym{MIME} part buttons in the end of the header of an @@ -9824,7 +9818,7 @@ The default is @code{t}. To change the appearance of buttons, customize @code{gnus-header-face-alist}. @item K m -@kindex K m (Summary) +@kindex K m @r{(Summary)} @findex gnus-summary-repair-multipart Some multipart messages are transmitted with missing or faulty headers. This command will attempt to ``repair'' these messages so that they can @@ -9832,26 +9826,26 @@ be viewed in a more pleasant manner (@code{gnus-summary-repair-multipart}). @item X m -@kindex X m (Summary) +@kindex X m @r{(Summary)} @findex gnus-summary-save-parts Save all parts matching a @acronym{MIME} type to a directory (@code{gnus-summary-save-parts}). Understands the process/prefix convention (@pxref{Process/Prefix}). @item M-t -@kindex M-t (Summary) +@kindex M-t @r{(Summary)} @findex gnus-summary-toggle-display-buttonized Toggle the buttonized display of the article buffer (@code{gnus-summary-toggle-display-buttonized}). @item W M w -@kindex W M w (Summary) +@kindex W M w @r{(Summary)} @findex gnus-article-decode-mime-words Decode RFC 2047-encoded words in the article headers (@code{gnus-article-decode-mime-words}). @item W M c -@kindex W M c (Summary) +@kindex W M c @r{(Summary)} @findex gnus-article-decode-charset Decode encoded article bodies as well as charsets (@code{gnus-article-decode-charset}). @@ -9864,7 +9858,7 @@ include @acronym{MIME} headers), you can set the @code{charset} group/topic parameter to the required charset (@pxref{Group Parameters}). @item W M v -@kindex W M v (Summary) +@kindex W M v @r{(Summary)} @findex gnus-mime-view-all-parts View all the @acronym{MIME} parts in the current article (@code{gnus-mime-view-all-parts}). @@ -10123,7 +10117,7 @@ something like @item A P @cindex PostScript @cindex printing -@kindex A P (Summary) +@kindex A P @r{(Summary)} @vindex gnus-ps-print-hook @findex gnus-summary-print-article Generate and print a PostScript image of the article buffer @@ -10154,68 +10148,68 @@ can't really see why you'd want that. @table @kbd @item C-c C-s C-n -@kindex C-c C-s C-n (Summary) +@kindex C-c C-s C-n @r{(Summary)} @findex gnus-summary-sort-by-number Sort by article number (@code{gnus-summary-sort-by-number}). @item C-c C-s C-m C-n -@kindex C-c C-s C-n (Summary) +@kindex C-c C-s C-n @r{(Summary)} @findex gnus-summary-sort-by-most-recent-number Sort by most recent article number (@code{gnus-summary-sort-by-most-recent-number}). @item C-c C-s C-a -@kindex C-c C-s C-a (Summary) +@kindex C-c C-s C-a @r{(Summary)} @findex gnus-summary-sort-by-author Sort by author (@code{gnus-summary-sort-by-author}). @item C-c C-s C-t -@kindex C-c C-s C-t (Summary) +@kindex C-c C-s C-t @r{(Summary)} @findex gnus-summary-sort-by-recipient Sort by recipient (@code{gnus-summary-sort-by-recipient}). @item C-c C-s C-s -@kindex C-c C-s C-s (Summary) +@kindex C-c C-s C-s @r{(Summary)} @findex gnus-summary-sort-by-subject Sort by subject (@code{gnus-summary-sort-by-subject}). @item C-c C-s C-d -@kindex C-c C-s C-d (Summary) +@kindex C-c C-s C-d @r{(Summary)} @findex gnus-summary-sort-by-date Sort by date (@code{gnus-summary-sort-by-date}). @item C-c C-s C-m C-d -@kindex C-c C-s C-m C-d (Summary) +@kindex C-c C-s C-m C-d @r{(Summary)} @findex gnus-summary-sort-by-most-recent-date Sort by most recent date (@code{gnus-summary-sort-by-most-recent-date}). @item C-c C-s C-l -@kindex C-c C-s C-l (Summary) +@kindex C-c C-s C-l @r{(Summary)} @findex gnus-summary-sort-by-lines Sort by lines (@code{gnus-summary-sort-by-lines}). @item C-c C-s C-c -@kindex C-c C-s C-c (Summary) +@kindex C-c C-s C-c @r{(Summary)} @findex gnus-summary-sort-by-chars Sort by article length (@code{gnus-summary-sort-by-chars}). @item C-c C-s C-m C-m -@kindex C-c C-s C-m C-m (Summary) +@kindex C-c C-s C-m C-m @r{(Summary)} @findex gnus-summary-sort-by-marks Sort by article ``readedness'' marks (@code{gnus-summary-sort-by-marks}). @item C-c C-s C-i -@kindex C-c C-s C-i (Summary) +@kindex C-c C-s C-i @r{(Summary)} @findex gnus-summary-sort-by-score Sort by score (@code{gnus-summary-sort-by-score}). @item C-c C-s C-r -@kindex C-c C-s C-r (Summary) +@kindex C-c C-s C-r @r{(Summary)} @findex gnus-summary-sort-by-random Randomize (@code{gnus-summary-sort-by-random}). @item C-c C-s C-o -@kindex C-c C-s C-o (Summary) +@kindex C-c C-s C-o @r{(Summary)} @findex gnus-summary-sort-by-original Sort using the default sorting method (@code{gnus-summary-sort-by-original}). @@ -10238,7 +10232,7 @@ If a prefix argument if given, the sort order is reversed. @table @kbd @item ^ -@kindex ^ (Summary) +@kindex ^ @r{(Summary)} @findex gnus-summary-refer-parent-article If you'd like to read the parent of the current article, and it is not displayed in the summary buffer, you might still be able to. That is, @@ -10258,13 +10252,13 @@ article. @item A R (Summary) @findex gnus-summary-refer-references -@kindex A R (Summary) +@kindex A R @r{(Summary)} Fetch all articles mentioned in the @code{References} header of the article (@code{gnus-summary-refer-references}). @item A T (Summary) @findex gnus-summary-refer-thread -@kindex A T (Summary) +@kindex A T @r{(Summary)} Display the full thread where the current article appears (@code{gnus-summary-refer-thread}). This command has to fetch all the headers in the current group to work, so it usually takes a while. If @@ -10282,7 +10276,7 @@ by giving the @kbd{A T} command a numerical prefix. @item M-^ (Summary) @findex gnus-summary-refer-article -@kindex M-^ (Summary) +@kindex M-^ @r{(Summary)} @cindex Message-ID @cindex fetching by Message-ID You can also ask Gnus for an arbitrary article, no matter what group it @@ -10352,7 +10346,6 @@ buffer the articles she wants to read. Then she starts reading the articles with just an article buffer displayed. @findex gnus-pick-mode -@kindex M-x gnus-pick-mode Gnus provides a summary buffer minor mode that allows this---@code{gnus-pick-mode}. This basically means that a few process mark commands become one-keystroke commands to allow easy marking, and @@ -10362,7 +10355,7 @@ Here are the available keystrokes when using pick mode: @table @kbd @item . -@kindex . (Pick) +@kindex . @r{(Pick)} @findex gnus-pick-article-or-thread Pick the article or thread on the current line (@code{gnus-pick-article-or-thread}). If the variable @@ -10372,14 +10365,14 @@ it selects just the article. If given a numerical prefix, go to that thread or article and pick it. (The line number is normally displayed at the beginning of the summary pick lines.) -@item SPACE -@kindex SPACE (Pick) +@item @key{SPC} +@kindex @key{SPC} @r{(Pick)} @findex gnus-pick-next-page Scroll the summary buffer up one page (@code{gnus-pick-next-page}). If at the end of the buffer, start reading the picked articles. @item u -@kindex u (Pick) +@kindex u @r{(Pick)} @findex gnus-pick-unmark-article-or-thread. Unpick the thread or article (@code{gnus-pick-unmark-article-or-thread}). If the variable @@ -10388,8 +10381,8 @@ thread if used at the first article of the thread. Otherwise it unpicks just the article. You can give this key a numerical prefix to unpick the thread or article at that line. -@item RET -@kindex RET (Pick) +@item @key{RET} +@kindex @key{RET} @r{(Pick)} @findex gnus-pick-start-reading @vindex gnus-pick-display-summary Start reading the picked articles (@code{gnus-pick-start-reading}). If @@ -10431,14 +10424,13 @@ Variables}). It accepts the same format specs that @cindex binary groups @findex gnus-binary-mode -@kindex M-x gnus-binary-mode If you spend much time in binary groups, you may grow tired of hitting -@kbd{X u}, @kbd{n}, @kbd{RET} all the time. @kbd{M-x gnus-binary-mode} +@kbd{X u}, @kbd{n}, @kbd{@key{RET}} all the time. @kbd{M-x gnus-binary-mode} is a minor mode for summary buffers that makes all ordinary Gnus article selection functions uudecode series of articles and display the result instead of just displaying the articles the normal way. -@kindex g (Binary) +@kindex g @r{(Binary)} @findex gnus-binary-show-article The only way, in fact, to see the actual articles is the @kbd{g} command, when you have turned on this mode @@ -10614,7 +10606,7 @@ process/prefix convention (@pxref{Process/Prefix}). @table @kbd @item B e -@kindex B e (Summary) +@kindex B e @r{(Summary)} @findex gnus-summary-expire-articles @cindex expiring mail Run all expirable articles in the current group through the expiry @@ -10623,7 +10615,7 @@ expirable articles in the group that have been around for a while. (@pxref{Expiring Mail}). @item B C-M-e -@kindex B C-M-e (Summary) +@kindex B C-M-e @r{(Summary)} @findex gnus-summary-expire-articles-now @cindex expiring mail Delete all the expirable articles in the group @@ -10631,8 +10623,8 @@ Delete all the expirable articles in the group articles eligible for expiry in the current group will disappear forever into that big @file{/dev/null} in the sky. -@item B DEL -@kindex B DEL (Summary) +@item B @key{DEL} +@kindex B @key{DEL} @r{(Summary)} @cindex deleting mail @findex gnus-summary-delete-article @c @icon{gnus-summary-mail-delete} @@ -10641,7 +10633,7 @@ disk forever and ever, never to return again.'' Use with caution. (@code{gnus-summary-delete-article}). @item B m -@kindex B m (Summary) +@kindex B m @r{(Summary)} @cindex move mail @findex gnus-summary-move-article @vindex gnus-preserve-marks @@ -10650,7 +10642,7 @@ Move the article from one mail group to another @code{gnus-preserve-marks} is non-@code{nil} (which is the default). @item B c -@kindex B c (Summary) +@kindex B c @r{(Summary)} @cindex copy mail @findex gnus-summary-copy-article @c @icon{gnus-summary-mail-copy} @@ -10659,7 +10651,7 @@ Copy the article from one group (mail group or not) to a mail group @code{gnus-preserve-marks} is non-@code{nil} (which is the default). @item B B -@kindex B B (Summary) +@kindex B B @r{(Summary)} @cindex crosspost mail @findex gnus-summary-crosspost-article Crosspost the current article to some other group @@ -10668,21 +10660,21 @@ the article in the other group, and the Xref headers of the article will be properly updated. @item B i -@kindex B i (Summary) +@kindex B i @r{(Summary)} @findex gnus-summary-import-article Import an arbitrary file into the current mail newsgroup (@code{gnus-summary-import-article}). You will be prompted for a file name, a @code{From} header and a @code{Subject} header. @item B I -@kindex B I (Summary) +@kindex B I @r{(Summary)} @findex gnus-summary-create-article Create an empty article in the current mail newsgroups (@code{gnus-summary-create-article}). You will be prompted for a @code{From} header and a @code{Subject} header. @item B r -@kindex B r (Summary) +@kindex B r @r{(Summary)} @findex gnus-summary-respool-article @vindex gnus-summary-respool-default-method Respool the mail article (@code{gnus-summary-respool-article}). @@ -10694,10 +10686,10 @@ Marks will be preserved if @code{gnus-preserve-marks} is non-@code{nil} @item B w @itemx e -@kindex B w (Summary) -@kindex e (Summary) +@kindex B w @r{(Summary)} +@kindex e @r{(Summary)} @findex gnus-summary-edit-article -@kindex C-c C-c (Article) +@kindex C-c C-c @r{(Article)} @findex gnus-summary-edit-article-done Edit the current article (@code{gnus-summary-edit-article}). To finish editing and make the changes permanent, type @kbd{C-c C-c} @@ -10705,20 +10697,20 @@ editing and make the changes permanent, type @kbd{C-c C-c} @kbd{C-c C-c} command, Gnus won't re-highlight the article. @item B q -@kindex B q (Summary) +@kindex B q @r{(Summary)} @findex gnus-summary-respool-query If you want to re-spool an article, you might be curious as to what group the article will end up in before you do the re-spooling. This command will tell you (@code{gnus-summary-respool-query}). @item B t -@kindex B t (Summary) +@kindex B t @r{(Summary)} @findex gnus-summary-respool-trace Similarly, this command will display all fancy splitting patterns used when respooling, if any (@code{gnus-summary-respool-trace}). @item B p -@kindex B p (Summary) +@kindex B p @r{(Summary)} @findex gnus-summary-article-posted-p Some people have a tendency to send you ``courtesy'' copies when they follow up to articles you have posted. These usually have a @@ -10732,7 +10724,7 @@ propagation is much faster than news propagation, and the news copy may just not have arrived yet. @item K E -@kindex K E (Summary) +@kindex K E @r{(Summary)} @findex gnus-article-encrypt-body @vindex gnus-article-encrypt-protocol Encrypt the body of an article (@code{gnus-article-encrypt-body}). @@ -10867,20 +10859,20 @@ Also @pxref{Group Parameters}. @table @kbd @item H d -@kindex H d (Summary) +@kindex H d @r{(Summary)} @findex gnus-summary-describe-group Give a brief description of the current group (@code{gnus-summary-describe-group}). If given a prefix, force rereading the description from the server. @item H h -@kindex H h (Summary) +@kindex H h @r{(Summary)} @findex gnus-summary-describe-briefly Give an extremely brief description of the most important summary keystrokes (@code{gnus-summary-describe-briefly}). @item H i -@kindex H i (Summary) +@kindex H i @r{(Summary)} @findex gnus-info-find-node Go to the Gnus info node (@code{gnus-info-find-node}). @end table @@ -10892,31 +10884,31 @@ Go to the Gnus info node (@code{gnus-info-find-node}). @table @kbd @item M-s -@kindex M-s (Summary) +@kindex M-s @r{(Summary)} @findex gnus-summary-search-article-forward Search through all subsequent (raw) articles for a regexp (@code{gnus-summary-search-article-forward}). @item M-r -@kindex M-r (Summary) +@kindex M-r @r{(Summary)} @findex gnus-summary-search-article-backward Search through all previous (raw) articles for a regexp (@code{gnus-summary-search-article-backward}). @item M-S -@kindex M-S (Summary) +@kindex M-S @r{(Summary)} @findex gnus-summary-repeat-search-article-forward Repeat the previous search forwards (@code{gnus-summary-repeat-search-article-forward}). @item M-R -@kindex M-R (Summary) +@kindex M-R @r{(Summary)} @findex gnus-summary-repeat-search-article-backward Repeat the previous search backwards (@code{gnus-summary-repeat-search-article-backward}). @item & -@kindex & (Summary) +@kindex & @r{(Summary)} @findex gnus-summary-execute-command This command will prompt you for a header, a regular expression to match on this field, and a command to be executed if the match is made @@ -10924,11 +10916,12 @@ on this field, and a command to be executed if the match is made string, the match is done on the entire article. If given a prefix, search backward instead. -For instance, @kbd{& RET some.*string RET #} will put the process mark on -all articles that have heads or bodies that match @samp{some.*string}. +For instance, @kbd{& @key{RET} some.*string @key{RET} #} will put the +process mark on all articles that have heads or bodies that match +@samp{some.*string}. @item M-& -@kindex M-& (Summary) +@kindex M-& @r{(Summary)} @findex gnus-summary-universal-argument Perform any operation on all articles that have been marked with the process mark (@code{gnus-summary-universal-argument}). @@ -10940,24 +10933,24 @@ the process mark (@code{gnus-summary-universal-argument}). @table @kbd @item Y g -@kindex Y g (Summary) +@kindex Y g @r{(Summary)} @findex gnus-summary-prepare Regenerate the current summary buffer (@code{gnus-summary-prepare}). @item Y c -@kindex Y c (Summary) +@kindex Y c @r{(Summary)} @findex gnus-summary-insert-cached-articles Pull all cached articles (for the current group) into the summary buffer (@code{gnus-summary-insert-cached-articles}). @item Y d -@kindex Y d (Summary) +@kindex Y d @r{(Summary)} @findex gnus-summary-insert-dormant-articles Pull all dormant articles (for the current group) into the summary buffer (@code{gnus-summary-insert-dormant-articles}). @item Y t -@kindex Y t (Summary) +@kindex Y t @r{(Summary)} @findex gnus-summary-insert-ticked-articles Pull all ticked articles (for the current group) into the summary buffer (@code{gnus-summary-insert-ticked-articles}). @@ -10972,8 +10965,8 @@ Pull all ticked articles (for the current group) into the summary buffer @item A D @itemx C-d -@kindex C-d (Summary) -@kindex A D (Summary) +@kindex C-d @r{(Summary)} +@kindex A D @r{(Summary)} @findex gnus-summary-enter-digest-group If the current article is a collection of other articles (for instance, a digest), you might use this command to enter a group based on that @@ -11007,7 +11000,7 @@ If it has any other value or there is no next (unread) article, the article selected before entering to the digest group will appear. @item C-M-d -@kindex C-M-d (Summary) +@kindex C-M-d @r{(Summary)} @findex gnus-summary-read-document This command is very similar to the one above, but lets you gather several documents into one biiig group @@ -11018,7 +11011,7 @@ command understands the process/prefix convention (@pxref{Process/Prefix}). @item C-t -@kindex C-t (Summary) +@kindex C-t @r{(Summary)} @findex gnus-summary-toggle-truncation Toggle truncation of summary lines (@code{gnus-summary-toggle-truncation}). This will probably confuse the @@ -11026,19 +11019,19 @@ line centering function in the summary buffer, so it's not a good idea to have truncation switched off while reading articles. @item = -@kindex = (Summary) +@kindex = @r{(Summary)} @findex gnus-summary-expand-window Expand the summary buffer window (@code{gnus-summary-expand-window}). If given a prefix, force an @code{article} window configuration. @item C-M-e -@kindex C-M-e (Summary) +@kindex C-M-e @r{(Summary)} @findex gnus-summary-edit-parameters Edit the group parameters (@pxref{Group Parameters}) of the current group (@code{gnus-summary-edit-parameters}). @item C-M-a -@kindex C-M-a (Summary) +@kindex C-M-a @r{(Summary)} @findex gnus-summary-customize-parameters Customize the group parameters (@pxref{Group Parameters}) of the current group (@code{gnus-summary-customize-parameters}). @@ -11059,9 +11052,9 @@ group and return you to the group buffer. @item Z Z @itemx Z Q @itemx q -@kindex Z Z (Summary) -@kindex Z Q (Summary) -@kindex q (Summary) +@kindex Z Z @r{(Summary)} +@kindex Z Q @r{(Summary)} +@kindex q @r{(Summary)} @findex gnus-summary-exit @vindex gnus-summary-exit-hook @vindex gnus-summary-prepare-exit-hook @@ -11077,43 +11070,43 @@ group mode having no more (unread) groups. @item Z E @itemx Q -@kindex Z E (Summary) -@kindex Q (Summary) +@kindex Z E @r{(Summary)} +@kindex Q @r{(Summary)} @findex gnus-summary-exit-no-update Exit the current group without updating any information on the group (@code{gnus-summary-exit-no-update}). @item Z c @itemx c -@kindex Z c (Summary) -@kindex c (Summary) +@kindex Z c @r{(Summary)} +@kindex c @r{(Summary)} @findex gnus-summary-catchup-and-exit @c @icon{gnus-summary-catchup-and-exit} Mark all unticked articles in the group as read and then exit (@code{gnus-summary-catchup-and-exit}). @item Z C -@kindex Z C (Summary) +@kindex Z C @r{(Summary)} @findex gnus-summary-catchup-all-and-exit Mark all articles, even the ticked ones, as read and then exit (@code{gnus-summary-catchup-all-and-exit}). @item Z n -@kindex Z n (Summary) +@kindex Z n @r{(Summary)} @findex gnus-summary-catchup-and-goto-next-group Mark all articles as read and go to the next group (@code{gnus-summary-catchup-and-goto-next-group}). @item Z p -@kindex Z p (Summary) +@kindex Z p @r{(Summary)} @findex gnus-summary-catchup-and-goto-prev-group Mark all articles as read and go to the previous group (@code{gnus-summary-catchup-and-goto-prev-group}). @item Z R @itemx C-x C-s -@kindex Z R (Summary) -@kindex C-x C-s (Summary) +@kindex Z R @r{(Summary)} +@kindex C-x C-s @r{(Summary)} @findex gnus-summary-reselect-current-group Exit this group, and then enter it again (@code{gnus-summary-reselect-current-group}). If given a prefix, select @@ -11121,8 +11114,8 @@ all articles, both read and unread. @item Z G @itemx M-g -@kindex Z G (Summary) -@kindex M-g (Summary) +@kindex Z G @r{(Summary)} +@kindex M-g @r{(Summary)} @findex gnus-summary-rescan-group @c @icon{gnus-summary-mail-get} Exit the group, check for new articles in the group, and select the @@ -11130,19 +11123,19 @@ group (@code{gnus-summary-rescan-group}). If given a prefix, select all articles, both read and unread. @item Z N -@kindex Z N (Summary) +@kindex Z N @r{(Summary)} @findex gnus-summary-next-group Exit the group and go to the next group (@code{gnus-summary-next-group}). @item Z P -@kindex Z P (Summary) +@kindex Z P @r{(Summary)} @findex gnus-summary-prev-group Exit the group and go to the previous group (@code{gnus-summary-prev-group}). @item Z s -@kindex Z s (Summary) +@kindex Z s @r{(Summary)} @findex gnus-summary-save-newsrc Save the current number of read/marked articles in the dribble buffer and then save the dribble buffer (@code{gnus-summary-save-newsrc}). If @@ -11413,7 +11406,7 @@ encrypted messages up can be found in the message manual @cindex mailing list @cindex RFC 2396 -@kindex A M (summary) +@kindex A M @r{(Summary)} @findex gnus-mailing-list-insinuate Gnus understands some mailing list fields of RFC 2369. To enable it, add a @code{to-list} group parameter (@pxref{Group Parameters}), @@ -11425,33 +11418,33 @@ That enables the following commands to the summary buffer: @table @kbd @item C-c C-n h -@kindex C-c C-n h (Summary) +@kindex C-c C-n h @r{(Summary)} @findex gnus-mailing-list-help Send a message to fetch mailing list help, if List-Help field exists. @item C-c C-n s -@kindex C-c C-n s (Summary) +@kindex C-c C-n s @r{(Summary)} @findex gnus-mailing-list-subscribe Send a message to subscribe the mailing list, if List-Subscribe field exists. @item C-c C-n u -@kindex C-c C-n u (Summary) +@kindex C-c C-n u @r{(Summary)} @findex gnus-mailing-list-unsubscribe Send a message to unsubscribe the mailing list, if List-Unsubscribe field exists. @item C-c C-n p -@kindex C-c C-n p (Summary) +@kindex C-c C-n p @r{(Summary)} @findex gnus-mailing-list-post Post to the mailing list, if List-Post field exists. @item C-c C-n o -@kindex C-c C-n o (Summary) +@kindex C-c C-n o @r{(Summary)} @findex gnus-mailing-list-owner Send a message to the mailing list owner, if List-Owner field exists. @item C-c C-n a -@kindex C-c C-n a (Summary) +@kindex C-c C-n a @r{(Summary)} @findex gnus-mailing-list-archive Browse the mailing list archive, if List-Archive field exists. @@ -11629,9 +11622,9 @@ The following commands are available when you have placed point over a @table @kbd @findex gnus-article-press-button -@item RET (Article) -@kindex RET (Article) -@itemx BUTTON-2 (Article) +@item @key{RET} (Article) +@kindex @key{RET} @r{(Article)} +@itemx @key{BUTTON-2} (Article) Toggle displaying of the @acronym{MIME} object (@code{gnus-article-press-button}). If built-in viewers can not display the object, Gnus resorts to external viewers in the @file{mailcap} @@ -11639,33 +11632,33 @@ files. If a viewer has the @samp{copiousoutput} specification, the object is displayed inline. @findex gnus-mime-view-part -@item M-RET (Article) -@kindex M-RET (Article) +@item M-@key{RET} (Article) +@kindex M-@key{RET} @r{(Article)} @itemx v (Article) Prompt for a method, and then view the @acronym{MIME} object using this method (@code{gnus-mime-view-part}). @findex gnus-mime-view-part-as-type @item t (Article) -@kindex t (Article) +@kindex t @r{(Article)} View the @acronym{MIME} object as if it were a different @acronym{MIME} media type (@code{gnus-mime-view-part-as-type}). @findex gnus-mime-view-part-as-charset @item C (Article) -@kindex C (Article) +@kindex C @r{(Article)} Prompt for a charset, and then view the @acronym{MIME} object using this charset (@code{gnus-mime-view-part-as-charset}). @findex gnus-mime-save-part @item o (Article) -@kindex o (Article) +@kindex o @r{(Article)} Prompt for a file name, and then save the @acronym{MIME} object (@code{gnus-mime-save-part}). @findex gnus-mime-save-part-and-strip @item C-o (Article) -@kindex C-o (Article) +@kindex C-o @r{(Article)} Prompt for a file name, then save the @acronym{MIME} object and strip it from the article. Then proceed to article editing, where a reasonable suggestion is being made on how the altered article should look @@ -11675,14 +11668,14 @@ message/external-body @acronym{MIME} type. @findex gnus-mime-replace-part @item r (Article) -@kindex r (Article) +@kindex r @r{(Article)} Prompt for a file name, replace the @acronym{MIME} object with an external body referring to the file via the message/external-body @acronym{MIME} type. (@code{gnus-mime-replace-part}). @findex gnus-mime-delete-part @item d (Article) -@kindex d (Article) +@kindex d @r{(Article)} Delete the @acronym{MIME} object from the article and replace it with some information about the removed @acronym{MIME} object (@code{gnus-mime-delete-part}). @@ -11691,7 +11684,7 @@ information about the removed @acronym{MIME} object @findex gnus-mime-copy-part @item c (Article) -@kindex c (Article) +@kindex c @r{(Article)} Copy the @acronym{MIME} object to a fresh buffer and display this buffer (@code{gnus-mime-copy-part}). If given a prefix, copy the raw contents without decoding. If given a numerical prefix, you can do semi-manual @@ -11703,14 +11696,14 @@ Accessing Compressed Files, emacs, The Emacs Editor}). @findex gnus-mime-print-part @item p (Article) -@kindex p (Article) +@kindex p @r{(Article)} Print the @acronym{MIME} object (@code{gnus-mime-print-part}). This command respects the @samp{print=} specifications in the @file{.mailcap} file. @findex gnus-mime-inline-part @item i (Article) -@kindex i (Article) +@kindex i @r{(Article)} Insert the contents of the @acronym{MIME} object into the buffer (@code{gnus-mime-inline-part}) as @samp{text/plain}. If given a prefix, insert the raw contents without decoding. If given a numerical prefix, you can @@ -11723,25 +11716,25 @@ Compressed Files, emacs, The Emacs Editor}). @findex gnus-mime-view-part-internally @item E (Article) -@kindex E (Article) +@kindex E @r{(Article)} View the @acronym{MIME} object with an internal viewer. If no internal viewer is available, use an external viewer (@code{gnus-mime-view-part-internally}). @findex gnus-mime-view-part-externally @item e (Article) -@kindex e (Article) +@kindex e @r{(Article)} View the @acronym{MIME} object with an external viewer. (@code{gnus-mime-view-part-externally}). @findex gnus-mime-pipe-part @item | (Article) -@kindex | (Article) +@kindex | @r{(Article)} Output the @acronym{MIME} object to a process (@code{gnus-mime-pipe-part}). @findex gnus-mime-action-on-part @item . (Article) -@kindex . (Article) +@kindex . @r{(Article)} Interactively run an action on the @acronym{MIME} object (@code{gnus-mime-action-on-part}). @@ -11925,7 +11918,7 @@ controlling variable is a predicate list, as described above. @ifinfo @c Avoid sort of redundant entries in the same section for the printed -@c manual, but add them in info to allow 'i gnus-treat-foo-bar RET' or +@c manual, but add them in info to allow 'i gnus-treat-foo-bar @key{RET}' or @c 'i foo-bar'. @vindex gnus-treat-buttonize @vindex gnus-treat-buttonize-head @@ -12130,7 +12123,7 @@ buffer, which means that you don't actually have to have a summary buffer displayed while reading. You can do it all from the article buffer. -@kindex v (Article) +@kindex v @r{(Article)} @cindex keys, reserved for users (Article) The key @kbd{v} is reserved for users. You can bind it to some command or better use it as a prefix key. @@ -12139,70 +12132,70 @@ A few additional keystrokes are available: @table @kbd -@item SPACE -@kindex SPACE (Article) +@item @key{SPC} +@kindex @key{SPC} @r{(Article)} @findex gnus-article-next-page Scroll forwards one page (@code{gnus-article-next-page}). -This is exactly the same as @kbd{h SPACE h}. +This is exactly the same as @kbd{h @key{SPC} h}. -@item DEL -@kindex DEL (Article) +@item @key{DEL} +@kindex @key{DEL} @r{(Article)} @findex gnus-article-prev-page Scroll backwards one page (@code{gnus-article-prev-page}). -This is exactly the same as @kbd{h DEL h}. +This is exactly the same as @kbd{h @key{DEL} h}. @item C-c ^ -@kindex C-c ^ (Article) +@kindex C-c ^ @r{(Article)} @findex gnus-article-refer-article If point is in the neighborhood of a @code{Message-ID} and you press @kbd{C-c ^}, Gnus will try to get that article from the server (@code{gnus-article-refer-article}). @item C-c C-m -@kindex C-c C-m (Article) +@kindex C-c C-m @r{(Article)} @findex gnus-article-mail Send a reply to the address near point (@code{gnus-article-mail}). If given a prefix, include the mail. @item s -@kindex s (Article) +@kindex s @r{(Article)} @findex gnus-article-show-summary Reconfigure the buffers so that the summary buffer becomes visible (@code{gnus-article-show-summary}). @item ? -@kindex ? (Article) +@kindex ? @r{(Article)} @findex gnus-article-describe-briefly Give a very brief description of the available keystrokes (@code{gnus-article-describe-briefly}). -@item TAB -@kindex TAB (Article) +@item @key{TAB} +@kindex @key{TAB} @r{(Article)} @findex gnus-article-next-button Go to the next button, if any (@code{gnus-article-next-button}). This only makes sense if you have buttonizing turned on. -@item M-TAB -@kindex M-TAB (Article) +@item M-@key{TAB} +@kindex M-@key{TAB} @r{(Article)} @findex gnus-article-prev-button Go to the previous button, if any (@code{gnus-article-prev-button}). @item R -@kindex R (Article) +@kindex R @r{(Article)} @findex gnus-article-reply-with-original Send a reply to the current article and yank the current article (@code{gnus-article-reply-with-original}). If the region is active, only yank the text in the region. @item S W -@kindex S W (Article) +@kindex S W @r{(Article)} @findex gnus-article-wide-reply-with-original Send a wide reply to the current article and yank the current article (@code{gnus-article-wide-reply-with-original}). If the region is active, only yank the text in the region. @item F -@kindex F (Article) +@kindex F @r{(Article)} @findex gnus-article-followup-with-original Send a followup to the current article and yank the current article (@code{gnus-article-followup-with-original}). If the region is active, @@ -12348,7 +12341,7 @@ when @code{mm-text-html-renderer} (@pxref{Display Customization, @cindex using s/mime @cindex using smime -@kindex C-c C-c (Post) +@kindex C-c C-c @r{(Post)} All commands for posting and mailing will put you in a message buffer where you can edit the article all you like, before you send the article by pressing @kbd{C-c C-c}. @xref{Top, , Overview, message, @@ -12946,10 +12939,10 @@ correct parameters. The content of the group is not lost. @c @findex gnus-dissociate-buffer-from-draft @c @kindex C-c M-d (Mail) -@c @kindex C-c M-d (Post) +@c @kindex C-c M-d @r{(Post)} @c @findex gnus-associate-buffer-with-draft @c @kindex C-c C-d (Mail) -@c @kindex C-c C-d (Post) +@c @kindex C-c C-d @r{(Post)} @c If you're writing some super-secret message that you later want to @c encode with PGP before sending, you may wish to turn the auto-saving @c (and association with the draft group) off. You never know who might be @@ -12964,7 +12957,7 @@ correct parameters. The content of the group is not lost. @c @code{gnus-use-draft} to @code{nil}. It is @code{t} by default. @findex gnus-draft-edit-message -@kindex D e (Draft) +@kindex D e @r{(Draft)} When you want to continue editing the article, you simply enter the draft group and push @kbd{D e} (@code{gnus-draft-edit-message}) to do that. You will be placed in a buffer where you left off. @@ -12973,9 +12966,9 @@ Rejected articles will also be put in this draft group (@pxref{Rejected Articles}). @findex gnus-draft-send-all-messages -@kindex D s (Draft) +@kindex D s @r{(Draft)} @findex gnus-draft-send-message -@kindex D S (Draft) +@kindex D S @r{(Draft)} If you have lots of rejected messages you want to post (or mail) without doing further editing, you can use the @kbd{D s} command (@code{gnus-draft-send-message}). This command understands the @@ -12984,12 +12977,12 @@ command (@code{gnus-draft-send-all-messages}) will ship off all messages in the buffer. @findex gnus-draft-toggle-sending -@kindex D t (Draft) +@kindex D t @r{(Draft)} If you have some messages that you wish not to send, you can use the @kbd{D t} (@code{gnus-draft-toggle-sending}) command to mark the message as unsendable. This is a toggling command. -Finally, if you want to delete a draft, use the normal @kbd{B DEL} +Finally, if you want to delete a draft, use the normal @kbd{B @key{DEL}} command (@pxref{Mail Group Commands}). @@ -13041,43 +13034,43 @@ signing and the @kbd{C-c C-m c} key map for encryption, as follows. @table @kbd @item C-c C-m s s -@kindex C-c C-m s s (Message) +@kindex C-c C-m s s @r{(Message)} @findex mml-secure-message-sign-smime Digitally sign current message using @acronym{S/MIME}. @item C-c C-m s o -@kindex C-c C-m s o (Message) +@kindex C-c C-m s o @r{(Message)} @findex mml-secure-message-sign-pgp Digitally sign current message using @acronym{PGP}. @item C-c C-m s p -@kindex C-c C-m s p (Message) +@kindex C-c C-m s p @r{(Message)} @findex mml-secure-message-sign-pgp Digitally sign current message using @acronym{PGP/MIME}. @item C-c C-m c s -@kindex C-c C-m c s (Message) +@kindex C-c C-m c s @r{(Message)} @findex mml-secure-message-encrypt-smime Digitally encrypt current message using @acronym{S/MIME}. @item C-c C-m c o -@kindex C-c C-m c o (Message) +@kindex C-c C-m c o @r{(Message)} @findex mml-secure-message-encrypt-pgp Digitally encrypt current message using @acronym{PGP}. @item C-c C-m c p -@kindex C-c C-m c p (Message) +@kindex C-c C-m c p @r{(Message)} @findex mml-secure-message-encrypt-pgpmime Digitally encrypt current message using @acronym{PGP/MIME}. @item C-c C-m C-n -@kindex C-c C-m C-n (Message) +@kindex C-c C-m C-n @r{(Message)} @findex mml-unsecure-message Remove security related @acronym{MML} tags from message. @@ -13219,72 +13212,72 @@ Also @pxref{Formatting Variables}. @table @kbd @item v -@kindex v (Server) +@kindex v @r{(Server)} @cindex keys, reserved for users (Server) The key @kbd{v} is reserved for users. You can bind it to some command or better use it as a prefix key. @item a -@kindex a (Server) +@kindex a @r{(Server)} @findex gnus-server-add-server Add a new server (@code{gnus-server-add-server}). @item e -@kindex e (Server) +@kindex e @r{(Server)} @findex gnus-server-edit-server Edit a server (@code{gnus-server-edit-server}). @item S -@kindex S (Server) +@kindex S @r{(Server)} @findex gnus-server-show-server Show the definition of a server (@code{gnus-server-show-server}). -@item SPACE -@kindex SPACE (Server) +@item @key{SPC} +@kindex @key{SPC} @r{(Server)} @findex gnus-server-read-server Browse the current server (@code{gnus-server-read-server}). @item q -@kindex q (Server) +@kindex q @r{(Server)} @findex gnus-server-exit Return to the group buffer (@code{gnus-server-exit}). @item k -@kindex k (Server) +@kindex k @r{(Server)} @findex gnus-server-kill-server Kill the current server (@code{gnus-server-kill-server}). @item y -@kindex y (Server) +@kindex y @r{(Server)} @findex gnus-server-yank-server Yank the previously killed server (@code{gnus-server-yank-server}). @item c -@kindex c (Server) +@kindex c @r{(Server)} @findex gnus-server-copy-server Copy the current server (@code{gnus-server-copy-server}). @item l -@kindex l (Server) +@kindex l @r{(Server)} @findex gnus-server-list-servers List all servers (@code{gnus-server-list-servers}). @item s -@kindex s (Server) +@kindex s @r{(Server)} @findex gnus-server-scan-server Request that the server scan its sources for new articles (@code{gnus-server-scan-server}). This is mainly sensible with mail servers. @item g -@kindex g (Server) +@kindex g @r{(Server)} @findex gnus-server-regenerate-server Request that the server regenerate all its data structures (@code{gnus-server-regenerate-server}). This can be useful if you have a mail back end that has gotten out of sync. @item z -@kindex z (Server) +@kindex z @r{(Server)} @findex gnus-server-compact-server Compact all groups in the server under point @@ -13416,7 +13409,7 @@ First you need to add a new server. The @kbd{a} command does that. It would probably be best to use @code{nnml} to read the cache. You could also use @code{nnspool} or @code{nnmh}, though. -Type @kbd{a nnml RET cache RET}. +Type @kbd{a nnml @key{RET} cache @key{RET}}. You should now have a brand new @code{nnml} virtual server called @samp{cache}. You now need to edit it to have the right definitions. @@ -13436,7 +13429,7 @@ Change that to: @end lisp Type @kbd{C-c C-c} to return to the server buffer. If you now press -@kbd{RET} over this virtual server, you should be entered into a browse +@kbd{@key{RET}} over this virtual server, you should be entered into a browse buffer, and you should be able to enter any of the groups displayed. @@ -13507,44 +13500,44 @@ with the following commands: @table @kbd @item O -@kindex O (Server) +@kindex O @r{(Server)} @findex gnus-server-open-server Try to establish connection to the server on the current line (@code{gnus-server-open-server}). @item C -@kindex C (Server) +@kindex C @r{(Server)} @findex gnus-server-close-server Close the connection (if any) to the server (@code{gnus-server-close-server}). @item D -@kindex D (Server) +@kindex D @r{(Server)} @findex gnus-server-deny-server Mark the current server as unreachable (@code{gnus-server-deny-server}). This will effectively disable the server. @item M-o -@kindex M-o (Server) +@kindex M-o @r{(Server)} @findex gnus-server-open-all-servers Open the connections to all servers in the buffer (@code{gnus-server-open-all-servers}). @item M-c -@kindex M-c (Server) +@kindex M-c @r{(Server)} @findex gnus-server-close-all-servers Close the connections to all servers in the buffer (@code{gnus-server-close-all-servers}). @item R -@kindex R (Server) +@kindex R @r{(Server)} @findex gnus-server-remove-denials Remove all marks to whether Gnus was denied connection from any servers (@code{gnus-server-remove-denials}). @item c -@kindex c (Server) +@kindex c @r{(Server)} @findex gnus-server-copy-server Copy a server and give it a new name (@code{gnus-server-copy-server}). This can be useful if you have a @@ -13552,7 +13545,7 @@ complex method definition, and want to use the same definition towards a different (physical) server. @item L -@kindex L (Server) +@kindex L @r{(Server)} @findex gnus-server-offline-server Set server status to offline (@code{gnus-server-offline-server}). @@ -14560,7 +14553,7 @@ see @ref{Fancy Mail Splitting}. Note that the mail back ends are free to maul the poor, innocent, incoming headers all they want to. They all add @code{Lines} headers; some add @code{X-Gnus-Group} headers; most rename the Unix mbox -@code{From} line to something else. +@code{From@key{SPC}} line to something else. @vindex nnmail-crosspost The mail back ends all support cross-posting. If several regexps match, @@ -14577,7 +14570,6 @@ links. If that's the case for you, set @code{nnmail-crosspost-link-function} to @code{copy-file}. (This variable is @code{add-name-to-file} by default.) -@kindex M-x nnmail-split-history @findex nnmail-split-history If you wish to see where the previous mail split put the messages, you can use the @kbd{M-x nnmail-split-history} command. If you wish to see @@ -15716,7 +15708,7 @@ Type @kbd{G f} and give the file name to the mbox file when prompted to create a @code{nndoc} group from the mbox file (@pxref{Foreign Groups}). @item -Type @kbd{SPACE} to enter the newly created group. +Type @kbd{@key{SPC}} to enter the newly created group. @item Type @kbd{M P b} to process-mark all articles in this group's buffer @@ -16031,7 +16023,7 @@ This can also be done non-destructively with @item nnmail-remove-tabs @findex nnmail-remove-tabs -Translate all @samp{TAB} characters into @samp{SPACE} characters. +Translate all @samp{@key{TAB}} characters into @samp{@key{SPC}} characters. @item nnmail-ignore-broken-references @findex nnmail-ignore-broken-references @@ -16708,7 +16700,6 @@ The directory where the @acronym{NOV} files should be stored. If @findex nnfolder-generate-active-file -@kindex M-x nnfolder-generate-active-file If you have lots of @code{nnfolder}-like files you'd like to read with @code{nnfolder}, you can use the @kbd{M-x nnfolder-generate-active-file} command to make @code{nnfolder} aware of all likely files in @@ -17057,14 +17048,14 @@ system because @acronym{RSS} uses UTF-8 for encoding non-@acronym{ASCII} text by default. It is also used by default for non-@acronym{ASCII} group names. -@kindex G R (Group) +@kindex G R @r{(Group)} Use @kbd{G R} from the group buffer to subscribe to a feed---you will be prompted for the location, the title and the description of the feed. The title, which allows any characters, will be used for the group name and the name of the group data file. The description can be omitted. An easy way to get started with @code{nnrss} is to say something like -the following in the group buffer: @kbd{B nnrss RET RET y}, then +the following in the group buffer: @kbd{B nnrss @key{RET} @key{RET} y}, then subscribe to groups. The @code{nnrss} back end saves the group data file in @@ -18665,51 +18656,51 @@ The following commands are available in this buffer: @table @kbd @item q -@kindex q (Category) +@kindex q @r{(Category)} @findex gnus-category-exit Return to the group buffer (@code{gnus-category-exit}). @item e -@kindex e (Category) +@kindex e @r{(Category)} @findex gnus-category-customize-category Use a customization buffer to set all of the selected category's parameters at one time (@code{gnus-category-customize-category}). @item k -@kindex k (Category) +@kindex k @r{(Category)} @findex gnus-category-kill Kill the current category (@code{gnus-category-kill}). @item c -@kindex c (Category) +@kindex c @r{(Category)} @findex gnus-category-copy Copy the current category (@code{gnus-category-copy}). @item a -@kindex a (Category) +@kindex a @r{(Category)} @findex gnus-category-add Add a new category (@code{gnus-category-add}). @item p -@kindex p (Category) +@kindex p @r{(Category)} @findex gnus-category-edit-predicate Edit the predicate of the current category (@code{gnus-category-edit-predicate}). @item g -@kindex g (Category) +@kindex g @r{(Category)} @findex gnus-category-edit-groups Edit the list of groups belonging to the current category (@code{gnus-category-edit-groups}). @item s -@kindex s (Category) +@kindex s @r{(Category)} @findex gnus-category-edit-score Edit the download score rule of the current category (@code{gnus-category-edit-score}). @item l -@kindex l (Category) +@kindex l @r{(Category)} @findex gnus-category-list List all the categories (@code{gnus-category-list}). @end table @@ -18783,7 +18774,7 @@ have to enable expiration in selected groups. @node Agent Commands @subsection Agent Commands @findex gnus-agent-toggle-plugged -@kindex J j (Agent) +@kindex J j @r{(Agent)} All the Gnus Agent commands are on the @kbd{J} submap. The @kbd{J j} (@code{gnus-agent-toggle-plugged}) command works in all modes, and @@ -18804,44 +18795,44 @@ toggles the plugged/unplugged state of the Gnus Agent. @table @kbd @item J u -@kindex J u (Agent Group) +@kindex J u @r{(Agent Group)} @findex gnus-agent-fetch-groups Fetch all eligible articles in the current group (@code{gnus-agent-fetch-groups}). @item J c -@kindex J c (Agent Group) +@kindex J c @r{(Agent Group)} @findex gnus-enter-category-buffer Enter the Agent category buffer (@code{gnus-enter-category-buffer}). @item J s -@kindex J s (Agent Group) +@kindex J s @r{(Agent Group)} @findex gnus-agent-fetch-session Fetch all eligible articles in all groups (@code{gnus-agent-fetch-session}). @item J S -@kindex J S (Agent Group) +@kindex J S @r{(Agent Group)} @findex gnus-group-send-queue Send all sendable messages in the queue group (@code{gnus-group-send-queue}). @xref{Drafts}. @item J a -@kindex J a (Agent Group) +@kindex J a @r{(Agent Group)} @findex gnus-agent-add-group Add the current group to an Agent category (@code{gnus-agent-add-group}). This command understands the process/prefix convention (@pxref{Process/Prefix}). @item J r -@kindex J r (Agent Group) +@kindex J r @r{(Agent Group)} @findex gnus-agent-remove-group Remove the current group from its category, if any (@code{gnus-agent-remove-group}). This command understands the process/prefix convention (@pxref{Process/Prefix}). @item J Y -@kindex J Y (Agent Group) +@kindex J Y @r{(Agent Group)} @findex gnus-agent-synchronize-flags Synchronize flags changed while unplugged with remote server, if any. @@ -18854,43 +18845,43 @@ Synchronize flags changed while unplugged with remote server, if any. @table @kbd @item J # -@kindex J # (Agent Summary) +@kindex J # @r{(Agent Summary)} @findex gnus-agent-mark-article Mark the article for downloading (@code{gnus-agent-mark-article}). @item J M-# -@kindex J M-# (Agent Summary) +@kindex J M-# @r{(Agent Summary)} @findex gnus-agent-unmark-article Remove the downloading mark from the article (@code{gnus-agent-unmark-article}). @cindex % @item @@ -@kindex @@ (Agent Summary) +@kindex @@ @r{(Agent Summary)} @findex gnus-agent-toggle-mark Toggle whether to download the article (@code{gnus-agent-toggle-mark}). The download mark is @samp{%} by default. @item J c -@kindex J c (Agent Summary) +@kindex J c @r{(Agent Summary)} @findex gnus-agent-catchup Mark all articles as read (@code{gnus-agent-catchup}) that are neither cached, downloaded, nor downloadable. @item J S -@kindex J S (Agent Summary) +@kindex J S @r{(Agent Summary)} @findex gnus-agent-fetch-group Download all eligible (@pxref{Agent Categories}) articles in this group. (@code{gnus-agent-fetch-group}). @item J s -@kindex J s (Agent Summary) +@kindex J s @r{(Agent Summary)} @findex gnus-agent-summary-fetch-series Download all processable articles in this group. (@code{gnus-agent-summary-fetch-series}). @item J u -@kindex J u (Agent Summary) +@kindex J u @r{(Agent Summary)} @findex gnus-agent-summary-fetch-group Download all downloadable articles in the current group (@code{gnus-agent-summary-fetch-group}). @@ -18903,13 +18894,13 @@ Download all downloadable articles in the current group @table @kbd @item J a -@kindex J a (Agent Server) +@kindex J a @r{(Agent Server)} @findex gnus-agent-add-server Add the current server to the list of servers covered by the Gnus Agent (@code{gnus-agent-add-server}). @item J r -@kindex J r (Agent Server) +@kindex J r @r{(Agent Server)} @findex gnus-agent-remove-server Remove the current server from the list of servers covered by the Gnus Agent (@code{gnus-agent-remove-server}). @@ -19010,8 +19001,6 @@ sense if you are using a nntp or nnimap back end. @vindex gnus-agent-expire-days @findex gnus-agent-expire -@kindex M-x gnus-agent-expire -@kindex M-x gnus-agent-expire-group @findex gnus-agent-expire-group @cindex agent expiry @cindex Gnus agent expiry @@ -19065,14 +19054,12 @@ failure. Running @code{gnus-agent-regenerate} or such that you don't need to download these articles a second time. @findex gnus-agent-regenerate -@kindex M-x gnus-agent-regenerate The command @code{gnus-agent-regenerate} will perform @code{gnus-agent-regenerate-group} on every agentized group. While you can run @code{gnus-agent-regenerate} in any buffer, it is strongly recommended that you first close all summary buffers. @findex gnus-agent-regenerate-group -@kindex M-x gnus-agent-regenerate-group The command @code{gnus-agent-regenerate-group} uses the local copies of individual articles to repair the local @acronym{NOV}(header) database. It then updates the internal data structures that document which articles @@ -19458,18 +19445,18 @@ General score commands that don't actually change the score file: @table @kbd @item V s -@kindex V s (Summary) +@kindex V s @r{(Summary)} @findex gnus-summary-set-score Set the score of the current article (@code{gnus-summary-set-score}). @item V S -@kindex V S (Summary) +@kindex V S @r{(Summary)} @findex gnus-summary-current-score Display the score of the current article (@code{gnus-summary-current-score}). @item V t -@kindex V t (Summary) +@kindex V t @r{(Summary)} @findex gnus-score-find-trace Display all score rules that have been used on the current article (@code{gnus-score-find-trace}). In the @file{*Score Trace*} buffer, you @@ -19478,12 +19465,12 @@ current line and @kbd{f} to format (@code{gnus-score-pretty-print}) the score file and edit it. @item V w -@kindex V w (Summary) +@kindex V w @r{(Summary)} @findex gnus-score-find-favourite-words List words used in scoring (@code{gnus-score-find-favourite-words}). @item V R -@kindex V R (Summary) +@kindex V R @r{(Summary)} @findex gnus-summary-rescore Run the current summary through the scoring process (@code{gnus-summary-rescore}). This might be useful if you're playing @@ -19491,32 +19478,32 @@ around with your score files behind Gnus' back and want to see the effect you're having. @item V c -@kindex V c (Summary) +@kindex V c @r{(Summary)} @findex gnus-score-change-score-file Make a different score file the current (@code{gnus-score-change-score-file}). @item V e -@kindex V e (Summary) +@kindex V e @r{(Summary)} @findex gnus-score-edit-current-scores Edit the current score file (@code{gnus-score-edit-current-scores}). You will be popped into a @code{gnus-score-mode} buffer (@pxref{Score File Editing}). @item V f -@kindex V f (Summary) +@kindex V f @r{(Summary)} @findex gnus-score-edit-file Edit a score file and make this score file the current one (@code{gnus-score-edit-file}). @item V F -@kindex V F (Summary) +@kindex V F @r{(Summary)} @findex gnus-score-flush-cache Flush the score cache (@code{gnus-score-flush-cache}). This is useful after editing score files. @item V C -@kindex V C (Summary) +@kindex V C @r{(Summary)} @findex gnus-score-customize Customize a score file in a visually pleasing manner (@code{gnus-score-customize}). @@ -19528,13 +19515,13 @@ The rest of these commands modify the local score file. @table @kbd @item V m -@kindex V m (Summary) +@kindex V m @r{(Summary)} @findex gnus-score-set-mark-below Prompt for a score, and mark all articles with a score below this as read (@code{gnus-score-set-mark-below}). @item V x -@kindex V x (Summary) +@kindex V x @r{(Summary)} @findex gnus-score-set-expunge-below Prompt for a score, and add a score rule to the current score file to expunge all articles below this score @@ -19669,7 +19656,7 @@ Immediately scoring. @item If you are scoring on @samp{e} (extra) headers, you will then be prompted for the header name on which you wish to score. This must be a header named -in gnus-extra-headers, and @samp{TAB} completion is available. +in gnus-extra-headers, and @samp{@key{TAB}} completion is available. @end enumerate @@ -19704,13 +19691,13 @@ There aren't many of these as yet, I'm afraid. @table @kbd @item W e -@kindex W e (Group) +@kindex W e @r{(Group)} @findex gnus-score-edit-all-score Edit the apply-to-all-groups all.SCORE file. You will be popped into a @code{gnus-score-mode} buffer (@pxref{Score File Editing}). @item W f -@kindex W f (Group) +@kindex W f @r{(Group)} @findex gnus-score-flush-cache Gnus maintains a cache of score alists to avoid having to reload them all the time. This command will flush the cache @@ -20194,20 +20181,20 @@ additional commands: @table @kbd @item C-c C-c -@kindex C-c C-c (Score) +@kindex C-c C-c @r{(Score)} @findex gnus-score-edit-exit Save the changes you have made and return to the summary buffer (@code{gnus-score-edit-exit}). @item C-c C-d -@kindex C-c C-d (Score) +@kindex C-c C-d @r{(Score)} @findex gnus-score-edit-insert-date Insert the current date in numerical format (@code{gnus-score-edit-insert-date}). This is really the day number, if you were wondering. @item C-c C-p -@kindex C-c C-p (Score) +@kindex C-c C-p @r{(Score)} @findex gnus-score-pretty-print The adaptive score files are saved in an unformatted fashion. If you intend to read one of these files, you want to @dfn{pretty print} it @@ -20573,7 +20560,7 @@ Restart Gnus and rebuild your @code{nnml} overview files with the time if you have much mail. Now you can score on @samp{To} and @samp{Cc} as ``extra headers'' like -so: @kbd{I e s p To RET RET}. +so: @kbd{I e s p To @key{RET} @key{RET}}. See? Simple. @@ -20760,12 +20747,12 @@ Two summary functions for editing a @sc{gnus} kill file: @table @kbd @item M-k -@kindex M-k (Summary) +@kindex M-k @r{(Summary)} @findex gnus-summary-edit-local-kill Edit this group's kill file (@code{gnus-summary-edit-local-kill}). @item M-K -@kindex M-K (Summary) +@kindex M-K @r{(Summary)} @findex gnus-summary-edit-global-kill Edit the general kill file (@code{gnus-summary-edit-global-kill}). @end table @@ -20775,12 +20762,12 @@ Two group mode functions for editing the kill files: @table @kbd @item M-k -@kindex M-k (Group) +@kindex M-k @r{(Group)} @findex gnus-group-edit-local-kill Edit this group's kill file (@code{gnus-group-edit-local-kill}). @item M-K -@kindex M-K (Group) +@kindex M-K @r{(Group)} @findex gnus-group-edit-global-kill Edit the general kill file (@code{gnus-group-edit-global-kill}). @end table @@ -21720,7 +21707,7 @@ want. @item The name of the @strong{back end server} where mairix should store its searches. This must be a full server name, like @code{nnml:mymail}. -Just hit @kbd{TAB} to see the available servers. Currently, servers +Just hit @kbd{@key{TAB}} to see the available servers. Currently, servers which are accessed through @code{nnmaildir}, @code{nnimap} and @code{nnml} are supported. As explained above, for locally stored mails, this can be an existing server where you store your mails. @@ -21765,34 +21752,34 @@ In group mode: @table @kbd @item G b c -@kindex G b c (Group) +@kindex G b c @r{(Group)} @findex nnmairix-create-server-and-default-group Creates @code{nnmairix} server and default search group for this server (@code{nnmairix-create-server-and-default-group}). You should have done this by now (@pxref{Configuring nnmairix}). @item G b s -@kindex G b s (Group) +@kindex G b s @r{(Group)} @findex nnmairix-search Prompts for query which is then sent to the mairix binary. Search results are put into the default search group which is automatically displayed (@code{nnmairix-search}). @item G b m -@kindex G b m (Group) +@kindex G b m @r{(Group)} @findex nnmairix-widget-search Allows you to create a mairix search or a permanent group more comfortably using graphical widgets, similar to a customization group. Just try it to see how it works (@code{nnmairix-widget-search}). @item G b i -@kindex G b i (Group) +@kindex G b i @r{(Group)} @findex nnmairix-search-interactive Another command for creating a mairix query more comfortably, but uses only the minibuffer (@code{nnmairix-search-interactive}). @item G b g -@kindex G b g (Group) +@kindex G b g @r{(Group)} @findex nnmairix-create-search-group Creates a permanent group which is associated with a search query (@code{nnmairix-create-search-group}). The @code{nnmairix} back end @@ -21800,20 +21787,20 @@ automatically calls mairix when you update this group with @kbd{g} or @kbd{M-g}. @item G b q -@kindex G b q (Group) +@kindex G b q @r{(Group)} @findex nnmairix-group-change-query-this-group Changes the search query for the @code{nnmairix} group under cursor (@code{nnmairix-group-change-query-this-group}). @item G b t -@kindex G b t (Group) +@kindex G b t @r{(Group)} @findex nnmairix-group-toggle-threads-this-group Toggles the 'threads' parameter for the @code{nnmairix} group under cursor, i.e., if you want see the whole threads of the found messages (@code{nnmairix-group-toggle-threads-this-group}). @item G b u -@kindex G b u (Group) +@kindex G b u @r{(Group)} @findex nnmairix-update-database @vindex nnmairix-mairix-update-options Calls mairix binary for updating the database @@ -21823,20 +21810,20 @@ and @code{-Q} for making this as fast as possible (see variable options). @item G b r -@kindex G b r (Group) +@kindex G b r @r{(Group)} @findex nnmairix-group-toggle-readmarks-this-group Keep articles in this @code{nnmairix} group always read or unread, or leave the marks unchanged (@code{nnmairix-group-toggle-readmarks-this-group}). @item G b d -@kindex G b d (Group) +@kindex G b d @r{(Group)} @findex nnmairix-group-delete-recreate-this-group Recreate @code{nnmairix} group on the ``real'' mail back end (@code{nnmairix-group-delete-recreate-this-group}). You can do this if you always get wrong article counts with a @code{nnmairix} group. @item G b a -@kindex G b a (Group) +@kindex G b a @r{(Group)} @findex nnmairix-group-toggle-allowfast-this-group Toggles the @code{allow-fast} parameters for group under cursor (@code{nnmairix-group-toggle-allowfast-this-group}). The default @@ -21848,14 +21835,14 @@ lead to dangling symlinks if something changed between updating and entering the group which is not yet in the mairix database. @item G b p -@kindex G b p (Group) +@kindex G b p @r{(Group)} @findex nnmairix-group-toggle-propmarks-this-group Toggle marks propagation for this group (@code{nnmairix-group-toggle-propmarks-this-group}). (@pxref{Propagating marks}). @item G b o -@kindex G b o (Group) +@kindex G b o @r{(Group)} @findex nnmairix-propagate-marks Manually propagate marks (@code{nnmairix-propagate-marks}); needed only when @code{nnmairix-propagate-marks-upon-close} is set to @code{nil}. @@ -21867,21 +21854,21 @@ In summary mode: @table @kbd @item G G m -@kindex G G m (Summary) +@kindex G G m @r{(Summary)} @findex nnmairix-widget-search-from-this-article Allows you to create a mairix query or group based on the current message using graphical widgets (same as @code{nnmairix-widget-search}) (@code{nnmairix-widget-search-from-this-article}). @item G G g -@kindex G G g (Summary) +@kindex G G g @r{(Summary)} @findex nnmairix-create-search-group-from-message Interactively creates a new search group with query based on the current message, but uses the minibuffer instead of graphical widgets (@code{nnmairix-create-search-group-from-message}). @item G G t -@kindex G G t (Summary) +@kindex G G t @r{(Summary)} @findex nnmairix-search-thread-this-article Searches thread for the current article (@code{nnmairix-search-thread-this-article}). This is effectively a @@ -21889,14 +21876,14 @@ shortcut for calling @code{nnmairix-search} with @samp{m:msgid} of the current article and enabled threads. @item G G f -@kindex G G f (Summary) +@kindex G G f @r{(Summary)} @findex nnmairix-search-from-this-article Searches all messages from sender of the current article (@code{nnmairix-search-from-this-article}). This is a shortcut for calling @code{nnmairix-search} with @samp{f:From}. @item G G o -@kindex G G o (Summary) +@kindex G G o @r{(Summary)} @findex nnmairix-goto-original-article (Only in @code{nnmairix} groups!) Tries determine the group this article originally came from and displays the article in this group, so that, @@ -21906,7 +21893,7 @@ function will use the registry if available, but can also parse the article file name as a fallback method. @item G G u -@kindex G G u (Summary) +@kindex G G u @r{(Summary)} @findex nnmairix-remove-tick-mark-original-article Remove possibly existing tick mark from original article (@code{nnmairix-remove-tick-mark-original-article}). (@pxref{nnmairix @@ -22329,7 +22316,7 @@ for instance. But what if you want to save without making a backup file, and you want Emacs to flash lights and play a nice tune at the same time? You can't, and you're probably perfectly happy that way. -@kindex M-i (Summary) +@kindex M-i @r{(Summary)} @findex gnus-symbolic-argument I'm not, so I've added a second prefix---the @dfn{symbolic prefix}. The prefix key is @kbd{M-i} (@code{gnus-symbolic-argument}), and the next @@ -22385,7 +22372,6 @@ Currently Gnus uses the following formatting variables: All these format variables can also be arbitrary elisp forms. In that case, they will be @code{eval}ed to insert the required lines. -@kindex M-x gnus-update-format @findex gnus-update-format Gnus includes a command to help you while creating your own format specs. @kbd{M-x gnus-update-format} will @code{eval} the current form, @@ -24287,10 +24273,10 @@ group: @itemx M-d @itemx M s x @itemx S x -@kindex $ (Summary) -@kindex M-d (Summary) -@kindex S x (Summary) -@kindex M s x (Summary) +@kindex $ @r{(Summary)} +@kindex M-d @r{(Summary)} +@kindex S x @r{(Summary)} +@kindex M s x @r{(Summary)} @findex gnus-summary-mark-as-spam @findex gnus-summary-mark-as-spam Mark current article as spam, showing it with the @samp{$} mark @@ -24562,7 +24548,7 @@ determined by either the @code{ham-process-destination} group parameter or a match in the @code{gnus-ham-process-destinations} variable, which is a list of regular expressions matched with group names (it's easiest to customize this variable with @kbd{M-x -customize-variable @key{RET} gnus-ham-process-destinations}). Each +customize-variable @key{@key{RET}} gnus-ham-process-destinations}). Each group name list is a standard Lisp list, if you prefer to customize the variable manually. If the @code{ham-process-destination} parameter is not set, ham articles are left in place. If the @@ -24598,7 +24584,7 @@ When you leave a @emph{ham} or @emph{unclassified} group, all the @code{spam-process-destination} group parameter or a match in the @code{gnus-spam-process-destinations} variable, which is a list of regular expressions matched with group names (it's easiest to -customize this variable with @kbd{M-x customize-variable @key{RET} +customize this variable with @kbd{M-x customize-variable @key{@key{RET}} gnus-spam-process-destinations}). Each group name list is a standard Lisp list, if you prefer to customize the variable manually. If the @code{spam-process-destination} parameter is not set, the spam @@ -26230,7 +26216,7 @@ you to optionally upload your first CloudSynchronizationDataPack(TM). After setting up, you can use these shortcuts from the Group buffer: @table @kbd -@item ~ RET +@item ~ @key{RET} @item ~ d @findex gnus-cloud-download-all-data @cindex cloud, download @@ -26665,7 +26651,6 @@ to stop doing it the old way. Gnus understands all @sc{gnus} startup files. -@kindex M-x gnus-bug @findex gnus-bug @cindex reporting bugs @cindex bugs @@ -27744,7 +27729,7 @@ control over simplification. limit. @item -@kbd{M-RET} is a new Message command for breaking cited text. +@kbd{M-@key{RET}} is a new Message command for breaking cited text. @item @samp{\\1}-expressions are now valid in @code{nnmail-split-methods}. @@ -28299,10 +28284,10 @@ Easy inclusion of X-Faces headers. @xref{X-Face}. @item Group Carbon Copy (GCC) quoting -To support groups that contains SPC and other weird characters, groups +To support groups that contains @key{SPC} and other weird characters, groups are quoted before they are placed in the Gcc: header. This means variables such as @code{gnus-message-archive-group} should no longer -contain quote characters to make groups containing SPC work. Also, if +contain quote characters to make groups containing @key{SPC} work. Also, if you are using the string @samp{nnml:foo, nnml:bar} (indicating Gcc into two groups) you must change it to return the list @code{("nnml:foo" "nnml:bar")}, otherwise the Gcc: line will be quoted @@ -28391,7 +28376,7 @@ Gnus supports @acronym{PGP} (RFC 1991/2440), @acronym{PGP/MIME} (RFC It needs an external @acronym{S/MIME} and OpenPGP implementation, but no additional Lisp libraries. This add several menu items to the -Attachments menu, and @kbd{C-c RET} key bindings, when composing +Attachments menu, and @kbd{C-c @key{RET}} key bindings, when composing messages. This also obsoletes @code{gnus-article-hide-pgp-hook}. @item @@ -28487,7 +28472,7 @@ message, Message Manual}). @item The tool bars have been updated to use GNOME icons in Group, Summary and Message mode. You can also customize the tool bars: @kbd{M-x -customize-apropos RET -tool-bar$} should get you started. This is a new +customize-apropos @key{RET} -tool-bar$} should get you started. This is a new feature in Gnus 5.10.10. (Only for Emacs, not in XEmacs.) @item The tool bar icons are now (de)activated correctly @@ -28718,7 +28703,7 @@ commonly fetched via the protocol @acronym{NNTP}, whereas mail messages could be read from a file on the local disk. The internal architecture of Gnus thus comprises a ``front end'' and a number of ``back ends''. Internally, when you enter a group (by hitting -@key{RET}, say), you thereby invoke a function in the front end in +@key{@key{RET}}, say), you thereby invoke a function in the front end in Gnus. The front end then ``talks'' to a back end and says things like ``Give me the list of articles in the foo group'' or ``Show me article number 4711''. @@ -29120,12 +29105,12 @@ If all else fails, report the problem as a bug. @cindex bugs @cindex reporting bugs -@kindex M-x gnus-bug @findex gnus-bug -If you find a bug in Gnus, you can report it with the @kbd{M-x gnus-bug} -command. @kbd{M-x set-variable RET debug-on-error RET t RET}, and send -me the backtrace. I will fix bugs, but I can only fix them if you send -me a precise description as to how to reproduce the bug. +If you find a bug in Gnus, you can report it with the @kbd{M-x +gnus-bug} command. @kbd{M-x set-variable @key{RET} debug-on-error +@key{RET} t @key{RET}}, and send me the backtrace. I will fix bugs, +but I can only fix them if you send me a precise description as to how +to reproduce the bug. You really can never be too detailed in a bug report. Always use the @kbd{M-x gnus-bug} command when you make bug reports, even if it creates @@ -29158,9 +29143,9 @@ Lisp Reference Manual}). To get you started with edebug, consider if you discover some weird behavior when pressing @kbd{c}, the first step is to do @kbd{C-h k c} and click on the hyperlink (Emacs only) in the documentation buffer that leads you to the function definition, -then press @kbd{M-x edebug-defun RET} with point inside that function, +then press @kbd{M-x edebug-defun @key{RET}} with point inside that function, return to Gnus and press @kbd{c} to invoke the code. You will be -placed in the lisp buffer and can single step using @kbd{SPC} and +placed in the lisp buffer and can single step using @kbd{@key{SPC}} and evaluate expressions using @kbd{M-:} or inspect variables using @kbd{C-h v}, abort execution with @kbd{q}, and resume execution with @kbd{c} or @kbd{g}. @@ -29178,8 +29163,8 @@ A fancier approach is to use the elisp profiler, ELP@. The profiler is (or should be) fully documented elsewhere, but to get you started there are a few steps that need to be followed. First, instrument the part of Gnus you are interested in for profiling, e.g., @kbd{M-x -elp-instrument-package RET gnus} or @kbd{M-x elp-instrument-package -RET message}. Then perform the operation that is slow and press +elp-instrument-package @key{RET} gnus} or @kbd{M-x elp-instrument-package +@key{RET} message}. Then perform the operation that is slow and press @kbd{M-x elp-results}. You will then see which operations that takes time, and can debug them further. If the entire operation takes much longer than the time spent in the slowest function in the profiler diff --git a/doc/misc/info.texi b/doc/misc/info.texi index 964a6c6912..c617468f57 100644 --- a/doc/misc/info.texi +++ b/doc/misc/info.texi @@ -311,9 +311,9 @@ You can tell that there is more that is not visible because you can see the text @samp{Top} rather than @samp{All} near the bottom of the screen. -@kindex SPC @r{(Info mode)} -@kindex DEL @r{(Info mode)} -@kindex BACKSPACE @r{(Info mode)} +@kindex @key{SPC} @r{(Info mode)} +@kindex @key{DEL} @r{(Info mode)} +@kindex @key{BACKSPACE} @r{(Info mode)} @findex Info-scroll-up @findex Info-scroll-down The @key{SPC}, @key{BACKSPACE} (or @key{DEL})@footnote{The key which @@ -363,8 +363,8 @@ the menu, one by one. Once you reach the end of a node, and have seen all of its subnodes, @key{SPC} takes you to the next node or to the parent's next node. -@kindex PAGEUP @r{(Info mode)} -@kindex PAGEDOWN @r{(Info mode)} +@kindex @key{PAGEUP} @r{(Info mode)} +@kindex @key{PAGEDOWN} @r{(Info mode)} Many keyboards nowadays have two scroll keys labeled @samp{PageUp} and @samp{PageDown} (or maybe @samp{Prior} and @samp{Next}). If your keyboard has these keys, you can use them to move forward and backward diff --git a/doc/misc/mairix-el.texi b/doc/misc/mairix-el.texi index 906448c102..401ba1d7b5 100644 --- a/doc/misc/mairix-el.texi +++ b/doc/misc/mairix-el.texi @@ -213,7 +213,6 @@ Here's a description of the available interactive functions: @table @code @item mairix-search -@kindex M-x mairix-search @findex mairix-search @vindex mairix-search-file @vindex mairix-file-path @@ -229,7 +228,6 @@ is specified by the variable @code{mairix-command}, together with the options for making searching faster. @item mairix-widget-search -@kindex M-x mairix-widget-search @findex mairix-widget-search @vindex mairix-widget-fields-list Creates a mairix query using graphical widgets. Very handy if you're @@ -241,28 +239,24 @@ might want to include some other fields. This can be easily done by modifying @code{mairix-widget-fields-list}. @item mairix-widget-search-based-on-article -@kindex M-x mairix-widget-search-based-on-article @findex mairix-widget-search-based-on-article Create a mairix query using graphical widgets, but based on the currently displayed article, i.e., the available fields will be filled with the current header values. @item mairix-search-from-this-article -@kindex M-x mairix-search-from-this-article @findex mairix-search-from-this-article Search messages from sender of the current article. This is effectively a shortcut for calling @code{mairix-search} with @code{f:current_from}. If used with a prefix, include whole threads of the found messages. @item mairix-search-thread-this-article -@kindex M-x mairix-search-thread-this-article @findex mairix-search-thread-this-article Search thread for the current article. This is effectively a shortcut for calling @code{mairix-search} with @code{m:msgid} of the current article and enabled threads. @item mairix-save-search -@kindex M-x mairix-save-search @findex mairix-save-search Save the last search for future use. You will have to specify a name for the search and will then be asked if you want to save your saved @@ -272,13 +266,11 @@ your @file{.emacs}. You can also do this later by using @code{mairix-edit-saved-searches}. @item mairix-use-saved-search -@kindex M-x mairix-use-saved-search @findex mairix-use-saved-search Call mairix with a previously saved search. You will be asked for the name of the saved search (use @kbd{TAB} for completion). @item mairix-edit-saved-searches -@kindex M-x mairix-edit-saved-searches @findex mairix-edit-saved-searches Edit your current mairix searches. This is a simple major mode for editing the contents of the variable @code{mairix-saved-searches}. You @@ -290,14 +282,12 @@ to open different searches at the same time, or if you want to regularly access certain searches without the need to call mairix. @item mairix-edit-saved-searches-customize -@kindex M-x mairix-edit-saved-searches-customize @findex mairix-edit-saved-searches-customize Edit the variable @code{mairix-saved-searches} in a normal customization buffer. This function exists more or less for historic reasons, but maybe you like it. @item mairix-update-database -@kindex M-x mairix-update-database @findex mairix-update-database @vindex mairix-update-options @vindex mairix-synchronous-update diff --git a/doc/misc/message.texi b/doc/misc/message.texi index 71298751c6..f49c91ef7b 100644 --- a/doc/misc/message.texi +++ b/doc/misc/message.texi @@ -707,14 +707,12 @@ This means that if the recipient supports RFC 2298 she might send you a notification that she received the message. @item M-x message-insert-importance-high -@kindex M-x message-insert-importance-high @findex message-insert-importance-high @cindex Importance Insert an @samp{Importance} header with a value of @samp{high}, deleting headers if necessary. @item M-x message-insert-importance-low -@kindex M-x message-insert-importance-low @findex message-insert-importance-low @cindex Importance Insert an @samp{Importance} header with a value of @samp{low}, deleting @@ -1379,8 +1377,8 @@ end of the message (@code{message-kill-to-signature}). Delete all text in the body of the message that is outside the region (@code{message-delete-not-region}). -@item M-RET -@kindex M-RET +@item M-@key{RET} +@kindex M-@key{RET} @findex message-newline-and-reformat Insert four newlines, and then reformat if inside quoted text. @@ -1390,7 +1388,7 @@ Here's an example: > This is some quoted text. And here's more quoted text. @end example -If point is before @samp{And} and you press @kbd{M-RET}, you'll get: +If point is before @samp{And} and you press @kbd{M-@key{RET}}, you'll get: @example > This is some quoted text. @@ -1408,12 +1406,12 @@ If point is before @samp{And} and you press @kbd{M-RET}, you'll get: Rename the buffer (@code{message-rename-buffer}). If given a prefix, prompt for a new buffer name. -@item TAB -@kindex TAB +@item @key{TAB} +@kindex @key{TAB} @findex message-tab @vindex message-tab-body-function If @code{message-tab-body-function} is non-@code{nil}, execute the -function it specifies. Otherwise use the function bound to @kbd{TAB} in +function it specifies. Otherwise use the function bound to @key{TAB} in @code{text-mode-map} or @code{global-map}. @end table diff --git a/doc/misc/mh-e.texi b/doc/misc/mh-e.texi index a9c8bbbfb3..efb44e4b64 100644 --- a/doc/misc/mh-e.texi +++ b/doc/misc/mh-e.texi @@ -461,8 +461,8 @@ filling paragraphs. A mark can be set with @kbd{C-@@} (or @cindex file completion @cindex folder completion @cindex minibuffer -@kindex SPC -@kindex TAB +@kindex @key{SPC} +@kindex @key{TAB} The @dfn{minibuffer} is the bottom line of the Emacs window, where all prompting and multiple-character input is directed. You can use @@ -692,7 +692,6 @@ get the big picture, and then you can read the manual as you wish. @cindex modes, MH-Letter @cindex sending mail @findex mh-smail -@kindex M-x mh-smail Let's start our tour by sending ourselves a message which we can later read and process. Enter @kbd{M-x mh-smail} to invoke the MH-E program @@ -762,7 +761,6 @@ message. Type @kbd{C-c C-c} now. That's all there is to it! @cindex modes, MH-Folder @cindex reading mail @findex mh-rmail -@kindex M-x mh-rmail To read the mail you've just sent yourself, enter @kbd{M-x mh-rmail}. This incorporates the new mail and puts the output from @@ -777,7 +775,6 @@ major mode is MH-Folder. @findex mh-rmail @kindex F r -@kindex M-x mh-rmail @sp 1 @center @strong{NOTE} @@ -935,7 +932,6 @@ command. @findex mh-smail @kindex m -@kindex M-x mh-smail If you want to send another message you can use @kbd{m} instead of @kbd{M-x mh-smail}. So go ahead, send some mail to your friends! @@ -970,7 +966,6 @@ perform any refiles and deletes that you did there. @findex mh-rmail @kindex C-x b @kindex C-x k -@kindex M-x mh-rmail @kindex q If you don't want to leave Emacs, you can type @kbd{q} to bury (hide) @@ -1228,7 +1223,7 @@ Many commands that operate on individual messages, such as @code{mh-forward} or @code{mh-refile-msg} take a @code{RANGE} argument. This argument can be used in several ways. -@kindex C-u, with ranges +@kindex C-u@r{, with ranges} If you provide the prefix argument @kbd{C-u} to these commands, then you will be prompted for the message range. This can be any valid MH @@ -1552,7 +1547,6 @@ the message numbers from outside of MH-E. @findex mh-rmail @kindex F r @kindex F v -@kindex M-x mh-rmail The MH-E entry point for reading mail is @kbd{M-x mh-rmail}. This command incorporates your mail and creates a buffer called @@ -1599,20 +1593,20 @@ Display message (@code{mh-show}). @c ------------------------- @cindex @samp{Message > Show Message with Header} menu item @cindex menu item, @samp{Message > Show Message with Header} -@kindex , (comma) +@kindex , @r{(comma)} @findex mh-header-display @item , (comma) Display message with all header fields (@code{mh-header-display}). @c ------------------------- @cindex @samp{Message > Show Message with Preferred Alternative} menu item @cindex menu item, @samp{Message > Show Message with Preferred Alternative} -@kindex : (colon) +@kindex : @r{(colon)} @findex mh-show-preferred-alternative @item : (colon) Display message with the default preferred alternative (@code{mh-show-preferred-alternative}). @c ------------------------- -@kindex ; (semicolon) +@kindex ; @r{(semicolon)} @findex mh-toggle-mh-decode-mime-flag @item ; (semicolon) Toggle the value of @code{mh-decode-mime-flag} @@ -2017,8 +2011,8 @@ detail in the following sections. @findex mh-previous-page @findex mh-show @findex mh-show-mouse -@kindex , (comma) -@kindex . (period) +@kindex , @r{(comma)} +@kindex . @r{(period)} @kindex @key{BS} @kindex @key{RET} @kindex @key{SPC} @@ -2309,7 +2303,7 @@ leave out the @samp{xterm -e} if you use @command{mhlist} or @cindex Emacs, packages, @samp{mm-decode} @cindex @samp{mm-decode} package @findex mh-toggle-mh-decode-mime-flag -@kindex ; (semicolon) +@kindex ; @r{(semicolon)} @vindex mh-decode-mime-flag MH-E can handle attachments as well if the Gnus @samp{mm-decode} @@ -2490,7 +2484,7 @@ the option @code{mm-discouraged-alternatives}, and add @samp{text/html}. The next best alternative, if any, will be shown. @findex mh-show-preferred-alternative -@kindex : (colon) +@kindex : @r{(colon)} Occasionally, though, you might want to see the preferred alternative. The command @kbd{:} (@code{mh-show-preferred-alternative}) displays @@ -3859,7 +3853,6 @@ moving my cursor to @samp{out} and using the command @kbd{R} @cindex sending mail @findex mh-smail -@kindex M-x mh-smail You can send a mail message in several ways. You can call @kbd{M-x mh-smail} directly, or from the command line like this: @@ -4027,8 +4020,6 @@ more detail in the following sections. @cindex sending mail @findex mh-smail @findex mh-smail-other-window -@kindex M-x mh-smail -@kindex M-x mh-smail-other-window Outside of an MH-Folder buffer, you must call either @kbd{M-x mh-smail} or @kbd{M-x mh-smail-other-window} to compose a new message. @@ -4401,7 +4392,7 @@ Perform completion or insert space (@code{mh-letter-complete-or-space}). Perform completion on header field or word preceding point (@code{mh-letter-complete}). @c ------------------------- -@kindex , (comma) +@kindex , @r{(comma)} @findex mh-letter-confirm-address @item , (comma) Flash alias expansion (@code{mh-letter-confirm-address}). @@ -4842,7 +4833,7 @@ take point to the last field from anywhere in the body. @findex mh-letter-complete @findex mh-letter-complete-or-space @findex mh-letter-confirm-address -@kindex , (comma) +@kindex , @r{(comma)} @kindex @key{SPC} @kindex M-@key{TAB} @vindex mh-alias-flash-on-comma @@ -5934,7 +5925,6 @@ executed to generate the password file. For example, use @samp{ypcat passwd} to obtain the NIS password file. @findex mh-alias-reload -@kindex M-x mh-alias-reload @vindex mh-alias-reloaded-hook Since aliases are updated frequently, MH-E reloads aliases @@ -5950,7 +5940,6 @@ listed in your @samp{Aliasfile:} profile component. MH-E provides other methods for maintaining your alias file(s). @findex mh-alias-add-alias -@kindex M-x mh-alias-add-alias You can use the @kbd{M-x mh-alias-add-alias} command which will prompt you for the alias and address that you would like to add. If the alias @@ -5985,9 +5974,6 @@ Using prefixes instead of postfixes helps you explore aliases during completion. If you forget the name of an old dive buddy, you can enter @samp{div} and then @key{SPC} to get a listing of all your dive buddies. -@kindex M-x mh-alias-add-address-under-point -@kindex M-x mh-alias-grab-from-field - An alias for the sender of the current message is added automatically by clicking on the @samp{Grab From alias} tool bar button or by running the @kbd{M-x mh-alias-grab-from-field} command. Aliases for other @@ -6021,7 +6007,6 @@ more appropriate. @cindex regular expressions, @code{mh-alias-apropos} @findex mh-alias-apropos -@kindex M-x mh-alias-apropos If you can't quite remember an alias, you can use @kbd{M-x mh-alias-apropos} to show all aliases or addresses that match a @@ -6281,7 +6266,6 @@ containing the value for the field is given. @cindex speedbar @findex mh-visit-folder @kindex F v -@kindex M-x speedbar @kindex mouse-2 You can also use the speedbar @@ -7514,7 +7498,6 @@ Mail}). @cindex sequence, @samp{cur} @cindex sequence, @samp{tick} @findex mh-update-sequences -@kindex M-x mh-update-sequences @kindex q @kindex x @vindex mh-tick-seq @@ -8001,7 +7984,6 @@ system. @cindex MH-E version @cindex @file{*MH-E Info*} @cindex version -@kindex M-x mh-version One command worth noting is @kbd{M-x mh-version}. You can compare the version this command prints to the latest release (@pxref{Getting @@ -8716,7 +8698,6 @@ I also point out some additional sources of information. @cindex bugs @cindex SourceForge -@kindex M-x mh-version Bug reports should be filed at @uref{https://sourceforge.net/p/mh-e/bugs/, SourceForge}. You need to @@ -8792,7 +8773,6 @@ instead. @cindex news @cindex @samp{MH-E-NEWS} @cindex @samp{README} -@kindex M-x mh-version After you download and extract the MH-E tarball, read the @file{README} file and @file{MH-E-NEWS}. These correspond to the diff --git a/doc/misc/newsticker.texi b/doc/misc/newsticker.texi index 43d248bc7d..b94a96d8aa 100644 --- a/doc/misc/newsticker.texi +++ b/doc/misc/newsticker.texi @@ -239,17 +239,17 @@ The position of groups and feeds within the tree can be changed with these commands: @table @kbd -@item M-up -@itemx M-down -@kindex M-up -@kindex M-down +@item M-@key{UP} +@itemx M-@key{DOWN} +@kindex M-@key{UP} +@kindex M-@key{DOWN} @findex newsticker-group-shift-feed-up @findex newsticker-group-shift-feed-down Shift the currently selected feed up and down within its group. -@item M-S-up -@itemx M-S-down -@kindex M-S-up -@kindex M-S-down +@item M-S-@key{UP} +@itemx M-S-@key{DOWN} +@kindex M-S-@key{UP} +@kindex M-S-@key{DOWN} @findex newsticker-group-shift-group-up @findex newsticker-group-shift-group-down Shift the currently selected group up and down within its parent group. diff --git a/doc/misc/org.texi b/doc/misc/org.texi index 19c83f65a6..ac82254dc8 100644 --- a/doc/misc/org.texi +++ b/doc/misc/org.texi @@ -1136,7 +1136,7 @@ accessing a functionality. Org mode often uses the same key for different functions, depending on context. The command that is bound to such keys has a generic name, like @code{org-metaright}. In the manual we will, wherever possible, give the function that is internally called by the generic command. -For example, in the chapter on document structure, @kbd{M-@key{right}} will +For example, in the chapter on document structure, @kbd{M-@key{RIGHT}} will be listed to call @code{org-do-demote}, while in the chapter on tables, it will be listed to call @code{org-table-move-column-right}. If you prefer, you can compile the manual without the command names by unsetting the flag @@ -1392,7 +1392,7 @@ you can use the following keys to find your destination: @vindex org-goto-auto-isearch @example @key{TAB} @r{Cycle visibility.} -@key{down} / @key{up} @r{Next/previous visible headline.} +@key{DOWN} / @key{UP} @r{Next/previous visible headline.} @key{RET} @r{Select this location.} @kbd{/} @r{Do a Sparse-tree search} @r{The following keys work if you turn off @code{org-goto-auto-isearch}} @@ -1453,18 +1453,18 @@ In a new entry with no text yet, the first @key{TAB} demotes the entry to become a child of the previous one. The next @key{TAB} makes it a parent, and so on, all the way to top level. Yet another @key{TAB}, and you are back to the initial level. -@orgcmd{M-@key{left},org-do-promote} +@orgcmd{M-@key{LEFT},org-do-promote} Promote current heading by one level. -@orgcmd{M-@key{right},org-do-demote} +@orgcmd{M-@key{RIGHT},org-do-demote} Demote current heading by one level. -@orgcmd{M-S-@key{left},org-promote-subtree} +@orgcmd{M-S-@key{LEFT},org-promote-subtree} Promote the current subtree by one level. -@orgcmd{M-S-@key{right},org-demote-subtree} +@orgcmd{M-S-@key{RIGHT},org-demote-subtree} Demote the current subtree by one level. -@orgcmd{M-@key{up},org-move-subtree-up} +@orgcmd{M-@key{UP},org-move-subtree-up} Move subtree up (swap with previous subtree of same level). -@orgcmd{M-@key{down},org-move-subtree-down} +@orgcmd{M-@key{DOWN},org-move-subtree-down} Move subtree down (swap with next subtree of same level). @orgcmd{M-h,org-mark-element} Mark the element at point. Hitting repeatedly will mark subsequent elements @@ -1733,7 +1733,7 @@ one. @kindex M-S-@key{RET} @item M-S-@key{RET} Insert a new item with a checkbox (@pxref{Checkboxes}). -@kindex S-@key{down} +@kindex S-@key{DOWN} @item S-up @itemx S-down @cindex shift-selection-mode @@ -1743,25 +1743,25 @@ Jump to the previous/next item in the current list@footnote{If you want to cycle around items that way, you may customize @code{org-list-use-circular-motion}.}, but only if @code{org-support-shift-select} is off. If not, you can still use paragraph -jumping commands like @kbd{C-@key{up}} and @kbd{C-@key{down}} to quite +jumping commands like @kbd{C-@key{UP}} and @kbd{C-@key{DOWN}} to quite similar effect. -@kindex M-@key{up} -@kindex M-@key{down} +@kindex M-@key{UP} +@kindex M-@key{DOWN} @item M-up @itemx M-down Move the item including subitems up/down@footnote{See @code{org-list-use-circular-motion} for a cyclic behavior.} (swap with previous/next item of same indentation). If the list is ordered, renumbering is automatic. -@kindex M-@key{left} -@kindex M-@key{right} +@kindex M-@key{LEFT} +@kindex M-@key{RIGHT} @item M-left @itemx M-right Decrease/increase the indentation of an item, leaving children alone. -@kindex M-S-@key{left} -@kindex M-S-@key{right} -@item M-S-@key{left} -@itemx M-S-@key{right} +@kindex M-S-@key{LEFT} +@kindex M-S-@key{RIGHT} +@item M-S-@key{LEFT} +@itemx M-S-@key{RIGHT} Decrease/increase the indentation of the item, including subitems. Initially, the item tree is selected based on current indentation. When these commands are executed several times in direct succession, the initially @@ -1799,9 +1799,9 @@ its location). @xref{Structure editing}, for a detailed explanation. Turn the whole plain list into a subtree of the current heading. Checkboxes (@pxref{Checkboxes}) will become TODO (resp. DONE) keywords when unchecked (resp. checked). -@kindex S-@key{left} -@kindex S-@key{right} -@item S-left/right +@kindex S-@key{LEFT} +@kindex S-@key{RIGHT} +@item S-@key{LEFT}/@key{RIGHT} @vindex org-support-shift-select This command also cycles bullet styles when the cursor in on the bullet or anywhere in an item line, details depending on @@ -2155,22 +2155,22 @@ Move to beginning of the current table field, or on to the previous field. Move to end of the current table field, or on to the next field. @tsubheading{Column and row editing} -@orgcmdkkcc{M-@key{left},M-@key{right},org-table-move-column-left,org-table-move-column-right} +@orgcmdkkcc{M-@key{LEFT},M-@key{RIGHT},org-table-move-column-left,org-table-move-column-right} Move the current column left/right. @c -@orgcmd{M-S-@key{left},org-table-delete-column} +@orgcmd{M-S-@key{LEFT},org-table-delete-column} Kill the current column. @c -@orgcmd{M-S-@key{right},org-table-insert-column} +@orgcmd{M-S-@key{RIGHT},org-table-insert-column} Insert a new column to the left of the cursor position. @c -@orgcmdkkcc{M-@key{up},M-@key{down},org-table-move-row-up,org-table-move-row-down} +@orgcmdkkcc{M-@key{UP},M-@key{DOWN},org-table-move-row-up,org-table-move-row-down} Move the current row up/down. @c -@orgcmd{M-S-@key{up},org-table-kill-row} +@orgcmd{M-S-@key{UP},org-table-kill-row} Kill the current row or horizontal line. @c -@orgcmd{M-S-@key{down},org-table-insert-row} +@orgcmd{M-S-@key{DOWN},org-table-insert-row} Insert a new row above the current row. With a prefix argument, the line is created below the current one. @c @@ -3014,22 +3014,22 @@ formula, @key{TAB} re-indents just like in Emacs Lisp mode. Complete Lisp symbols, just like in Emacs Lisp mode.@footnote{Many desktops intercept @kbd{M-@key{TAB}} to switch windows. Use @kbd{C-M-i} or @kbd{@key{ESC} @key{TAB}} instead for completion (@pxref{Completion}).} -@kindex S-@key{up} -@kindex S-@key{down} -@kindex S-@key{left} -@kindex S-@key{right} +@kindex S-@key{UP} +@kindex S-@key{DOWN} +@kindex S-@key{LEFT} +@kindex S-@key{RIGHT} @findex org-table-fedit-ref-up @findex org-table-fedit-ref-down @findex org-table-fedit-ref-left @findex org-table-fedit-ref-right -@item S-@key{up}/@key{down}/@key{left}/@key{right} +@item S-@key{UP}/@key{DOWN}/@key{LEFT}/@key{RIGHT} Shift the reference at point. For example, if the reference is -@code{B3} and you press @kbd{S-@key{right}}, it will become @code{C3}. +@code{B3} and you press @kbd{S-@key{RIGHT}}, it will become @code{C3}. This also works for relative references and for hline references. -@orgcmdkkcc{M-S-@key{up},M-S-@key{down},org-table-fedit-line-up,org-table-fedit-line-down} +@orgcmdkkcc{M-S-@key{UP},M-S-@key{DOWN},org-table-fedit-line-up,org-table-fedit-line-down} Move the test line for column formulas in the Org buffer up and down. -@orgcmdkkcc{M-@key{up},M-@key{down},org-table-fedit-scroll-down,org-table-fedit-scroll-up} +@orgcmdkkcc{M-@key{UP},M-@key{DOWN},org-table-fedit-scroll-down,org-table-fedit-scroll-up} Scroll the window displaying the table. @kindex C-c @} @findex org-table-toggle-coordinate-overlays @@ -3710,7 +3710,7 @@ becomes the default description. @b{Inserting stored links}@* All links stored during the current session are part of the history for this prompt, so you can access -them with @key{up} and @key{down} (or @kbd{M-p/n}). +them with @key{UP} and @key{DOWN} (or @kbd{M-p/n}). @b{Completion support}@* Completion with @key{TAB} will help you to insert valid link prefixes like @samp{https:}, including the prefixes @@ -4043,9 +4043,9 @@ completion; otherwise force cycling through TODO states with no prompt. When @code{org-use-fast-todo-selection} is set to @code{prefix}, use the fast selection interface. -@kindex S-@key{right} -@kindex S-@key{left} -@item S-@key{right} @ @r{/} @ S-@key{left} +@kindex S-@key{RIGHT} +@kindex S-@key{LEFT} +@item S-@key{RIGHT} @ @r{/} @ S-@key{LEFT} @vindex org-treat-S-cursor-todo-selection-as-state-change Select the following/preceding TODO state, similar to cycling. Useful mostly if more than two TODO states are possible (@pxref{TODO @@ -4126,7 +4126,7 @@ With this setup, the command @kbd{C-c C-t} will cycle an entry from TODO to FEEDBACK, then to VERIFY, and finally to DONE and DELEGATED@. You may also use a numeric prefix argument to quickly select a specific state. For example @kbd{C-3 C-c C-t} will change the state immediately to VERIFY@. -Or you can use @kbd{S-@key{left}} to go backward through the sequence. If you +Or you can use @kbd{S-@key{LEFT}} to go backward through the sequence. If you define many keywords, you can use in-buffer completion (@pxref{Completion}) or even a special one-key selection scheme (@pxref{Fast access to TODO states}) to insert these words into the @@ -4192,23 +4192,23 @@ select the correct sequence. Besides the obvious ways like typing a keyword or using completion, you may also apply the following commands: @table @kbd -@kindex C-S-@key{right} -@kindex C-S-@key{left} +@kindex C-S-@key{RIGHT} +@kindex C-S-@key{LEFT} @kindex C-u C-u C-c C-t @item C-u C-u C-c C-t -@itemx C-S-@key{right} -@itemx C-S-@key{left} +@itemx C-S-@key{RIGHT} +@itemx C-S-@key{LEFT} These keys jump from one TODO subset to the next. In the above example, -@kbd{C-u C-u C-c C-t} or @kbd{C-S-@key{right}} would jump from @code{TODO} or +@kbd{C-u C-u C-c C-t} or @kbd{C-S-@key{RIGHT}} would jump from @code{TODO} or @code{DONE} to @code{REPORT}, and any of the words in the second row to @code{CANCELED}. Note that the @kbd{C-S-} key binding conflict with @code{shift-selection-mode} (@pxref{Conflicts}). -@kindex S-@key{right} -@kindex S-@key{left} -@item S-@key{right} -@itemx S-@key{left} -@kbd{S-@key{left}} and @kbd{S-@key{right}} and walk through @emph{all} -keywords from all sets, so for example @kbd{S-@key{right}} would switch +@kindex S-@key{RIGHT} +@kindex S-@key{LEFT} +@item S-@key{RIGHT} +@itemx S-@key{LEFT} +@kbd{S-@key{LEFT}} and @kbd{S-@key{RIGHT}} and walk through @emph{all} +keywords from all sets, so for example @kbd{S-@key{RIGHT}} would switch from @code{DONE} to @code{REPORT} in the example above. See also @ref{Conflicts}, for a discussion of the interaction with @code{shift-selection-mode}. @@ -4644,7 +4644,7 @@ items. @table @kbd @item @kbd{C-c ,} -@kindex @kbd{C-c ,} +@kindex C-c , @findex org-priority Set the priority of the current headline (@command{org-priority}). The command prompts for a priority character @samp{A}, @samp{B} or @samp{C}. @@ -4652,7 +4652,7 @@ When you press @key{SPC} instead, the priority cookie is removed from the headline. The priorities can also be changed ``remotely'' from the agenda buffer with the @kbd{,} command (@pxref{Agenda commands}). @c -@orgcmdkkcc{S-@key{up},S-@key{down},org-priority-up,org-priority-down} +@orgcmdkkcc{S-@key{UP},S-@key{DOWN},org-priority-up,org-priority-down} @vindex org-priority-start-cycle-with-default Increase/decrease priority of current headline@footnote{See also the option @code{org-priority-start-cycle-with-default}.}. Note that these keys are @@ -5395,7 +5395,7 @@ With the cursor in a property drawer, this executes property commands. @orgcmd{C-c C-c s,org-set-property} Set a property in the current entry. Both the property and the value can be inserted using completion. -@orgcmdkkcc{S-@key{right},S-@key{left},org-property-next-allowed-value,org-property-previous-allowed-value} +@orgcmdkkcc{S-@key{RIGHT},S-@key{LEFT},org-property-next-allowed-value,org-property-previous-allowed-value} Switch property at point to the next/previous allowed value. @orgcmd{C-c C-c d,org-delete-property} Remove a property from the current entry. @@ -5725,17 +5725,17 @@ Same as @kbd{r}. @orgcmd{q,org-columns-quit} Exit column view. @tsubheading{Editing values} -@item @key{left} @key{right} @key{up} @key{down} +@item @key{LEFT} @key{RIGHT} @key{UP} @key{DOWN} Move through the column view from field to field. -@kindex S-@key{left} -@kindex S-@key{right} -@item S-@key{left}/@key{right} +@kindex S-@key{LEFT} +@kindex S-@key{RIGHT} +@item S-@key{LEFT}/@key{RIGHT} Switch to the next/previous allowed value of the field. For this, you have to have specified allowed values for a property. @item 1..9,0 Directly select the Nth allowed value, @kbd{0} selects the 10th value. @orgcmdkkcc{n,p,org-columns-next-allowed-value,org-columns-previous-allowed-value} -Same as @kbd{S-@key{left}/@key{right}} +Same as @kbd{S-@key{LEFT}/@key{RIGHT}} @orgcmd{e,org-columns-edit-value} Edit the property at point. For the special properties, this will invoke the same interface that you normally use to change that @@ -5754,9 +5754,9 @@ current column view. @tsubheading{Modifying the table structure} @orgcmdkkcc{<,>,org-columns-narrow,org-columns-widen} Make the column narrower/wider by one character. -@orgcmd{S-M-@key{right},org-columns-new} +@orgcmd{S-M-@key{RIGHT},org-columns-new} Insert a new column, to the left of the current column. -@orgcmd{S-M-@key{left},org-columns-delete} +@orgcmd{S-M-@key{LEFT},org-columns-delete} Delete the current column. @end table @@ -6010,11 +6010,11 @@ instead. Access the agenda for the date given by the timestamp or -range at point (@pxref{Weekly/daily agenda}). @c -@orgcmdkkcc{S-@key{left},S-@key{right},org-timestamp-down-day,org-timestamp-up-day} +@orgcmdkkcc{S-@key{LEFT},S-@key{RIGHT},org-timestamp-down-day,org-timestamp-up-day} Change date at cursor by one day. These key bindings conflict with shift-selection and related modes (@pxref{Conflicts}). @c -@orgcmdkkcc{S-@key{up},S-@key{down},org-timestamp-up,org-timestamp-down-down} +@orgcmdkkcc{S-@key{UP},S-@key{DOWN},org-timestamp-up,org-timestamp-down-down} Change the item under the cursor in a timestamp. The cursor can be on a year, month, day, hour or minute. When the timestamp contains a time range like @samp{15:30-16:30}, modifying the first time will also shift the second, @@ -6138,25 +6138,25 @@ from the minibuffer: @kindex M-v @kindex C-v @kindex mouse-1 -@kindex S-@key{right} -@kindex S-@key{left} -@kindex S-@key{down} -@kindex S-@key{up} -@kindex M-S-@key{right} -@kindex M-S-@key{left} +@kindex S-@key{RIGHT} +@kindex S-@key{LEFT} +@kindex S-@key{DOWN} +@kindex S-@key{UP} +@kindex M-S-@key{RIGHT} +@kindex M-S-@key{LEFT} @kindex @key{RET} -@kindex M-S-@key{down} -@kindex M-S-@key{up} +@kindex M-S-@key{DOWN} +@kindex M-S-@key{UP} @example @key{RET} @r{Choose date at cursor in calendar.} mouse-1 @r{Select date by clicking on it.} -S-@key{right}/@key{left} @r{One day forward/backward.} -S-@key{down}/@key{up} @r{One week forward/backward.} -M-S-@key{right}/@key{left} @r{One month forward/backward.} +S-@key{RIGHT}/@key{LEFT} @r{One day forward/backward.} +S-@key{DOWN}/@key{UP} @r{One week forward/backward.} +M-S-@key{RIGHT}/@key{LEFT} @r{One month forward/backward.} > / < @r{Scroll calendar forward/backward by one month.} M-v / C-v @r{Scroll calendar forward/backward by 3 months.} -M-S-@key{down}/@key{up} @r{Scroll calendar forward/backward by one year.} +M-S-@key{DOWN}/@key{UP} @r{Scroll calendar forward/backward by one year.} @end example @vindex org-read-date-display-live @@ -6196,10 +6196,10 @@ following consequences: You cannot place the cursor onto a timestamp anymore, only before or after. @item -The @kbd{S-@key{up}/@key{down}} keys can no longer be used to adjust +The @kbd{S-@key{UP}/@key{DOWN}} keys can no longer be used to adjust each component of a timestamp. If the cursor is at the beginning of -the stamp, @kbd{S-@key{up}/@key{down}} will change the stamp by one day, -just like @kbd{S-@key{left}/@key{right}}. At the end of the stamp, the +the stamp, @kbd{S-@key{UP}/@key{DOWN}} will change the stamp by one day, +just like @kbd{S-@key{LEFT}/@key{RIGHT}}. At the end of the stamp, the time will be changed by one minute. @item If the timestamp contains a range of clock times or a repeater, these @@ -6555,7 +6555,7 @@ clock duration keeps the same. @orgcmd{S-M-@key{up/down},org-timestamp-up/down} On @code{CLOCK} log lines, increase/decrease the timestamp at point and the one of the previous (or the next clock) timestamp by the same duration. -For example, if you hit @kbd{S-M-@key{up}} to increase a clocked-out timestamp +For example, if you hit @kbd{S-M-@key{UP}} to increase a clocked-out timestamp by five minutes, then the clocked-in timestamp of the next clock will be increased by five minutes. @orgcmd{C-c C-t,org-todo} @@ -6606,7 +6606,7 @@ Update dynamic block at point. @orgkey{C-u C-c C-x C-u} Update all dynamic blocks (@pxref{Dynamic blocks}). This is useful if you have several clock table blocks in a buffer. -@orgcmdkxkc{S-@key{left},S-@key{right},org-clocktable-try-shift} +@orgcmdkxkc{S-@key{LEFT},S-@key{RIGHT},org-clocktable-try-shift} Shift the current @code{:block} interval and update the table. The cursor needs to be in the @code{#+BEGIN: clocktable} line for this command. If @code{:block} is @code{today}, it will be shifted to @code{today-1} etc. @@ -6656,7 +6656,7 @@ be selected: thismonth, lastmonth, thismonth-@var{N} @r{a relative month} thisyear, lastyear, thisyear-@var{N} @r{a relative year} untilnow - @r{Use @kbd{S-@key{left}/@key{right}} keys to shift the time interval.} + @r{Use @kbd{S-@key{LEFT}/@key{RIGHT}} keys to shift the time interval.} :tstart @r{A time string specifying when to start considering times.} @r{Relative times like @code{"<-2w>"} can also be used. See} @r{@ref{Matching tags and properties} for relative time syntax.} @@ -6862,7 +6862,7 @@ In particular if you want to use this setup also in the agenda, a global setup may be advised. The way to assign estimates to individual items is then to switch to column -mode, and to use @kbd{S-@key{right}} and @kbd{S-@key{left}} to change the +mode, and to use @kbd{S-@key{RIGHT}} and @kbd{S-@key{LEFT}} to change the value. The values you enter will immediately be summed up in the hierarchy. In the column next to it, any clocked time will be displayed. @@ -8022,7 +8022,6 @@ Remove current file from the list of agenda files. @orgcmd{C-',org-cycle-agenda-files} @itemx C-, Cycle through agenda file list, visiting one file after the other. -@kindex M-x org-iswitchb @item M-x org-iswitchb RET Command to use an @code{iswitchb}-like interface to switch to and between Org buffers. @@ -8950,9 +8949,9 @@ the other commands, the cursor needs to be in the desired line. @tsubheading{Motion} @cindex motion commands in agenda @orgcmd{n,org-agenda-next-line} -Next line (same as @key{down} and @kbd{C-n}). +Next line (same as @key{DOWN} and @kbd{C-n}). @orgcmd{p,org-agenda-previous-line} -Previous line (same as @key{up} and @kbd{C-p}). +Previous line (same as @key{UP} and @kbd{C-p}). @orgcmd{N,org-agenda-next-item} Next item: same as next line, but only consider items. @orgcmd{P,org-agenda-previous-item} @@ -9103,8 +9102,8 @@ Toggle the time grid on and off. See also the variables @c @orgcmd{r,org-agenda-redo} Recreate the agenda buffer, for example to reflect the changes after -modification of the timestamps of items with @kbd{S-@key{left}} and -@kbd{S-@key{right}}. When the buffer is the global TODO list, a prefix +modification of the timestamps of items with @kbd{S-@key{LEFT}} and +@kbd{S-@key{RIGHT}}. When the buffer is the global TODO list, a prefix argument is interpreted to create a selective list for a specific TODO keyword. @orgcmd{g,org-agenda-redo} @@ -9168,8 +9167,8 @@ both in the agenda buffer and in the remote buffer. Change the TODO state of the item, both in the agenda and in the original org file. @c -@orgcmd{C-S-@key{right},org-agenda-todo-nextset} -@orgcmd{C-S-@key{left},org-agenda-todo-previousset} +@orgcmd{C-S-@key{RIGHT},org-agenda-todo-nextset} +@orgcmd{C-S-@key{LEFT},org-agenda-todo-previousset} Switch to the next/previous set of TODO keywords. @c @orgcmd{C-k,org-agenda-kill} @@ -9219,12 +9218,12 @@ the priority cookie is removed from the entry. @orgcmd{P,org-agenda-show-priority} Display weighted priority of current item. @c -@orgcmdkkc{+,S-@key{up},org-agenda-priority-up} +@orgcmdkkc{+,S-@key{UP},org-agenda-priority-up} Increase the priority of the current item. The priority is changed in the original buffer, but the agenda is not resorted. Use the @kbd{r} key for this. @c -@orgcmdkkc{-,S-@key{down},org-agenda-priority-down} +@orgcmdkkc{-,S-@key{DOWN},org-agenda-priority-down} Decrease the priority of the current item. @c @orgcmdkkc{z,C-c C-z,org-agenda-add-note} @@ -9242,19 +9241,19 @@ Schedule this item. With prefix arg remove the scheduling timestamp @orgcmd{C-c C-d,org-agenda-deadline} Set a deadline for this item. With prefix arg remove the deadline. @c -@orgcmd{S-@key{right},org-agenda-do-date-later} +@orgcmd{S-@key{RIGHT},org-agenda-do-date-later} Change the timestamp associated with the current line by one day into the future. If the date is in the past, the first call to this command will move it to today.@* With a numeric prefix argument, change it by that many days. For example, -@kbd{3 6 5 S-@key{right}} will change it by a year. With a @kbd{C-u} prefix, +@kbd{3 6 5 S-@key{RIGHT}} will change it by a year. With a @kbd{C-u} prefix, change the time by one hour. If you immediately repeat the command, it will continue to change hours even without the prefix arg. With a double @kbd{C-u C-u} prefix, do the same for changing minutes.@* The stamp is changed in the original Org file, but the change is not directly reflected in the agenda buffer. Use @kbd{r} or @kbd{g} to update the buffer. @c -@orgcmd{S-@key{left},org-agenda-do-date-earlier} +@orgcmd{S-@key{LEFT},org-agenda-do-date-earlier} Change the timestamp associated with the current line by one day into the past. @c @@ -17128,10 +17127,10 @@ Active key bindings in code blocks: @item @kbd{C-c C-c} @tab @code{org-babel-execute-src-block} @kindex C-c C-o @item @kbd{C-c C-o} @tab @code{org-babel-open-src-block-result} -@kindex M-up -@item @kbd{M-@key{up}} @tab @code{org-babel-load-in-session} -@kindex M-down -@item @kbd{M-@key{down}} @tab @code{org-babel-switch-to-session} +@kindex M-@key{UP} +@item @kbd{M-@key{UP}} @tab @code{org-babel-load-in-session} +@kindex M-@key{DOWN} +@item @kbd{M-@key{DOWN}} @tab @code{org-babel-switch-to-session} @end multitable Active key bindings in Org mode buffer: @@ -17930,23 +17929,23 @@ normal @kbd{S-@key{cursor}} for editing timestamp might be better with @multitable @columnfractions 0.15 0.2 0.1 0.2 @item @b{Default} @tab @b{Alternative 1} @tab @b{Speed key} @tab @b{Alternative 2} @item @kbd{S-@key{TAB}} @tab @kbd{C-u @key{TAB}} @tab @kbd{C} @tab -@item @kbd{M-@key{left}} @tab @kbd{C-c C-x l} @tab @kbd{l} @tab @kbd{@key{Esc} @key{left}} -@item @kbd{M-S-@key{left}} @tab @kbd{C-c C-x L} @tab @kbd{L} @tab -@item @kbd{M-@key{right}} @tab @kbd{C-c C-x r} @tab @kbd{r} @tab @kbd{@key{Esc} @key{right}} -@item @kbd{M-S-@key{right}} @tab @kbd{C-c C-x R} @tab @kbd{R} @tab -@item @kbd{M-@key{up}} @tab @kbd{C-c C-x u} @tab @kbd{ } @tab @kbd{@key{Esc} @key{up}} -@item @kbd{M-S-@key{up}} @tab @kbd{C-c C-x U} @tab @kbd{U} @tab -@item @kbd{M-@key{down}} @tab @kbd{C-c C-x d} @tab @kbd{ } @tab @kbd{@key{Esc} @key{down}} -@item @kbd{M-S-@key{down}} @tab @kbd{C-c C-x D} @tab @kbd{D} @tab +@item @kbd{M-@key{LEFT}} @tab @kbd{C-c C-x l} @tab @kbd{l} @tab @kbd{@key{Esc} @key{LEFT}} +@item @kbd{M-S-@key{LEFT}} @tab @kbd{C-c C-x L} @tab @kbd{L} @tab +@item @kbd{M-@key{RIGHT}} @tab @kbd{C-c C-x r} @tab @kbd{r} @tab @kbd{@key{Esc} @key{RIGHT}} +@item @kbd{M-S-@key{RIGHT}} @tab @kbd{C-c C-x R} @tab @kbd{R} @tab +@item @kbd{M-@key{UP}} @tab @kbd{C-c C-x u} @tab @kbd{ } @tab @kbd{@key{Esc} @key{UP}} +@item @kbd{M-S-@key{UP}} @tab @kbd{C-c C-x U} @tab @kbd{U} @tab +@item @kbd{M-@key{DOWN}} @tab @kbd{C-c C-x d} @tab @kbd{ } @tab @kbd{@key{Esc} @key{DOWN}} +@item @kbd{M-S-@key{DOWN}} @tab @kbd{C-c C-x D} @tab @kbd{D} @tab @item @kbd{S-@key{RET}} @tab @kbd{C-c C-x c} @tab @kbd{ } @tab @item @kbd{M-@key{RET}} @tab @kbd{C-c C-x m} @tab @kbd{ } @tab @kbd{@key{Esc} @key{RET}} @item @kbd{M-S-@key{RET}} @tab @kbd{C-c C-x M} @tab @kbd{ } @tab -@item @kbd{S-@key{left}} @tab @kbd{C-c @key{left}} @tab @kbd{ } @tab -@item @kbd{S-@key{right}} @tab @kbd{C-c @key{right}} @tab @kbd{ } @tab -@item @kbd{S-@key{up}} @tab @kbd{C-c @key{up}} @tab @kbd{ } @tab -@item @kbd{S-@key{down}} @tab @kbd{C-c @key{down}} @tab @kbd{ } @tab -@item @kbd{C-S-@key{left}} @tab @kbd{C-c C-x @key{left}} @tab @kbd{ } @tab -@item @kbd{C-S-@key{right}} @tab @kbd{C-c C-x @key{right}} @tab @kbd{ } @tab +@item @kbd{S-@key{LEFT}} @tab @kbd{C-c @key{LEFT}} @tab @kbd{ } @tab +@item @kbd{S-@key{RIGHT}} @tab @kbd{C-c @key{RIGHT}} @tab @kbd{ } @tab +@item @kbd{S-@key{UP}} @tab @kbd{C-c @key{UP}} @tab @kbd{ } @tab +@item @kbd{S-@key{DOWN}} @tab @kbd{C-c @key{DOWN}} @tab @kbd{ } @tab +@item @kbd{C-S-@key{LEFT}} @tab @kbd{C-c C-x @key{LEFT}} @tab @kbd{ } @tab +@item @kbd{C-S-@key{RIGHT}} @tab @kbd{C-c C-x @key{RIGHT}} @tab @kbd{ } @tab @end multitable diff --git a/doc/misc/pcl-cvs.texi b/doc/misc/pcl-cvs.texi index 1163530e7a..32c6a52487 100644 --- a/doc/misc/pcl-cvs.texi +++ b/doc/misc/pcl-cvs.texi @@ -677,7 +677,7 @@ put in @samp{cvs-status-mode}. @cindex Movement Commands @findex cvs-mode-next-line @findex cvs-mode-previous-line -@kindex SPC@r{--Move down one file} +@kindex @key{SPC}@r{--Move down one file} @kindex n@r{--Move down one file} @kindex p@r{--Move up one file} @@ -705,8 +705,8 @@ This key moves one file backward, towards the beginning of the buffer @kindex m@r{--marking a file} @kindex M@r{--marking all files} @kindex u@r{--unmark a file} -@kindex ESC DEL@r{--unmark all files} -@kindex DEL@r{--unmark previous file} +@kindex @key{ESC} @key{DEL}@r{--unmark all files} +@kindex @key{DEL}@r{--unmark previous file} @kindex %@r{--mark files matching regexp} @kindex S@r{--mark files in a particular state} @kindex T@r{--toggle marks} diff --git a/doc/misc/rcirc.texi b/doc/misc/rcirc.texi index 2437e020ee..dc715e5d68 100644 --- a/doc/misc/rcirc.texi +++ b/doc/misc/rcirc.texi @@ -154,7 +154,7 @@ deego: fsbot rules! @cindex nick completion @cindex completion of nicks -@kindex TAB +@kindex @key{TAB} Since this is so common, you can use @key{TAB} to do nick completion. @node Getting started with rcirc @@ -215,7 +215,7 @@ When you have answered these questions, @code{rcirc} will create a server buffer, which will be named something like @file{*irc.freenode.net*}, and a channel buffer for each of the channels you wanted to join. -@kindex RET +@kindex @key{RET} @cindex talking @cindex communicating To talk in a channel, just type what you want to say in a channel @@ -378,7 +378,7 @@ network. A new buffer will be created for this conversation. It works like a channel with only two members. (Also @code{/query fsbot}.) @item C-c @key{RET} -@kindex C-c RET +@kindex C-c @key{RET} @cindex /msg @cindex single message @cindex message sending @@ -617,7 +617,7 @@ daunting task. This chapters tells you how @code{rcirc} can help. @cindex modeline @comment This section copied to the Getting started with rcirc section -@kindex C-c C-SPC +@kindex C-c C-@key{SPC} @vindex rcirc-track-minor-mode @cindex switching channels @cindex tracking activity @@ -663,7 +663,7 @@ Low priority channels have the modeline indicator ``LowPri''. @kbd{C-c C-@key{SPC}} will not switch to low priority channels unless you use the @kbd{C-u} prefix. -@kindex C-c TAB +@kindex C-c @key{TAB} @cindex ignored channels If you prefer a channel to never show up in the modeline, then you have to ignore it. Use @kbd{C-c @key{TAB}} to ignore the current diff --git a/doc/misc/sc.texi b/doc/misc/sc.texi index 03ca842cd0..9faa8fea74 100644 --- a/doc/misc/sc.texi +++ b/doc/misc/sc.texi @@ -685,7 +685,7 @@ Set the preferred reference header (i.e., @code{sc-preferred-header-style}) to the currently displayed header. @item @code{sc-eref-exit} (@kbd{C-j}, @key{RET}, and @key{ESC C-c}) -@kindex RET +@kindex @key{RET} @kindex C-j @kindex q @findex sc-eref-exit diff --git a/doc/misc/sieve.texi b/doc/misc/sieve.texi index 37bb707f63..2875b163ee 100644 --- a/doc/misc/sieve.texi +++ b/doc/misc/sieve.texi @@ -124,7 +124,7 @@ bindings to manage Sieve scripts remotely. @xref{Managing Sieve}. @table @kbd @item C-c RET -@kindex C-c RET +@kindex C-c @key{RET} @findex sieve-manage @cindex manage remote sieve script Open a connection to a remote server using the Managesieve protocol. @@ -190,7 +190,7 @@ Remove currently highlighted script. @item RET @item mouse-2 @item f -@kindex RET +@kindex @key{RET} @kindex mouse-2 @kindex f @findex sieve-edit-script diff --git a/doc/misc/vhdl-mode.texi b/doc/misc/vhdl-mode.texi index c061fb8e43..5aad1c2ffe 100644 --- a/doc/misc/vhdl-mode.texi +++ b/doc/misc/vhdl-mode.texi @@ -271,7 +271,7 @@ example again. @end group @end example -@kindex TAB +@kindex @key{TAB} Let's say point is on line 3 and we hit the @key{TAB} key to re-indent the line. Remember that the syntactic component list for that line is: @@ -822,11 +822,11 @@ symbol currently recognized} @cindex Frequently Asked Questions @kindex C-x h -@kindex ESC C-\ -@kindex ESC C-q -@kindex ESC C-u -@kindex RET -@kindex LFD +@kindex @key{ESC} C-\ +@kindex @key{ESC} C-q +@kindex @key{ESC} C-u +@kindex @key{RET} +@kindex @key{LFD} @findex newline-and-indent @quotation diff --git a/doc/misc/vip.texi b/doc/misc/vip.texi index af4c05d8e4..aa55130e0e 100644 --- a/doc/misc/vip.texi +++ b/doc/misc/vip.texi @@ -186,8 +186,8 @@ M-x vip-mode @node Modes in VIP @section Modes in VIP -@kindex 032 @kbd{C-z} (@code{vip-change-mode-to-vi}) -@kindex 0301 @kbd{C-x C-z} (@code{suspend-emacs}) +@kindex 032 C-z @r{(}@code{vip-change-mode-to-vi}@r{)} +@kindex 0301 C-x C-z @r{(}@code{suspend-emacs}@r{)} Loading VIP has the effect of globally binding @kbd{C-z} (@kbd{Control-z}) to the function @code{vip-change-mode-to-vi}. The default binding of @kbd{C-z} @@ -266,7 +266,7 @@ emacs mode vi mode insert mode @node Emacs Mode @subsection Emacs Mode -@kindex 032 @kbd{C-z} (@code{vip-change-mode-to-vi}) +@kindex 032 C-z @r{(}@code{vip-change-mode-to-vi}@r{)} You will be in this mode just after you loaded VIP@. You can do all normal Emacs editing in this mode. Note that the key @kbd{C-z} is globally @@ -289,16 +289,16 @@ its content while you are in insert mode. @table @kbd @item @key{ESC} -@kindex 033 @kbd{ESC} (@code{vip-change-mode-to-vi}) (insert mode) +@kindex 033 @key{ESC} @r{(}@code{vip-change-mode-to-vi}@r{) (insert mode)} This key will take you back to vi mode. @item C-h -@kindex 010 @kbd{C-h} (@code{vip-delete-backward-char}) (insert mode) +@kindex 010 C-h @r{(}@code{vip-delete-backward-char}@r{) (insert mode)} Delete previous character. @item C-w -@kindex 027 @kbd{C-w} (@code{vip-delete-backward-word}) (insert mode) +@kindex 027 C-w @r{(}@code{vip-delete-backward-word}@r{) (insert mode)} Delete previous word. @item C-z -@kindex 032 @kbd{C-z} (@code{vip-ESC}) (insert mode) +@kindex 032 C-z @r{(}@code{vip-ESC}@r{) (insert mode)} Typing this key has the same effect as typing @key{ESC} in emacs mode. Thus typing @kbd{C-z x} in insert mode will have the same effect as typing @kbd{ESC x} in emacs mode. @@ -332,8 +332,8 @@ The major differences from Vi are explained below. @node Undoing @subsection Undoing -@kindex 165 @kbd{u} (@code{vip-undo}) -@kindex 056 @kbd{.} (@code{vip-repeat}) +@kindex 165 u @r{(}@code{vip-undo}@r{)} +@kindex 056 . @r{(}@code{vip-repeat}@r{)} You can repeat undoing by the @kbd{.} key. So, @kbd{u} will undo a single change, while @kbd{u .@: .@: .@:}, for instance, will undo 4 previous @@ -350,14 +350,14 @@ then VIP will prompt you for a new word in the minibuffer by the prompt @samp{foo => }. You can then enter @samp{bar} followed by @key{RET} or @key{ESC} to complete the command. Before you enter @key{RET} or @key{ESC} you can abort the command by typing @kbd{C-g}. In general, -@kindex 007 @kbd{C-g} (@code{vip-keyboard-quit}) +@kindex 007 C-g @r{(}@code{vip-keyboard-quit}) you can abort a partially formed command by typing @kbd{C-g}. @node Searching @subsection Searching -@kindex 057 @kbd{/} (@code{vip-search-forward}) -@kindex 077 @kbd{?} (@code{vip-search-backward}) +@kindex 057 / @r{(}@code{vip-search-forward}@r{)} +@kindex 077 ? @r{(}@code{vip-search-backward}@r{)} As in Vi, searching is done by @kbd{/} and @kbd{?}. The string will be searched literally by default. To invoke a regular expression search, @@ -372,12 +372,12 @@ the buffer as in Vi. You can change this by rebinding the variable @node z Command @subsection z Command -@kindex 1723 @kbd{z H} (@code{vip-line-to-top}) -@kindex 1721 @kbd{z RET} (@code{vip-line-to-top}) -@kindex 1723 @kbd{z M} (@code{vip-line-to-middle}) -@kindex 1722 @kbd{z .} (@code{vip-line-to-middle}) -@kindex 1723 @kbd{z L} (@code{vip-line-to-bottom}) -@kindex 1722 @kbd{z -} (@code{vip-line-to-bottom}) +@kindex 1723 z H @r{(}@code{vip-line-to-top}@r{)} +@kindex 1721 z @key{RET} @r{(}@code{vip-line-to-top}@r{)} +@kindex 1723 z M @r{(}@code{vip-line-to-middle}@r{)} +@kindex 1722 z . @r{(}@code{vip-line-to-middle}@r{)} +@kindex 1723 z L @r{(}@code{vip-line-to-bottom}@r{)} +@kindex 1722 z - @r{(}@code{vip-line-to-bottom}@r{)} For those of you who cannot remember which of @kbd{z} followed by @key{RET}, @kbd{.}@: and @kbd{-} do what. You can also use @kbd{z} followed by @kbd{H}, @@ -392,21 +392,21 @@ Some Vi commands which do not accept a count now accept one @table @kbd @item p @itemx P -@kindex 160 @kbd{p} (@code{vip-put-back}) -@kindex 120 @kbd{P} (@code{vip-Put-back}) +@kindex 160 p @r{(}@code{vip-put-back}@r{)} +@kindex 120 P @r{(}@code{vip-Put-back}@r{)} Given counts, text will be yanked (in Vi's sense) that many times. Thus @kbd{3 p} is the same as @kbd{p p p}. @item o @itemx O -@kindex 157 @kbd{o} (@code{vip-open-line}) -@kindex 117 @kbd{O} (@code{vip-Open-line}) +@kindex 157 o @r{(}@code{vip-open-line}@r{)} +@kindex 117 O @r{(}@code{vip-Open-line}@r{)} Given counts, that many copies of text will be inserted. Thus @kbd{o a b c @key{ESC}} will insert 3 lines of @samp{abc} below the current line. @item / @itemx ? -@kindex 057 @kbd{/} (@code{vip-search-forward}) -@kindex 077 @kbd{?} (@code{vip-search-backward}) +@kindex 057 / @r{(}@code{vip-search-forward}@r{)} +@kindex 077 ? @r{(}@code{vip-search-backward}@r{)} Given a count @var{n}, @var{n}-th occurrence will be searched. @end table @@ -417,7 +417,7 @@ Typing an @kbd{m} followed by a lower-case character @var{ch} marks the point to the register named @var{ch} as in Vi. In addition to these, we have following key bindings for marking. -@kindex 155 @kbd{m} (@code{vip-mark-point}) +@kindex 155 m @r{(}@code{vip-mark-point}@r{)} @table @kbd @item m < @@ -451,34 +451,34 @@ Note that the keys below (except for @kbd{R}) are not used in Vi. @table @kbd @item C-a -@kindex 001 @kbd{C-a} (@code{vip-beginning-of-line}) +@kindex 001 C-a @r{(}@code{vip-beginning-of-line}@r{)} Move point to the beginning of line. @item C-n -@kindex 016 @kbd{C-n} (@code{vip-next-window}) +@kindex 016 C-n @r{(}@code{vip-next-window}@r{)} If you have two or more windows in the screen, this key will move point to the next window. @item C-o -@kindex 017 @kbd{C-o} (@code{vip-open-line-at-point}) +@kindex 017 C-o @r{(}@code{vip-open-line-at-point}@r{)} Insert a newline and leave point before it, and then enter insert mode. @item C-r -@kindex 022 @kbd{C-r} (@code{isearch-backward}) +@kindex 022 C-r @r{(}@code{isearch-backward}@r{)} Backward incremental search. @item C-s -@kindex 023 @kbd{C-s} (@code{isearch-forward}) +@kindex 023 C-s @r{(}@code{isearch-forward}@r{)} Forward incremental search. @item C-c @itemx C-x @itemx @key{ESC} -@kindex 003 @kbd{C-c} (@code{vip-ctl-c}) -@kindex 0300 @kbd{C-x} (@code{vip-ctl-x}) -@kindex 033 @kbd{ESC} (@code{vip-ESC}) +@kindex 003 C-c @r{(}@code{vip-ctl-c}@r{)} +@kindex 0300 C-x @r{(}@code{vip-ctl-x}@r{)} +@kindex 033 @key{ESC} @r{(}@code{vip-ESC}@r{)} These keys will exit from vi mode and return to emacs mode temporarily. If you hit one of these keys, Emacs will be in emacs mode and will believe that you hit that key in emacs mode. For example, if you hit @kbd{C-x} followed by @kbd{2}, then the current window will be split into 2 and you will be in vi mode again. @item \ -@kindex 134 @kbd{\} (@code{vip-escape-to-emacs}) +@kindex 134 \ @r{(}@code{vip-escape-to-emacs}@r{)} Escape to emacs mode. Hitting @kbd{\} will take you to emacs mode, and you can execute a single Emacs command. After executing the Emacs command you will be in vi mode again. You can give a count before typing @kbd{\}. @@ -486,13 +486,13 @@ Thus @kbd{5 \ *}, as well as @kbd{\ C-u 5 *}, will insert @samp{*****} before point. Similarly @kbd{1 0 \ C-p} will move the point 10 lines above the current line. @item K -@kindex 113 @kbd{K} (@code{vip-kill-buffer}) +@kindex 113 K @r{(}@code{vip-kill-buffer}@r{)} Kill current buffer if it is not modified. Useful when you selected a buffer which you did not want. @item Q @itemx R -@kindex 121 @kbd{Q} (@code{vip-query-replace}) -@kindex 122 @kbd{R} (@code{vip-replace-string}) +@kindex 121 Q @r{(}@code{vip-query-replace}@r{)} +@kindex 122 R @r{(}@code{vip-replace-string}@r{)} @kbd{Q} is for query replace and @kbd{R} is for replace. By default, string to be replaced are treated literally. If you wish to do a regular expression replace, first do replace with empty string as the string to be @@ -500,39 +500,39 @@ replaced. In this way, you can toggle between vanilla and regular expression replacement. @item v @itemx V -@kindex 166 @kbd{v} (@code{vip-find-file}) -@kindex 126 @kbd{V} (@code{vip-find-file-other-window}) +@kindex 166 v @r{(}@code{vip-find-file}@r{)} +@kindex 126 V @r{(}@code{vip-find-file-other-window}@r{)} These keys are used to Visit files. @kbd{v} will switch to a buffer visiting file whose name can be entered in the minibuffer. @kbd{V} is similar, but will use window different from the current window. @item # -@kindex 0430 @kbd{#} (@code{vip-command-argument}) +@kindex 0430 # @r{(}@code{vip-command-argument}@r{)} If followed by a certain character @var{ch}, it becomes an operator whose argument is the region determined by the motion command that follows. Currently, @var{ch} can be one of @kbd{c}, @kbd{C}, @kbd{g}, @kbd{q} and @kbd{s}. @item # c -@kindex 0432 @kbd{# c} (@code{downcase-region}) +@kindex 0432 # c @r{(}@code{downcase-region}@r{)} Change upper-case characters in the region to lower case (@code{downcase-region}). @item # C -@kindex 0431 @kbd{# C} (@code{upcase-region}) +@kindex 0431 # C @r{(}@code{upcase-region}@r{)} Change lower-case characters in the region to upper case. For instance, @kbd{# C 3 w} will capitalize 3 words from the current point (@code{upcase-region}). @item # g -@kindex 0432 @kbd{# g} (@code{vip-global-execute}) +@kindex 0432 # g @r{(}@code{vip-global-execute}@r{)} Execute last keyboard macro for each line in the region (@code{vip-global-execute}). @item # q -@kindex 0432 @kbd{# q} (@code{vip-quote-region}) +@kindex 0432 # q @r{(}@code{vip-quote-region}@r{)} Insert specified string at the beginning of each line in the region (@code{vip-quote-region}). @item # s -@kindex 0432 @kbd{# s} (@code{spell-region}) +@kindex 0432 # s @r{(}@code{spell-region}@r{)} Check spelling of words in the region (@code{spell-region}). @item * -@kindex 052 @kbd{*} (@code{vip-call-last-kbd-macro}) +@kindex 052 * @r{(}@code{vip-call-last-kbd-macro}@r{)} Call last keyboard macro. @end table @@ -548,21 +548,21 @@ details. @table @kbd @item C-g @itemx g -@kindex 007 @kbd{C-g} (@code{vip-keyboard-quit}) -@kindex 147 @kbd{g} (@code{vip-info-on-file}) +@kindex 007 C-g @r{(}@code{vip-keyboard-quit}@r{)} +@kindex 147 g @r{(}@code{vip-info-on-file}@r{)} In Vi, @kbd{C-g} is used to get information about the file associated to the current buffer. Here, @kbd{g} will do that, and @kbd{C-g} is used to abort a command (this is for compatibility with emacs mode.) @item SPC @itemx @key{RET} -@kindex 040 @kbd{SPC} (@code{vip-scroll}) -@kindex 015 @kbd{RET} (@code{vip-scroll-back}) +@kindex 040 @key{SPC} @r{(}@code{vip-scroll}@r{)} +@kindex 015 @key{RET} @r{(}@code{vip-scroll-back}@r{)} Now these keys will scroll up and down the text of current window. Convenient for viewing the text. @item s @itemx S -@kindex 163 @kbd{s} (@code{vip-switch-to-buffer}) -@kindex 123 @kbd{S} (@code{vip-switch-to-buffer-other-window}) +@kindex 163 s @r{(}@code{vip-switch-to-buffer}@r{)} +@kindex 123 S @r{(}@code{vip-switch-to-buffer-other-window}@r{)} They are used to switch to a specified buffer. Useful for switching to already existing buffer since buffer name completion is provided. Also a default buffer will be given as part of the prompt, to which you can @@ -570,8 +570,8 @@ switch by just typing @key{RET} key. @kbd{s} is used to select buffer in the current window, while @kbd{S} selects buffer in another window. @item C @itemx X -@kindex 103 @kbd{C} (@code{vip-ctl-c-equivalent}) -@kindex 1300 @kbd{X} (@code{vip-ctl-x-equivalent}) +@kindex 103 C @r{(}@code{vip-ctl-c-equivalent}@r{)} +@kindex 1300 X @r{(}@code{vip-ctl-x-equivalent}@r{)} These keys will exit from vi mode and return to emacs mode temporarily. If you type @kbd{C} (@kbd{X}), Emacs will be in emacs mode and will believe that you have typed @kbd{C-c} (@kbd{C-x}) in emacs mode. Moreover, @@ -588,7 +588,7 @@ vi mode again. In addition to these, @code{ctl-x-map} is slightly modified: -@kindex 1301 @kbd{X 3} (@code{vip-buffer-in-two-windows}) +@kindex 1301 X 3 @r{(}@code{vip-buffer-in-two-windows}@r{)} @table @kbd @item X 3 @@ -604,19 +604,19 @@ basic functions related to windows, buffers and files. @table @kbd @item C-n -@kindex 016 @kbd{C-n} (@code{vip-next-window}) +@kindex 016 C-n @r{(}@code{vip-next-window}@r{)} Switch to next window. @item X 1 @itemx C-x 1 -@kindex 1301 @kbd{X 1} (@code{delete-other-windows}) +@kindex 1301 X 1 @r{(}@code{delete-other-windows}@r{)} Delete other windows. @item X 2 @itemx C-x 2 -@kindex 1301 @kbd{X 2} (@code{split-window-vertically}) +@kindex 1301 X 2 @r{(}@code{split-window-vertically}@r{)} Split current window into two windows. @item X 3 @itemx C-x 3 -@kindex 1301 @kbd{X 3} (@code{vip-buffer-in-two-windows}) +@kindex 1301 X 3 @r{(}@code{vip-buffer-in-two-windows}@r{)} Show current buffer in two windows. @end table @@ -625,19 +625,19 @@ Show current buffer in two windows. @table @kbd @item s -@kindex 163 @kbd{s} (@code{vip-switch-to-buffer}) +@kindex 163 s @r{(}@code{vip-switch-to-buffer}@r{)} Switch to the specified buffer in the current window (@code{vip-switch-to-buffer}). @item S -@kindex 123 @kbd{S} (@code{vip-switch-to-buffer-other-window}) +@kindex 123 S @r{(}@code{vip-switch-to-buffer-other-window}@r{)} Switch to the specified buffer in another window (@code{vip-switch-to-buffer-other-window}). @item K -@kindex 113 @kbd{K} (@code{vip-kill-buffer}) +@kindex 113 K @r{(}@code{vip-kill-buffer}@r{)} Kill the current buffer if it is not modified. @item X S @itemx C-x C-s -@kindex 1302 @kbd{X S} (@code{save-buffer}) +@kindex 1302 X S @r{(}@code{save-buffer}@r{)} Save the current buffer in the file associated to the buffer. @end table @@ -646,18 +646,18 @@ Save the current buffer in the file associated to the buffer. @table @kbd @item v -@kindex 166 @kbd{v} (@code{vip-find-file}) +@kindex 166 v @r{(}@code{vip-find-file}@r{)} Visit specified file in the current window. @item V -@kindex 126 @kbd{V} (@code{vip-find-file-other-window}) +@kindex 126 V @r{(}@code{vip-find-file-other-window}@r{)} Visit specified file in another window. @item X W @itemx C-x C-w -@kindex 1302 @kbd{X W} (@code{write-file}) +@kindex 1302 X W @r{(}@code{write-file}@r{)} Write current buffer into the specified file. @item X I @itemx C-x C-i -@kindex 1302 @kbd{X I} (@code{insert-file}) +@kindex 1302 X I @r{(}@code{insert-file}@r{)} Insert specified file at point. @end table @@ -668,18 +668,18 @@ Insert specified file at point. @table @kbd @item X ( @itemx C-x ( -@kindex 1301 @kbd{X (} (@code{start-kbd-macro}) +@kindex 1301 X ( @r{(}@code{start-kbd-macro}@r{)} Start remembering keyboard macro. @item X ) @itemx C-x ) -@kindex 1301 @kbd{X )} (@code{end-kbd-macro}) +@kindex 1301 X ) @r{(}@code{end-kbd-macro}@r{)} Finish remembering keyboard macro. @item * -@kindex 052 @kbd{*} (@code{vip-call-last-kbd-macro}) +@kindex 052 * @r{(}@code{vip-call-last-kbd-macro}@r{)} Call last remembered keyboard macro. @item X Z @itemx C-x C-z -@kindex 1302 @kbd{X Z} (@code{suspend-emacs}) +@kindex 1302 X Z @r{(}@code{suspend-emacs}@r{)} Suspend Emacs. @item Z Z Exit Emacs. @@ -715,15 +715,15 @@ commands described in this chapter are to be used in vi mode. @cindex numeric arguments @cindex count -@kindex 061 @kbd{1} (numeric argument) -@kindex 062 @kbd{2} (numeric argument) -@kindex 063 @kbd{3} (numeric argument) -@kindex 064 @kbd{4} (numeric argument) -@kindex 065 @kbd{5} (numeric argument) -@kindex 066 @kbd{6} (numeric argument) -@kindex 067 @kbd{7} (numeric argument) -@kindex 068 @kbd{8} (numeric argument) -@kindex 069 @kbd{9} (numeric argument) +@kindex 061 1 @r{(numeric argument)} +@kindex 062 2 @r{(numeric argument)} +@kindex 063 3 @r{(numeric argument)} +@kindex 064 4 @r{(numeric argument)} +@kindex 065 5 @r{(numeric argument)} +@kindex 066 6 @r{(numeric argument)} +@kindex 067 7 @r{(numeric argument)} +@kindex 068 8 @r{(numeric argument)} +@kindex 069 9 @r{(numeric argument)} Most Vi commands accept a @dfn{numeric argument} which can be supplied as a prefix to the commands. A numeric argument is also called a @dfn{count}. @@ -739,10 +739,10 @@ functions are the same in any of emacs, vi and insert mode. @table @kbd @item C-g -@kindex 007 @kbd{C-g} (@code{vip-keyboard-quit}) +@kindex 007 C-g (@code{vip-keyboard-quit}@r{)} Quit. Cancel running or partially typed command (@code{keyboard-quit}). @item C-l -@kindex 014 @kbd{C-l} (@code{recenter}) +@kindex 014 C-l @r{(}@code{recenter}@r{)} Clear the screen and reprint everything (@code{recenter}). @end table @@ -754,9 +754,9 @@ accessed from vi mode as easily as from emacs mode. @item C-x @itemx C-c @itemx @key{ESC} -@kindex 003 @kbd{C-c} (@code{vip-ctl-c}) -@kindex 0300 @kbd{C-x} (@code{vip-ctl-x}) -@kindex 033 @kbd{ESC} (@code{vip-ESC}) +@kindex 003 C-c @r{(}@code{vip-ctl-c}@r{)} +@kindex 0300 C-x @r{(}@code{vip-ctl-x}@r{)} +@kindex 033 @key{ESC} @r{(}@code{vip-ESC}@r{)} Typing one of these keys have the same effect as typing it in emacs mode. Appropriate command will be executed according as the keys you type after it. You will be in vi mode again after the execution of the command. @@ -764,8 +764,8 @@ For instance, if you type @kbd{@key{ESC} <} (in vi mode) then the cursor will move to the beginning of the buffer and you will still be in vi mode. @item C @itemx X -@kindex 103 @kbd{C} (@code{vip-ctl-c-equivalent}) -@kindex 1300 @kbd{X} (@code{vip-ctl-x-equivalent}) +@kindex 103 C @r{(}@code{vip-ctl-c-equivalent}@r{)} +@kindex 1300 X @r{(}@code{vip-ctl-x-equivalent}@r{)} Typing one of these keys have the effect of typing the corresponding control character in emacs mode. Moreover, if you type an upper-case character following it, that character will also be translated to the @@ -773,7 +773,7 @@ corresponding control character. Thus typing @kbd{X W} in vi mode is the same as typing @kbd{C-x C-w} in emacs mode. You will be in vi mode again after the execution of a command. @item \ -@kindex 134 @kbd{\} (@code{vip-escape-to-emacs}) +@kindex 134 \ @r{(}@code{vip-escape-to-emacs}@r{)} Escape to emacs mode. Hitting the @kbd{\} key will take you to emacs mode, and you can execute a single Emacs command. After executing the Emacs command you will be in vi mode again. You can give a count before @@ -810,31 +810,31 @@ We have the following commands related to windows and buffers. @table @kbd @item C-n -@kindex 016 @kbd{C-n} (@code{vip-next-window}) +@kindex 016 C-n @r{(}@code{vip-next-window}@r{)} Move cursor to the next-window (@code{vip-next-window}). @item X 1 -@kindex 1301 @kbd{X 1} (@code{delete-other-windows}) +@kindex 1301 X 1 @r{(}@code{delete-other-windows}@r{)} Delete other windows and make the selected window fill the screen @*(@code{delete-other-windows}). @item X 2 -@kindex 1301 @kbd{X 2} (@code{split-window-vertically}) +@kindex 1301 X 2 @r{(}@code{split-window-vertically}@r{)} Split current window into two windows (@code{split-window-vertically}). @item X 3 -@kindex 1301 @kbd{X 3} (@code{vip-buffer-in-two-windows}) +@kindex 1301 X 3 @r{(}@code{vip-buffer-in-two-windows}@r{)} Show current buffer in two windows. @item s @var{buffer} @key{RET} -@kindex 163 @kbd{s} (@code{vip-switch-to-buffer}) +@kindex 163 s @r{(}@code{vip-switch-to-buffer}@r{)} Select or create a buffer named @var{buffer} (@code{vip-switch-to-buffer}). @item S @var{buffer} @key{RET} -@kindex 123 @kbd{S} (@code{vip-switch-to-buffer-other-window}) +@kindex 123 S @r{(}@code{vip-switch-to-buffer-other-window}@r{)} Similar but select a buffer named @var{buffer} in another window @*(@code{vip-switch-to-buffer-other-window}). @item K -@kindex 113 @kbd{K} (@code{vip-kill-buffer}) +@kindex 113 K @r{(}@code{vip-kill-buffer}@r{)} Kill the current buffer if it is not modified or if it is not associated with a file @*(@code{vip-kill-buffer}). @item X B -@kindex 1302 @kbd{X B} (@code{list-buffers}) +@kindex 1302 X B @r{(}@code{list-buffers}@r{)} List the existing buffers (@code{list-buffers}). @end table @@ -856,24 +856,24 @@ save and insert files. @table @kbd @item v @var{file} @key{RET} -@kindex 166 @kbd{v} (@code{vip-find-file}) +@kindex 166 v @r{(}@code{vip-find-file}@r{)} Visit specified file in the current window (@code{vip-find-file}). @item V @var{file} @key{RET} -@kindex 126 @kbd{V} (@code{vip-find-file-other-window}) +@kindex 126 V @r{(}@code{vip-find-file-other-window}@r{)} Visit specified file in another window (@code{vip-find-file-other-window}). @item X S -@kindex 1302 @kbd{X S} (@code{save-buffer}) +@kindex 1302 X S @r{(}@code{save-buffer}@r{)} Save current buffer to the file associated with the buffer. If no file is associated with the buffer, the name of the file to write out the content of the buffer will be asked in the minibuffer. @item X W @var{file} @key{RET} -@kindex 1302 @kbd{X W} (@code{write-file}) +@kindex 1302 X W @r{(}@code{write-file}@r{)} Write current buffer into a specified file. @item X I @var{file} @key{RET} -@kindex 1302 @kbd{X I} (@code{insert-file}) +@kindex 1302 X I @r{(}@code{insert-file}@r{)} Insert a specified file at point. @item g -@kindex 147 @kbd{g} (@code{vip-info-on-file}) +@kindex 147 g @r{(}@code{vip-info-on-file}@r{)} Give information on the file associated with the current buffer. Tell you the name of the file associated with the buffer, the line number of the current point and total line numbers in the buffer. If no file is @@ -940,29 +940,29 @@ buffer. @table @kbd @item @key{SPC} @itemx C-f -@kindex 040 @kbd{SPC} (@code{vip-scroll}) -@kindex 006 @kbd{C-f} (@code{vip-scroll-back}) +@kindex 040 @key{SPC} @r{(}@code{vip-scroll}@r{)} +@kindex 006 C-f @r{(}@code{vip-scroll-back}@r{)} Scroll text of current window upward almost full screen. You can go @i{forward} in the buffer by this command (@code{vip-scroll}). @item @key{RET} @itemx C-b -@kindex 015 @kbd{RET} (@code{vip-scroll-back}) -@kindex 002 @kbd{C-b} (@code{vip-scroll-back}) +@kindex 015 @key{RET} @r{(}@code{vip-scroll-back}@r{)} +@kindex 002 C-b @r{(}@code{vip-scroll-back}@r{)} Scroll text of current window downward almost full screen. You can go @i{backward} in the buffer by this command (@code{vip-scroll-back}). @item C-d -@kindex 004 @kbd{C-d} (@code{vip-scroll-up}) +@kindex 004 C-d @r{(}@code{vip-scroll-up}@r{)} Scroll text of current window upward half screen. You can go @i{down} in the buffer by this command (@code{vip-scroll-down}). @item C-u -@kindex 025 @kbd{C-u} (@code{vip-scroll-down}) +@kindex 025 C-u @r{(}@code{vip-scroll-down}@r{)} Scroll text of current window downward half screen. You can go @i{up} in the buffer by this command (@code{vip-scroll-up}). @item C-y -@kindex 031 @kbd{C-y} (@code{vip-scroll-down-one}) +@kindex 031 C-y @r{(}@code{vip-scroll-down-one}@r{)} Scroll text of current window upward by one line (@code{vip-scroll-down-one}). @item C-e -@kindex 005 @kbd{C-e} (@code{vip-scroll-up-one}) +@kindex 005 C-e @r{(}@code{vip-scroll-up-one}@r{)} Scroll text of current window downward by one line (@code{vip-scroll-up-one}). @end table @noindent @@ -974,22 +974,22 @@ The following commands reposition point in the window. @table @kbd @item z H @itemx z @key{RET} -@kindex 1723 @kbd{z H} (@code{vip-line-to-top}) -@kindex 1721 @kbd{z RET} (@code{vip-line-to-top}) +@kindex 1723 z H @r{(}@code{vip-line-to-top}@r{)} +@kindex 1721 z @key{RET} @r{(}@code{vip-line-to-top}@r{)} Put point on the top (@i{home}) line in the window. So the current line becomes the top line in the window. Given a count @var{n}, point will be placed in the @var{n}-th line from top (@code{vip-line-to-top}). @item z M @itemx z . -@kindex 1723 @kbd{z M} (@code{vip-line-to-middle}) -@kindex 1722 @kbd{z .} (@code{vip-line-to-middle}) +@kindex 1723 z M @r{(}@code{vip-line-to-middle}@r{)} +@kindex 1722 z . @r{(}@code{vip-line-to-middle}@r{)} Put point on the @i{middle} line in the window. Given a count @var{n}, point will be placed in the @var{n}-th line from the middle line (@code{vip-line-to-middle}). @item z L @itemx z - -@kindex 1723 @kbd{z L} (@code{vip-line-to-bottom}) -@kindex 1722 @kbd{z -} (@code{vip-line-to-bottom}) +@kindex 1723 z L @r{(}@code{vip-line-to-bottom}@r{)} +@kindex 1722 z - @r{(}@code{vip-line-to-bottom}@r{)} Put point on the @i{bottom} line in the window. Given a count @var{n}, point will be placed in the @var{n}-th line from bottom (@code{vip-line-to-bottom}). @@ -1004,7 +1004,7 @@ The following commands are used to mark positions in the buffer. @table @kbd @item m @var{ch} -@kindex 155 @kbd{m} (@code{vip-mark-point}) +@kindex 155 m @r{(}@code{vip-mark-point}@r{)} Store current point in the register @var{ch}. @var{ch} must be a lower-case @acronym{ASCII} letter. @item m < @@ -1034,31 +1034,31 @@ to be described in the next section. @table @kbd @item h -@kindex 150 @kbd{h} (@code{vip-backward-char}) +@kindex 150 h @r{(}@code{vip-backward-char}@r{)} Move point backward by one character. Signal error if point is at the beginning of buffer, but (unlike Vi) do not complain otherwise (@code{vip-backward-char}). @item l -@kindex 154 @kbd{l} (@code{vip-forward-char}) +@kindex 154 l @r{(}@code{vip-forward-char}@r{)} Move point backward by one character. Signal error if point is at the end of buffer, but (unlike Vi) do not complain otherwise (@code{vip-forward-char}). @item j -@kindex 152 @kbd{j} (@code{vip-next-line}) +@kindex 152 j @r{(}@code{vip-next-line}@r{)} Move point to the next line keeping the current column. If point is on the last line of the buffer, a new line will be created and point will move to that line (@code{vip-next-line}). @item k -@kindex 153 @kbd{k} (@code{vip-previous-line}) +@kindex 153 k @r{(}@code{vip-previous-line}@r{)} Move point to the previous line keeping the current column (@code{vip-next-line}). @item + -@kindex 053 @kbd{+} (@code{vip-next-line-at-bol}) +@kindex 053 + @r{(}@code{vip-next-line-at-bol}@r{)} Move point to the next line at the first non-white character. If point is on the last line of the buffer, a new line will be created and point will move to the beginning of that line (@code{vip-next-line-at-bol}). @item - -@kindex 055 @kbd{-} (@code{vip-previous-line-at-bol}) +@kindex 055 - @r{(}@code{vip-previous-line-at-bol}@r{)} Move point to the previous line at the first non-white character (@code{vip-previous-line-at-bol}). @end table @@ -1068,17 +1068,17 @@ many times. @table @kbd @item 0 -@kindex 060 @kbd{0} (@code{vip-beginning-of-line}) +@kindex 060 0 @r{(}@code{vip-beginning-of-line}@r{)} Move point to the beginning of line (@code{vip-beginning-of-line}). @item ^ -@kindex 136 @kbd{^} (@code{vip-bol-and-skip-white}) +@kindex 136 ^ @r{(}@code{vip-bol-and-skip-white}@r{)} Move point to the first non-white character on the line (@code{vip-bol-and-skip-white}). @item $ -@kindex 044 @kbd{$} (@code{vip-goto-eol}) +@kindex 044 $ @r{(}@code{vip-goto-eol}@r{)} Move point to the end of line (@code{vip-goto-eol}). @item @var{n} | -@kindex 174 @kbd{|} (@code{vip-goto-col}) +@kindex 174 | @r{(}@code{vip-goto-col}@r{)} Move point to the @var{n}-th column on the line (@code{vip-goto-col}). @end table @noindent @@ -1088,25 +1088,25 @@ Except for the @kbd{|} command, these commands neglect a count. @table @kbd @item w -@kindex 167 @kbd{w} (@code{vip-forward-word}) +@kindex 167 w @r{(}@code{vip-forward-word}@r{)} Move point forward to the beginning of the next word (@code{vip-forward-word}). @item W -@kindex 127 @kbd{W} (@code{vip-forward-Word}) +@kindex 127 W @r{(}@code{vip-forward-Word}@r{)} Move point forward to the beginning of the next word, where a @dfn{word} is considered as a sequence of non-white characters (@code{vip-forward-Word}). @item b -@kindex 142 @kbd{b} (@code{vip-backward-word}) +@kindex 142 b @r{(}@code{vip-backward-word}@r{)} Move point backward to the beginning of a word (@code{vip-backward-word}). @item B -@kindex 102 @kbd{B} (@code{vip-backward-Word}) +@kindex 102 B @r{(}@code{vip-backward-Word}@r{)} Move point backward to the beginning of a word, where a @i{word} is considered as a sequence of non-white characters (@code{vip-forward-Word}). @item e -@kindex 145 @kbd{e} (@code{vip-end-of-word}) +@kindex 145 e @r{(}@code{vip-end-of-word}@r{)} Move point forward to the end of a word (@code{vip-end-of-word}). @item E -@kindex 105 @kbd{E} (@code{vip-end-of-Word}) +@kindex 105 E @r{(}@code{vip-end-of-Word}@r{)} Move point forward to the end of a word, where a @i{word} is considered as a sequence of non-white characters (@code{vip-end-of-Word}). @end table @@ -1120,17 +1120,17 @@ details of syntax table. @table @kbd @item H -@kindex 110 @kbd{H} (@code{vip-window-top}) +@kindex 110 H @r{(}@code{vip-window-top}@r{)} Move point to the beginning of the @i{home} (top) line of the window. Given a count @var{n}, go to the @var{n}-th line from top (@code{vip-window-top}). @item M -@kindex 115 @kbd{M} (@code{vip-window-middle}) +@kindex 115 M @r{(}@code{vip-window-middle}@r{)} Move point to the beginning of the @i{middle} line of the window. Given a count @var{n}, go to the @var{n}-th line from the middle line (@code{vip-window-middle}). @item L -@kindex 114 @kbd{L} (@code{vip-window-bottom}) +@kindex 114 L @r{(}@code{vip-window-bottom}@r{)} Move point to the beginning of the @i{lowest} (bottom) line of the window. Given count, go to the @var{n}-th line from bottom (@code{vip-window-bottom}). @@ -1140,19 +1140,19 @@ These commands can be used to go to the desired line visible on the screen. @table @kbd @item ( -@kindex 050 @kbd{(} (@code{vip-backward-sentence}) +@kindex 050 ( @r{(}@code{vip-backward-sentence}@r{)} Move point backward to the beginning of the sentence (@code{vip-backward-sentence}). @item ) -@kindex 051 @kbd{)} (@code{vip-forward-sentence}) +@kindex 051 ) @r{(}@code{vip-forward-sentence}@r{)} Move point forward to the end of the sentence (@code{vip-forward-sentence}). @item @{ -@kindex 173 @kbd{@{} (@code{vip-backward-paragraph}) +@kindex 173 @{ @r{(}@code{vip-backward-paragraph}@r{)} Move point backward to the beginning of the paragraph (@code{vip-backward-paragraph}). @item @} -@kindex 175 @kbd{@}} (@code{vip-forward-paragraph}) +@kindex 175 @} @r{(}@code{vip-forward-paragraph}@r{)} Move point forward to the end of the paragraph (@code{vip-forward-paragraph}). @end table @@ -1161,25 +1161,25 @@ A count repeats the effect for these commands. @table @kbd @item G -@kindex 107 @kbd{G} (@code{vip-goto-line}) +@kindex 107 G @r{(}@code{vip-goto-line}@r{)} Given a count @var{n}, move point to the @var{n}-th line in the buffer on the first non-white character. Without a count, go to the end of the buffer (@code{vip-goto-line}). @item ` ` -@kindex 140 @kbd{`} (@code{vip-goto-mark}) +@kindex 140 ` @r{(}@code{vip-goto-mark}@r{)} Exchange point and mark (@code{vip-goto-mark}). @item ` @var{ch} Move point to the position stored in the register @var{ch}. @var{ch} must be a lower-case letter. @item ' ' -@kindex 047 @kbd{'} (@code{vip-goto-mark-and-skip-white}) +@kindex 047 ' @r{(}@code{vip-goto-mark-and-skip-white}@r{)} Exchange point and mark, and then move point to the first non-white character on the line (@code{vip-goto-mark-and-skip-white}). @item ' @var{ch} Move point to the position stored in the register @var{ch} and skip to the first non-white character on the line. @var{ch} must be a lower-case letter. @item % -@kindex 045 @kbd{%} (@code{vip-paren-match}) +@kindex 045 % @r{(}@code{vip-paren-match}@r{)} Move point to the matching parenthesis if point is looking at @kbd{(}, @kbd{)}, @kbd{@{}, @kbd{@}}, @kbd{[} or @kbd{]} @*(@code{vip-paren-match}). @@ -1194,27 +1194,27 @@ will repeat the effect. @table @kbd @item f @var{ch} -@kindex 146 @kbd{f} (@code{vip-find-char-forward}) +@kindex 146 f @r{(}@code{vip-find-char-forward}@r{)} Move point forward to the character @var{ch} on the line. Signal error if @var{ch} could not be found (@code{vip-find-char-forward}). @item F @var{ch} -@kindex 106 @kbd{F} (@code{vip-find-char-backward}) +@kindex 106 F @r{(}@code{vip-find-char-backward}@r{)} Move point backward to the character @var{ch} on the line. Signal error if @var{ch} could not be found (@code{vip-find-char-backward}). @item t @var{ch} -@kindex 164 @kbd{t} (@code{vip-goto-char-forward}) +@kindex 164 t @r{(}@code{vip-goto-char-forward}@r{)} Move point forward upto the character @var{ch} on the line. Signal error if @var{ch} could not be found (@code{vip-goto-char-forward}). @item T @var{ch} -@kindex 124 @kbd{T} (@code{vip-goto-char-backward}) +@kindex 124 T @r{(}@code{vip-goto-char-backward}@r{)} Move point backward upto the character @var{ch} on the line. Signal error if @var{ch} could not be found (@code{vip-goto-char-backward}). @item ; -@kindex 073 @kbd{;} (@code{vip-repeat-find}) +@kindex 073 ; @r{(}@code{vip-repeat-find}@r{)} Repeat previous @kbd{f}, @kbd{t}, @kbd{F} or @kbd{T} command (@code{vip-repeat-find}). @item , -@kindex 054 @kbd{,} (@code{vip-repeat-find-opposite}) +@kindex 054 , @r{(}@code{vip-repeat-find-opposite}@r{)} Repeat previous @kbd{f}, @kbd{t}, @kbd{F} or @kbd{T} command, in the opposite direction (@code{vip-repeat-find-opposite}). @end table @@ -1228,7 +1228,7 @@ Following commands are available for searching and replacing. @table @kbd @item / @var{string} @key{RET} -@kindex 057 @kbd{/} (@code{vip-search-forward}) +@kindex 057 / @r{(}@code{vip-search-forward}@r{)} Search the first occurrence of the string @var{string} forward starting from point. Given a count @var{n}, the @var{n}-th occurrence of @var{string} will be searched. If the variable @code{vip-re-search} has value @@ -1238,28 +1238,28 @@ empty string as @var{string} then the search mode will change from vanilla search to regular expression search and vice versa (@code{vip-search-forward}). @item ? @var{string} @key{RET} -@kindex 077 @kbd{?} (@code{vip-search-backward}) +@kindex 077 ? @r{(}@code{vip-search-backward}@r{)} Same as @kbd{/}, except that search is done backward (@code{vip-search-backward}). @item n -@kindex 156 @kbd{n} (@code{vip-search-next}) +@kindex 156 n @r{(}@code{vip-search-next}@r{)} Search the previous search pattern in the same direction as before (@code{vip-search-next}). @item N -@kindex 116 @kbd{N} (@code{vip-search-Next}) +@kindex 116 N @r{(}@code{vip-search-Next}@r{)} Search the previous search pattern in the opposite direction (@code{vip-search-Next}). @item C-s -@kindex 023 @kbd{C-s} (@code{isearch-forward}) +@kindex 023 C-s @r{(}@code{isearch-forward}@r{)} Search forward incrementally. See GNU Emacs Manual for details (@code{isearch-forward}). @item C-r -@kindex 022 @kbd{C-r} (@code{isearch-backward}) +@kindex 022 C-r @r{(}@code{isearch-backward}@r{)} Search backward incrementally (@code{isearch-backward}). @cindex vanilla (replacement) @cindex regular expression (replacement) @item R @var{string} RET @var{newstring} -@kindex 122 @kbd{R} (@code{vip-replace-string}) +@kindex 122 R @r{(}@code{vip-replace-string}@r{)} There are two modes of replacement, @dfn{vanilla} and @dfn{regular expression}. If the mode is @i{vanilla} you will get a prompt @samp{Replace string:}, and if the mode is @i{regular expression} you will ge a prompt @@ -1270,12 +1270,12 @@ vanilla, this command replaces every occurrence of @var{string} with treated as a regular expression and every string matching the regular expression is replaced with @var{newstring} (@code{vip-replace-string}). @item Q @var{string} RET @var{newstring} -@kindex 121 @kbd{Q} (@code{vip-query-replace}) +@kindex 121 Q @r{(}@code{vip-query-replace}@r{)} Same as @kbd{R} except that you will be asked form confirmation before each replacement @*(@code{vip-query-replace}). @item r @var{ch} -@kindex 162 @kbd{r} (@code{vip-replace-char}) +@kindex 162 r @r{(}@code{vip-replace-char}@r{)} Replace the character point is looking at by the character @var{ch}. Give count, replace that many characters by @var{ch} (@code{vip-replace-char}). @end table @@ -1326,7 +1326,7 @@ command. @table @kbd @item d @var{motion-command} -@kindex 1440 @kbd{d} (@code{vip-command-argument}) +@kindex 1440 d @r{(}@code{vip-command-argument}@r{)} Delete the region determined by the motion command @var{motion-command}. @end table @noindent @@ -1337,7 +1337,7 @@ end of the buffer, since @kbd{G} is a line command. A count given to the command above will become the count for the associated motion command. Thus, @kbd{3 d w} will delete three words. -@kindex 042 @kbd{"} (@code{vip-command-argument}) +@kindex 042 " @r{(}@code{vip-command-argument}@r{)} It is also possible to save the deleted text into a register you specify. For example, you can say @kbd{" t 3 d w} to delete three words and save it to register @kbd{t}. The name of a register is a lower-case letter between @@ -1352,23 +1352,23 @@ We have more delete commands as below. @table @kbd @item d d -@kindex 1442 @kbd{d d} +@kindex 1442 d d Delete a line. Given a count @var{n}, delete @var{n} lines. @item d r -@kindex 1442 @kbd{d r} +@kindex 1442 d r Delete current region. @item d R -@kindex 1441 @kbd{d R} +@kindex 1441 d R Expand current region and delete it. @item D -@kindex 104 @kbd{D} (@code{vip-kill-line}) +@kindex 104 D @r{(}@code{vip-kill-line}@r{)} Delete to the end of a line (@code{vip-kill-line}). @item x -@kindex 170 @kbd{x} (@code{vip-delete-char}) +@kindex 170 x @r{(}@code{vip-delete-char}@r{)} Delete a character after point. Given @var{n}, delete @var{n} characters (@code{vip-delete-char}). @item @key{DEL} -@kindex 177 @kbd{DEL} (@code{vip-delete-backward-char}) +@kindex 177 @key{DEL} @r{(}@code{vip-delete-backward-char}@r{)} Delete a character before point. Given @var{n}, delete @var{n} characters (@code{vip-delete-backward-char}). @end table @@ -1385,7 +1385,7 @@ commands that put back the yanked text into the buffer. @table @kbd @item y @var{motion-command} -@kindex 1710 @kbd{y} (@code{vip-command-argument}) +@kindex 1710 y @r{(}@code{vip-command-argument}@r{)} Yank the region determined by the motion command @var{motion-command}. @end table @noindent @@ -1398,14 +1398,14 @@ Use the following command to yank consecutive lines of text. @table @kbd @item y y @itemx Y -@kindex 131 @kbd{Y} (@code{vip-yank-line}) -@kindex 1712 @kbd{y y} (@code{vip-yank-line}) +@kindex 131 Y @r{(}@code{vip-yank-line}@r{)} +@kindex 1712 y y @r{(}@code{vip-yank-line}@r{)} Yank a line. Given @var{n}, yank @var{n} lines (@code{vip-yank-line}). @item y r -@kindex 1712 @kbd{y r} +@kindex 1712 y r Yank current region. @item y R -@kindex 1711 @kbd{y R} +@kindex 1711 y R Expand current region and yank it. @end table @@ -1416,7 +1416,7 @@ below. @table @kbd @item p -@kindex 160 @kbd{p} (@code{vip-put-back}) +@kindex 160 p @r{(}@code{vip-put-back}@r{)} Insert, after the character point is looking at, most recently deleted/yanked text from anonymous register. Given a register name argument, the content of the named register will be put back. Given a @@ -1424,7 +1424,7 @@ count, the command will be repeated that many times. This command also checks if the text to put back ends with a new line character, and if so the text will be put below the current line (@code{vip-put-back}). @item P -@kindex 120 @kbd{P} (@code{vip-Put-back}) +@kindex 120 P @r{(}@code{vip-Put-back}@r{)} Insert at point most recently deleted/yanked text from anonymous register. Given a register name argument, the content of the named register will be put back. Given a count, the command will be repeated that many times. @@ -1447,7 +1447,7 @@ Most commonly used change command takes the following form. @table @kbd @item c @var{motion-command} -@kindex 1430 @kbd{c} (@code{vip-command-argument}) +@kindex 1430 c @r{(}@code{vip-command-argument}@r{)} Replace the content of the region determined by the motion command @var{motion-command} by the text you type. If the motion command is a point command then you will type the text into minibuffer, and if the @@ -1463,13 +1463,13 @@ command. @table @kbd @item c c -@kindex 1432 @kbd{c c} +@kindex 1432 c c Change a line. Given a count, that many lines are changed. @item c r -@kindex 1432 @kbd{c r} +@kindex 1432 c r Change current region. @item c R -@kindex 1431 @kbd{c R} +@kindex 1431 c R Expand current region and change it. @end table @@ -1481,13 +1481,13 @@ it. It is also very easy to undo changes made by modifying commands. @table @kbd @item u -@kindex 165 @kbd{u} (@code{vip-undo}) +@kindex 165 u @r{(}@code{vip-undo}@r{)} Undo the last change. You can undo more by repeating undo by the repeat command @samp{.}. For example, you can undo 5 previous changes by typing @samp{u....}. If you type @samp{uu}, then the second @samp{u} undoes the first undo command (@code{vip-undo}). @item . -@kindex 056 @kbd{.} (@code{vip-repeat}) +@kindex 056 . @r{(}@code{vip-repeat}@r{)} Repeat the last modifying command. Given count @var{n} it becomes the new count for the repeated command. Otherwise, the count for the last modifying command is used again (@code{vip-repeat}). @@ -1500,12 +1500,12 @@ Miscellaneous Vi commands are collected here. @table @kbd @item Z Z -@kindex 132 @kbd{Z Z} (@code{save-buffers-kill-emacs}) +@kindex 132 Z Z @r{(}@code{save-buffers-kill-emacs}@r{)} Exit Emacs. If modified buffers exist, you will be asked whether you wish to save them or not (@code{save-buffers-kill-emacs}). @item !@: @var{motion-command} @var{format-command} @itemx @var{n} !@: !@: @var{format-command} -@kindex 041 @kbd{!} (@code{vip-command-argument}) +@kindex 041 ! @r{(}@code{vip-command-argument}@r{)} The region determined by the motion command @var{motion-command} will be given to the shell command @var{format-command} and the region will be replaced by its output. If a count is given, it will be passed to @@ -1514,30 +1514,30 @@ between point and the 3rd line. If @kbd{!} is used instead of @var{motion-command} then @var{n} lines will be processed by @var{format-command} (@code{vip-command-argument}). @item J -@kindex 112 @kbd{J} (@code{vip-join-lines}) +@kindex 112 J @r{(}@code{vip-join-lines}@r{)} Join two lines. Given count, join that many lines. A space will be inserted at each junction (@code{vip-join-lines}). @item < @var{motion-command} @itemx @var{n} < < -@kindex 074 @kbd{<} (@code{vip-command-argument}) +@kindex 074 < @r{(}@code{vip-command-argument}@r{)} Shift region determined by the motion command @var{motion-command} to left by @var{shift-width} (default is 8). If @kbd{<} is used instead of @var{motion-command} then shift @var{n} lines @*(@code{vip-command-argument}). @item > @var{motion-command} @itemx @var{n} > > -@kindex 076 @kbd{>} (@code{vip-command-argument}) +@kindex 076 > @r{(}@code{vip-command-argument}@r{)} Shift region determined by the motion command @var{motion-command} to right by @var{shift-width} (default is 8). If @kbd{<} is used instead of @var{motion-command} then shift @var{n} lines @*(@code{vip-command-argument}). @item = @var{motion-command} -@kindex 075 @kbd{=} (@code{vip-command-argument}) +@kindex 075 = @r{(}@code{vip-command-argument}@r{)} Indent region determined by the motion command @var{motion-command}. If @kbd{=} is used instead of @var{motion-command} then indent @var{n} lines (@code{vip-command-argument}). @item * -@kindex 052 @kbd{*} (@code{vip-call-last-kbd-macro}) +@kindex 052 * @r{(}@code{vip-call-last-kbd-macro}@r{)} Call last remembered keyboard macro. @item # A new vi operator. @xref{New Commands}, for more details. @@ -1546,14 +1546,14 @@ A new vi operator. @xref{New Commands}, for more details. The following keys are reserved for future extensions, and currently assigned to a function that just beeps (@code{vip-nil}). -@kindex 046 @kbd{&} (@code{vip-nil}) -@kindex 100 @kbd{@@} (@code{vip-nil}) -@kindex 125 @kbd{U} (@code{vip-nil}) -@kindex 133 @kbd{[} (@code{vip-nil}) -@kindex 135 @kbd{]} (@code{vip-nil}) -@kindex 137 @kbd{_} (@code{vip-nil}) -@kindex 161 @kbd{q} (@code{vip-nil}) -@kindex 176 @kbd{~} (@code{vip-nil}) +@kindex 046 & @r{(}@code{vip-nil}@r{)} +@kindex 100 @@ @r{(}@code{vip-nil}@r{)} +@kindex 125 U @r{(}@code{vip-nil}@r{)} +@kindex 133 [ @r{(}@code{vip-nil}@r{)} +@kindex 135 ] @r{(}@code{vip-nil}@r{)} +@kindex 137 _ @r{(}@code{vip-nil}@r{)} +@kindex 161 q @r{(}@code{vip-nil}@r{)} +@kindex 176 ~ @r{(}@code{vip-nil}@r{)} @example &, @@, U, [, ], _, q, ~ @@ -1567,48 +1567,48 @@ keymap. See GNU Emacs Manual for details. @table @kbd @item C-@@ -@kindex 000 @kbd{C-@@} (@code{set-mark-command}) +@kindex 000 C-@@ @r{(}@code{set-mark-command}@r{)} Set mark and push previous mark on mark ring (@code{set-mark-command}). @item TAB -@kindex 011 TAB (@code{indent-for-tab-command}) +@kindex 011 @key{TAB} @r{(}@code{indent-for-tab-command}@r{)} Indent line for current major mode (@code{indent-for-tab-command}). @item C-j -@kindex 012 @kbd{C-j} (@code{electric-newline-and-maybe-indent}) +@kindex 012 C-j @r{(}@code{electric-newline-and-maybe-indent}@r{)} Insert a newline, and maybe indent according to mode. @item C-k -@kindex 013 @kbd{C-k} (@code{kill-line}) +@kindex 013 C-k @r{(}@code{kill-line}@r{)} Kill the rest of the current line; before a newline, kill the newline. With a numeric argument, kill that many lines from point. Negative arguments kill lines backward (@code{kill-line}). @item C-l -@kindex 014 @kbd{C-l} (@code{recenter}) +@kindex 014 C-l @r{(}@code{recenter}@r{)} Clear the screen and reprint everything (@code{recenter}). @item @var{n} C-p -@kindex 020 @kbd{C-p} (@code{previous-line}) +@kindex 020 C-p @r{(}@code{previous-line}@r{)} Move cursor vertically up @var{n} lines (@code{previous-line}). @item C-q -@kindex 021 @kbd{C-q} (@code{quoted-insert}) +@kindex 021 C-q @r{(}@code{quoted-insert}@r{)} Read next input character and insert it. Useful for inserting control characters @*(@code{quoted-insert}). @item C-r -@kindex 022 @kbd{C-r} (@code{isearch-backward}) +@kindex 022 C-r @r{(}@code{isearch-backward}@r{)} Search backward incrementally (@code{isearch-backward}). @item C-s -@kindex 023 @kbd{C-s} (@code{isearch-forward}) +@kindex 023 C-s @r{(}@code{isearch-forward}@r{)} Search forward incrementally (@code{isearch-forward}). @item @var{n} C-t -@kindex 024 @kbd{C-t} (@code{transpose-chars}) +@kindex 024 C-t @r{(}@code{transpose-chars}@r{)} Interchange characters around point, moving forward one character. With count @var{n}, take character before point and drag it forward past @var{n} other characters. If no argument and at end of line, the previous two characters are exchanged (@code{transpose-chars}). @item @var{n} C-v -@kindex 026 @kbd{C-v} (@code{scroll-up}) +@kindex 026 C-v @r{(}@code{scroll-up}@r{)} Scroll text upward @var{n} lines. If @var{n} is not given, scroll near full screen (@code{scroll-up}). @item C-w -@kindex 027 @kbd{C-w} (@code{kill-region}) +@kindex 027 C-w @r{(}@code{kill-region}@r{)} Kill between point and mark. The text is save in the kill ring. The command @kbd{P} or @kbd{p} can retrieve it from kill ring (@code{kill-region}). @@ -1624,29 +1624,29 @@ and you can repeat them by the repeat command @kbd{.} (@code{vip-repeat}). @table @kbd @item i -@kindex 151 @kbd{i} (@code{vip-insert}) +@kindex 151 i @r{(}@code{vip-insert}@r{)} Enter insert mode at point (@code{vip-insert}). @item I -@kindex 111 @kbd{I} (@code{vip-Insert}) +@kindex 111 I @r{(}@code{vip-Insert}@r{)} Enter insert mode at the first non white character on the line (@code{vip-Insert}). @item a -@kindex 141 @kbd{a} (@code{vip-append}) +@kindex 141 a @r{(}@code{vip-append}@r{)} Move point forward by one character and then enter insert mode (@code{vip-append}). @item A -@kindex 101 @kbd{A} (@code{vip-Append}) +@kindex 101 A @r{(}@code{vip-Append}@r{)} Enter insert mode at end of line (@code{vip-Append}). @item o -@kindex 157 @kbd{o} (@code{vip-open-line}) +@kindex 157 o @r{(}@code{vip-open-line}@r{)} Open a new line below the current line and enter insert mode (@code{vip-open-line}). @item O -@kindex 117 @kbd{O} (@code{vip-Open-line}) +@kindex 117 O @r{(}@code{vip-Open-line}@r{)} Open a new line above the current line and enter insert mode (@code{vip-Open-line}). @item C-o -@kindex 017 @kbd{C-o} (@code{vip-open-line-at-point}) +@kindex 017 C-o @r{(}@code{vip-open-line-at-point}@r{)} Insert a newline and leave point before it, and then enter insert mode @*(@code{vip-open-line-at-point}). @end table @@ -1656,16 +1656,16 @@ differently from emacs mode. @table @kbd @item @key{ESC} -@kindex 033 @kbd{ESC} (@code{vip-change-mode-to-vi}) (insert mode) +@kindex 033 @key{ESC} @r{(}@code{vip-change-mode-to-vi}@r{) (insert mode)} This key will take you back to vi mode (@code{vip-change-mode-to-vi}). @item C-h -@kindex 010 @kbd{C-h} (@code{delete-backward-char}) (insert mode) +@kindex 010 C-h @r{(}@code{delete-backward-char}@r{) (insert mode)} Delete previous character (@code{delete-backward-char}). @item C-w -@kindex 027 @kbd{C-w} (@code{vip-delete-backward-word}) (insert mode) +@kindex 027 C-w @r{(}@code{vip-delete-backward-word}@r{) (insert mode)} Delete previous word (@code{vip-delete-backward-word}). @item C-z -@kindex 032 @kbd{C-z} (@code{vip-ESC}) (insert mode) +@kindex 032 C-z @r{(}@code{vip-ESC}@r{) (insert mode)} This key simulates @key{ESC} key in emacs mode. For instance, typing @kbd{C-z x} in insert mode is the same as typing @kbd{ESC x} in emacs mode (@code{vip-ESC}). @@ -1685,7 +1685,7 @@ commands while in insert mode. @node Ex Commands @chapter Ex Commands -@kindex 072 @kbd{:} (@code{vip-ex}) +@kindex 072 : @r{(}@code{vip-ex}@r{)} In vi mode, you can execute an Ex command @var{ex-command} by typing: @example diff --git a/doc/misc/viper.texi b/doc/misc/viper.texi index 8948437632..366d576da2 100644 --- a/doc/misc/viper.texi +++ b/doc/misc/viper.texi @@ -368,9 +368,9 @@ toggles Viperization of Emacs on and off. @node States in Viper @section States in Viper -@kindex @kbd{C-z} +@kindex C-z @kindex @key{ESC} -@kindex @kbd{i} +@kindex i @cindex Emacs state @cindex Vi state @cindex Insert state @@ -474,7 +474,7 @@ to allow Emacs keys in Insert state. @node Emacs State @subsection Emacs State -@kindex @kbd{C-z} +@kindex C-z @cindex Emacs state @@ -514,7 +514,7 @@ exceptions are: @table @kbd @item C-x -@kindex @kbd{C-x} +@kindex C-x @kbd{C-x} is used to invoke Emacs commands, mainly those that do window management. @kbd{C-x 2} will split a window, @kbd{C-x 0} will close a window. @kbd{C-x 1} will close all other windows. @kbd{C-xb} is used to @@ -523,14 +523,14 @@ These are about the only necessary keystrokes. For the rest, see the GNU Emacs Manual. @item C-c -@kindex @kbd{C-c} +@kindex C-c For user levels 2 and higher, this key serves as a prefix key for the key sequences used by various major modes. For users at Viper level 1, @kbd{C-c} simply beeps. @item C-g and C-] -@kindex @kbd{C-g} -@kindex @kbd{C-]} +@kindex C-g +@kindex C-] These are the Emacs @samp{quit} keys. There will be cases where you will have to @@ -543,7 +543,7 @@ Edit,Recursive Edit,emacs,The GNU Emacs Manual}. At user level 1, @kbd{C-g} is bound to @code{viper-info-on-file} function instead. @item C-\ -@kindex @kbd{C-\} +@kindex C-\ @cindex Meta key Viper uses @key{ESC} as a switch between Insert and Vi states. Emacs uses @@ -569,7 +569,7 @@ about are: @table @samp @item Undo -@kindex @kbd{u} +@kindex u @kbd{u} will undo. Undo can be repeated by the @kbd{.} key. Undo itself can be undone. Another @kbd{u} will change the direction. The presence of repeatable undo means that @kbd{U}, undoing lines, is not very @@ -599,7 +599,7 @@ to case-insensitive and back. @cindex vanilla search @cindex case-sensitive search @cindex case-insensitive search -@kindex @kbd{C-c /} +@kindex C-c / @item Ex commands @cindex Ex commands @@ -1302,8 +1302,8 @@ These commands have no Vi analogs. @table @kbd @item C-x, C-c -@kindex @kbd{C-x} -@kindex @kbd{C-c} +@kindex C-x +@kindex C-c These two keys invoke many important Emacs functions. For example, if you hit @kbd{C-x} followed by @kbd{2}, then the current window will be split into 2. Except for novice users, @kbd{C-c} is also set to execute an Emacs @@ -1313,11 +1313,11 @@ configure @key{ESC} as Meta by setting @code{viper-no-multiple-ESC} to @kbd{C-\} in Insert, Replace, or Vi states will make Emacs think @kbd{Meta} has been hit. @item \ -@kindex @kbd{\} +@kindex \ Escape to Emacs to execute a single Emacs command. For instance, @kbd{\ @key{ESC}} will act like a Meta key. @item Q -@kindex @kbd{Q} +@kindex Q @cindex query replace @kbd{Q} is for query replace. By default, each string to be replaced is treated as a regular expression. You can use @@ -1327,16 +1327,16 @@ that @kbd{:se nomagic} turns Regexps off completely, unlike Vi). @item v @itemx V @itemx C-v -@kindex @kbd{v} -@kindex @kbd{V} -@kindex @kbd{C-v} +@kindex v +@kindex V +@kindex C-v These keys are used to visit files. @kbd{v} will switch to a buffer visiting file whose name can be entered in the minibuffer. @kbd{V} is similar, but will use a window different from the current window. @kbd{C-v} is like @kbd{V}, except that a new frame (X window) will be used instead of a new Emacs window. @item # -@kindex @kbd{#} +@kindex # If followed by a certain character @var{ch}, it becomes an operator whose argument is the region determined by the motion command that follows (indicated as ). @@ -1344,34 +1344,34 @@ Currently, @var{ch} can be one of @kbd{c}, @kbd{C}, @kbd{g}, @kbd{q}, and @kbd{s}. For instance, @kbd{#qr} will prompt you for a string and then prepend this string to each line in the buffer. @item # c -@kindex @kbd{#c} +@kindex #c @cindex changing case Change upper-case characters in the region to lower-case (@code{downcase-region}). Emacs command @kbd{M-l} does the same for words. @item # C -@kindex @kbd{#C} +@kindex #C Change lower-case characters in the region to upper-case. For instance, @kbd{# C 3 w} will capitalize 3 words from the current point (@code{upcase-region}). Emacs command @kbd{M-u} does the same for words. @item # g -@kindex @kbd{#g} +@kindex #g Execute last keyboard macro for each line in the region (@code{viper-global-execute}). @item # q -@kindex @kbd{#q} +@kindex #q Insert specified string at the beginning of each line in the region (@code{viper-quote-region}). The default string is composed of the comment character(s) appropriate for the current major mode. @item # s -@kindex @kbd{#s} +@kindex #s Check spelling of words in the region (@code{spell-region}). The function used for spelling is determined from the variable @code{viper-spell-function}. @vindex viper-spell-function @item * -@kindex @kbd{*} +@kindex * Call last keyboard macro. @item m . Set mark at point and push old mark off the ring @@ -1382,41 +1382,41 @@ Set mark at beginning and end of buffer, respectively. Jump to mark and pop mark off the ring. @xref{Mark,,Mark,emacs,The GNU Emacs Manual}, for more info. @item ] register -@kindex @kbd{]} +@kindex ] View contents of register @item [ textmarker -@kindex @kbd{[} +@kindex [ View filename and position of textmarker @item @@# @item @@register @item @@! -@kindex @kbd{@@#} -@kindex @kbd{@@} -@kindex @kbd{@@!} +@kindex @@# +@kindex @@ +@kindex @@! @cindex keyboard macros @cindex register execution Begin/end keyboard macro. @@register has a different meaning when used after a @kbd{@@#}. @xref{Macros and Registers}, for details @item [] -@kindex @kbd{[]} +@kindex [] Go to end of heading. @item g <@emph{movement command}> Search buffer for text delimited by movement command. The canonical example is @kbd{gw} to search for the word under the cursor. @xref{Improved Search}, for details. @item C-g and C-] -@kindex @kbd{C-g} -@kindex @kbd{C-]} +@kindex C-g +@kindex C-] Quit and Abort Recursive edit. These may be necessary on occasion. @xref{Vi State}, for a reason. @item C-c C-g -@kindex @kbd{C-c C-g} +@kindex C-c C-g Hitting @kbd{C-c} followed by @kbd{C-g} will display the information on the current buffer. This is the same as hitting @kbd{C-g} in Vi, but, as explained above, @kbd{C-g} is needed for other purposes in Emacs. @item C-c / -@kindex @kbd{C-c /} +@kindex C-c / Without a prefix argument, this command toggles case-sensitive/case-insensitive search modes and plain vanilla/regular expression search. With the prefix argument 1, i.e., @@ -1429,21 +1429,21 @@ this function. @cindex case-insensitive search @item M-p and M-n -@kindex @kbd{M-p} -@kindex @kbd{M-n} +@kindex M-p +@kindex M-n In the minibuffer, these commands navigate through the minibuffer histories, such as the history of search strings, Ex commands, etc. @item C-s -@kindex @kbd{C-s} +@kindex C-s If the minibuffer is entered via a Viper search commands @kbd{/} or @kbd{?}, then typing this key inserts the last search string used by the Emacs incremental search command (that is bound to @kbd{C-s} everywhere except in this case). @item C-c M-p and C-c M-n -@kindex @kbd{C-c M-p} -@kindex @kbd{C-c M-n} +@kindex C-c M-p +@kindex C-c M-n @cindex Insertion history @cindex Insertion ring @cindex Command history @@ -2669,10 +2669,10 @@ purpose of mouse search and mouse insert. By default, this is set to @code{double-click-time} in Emacs and to @code{mouse-track-multi-click-time} milliseconds in XEmacs. @end table -@kindex @kbd{S-mouse-1} -@kindex @kbd{S-mouse-2} -@kindex @kbd{meta shift button1up} -@kindex @kbd{meta shift button2up} +@kindex S-mouse-1 +@kindex S-mouse-2 +@kindex @key{META} @key{SHIFT} button1up +@kindex @key{META} @key{SHIFT} button2up @vindex viper-multiclick-timeout @findex viper-mouse-click-insert-word @findex viper-mouse-click-search-word @@ -3383,60 +3383,60 @@ don't want this macro, put in your Viper customization file. @end table -@kindex @kbd{%} -@kindex @kbd{C-c /} -@kindex @kbd{N} -@kindex @kbd{n} -@kindex @kbd{?} -@kindex @kbd{/} -@kindex @kbd{?} -@kindex @kbd{/} -@kindex @kbd{''} -@kindex @kbd{``} -@kindex @kbd{]} -@kindex @kbd{[} -@kindex @kbd{'} -@kindex @kbd{`} -@kindex @kbd{m} -@kindex @kbd{[]} -@kindex @kbd{[[} -@kindex @kbd{]]} -@kindex @kbd{@{} -@kindex @kbd{@}} -@kindex @kbd{(} -@kindex @kbd{)} -@kindex @kbd{M} -@kindex @kbd{L} -@kindex @kbd{H} -@kindex @kbd{G} -@kindex @kbd{E} -@kindex @kbd{e} -@kindex @kbd{B} -@kindex @kbd{b} -@kindex @kbd{W} -@kindex @kbd{w} -@kindex @kbd{,} -@kindex @kbd{;} -@kindex @kbd{T} -@kindex @kbd{F} -@kindex @kbd{t} -@kindex @kbd{f} -@kindex @kbd{|} -@kindex @kbd{0} -@kindex @kbd{} -@kindex @kbd{+} -@kindex @kbd{-} -@kindex @kbd{^} -@kindex @kbd{$} -@kindex @kbd{C-p} -@kindex @kbd{} -@kindex @kbd{} -@kindex @kbd{C-n} -@kindex @kbd{C-h} -@kindex @kbd{h} -@kindex @kbd{j} -@kindex @kbd{k} -@kindex @kbd{l} +@kindex % +@kindex C-c / +@kindex N +@kindex n +@kindex ? +@kindex / +@kindex ? +@kindex / +@kindex '' +@kindex `` +@kindex ] +@kindex [ +@kindex ' +@kindex ` +@kindex m +@kindex [] +@kindex [[ +@kindex ]] +@kindex @{ +@kindex @} +@kindex ( +@kindex ) +@kindex M +@kindex L +@kindex H +@kindex G +@kindex E +@kindex e +@kindex B +@kindex b +@kindex W +@kindex w +@kindex , +@kindex ; +@kindex T +@kindex F +@kindex t +@kindex f +@kindex | +@kindex 0 +@kindex @key{CR} +@kindex + +@kindex - +@kindex ^ +@kindex $ +@kindex C-p +@kindex @key{LF} +@kindex @key{SPC} +@kindex C-n +@kindex C-h +@kindex h +@kindex j +@kindex k +@kindex l @vindex viper-parse-sexp-ignore-comments @node Marking @@ -3478,18 +3478,18 @@ Go to specified Viper mark. @item ` Go to specified Viper mark and go to the first CHAR on line. @end table -@kindex @kbd{m} -@kindex @kbd{m.} -@kindex @kbd{m>} -@kindex @kbd{m<} -@kindex @kbd{m,} -@kindex @kbd{m^} +@kindex m +@kindex m. +@kindex m> +@kindex m< +@kindex m, +@kindex m^ @findex @kbd{Ex mark} @findex @kbd{Ex k} -@kindex @kbd{''} -@kindex @kbd{``} -@kindex @kbd{`} -@kindex @kbd{'} +@kindex '' +@kindex `` +@kindex ` +@kindex ' @node Appending Text @subsection Appending Text @@ -3556,22 +3556,22 @@ Since typing the above sequences of keys may be tedious, the functions doing the perusing can be bound to unused keyboard keys in the Viper customization file. @xref{Viper Specials}, for details. @end table -@kindex @kbd{C-c M-p} -@kindex @kbd{C-c M-n} -@kindex @kbd{.} -@kindex @kbd{]} -@kindex @kbd{[} -@kindex @kbd{P} -@kindex @kbd{p} -@kindex @kbd{"p} -@kindex @kbd{"P} -@kindex @kbd{>>} -@kindex @kbd{>} -@kindex @kbd{O} -@kindex @kbd{o} -@kindex @kbd{i} -@kindex @kbd{A} -@kindex @kbd{a} +@kindex C-c M-p +@kindex C-c M-n +@kindex . +@kindex ] +@kindex [ +@kindex P +@kindex p +@kindex "p +@kindex "P +@kindex >> +@kindex > +@kindex O +@kindex o +@kindex i +@kindex A +@kindex a @node Editing in Insert State @subsection Editing in Insert State @@ -3595,9 +3595,9 @@ Back to the begin of the change on the current line. @end table -@kindex @kbd{C-u} -@kindex @kbd{C-w} -@kindex @kbd{C-v} +@kindex C-u +@kindex C-w +@kindex C-v @node Deleting Text @subsection Deleting Text @@ -3634,13 +3634,13 @@ shiftwidth to the left (layout!). @item << Shift lines one shiftwidth to the left. @end table -@kindex @kbd{<<} -@kindex @kbd{<} -@kindex @kbd{D} -@kindex @kbd{dd} -@kindex @kbd{d} -@kindex @kbd{X} -@kindex @kbd{x} +@kindex << +@kindex < +@kindex D +@kindex dd +@kindex d +@kindex X +@kindex x @node Changing Text @subsection Changing Text @@ -3727,28 +3727,28 @@ In Vi state, these keys are bound to functions that peruse the history of destructive Vi commands. @xref{Viper Specials}, for details. @end table -@kindex @kbd{C-c M-p} -@kindex @kbd{C-c M-n} -@kindex @kbd{#q } -@kindex @kbd{#C} -@kindex @kbd{#c} -@kindex @kbd{&} -@kindex @kbd{\&} +@kindex C-c M-p +@kindex C-c M-n +@kindex #q +@kindex #C +@kindex #c +@kindex & +@kindex \& @findex @kbd{Ex substitute///} @findex @kbd{Ex s///} @findex @kbd{Ex copy [z]} @findex @kbd{Ex t [z]} @findex @kbd{Ex move [z]} -@kindex @kbd{J} -@kindex @kbd{~} -@kindex @kbd{=} -@kindex @kbd{C} -@kindex @kbd{cc} -@kindex @kbd{c} -@kindex @kbd{S} -@kindex @kbd{s} -@kindex @kbd{R} -@kindex @kbd{r} +@kindex J +@kindex ~ +@kindex = +@kindex C +@kindex cc +@kindex c +@kindex S +@kindex s +@kindex R +@kindex r @node Search and Replace @subsection Search and Replace @@ -3817,21 +3817,21 @@ Execute on all lines that match . @itemx :v // Execute on all lines that do not match . @end table -@kindex @kbd{&} +@kindex & @findex @kbd{Ex substitute///} -@kindex @kbd{Q} -@kindex @kbd{#g} +@kindex Q +@kindex #g @findex @kbd{Ex v} @findex @kbd{Ex g} @findex @kbd{Ex global} @findex @kbd{Ex vglobal} @findex @kbd{Ex tag } -@kindex @kbd{%} -@kindex @kbd{N} -@kindex @kbd{n} -@kindex @kbd{g} -@kindex @kbd{?} -@kindex @kbd{/} +@kindex % +@kindex N +@kindex n +@kindex g +@kindex ? +@kindex / @node Yanking @subsection Yanking @@ -3865,19 +3865,19 @@ be automatically down-cased. Put the contents of the (default undo) buffer times before the cursor. The register will @end table -@kindex @kbd{P} -@kindex @kbd{p} -@kindex @kbd{"p} -@kindex @kbd{"P} -@kindex @kbd{]} -@kindex @kbd{[} -@kindex @kbd{m} -@kindex @kbd{Y} -@kindex @kbd{yy} -@kindex @kbd{"y} -@kindex @kbd{"y} -@kindex @kbd{y} -@kindex @kbd{yank} +@kindex P +@kindex p +@kindex "p +@kindex "P +@kindex ] +@kindex [ +@kindex m +@kindex Y +@kindex yy +@kindex "y +@kindex "y +@kindex y +@kindex yank @findex @kbd{Ex yank} @node Undoing @@ -3902,9 +3902,9 @@ that have a @samp{~} appended to them. @findex @kbd{Ex rec} @findex @kbd{Ex e!} @findex @kbd{Ex q!} -@kindex @kbd{.} -@kindex @kbd{U} -@kindex @kbd{u} +@kindex . +@kindex U +@kindex u @node Display @section Display @@ -3948,21 +3948,21 @@ Put line at the bottom of the window Put line in the center of the window (default the current line). @end table -@kindex @kbd{zM} -@kindex @kbd{zL} -@kindex @kbd{zH} -@kindex @kbd{z} -@kindex @kbd{z.} -@kindex @kbd{z-} -@kindex @kbd{z} -@kindex @kbd{C-b} -@kindex @kbd{C-f} -@kindex @kbd{C-u} -@kindex @kbd{C-d} -@kindex @kbd{C-y} -@kindex @kbd{C-e} -@kindex @kbd{C-l} -@kindex @kbd{C-g} +@kindex zM +@kindex zL +@kindex zH +@kindex z +@kindex z. +@kindex z- +@kindex z +@kindex C-b +@kindex C-f +@kindex C-u +@kindex C-d +@kindex C-y +@kindex C-e +@kindex C-l +@kindex C-g @node File and Buffer Handling @@ -4078,11 +4078,11 @@ Read the file into the buffer after the line
. Edit a file in current or another window, or in another frame. File name is typed in minibuffer. File completion and history are supported. @end table -@kindex @kbd{v} -@kindex @kbd{V} +@kindex v +@kindex V @findex @kbd{Ex args} @findex @kbd{Ex rew} -@kindex @kbd{C-^} +@kindex C-^ @findex @kbd{Ex e!@: []} @findex @kbd{Ex e []} @findex @kbd{Ex edit []} @@ -4096,7 +4096,7 @@ is typed in minibuffer. File completion and history are supported. @findex @kbd{Ex r} @findex @kbd{Ex read} @findex @kbd{Ex pre} -@kindex @kbd{ZZ} +@kindex ZZ @findex @kbd{Ex wq} @findex @kbd{Ex w } @findex @kbd{Ex w!@: } @@ -4171,14 +4171,14 @@ Show contents of textmarker. @item ] Show contents of register. @end table -@kindex @kbd{]} -@kindex @kbd{[} -@kindex @kbd{#g} -@kindex @kbd{*} -@kindex @kbd{@@!} -@kindex @kbd{@@#} -@kindex @kbd{@@@@} -@kindex @kbd{@@} +@kindex ] +@kindex [ +@kindex #g +@kindex * +@kindex @@! +@kindex @@# +@kindex @@@@ +@kindex @@ @findex @kbd{Ex unmap } @findex @kbd{Ex map } @findex @kbd{Ex unmap!@: } @@ -4410,16 +4410,16 @@ Undoes the last @kbd{C-y} and puts another kill from the kill ring. Using this command, you can try may different kills until you find the one you need. @end table -@kindex @kbd{M-y} -@kindex @kbd{C-y} -@kindex @kbd{C-xC-f} -@kindex @kbd{C-xo} -@kindex @kbd{C-x2} -@kindex @kbd{C-x1} -@kindex @kbd{C-x0} -@kindex @kbd{C-z} -@kindex @kbd{C-\} -@kindex @kbd{C-c\} +@kindex M-y +@kindex C-y +@kindex C-x C-f +@kindex C-x o +@kindex C-x 2 +@kindex C-x 1 +@kindex C-x 0 +@kindex C-z +@kindex C-\ +@kindex C-c\ @node Mouse-bound Commands @section Mouse-bound Commands @@ -4445,10 +4445,10 @@ Note: Viper sets this binding only if this mouse action is not already bound to something else. @xref{Viper Specials}, for more details. @end table -@kindex @kbd{S-mouse-1} -@kindex @kbd{S-mouse-2} -@kindex @kbd{meta button1up} -@kindex @kbd{meta button2up} +@kindex S-mouse-1 +@kindex S-mouse-2 +@kindex @key{META} button1up +@kindex @key{META} button2up @node GNU Free Documentation License @appendix GNU Free Documentation License diff --git a/doc/misc/woman.texi b/doc/misc/woman.texi index f8ddbd2aff..07dd55e604 100644 --- a/doc/misc/woman.texi +++ b/doc/misc/woman.texi @@ -625,14 +625,14 @@ the @code{man} key bindings. @table @kbd @item @key{SPC} -@kindex SPC +@kindex @key{SPC} @findex scroll-up Scroll the man page up the window (@code{scroll-up}). @item @key{DEL} @itemx @kbd{S-@key{SPC}} -@kindex DEL -@kindex S-SPC +@kindex @key{DEL} +@kindex S-@key{SPC} @findex scroll-down Scroll the man page down the window (@code{scroll-down}). @@ -690,7 +690,7 @@ word must be mouse-highlighted unless @code{woman-mouse-2} is used with the Meta key. @item @key{RET} -@kindex RET +@kindex @key{RET} @findex man-follow Get the man page for the topic under (or nearest to) point (@code{man-follow}). commit 621893352f9f08fcefda6237b0a04a7ab3ab839b Author: Michael Albinus Date: Sat Feb 24 20:52:21 2018 +0100 Fix @cindex entries in manuals * doc/emacs/custom.texi: * doc/emacs/dired.texi: * doc/emacs/display.texi: * doc/emacs/files.texi: * doc/emacs/frames.texi: * doc/emacs/killing.texi: * doc/emacs/maintaining.texi: * doc/emacs/misc.texi: * doc/emacs/msdos-xtra.texi: * doc/emacs/msdos.texi: * doc/emacs/search.texi: * doc/emacs/text.texi: * doc/emacs/trouble.texi: * doc/lispintro/emacs-lisp-intro.texi: * doc/lispref/strings.texi: * doc/lispref/text.texi: * doc/misc/cc-mode.texi: * doc/misc/efaq.texi: * doc/misc/eieio.texi: * doc/misc/emacs-mime.texi: * doc/misc/gnus.texi: * doc/misc/htmlfontify.texi: * doc/misc/idlwave.texi: * doc/misc/message.texi: * doc/misc/mh-e.texi: * doc/misc/sem-user.texi: * doc/misc/ses.texi: * doc/misc/tramp.texi: * doc/misc/vhdl-mode.texi: Fix @cindex entries. diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi index af5429d50c..9ba7e21101 100644 --- a/doc/emacs/custom.texi +++ b/doc/emacs/custom.texi @@ -2162,7 +2162,7 @@ loading of this library, use the option @samp{--no-site-file}. better to put them in @file{default.el}, so that users can more easily override them. -@cindex site-lisp directories +@cindex @file{site-lisp} directories You can place @file{default.el} and @file{site-start.el} in any of the directories which Emacs searches for Lisp libraries. The variable @code{load-path} (@pxref{Lisp Libraries}) specifies these directories. diff --git a/doc/emacs/dired.texi b/doc/emacs/dired.texi index a47123aa6c..15c9cb5687 100644 --- a/doc/emacs/dired.texi +++ b/doc/emacs/dired.texi @@ -1359,8 +1359,8 @@ C-c}. @node Image-Dired @section Viewing Image Thumbnails in Dired -@cindex image-dired mode -@cindex image-dired +@cindex @code{image-dired} mode +@cindex @code{image-dired} Image-Dired is a facility for browsing image files. It provides viewing the images either as thumbnails or in full size, either inside Emacs diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi index 64a1d4b5fa..42b07cc0fe 100644 --- a/doc/emacs/display.texi +++ b/doc/emacs/display.texi @@ -526,7 +526,7 @@ frames as if they have a dark background, whereas a value of background. @cindex background color -@cindex default face +@cindex @code{default face} You can customize a face to alter its attributes, and save those customizations for future Emacs sessions. @xref{Face Customization}, for details. @@ -535,7 +535,7 @@ for details. of its attributes are specified. Its background color is also used as the frame's background color. @xref{Colors}. -@cindex cursor face +@cindex @code{cursor} face Another special face is the @code{cursor} face. On graphical displays, the background color of this face is used to draw the text cursor. None of the other attributes of this face have any effect; @@ -627,10 +627,10 @@ but you should not make it a variable-width font. @item fixed-pitch-serif This face is like @code{fixed-pitch}, except the font has serifs and looks more like traditional typewriting. -@cindex variable-pitch face +@cindex @code{variable-pitch} face @item variable-pitch This face forces use of a variable-width font. -@cindex shadow face +@cindex @code{shadow} face @item shadow This face is used for making the text less noticeable than the surrounding ordinary text. Usually this can be achieved by using shades of gray in @@ -685,40 +685,40 @@ frame: @table @code @item mode-line -@cindex mode-line face +@cindex @code{mode-line} face @cindex faces for mode lines This face is used for the mode line of the currently selected window, and for menu bars when toolkit menus are not used. By default, it's drawn with shadows for a raised effect on graphical displays, and drawn as the inverse of the default face on non-windowed terminals. @item mode-line-inactive -@cindex mode-line-inactive face +@cindex @code{mode-line-inactive} face Like @code{mode-line}, but used for mode lines of the windows other than the selected one (if @code{mode-line-in-non-selected-windows} is non-@code{nil}). This face inherits from @code{mode-line}, so changes in that face affect mode lines in all windows. @item mode-line-highlight -@cindex mode-line-highlight face +@cindex @code{mode-line-highlight} face Like @code{highlight}, but used for mouse-sensitive portions of text on mode lines. Such portions of text typically pop up tooltips (@pxref{Tooltips}) when the mouse pointer hovers above them. @item mode-line-buffer-id -@cindex mode-line-buffer-id face +@cindex @code{mode-line-buffer-id} face This face is used for buffer identification parts in the mode line. @item header-line -@cindex header-line face +@cindex @code{header-line} face Similar to @code{mode-line} for a window's header line, which appears at the top of a window just as the mode line appears at the bottom. Most windows do not have a header line---only some special modes, such Info mode, create one. @item header-line-highlight -@cindex header-line-highlight face +@cindex @code{header-line-highlight} face Similar to @code{highlight} and @code{mode-line-highlight}, but used for mouse-sensitive portions of text on header lines. This is a separate face because the @code{header-line} face might be customized in a way that does not interact well with @code{highlight}. @item vertical-border -@cindex vertical-border face +@cindex @code{vertical-border} face This face is used for the vertical divider between windows on text terminals. @item minibuffer-prompt @@ -765,7 +765,7 @@ This face determines the color of tool bar icons. @xref{Tool Bars}. This face determines the colors and font of Emacs's menus. @xref{Menu Bars}. @item tty-menu-enabled-face -@cindex faces for text-mode menus +@cindex faces for @code{text-mode} menus @cindex TTY menu faces This face is used to display enabled menu items on text-mode terminals. @@ -1177,7 +1177,7 @@ empty lines at the end of a buffer, without realizing it. In most cases, this @dfn{trailing whitespace} has no effect, but sometimes it can be a nuisance. -@cindex trailing-whitespace face +@cindex @code{trailing-whitespace} face You can make trailing whitespace at the end of a line visible by setting the buffer-local variable @code{show-trailing-whitespace} to @code{t}. Then Emacs displays trailing whitespace, using the face @@ -1508,8 +1508,8 @@ as octal escape sequences instead of caret escape sequences. @cindex non-breaking space @cindex non-breaking hyphen @cindex soft hyphen -@cindex escape-glyph face -@cindex nobreak-space face +@cindex @code{escape-glyph} face +@cindex @code{nobreak-space} face Some non-@acronym{ASCII} characters have the same appearance as an @acronym{ASCII} space or hyphen (minus) character. Such characters can cause problems if they are entered into a buffer without your @@ -1531,7 +1531,7 @@ elisp, The Emacs Lisp Reference Manual}. @cindex glyphless characters @cindex characters with no font glyphs -@cindex glyphless-char face +@cindex @code{glyphless-char} face On graphical displays, some characters may have no glyphs in any of the fonts available to Emacs. These @dfn{glyphless characters} are normally displayed as boxes containing the hexadecimal character code. @@ -1546,7 +1546,7 @@ for details. @cindex curly quotes, and terminal capabilities @cindex curved quotes, and terminal capabilities -@cindex homoglyph face +@cindex @code{homoglyph} face Emacs tries to determine if the curved quotes @samp{‘} and @samp{’} can be displayed on the current display. By default, if this seems to @@ -1801,7 +1801,7 @@ may wish to customize the variables @code{display-line-numbers-width} to a large enough value, to avoid occasional miscalculations of space reserved for the line numbers. -@cindex line-number face +@cindex @code{line-number} face The line numbers are displayed in a special face @code{line-number}. The current line number is displayed in a different face, @code{line-number-current-line}, so you can make the current line's diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi index 42cc4e767d..d7ca1e9161 100644 --- a/doc/emacs/files.texi +++ b/doc/emacs/files.texi @@ -1866,7 +1866,7 @@ variable @code{tramp-mode} to @code{nil}. You can turn off the feature in individual cases by quoting the file name with @samp{/:} (@pxref{Quoted File Names}). -@cindex ange-ftp +@cindex @code{ange-ftp} Remote file access through FTP is handled by the Ange-FTP package, which is documented in the following. Remote file access through the other methods is handled by the Tramp package, which has its own manual. diff --git a/doc/emacs/frames.texi b/doc/emacs/frames.texi index b2ec5746a0..6f19576bb6 100644 --- a/doc/emacs/frames.texi +++ b/doc/emacs/frames.texi @@ -901,7 +901,7 @@ that server's selected frame. @node Frame Parameters @section Frame Parameters -@cindex default-frame-alist +@vindex default-frame-alist You can control the default appearance and behavior of all frames by specifying a default list of @dfn{frame parameters} in the variable @@ -925,7 +925,7 @@ default font to @samp{Monospace-10}: For a list of frame parameters and their effects, see @ref{Frame Parameters,,, elisp, The Emacs Lisp Reference Manual}. -@cindex initial-frame-alist +@vindex initial-frame-alist You can also specify a list of frame parameters which apply to just the initial frame, by customizing the variable @code{initial-frame-alist}. @@ -999,7 +999,7 @@ end of the buffer is shown; if @code{nil}, the thumb will be at the bottom when the end of the buffer is shown. You cannot over-scroll when the entire buffer is visible. -@cindex scroll-bar face +@cindex @code{scroll-bar} face The visual appearance of the scroll bars is controlled by the @code{scroll-bar} face. (Some toolkits, such as GTK and MS-Windows, ignore this face; the scroll-bar appearance there can only be diff --git a/doc/emacs/killing.texi b/doc/emacs/killing.texi index 19aa9077d7..4118b752e6 100644 --- a/doc/emacs/killing.texi +++ b/doc/emacs/killing.texi @@ -590,7 +590,7 @@ you can access it using the following Emacs commands: @table @kbd @findex mouse-set-secondary @kindex M-Drag-mouse-1 -@cindex secondary-selection face +@cindex @code{secondary-selection} face @item M-Drag-mouse-1 Set the secondary selection, with one end at the place where you press down the button, and the other end at the place where you release it diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi index 23e08a58e8..8f71b12b81 100644 --- a/doc/emacs/maintaining.texi +++ b/doc/emacs/maintaining.texi @@ -628,7 +628,7 @@ they use the concept of checking out individual files. @node Log Buffer @subsection Features of the Log Entry Buffer -@cindex C-c C-c @r{(Log Edit mode)} +@kindex C-c C-c @r{(Log Edit mode)} @findex log-edit-done When you tell VC to commit a change, it pops up a buffer named @file{*vc-log*}. In this buffer, you should write a @dfn{log entry} diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi index d8f202f684..e1b8070f43 100644 --- a/doc/emacs/misc.texi +++ b/doc/emacs/misc.texi @@ -409,7 +409,7 @@ is needed. For OpenDocument and Microsoft Office documents, the @code{unoconv} tool is needed.}, and displaying those images. @findex doc-view-toggle-display -@cindex doc-view-minor-mode +@findex doc-view-minor-mode When you visit a document file that can be displayed with DocView mode, Emacs automatically uses DocView mode @footnote{The needed external tools for the document type must be available, and Emacs must diff --git a/doc/emacs/msdos-xtra.texi b/doc/emacs/msdos-xtra.texi index 39d003c453..406ebd1905 100644 --- a/doc/emacs/msdos-xtra.texi +++ b/doc/emacs/msdos-xtra.texi @@ -412,7 +412,7 @@ will print the region while converting it to the codepage 850 encoding. @node MS-DOS and MULE @subsection International Support on MS-DOS -@cindex international support @r{(MS-DOS)} +@cindex international support (MS-DOS) Emacs on MS-DOS supports the same international character sets as it does on GNU, Unix and other platforms @@ -471,7 +471,7 @@ codepage built into the display hardware.) You can specify a different codepage for Emacs to use by setting the variable @code{dos-codepage} in your init file. -@cindex language environment, automatic selection on @r{MS-DOS} +@cindex language environment, automatic selection on MS-DOS Multibyte Emacs supports only certain DOS codepages: those which can display Far-Eastern scripts, like the Japanese codepage 932, and those that encode a single ISO 8859 character set. @@ -494,7 +494,7 @@ codes. For example, the letter @samp{@,{c}} (@samp{c} with cedilla) has code 231 in the standard Latin-1 character set, but the corresponding DOS codepage 850 uses code 135 for this glyph.} -@cindex mode line @r{(MS-DOS)} +@cindex mode line (MS-DOS) All the @code{cp@var{nnn}} coding systems use the letter @samp{D} (for ``DOS'') as their mode-line mnemonic. Since both the terminal coding system and the default coding system for file I/O are set to diff --git a/doc/emacs/msdos.texi b/doc/emacs/msdos.texi index 2790d56e01..b3ec11d4fd 100644 --- a/doc/emacs/msdos.texi +++ b/doc/emacs/msdos.texi @@ -129,7 +129,7 @@ invoked---that will always give you an editor. When invoked via the program that invoked @command{emacsclient}. @end enumerate -@cindex emacsclient, on MS-Windows +@cindex @command{emacsclient}, on MS-Windows Note that, due to limitations of MS-Windows, Emacs cannot have both GUI and text-mode frames in the same session. It also cannot open text-mode frames on more than a single @dfn{Command Prompt} window, diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi index 319f64fbae..723bdf1ad8 100644 --- a/doc/emacs/search.texi +++ b/doc/emacs/search.texi @@ -92,7 +92,7 @@ the first @samp{F} previously found. After another @kbd{O}, the cursor moves to just after the first @samp{FOO}. @cindex faces for highlighting search matches -@cindex isearch face +@cindex @code{isearch} face At each step, Emacs highlights the @dfn{current match}---the buffer text that matches the search string---using the @code{isearch} face (@pxref{Faces}). @xref{Search Customizations}, for various options @@ -273,7 +273,7 @@ down-casing. @node Error in Isearch @subsection Errors in Incremental Search -@cindex isearch-fail face +@cindex @code{isearch-fail} face If your string is not found at all, the echo area says @samp{Failing I-Search}, and the cursor moves past the place where Emacs found as much of your string as it could. Thus, if you search for @samp{FOOT}, @@ -1545,8 +1545,8 @@ replacements are not added to the command history, and cannot be reused. @cindex faces for highlighting query replace -@cindex query-replace face -@cindex lazy-highlight face, in replace +@cindex @code{query-replace} face +@cindex @code{lazy-highlight} face, in replace @vindex query-replace-highlight @vindex query-replace-lazy-highlight @vindex query-replace-show-replacement @@ -1862,7 +1862,7 @@ setting the variable @code{search-highlight} to @code{nil}. @cindex lazy highlighting customizations @vindex isearch-lazy-highlight -@cindex lazy-highlight face +@cindex @code{lazy-highlight} face The other matches for the search string that are visible on display are highlighted using the @code{lazy-highlight} face. Setting the variable @code{isearch-lazy-highlight} to @code{nil} disables this diff --git a/doc/emacs/text.texi b/doc/emacs/text.texi index e753ab5519..9ee31ab466 100644 --- a/doc/emacs/text.texi +++ b/doc/emacs/text.texi @@ -2165,7 +2165,7 @@ text properties. @cindex soft newline @cindex newlines, hard and soft -@cindex use-hard-newlines +@findex use-hard-newlines In Enriched mode, Emacs distinguishes between two different kinds of newlines, @dfn{hard} newlines and @dfn{soft} newlines. You can also enable or disable this feature in other buffers, by typing @kbd{M-x diff --git a/doc/emacs/trouble.texi b/doc/emacs/trouble.texi index 9712cc73de..c0dc3d472e 100644 --- a/doc/emacs/trouble.texi +++ b/doc/emacs/trouble.texi @@ -1411,8 +1411,8 @@ patches) over all your contributions. @node Service @section How To Get Help with GNU Emacs @cindex help in using Emacs -@cindex help-gnu-emacs mailing list -@cindex gnu.emacs.help newsgroup +@cindex @samp{help-gnu-emacs} mailing list +@cindex @samp{gnu.emacs.help} newsgroup If you need help installing, using or changing GNU Emacs, there are two ways to find it: diff --git a/doc/lispintro/emacs-lisp-intro.texi b/doc/lispintro/emacs-lisp-intro.texi index 0efaecc1aa..7966340821 100644 --- a/doc/lispintro/emacs-lisp-intro.texi +++ b/doc/lispintro/emacs-lisp-intro.texi @@ -5882,7 +5882,7 @@ find and use again and again. @node New insert-buffer @subsection New Body for @code{insert-buffer} @findex insert-buffer@r{, new version body} -@cindex new version body for insert-buffer +@cindex new version body for @code{insert-buffer} The body in the GNU Emacs 22 version is more confusing than the original. diff --git a/doc/lispref/strings.texi b/doc/lispref/strings.texi index 9b222a04c9..f391199879 100644 --- a/doc/lispref/strings.texi +++ b/doc/lispref/strings.texi @@ -720,7 +720,7 @@ minus sign if the argument is negative. @result{} "-23.5" @end example -@cindex int-to-string +@cindex @code{int-to-string} @code{int-to-string} is a semi-obsolete alias for this function. See also the function @code{format} in @ref{Formatting Strings}. diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index 426940b2f3..0e1c9941e9 100644 --- a/doc/lispref/text.texi +++ b/doc/lispref/text.texi @@ -3861,7 +3861,7 @@ clicks on the link quickly without moving the mouse. This behavior is controlled by the user option @code{mouse-1-click-follows-link}. @xref{Mouse References,,, emacs, The GNU Emacs Manual}. -@cindex follow-link (text or overlay property) +@kindex follow-link @r{(text or overlay property)} To set up the link so that it obeys @code{mouse-1-click-follows-link}, you must either (1) apply a @code{follow-link} text or overlay property to the link text, or (2) diff --git a/doc/misc/cc-mode.texi b/doc/misc/cc-mode.texi index a506213ea2..e10808954d 100644 --- a/doc/misc/cc-mode.texi +++ b/doc/misc/cc-mode.texi @@ -356,9 +356,9 @@ Customizing Macros @cindex BOCM @cindex history -@cindex awk-mode.el -@cindex c-mode.el -@cindex c++-mode.el +@cindex @file{awk-mode.el} +@cindex @file{c-mode.el} +@cindex @file{c++-mode.el} Welcome to @ccmode{}, a GNU Emacs mode for editing files containing C, C++, Objective-C, Java, CORBA IDL (and the variants CORBA PSDL and diff --git a/doc/misc/efaq.texi b/doc/misc/efaq.texi index 1e44822338..0c979b1d3e 100644 --- a/doc/misc/efaq.texi +++ b/doc/misc/efaq.texi @@ -201,7 +201,7 @@ Also, on very few keyboards does @kbd{C-?} generate @acronym{ASCII} code 127. @section What does @file{M-x @var{command}} mean? @cindex Extended commands @cindex Commands, extended -@cindex M-x, meaning of +@cindex @kbd{M-x}, meaning of @kbd{M-x @var{command}} means type @kbd{M-x}, then type the name of the command, then type @key{RET}. (@xref{Basic keys}, if you're not sure diff --git a/doc/misc/eieio.texi b/doc/misc/eieio.texi index 16c341b887..689ff72b72 100644 --- a/doc/misc/eieio.texi +++ b/doc/misc/eieio.texi @@ -1263,13 +1263,13 @@ The @var{parent-instance} slot indicates the instance which is considered the parent of the current instance. Default is @code{nil}. @end deftp -@cindex clone +@cindex @code{clone} To use this class, inherit from it with your own class. To make a new instance that inherits from and existing instance of your class, use the @code{clone} method with additional parameters to specify local values. -@cindex slot-unbound +@cindex @code{slot-unbound} The @code{eieio-instance-inheritor} class works by causing cloned objects to have all slots unbound. This class' @code{slot-unbound} method will cause references to unbound slots to be redirected to the @@ -1395,7 +1395,7 @@ with a minimum of effort. @deftp {Class} eieio-speedbar buttontype buttonface Enables base speedbar display for a class. -@cindex speedbar-make-tag-line +@cindex @code{speedbar-make-tag-line} The slot @var{buttontype} is any of the symbols allowed by the function @code{speedbar-make-tag-line} for the @var{exp-button-type} argument @xref{Extending,,,speedbar}. diff --git a/doc/misc/emacs-mime.texi b/doc/misc/emacs-mime.texi index 4fbb3e5673..2c607cc97c 100644 --- a/doc/misc/emacs-mime.texi +++ b/doc/misc/emacs-mime.texi @@ -179,18 +179,18 @@ Emacs source code. This item works only in the groups matching @code{mm-uu-emacs-sources-regexp}. @item diff -@vindex diff +@findex diff @vindex mm-uu-diff-groups-regexp Patches. This is intended for groups where diffs of committed files are automatically sent to. It only works in groups matching @code{mm-uu-diff-groups-regexp}. @item verbatim-marks -@cindex verbatim-marks +@findex verbatim-marks Slrn-style verbatim marks. @item LaTeX -@cindex LaTeX +@findex LaTeX LaTeX documents. It only works in groups matching @code{mm-uu-tex-groups-regexp}. @@ -1093,7 +1093,7 @@ If non-@code{nil} a format=flowed article will be displayed flowed. @node Interface Functions @chapter Interface Functions @cindex interface functions -@cindex mail-parse +@cindex @code{mail-parse} The @code{mail-parse} library is an abstraction over the actual low-level libraries that are described in the next chapter. diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi index ed3eec7794..be00ddabdf 100644 --- a/doc/misc/gnus.texi +++ b/doc/misc/gnus.texi @@ -7043,7 +7043,7 @@ visible effects, but is useful if you use the @kbd{A T} command a lot The server has to support @acronym{NOV} for any of this to work. -@cindex Gmane, gnus-fetch-old-headers +@cindex Gmane, @code{gnus-fetch-old-headers} This feature can seriously impact performance it ignores all locally cached header entries. Setting it to @code{t} for groups for a server that doesn't expire articles (such as news.gmane.org), leads to very @@ -12225,7 +12225,7 @@ If non-@code{nil}, use the same article buffer for all the groups. article buffer. @item gnus-widen-article-window -@cindex gnus-widen-article-window +@vindex gnus-widen-article-window If non-@code{nil}, selecting the article buffer with the @kbd{h} command will ``widen'' the article window to take the entire frame. diff --git a/doc/misc/htmlfontify.texi b/doc/misc/htmlfontify.texi index 9f1d1b4ee3..6bc57daf62 100644 --- a/doc/misc/htmlfontify.texi +++ b/doc/misc/htmlfontify.texi @@ -1116,7 +1116,7 @@ Some of the (informal) data structures used in Htmlfontify are detailed here: @table @code @item hfy-style-assoc -@cindex hfy-style-assoc +@cindex @code{hfy-style-assoc} @anchor{hfy-style-assoc} An assoc representing/describing an Emacs face. Properties may be repeated, @@ -1148,7 +1148,7 @@ Some examples: @end lisp @item hfy-sheet-assoc -@cindex hfy-sheet-assoc +@cindex @code{hfy-sheet-assoc} @anchor{hfy-sheet-assoc} An assoc with elements of the form @samp{(face-name style-name . style-string)}. @@ -1160,7 +1160,7 @@ The actual stylesheet for each page is derived from one of these. @end lisp @item hfy-facemap-assoc -@cindex hfy-facemap-assoc +@cindex @code{hfy-facemap-assoc} @anchor{hfy-facemap-assoc} An assoc of @code{(point . @var{face-symbol})} or diff --git a/doc/misc/idlwave.texi b/doc/misc/idlwave.texi index c37ca16b0c..e1a6eb66f5 100644 --- a/doc/misc/idlwave.texi +++ b/doc/misc/idlwave.texi @@ -172,7 +172,7 @@ Catalogs @cindex CORBA (Common Object Request Broker Architecture) @cindex Interface Definition Language @cindex Interactive Data Language -@cindex cc-mode.el +@cindex @file{cc-mode.el} @cindex @file{idl.el} @cindex @file{idl-shell.el} @cindex Feature overview diff --git a/doc/misc/message.texi b/doc/misc/message.texi index ca06de38d1..71298751c6 100644 --- a/doc/misc/message.texi +++ b/doc/misc/message.texi @@ -1222,7 +1222,7 @@ according to two different standards, namely @acronym{PGP} or @node Passphrase caching @subsection Passphrase caching -@cindex gpg-agent +@cindex @command{gpg-agent} Message with EasyPG internally calls GnuPG (the @command{gpg} or @command{gpgsm} command) to perform data encryption, and in certain cases (decrypting or signing for diff --git a/doc/misc/mh-e.texi b/doc/misc/mh-e.texi index 5f0cc32cc4..a9c8bbbfb3 100644 --- a/doc/misc/mh-e.texi +++ b/doc/misc/mh-e.texi @@ -2101,9 +2101,9 @@ Emacs 21 and XEmacs. For more information, see @uref{http://quimby.gnus.org/circus/face/}.}. @cindex @command{uncompface} -@cindex Emacs, packages, x-face +@cindex Emacs, packages, @samp{x-face} @cindex Unix commands, @command{uncompface} -@cindex x-face package +@cindex @samp{x-face} package @vindex mh-show-xface Next is the traditional @samp{X-Face:} header field@footnote{The @@ -2306,8 +2306,8 @@ System: type @kbd{M-! xterm -e mhshow @var{message-number}}. You can leave out the @samp{xterm -e} if you use @command{mhlist} or @command{mhstore}.}. -@cindex Emacs, packages, mm-decode -@cindex mm-decode package +@cindex Emacs, packages, @samp{mm-decode} +@cindex @samp{mm-decode} package @findex mh-toggle-mh-decode-mime-flag @kindex ; (semicolon) @vindex mh-decode-mime-flag @@ -2904,8 +2904,8 @@ Another related function is the command @kbd{P F} faces and not. When faces are enabled, the printed message will look very similar to the message in the MH-Show buffer. -@cindex ps-print package -@cindex Emacs, packages, ps-print +@cindex @samp{ps-print} package +@cindex Emacs, packages, @samp{ps-print} MH-E uses the @samp{ps-print} package to do the printing, so you can customize the printing further by going to the @samp{ps-print} @@ -4997,8 +4997,8 @@ You can also turn on the @code{mh-delete-yanked-msg-window-flag} option to delete the window containing the original message after yanking it to make more room on your screen for your reply. -@cindex Emacs, packages, supercite -@cindex supercite package +@cindex Emacs, packages, @samp{supercite} +@cindex @samp{supercite} package @kindex r @vindex mail-citation-hook @vindex mh-yank-behavior @@ -5061,8 +5061,8 @@ and it should leave point and mark around the modified citation text for the next hook function. The standard prefix @code{mh-ins-buf-prefix} is not added if this hook is set. -@cindex Emacs, packages, trivial-cite -@cindex trivial-cite package +@cindex Emacs, packages, @samp{trivial-cite} +@cindex @samp{trivial-cite} package @vindex mh-yank-behavior For example, if you use the hook function @@ -5499,7 +5499,7 @@ LyogWFBNICovCnN0YXRpYyBjaGFyICogc2V0aWF0aG9tZV94cG1bXSA9IHsKIjQ1IDQ1IDc2N @end cartouche @i{MH-E @sc{mime} draft ready to send} -@cindex undo effects of mh-mml-to-mime +@cindex undo effects of @code{mh-mml-to-mime} This action can be undone by running @kbd{C-_} (@code{undo}). @@ -5507,7 +5507,7 @@ This action can be undone by running @kbd{C-_} (@code{undo}). @cindex @command{mhn} @cindex MH commands, @command{mhbuild} @cindex MH commands, @command{mhn} -@cindex undo effects of mh-mh-to-mime +@cindex undo effects of @code{mh-mh-to-mime} @findex mh-mh-to-mime @findex mh-mh-to-mime-undo @kindex C-c C-e diff --git a/doc/misc/sem-user.texi b/doc/misc/sem-user.texi index e82162621b..8484a7bfe2 100644 --- a/doc/misc/sem-user.texi +++ b/doc/misc/sem-user.texi @@ -1145,7 +1145,7 @@ Typing @kbd{RET} on a reference line jumps to that reference. @node MRU Bookmarks @section MRU Bookmarks mode -@cindex semantic-mru-bookmark-mode +@cindex @code{semantic-mru-bookmark-mode} Semantic MRU Bookmarks mode is a minor mode that keeps track of the tags you have edited, allowing you to quickly return to them later @@ -1193,7 +1193,7 @@ declarations. Other possible tag classes are @code{variable}, @node Highlight Func Mode @section Highlight Func Mode -@cindex semantic-highlight-func-mode +@cindex @code{semantic-highlight-func-mode} Semantic Highlight Function minor mode highlights the declaration line of the current function or tag (that is to say, the first line that @@ -1220,7 +1220,7 @@ Func mode. @node Tag Decoration Mode @section Tag Decoration Mode -@cindex semantic-decoration-mode +@cindex @code{semantic-decoration-mode} Semantic Tag Decoration mode ``decorates'' each tag based on certain arbitrary features of that tag. Decorations are specified using the diff --git a/doc/misc/ses.texi b/doc/misc/ses.texi index 60963adcb2..4db5fda34a 100644 --- a/doc/misc/ses.texi +++ b/doc/misc/ses.texi @@ -1282,10 +1282,10 @@ avoid virus warnings, each function used in a formula needs @node Uses of defadvice in @acronym{SES} @section Uses of defadvice in @acronym{SES} -@cindex defadvice -@cindex undo-more -@cindex copy-region-as-kill -@cindex yank +@findex defadvice +@findex undo-more +@findex copy-region-as-kill +@findex yank @table @code @item undo-more diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index c3beeb79eb..aa8e84cf0c 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi @@ -2558,8 +2558,8 @@ For ad-hoc definitions to be saved automatically in @node Remote processes @section Integration with other Emacs packages -@cindex compile -@cindex recompile +@cindex @code{compile} +@cindex @code{recompile} @value{tramp} supports starting new running processes on the remote host for discovering remote file names. Emacs packages on the remote @@ -2699,7 +2699,7 @@ local host. @subsection Running @code{shell} on a remote host -@cindex shell +@cindex @code{shell} Set @option{explicit-shell-file-name} to the appropriate shell name when using @value{tramp} between two hosts with different operating @@ -2747,7 +2747,7 @@ different remote hosts. @subsection Running @code{shell-command} on a remote host -@cindex shell-command +@cindex @code{shell-command} @code{shell-command} executes commands synchronously or asynchronously on remote hosts and displays output in buffers on the local @@ -2768,7 +2768,7 @@ continuous output. @subsection Running @code{eshell} on a remote host -@cindex eshell +@cindex @code{eshell} @value{tramp} is integrated into @file{eshell.el}, which enables interactive eshell sessions on remote hosts at the command prompt. @@ -2814,9 +2814,9 @@ uid=0(root) gid=0(root) groups=0(root) @anchor{Running a debugger on a remote host} @subsection Running a debugger on a remote host -@cindex gud -@cindex gdb -@cindex perldb +@cindex @code{gud} +@cindex @code{gdb} +@cindex @code{perldb} @file{gud.el} provides a unified interface to symbolic debuggers @ifinfo @@ -2863,8 +2863,8 @@ relative or absolute paths, but not remote paths. @subsection Running remote processes on MS Windows hosts -@cindex winexe -@cindex powershell +@cindex @command{winexe} +@cindex @command{powershell} @command{winexe} runs processes on a remote MS Windows host, and @value{tramp} can use it for @code{process-file} and diff --git a/doc/misc/vhdl-mode.texi b/doc/misc/vhdl-mode.texi index e94fba6fc6..c061fb8e43 100644 --- a/doc/misc/vhdl-mode.texi +++ b/doc/misc/vhdl-mode.texi @@ -322,7 +322,7 @@ the minibuffer when you hit @kbd{TAB}. @chapter Customizing Indentation @cindex Customizing Indentation -@cindex vhdl-set-offset +@cindex @code{vhdl-set-offset} @cindex set-offset (vhdl-) The @code{vhdl-offsets-alist} variable is where you customize all your indentations. You simply need to decide what additional offset you want @@ -334,7 +334,7 @@ pre-defined styles will suit your needs, but if not, this section will describe how to set up basic editing configurations. @xref{Styles}, for an explanation of how to set up named styles. -@cindex vhdl-basic-offset +@cindex @code{vhdl-basic-offset} @cindex basic-offset (vhdl-) As mentioned previously, the variable @code{vhdl-offsets-alist} is an association list between syntactic symbols and the offsets to be applied commit 57c9f123003dc2769e449af2880917a3a1673428 Merge: e415309fef 560a23e1da Author: Michael Albinus Date: Sat Feb 24 20:48:21 2018 +0100 Merge branch 'emacs-26' of git.sv.gnu.org:/srv/git/emacs into emacs-26 commit e415309fef4077fe7e4dfe1a898d749c1136ca2c Author: Michael Albinus Date: Sat Feb 24 20:40:39 2018 +0100 Fix @cindex entries in org.texi * doc/misc/org.texi: Fix @cindex entries. Use consistently @code{} for keywords. diff --git a/doc/misc/org.texi b/doc/misc/org.texi index b187bfcdbc..19c83f65a6 100644 --- a/doc/misc/org.texi +++ b/doc/misc/org.texi @@ -1342,9 +1342,9 @@ following lines anywhere in the buffer: #+STARTUP: showeverything @end example -@cindex property, VISIBILITY +@cindex property, @code{VISIBILITY} @noindent -Furthermore, any entries with a @samp{VISIBILITY} property (@pxref{Properties +Furthermore, any entries with a @code{VISIBILITY} property (@pxref{Properties and columns}) will get their visibility adapted accordingly. Allowed values for this property are @code{folded}, @code{children}, @code{content}, and @code{all}. @@ -1352,7 +1352,7 @@ for this property are @code{folded}, @code{children}, @code{content}, and @table @asis @orgcmd{C-u C-u @key{TAB},org-set-startup-visibility} Switch back to the startup visibility of the buffer, i.e., whatever is -requested by startup options and @samp{VISIBILITY} properties in individual +requested by startup options and @code{VISIBILITY} properties in individual entries. @end table @@ -1819,7 +1819,7 @@ or by a custom function. @cindex drawers @cindex visibility cycling, drawers -@cindex org-insert-drawer +@cindex @code{org-insert-drawer} @kindex C-c C-x d Sometimes you want to keep information associated with an entry, but you normally don't want to see it. For this, Org mode has @emph{drawers}. They @@ -2567,7 +2567,7 @@ rows/columns. @cindex references, named @cindex name, of column or field @cindex constants, in calculations -@cindex #+CONSTANTS +@cindex @code{#+CONSTANTS} @vindex org-table-formula-constants @samp{$name} is interpreted as the name of a column, parameter or @@ -2604,7 +2604,7 @@ numbers. @cindex references, to a different table @cindex name, of column or field @cindex constants, in calculations -@cindex #+NAME, for table +@cindex @code{#+NAME}, for table You may also reference constants, fields and ranges from a different table, either in the current file or even in a different file. The syntax is @@ -2826,8 +2826,8 @@ preceded by @samp{:=}, for example @samp{:=vsum(@@II..III)}. When you press the formula will be stored as the formula for this field, evaluated, and the current field will be replaced with the result. -@cindex #+TBLFM -Formulas are stored in a special line starting with @samp{#+TBLFM:} directly +@cindex @code{#+TBLFM} +Formulas are stored in a special line starting with @code{#+TBLFM:} directly below the table. If you type the equation in the 4th field of the 3rd data line in the table, the formula will look like @samp{@@3$4=$1+$2}. When inserting/deleting/swapping columns and rows with the appropriate commands, @@ -2845,7 +2845,7 @@ command @table @kbd @orgcmd{C-u C-c =,org-table-eval-formula} Install a new formula for the current field. The command prompts for a -formula with default taken from the @samp{#+TBLFM:} line, applies +formula with default taken from the @code{#+TBLFM:} line, applies it to the current field, and stores it. @end table @@ -2892,7 +2892,7 @@ the formula will be stored as the formula for the current column, evaluated and the current field replaced with the result. If the field contains only @samp{=}, the previously stored formula for this column is used. For each column, Org will only remember the most recently used formula. In the -@samp{#+TBLFM:} line, column formulas will look like @samp{$4=$1+$2}. The +@code{#+TBLFM:} line, column formulas will look like @samp{$4=$1+$2}. The left-hand side of a column formula cannot be the name of column, it must be the numeric column reference or @code{$>}. @@ -2903,7 +2903,7 @@ following command: @orgcmd{C-c =,org-table-eval-formula} Install a new formula for the current column and replace current field with the result of the formula. The command prompts for a formula, with default -taken from the @samp{#+TBLFM} line, applies it to the current field and +taken from the @code{#+TBLFM} line, applies it to the current field and stores it. With a numeric prefix argument(e.g., @kbd{C-5 C-c =}) the command will apply it to that many consecutive fields in the current column. @end table @@ -3039,25 +3039,25 @@ Turn the coordinate grid in the table on and off. @end table Making a table field blank does not remove the formula associated with -the field, because that is stored in a different line (the @samp{#+TBLFM} +the field, because that is stored in a different line (the @code{#+TBLFM} line)---during the next recalculation the field will be filled again. To remove a formula from a field, you have to give an empty reply when -prompted for the formula, or to edit the @samp{#+TBLFM} line. +prompted for the formula, or to edit the @code{#+TBLFM} line. @kindex C-c C-c -You may edit the @samp{#+TBLFM} directly and re-apply the changed +You may edit the @code{#+TBLFM} directly and re-apply the changed equations with @kbd{C-c C-c} in that line or with the normal recalculation commands in the table. @anchor{Using multiple #+TBLFM lines} -@subsubheading Using multiple #+TBLFM lines -@cindex #+TBLFM line, multiple -@cindex #+TBLFM -@cindex #+TBLFM, switching +@subsubheading Using multiple @code{#+TBLFM} lines +@cindex @code{#+TBLFM} line, multiple +@cindex @code{#+TBLFM} +@cindex @code{#+TBLFM}, switching @kindex C-c C-c You may apply the formula temporarily. This is useful when you -switch the formula. Place multiple @samp{#+TBLFM} lines right +switch the formula. Place multiple @code{#+TBLFM} lines right after the table, and then press @kbd{C-c C-c} on the formula to apply. Here is an example: @@ -3084,7 +3084,7 @@ Pressing @kbd{C-c C-c} in the line of @samp{#+TBLFM: $2=$1*2} yields: @noindent Note: If you recalculate this table (with @kbd{C-u C-c *}, for example), you -will get the following result of applying only the first @samp{#+TBLFM} line. +will get the following result of applying only the first @code{#+TBLFM} line. @example | x | y | @@ -3251,7 +3251,7 @@ functions. @section Org-Plot @cindex graph, in tables @cindex plot tables using Gnuplot -@cindex #+PLOT +@cindex @code{#+PLOT} Org-Plot can produce graphs of information stored in org tables, either graphically or in ASCII-art. @@ -3434,7 +3434,7 @@ internal structure of all links, use the menu entry @cindex links, internal @cindex targets, for links -@cindex property, CUSTOM_ID +@cindex property, @code{CUSTOM_ID} If the link does not look like a URL, it is considered to be internal in the current file. The most important case is a link like @samp{[[#my-custom-id]]} which will link to the entry with the @@ -3450,7 +3450,7 @@ point to the corresponding headline. The preferred match for a text link is a @i{dedicated target}: the same string in double angular brackets, like @samp{<>}. -@cindex #+NAME +@cindex @code{#+NAME} If no dedicated target exists, the link will then try to match the exact name of an element within the buffer. Naming is done with the @code{#+NAME} keyword, which has to be put in the line before the element it refers to, as @@ -3642,8 +3642,8 @@ removed from the link and result in a wrong link---you should avoid putting timestamp in the headline.}. @vindex org-id-link-to-org-use-id -@cindex property, CUSTOM_ID -@cindex property, ID +@cindex property, @code{CUSTOM_ID} +@cindex property, @code{ID} If the headline has a @code{CUSTOM_ID} property, a link to this custom ID will be stored. In addition or alternatively (depending on the value of @code{org-id-link-to-org-use-id}), a globally unique @code{ID} property will @@ -3885,7 +3885,7 @@ what the Org author is doing besides Emacs hacking with If you need special abbreviations just for a single Org buffer, you can define them in the file with -@cindex #+LINK +@cindex @code{#+LINK} @example #+LINK: bugzilla http://10.1.2.9/bugzilla/show_bug.cgi?id= #+LINK: google http://www.google.com/search?q=%s @@ -4243,9 +4243,9 @@ unique keys across both sets of keywords.} @subsection Setting up keywords for individual files @cindex keyword options @cindex per-file keywords -@cindex #+TODO -@cindex #+TYP_TODO -@cindex #+SEQ_TODO +@cindex @code{#+TODO} +@cindex @code{#+TYP_TODO} +@cindex @code{#+SEQ_TODO} It can be very useful to use different aspects of the TODO mechanism in different files. For file-local settings, you need to add special lines to @@ -4320,7 +4320,7 @@ foreground or a background color. @cindex TODO dependencies, NOBLOCKING @vindex org-enforce-todo-dependencies -@cindex property, ORDERED +@cindex property, @code{ORDERED} The structure of Org files (hierarchy and lists) makes it easy to define TODO dependencies. Usually, a parent TODO task should not be marked DONE until all subtasks (defined as children tasks) are marked as DONE@. And sometimes @@ -4359,7 +4359,7 @@ property: @table @kbd @orgcmd{C-c C-x o,org-toggle-ordered-property} @vindex org-track-ordered-property-with-tag -@cindex property, ORDERED +@cindex property, @code{ORDERED} Toggle the @code{ORDERED} property of the current entry. A property is used for this behavior because this should be local to the current entry, not inherited like a tag. However, if you would like to @i{track} the value of @@ -4441,7 +4441,7 @@ the entry with a @samp{Closing Note} heading. @vindex org-log-states-order-reversed @vindex org-log-into-drawer -@cindex property, LOG_INTO_DRAWER +@cindex property, @code{LOG_INTO_DRAWER} When TODO keywords are used as workflow states (@pxref{Workflow states}), you might want to keep track of when a state change occurred and maybe take a note about this change. You can either record just a timestamp, or a @@ -4495,12 +4495,12 @@ to a buffer: #+TODO: TODO(t) WAIT(w@@/!) | DONE(d!) CANCELED(c@@) @end example -@cindex property, LOGGING -In order to define logging settings that are local to a subtree or a -single item, define a LOGGING property in this entry. Any non-empty -LOGGING property resets all logging settings to @code{nil}. You may then turn -on logging for this specific tree using STARTUP keywords like -@code{lognotedone} or @code{logrepeat}, as well as adding state specific +@cindex property, @code{LOGGING} +In order to define logging settings that are local to a subtree or a single +item, define a @code{LOGGING} property in this entry. Any non-empty +@code{LOGGING} property resets all logging settings to @code{nil}. You may +then turn on logging for this specific tree using @code{#+STARTUP} keywords +like @code{lognotedone} or @code{logrepeat}, as well as adding state specific settings like @code{TODO(!)}. For example @example @@ -4671,7 +4671,7 @@ these values (highest, lowest, default) like this (please make sure that the highest priority is earlier in the alphabet than the lowest priority): -@cindex #+PRIORITIES +@cindex @code{#+PRIORITIES} @example #+PRIORITIES: A C B @end example @@ -4700,7 +4700,7 @@ be updated each time the TODO status of a child changes, or when pressing ** DONE Talk to neighbor @end example -@cindex property, COOKIE_DATA +@cindex property, @code{COOKIE_DATA} If a heading has both checkboxes and TODO children below it, the meaning of the statistics cookie become ambiguous. Set the property @code{COOKIE_DATA} to either @samp{checkbox} or @samp{todo} to resolve @@ -4772,7 +4772,7 @@ checked. @cindex statistics, for checkboxes @cindex checkbox statistics -@cindex property, COOKIE_DATA +@cindex property, @code{COOKIE_DATA} @vindex org-checkbox-hierarchical-statistics The @samp{[2/4]} and @samp{[1/3]} in the first and second line are cookies indicating how many checkboxes present in this entry have been checked off, @@ -4794,7 +4794,7 @@ to either @samp{checkbox} or @samp{todo} to resolve this issue. @cindex blocking, of checkboxes @cindex checkbox blocking -@cindex property, ORDERED +@cindex property, @code{ORDERED} If the current outline node has an @code{ORDERED} property, checkboxes must be checked off in sequence, and an error will be thrown if you try to check off a box while there are unchecked boxes above it. @@ -4831,7 +4831,7 @@ Insert a new item with a checkbox. This works only if the cursor is already in a plain list item (@pxref{Plain lists}). @orgcmd{C-c C-x o,org-toggle-ordered-property} @vindex org-track-ordered-property-with-tag -@cindex property, ORDERED +@cindex property, @code{ORDERED} Toggle the @code{ORDERED} property of the entry, to toggle if checkboxes must be checked off in sequence. A property is used for this behavior because this should be local to the current entry, not inherited like a tag. @@ -4899,7 +4899,7 @@ a hypothetical level zero that surrounds the entire file. Use a line like this@footnote{As with all these in-buffer settings, pressing @kbd{C-c C-c} activates any changes in the line.}: -@cindex #+FILETAGS +@cindex @code{#+FILETAGS} @example #+FILETAGS: :Peter:Boss:Secret: @end example @@ -4961,7 +4961,7 @@ currently used in the buffer. You may also globally specify a hard list of tags with the variable @code{org-tag-alist}. Finally you can set the default tags for a given file with lines like -@cindex #+TAGS +@cindex @code{#+TAGS} @example #+TAGS: @@work @@home @@tennisclub #+TAGS: laptop car pc sailboat @@ -4980,7 +4980,7 @@ If you have a preferred set of tags that you would like to use in every file, in addition to those defined on a per-file basis by TAGS option lines, then you may specify a list of tags with the variable @code{org-tag-persistent-alist}. You may turn this off on a per-file basis -by adding a STARTUP option line to that file: +by adding a @code{#+STARTUP} option line to that file: @example #+STARTUP: noptag @@ -5330,8 +5330,8 @@ publishers and the number of disks in a box like this: If you want to set properties that can be inherited by any entry in a file, use a line like -@cindex property, _ALL -@cindex #+PROPERTY +@cindex property, @code{_ALL} +@cindex @code{#+PROPERTY} @example #+PROPERTY: NDisks_ALL 1 2 3 4 @end example @@ -5342,7 +5342,7 @@ buffer with @kbd{C-c C-c} to activate this change. If you want to add to the value of an existing property, append a @code{+} to the property name. The following results in the property @code{var} having the value ``foo=1 bar=2''. -@cindex property, + +@cindex property, @code{+} @example #+PROPERTY: var foo=1 #+PROPERTY: var+ bar=2 @@ -5351,7 +5351,7 @@ the value ``foo=1 bar=2''. It is also possible to add to the values of inherited properties. The following results in the @code{genres} property having the value ``Classic Baroque'' under the @code{Goldberg Variations} subtree. -@cindex property, + +@cindex property, @code{+} @example * CD collection ** Classic @@ -5386,7 +5386,7 @@ in the current file will be offered as possible completions. Set a property. This prompts for a property name and a value. If necessary, the property drawer is created as well. @item C-u M-x org-insert-drawer RET -@cindex org-insert-drawer +@cindex @code{org-insert-drawer} Insert a property drawer into the current entry. The drawer will be inserted early in the entry, but after the lines with planning information like deadlines. @@ -5417,20 +5417,20 @@ a column view (@pxref{Column view}), or to use them in queries. The following property names are special and should not be used as keys in the properties drawer: -@cindex property, special, ALLTAGS -@cindex property, special, BLOCKED -@cindex property, special, CLOCKSUM -@cindex property, special, CLOCKSUM_T -@cindex property, special, CLOSED -@cindex property, special, DEADLINE -@cindex property, special, FILE -@cindex property, special, ITEM -@cindex property, special, PRIORITY -@cindex property, special, SCHEDULED -@cindex property, special, TAGS -@cindex property, special, TIMESTAMP -@cindex property, special, TIMESTAMP_IA -@cindex property, special, TODO +@cindex property, special, @code{ALLTAGS} +@cindex property, special, @code{BLOCKED} +@cindex property, special, @code{CLOCKSUM} +@cindex property, special, @code{CLOCKSUM_T} +@cindex property, special, @code{CLOSED} +@cindex property, special, @code{DEADLINE} +@cindex property, special, @code{FILE} +@cindex property, special, @code{ITEM} +@cindex property, special, @code{PRIORITY} +@cindex property, special, @code{SCHEDULED} +@cindex property, special, @code{TAGS} +@cindex property, special, @code{TIMESTAMP} +@cindex property, special, @code{TIMESTAMP_IA} +@cindex property, special, @code{TODO} @example ALLTAGS @r{All tags, including inherited ones.} BLOCKED @r{"t" if task is currently blocked by children or siblings.} @@ -5510,7 +5510,7 @@ search will stop at this value and return @code{nil}. Org mode has a few properties for which inheritance is hard-coded, at least for the special applications for which they are used: -@cindex property, COLUMNS +@cindex property, @code{COLUMNS} @table @code @item COLUMNS The @code{:COLUMNS:} property defines the format of column view @@ -5519,16 +5519,16 @@ where a @code{:COLUMNS:} property is defined is used as the starting point for a column view table, independently of the location in the subtree from where columns view is turned on. @item CATEGORY -@cindex property, CATEGORY +@cindex property, @code{CATEGORY} For agenda view, a category set through a @code{:CATEGORY:} property applies to the entire subtree. @item ARCHIVE -@cindex property, ARCHIVE +@cindex property, @code{ARCHIVE} For archiving, the @code{:ARCHIVE:} property may define the archive location for the entire subtree (@pxref{Moving subtrees}). @item LOGGING -@cindex property, LOGGING -The LOGGING property may define logging settings for an entry or a +@cindex property, @code{LOGGING} +The @code{LOGGING} property may define logging settings for an entry or a subtree (@pxref{Tracking TODO state changes}). @end table @@ -5573,7 +5573,7 @@ done by defining a column format line. To define a column format for an entire file, use a line like -@cindex #+COLUMNS +@cindex @code{#+COLUMNS} @example #+COLUMNS: %25ITEM %TAGS %PRIORITY %TODO @end example @@ -5768,7 +5768,7 @@ exported or printed directly. If you want to capture a column view, use a @code{columnview} dynamic block (@pxref{Dynamic blocks}). The frame of this block looks like this: -@cindex #+BEGIN, columnview +@cindex @code{#+BEGIN}, columnview @example * The column view #+BEGIN: columnview :hlines 1 :id "label" @@ -5784,7 +5784,7 @@ This is the most important parameter. Column view is a feature that is often localized to a certain (sub)tree, and the capture block might be at a different location in the file. To identify the tree whose view to capture, you can use 4 values: -@cindex property, ID +@cindex property, @code{ID} @example local @r{use the tree in which the capture block is located} global @r{make a global view, including all headings in the file} @@ -5792,7 +5792,7 @@ global @r{make a global view, including all headings in the file} @r{run column view at the top of this file} "@var{ID}" @r{call column view in the tree that has an @code{:ID:}} @r{property with the value @i{label}. You can use} - @r{@kbd{M-x org-id-copy RET} to create a globally unique ID for} + @r{@kbd{M-x org-id-copy RET} to create a globally unique @code{ID} for} @r{the current entry and copy it to the kill-ring.} @end example @item :hlines @@ -5816,7 +5816,7 @@ The following commands insert or update the dynamic block: @table @kbd @orgcmd{C-c C-x i,org-insert-columns-dblock} Insert a dynamic block capturing a column view. You will be prompted -for the scope or ID of the view. +for the scope or @code{ID} of the view. @orgcmdkkc{C-c C-c,C-c C-x C-u,org-dblock-update} Update dynamic block at point. @orgcmd{C-u C-c C-x C-u,org-update-all-dblocks} @@ -6224,7 +6224,7 @@ they refer to. @table @var @item DEADLINE -@cindex DEADLINE keyword +@cindex @code{DEADLINE} keyword Meaning: the task (most likely a TODO item, though not necessarily) is supposed to be finished on that date. @@ -6250,7 +6250,7 @@ deactivated if the task gets scheduled and you set @code{org-agenda-skip-deadline-prewarning-if-scheduled} to @code{t}. @item SCHEDULED -@cindex SCHEDULED keyword +@cindex @code{SCHEDULED} keyword Meaning: you are planning to start working on that task on the given date. @@ -6315,7 +6315,7 @@ an item: @table @kbd @c @orgcmd{C-c C-d,org-deadline} -Insert @samp{DEADLINE} keyword along with a stamp. Any CLOSED timestamp will +Insert @code{DEADLINE} keyword along with a stamp. Any CLOSED timestamp will be removed. When called with a prefix arg, an existing deadline will be removed from the entry. Depending on the variable @code{org-log-redeadline}@footnote{with corresponding @code{#+STARTUP} @@ -6324,7 +6324,7 @@ keywords @code{logredeadline}, @code{lognoteredeadline}, and deadline. @orgcmd{C-c C-s,org-schedule} -Insert @samp{SCHEDULED} keyword along with a stamp. Any CLOSED timestamp +Insert @code{SCHEDULED} keyword along with a stamp. Any CLOSED timestamp will be removed. When called with a prefix argument, remove the scheduling date from the entry. Depending on the variable @code{org-log-reschedule}@footnote{with corresponding @code{#+STARTUP} @@ -6358,8 +6358,8 @@ to the previous week before any current timestamp. @cindex tasks, repeated @cindex repeated tasks -Some tasks need to be repeated again and again. Org mode helps to -organize such tasks using a so-called repeater in a DEADLINE, SCHEDULED, +Some tasks need to be repeated again and again. Org mode helps to organize +such tasks using a so-called repeater in a @code{DEADLINE}, @code{SCHEDULED}, or plain timestamp. In the following example @example ** TODO Pay the rent @@ -6376,18 +6376,18 @@ first and the warning period last: @code{DEADLINE: <2005-10-01 Sat +1m -3d>}. @vindex org-todo-repeat-to-state Deadlines and scheduled items produce entries in the agenda when they are over-due, so it is important to be able to mark such an entry as completed -once you have done so. When you mark a DEADLINE or a SCHEDULE with the TODO -keyword DONE, it will no longer produce entries in the agenda. The problem -with this is, however, that then also the @emph{next} instance of the -repeated entry will not be active. Org mode deals with this in the following -way: When you try to mark such an entry DONE (using @kbd{C-c C-t}), it will -shift the base date of the repeating timestamp by the repeater interval, and -immediately set the entry state back to TODO@footnote{In fact, the target -state is taken from, in this sequence, the @code{REPEAT_TO_STATE} property or -the variable @code{org-todo-repeat-to-state}. If neither of these is -specified, the target state defaults to the first state of the TODO state -sequence.}. In the example above, setting the state to DONE would actually -switch the date like this: +once you have done so. When you mark a @code{DEADLINE} or a @code{SCHEDULED} +with the TODO keyword DONE, it will no longer produce entries in the agenda. +The problem with this is, however, that then also the @emph{next} instance of +the repeated entry will not be active. Org mode deals with this in the +following way: When you try to mark such an entry DONE (using @kbd{C-c C-t}), +it will shift the base date of the repeating timestamp by the repeater +interval, and immediately set the entry state back to TODO@footnote{In fact, +the target state is taken from, in this sequence, the @code{REPEAT_TO_STATE} +property or the variable @code{org-todo-repeat-to-state}. If neither of +these is specified, the target state defaults to the first state of the TODO +state sequence.}. In the example above, setting the state to DONE would +actually switch the date like this: @example ** TODO Pay the rent @@ -6493,22 +6493,21 @@ what to do with it. @orgcmd{C-c C-x C-i,org-clock-in} @vindex org-clock-into-drawer @vindex org-clock-continuously -@cindex property, LOG_INTO_DRAWER -Start the clock on the current item (clock-in). This inserts the CLOCK -keyword together with a timestamp. If this is not the first clocking of -this item, the multiple CLOCK lines will be wrapped into a -@code{:LOGBOOK:} drawer (see also the variable -@code{org-clock-into-drawer}). You can also overrule -the setting of this variable for a subtree by setting a -@code{CLOCK_INTO_DRAWER} or @code{LOG_INTO_DRAWER} property. -When called with a @kbd{C-u} prefix argument, -select the task from a list of recently clocked tasks. With two @kbd{C-u -C-u} prefixes, clock into the task at point and mark it as the default task; -the default task will then always be available with letter @kbd{d} when -selecting a clocking task. With three @kbd{C-u C-u C-u} prefixes, force -continuous clocking by starting the clock when the last clock stopped.@* -@cindex property: CLOCK_MODELINE_TOTAL -@cindex property: LAST_REPEAT +@cindex property, @code{LOG_INTO_DRAWER} +!Start the clock on the current item (clock-in). This inserts the +@code{CLOCK} keyword together with a timestamp. If this is not the first +clocking of this item, the multiple @code{CLOCK} lines will be wrapped into a +@code{:LOGBOOK:} drawer (see also the variable @code{org-clock-into-drawer}). +You can also overrule the setting of this variable for a subtree by setting a +@code{CLOCK_INTO_DRAWER} or @code{LOG_INTO_DRAWER} property. When called +with a @kbd{C-u} prefix argument, select the task from a list of recently +clocked tasks. With two @kbd{C-u C-u} prefixes, clock into the task at point +and mark it as the default task; the default task will then always be +available with letter @kbd{d} when selecting a clocking task. With three +@kbd{C-u C-u C-u} prefixes, force continuous clocking by starting the clock +when the last clock stopped.@* +@cindex property, @code{CLOCK_MODELINE_TOTAL} +@cindex property, @code{LAST_REPEAT} @vindex org-clock-modeline-total While the clock is running, the current clocking time is shown in the mode line, along with the title of the task. The clock time shown will be all @@ -6617,7 +6616,7 @@ needs to be in the @code{#+BEGIN: clocktable} line for this command. If Here is an example of the frame for a clock table as it is inserted into the buffer with the @kbd{C-c C-x C-r} command: -@cindex #+BEGIN, clocktable +@cindex @code{#+BEGIN}, clocktable @example #+BEGIN: clocktable :maxlevel 2 :emphasize nil :scope file #+END: clocktable @@ -6693,8 +6692,8 @@ but you can specify your own function using the @code{:formatter} parameter. @r{E.g., @code{:sort (1 . ?a)} sorts the first column alphabetically.} :compact @r{Abbreviation for @code{:level nil :indent t :narrow 40! :tcolumns 1}} @r{All are overwritten except if there is an explicit @code{:narrow}} -:timestamp @r{A timestamp for the entry, when available. Look for SCHEDULED,} - @r{DEADLINE, TIMESTAMP and TIMESTAMP_IA, in this order.} +:timestamp @r{A timestamp for the entry, when available. Look for @code{SCHEDULED},} + @r{@code{DEADLINE}, @code{TIMESTAMP} and @code{TIMESTAMP_IA}, in this order.} :properties @r{List of properties that should be shown in the table. Each} @r{property will get its own column.} :inherit-props @r{When this flag is @code{t}, the values for @code{:properties} will be inherited.} @@ -6825,7 +6824,7 @@ with @code{org-clock-in} and two @kbd{C-u C-u} with @code{org-clock-in-last}. @section Effort estimates @cindex effort estimates -@cindex property, Effort +@cindex property, @code{EFFORT} If you want to plan your work in a very detailed way, or if you need to produce offers with quotations of the estimated work effort, you may want to assign effort estimates to entries. If you are also clocking your work, you @@ -7043,7 +7042,7 @@ Visit the last stored capture item in its buffer. @end table @vindex org-capture-bookmark -@cindex org-capture-last-stored +@cindex @code{org-capture-last-stored} You can also jump to the bookmark @code{org-capture-last-stored}, which will automatically be created unless you set @code{org-capture-bookmark} to @code{nil}. @@ -7464,12 +7463,12 @@ Delete all of a task's attachments. A safer way is to open the directory in @command{dired} and delete from there. @orgcmdtkc{s,C-c C-a s,org-attach-set-directory} -@cindex property, ATTACH_DIR +@cindex property, @code{ATTACH_DIR} Set a specific directory as the entry's attachment directory. This works by putting the directory path into the @code{ATTACH_DIR} property. @orgcmdtkc{i,C-c C-a i,org-attach-set-inherit} -@cindex property, ATTACH_DIR_INHERIT +@cindex property, @code{ATTACH_DIR_INHERIT} Set the @code{ATTACH_DIR_INHERIT} property, so that children will use the same directory for attachments as the parent does. @end table @@ -7643,14 +7642,14 @@ javascript:location.href='org-protocol://open-source?&url='+ encodeURIComponent(location.href) @end example -@cindex protocol, open-source, :base-url property -@cindex :base-url property in open-source protocol -@cindex protocol, open-source, :working-directory property -@cindex :working-directory property in open-source protocol -@cindex protocol, open-source, :online-suffix property -@cindex :online-suffix property in open-source protocol -@cindex protocol, open-source, :working-suffix property -@cindex :working-suffix property in open-source protocol +@cindex protocol, open-source, @code{:base-url} property +@cindex @code{:base-url} property in open-source protocol +@cindex protocol, open-source, @code{:working-directory} property +@cindex @code{:working-directory} property in open-source protocol +@cindex protocol, open-source, @code{:online-suffix} property +@cindex @code{:online-suffix} property in open-source protocol +@cindex protocol, open-source, @code{:working-suffix} property +@cindex @code{:working-suffix} property in open-source protocol @vindex org-protocol-project-alist The variable @code{org-protocol-project-alist} maps URLs to local file names, by stripping URL parameters from the end and replacing the @code{:base-url} @@ -7687,8 +7686,8 @@ to something like @code{open-source} handler probably cannot find a file named @file{/home/user/example/print/posters.html.php} and fails. -@cindex protocol, open-source, :rewrites property -@cindex :rewrites property in open-source protocol +@cindex protocol, open-source, @code{:rewrites} property +@cindex @code{:rewrites property} in open-source protocol Such an entry in @code{org-protocol-project-alist} may hold an additional property @code{:rewrites}. This property is a list of cons cells, each of which maps a regular expression to a path relative to the @@ -7839,12 +7838,12 @@ see the documentation string of the variable There is also an in-buffer option for setting this variable, for example: -@cindex #+ARCHIVE +@cindex @code{#+ARCHIVE} @example #+ARCHIVE: %s_done:: @end example -@cindex property, ARCHIVE +@cindex property, @code{ARCHIVE} @noindent If you would like to have a special ARCHIVE location for a single entry or a (sub)tree, give the entry an @code{:ARCHIVE:} property with the @@ -8152,7 +8151,7 @@ The purpose of the weekly/daily @emph{agenda} is to act like a page of a paper agenda, showing all the tasks for the current week or day. @table @kbd -@cindex org-agenda, command +@cindex @code{org-agenda}, command @orgcmd{C-c a a,org-agenda-list} Compile an agenda for the current week from a list of Org files. The agenda shows the entries for each day. With a numeric prefix@footnote{For backward @@ -8639,7 +8638,7 @@ associated with the item. @subsection Categories @cindex category -@cindex #+CATEGORY +@cindex @code{#+CATEGORY} The category is a broad label assigned to each agenda item. By default, the category is simply derived from the file name, but you can also specify it with a special line in the buffer, like this: @@ -8649,8 +8648,8 @@ with a special line in the buffer, like this: @end example @noindent -@cindex property, CATEGORY -If you would like to have a special CATEGORY for a single entry or a +@cindex property, @code{CATEGORY} +If you would like to have a special @code{CATEGORY} for a single entry or a (sub)tree, give the entry a @code{:CATEGORY:} property with the special category you want to apply as the value. @@ -9862,7 +9861,7 @@ does not have a specific format---defined in a property, or in its file---it uses @code{org-columns-default-format}. @item -@cindex property, special, CLOCKSUM +@cindex property, special, @code{CLOCKSUM} If any of the columns has a summary type defined (@pxref{Column attributes}), turning on column view in the agenda will visit all relevant agenda files and make sure that the computations of this property are up to date. This is @@ -9886,7 +9885,7 @@ clocked time in the displayed period use clock table mode (press @kbd{R} in the agenda). @item -@cindex property, special, CLOCKSUM_T +@cindex property, special, @code{CLOCKSUM_T} When the column view in the agenda shows the @code{CLOCKSUM_T}, that is always today's clocked time for this item. So even in the weekly agenda, the clocksum listed in column view only originates from today. This lets you @@ -9926,7 +9925,7 @@ To preserve the line breaks, indentation and blank lines in a region, but otherwise use normal formatting, you can use this construct, which can also be used to format poetry. -@cindex #+BEGIN_VERSE +@cindex @code{#+BEGIN_VERSE} @cindex verse blocks @example #+BEGIN_VERSE @@ -9942,7 +9941,7 @@ When quoting a passage from another document, it is customary to format this as a paragraph that is indented on both the left and the right margin. You can include quotations in Org mode documents like this: -@cindex #+BEGIN_QUOTE +@cindex @code{#+BEGIN_QUOTE} @cindex quote blocks @example #+BEGIN_QUOTE @@ -9952,7 +9951,7 @@ but not any simpler -- Albert Einstein @end example If you would like to center some text, do it like this: -@cindex #+BEGIN_CENTER +@cindex @code{#+BEGIN_CENTER} @cindex center blocks @example #+BEGIN_CENTER @@ -9996,8 +9995,8 @@ a horizontal line. @section Images and Tables @cindex tables, markup rules -@cindex #+CAPTION -@cindex #+NAME +@cindex @code{#+CAPTION} +@cindex @code{#+NAME} Both the native Org mode tables (@pxref{Tables}) and tables formatted with the @file{table.el} package will be exported properly. For Org mode tables, the lines before the first horizontal separator line will become table header @@ -10048,7 +10047,7 @@ or may not be handled. You can include literal examples that should not be subjected to markup. Such examples will be typeset in monospace, so this is well suited for source code and similar examples. -@cindex #+BEGIN_EXAMPLE +@cindex @code{#+BEGIN_EXAMPLE} @example #+BEGIN_EXAMPLE @@ -10087,7 +10086,7 @@ example@footnote{Code in @samp{src} blocks may also be evaluated either interactively or on export. @xref{Working with source code}, for more information on evaluating code blocks.}, see @ref{Easy templates} for shortcuts to easily insert code blocks. -@cindex #+BEGIN_SRC +@cindex @code{#+BEGIN_SRC} @example #+BEGIN_SRC emacs-lisp @@ -10602,7 +10601,7 @@ Org document by adjusting outline visibility settings. @section Export settings @cindex Export, settings -@cindex #+OPTIONS +@cindex @code{#+OPTIONS} Export options can be set: globally with variables; for an individual file by making variables buffer-local with in-buffer settings (@pxref{In-buffer settings}), by setting individual keywords, or by specifying them in a @@ -10610,7 +10609,7 @@ compact form with the @code{#+OPTIONS} keyword; or for a tree by setting properties (@pxref{Properties and columns}). Options set at a specific level override options set at a more general level. -@cindex #+SETUPFILE +@cindex @code{#+SETUPFILE} In-buffer settings may appear anywhere in the file, either directly or indirectly through a file included using @samp{#+SETUPFILE: filename or URL} syntax. Option keyword sets tailored to a particular back-end can be @@ -10626,29 +10625,29 @@ variables, include: @table @samp @item AUTHOR -@cindex #+AUTHOR +@cindex @code{#+AUTHOR} @vindex user-full-name The document author (@code{user-full-name}). @item CREATOR -@cindex #+CREATOR +@cindex @code{#+CREATOR} @vindex org-export-creator-string Entity responsible for output generation (@code{org-export-creator-string}). @item DATE -@cindex #+DATE +@cindex @code{#+DATE} @vindex org-export-date-timestamp-format A date or a time-stamp@footnote{The variable @code{org-export-date-timestamp-format} defines how this time-stamp will be exported.}. @item EMAIL -@cindex #+EMAIL +@cindex @code{#+EMAIL} @vindex user-mail-address The email address (@code{user-mail-address}). @item LANGUAGE -@cindex #+LANGUAGE +@cindex @code{#+LANGUAGE} @vindex org-export-default-language Language to use for translating certain strings (@code{org-export-default-language}). With @samp{#+LANGUAGE: fr}, for @@ -10656,7 +10655,7 @@ example, Org translates @emph{Table of contents} to the French @emph{Table des matières}. @item SELECT_TAGS -@cindex #+SELECT_TAGS +@cindex @code{#+SELECT_TAGS} @vindex org-export-select-tags The default value is @code{:export:}. When a tree is tagged with @code{:export:} (@code{org-export-select-tags}), Org selects that tree and @@ -10665,7 +10664,7 @@ see below. When selectively exporting files with @code{:export:} tags set, Org does not export any text that appears before the first headline. @item EXCLUDE_TAGS -@cindex #+EXCLUDE_TAGS +@cindex @code{#+EXCLUDE_TAGS} @vindex org-export-exclude-tags The default value is @code{:noexport:}. When a tree is tagged with @code{:noexport:} (@code{org-export-exclude-tags}), Org excludes that tree @@ -10675,12 +10674,12 @@ unconditionally excluded from the export, even if they have an code blocks contained in them. @item TITLE -@cindex #+TITLE +@cindex @code{#+TITLE} @cindex document title Org displays this title. For long titles, use multiple @code{#+TITLE} lines. @item EXPORT_FILE_NAME -@cindex #+EXPORT_FILE_NAME +@cindex @code{#+EXPORT_FILE_NAME} The name of the output file to be generated. Otherwise, Org generates the file name based on the buffer name and the extension based on the back-end format. @@ -10786,7 +10785,7 @@ Toggle inclusion of inlinetasks (@code{org-export-with-inlinetasks}). @item num: @vindex org-export-with-section-numbers -@cindex property, UNNUMBERED +@cindex property, @code{UNNUMBERED} Toggle section-numbers (@code{org-export-with-section-numbers}). When set to number @samp{n}, Org numbers only those headlines at level @samp{n} or above. Setting @code{UNNUMBERED} property to non-@code{nil} disables numbering of @@ -10862,7 +10861,7 @@ respectively, @samp{EXPORT_DATE} and @samp{EXPORT_FILE_NAME}. Except for @samp{SETUPFILE}, all other keywords listed above have an @samp{EXPORT_} equivalent. -@cindex #+BIND +@cindex @code{#+BIND} @vindex org-export-allow-bind-keywords If @code{org-export-allow-bind-keywords} is non-@code{nil}, Emacs variables can become buffer-local during export by using the BIND keyword. Its syntax @@ -10875,7 +10874,7 @@ settings that cannot be changed using keywords. @cindex list of tables @cindex list of listings -@cindex #+TOC +@cindex @code{#+TOC} @vindex org-export-with-toc Org normally inserts the table of contents directly before the first headline of the file. Org sets the TOC depth the same as the headline levels in the @@ -10921,7 +10920,7 @@ with captions. #+TOC: tables @r{build a list of tables} @end example -@cindex property, ALT_TITLE +@cindex property, @code{ALT_TITLE} Normally Org uses the headline for its entry in the table of contents. But with @code{ALT_TITLE} property, a different entry can be specified for the table of contents. @@ -10931,7 +10930,7 @@ table of contents. @cindex include files, during export Include other files during export. For example, to include your @file{.emacs} file, you could use: -@cindex #+INCLUDE +@cindex @code{#+INCLUDE} @example #+INCLUDE: "~/.emacs" src emacs-lisp @@ -11003,7 +11002,7 @@ Visit the include file at point. @node Macro replacement @section Macro replacement @cindex macro replacement, during export -@cindex #+MACRO +@cindex @code{#+MACRO} @vindex org-export-global-macros Macros replace text snippets during export. Macros are defined globally in @@ -11095,9 +11094,9 @@ Lines starting with zero or more whitespace characters followed by one @samp{#} and a whitespace are treated as comments and, as such, are not exported. -@cindex #+BEGIN_COMMENT -Likewise, regions surrounded by @samp{#+BEGIN_COMMENT} -... @samp{#+END_COMMENT} are not exported. +@cindex @code{#+BEGIN_COMMENT} +Likewise, regions surrounded by @code{#+BEGIN_COMMENT} +... @code{#+END_COMMENT} are not exported. @cindex comment trees Finally, a @samp{COMMENT} keyword at the beginning of an entry, but after any @@ -11153,7 +11152,7 @@ settings}). @table @samp @item SUBTITLE -@cindex #+SUBTITLE (ASCII) +@cindex @code{#+SUBTITLE} (ASCII) The document subtitle. For long subtitles, use multiple @code{#+SUBTITLE} lines in the Org file. Org prints them on one continuous line, wrapping into multiple lines if necessary. @@ -11170,8 +11169,8 @@ where levels become lists, @pxref{Export settings}. To insert text within the Org file by the ASCII back-end, use one the following constructs, inline, keyword, or export block: -@cindex #+ASCII -@cindex #+BEGIN_EXPORT ascii +@cindex @code{#+ASCII} +@cindex @code{#+BEGIN_EXPORT ascii} @example Inline text @@@@ascii:and additional text@@@@ within a paragraph. @@ -11183,7 +11182,7 @@ Org exports text in this block only when using ASCII back-end. @end example @subheading ASCII specific attributes -@cindex #+ATTR_ASCII +@cindex @code{#+ATTR_ASCII} @cindex horizontal rules, in ASCII export ASCII back-end recognizes only one attribute, @code{:width}, which specifies @@ -11197,8 +11196,8 @@ syntax for specifying widths is: @subheading ASCII special blocks @cindex special blocks, in ASCII export -@cindex #+BEGIN_JUSTIFYLEFT -@cindex #+BEGIN_JUSTIFYRIGHT +@cindex @code{#+BEGIN_JUSTIFYLEFT} +@cindex @code{#+BEGIN_JUSTIFYRIGHT} Besides @code{#+BEGIN_CENTER} blocks (@pxref{Paragraphs}), ASCII back-end has these two left and right justification blocks: @@ -11256,7 +11255,7 @@ output. These keywords work similar to the general options settings @table @samp @item BEAMER_THEME -@cindex #+BEAMER_THEME +@cindex @code{#+BEAMER_THEME} @vindex org-beamer-theme The Beamer layout theme (@code{org-beamer-theme}). Use square brackets for options. For example: @@ -11265,24 +11264,24 @@ options. For example: @end smallexample @item BEAMER_FONT_THEME -@cindex #+BEAMER_FONT_THEME +@cindex @code{#+BEAMER_FONT_THEME} The Beamer font theme. @item BEAMER_INNER_THEME -@cindex #+BEAMER_INNER_THEME +@cindex @code{#+BEAMER_INNER_THEME} The Beamer inner theme. @item BEAMER_OUTER_THEME -@cindex #+BEAMER_OUTER_THEME +@cindex @code{#+BEAMER_OUTER_THEME} The Beamer outer theme. @item BEAMER_HEADER -@cindex #+BEAMER_HEADER +@cindex @code{#+BEAMER_HEADER} Arbitrary lines inserted in the preamble, just before the @samp{hyperref} settings. @item DESCRIPTION -@cindex #+DESCRIPTION (Beamer) +@cindex @code{#+DESCRIPTION} (Beamer) The document description. For long descriptions, use multiple @code{#+DESCRIPTION} keywords. By default, @samp{hyperref} inserts @code{#+DESCRIPTION} as metadata. Use @code{org-latex-hyperref-template} to @@ -11290,7 +11289,7 @@ configure document metadata. Use @code{org-latex-title-command} to configure typesetting of description as part of front matter. @item KEYWORDS -@cindex #+KEYWORDS (Beamer) +@cindex @code{#+KEYWORDS} (Beamer) The keywords for defining the contents of the document. Use multiple @code{#+KEYWORDS} lines if necessary. By default, @samp{hyperref} inserts @code{#+KEYWORDS} as metadata. Use @code{org-latex-hyperref-template} to @@ -11298,7 +11297,7 @@ configure document metadata. Use @code{org-latex-title-command} to configure typesetting of keywords as part of front matter. @item SUBTITLE -@cindex #+SUBTITLE (Beamer) +@cindex @code{#+SUBTITLE} (Beamer) @vindex org-beamer-subtitle-format Document's subtitle. For typesetting, use @code{org-beamer-subtitle-format} string. Use @code{org-latex-hyperref-template} to configure document @@ -11320,7 +11319,7 @@ Org headlines become Beamer frames when the heading level in Org is equal to @code{org-beamer-frame-level} or @code{H} value in an @code{OPTIONS} line (@pxref{Export settings}). -@cindex property, BEAMER_ENV +@cindex property, @code{BEAMER_ENV} Org overrides headlines to frames conversion for the current tree of an Org file if it encounters the @code{BEAMER_ENV} property set to @code{frame} or @code{fullframe}. Org ignores whatever @code{org-beamer-frame-level} happens @@ -11339,7 +11338,7 @@ aid and has no semantic relevance.}. For valid values see @code{org-beamer-environments-extra}. @item -@cindex property, BEAMER_REF +@cindex property, @code{BEAMER_REF} If @code{BEAMER_ENV} is set to @code{appendix}, Org exports the entry as an appendix. When set to @code{note}, Org exports the entry as a note within the frame or between frames, depending on the entry's heading level. When @@ -11353,8 +11352,8 @@ not its content. This is useful for inserting content between frames. It is also useful for properly closing a @code{column} environment. @end itemize -@cindex property, BEAMER_ACT -@cindex property, BEAMER_OPT +@cindex property, @code{BEAMER_ACT} +@cindex property, @code{BEAMER_OPT} When @code{BEAMER_ACT} is set for a headline, Org export translates that headline as an overlay or action specification. When enclosed in square brackets, Org export makes the overlay specification a default. Use @@ -11363,7 +11362,7 @@ or block. The Beamer export back-end wraps with appropriate angular or square brackets. It also adds the @code{fragile} option for any code that may require a verbatim block. -@cindex property, BEAMER_COL +@cindex property, @code{BEAMER_COL} To create a column on the Beamer slide, use the @code{BEAMER_COL} property for its headline in the Org file. Set the value of @code{BEAMER_COL} to a decimal number representing the fraction of the total text width. Beamer @@ -11378,8 +11377,8 @@ needs, use the @code{BEAMER_ENV} property. @node Beamer specific syntax @subsection Beamer specific syntax Since Org's Beamer export back-end is an extension of the @LaTeX{} back-end, -it recognizes other @LaTeX{} specific syntax---for example, @samp{#+LATEX:} -or @samp{#+ATTR_LATEX:}. @xref{@LaTeX{} export}, for details. +it recognizes other @LaTeX{} specific syntax---for example, @code{#+LATEX:} +or @code{#+ATTR_LATEX:}. @xref{@LaTeX{} export}, for details. Beamer export wraps the table of contents generated with @code{toc:t} @code{OPTION} keyword in a @code{frame} environment. Beamer export does not @@ -11392,8 +11391,8 @@ contents}). Use square brackets for specifying options. Insert Beamer-specific code using the following constructs: -@cindex #+BEAMER -@cindex #+BEGIN_EXPORT beamer +@cindex @code{#+BEAMER} +@cindex @code{#+BEGIN_EXPORT beamer} @example #+BEAMER: \pause @@ -11414,7 +11413,7 @@ this example: A *@@@@beamer:<2->@@@@useful* feature @end example -@cindex #+ATTR_BEAMER +@cindex @code{#+ATTR_BEAMER} Beamer export recognizes the @code{ATTR_BEAMER} keyword with the following attributes from Beamer configurations: @code{:environment} for changing local Beamer environment, @code{:overlay} for specifying Beamer overlays in angular @@ -11538,66 +11537,66 @@ described in @ref{Export settings}. @table @samp @item DESCRIPTION -@cindex #+DESCRIPTION (HTML) +@cindex @code{#+DESCRIPTION} (HTML) This is the document's description, which the HTML exporter inserts it as a HTML meta tag in the HTML file. For long descriptions, use multiple @code{#+DESCRIPTION} lines. The exporter takes care of wrapping the lines properly. @item HTML_DOCTYPE -@cindex #+HTML_DOCTYPE +@cindex @code{#+HTML_DOCTYPE} @vindex org-html-doctype Specify the document type, for example: HTML5 (@code{org-html-doctype}). @item HTML_CONTAINER -@cindex #+HTML_CONTAINER +@cindex @code{#+HTML_CONTAINER} @vindex org-html-container-element Specify the HTML container, such as @samp{div}, for wrapping sections and elements (@code{org-html-container-element}). @item HTML_LINK_HOME -@cindex #+HTML_LINK_HOME +@cindex @code{#+HTML_LINK_HOME} @vindex org-html-link-home The URL for home link (@code{org-html-link-home}). @item HTML_LINK_UP -@cindex #+HTML_LINK_UP +@cindex @code{#+HTML_LINK_UP} @vindex org-html-link-up The URL for the up link of exported HTML pages (@code{org-html-link-up}). @item HTML_MATHJAX -@cindex #+HTML_MATHJAX +@cindex @code{#+HTML_MATHJAX} @vindex org-html-mathjax-options Options for MathJax (@code{org-html-mathjax-options}). MathJax is used to typeset @LaTeX{} math in HTML documents. @xref{Math formatting in HTML export}, for an example. @item HTML_HEAD -@cindex #+HTML_HEAD +@cindex @code{#+HTML_HEAD} @vindex org-html-head Arbitrary lines for appending to the HTML document's head (@code{org-html-head}). @item HTML_HEAD_EXTRA -@cindex #+HTML_HEAD_EXTRA +@cindex @code{#+HTML_HEAD_EXTRA} @vindex org-html-head-extra More arbitrary lines for appending to the HTML document's head (@code{org-html-head-extra}). @item KEYWORDS -@cindex #+KEYWORDS (HTML) +@cindex @code{#+KEYWORDS} (HTML) Keywords to describe the document's content. HTML exporter inserts these keywords as HTML meta tags. For long keywords, use multiple @code{#+KEYWORDS} lines. @item LATEX_HEADER -@cindex #+LATEX_HEADER (HTML) +@cindex @code{#+LATEX_HEADER} (HTML) Arbitrary lines for appending to the preamble; HTML exporter appends when transcoding @LaTeX{} fragments to images (@pxref{Math formatting in HTML export}). @item SUBTITLE -@cindex #+SUBTITLE (HTML) +@cindex @code{#+SUBTITLE} (HTML) The document's subtitle. HTML exporter formats subtitle if document type is @samp{HTML5} and the CSS has a @samp{subtitle} class. @end table @@ -11731,14 +11730,13 @@ back-end can insert that HTML code in the output, use this inline syntax: text@@@@html:@@@@}. For larger raw HTML code blocks, use these HTML export code blocks: -@cindex #+HTML -@cindex #+BEGIN_EXPORT html +@cindex @code{#+HTML} @example #+HTML: Literal HTML code for export @end example @noindent or -@cindex #+BEGIN_EXPORT html +@cindex @code{#+BEGIN_EXPORT html} @example #+BEGIN_EXPORT html @@ -11775,7 +11773,7 @@ example, by using @code{#+ATTR_HTML} lines to specify new format attributes to @code{} or @code{} tags. This example shows changing the link's @code{title} and @code{style}: -@cindex #+ATTR_HTML +@cindex @code{#+ATTR_HTML} @example #+ATTR_HTML: :title The Org mode homepage :style color:red; [[http://orgmode.org]] @@ -11791,8 +11789,8 @@ exporting Org tables to HTML. By default, the exporter does not draw frames and cell borders. To change for this for a table, use the following lines before the table in the Org file: -@cindex #+CAPTION -@cindex #+ATTR_HTML +@cindex @code{#+CAPTION} +@cindex @code{#+ATTR_HTML} @example #+CAPTION: This is a table with lines around and between cells #+ATTR_HTML: :border 2 :rules all :frame border @@ -11865,8 +11863,8 @@ Org file. This example shows realignment to right, and adds @code{alt} and @code{title} attributes in support of text viewers and modern web accessibility standards. -@cindex #+CAPTION -@cindex #+ATTR_HTML +@cindex @code{#+CAPTION} +@cindex @code{#+ATTR_HTML} @example #+CAPTION: A black cat stalking a spider #+ATTR_HTML: :alt cat/spider image :title Action! :align right @@ -11975,7 +11973,7 @@ p.creator @r{creator info, about org mode version} .done @r{the DONE keywords, all states that count as done} .WAITING @r{each TODO keyword also uses a class named after itself} .timestamp @r{timestamp} -.timestamp-kwd @r{keyword associated with a timestamp, like SCHEDULED} +.timestamp-kwd @r{keyword associated with a timestamp, like @code{SCHEDULED}} .timestamp-wrapper @r{span around keyword plus timestamp} .tag @r{tag in a headline} ._HOME @r{each tag uses itself as a class, "@@" replaced by "_"} @@ -12003,14 +12001,14 @@ p.footnote @r{footnote definition paragraph, containing a footnote} @vindex org-html-head-include-default-style @vindex org-html-head @vindex org-html-head-extra -@cindex #+HTML_INCLUDE_STYLE +@cindex @code{#+HTML_INCLUDE_STYLE} The HTML export back-end includes a compact default style in each exported HTML file. To override the default style with another style, use these keywords in the Org file. They will replace the global defaults the HTML exporter uses. -@cindex #+HTML_HEAD -@cindex #+HTML_HEAD_EXTRA +@cindex @code{#+HTML_HEAD} +@cindex @code{#+HTML_HEAD_EXTRA} @example #+HTML_HEAD: #+HTML_HEAD_EXTRA: @@ -12060,7 +12058,7 @@ it on your own web server. To use this program, just add this line to the Org file: -@cindex #+INFOJS_OPT +@cindex @code{#+INFOJS_OPT} @example #+INFOJS_OPT: view:info toc:nil @end example @@ -12181,7 +12179,7 @@ The @LaTeX{} export back-end has several additional keywords for customizing @table @samp @item DESCRIPTION -@cindex #+DESCRIPTION (@LaTeX{}) +@cindex @code{#+DESCRIPTION} (@LaTeX{}) The document's description. The description along with author name, keywords, and related file metadata are inserted in the output file by the @samp{hyperref} package. See @code{org-latex-hyperref-template} for @@ -12190,7 +12188,7 @@ typesetting description into the document's front matter. Use multiple @code{#+DESCRIPTION} lines for long descriptions. @item LATEX_CLASS -@cindex #+LATEX_CLASS +@cindex @code{#+LATEX_CLASS} @vindex org-latex-default-class @vindex org-latex-classes This is @LaTeX{} document class, such as @code{article}, @code{report}, @@ -12201,32 +12199,32 @@ default class name from the @code{org-latex-default-class} variable. Org has element of @code{org-latex-classes}. @item LATEX_CLASS_OPTIONS -@cindex #+LATEX_CLASS_OPTIONS +@cindex @code{#+LATEX_CLASS_OPTIONS} Options the @LaTeX{} export back-end uses when calling the @LaTeX{} document class. @item LATEX_COMPILER -@cindex #+LATEX_COMPILER +@cindex @code{#+LATEX_COMPILER} @vindex org-latex-compiler The compiler, such as @samp{pdflatex}, @samp{xelatex}, @samp{lualatex}, for producing the PDF (@code{org-latex-compiler}). @item LATEX_HEADER -@cindex #+LATEX_HEADER +@cindex @code{#+LATEX_HEADER} @vindex org-latex-classes Arbitrary lines to add to the document's preamble, before the @samp{hyperref} settings. See @code{org-latex-classes} for adjusting the structure and order of the @LaTeX{} headers. @item LATEX_HEADER_EXTRA -@cindex #+LATEX_HEADER_EXTRA +@cindex @code{#+LATEX_HEADER_EXTRA} @vindex org-latex-classes Arbitrary lines to add to the document's preamble, before the @samp{hyperref} settings. See @code{org-latex-classes} for adjusting the structure and order of the @LaTeX{} headers. @item KEYWORDS -@cindex #+KEYWORDS (@LaTeX{}) +@cindex @code{#+KEYWORDS} (@LaTeX{}) The keywords for the document. The description along with author name, keywords, and related file metadata are inserted in the output file by the @samp{hyperref} package. See @code{org-latex-hyperref-template} for @@ -12235,7 +12233,7 @@ typesetting description into the document's front matter. Use multiple @code{#+KEYWORDS} lines if necessary. @item SUBTITLE -@cindex #+SUBTITLE (@LaTeX{}) +@cindex @code{#+SUBTITLE} (@LaTeX{}) @vindex org-latex-subtitle-separate @vindex org-latex-subtitle-format The document's subtitle. It is typeset as per @@ -12277,10 +12275,10 @@ exporter splices the values of @code{org-latex-default-packages-alist} and @code{org-latex-packages-alist}. Use the same three variables to define custom sectioning or custom classes. -@cindex #+LATEX_CLASS -@cindex #+LATEX_CLASS_OPTIONS -@cindex property, EXPORT_LATEX_CLASS -@cindex property, EXPORT_LATEX_CLASS_OPTIONS +@cindex @code{#+LATEX_CLASS} +@cindex @code{#+LATEX_CLASS_OPTIONS} +@cindex property, @code{EXPORT_LATEX_CLASS} +@cindex property, @code{EXPORT_LATEX_CLASS_OPTIONS} The @LaTeX{} export back-end sends the @code{LATEX_CLASS_OPTIONS} keyword and @code{EXPORT_LATEX_CLASS_OPTIONS} property as options to the @LaTeX{} @code{\documentclass} macro. The options and the syntax for specifying them, @@ -12290,8 +12288,8 @@ including enclosing them in square brackets, follow @LaTeX{} conventions. #+LATEX_CLASS_OPTIONS: [a4paper,11pt,twoside,twocolumn] @end example -@cindex #+LATEX_HEADER -@cindex #+LATEX_HEADER_EXTRA +@cindex @code{#+LATEX_HEADER} +@cindex @code{#+LATEX_HEADER_EXTRA} The @LaTeX{} export back-end appends values from @code{LATEX_HEADER} and @code{LATEX_HEADER_EXTRA} keywords to the @LaTeX{} header. The docstring for @code{org-latex-classes} explains in more detail. Also note that @LaTeX{} @@ -12325,14 +12323,14 @@ Code embedded in-line @@@@latex:any arbitrary LaTeX code@@@@ in a paragraph. @end example Inserting as one or more keyword lines in the Org file: -@cindex #+LATEX +@cindex @code{#+LATEX} @example #+LATEX: any arbitrary LaTeX code @end example Inserting as an export block in the Org file, where the back-end exports any code between begin and end markers: -@cindex #+BEGIN_EXPORT latex +@cindex @code{#+BEGIN_EXPORT latex} @example #+BEGIN_EXPORT latex any arbitrary LaTeX code @@ -12342,7 +12340,7 @@ any arbitrary LaTeX code @node Tables in @LaTeX{} export @subsection Tables in @LaTeX{} export @cindex tables, in @LaTeX{} export -@cindex #+ATTR_LATEX, in tables +@cindex @code{#+ATTR_LATEX}, in tables The @LaTeX{} export back-end can pass several @LaTeX{} attributes for table contents and layout. Besides specifying label and caption (@pxref{Images and @@ -12446,7 +12444,7 @@ Set the caption with the @LaTeX{} command @subsection Images in @LaTeX{} export @cindex images, inline in @LaTeX{} @cindex inlining images in @LaTeX{} -@cindex #+ATTR_LATEX, in images +@cindex @code{#+ATTR_LATEX}, in images The @LaTeX{} export back-end processes image links in Org files that do not have descriptions, such as these links @samp{[[file:img.jpg]]} or @@ -12516,7 +12514,7 @@ Set the @code{:comment-include} attribute to non-@code{nil} value for the @node Plain lists in @LaTeX{} export @subsection Plain lists in @LaTeX{} export @cindex plain lists, in @LaTeX{} export -@cindex #+ATTR_LATEX, in plain lists +@cindex @code{#+ATTR_LATEX}, in plain lists The @LaTeX{} export back-end accepts the @code{:environment} and @code{:options} attributes for plain lists. Both attributes work together @@ -12550,7 +12548,7 @@ four: @node Source blocks in @LaTeX{} export @subsection Source blocks in @LaTeX{} export @cindex source blocks, in @LaTeX{} export -@cindex #+ATTR_LATEX, in source blocks +@cindex @code{#+ATTR_LATEX}, in source blocks The @LaTeX{} export back-end can make source code blocks into floating objects through the attributes @code{:float} and @code{:options}. For @@ -12597,7 +12595,7 @@ variables. @subsection Example blocks in @LaTeX{} export @cindex example blocks, in @LaTeX{} export @cindex verbatim blocks, in @LaTeX{} export -@cindex #+ATTR_LATEX, in example blocks +@cindex @code{#+ATTR_LATEX}, in example blocks The @LaTeX{} export back-end wraps the contents of example blocks in a @samp{verbatim} environment. To change this behavior to use another @@ -12617,7 +12615,7 @@ This sentence is false. @cindex special blocks, in @LaTeX{} export @cindex abstract, in @LaTeX{} export @cindex proof, in @LaTeX{} export -@cindex #+ATTR_LATEX, in special blocks +@cindex @code{#+ATTR_LATEX}, in special blocks For other special blocks in the Org file, the @LaTeX{} export back-end makes @@ -12665,7 +12663,7 @@ example: @node Horizontal rules in @LaTeX{} export @subsection Horizontal rules in @LaTeX{} export @cindex horizontal rules, in @LaTeX{} export -@cindex #+ATTR_LATEX, in horizontal rules +@cindex @code{#+ATTR_LATEX}, in horizontal rules The @LaTeX{} export back-end converts horizontal rules by the specified @code{:width} and @code{:thickness} attributes. For example: @@ -12749,10 +12747,10 @@ executable. Without @file{zip}, export cannot finish. @anchor{x-export-to-odt} @cindex region, active @cindex active region -@cindex transient-mark-mode +@cindex @code{transient-mark-mode} @table @kbd @orgcmd{C-c C-e o o,org-odt-export-to-odt} -@cindex property EXPORT_FILE_NAME +@cindex property, @code{EXPORT_FILE_NAME} Export as OpenDocument Text file. @@ -12789,13 +12787,13 @@ output. Setting these keywords works similar to the general options @table @samp @item DESCRIPTION -@cindex #+DESCRIPTION (ODT) +@cindex @code{#+DESCRIPTION} (ODT) This is the document's description, which the ODT export back-end inserts as document metadata. For long descriptions, use multiple @code{#+DESCRIPTION} lines. @item KEYWORDS -@cindex #+KEYWORDS (ODT) +@cindex @code{#+KEYWORDS} (ODT) The keywords for the document. The ODT export back-end inserts the description along with author name, keywords, and related file metadata as metadata in the output file. Use multiple @code{#+KEYWORDS} lines if @@ -12884,7 +12882,7 @@ Open one, modify, and save as either OpenDocument Text (@file{.odt}) or OpenDocument Template (@file{.ott}) file. @item -@cindex #+ODT_STYLES_FILE +@cindex @code{#+ODT_STYLES_FILE} @vindex org-odt-styles-file Customize the variable @code{org-odt-styles-file} and point it to the newly created file. For additional configuration options @@ -12943,7 +12941,7 @@ back-end honors any table alignments and relative widths for columns Note that the ODT export back-end interprets column widths as weighted ratios, the default weight being 1. -@cindex #+ATTR_ODT +@cindex @code{#+ATTR_ODT} Specifying @code{:rel-width} property on an @code{#+ATTR_ODT} line controls the width of the table. For example: @@ -13000,7 +12998,7 @@ when clicked jumps to @uref{http://Orgmode.org} website, do the following @subsubheading Sizing and scaling of embedded images -@cindex #+ATTR_ODT +@cindex @code{#+ATTR_ODT} Control the size and scale of the embedded images with the @code{#+ATTR_ODT} attribute. @@ -13056,7 +13054,7 @@ height:width ratio, do the following @subsubheading Anchoring of images -@cindex #+ATTR_ODT +@cindex @code{#+ATTR_ODT} The ODT export back-end can anchor images to @samp{"as-char"}, @samp{"paragraph"}, or @samp{"page"}. Set the preferred anchor using the @code{:anchor} property of the @code{#+ATTR_ODT} line. @@ -13454,7 +13452,7 @@ This paragraph is specially formatted and uses bold text. @subsubheading Customizing tables in ODT export @cindex tables, in ODT export -@cindex #+ATTR_ODT +@cindex @code{#+ATTR_ODT} Override the default table format by specifying a custom table style with the @code{#+ATTR_ODT} line. For a discussion on default formatting of tables @pxref{Tables in ODT export}. @@ -13698,52 +13696,52 @@ Texinfo output. Setting these keywords works similar to the general options @table @samp @item SUBTITLE -@cindex #+SUBTITLE (Texinfo) +@cindex @code{#+SUBTITLE} (Texinfo) The document subtitle. @item SUBAUTHOR -@cindex #+SUBAUTHOR +@cindex @code{#+SUBAUTHOR} The document subauthor. @item TEXINFO_FILENAME -@cindex #+TEXINFO_FILENAME +@cindex @code{#+TEXINFO_FILENAME} The Texinfo filename. @item TEXINFO_CLASS -@cindex #+TEXINFO_CLASS +@cindex @code{#+TEXINFO_CLASS} @vindex org-texinfo-default-class The default document class (@code{org-texinfo-default-class}), which must be a member of @code{org-texinfo-classes}. @item TEXINFO_HEADER -@cindex #+TEXINFO_HEADER +@cindex @code{#+TEXINFO_HEADER} Arbitrary lines inserted at the end of the header. @item TEXINFO_POST_HEADER -@cindex #+TEXINFO_POST_HEADER +@cindex @code{#+TEXINFO_POST_HEADER} Arbitrary lines inserted after the end of the header. @item TEXINFO_DIR_CATEGORY -@cindex #+TEXINFO_DIR_CATEGORY +@cindex @code{#+TEXINFO_DIR_CATEGORY} The directory category of the document. @item TEXINFO_DIR_TITLE -@cindex #+TEXINFO_DIR_TITLE +@cindex @code{#+TEXINFO_DIR_TITLE} The directory title of the document. @item TEXINFO_DIR_DESC -@cindex #+TEXINFO_DIR_DESC +@cindex @code{#+TEXINFO_DIR_DESC} The directory description of the document. @item TEXINFO_PRINTED_TITLE -@cindex #+TEXINFO_PRINTED_TITLE +@cindex @code{#+TEXINFO_PRINTED_TITLE} The printed title of the document. @end table @node Texinfo file header @subsection Texinfo file header -@cindex #+TEXINFO_FILENAME +@cindex @code{#+TEXINFO_FILENAME} After creating the header for a Texinfo file, the Texinfo back-end automatically generates a name and destination path for the Info file. To override this default with a more sensible path and name, specify the @@ -13751,8 +13749,8 @@ override this default with a more sensible path and name, specify the @vindex org-texinfo-coding-system @vindex org-texinfo-classes -@cindex #+TEXINFO_HEADER -@cindex #+TEXINFO_CLASS +@cindex @code{#+TEXINFO_HEADER} +@cindex @code{#+TEXINFO_CLASS} Along with the output's file name, the Texinfo header also contains language details (@pxref{Export settings}) and encoding system as set in the @code{org-texinfo-coding-system} variable. Insert @code{#+TEXINFO_HEADER} @@ -13766,14 +13764,14 @@ setting the @code{#+TEXINFO_CLASS} keyword to that class. @node Texinfo title and copyright page @subsection Texinfo title and copyright page -@cindex #+TEXINFO_PRINTED_TITLE +@cindex @code{#+TEXINFO_PRINTED_TITLE} The default template for hard copy output has a title page with @code{#+TITLE} and @code{#+AUTHOR} (@pxref{Export settings}). To replace the regular @code{#+TITLE} with something different for the printed version, use the @code{#+TEXINFO_PRINTED_TITLE} and @code{#+SUBTITLE} keywords. Both expect raw Texinfo code for setting their values. -@cindex #+SUBAUTHOR +@cindex @code{#+SUBAUTHOR} If one @code{#+AUTHOR} is not sufficient, add multiple @code{#+SUBAUTHOR} keywords. They have to be set in raw Texinfo code. @@ -13783,7 +13781,7 @@ keywords. They have to be set in raw Texinfo code. #+TEXINFO_PRINTED_TITLE: This Long Title@@inlinefmt@{tex,@@*@} Is Broken in @@TeX@{@} @end example -@cindex property, COPYING +@cindex property, @code{COPYING} Copying material is defined in a dedicated headline with a non-@code{nil} @code{:COPYING:} property. The back-end inserts the contents within a @code{@@copying} command at the beginning of the document. The heading @@ -13811,9 +13809,9 @@ Copyright information is printed on the back of the title page. @cindex @code{install-info} parameters, in Texinfo export @cindex Texinfo export, @code{install-info} parameters -@cindex #+TEXINFO_DIR_CATEGORY -@cindex #+TEXINFO_DIR_TITLE -@cindex #+TEXINFO_DIR_DESC +@cindex @code{#+TEXINFO_DIR_CATEGORY} +@cindex @code{#+TEXINFO_DIR_TITLE} +@cindex @code{#+TEXINFO_DIR_DESC} The end result of the Texinfo export process is the creation of an Info file. This Info file's metadata has variables for category, title, and description: @code{#+TEXINFO_DIR_CATEGORY}, @code{#+TEXINFO_DIR_TITLE}, and @@ -13833,7 +13831,7 @@ Here is an example that writes to the Info directory file: @vindex org-texinfo-classes @vindex org-texinfo-default-class -@cindex #+TEXINFO_CLASS +@cindex @code{#+TEXINFO_CLASS} The Texinfo export back-end uses a pre-defined scheme to convert Org headlines to an equivalent Texinfo structuring commands. A scheme like this maps top-level headlines to numbered chapters tagged as @code{@@chapter} and @@ -13848,12 +13846,12 @@ If an Org headline's level has no associated Texinfo structuring command, or is below a certain threshold (@pxref{Export settings}), then the Texinfo export back-end makes it into a list item. -@cindex property, APPENDIX +@cindex property, @code{APPENDIX} The Texinfo export back-end makes any headline with a non-@code{nil} @code{:APPENDIX:} property into an appendix. This happens independent of the Org headline level or the @code{#+TEXINFO_CLASS}. -@cindex property, DESCRIPTION +@cindex property, @code{DESCRIPTION} The Texinfo export back-end creates a menu entry after the Org headline for each regular sectioning structure. To override this with a shorter menu entry, use the @code{:ALT_TITLE:} property (@pxref{Table of contents}). @@ -13879,22 +13877,22 @@ Top Node,,texinfo}, for more information. @node Indices @subsection Indices -@cindex #+CINDEX +@cindex @code{#+CINDEX} @cindex concept index, in Texinfo export @cindex Texinfo export, index, concept -@cindex #+FINDEX +@cindex @code{#+FINDEX} @cindex function index, in Texinfo export @cindex Texinfo export, index, function -@cindex #+KINDEX +@cindex @code{#+KINDEX} @cindex keystroke index, in Texinfo export @cindex Texinfo export, keystroke index -@cindex #+PINDEX +@cindex @code{#+PINDEX} @cindex program index, in Texinfo export @cindex Texinfo export, program index -@cindex #+TINDEX +@cindex @code{#+TINDEX} @cindex data type index, in Texinfo export @cindex Texinfo export, data type index -@cindex #+VINDEX +@cindex @code{#+VINDEX} @cindex variable index, in Texinfo export @cindex Texinfo export, variable index The Texinfo export back-end recognizes these indexing keywords if used in the @@ -13907,7 +13905,7 @@ escaped with @samp{@@} if they not belong to a Texinfo command. #+CINDEX: Defining indexing entries @end example -@cindex property, INDEX +@cindex property, @code{INDEX} For the back-end to generate an index entry for a headline, set the @code{:INDEX:} property to @samp{cp} or @samp{vr}. These abbreviations come from Texinfo that stand for concept index and variable index. The Texinfo @@ -13927,8 +13925,8 @@ inserts the index after its contents. Use any of the following three methods to insert or escape raw Texinfo code: -@cindex #+TEXINFO -@cindex #+BEGIN_EXPORT texinfo +@cindex @code{#+TEXINFO} +@cindex @code{#+BEGIN_EXPORT texinfo} @example Richard @@@@texinfo:@@sc@{@@@@Stallman@@@@texinfo:@}@@@@ commence' GNU. @@ -13943,10 +13941,10 @@ This paragraph is preceded by... @node Plain lists in Texinfo export @subsection Plain lists in Texinfo export -@cindex #+ATTR_TEXINFO, in plain lists +@cindex @code{#+ATTR_TEXINFO}, in plain lists @cindex Two-column tables, in Texinfo export -@cindex :table-type attribute, in Texinfo export +@cindex @code{:table-type} attribute, in Texinfo export The Texinfo export back-end by default converts description lists in the Org file using the default command @code{@@table}, which results in a table with two columns. To change this behavior, specify @code{:table-type} with @@ -13954,14 +13952,14 @@ two columns. To change this behavior, specify @code{:table-type} with @inforef{Two-column Tables,,texinfo}. @vindex org-texinfo-table-default-markup -@cindex :indic attribute, in Texinfo export +@cindex @code{:indic} attribute, in Texinfo export The Texinfo export back-end by default also applies a text highlight based on the defaults stored in @code{org-texinfo-table-default-markup}. To override the default highlight command, specify another one with the @code{:indic} attribute. @cindex Multiple entries in two-column tables, in Texinfo export -@cindex :sep attribute, in Texinfo export +@cindex @code{:sep} attribute, in Texinfo export Org syntax is limited to one entry per list item. Nevertheless, the Texinfo export back-end can split that entry according to any text provided through the @code{:sep} attribute. Each part then becomes a new entry in the first @@ -13987,7 +13985,7 @@ This is the common text for variables foo and bar. @node Tables in Texinfo export @subsection Tables in Texinfo export -@cindex #+ATTR_TEXINFO, in tables +@cindex @code{#+ATTR_TEXINFO}, in tables When exporting tables, the Texinfo export back-end uses the widest cell width in each column. To override this and instead specify as fractions of line @@ -14000,7 +13998,7 @@ length, use the @code{:columns} attribute. See example below. @node Images in Texinfo export @subsection Images in Texinfo export -@cindex #+ATTR_TEXINFO, in images +@cindex @code{#+ATTR_TEXINFO}, in images Insert a file link to the image in the Org file, and the Texinfo export back-end inserts the image. These links must have the usual supported image @@ -14015,7 +14013,7 @@ the text using Texinfo code, as shown in the example: @node Special blocks in Texinfo export @subsection Special blocks -@cindex #+ATTR_TEXINFO, in special blocks +@cindex @code{#+ATTR_TEXINFO}, in special blocks The Texinfo export back-end converts special blocks to commands with the same name. It also adds any @code{:options} attributes to the end of the command, @@ -14138,7 +14136,7 @@ configure the variable @code{org-icalendar-categories}. To assign clock alarms based on time, configure the @code{org-icalendar-alarm-time} variable. @vindex org-icalendar-store-UID -@cindex property, ID +@cindex property, @code{ID} The iCalendar format standard requires globally unique identifier---UID---for each entry. The iCalendar export back-end creates UIDs during export. To save a copy of the UID in the Org file set the variable @@ -14167,26 +14165,27 @@ and write it to @code{org-icalendar-combined-agenda-file} file name. @vindex org-use-property-inheritance @vindex org-icalendar-include-body -@cindex property, SUMMARY -@cindex property, DESCRIPTION -@cindex property, LOCATION -@cindex property, TIMEZONE -The iCalendar export back-end includes SUMMARY, DESCRIPTION, LOCATION and -TIMEZONE properties from the Org entries when exporting. To force the -back-end to inherit the LOCATION and TIMEZONE properties, configure the -@code{org-use-property-inheritance} variable. - -When Org entries do not have SUMMARY, DESCRIPTION and LOCATION properties, -the iCalendar export back-end derives the summary from the headline, and -derives the description from the body of the Org item. The -@code{org-icalendar-include-body} variable limits the maximum number of +@cindex property, @code{SUMMARY} +@cindex property, @code{DESCRIPTION} +@cindex property, @code{LOCATION} +@cindex property, @code{TIMEZONE} +The iCalendar export back-end includes @code{SUMMARY}, @code{DESCRIPTION}, +@code{LOCATION} and @code{TIMEZONE} properties from the Org entries when +exporting. To force the back-end to inherit the @code{LOCATION} and +@code{TIMEZONE} properties, configure the @code{org-use-property-inheritance} +variable. + +When Org entries do not have @code{SUMMARY}, @code{DESCRIPTION} and +@code{LOCATION} properties, the iCalendar export back-end derives the summary +from the headline, and derives the description from the body of the Org item. +The @code{org-icalendar-include-body} variable limits the maximum number of characters of the content are turned into its description. -The TIMEZONE property can be used to specify a per-entry time zone, and will -be applied to any entry with timestamp information. Time zones should be -specified as per the IANA time zone database format, e.g.@: ``Asia/Almaty''. -Alternately, the property value can be ``UTC'', to force UTC time for this -entry only. +The @code{TIMEZONE} property can be used to specify a per-entry time zone, +and will be applied to any entry with timestamp information. Time zones +should be specified as per the IANA time zone database format, e.g.@: +``Asia/Almaty''. Alternately, the property value can be ``UTC'', to force +UTC time for this entry only. Exporting to iCalendar format depends in large part on the capabilities of the destination application. Some are more lenient than others. Consult the @@ -14475,7 +14474,7 @@ and many other properties of a project. @node Project alist @subsection The variable @code{org-publish-project-alist} -@cindex org-publish-project-alist +@cindex @code{org-publish-project-alist} @cindex projects, for publishing @vindex org-publish-project-alist @@ -14931,7 +14930,7 @@ The file will be created when first publishing a project with the "theindex.inc"}. You can then build around this include statement by adding a title, style information, etc. -@cindex #+INDEX +@cindex @code{#+INDEX} Index entries are specified with @code{#+INDEX} keyword. An entry that contains an exclamation mark will create a sub item. @@ -15102,8 +15101,8 @@ such as not inside comments and fixed width areas. Here's a sample #+END_SRC @end example -Org can take the code in the block between the @samp{#+BEGIN_SRC} and -@samp{#+END_SRC} tags, and format, compile, execute, and show the results. +Org can take the code in the block between the @code{#+BEGIN_SRC} and +@code{#+END_SRC} tags, and format, compile, execute, and show the results. Org can simplify many housekeeping tasks essential to modern code maintenance. That's why these blocks in Org mode literature are sometimes referred to as @samp{live code} blocks (as compared to the static text and @@ -15112,7 +15111,7 @@ block by tweaking the headers for compiling, execution, extraction. Org's @samp{src} code block type is one of many block types, such as quote, export, verse, latex, example, and verbatim. This section pertains to -@samp{src} code blocks between @samp{#+BEGIN_SRC} and @samp{#+END_SRC} +@code{src} code blocks between @code{#+BEGIN_SRC} and @code{#+END_SRC} For editing @samp{src} code blocks, Org provides native Emacs major-modes. That leverages the latest Emacs features for that source code language mode. @@ -15174,8 +15173,8 @@ Details of Org's facilities for working with source code are shown next. @section Structure of code blocks @cindex code block, structure @cindex source code, block structure -@cindex #+NAME -@cindex #+BEGIN_SRC +@cindex @code{#+NAME} +@cindex @code{#+BEGIN_SRC} Org offers two ways to structure source code in Org documents: in a @samp{src} block, and directly inline. Both specifications are shown below. @@ -15217,7 +15216,7 @@ results. Code from other blocks, other files, and from table formulas (@pxref{The spreadsheet}) can use the name to reference a @samp{src} block. This naming serves the same purpose as naming Org tables. Org mode requires unique names. For duplicate names, Org mode's behavior is undefined. -@cindex #+NAME +@cindex @code{#+NAME} @item #+BEGIN_SRC @item #+END_SRC Mandatory. They mark the start and end of a block that Org requires. The @@ -15428,7 +15427,7 @@ block header arguments: One, set @code{padline} (@pxref{padline}) to true @section Evaluating code blocks @cindex code block, evaluating @cindex source code, evaluating -@cindex #+RESULTS +@cindex @code{#+RESULTS} A note about security: With code evaluation comes the risk of harm. Org safeguards by prompting for user's permission before executing any code in @@ -15451,7 +15450,7 @@ evaluation from the @kbd{C-c C-c} key binding.} calls the @code{org-babel-execute-src-block} function, which executes the code in the block, collects the results, and inserts them in the buffer. -@cindex #+CALL +@cindex @code{#+CALL} By calling a named code block@footnote{Actually, the constructs call_() and src_@{@} are not evaluated when they appear in a keyword line (i.e. lines starting with @code{#+KEYWORD:}, @pxref{In-buffer settings}).} @@ -15734,7 +15733,7 @@ each line. Note that Org currently accepts the plural spelling of @code{#+HEADER:} only as a convenience for backward-compatibility. It may be removed at some point. -@cindex #+HEADER: +@cindex @code{#+HEADER:} Multi-line header arguments on an unnamed @samp{src} code block: @@ -17254,7 +17253,7 @@ emacs -Q --batch --eval " * Speed keys:: Electric commands at the beginning of a headline * Code evaluation security:: Org mode files evaluate inline code * Customization:: Adapting Org to changing tastes -* In-buffer settings:: Overview of the #+KEYWORDS +* In-buffer settings:: Overview of the @code{#+KEYWORDS} * The very busy C-c C-c key:: When in doubt, press C-c C-c * Clean view:: Getting rid of leading stars in the outline * TTY keys:: Using Org on a tty @@ -17302,7 +17301,7 @@ can be used in search links like @samp{[[*find this headline]]}. @item After @samp{:} in a headline, complete tags. The list of tags is taken from the variable @code{org-tag-alist} (possibly set through the -@samp{#+TAGS} in-buffer option, @pxref{Setting tags}), or it is created +@code{#+TAGS} in-buffer option, @pxref{Setting tags}), or it is created dynamically from all tags used in the current buffer. @item After @samp{:} and not in a headline, complete property keys. The list @@ -17315,7 +17314,7 @@ After @samp{#+}, complete the special keywords like @samp{TYP_TODO} or file-specific @samp{OPTIONS}. After option keyword is complete, pressing @kbd{M-@key{TAB}} again will insert example settings for that option. @item -After @samp{#+STARTUP: }, complete startup keywords. +After @code{#+STARTUP:}, complete startup keywords. @item When the point is anywhere else, complete dictionary words using Ispell. @end itemize @@ -17479,13 +17478,13 @@ reopening the Org file in Emacs also activates the changes. @table @kbd @item #+ARCHIVE: %s_done:: Sets the archive location of the agenda file. This location applies to the -lines until the next @samp{#+ARCHIVE} line, if any, in the Org file. The +lines until the next @code{#+ARCHIVE} line, if any, in the Org file. The first archive location in the Org file also applies to any entries before it. The corresponding variable is @code{org-archive-location}. @item #+CATEGORY: Sets the category of the agenda file, which applies to the entire document. @item #+COLUMNS: %25ITEM ... -@cindex property, COLUMNS +@cindex property, @code{COLUMNS} Sets the default format for columns view. Org uses this format for column views where there is no @code{COLUMNS} property. @item #+CONSTANTS: name1=value1 ... @@ -17512,7 +17511,7 @@ have a lower ASCII number than the lowest priority. @item #+PROPERTY: Property_Name Value This line sets a default inheritance value for entries in the current buffer, most useful for specifying the allowed values of a property. -@cindex #+SETUPFILE +@cindex @code{#+SETUPFILE} @item #+SETUPFILE: file or URL The setup file or a URL pointing to such file is for additional in-buffer settings. Org loads this file and parses it for any settings in it only when @@ -17524,7 +17523,7 @@ parses the contents of this document as if it was included in the buffer. It can be another Org file. To visit the file (not a URL), @kbd{C-c '} while the cursor is on the line with the file name. @item #+STARTUP: -@cindex #+STARTUP +@cindex @code{#+STARTUP} Startup options Org uses when first visiting a file. The first set of options deals with the initial visibility of the outline @@ -17705,7 +17704,7 @@ fnadjust @r{automatically renumber and sort footnotes} nofnadjust @r{do not renumber and sort automatically} @end example -@cindex org-hide-block-startup +@cindex @code{org-hide-block-startup} To hide blocks on startup, use these keywords. The corresponding variable is @code{org-hide-block-startup}. @cindex @code{hideblocks}, STARTUP keyword @@ -17715,7 +17714,7 @@ hideblocks @r{Hide all begin/end blocks on startup} nohideblocks @r{Do not hide blocks on startup} @end example -@cindex org-pretty-entities +@cindex @code{org-pretty-entities} The display of entities as UTF-8 characters is governed by the variable @code{org-pretty-entities} and the keywords @cindex @code{entitiespretty}, STARTUP keyword @@ -17730,11 +17729,11 @@ entitiesplain @r{Leave entities plain} These lines specify valid tags for this file. Org accepts multiple tags lines. Tags could correspond to the @emph{fast tag selection} keys. The corresponding variable is @code{org-tag-alist}. -@cindex #+TBLFM +@cindex @code{#+TBLFM} @item #+TBLFM: This line is for formulas for the table directly above. A table can have -multiple @samp{#+TBLFM:} lines. On table recalculation, Org applies only the -first @samp{#+TBLFM:} line. For details see @ref{Using multiple #+TBLFM +multiple @code{#+TBLFM:} lines. On table recalculation, Org applies only the +first @code{#+TBLFM:} line. For details see @ref{Using multiple #+TBLFM lines} in @ref{Editing and debugging formulas}. @item #+TITLE:, #+AUTHOR:, #+EMAIL:, #+LANGUAGE:, #+DATE:, @itemx #+OPTIONS:, #+BIND:, @@ -17750,7 +17749,7 @@ The corresponding variable is @code{org-todo-keywords}. @node The very busy C-c C-c key @section The very busy C-c C-c key @kindex C-c C-c -@cindex C-c C-c, overview +@cindex @kbd{C-c C-c}, overview The @kbd{C-c C-c} key in Org serves many purposes depending on the context. It is probably the most over-worked, multi-purpose key combination in Org. @@ -18429,7 +18428,7 @@ the mode is C, then: At the location of source, Org needs a special line to direct Orgtbl to translate and to find the target for inserting the translated table. For example: -@cindex #+ORGTBL +@cindex @code{#+ORGTBL} @example #+ORGTBL: SEND table_name translation_function arguments... @end example @@ -18483,7 +18482,7 @@ install templates for other export formats.} with the command @kbd{M-x orgtbl-insert-radio-table RET}, which prompts for a table name. For example, if @samp{salesfigures} is the name, the template inserts: -@cindex #+ORGTBL, SEND +@cindex @code{#+ORGTBL}, @samp{SEND} @example % BEGIN RECEIVE ORGTBL salesfigures % END RECEIVE ORGTBL salesfigures @@ -18499,7 +18498,7 @@ The line @code{#+ORGTBL: SEND} tells Orgtbl mode to use the function @code{orgtbl-to-latex} to convert the table to @LaTeX{} format, then insert the table at the target (receive) location named @code{salesfigures}. Now the table is ready for data entry. It can even use spreadsheet -features@footnote{If the @samp{#+TBLFM} line contains an odd number of dollar +features@footnote{If the @code{#+TBLFM} line contains an odd number of dollar characters, this may cause problems with font-lock in @LaTeX{} mode. As shown in the example you can fix this by adding an extra line inside the @code{comment} environment that is used to balance the dollar expressions. @@ -18630,14 +18629,14 @@ translator functions by posting them to the Org users mailing list, @node Radio lists @subsection Radio lists @cindex radio lists -@cindex org-list-insert-radio-list +@cindex @code{org-list-insert-radio-list} Call the @code{org-list-insert-radio-list} function to insert a radio list template in HTML, @LaTeX{}, and Texinfo mode documents. Sending and receiving radio lists works is the same as for radio tables (@pxref{Radio tables}) except for these differences: -@cindex #+ORGLST +@cindex @code{#+ORGLST} @itemize @minus @item Orgstruct mode must be active. @@ -18681,7 +18680,7 @@ time}). Dynamic blocks can have names and function parameters. The syntax is similar to @samp{src} code block specifications: -@cindex #+BEGIN:dynamic block +@cindex @code{#+BEGIN}, dynamic block @example #+BEGIN: myblock :parameter1 value1 :parameter2 value2 ... @@ -18943,7 +18942,7 @@ priority-n @r{The computed numerical priority} @noindent If the selection of the agenda item was based on a timestamp, including those -items with @samp{DEADLINE} and @samp{SCHEDULED} keywords, then Org includes +items with @code{DEADLINE} and @code{SCHEDULED} keywords, then Org includes date and time in the output. If the selection of the agenda item was based on a timestamp (or commit 9f56d04df40cac6767b7fbed89737ce9f03f5d80 Merge: 80c2bf6e16 560a23e1da Author: Glenn Morris Date: Sat Feb 24 09:44:13 2018 -0800 Merge from origin/emacs-26 560a23e (origin/emacs-26) Document reserved keys b0be19b ; * doc/emacs/xresources.texi (Table of Resources): Fix last ... commit 560a23e1dab7a6a203a4a70b3925a87d6cfddf76 Author: Eli Zaretskii Date: Sat Feb 24 19:39:16 2018 +0200 Document reserved keys * doc/emacs/custom.texi (Key Bindings): Mention keys reserved for users. (Bug#30530) diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi index e98884cb92..af5429d50c 100644 --- a/doc/emacs/custom.texi +++ b/doc/emacs/custom.texi @@ -1417,6 +1417,14 @@ commands, and @dfn{keymaps}, which record key bindings. It also explains how to customize key bindings, which is done by editing your init file (@pxref{Init Rebinding}). + Since most modes define their own key bindings, activating a mode +might override your custom key bindings. A small number of keys are +reserved for user-defined bindings, and should not be used by modes, +so key bindings using those keys are safer in this regard. The +reserved key sequences are those consisting of @kbd{C-c} followed by a +letter (either upper or lower case), and function keys @key{F5} +through @key{F9} without modifiers (@pxref{Modifier Keys}). + @menu * Keymaps:: Generalities. The global keymap. * Prefix Keymaps:: Keymaps for prefix keys. commit 105d085e7e970c182f01d4ef7a949629ae4b9709 Author: Michael Albinus Date: Sat Feb 24 17:56:43 2018 +0100 * doc/misc/ebrowse.texi: Use @key{} for keys. diff --git a/doc/misc/ebrowse.texi b/doc/misc/ebrowse.texi index 9ac2af1bcf..b6f2c1865f 100644 --- a/doc/misc/ebrowse.texi +++ b/doc/misc/ebrowse.texi @@ -482,7 +482,7 @@ you are working on, some classes will only be known to exist but the location of their declarations and definitions will not be known. @item @key{RET} -Works like @kbd{SPC}, except that it finds the class +Works like @kbd{@key{SPC}}, except that it finds the class declaration rather than viewing it, so that it is ready for editing. @end table @@ -886,7 +886,7 @@ the member. This command finds the declaration of the member the cursor is on. @item @key{SPC} -This is the same command as @kbd{RET}, but views the member definition +This is the same command as @kbd{@key{RET}}, but views the member definition instead of finding the member's source file. @item v @@ -1314,7 +1314,7 @@ the next position stored in the position stack. @item C-c C-m p Displays an electric buffer showing all positions saved in the stack. -You can select a position by pressing @kbd{SPC} in a line. You can +You can select a position by pressing @kbd{@key{SPC}} in a line. You can view a position with @kbd{v}. @end table commit b0be19b4ae203e0d05b0f7af5dbd195df21bd4ac Author: Eli Zaretskii Date: Sat Feb 24 18:07:28 2018 +0200 ; * doc/emacs/xresources.texi (Table of Resources): Fix last change. diff --git a/doc/emacs/xresources.texi b/doc/emacs/xresources.texi index a0de3134db..096e747a04 100644 --- a/doc/emacs/xresources.texi +++ b/doc/emacs/xresources.texi @@ -221,7 +221,7 @@ Additional space between lines, in pixels. @cindex background for menus The background color of the menus in non-toolkit versions of Emacs. (For toolkit versions, see @ref{Lucid Resources}, also see @ref{Motif -Resources}, and see @ref{GTK Resources}.) +Resources}, and see @ref{GTK resources}.) @end ifnottex @item @code{menuBar} (class @code{MenuBar}) @@ -238,13 +238,13 @@ will use a separate minibuffer frame instead. @cindex font for menus Font name for menu pane titles, in non-toolkit versions of Emacs. (For toolkit versions, see @ref{Lucid Resources}, also see @ref{Motif -Resources}, and see @ref{GTK Resources}.) +Resources}, and see @ref{GTK resources}.) @item @code{paneForeground} (class @code{Foreground}) @cindex foreground for menus Foreground color for menu pane titles, in non-toolkit versions of Emacs. (For toolkit versions, see @ref{Lucid Resources}, also see -@ref{Motif Resources}, and see @ref{GTK Resources}.) +@ref{Motif Resources}, and see @ref{GTK resources}.) @end ifnottex @item @code{pointerColor} (class @code{Foreground}) @@ -282,12 +282,12 @@ compiled with GTK+ support. @item @code{selectionFont} (class @code{SelectionFont}) Font name for pop-up menu items, in non-toolkit versions of Emacs. (For toolkit versions, see @ref{Lucid Resources}, also see @ref{Motif -Resources}, and see @ref{GTK Resources}.) +Resources}, and see @ref{GTK resources}.) @item @code{selectionForeground} (class @code{SelectionForeground}) Foreground color for pop-up menu items, in non-toolkit versions of Emacs. (For toolkit versions, see @ref{Lucid Resources}, also see -@ref{Motif Resources}, and see @ref{GTK Resources}.) +@ref{Motif Resources}, and see @ref{GTK resources}.) @item @code{selectionTimeout} (class @code{SelectionTimeout}) Number of milliseconds to wait for a selection reply. commit 80c2bf6e1684a05b7cdc00f4c4eba89841911c76 Merge: 8a23dc1507 7e7f2ea644 Author: Glenn Morris Date: Sat Feb 24 07:50:30 2018 -0800 Merge from origin/emacs-26 7e7f2ea (origin/emacs-26) * src/keyboard.c (syms_of_keyboard): Doc fi... c0676d4 Improve documentation of X resources d806d69 ; Use @minus for negative numbers in some texi files 4a8ea7d * lisp/international/mule.el (keyboard-coding-system): Doc fix. 8a73b80 Minor doc fixes, mostly for timestamp issues 361a8b9 * doc/emacs/mini.texi (Completion Styles): Improve indexing. 2dc24d5 Fix @findex and @vindex entries in manuals 76f5242 Document, in the Elisp manual, how to get a character's raw s... 5fb2957 Improvements in the Emacs manual de17b8e Tiny doc/misc markup fixes commit 8a23dc15077c6bbe3d80ccfcef64397e71f5765d Author: Robert Pluim Date: Sat Feb 24 13:15:42 2018 +0200 Describe 'view-lossage' changes in its docstring and NEWS * lisp/help.el (view-lossage): Mention that this now uses the same format as `edit-last-kbd-macro'. (Bug#30560) * etc/NEWS: Improve the wording of the entry. diff --git a/etc/NEWS b/etc/NEWS index dacaf023bb..596adf88ae 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -167,11 +167,13 @@ directories in the destination. ** Help -*** 'C-h l' (view-lossage) now displays last keystrokes and commands -in the same format as the edit buffer of edit-last-kbd-macro. -This makes possible to copy the lines from the buffer generated -by 'view-lossage', yank them to the buffer "*Edit Macro*" created by -'edit-last-kbd-macro', and save the macro by 'C-c C-c'. +--- +*** Output format of 'C-h l' (view-lossage) has changed. +For convenience, 'view-lossage' now displays the last keystrokes +and commands in the same format as the edit buffer of +'edit-last-kbd-macro'. This makes it possible to copy the lines from +the buffer generated by 'view-lossage' to the "*Edit Macro*" buffer +created by 'edit-last-kbd-macro', and to save the macro by 'C-c C-c'. ** Ibuffer diff --git a/lisp/help.el b/lisp/help.el index 9575f5b090..dcf1f32069 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -455,6 +455,8 @@ is specified by the variable `message-log-max'." (defun view-lossage () "Display last few input keystrokes and the commands run. +For convenience this uses the same format as +`edit-last-kbd-macro'. To record all your input, use `open-dribble-file'." (interactive) commit 7e7f2ea644388d6d06a4ab6690344f7f7c128141 Author: Eli Zaretskii Date: Sat Feb 24 11:30:02 2018 +0200 * src/keyboard.c (syms_of_keyboard): Doc fix. (Bug#30588) diff --git a/src/keyboard.c b/src/keyboard.c index 16744acba8..e62dd0ec48 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -11743,8 +11743,9 @@ immediately after running `post-command-hook'. */); DEFVAR_LISP ("input-method-function", Vinput_method_function, doc: /* If non-nil, the function that implements the current input method. -It's called with one argument, a printing character that was just read. -\(That means a character with code 040...0176.) +It's called with one argument, which must be a single-byte +character that was just read. Any single-byte character is +acceptable, except the DEL character, codepoint 127 decimal, 177 octal. Typically this function uses `read-event' to read additional events. When it does so, it should first bind `input-method-function' to nil so it will not be called recursively. commit c0676d483d57b24a6f91867a4db2cd869041b249 Author: Eli Zaretskii Date: Sat Feb 24 11:14:10 2018 +0200 Improve documentation of X resources * doc/emacs/xresources.texi (Table of Resources): Add menu-related resources. Add cross-references to "GTK Resources". diff --git a/doc/emacs/xresources.texi b/doc/emacs/xresources.texi index ee59551a6a..a0de3134db 100644 --- a/doc/emacs/xresources.texi +++ b/doc/emacs/xresources.texi @@ -216,6 +216,14 @@ Width of the internal frame border, in pixels. @cindex line spacing Additional space between lines, in pixels. +@ifnottex +@item @code{menuBackground} (class @code{Background}) +@cindex background for menus +The background color of the menus in non-toolkit versions of Emacs. +(For toolkit versions, see @ref{Lucid Resources}, also see @ref{Motif +Resources}, and see @ref{GTK Resources}.) +@end ifnottex + @item @code{menuBar} (class @code{MenuBar}) @cindex menu bar (X resource) If the value of this resource is @samp{off} or @samp{false} or @@ -229,6 +237,14 @@ will use a separate minibuffer frame instead. @item @code{paneFont} (class @code{Font}) @cindex font for menus Font name for menu pane titles, in non-toolkit versions of Emacs. +(For toolkit versions, see @ref{Lucid Resources}, also see @ref{Motif +Resources}, and see @ref{GTK Resources}.) + +@item @code{paneForeground} (class @code{Foreground}) +@cindex foreground for menus +Foreground color for menu pane titles, in non-toolkit versions of +Emacs. (For toolkit versions, see @ref{Lucid Resources}, also see +@ref{Motif Resources}, and see @ref{GTK Resources}.) @end ifnottex @item @code{pointerColor} (class @code{Foreground}) @@ -266,7 +282,12 @@ compiled with GTK+ support. @item @code{selectionFont} (class @code{SelectionFont}) Font name for pop-up menu items, in non-toolkit versions of Emacs. (For toolkit versions, see @ref{Lucid Resources}, also see @ref{Motif -Resources}.) +Resources}, and see @ref{GTK Resources}.) + +@item @code{selectionForeground} (class @code{SelectionForeground}) +Foreground color for pop-up menu items, in non-toolkit versions of +Emacs. (For toolkit versions, see @ref{Lucid Resources}, also see +@ref{Motif Resources}, and see @ref{GTK Resources}.) @item @code{selectionTimeout} (class @code{SelectionTimeout}) Number of milliseconds to wait for a selection reply. commit d806d69649235b90d53756a6a67448a4e2059b76 Author: Glenn Morris Date: Fri Feb 23 16:00:44 2018 -0500 ; Use @minus for negative numbers in some texi files diff --git a/doc/emacs/cmdargs.texi b/doc/emacs/cmdargs.texi index ac48066550..733919a374 100644 --- a/doc/emacs/cmdargs.texi +++ b/doc/emacs/cmdargs.texi @@ -913,7 +913,7 @@ colored display. Turn on the color support unconditionally, and use color commands specified by the ANSI escape sequences for the 8 standard colors. @item @var{num} -Use color mode for @var{num} colors. If @var{num} is -1, turn off +Use color mode for @var{num} colors. If @var{num} is @minus{}1, turn off color support (equivalent to @samp{never}); if it is 0, use the default color support for this terminal (equivalent to @samp{auto}); otherwise use an appropriate standard mode for @var{num} colors. diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi index d54363047b..e98884cb92 100644 --- a/doc/emacs/custom.texi +++ b/doc/emacs/custom.texi @@ -1217,7 +1217,7 @@ keyword with a Lisp expression that runs the mode command list enables Eldoc mode (@pxref{Lisp Doc}) by calling @code{eldoc-mode} with no argument (calling it with an argument of 1 would do the same), and disables Font Lock mode (@pxref{Font Lock}) by -calling @code{font-lock-mode} with an argument of -1. +calling @code{font-lock-mode} with an argument of @minus{}1. @example ;; Local Variables: diff --git a/doc/misc/calc.texi b/doc/misc/calc.texi index 40b16b0f3c..a4a091f243 100644 --- a/doc/misc/calc.texi +++ b/doc/misc/calc.texi @@ -14242,7 +14242,7 @@ format in @TeX{} mode and in @samp{\begin@{pmatrix@} a & b \\ c & d \end@{pmatrix@}} format in @LaTeX{} mode; you may need to edit this afterwards to change to your preferred matrix form. If you invoke @kbd{d T} or @kbd{d L} with an -argument of 2 or -2, then matrices will be displayed in two-dimensional +argument of 2 or @minus{}2, then matrices will be displayed in two-dimensional form, such as @example diff --git a/doc/misc/cc-mode.texi b/doc/misc/cc-mode.texi index 151b512cb1..a506213ea2 100644 --- a/doc/misc/cc-mode.texi +++ b/doc/misc/cc-mode.texi @@ -693,7 +693,7 @@ that begins at the line's left margin. @item When it's @code{nil}, the command indents the line by an extra @code{c-basic-offset} columns. A prefix argument acts as a -multiplier. A bare prefix (@kbd{C-u @key{TAB}}) is equivalent to -1, +multiplier. A bare prefix (@kbd{C-u @key{TAB}}) is equivalent to @minus{}1, removing @code{c-basic-offset} columns from the indentation. @end itemize diff --git a/doc/misc/gnus-faq.texi b/doc/misc/gnus-faq.texi index 26135b81de..4175c88754 100644 --- a/doc/misc/gnus-faq.texi +++ b/doc/misc/gnus-faq.texi @@ -915,7 +915,7 @@ You want Scoring. Scoring means, that you define rules which assign each message an integer value. Depending on the value the message is highlighted in summary buffer (if it's high, say +2000) or automatically marked read (if the -value is low, say -800) or some other action happens. +value is low, say @minus{}800) or some other action happens. There are basically three ways of setting up rules which assign the scoring-value to messages. The first and easiest way is to set diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi index a63b5a0f12..ed3eec7794 100644 --- a/doc/misc/gnus.texi +++ b/doc/misc/gnus.texi @@ -20276,13 +20276,13 @@ will be applied to each article. To take @code{gnus-del-mark} as an example---this alist says that all articles that have that mark (i.e., are marked with @samp{e}) will have a -score entry added to lower based on the @code{From} header by -4, and -lowered by @code{Subject} by -1. Change this to fit your prejudices. +score entry added to lower based on the @code{From} header by @minus{}4, and +lowered by @code{Subject} by @minus{}1. Change this to fit your prejudices. If you have marked 10 articles with the same subject with @code{gnus-del-mark}, the rule for that mark will be applied ten times. -That means that that subject will get a score of ten times -1, which -should be, unless I'm much mistaken, -10. +That means that that subject will get a score of ten times @minus{}1, which +should be, unless I'm much mistaken, @minus{}10. If you have auto-expirable (mail) groups (@pxref{Expiring Mail}), all the read articles will be marked with the @samp{E} mark. This'll @@ -20297,7 +20297,7 @@ on the @code{References} header using the @code{Message-ID} of the current article, thereby matching the following thread. If you use this scheme, you should set the score file atom @code{mark} -to something small---like -300, perhaps, to avoid having small random +to something small---like @minus{}300, perhaps, to avoid having small random changes result in articles getting marked as read. After using adaptive scoring for a week or so, Gnus should start to @@ -21073,7 +21073,7 @@ and `gnus-score-decay-scale'." @enumerate @item -Scores between -3 and 3 will be set to 0 when this function is called. +Scores between @minus{}3 and 3 will be set to 0 when this function is called. @item Scores with magnitudes between 3 and 60 will be shrunk by 3. commit 4a8ea7d49a74a669c34102016aa554d82d06ec92 Author: Glenn Morris Date: Fri Feb 23 15:41:29 2018 -0500 * lisp/international/mule.el (keyboard-coding-system): Doc fix. Since multi-tty, this is always set. diff --git a/lisp/international/mule.el b/lisp/international/mule.el index 3e6e643571..4d0081f577 100644 --- a/lisp/international/mule.el +++ b/lisp/international/mule.el @@ -1492,7 +1492,7 @@ If you set this on a terminal which can't distinguish Meta keys from 8-bit characters, you will have to use ESC to type Meta characters. See Info node `Terminal Coding' and Info node `Unibyte Mode'. -On non-windowing terminals, this is set from the locale by default. +This is set at startup based on the locale. Setting this variable directly does not take effect; use either \\[customize] or \\[set-keyboard-coding-system]." commit 15863145cb8468b18b620d9dd82f90eaf4775d25 Author: Paul Eggert Date: Fri Feb 23 11:57:52 2018 -0800 * .gitignore: revert latest change; not currently needed diff --git a/.gitignore b/.gitignore index a231b80b2d..d3712b0d6c 100644 --- a/.gitignore +++ b/.gitignore @@ -48,9 +48,6 @@ src/config.h src/epaths.h src/emacs-module.h -# Miscellaneous build stuf -build-aux/ - # C-level sources built by 'make'. lib/alloca.h lib/byteswap.h @@ -115,9 +112,6 @@ lisp/subdirs.el # Dependencies. deps/ -lib/.deps -src/stamp-h.in -src/stamp-h1 # Logs and temporaries. *.log commit 8a73b80aa43862f6aadda54c3c1f2105c2cfd7f5 Author: Paul Eggert Date: Fri Feb 23 11:51:31 2018 -0800 Minor doc fixes, mostly for timestamp issues diff --git a/doc/lispref/buffers.texi b/doc/lispref/buffers.texi index a572fc702b..f64d6f1600 100644 --- a/doc/lispref/buffers.texi +++ b/doc/lispref/buffers.texi @@ -647,7 +647,7 @@ visiting a file or if the time has been explicitly cleared by too. For instance, in a Dired buffer listing a directory, it returns the last modification time of that directory, as recorded by Dired. -If the buffer is not visiting a file, this function returns -1. +If the buffer is not visiting a file, this function returns @minus{}1. @end defun @defun set-visited-file-modtime &optional time @@ -656,7 +656,8 @@ of the visited file, to the value specified by @var{time} if @var{time} is not @code{nil}, and otherwise to the last modification time of the visited file. -If @var{time} is neither @code{nil} nor zero, it should have the form +If @var{time} is neither @code{nil} nor an integer flag returned +by @code{visited-file-modtime}, it should have the form @code{(@var{high} @var{low} @var{microsec} @var{picosec})}, the format used by @code{current-time} (@pxref{Time of Day}). diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi index 57428ab40f..5a8eeddcf6 100644 --- a/doc/lispref/files.texi +++ b/doc/lispref/files.texi @@ -1894,8 +1894,7 @@ all. This function sets the access and modification times of @var{filename} to @var{time}. The return value is @code{t} if the times are successfully set, otherwise it is @code{nil}. @var{time} defaults to the current -time and must be in the format returned by @code{current-time} -(@pxref{Time of Day}). +time and must be a time value (@pxref{Time of Day}). @end defun @defun set-file-extended-attributes filename attribute-alist diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi index c2fa109482..2f9bb39886 100644 --- a/doc/lispref/frames.texi +++ b/doc/lispref/frames.texi @@ -2277,7 +2277,7 @@ specifies the color mode to use on a text terminal. The value can be either a symbol or a number. A number specifies the number of colors to use (and, indirectly, what commands to issue to produce each color). For example, @code{(tty-color-mode . 8)} specifies use of the -ANSI escape sequences for 8 standard text colors. A value of -1 turns +ANSI escape sequences for 8 standard text colors. A value of @minus{}1 turns off color support. If the parameter's value is a symbol, it specifies a number through diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi index b53d1f0bb9..854dd33030 100644 --- a/doc/lispref/functions.texi +++ b/doc/lispref/functions.texi @@ -1629,7 +1629,7 @@ anonymous function. This specifies how to order the advice, should several pieces of advice be present. By default, the depth is 0. A depth of 100 indicates that this piece of advice should be kept as deep as -possible, whereas a depth of -100 indicates that it should stay as the +possible, whereas a depth of @minus{}100 indicates that it should stay as the outermost piece. When two pieces of advice specify the same depth, the most recently added one will be outermost. diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi index 5dbdbdb943..396d7dd045 100644 --- a/doc/lispref/os.texi +++ b/doc/lispref/os.texi @@ -1457,7 +1457,8 @@ on others, years as early as 1901 do work. @cindex formatting time values These functions convert time values to text in a string, and vice versa. -Time values are lists of two to four integers (@pxref{Time of Day}). +Time values include @code{nil}, numbers, and lists of two to four +integers (@pxref{Time of Day}). @defun date-to-time string This function parses the time-string @var{string} and returns the diff --git a/doc/lispref/positions.texi b/doc/lispref/positions.texi index c89a87c2bb..0a03e246c0 100644 --- a/doc/lispref/positions.texi +++ b/doc/lispref/positions.texi @@ -602,7 +602,7 @@ line @var{count} screen lines from the top of the window; zero means the topmost line. If @var{count} is negative, that specifies a position @w{@minus{}@var{count}} lines from the bottom (or the last line of the buffer, if the buffer ends above the specified screen -position); thus, @var{count} of -1 specifies the last fully visible +position); thus, @var{count} of @minus{}1 specifies the last fully visible screen line of the window. If @var{count} is @code{nil}, then point moves to the beginning of the diff --git a/doc/lispref/strings.texi b/doc/lispref/strings.texi index 756e7efb95..9b222a04c9 100644 --- a/doc/lispref/strings.texi +++ b/doc/lispref/strings.texi @@ -920,7 +920,7 @@ floating-point number. @item %g Replace the specification with notation for a floating-point number, using either exponential notation or decimal-point notation. The -exponential notation is used if the exponent would be less than -4 or +exponential notation is used if the exponent would be less than @minus{}4 or greater than or equal to the precision (default: 6). By default, trailing zeros are removed from the fractional portion of the result and a decimal-point character appears only if it is followed by a commit 0b39f1afe031acddcca81704f1d3524ad4751f1a Author: Glenn Morris Date: Fri Feb 23 14:14:58 2018 -0500 * lisp/vc/vc-git.el: Silence compiler. diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 5db02f4ce5..5456467815 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -868,6 +868,8 @@ It is based on `log-edit-mode', and has Git-specific extensions.") ;; To be called via vc-pull from vc.el, which requires vc-dispatcher. (declare-function vc-compilation-mode "vc-dispatcher" (backend)) +(defvar compilation-directory) +(defvar compilation-arguments) (defun vc-git--pushpull (command prompt extra-args) "Run COMMAND (a string; either push or pull) on the current Git branch. @@ -1410,6 +1412,7 @@ This requires git 1.8.4 or later, for the \"-L\" option of \"git log\"." (declare-function grep-read-files "grep" (regexp)) (declare-function grep-expand-template "grep" (template &optional regexp files dir excl)) +(defvar compilation-environment) ;; Derived from `lgrep'. (defun vc-git-grep (regexp &optional files dir) commit 8156e3f3e04e7f9ac1bb2b8acc58153cfaaab2c9 Author: Glenn Morris Date: Fri Feb 23 12:52:11 2018 -0500 * admin/automerge: Quieten initial pull if start with reset. diff --git a/admin/automerge b/admin/automerge index ba608d1090..520961f1e8 100755 --- a/admin/automerge +++ b/admin/automerge @@ -141,7 +141,7 @@ trap "rm -f $tempfile 2> /dev/null" EXIT git reset --hard origin/master || die "reset error" echo "Pulling..." - git pull --ff-only || die "pull error" + git pull -q --ff-only || die "pull error" } commit 361a8b908b4cf3657699781d1f1c46f1a7d42d0a Author: Eli Zaretskii Date: Fri Feb 23 17:39:23 2018 +0200 * doc/emacs/mini.texi (Completion Styles): Improve indexing. diff --git a/doc/emacs/mini.texi b/doc/emacs/mini.texi index dc346b0a4c..579697f47b 100644 --- a/doc/emacs/mini.texi +++ b/doc/emacs/mini.texi @@ -464,12 +464,14 @@ Lisp symbol). The default completion styles are (in order): @table @code @item basic +@cindex @code{basic}, completion style A matching completion alternative must have the same beginning as the text in the minibuffer before point. Furthermore, if there is any text in the minibuffer after point, the rest of the completion alternative must contain that text as a substring. -@findex partial-completion +@cindex partial completion +@cindex @code{partial-completion}, completion style @item partial-completion This aggressive completion style divides the minibuffer text into words separated by hyphens or spaces, and completes each word @@ -481,6 +483,7 @@ Furthermore, a @samp{*} in the minibuffer text is treated as a corresponding position in the completion alternative. @item emacs22 +@cindex @code{emacs22}, completion style This completion style is similar to @code{basic}, except that it ignores the text in the minibuffer after point. It is so-named because it corresponds to the completion behavior in Emacs 22. @@ -493,6 +496,7 @@ can add them to @code{completion-styles} if you wish @table @code @item substring +@cindex @code{substring}, completion style A matching completion alternative must contain the text in the minibuffer before point, and the text in the minibuffer after point, as substrings (in that same order). @@ -503,6 +507,7 @@ between @samp{foo} and @samp{bar}, that matches @var{c} can be any string including the empty string. @item initials +@cindex @code{initials}, completion style This very aggressive completion style attempts to complete acronyms and initialisms. For example, when completing command names, it matches @samp{lch} to @samp{list-command-history}. commit 2dc24d5536abce1eb252dc2695a22371227166c5 Author: Michael Albinus Date: Fri Feb 23 15:30:19 2018 +0100 Fix @findex and @vindex entries in manuals * doc/emacs/building.texi: * doc/emacs/calendar.texi: * doc/emacs/cmdargs.texi: * doc/emacs/mini.texi: * doc/emacs/misc.texi: * doc/emacs/trouble.texi: * doc/emacs/windows.texi: * doc/lispintro/emacs-lisp-intro.texi: * doc/lispref/edebug.texi: * doc/lispref/frames.texi: * doc/lispref/os.texi: * doc/lispref/windows.texi: * doc/misc/cc-mode.texi: * doc/misc/dired-x.texi: * doc/misc/ediff.texi: * doc/misc/mh-e.texi: * doc/misc/pcl-cvs.texi: * doc/misc/reftex.texi: * doc/misc/sc.texi: * doc/misc/vhdl-mode.texi: * doc/misc/viper.texi: Fix @findex and @vindex entries. diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi index b6b664ddb3..7f86470ad4 100644 --- a/doc/emacs/building.texi +++ b/doc/emacs/building.texi @@ -302,7 +302,7 @@ And here's how to do it in csh: if ($?prompt) set prompt = @dots{} @end example -@vindex TERM, environment variable, in compilation mode +@vindex TERM@r{, environment variable, in compilation mode} If you want to customize the value of the @env{TERM} environment variable passed to the compilation subshell, customize the variable @code{comint-terminfo-terminal} (@pxref{Shell Options}). diff --git a/doc/emacs/calendar.texi b/doc/emacs/calendar.texi index be5af998e7..c6a84b5ab1 100644 --- a/doc/emacs/calendar.texi +++ b/doc/emacs/calendar.texi @@ -1507,7 +1507,8 @@ to the main diary file, if these are different files. @end ifnottex -@findex icalendar-export-file, icalendar-export-region +@findex icalendar-export-file +@findex icalendar-export-region Use @code{icalendar-export-file} to interactively export an entire Emacs diary file to iCalendar format. To export only a part of a diary file, mark the relevant area, and call @code{icalendar-export-region}. diff --git a/doc/emacs/cmdargs.texi b/doc/emacs/cmdargs.texi index d18de8e7a0..ac48066550 100644 --- a/doc/emacs/cmdargs.texi +++ b/doc/emacs/cmdargs.texi @@ -464,25 +464,25 @@ variables to be set, but it uses their values if they are set. @c might be confused with general-purpose phrases. @table @env @item CDPATH -@vindex CDPATH, environment variable +@vindex CDPATH@r{, environment variable} Used by the @code{cd} command to search for the directory you specify, when you specify a relative directory, @item DBUS_SESSION_BUS_ADDRESS -@vindex DBUS_SESSION_BUS_ADDRESS, environment variable +@vindex DBUS_SESSION_BUS_ADDRESS@r{, environment variable} Used by D-Bus when Emacs is compiled with it. Usually, there is no need to change it. Setting it to a dummy address, like @samp{unix:path=/dev/null}, suppresses connections to the D-Bus session bus as well as autolaunching the D-Bus session bus if not running yet. @item EMACSDATA -@vindex EMACSDATA, environment variable +@vindex EMACSDATA@r{, environment variable} Directory for the architecture-independent files that come with Emacs. This is used to initialize the variable @code{data-directory}. @item EMACSDOC -@vindex EMACSDOC, environment variable +@vindex EMACSDOC@r{, environment variable} Directory for the documentation string file, which is used to initialize the Lisp variable @code{doc-directory}. @item EMACSLOADPATH -@vindex EMACSLOADPATH, environment variable +@vindex EMACSLOADPATH@r{, environment variable} A colon-separated list of directories@footnote{Here and below, whenever we say ``colon-separated list of directories'', it pertains to Unix and GNU/Linux systems. On MS-DOS and MS-Windows, the @@ -496,28 +496,28 @@ the default @code{load-path}. To specify an empty element in the middle of the list, use 2 colons in a row, as in @samp{EMACSLOADPATH="/tmp::/foo"}. @item EMACSPATH -@vindex EMACSPATH, environment variable +@vindex EMACSPATH@r{, environment variable} A colon-separated list of directories to search for executable files. If set, Emacs uses this in addition to @env{PATH} (see below) when initializing the variable @code{exec-path} (@pxref{Shell}). @item EMAIL -@vindex EMAIL, environment variable +@vindex EMAIL@r{, environment variable} @vindex user-mail-address@r{, initialization} Your email address; used to initialize the Lisp variable @code{user-mail-address}, which the Emacs mail interface puts into the @samp{From} header of outgoing messages (@pxref{Mail Headers}). @item ESHELL -@vindex ESHELL, environment variable +@vindex ESHELL@r{, environment variable} Used for shell-mode to override the @env{SHELL} environment variable (@pxref{Interactive Shell}). @item HISTFILE -@vindex HISTFILE, environment variable +@vindex HISTFILE@r{, environment variable} The name of the file that shell commands are saved in between logins. This variable defaults to @file{~/.bash_history} if you use Bash, to @file{~/.sh_history} if you use ksh, and to @file{~/.history} otherwise. @item HOME -@vindex HOME, environment variable +@vindex HOME@r{, environment variable} The location of your files in the directory tree; used for expansion of file names starting with a tilde (@file{~}). On MS-DOS, it defaults to the directory from which Emacs was started, with @@ -529,7 +529,7 @@ where @var{username} is your user name), though for backwards compatibility @file{C:/} will be used instead if a @file{.emacs} file is found there. @item HOSTNAME -@vindex HOSTNAME, environment variable +@vindex HOSTNAME@r{, environment variable} The name of the machine that Emacs is running on. @c complete.el is obsolete since 24.1. @ignore @@ -538,24 +538,24 @@ A colon-separated list of directories. Used by the @code{complete} package to search for files. @end ignore @item INFOPATH -@vindex INFOPATH, environment variable +@vindex INFOPATH@r{, environment variable} A colon-separated list of directories in which to search for Info files. @item LC_ALL -@vindex LC_ALL, environment variable +@vindex LC_ALL@r{, environment variable} @itemx LC_COLLATE -@vindex LC_COLLATE, environment variable +@vindex LC_COLLATE@r{, environment variable} @itemx LC_CTYPE -@vindex LC_CTYPE, environment variable +@vindex LC_CTYPE@r{, environment variable} @itemx LC_MESSAGES -@vindex LC_MESSAGES, environment variable +@vindex LC_MESSAGES@r{, environment variable} @itemx LC_MONETARY -@vindex LC_MONETARY, environment variable +@vindex LC_MONETARY@r{, environment variable} @itemx LC_NUMERIC -@vindex LC_NUMERIC, environment variable +@vindex LC_NUMERIC@r{, environment variable} @itemx LC_TIME -@vindex LC_TIME, environment variable +@vindex LC_TIME@r{, environment variable} @itemx LANG -@vindex LANG, environment variable +@vindex LANG@r{, environment variable} The user's preferred locale. The locale has six categories, specified by the environment variables @env{LC_COLLATE} for sorting, @env{LC_CTYPE} for character encoding, @env{LC_MESSAGES} for system @@ -578,70 +578,70 @@ matched against entries in @code{locale-language-names}, @code{locale-preferred-coding-systems}, to select a default language environment and coding system. @xref{Language Environments}. @item LOGNAME -@vindex LOGNAME, environment variable +@vindex LOGNAME@r{, environment variable} The user's login name. See also @env{USER}. @item MAIL -@vindex MAIL, environment variable +@vindex MAIL@r{, environment variable} The name of your system mail inbox. @ifnottex @item MH -@vindex MH, environment variable +@vindex MH@r{, environment variable} Name of setup file for the mh system. @xref{Top,,MH-E,mh-e, The Emacs Interface to MH}. @end ifnottex @item NAME -@vindex NAME, environment variable +@vindex NAME@r{, environment variable} Your real-world name. This is used to initialize the variable @code{user-full-name} (@pxref{Mail Headers}). @item NNTPSERVER -@vindex NNTPSERVER, environment variable +@vindex NNTPSERVER@r{, environment variable} The name of the news server. Used by the mh and Gnus packages. @item ORGANIZATION -@vindex ORGANIZATION, environment variable +@vindex ORGANIZATION@r{, environment variable} The name of the organization to which you belong. Used for setting the @samp{Organization:} header in your posts from the Gnus package. @item PATH -@vindex PATH, environment variable +@vindex PATH@r{, environment variable} A colon-separated list of directories containing executable files. This is used to initialize the variable @code{exec-path} (@pxref{Shell}). @item PWD -@vindex PWD, environment variable +@vindex PWD@r{, environment variable} If set, this should be the default directory when Emacs was started. @item REPLYTO -@vindex REPLYTO, environment variable +@vindex REPLYTO@r{, environment variable} If set, this specifies an initial value for the variable @code{mail-default-reply-to} (@pxref{Mail Headers}). @item SAVEDIR -@vindex SAVEDIR, environment variable +@vindex SAVEDIR@r{, environment variable} The name of a directory in which news articles are saved by default. Used by the Gnus package. @item SHELL -@vindex SHELL, environment variable +@vindex SHELL@r{, environment variable} The name of an interpreter used to parse and execute programs run from inside Emacs. @item SMTPSERVER -@vindex SMTPSERVER, environment variable +@vindex SMTPSERVER@r{, environment variable} The name of the outgoing mail server. This is used to initialize the variable @code{smtpmail-smtp-server} (@pxref{Mail Sending}). @cindex background mode, on @command{xterm} @item TERM -@vindex TERM, environment variable +@vindex TERM@r{, environment variable} The type of the terminal that Emacs is using. This variable must be set unless Emacs is run in batch mode. On MS-DOS, it defaults to @samp{internal}, which specifies a built-in terminal emulation that handles the machine's own display. @item TERMCAP -@vindex TERMCAP, environment variable +@vindex TERMCAP@r{, environment variable} The name of the termcap library file describing how to program the terminal specified by @env{TERM}. This defaults to @file{/etc/termcap}. @item TMPDIR -@vindex TMPDIR, environment variable +@vindex TMPDIR@r{, environment variable} @itemx TMP -@vindex TMP, environment variable +@vindex TMP@r{, environment variable} @itemx TEMP -@vindex TEMP, environment variable +@vindex TEMP@r{, environment variable} These environment variables are used to initialize the variable @code{temporary-file-directory}, which specifies a directory in which to put temporary files (@pxref{Backup}). Emacs tries to use @@ -649,7 +649,7 @@ to put temporary files (@pxref{Backup}). Emacs tries to use @file{/tmp}, but on MS-Windows and MS-DOS it instead falls back on @env{TMP}, then @env{TEMP}, and finally @file{c:/temp}. @item TZ -@vindex TZ, environment variable +@vindex TZ@r{, environment variable} This specifies the default time zone and possibly also daylight saving time information. @xref{Time Zone Rules,,, elisp, The GNU Emacs Lisp Reference Manual}. On MS-DOS, if @env{TZ} is not set in the @@ -657,11 +657,11 @@ environment when Emacs starts, Emacs defines a default value as appropriate for the country code returned by DOS@. On MS-Windows, Emacs does not use @env{TZ} at all. @item USER -@vindex USER, environment variable +@vindex USER@r{, environment variable} The user's login name. See also @env{LOGNAME}. On MS-DOS, this defaults to @samp{root}. @item VERSION_CONTROL -@vindex VERSION_CONTROL, environment variable +@vindex VERSION_CONTROL@r{, environment variable} Used to initialize the @code{version-control} variable (@pxref{Backup Names}). @end table diff --git a/doc/emacs/mini.texi b/doc/emacs/mini.texi index 03e371f499..dc346b0a4c 100644 --- a/doc/emacs/mini.texi +++ b/doc/emacs/mini.texi @@ -469,7 +469,7 @@ text in the minibuffer before point. Furthermore, if there is any text in the minibuffer after point, the rest of the completion alternative must contain that text as a substring. -@findex partial completion +@findex partial-completion @item partial-completion This aggressive completion style divides the minibuffer text into words separated by hyphens or spaces, and completes each word diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi index 9610ed4dd8..d8f202f684 100644 --- a/doc/emacs/misc.texi +++ b/doc/emacs/misc.texi @@ -1359,7 +1359,7 @@ directory stack if they are not already on it underlying shell, of course. @vindex comint-terminfo-terminal -@vindex TERM, environment variable, in sub-shell +@vindex TERM@r{, environment variable, in sub-shell} Comint mode sets the @env{TERM} environment variable to a safe default value, but this value disables some useful features. For example, color is disabled in applications that use @env{TERM} to determine if diff --git a/doc/emacs/trouble.texi b/doc/emacs/trouble.texi index 330497c4ea..9712cc73de 100644 --- a/doc/emacs/trouble.texi +++ b/doc/emacs/trouble.texi @@ -779,7 +779,7 @@ the dribble file. @item @findex open-termscript @cindex termscript file -@vindex TERM, environment variable, and display bugs +@vindex TERM@r{, environment variable, and display bugs} For possible display bugs, the terminal type (the value of environment variable @env{TERM}), the complete termcap entry for the terminal from @file{/etc/termcap} (since that file is not identical on all machines), diff --git a/doc/emacs/windows.texi b/doc/emacs/windows.texi index 9f3b1b6a07..7dbd680b9b 100644 --- a/doc/emacs/windows.texi +++ b/doc/emacs/windows.texi @@ -379,7 +379,7 @@ Several of these commands are bound in the @kbd{C-x 5} prefix key. @node Window Choice @subsection How @code{display-buffer} works -@findex display-buffer, detailed description +@findex display-buffer@r{, detailed description} The @code{display-buffer} command (as well as commands that call it internally) chooses a window to display by following the steps given diff --git a/doc/lispintro/emacs-lisp-intro.texi b/doc/lispintro/emacs-lisp-intro.texi index 770478ddf9..0efaecc1aa 100644 --- a/doc/lispintro/emacs-lisp-intro.texi +++ b/doc/lispintro/emacs-lisp-intro.texi @@ -1716,7 +1716,7 @@ function definition, and vice versa. @unnumberedsubsec @code{fill-column}, an Example Variable @end ifnottex -@findex fill-column, @r{an example variable} +@findex fill-column@r{, an example variable} @cindex Example variable, @code{fill-column} @cindex Variable, example of, @code{fill-column} The variable @code{fill-column} illustrates a symbol with a value @@ -3839,7 +3839,7 @@ message @samp{5 is greater than 4!} will be printed. @noindent (The function @code{>} tests whether its first argument is greater than its second argument and returns true if it is.) -@findex > (greater than) +@findex > @r{(greater than)} Of course, in actual use, the test in an @code{if} expression will not be fixed for all time as it is by the expression @code{(> 5 4)}. @@ -4552,7 +4552,7 @@ buffers. Later, we will study other functions. @node Finding More @section Finding More Information -@findex describe-function, @r{introduced} +@findex describe-function@r{, introduced} @cindex Find function documentation In this walk-through, I will describe each new function as we come to it, sometimes in detail and sometimes briefly. If you are interested, @@ -5564,7 +5564,7 @@ outline of the function: @node insert-buffer interactive @subsection The Interactive Expression in @code{insert-buffer} -@findex interactive, @r{example use of} +@findex interactive@r{, example use of} In @code{insert-buffer}, the argument to the @code{interactive} declaration has two parts, an asterisk, @samp{*}, and @samp{bInsert @@ -5881,8 +5881,8 @@ find and use again and again. @node New insert-buffer @subsection New Body for @code{insert-buffer} -@findex insert-buffer, new version body -@findex new version body for insert-buffer +@findex insert-buffer@r{, new version body} +@cindex new version body for insert-buffer The body in the GNU Emacs 22 version is more confusing than the original. @@ -6734,8 +6734,8 @@ Or can you write the function without them? @node car cdr & cons @chapter @code{car}, @code{cdr}, @code{cons}: Fundamental Functions -@findex car, @r{introduced} -@findex cdr, @r{introduced} +@findex car@r{, introduced} +@findex cdr@r{, introduced} In Lisp, @code{car}, @code{cdr}, and @code{cons} are fundamental functions. The @code{cons} function is used to construct lists, and @@ -6900,7 +6900,7 @@ Emacs Lisp Reference Manual}.) @node cons @section @code{cons} -@findex cons, @r{introduced} +@findex cons@r{, introduced} The @code{cons} function constructs lists; it is the inverse of @code{car} and @code{cdr}. For example, @code{cons} can be used to make @@ -8715,7 +8715,7 @@ example-list @noindent Now, we can add a new element on to this list by evaluating the following expression: -@findex push, @r{example} +@findex push@r{, example} @smallexample (push "a third clause" example-list) @@ -8762,13 +8762,13 @@ element of the kill ring---this means that since the @sc{cdr} of the next to last element is the last element of the kill ring, it will set the last element of the kill ring. -@findex nthcdr, @r{example} +@findex nthcdr@r{, example} The @code{nthcdr} function works by repeatedly taking the @sc{cdr} of a list---it takes the @sc{cdr} of the @sc{cdr} of the @sc{cdr} @dots{} It does this @var{N} times and returns the results. (@xref{nthcdr, , @code{nthcdr}}.) -@findex setcdr, @r{example} +@findex setcdr@r{, example} Thus, if we had a four element list that was supposed to be three elements long, we could set the @sc{cdr} of the next to last element to @code{nil}, and thereby shorten the list. (If you set the last @@ -17177,8 +17177,8 @@ file, as I intended, I accidentally set the width for filled text, almost always to a width I did not want. Since I hardly ever reset my default width, I simply unbound the key. -@findex list-buffers, @r{rebound} -@findex buffer-menu, @r{bound to key} +@findex list-buffers@r{, rebound} +@findex buffer-menu@r{, bound to key} @need 1250 The following rebinds an existing key: diff --git a/doc/lispref/edebug.texi b/doc/lispref/edebug.texi index b58f8aaa4f..5af48fe096 100644 --- a/doc/lispref/edebug.texi +++ b/doc/lispref/edebug.texi @@ -158,7 +158,7 @@ display a list of all Edebug commands. into it, to invoke Edebug at the proper places. @kindex C-M-x -@findex eval-defun (Edebug) +@findex eval-defun @r{(Edebug)} When you invoke command @kbd{C-M-x} (@code{eval-defun}) with a prefix argument on a function definition, it instruments the definition before evaluating it. (This does not modify the source diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi index 43fdd8f9d5..c2fa109482 100644 --- a/doc/lispref/frames.texi +++ b/doc/lispref/frames.texi @@ -1391,20 +1391,20 @@ text terminals. frame. @code{title} and @code{name} are meaningful on all terminals. @table @code -@vindex display, a frame parameter +@vindex display@r{, a frame parameter} @item display The display on which to open this frame. It should be a string of the form @samp{@var{host}:@var{dpy}.@var{screen}}, just like the @env{DISPLAY} environment variable. @xref{Multiple Terminals}, for more details about display names. -@vindex display-type, a frame parameter +@vindex display-type@r{, a frame parameter} @item display-type This parameter describes the range of possible colors that can be used in this frame. Its value is @code{color}, @code{grayscale} or @code{mono}. -@vindex title, a frame parameter +@vindex title@r{, a frame parameter} @item title If a frame has a non-@code{nil} title, it appears in the window system's title bar at the top of the frame, and also in the mode line @@ -1413,7 +1413,7 @@ of windows in that frame if @code{mode-line-frame-identification} uses Emacs is not using a window system, and can only display one frame at a time. @xref{Frame Titles}. -@vindex name, a frame parameter +@vindex name@r{, a frame parameter} @item name The name of the frame. The frame name serves as a default for the frame title, if the @code{title} parameter is unspecified or @code{nil}. If @@ -1424,7 +1424,7 @@ If you specify the frame name explicitly when you create the frame, the name is also used (instead of the name of the Emacs executable) when looking up X resources for the frame. -@vindex explicit-name, a frame parameter +@vindex explicit-name@r{, a frame parameter} @item explicit-name If the frame name was specified explicitly when the frame was created, this parameter will be that name. If the frame wasn't explicitly @@ -1446,7 +1446,7 @@ frame's parent frame. (Note that none of these parameters is meaningful on TTY frames.) @table @code -@vindex left, a frame parameter +@vindex left@r{, a frame parameter} @item left The position, in pixels, of the left outer edge of the frame with respect to the left edge of the frame's display or parent frame. It can @@ -1521,13 +1521,13 @@ of the display, workarea or parent frame edge. They are also returned as such by functions like @code{frame-parameters} and restored as such by the desktop saving routines. -@vindex top, a frame parameter +@vindex top@r{, a frame parameter} @item top The screen position of the top (or bottom) edge, in pixels, with respect to the top (or bottom) edge of the display or parent frame. It works just like @code{left}, except vertically instead of horizontally. -@vindex icon-left, a frame parameter +@vindex icon-left@r{, a frame parameter} @item icon-left The screen position of the left edge of the frame's icon, in pixels, counting from the left edge of the screen. This takes effect when the @@ -1535,13 +1535,13 @@ frame is iconified, if the window manager supports this feature. If you specify a value for this parameter, then you must also specify a value for @code{icon-top} and vice versa. -@vindex icon-top, a frame parameter +@vindex icon-top@r{, a frame parameter} @item icon-top The screen position of the top edge of the frame's icon, in pixels, counting from the top edge of the screen. This takes effect when the frame is iconified, if the window manager supports this feature. -@vindex user-position, a frame parameter +@vindex user-position@r{, a frame parameter} @item user-position When you create a frame and specify its screen position with the @code{left} and @code{top} parameters, use this parameter to say whether @@ -1562,7 +1562,7 @@ value for this parameter if the values of the @code{left} and @code{top} parameters represent the user's stated preference; otherwise, use @code{nil}. -@vindex z-group, a frame parameter +@vindex z-group@r{, a frame parameter} @item z-group This parameter specifies a relative position of the frame's window-system window in the stacking (Z-) order of the frame's display. @@ -1589,7 +1589,7 @@ graphical displays, the @code{default} face determines the actual pixel sizes of these character units (@pxref{Face Attributes}). @table @code -@vindex width, a frame parameter +@vindex width@r{, a frame parameter} @item width This parameter specifies the width of the frame. It can be specified as in the following ways: @@ -1635,19 +1635,19 @@ width of the frame's text area in characters as an integer rounded, if necessary, to a multiple of the frame's default character width. That value is also used by the desktop saving routines. -@vindex height, a frame parameter +@vindex height@r{, a frame parameter} @item height This parameter specifies the height of the frame. It works just like @code{width}, except vertically instead of horizontally. -@vindex user-size, a frame parameter +@vindex user-size@r{, a frame parameter} @item user-size This does for the size parameters @code{height} and @code{width} what the @code{user-position} parameter (@pxref{Position Parameters, user-position}) does for the position parameters @code{top} and @code{left}. -@vindex min-width, a frame parameter +@vindex min-width@r{, a frame parameter} @item min-width This parameter specifies the minimum native width (@pxref{Frame Geometry}) of the frame, in characters. Normally, the functions that @@ -1658,7 +1658,7 @@ non-@code{nil} allows to make a frame narrower than that with the consequence that any components that do not fit will be clipped by the window manager. -@vindex min-height, a frame parameter +@vindex min-height@r{, a frame parameter} @item min-height This parameter specifies the minimum native height (@pxref{Frame Geometry}) of the frame, in characters. Normally, the functions that @@ -1673,7 +1673,7 @@ fit will be clipped by the window manager. @cindex fullheight frames @cindex fullwidth frames @cindex maximized frames -@vindex fullscreen, a frame parameter +@vindex fullscreen@r{, a frame parameter} @item fullscreen This parameter specifies whether to maximize the frame's width, height or both. Its value can be @code{fullwidth}, @code{fullheight}, @@ -1704,7 +1704,7 @@ Full-screen on macOS hides both the tool-bar and the menu-bar, however both will be displayed if the mouse pointer is moved to the top of the screen. -@vindex fullscreen-restore, a frame parameter +@vindex fullscreen-restore@r{, a frame parameter} @item fullscreen-restore This parameter specifies the desired fullscreen state of the frame after invoking the @code{toggle-frame-fullscreen} command (@pxref{Frame @@ -1723,14 +1723,14 @@ file as, for example This will give a new frame full height after typing in it @key{F11} for the first time. -@vindex fit-frame-to-buffer-margins, a frame parameter +@vindex fit-frame-to-buffer-margins@r{, a frame parameter} @item fit-frame-to-buffer-margins This parameter allows to override the value of the option @code{fit-frame-to-buffer-margins} when fitting this frame to the buffer of its root window with @code{fit-frame-to-buffer} (@pxref{Resizing Windows}). -@vindex fit-frame-to-buffer-sizes, a frame parameter +@vindex fit-frame-to-buffer-sizes@r{, a frame parameter} @item fit-frame-to-buffer-sizes This parameter allows to override the value of the option @code{fit-frame-to-buffer-sizes} when fitting this frame to the buffer @@ -1748,38 +1748,38 @@ Windows}). frame, or control their sizes. @table @code -@vindex border-width, a frame parameter +@vindex border-width@r{, a frame parameter} @item border-width The width in pixels of the frame's outer border (@pxref{Frame Geometry}). -@vindex internal-border-width, a frame parameter +@vindex internal-border-width@r{, a frame parameter} @item internal-border-width The width in pixels of the frame's internal border (@pxref{Frame Geometry}). -@vindex vertical-scroll-bars, a frame parameter +@vindex vertical-scroll-bars@r{, a frame parameter} @item vertical-scroll-bars Whether the frame has scroll bars (@pxref{Scroll Bars}) for vertical scrolling, and which side of the frame they should be on. The possible values are @code{left}, @code{right}, and @code{nil} for no scroll bars. -@vindex horizontal-scroll-bars, a frame parameter +@vindex horizontal-scroll-bars@r{, a frame parameter} @item horizontal-scroll-bars Whether the frame has scroll bars for horizontal scrolling (@code{t} and @code{bottom} mean yes, @code{nil} means no). -@vindex scroll-bar-width, a frame parameter +@vindex scroll-bar-width@r{, a frame parameter} @item scroll-bar-width The width of vertical scroll bars, in pixels, or @code{nil} meaning to use the default width. -@vindex scroll-bar-height, a frame parameter +@vindex scroll-bar-height@r{, a frame parameter} @item scroll-bar-height The height of horizontal scroll bars, in pixels, or @code{nil} meaning to use the default height. -@vindex left-fringe, a frame parameter -@vindex right-fringe, a frame parameter +@vindex left-fringe@r{, a frame parameter} +@vindex right-fringe@r{, a frame parameter} @item left-fringe @itemx right-fringe The default width of the left and right fringes of windows in this @@ -1791,19 +1791,19 @@ these two frame parameters, the return value is always an integer. When using @code{set-frame-parameter}, passing a @code{nil} value imposes an actual default value of 8 pixels. -@vindex right-divider-width, a frame parameter +@vindex right-divider-width@r{, a frame parameter} @item right-divider-width The width (thickness) reserved for the right divider (@pxref{Window Dividers}) of any window on the frame, in pixels. A value of zero means to not draw right dividers. -@vindex bottom-divider-width, a frame parameter +@vindex bottom-divider-width@r{, a frame parameter} @item bottom-divider-width The width (thickness) reserved for the bottom divider (@pxref{Window Dividers}) of any window on the frame, in pixels. A value of zero means to not draw bottom dividers. -@vindex menu-bar-lines frame parameter +@vindex menu-bar-lines@r{, a frame parameter} @item menu-bar-lines The number of lines to allocate at the top of the frame for a menu bar (@pxref{Menu Bar}). The default is one if Menu Bar mode is enabled and @@ -1814,25 +1814,25 @@ even when the menu bar wraps to two or more lines. In that case, the (@pxref{Frame Geometry}) allows to derive whether the menu bar actually occupies one or more lines. -@vindex tool-bar-lines frame parameter +@vindex tool-bar-lines@r{, a frame parameter} @item tool-bar-lines The number of lines to use for the tool bar (@pxref{Tool Bar}). The default is one if Tool Bar mode is enabled and zero otherwise. @xref{Tool Bars,,,emacs, The GNU Emacs Manual}. This value may change whenever the tool bar wraps (@pxref{Frame Layout}). -@vindex tool-bar-position frame parameter +@vindex tool-bar-position@r{, a frame parameter} @item tool-bar-position The position of the tool bar when Emacs was built with GTK+. Its value can be one of @code{top}, @code{bottom} @code{left}, @code{right}. The default is @code{top}. -@vindex line-spacing, a frame parameter +@vindex line-spacing@r{, a frame parameter} @item line-spacing Additional space to leave below each text line, in pixels (a positive integer). @xref{Line Height}, for more information. -@vindex no-special-glyphs, a frame parameter +@vindex no-special-glyphs@r{, a frame parameter} @item no-special-glyphs If this is non-@code{nil}, it suppresses the display of any truncation and continuation glyphs (@pxref{Truncation}) for all buffers displayed @@ -1851,7 +1851,7 @@ Windows}). with which buffers have been, or should, be displayed in the frame. @table @code -@vindex minibuffer, a frame parameter +@vindex minibuffer@r{, a frame parameter} @item minibuffer Whether this frame has its own minibuffer. The value @code{t} means yes, @code{nil} means no, @code{only} means this frame is just a @@ -1867,7 +1867,7 @@ minibuffer window to @code{t} and vice-versa, or from @code{t} to @code{nil}. If the parameter specifies a minibuffer window already, setting it to @code{nil} has no effect. -@vindex buffer-predicate, a frame parameter +@vindex buffer-predicate@r{, a frame parameter} @item buffer-predicate The buffer-predicate function for this frame. The function @code{other-buffer} uses this predicate (from the selected frame) to @@ -1876,12 +1876,12 @@ decide which buffers it should consider, if the predicate is not each buffer; if the predicate returns a non-@code{nil} value, it considers that buffer. -@vindex buffer-list, a frame parameter +@vindex buffer-list@r{, a frame parameter} @item buffer-list A list of buffers that have been selected in this frame, ordered most-recently-selected first. -@vindex unsplittable, a frame parameter +@vindex unsplittable@r{, a frame parameter} @item unsplittable If non-@code{nil}, this frame's window is never split automatically. @end table @@ -1895,40 +1895,40 @@ If non-@code{nil}, this frame's window is never split automatically. These parameters supply forms of interactions between different frames. @table @code -@vindex parent-frame, a frame parameter +@vindex parent-frame@r{, a frame parameter} @item parent-frame If non-@code{nil}, this means that this frame is a child frame (@pxref{Child Frames}), and this parameter specifies its parent frame. If @code{nil}, this means that this frame is a normal, top-level frame. -@vindex delete-before, a frame parameter +@vindex delete-before@r{, a frame parameter} @item delete-before If non-@code{nil}, this parameter specifies another frame whose deletion will automatically trigger the deletion of this frame. @xref{Deleting Frames}. -@vindex mouse-wheel-frame, a frame parameter +@vindex mouse-wheel-frame@r{, a frame parameter} @item mouse-wheel-frame If non-@code{nil}, this parameter specifies the frame whose windows will be scrolled whenever the mouse wheel is scrolled with the mouse pointer hovering over this frame, see @ref{Mouse Commands,,, emacs, The GNU Emacs Manual}. -@vindex no-other-frame, a frame parameter +@vindex no-other-frame@r{, a frame parameter} @item no-other-frame If this is non-@code{nil}, then this frame is not eligible as candidate for the functions @code{next-frame}, @code{previous-frame} (@pxref{Finding All Frames}) and @code{other-frame}, see @ref{Frame Commands,,, emacs, The GNU Emacs Manual}. -@vindex auto-hide-function, a frame parameter +@vindex auto-hide-function@r{, a frame parameter} @item auto-hide-function When this parameter specifies a function, that function will be called instead of the function specified by the variable @code{frame-auto-hide-function} when quitting the frame's only window (@pxref{Quitting Windows}) and there are other frames left. -@vindex minibuffer-exit, a frame parameter +@vindex minibuffer-exit@r{, a frame parameter} @item minibuffer-exit When this parameter is non-@code{nil}, Emacs will by default make this frame invisible whenever the minibuffer (@pxref{Minibuffers}) is exited. @@ -1937,7 +1937,7 @@ Alternatively, it can specify the functions @code{iconify-frame} and disappear automatically (similar to how Emacs deals with a window) when exiting the minibuffer. -@vindex keep-ratio, a frame parameter +@vindex keep-ratio@r{, a frame parameter} @item keep-ratio This parameter is currently meaningful for child frames (@pxref{Child Frames}) only. If it is non-@code{nil}, then Emacs will try to keep the @@ -1977,29 +1977,29 @@ Frames}) that come without window manager decorations. If necessary, they can be used for undecorated top-level frames as well. @table @code -@vindex drag-internal-border, a frame parameter +@vindex drag-internal-border@r{, a frame parameter} @item drag-internal-border If non-@code{nil}, the frame can be resized by dragging its internal borders, if present, with the mouse. -@vindex drag-with-header-line, a frame parameter +@vindex drag-with-header-line@r{, a frame parameter} @item drag-with-header-line If non-@code{nil}, the frame can be moved with the mouse by dragging the header line of its topmost window. -@vindex drag-with-mode-line, a frame parameter +@vindex drag-with-mode-line@r{, a frame parameter} @item drag-with-mode-line If non-@code{nil}, the frame can be moved with the mouse by dragging the mode line of its bottommost window. Note that such a frame is not allowed to have its own minibuffer window. -@vindex snap-width, a frame parameter +@vindex snap-width@r{, a frame parameter} @item snap-width A frame that is moved with the mouse will ``snap'' at the border(s) of the display or its parent frame whenever it is dragged as near to such an edge as the number of pixels specified by this parameter. -@vindex top-visible, a frame parameter +@vindex top-visible@r{, a frame parameter} @item top-visible If this parameter is a number, the top edge of the frame never appears above the top edge of its display or parent frame. Moreover, as many @@ -2010,7 +2010,7 @@ dragging a child frame with a non-@code{nil} @code{drag-with-header-line} parameter completely out of the area of its parent frame. -@vindex bottom-visible, a frame parameter +@vindex bottom-visible@r{, a frame parameter} @item bottom-visible If this parameter is a number, the bottom edge of the frame never appears below the bottom edge of its display or parent frame. Moreover, @@ -2032,66 +2032,66 @@ interaction with the window manager or window system. They have no effect on text terminals. @table @code -@vindex visibility, a frame parameter +@vindex visibility@r{, a frame parameter} @item visibility The state of visibility of the frame. There are three possibilities: @code{nil} for invisible, @code{t} for visible, and @code{icon} for iconified. @xref{Visibility of Frames}. -@vindex auto-raise, a frame parameter +@vindex auto-raise@r{, a frame parameter} @item auto-raise If non-@code{nil}, Emacs automatically raises the frame when it is selected. Some window managers do not allow this. -@vindex auto-lower, a frame parameter +@vindex auto-lower@r{, a frame parameter} @item auto-lower If non-@code{nil}, Emacs automatically lowers the frame when it is deselected. Some window managers do not allow this. -@vindex icon-type, a frame parameter +@vindex icon-type@r{, a frame parameter} @item icon-type The type of icon to use for this frame. If the value is a string, that specifies a file containing a bitmap to use; @code{nil} specifies no icon (in which case the window manager decides what to show); any other non-@code{nil} value specifies the default Emacs icon. -@vindex icon-name, a frame parameter +@vindex icon-name@r{, a frame parameter} @item icon-name The name to use in the icon for this frame, when and if the icon appears. If this is @code{nil}, the frame's title is used. -@vindex window-id, a frame parameter +@vindex window-id@r{, a frame parameter} @item window-id The ID number which the graphical display uses for this frame. Emacs assigns this parameter when the frame is created; changing the parameter has no effect on the actual ID number. -@vindex outer-window-id, a frame parameter +@vindex outer-window-id@r{, a frame parameter} @item outer-window-id The ID number of the outermost window-system window in which the frame exists. As with @code{window-id}, changing this parameter has no actual effect. -@vindex wait-for-wm, a frame parameter +@vindex wait-for-wm@r{, a frame parameter} @item wait-for-wm If non-@code{nil}, tell Xt to wait for the window manager to confirm geometry changes. Some window managers, including versions of Fvwm2 and KDE, fail to confirm, so Xt hangs. Set this to @code{nil} to prevent hanging with those window managers. -@vindex sticky, a frame parameter +@vindex sticky@r{, a frame parameter} @item sticky If non-@code{nil}, the frame is visible on all virtual desktops on systems with virtual desktops. -@vindex inhibit-double-buffering, a frame parameter +@vindex inhibit-double-buffering@r{, a frame parameter} @item inhibit-double-buffering If non-@code{nil}, the frame is drawn to the screen without double buffering. Emacs normally attempts to use double buffering, where available, to reduce flicker. Set this property if you experience display bugs or pine for that retro, flicker-y feeling. -@vindex skip-taskbar, a frame parameter +@vindex skip-taskbar@r{, a frame parameter} @item skip-taskbar If non-@code{nil}, this tells the window manager to remove the frame's icon from the taskbar associated with the frame's display and inhibit @@ -2100,13 +2100,13 @@ On MS-Windows, iconifying such a frame will "roll in" its window-system window at the bottom of the desktop. Some window managers may not honor this parameter. -@vindex no-focus-on-map, a frame parameter +@vindex no-focus-on-map@r{, a frame parameter} @item no-focus-on-map If non-@code{nil}, this means that the frame does not want to receive input focus when it is mapped (@pxref{Visibility of Frames}). Some window managers may not honor this parameter. -@vindex no-accept-focus, a frame parameter +@vindex no-accept-focus@r{, a frame parameter} @item no-accept-focus If non-@code{nil}, this means that the frame does not want to receive input focus via explicit mouse clicks or when moving the mouse into it @@ -2116,7 +2116,7 @@ This may have the unwanted side-effect that a user cannot scroll a non-selected frame with the mouse. Some window managers may not honor this parameter. -@vindex undecorated, a frame parameter +@vindex undecorated@r{, a frame parameter} @item undecorated If non-@code{nil}, this frame's window-system window is drawn without decorations, like the title, minimize/maximize boxes and external @@ -2131,7 +2131,7 @@ decorations. Some window managers may not honor these hints. NS builds consider the tool bar to be a decoration, and therefore hide it on an undecorated frame. -@vindex override-redirect, a frame parameter +@vindex override-redirect@r{, a frame parameter} @item override-redirect @cindex override redirect frames If non-@code{nil}, this means that this is an @dfn{override redirect} @@ -2142,7 +2142,7 @@ usually drawn on top of all other frames. Setting this parameter has no effect on MS-Windows. @ignore -@vindex parent-id, a frame parameter +@vindex parent-id@r{, a frame parameter} @item parent-id @c ??? Not yet working. The X window number of the window that should be the parent of this one. @@ -2151,7 +2151,7 @@ application's window. (It is not certain this will be implemented; try it and see if it works.) @end ignore -@vindex ns-appearance, a frame parameter +@vindex ns-appearance@r{, a frame parameter} @item ns-appearance Only available on macOS, if set to @code{dark} draw this frame's window-system window using the ``vibrant dark'' theme, otherwise use @@ -2159,7 +2159,7 @@ the system default. The ``vibrant dark'' theme can be used to set the toolbar and scrollbars to a dark appearance when using an Emacs theme with a dark background. -@vindex ns-transparent-titlebar, a frame parameter +@vindex ns-transparent-titlebar@r{, a frame parameter} @item ns-transparent-titlebar Only available on macOS, if non-@code{nil}, set the titlebar and toolbar to be transparent. This effectively sets the background color @@ -2174,7 +2174,7 @@ of both to match the Emacs background color. This frame parameter controls the way the cursor looks. @table @code -@vindex cursor-type, a frame parameter +@vindex cursor-type@r{, a frame parameter} @item cursor-type How to display the cursor. Legitimate values are: @@ -2252,7 +2252,7 @@ variable do not take effect immediately, only when you specify the These frame parameters control the use of fonts and colors. @table @code -@vindex font-backend, a frame parameter +@vindex font-backend@r{, a frame parameter} @item font-backend A list of symbols, specifying the @dfn{font backends} to use for drawing fonts in the frame, in order of priority. On X, there are @@ -2263,12 +2263,12 @@ currently two available font backends: @code{gdi} and Manual}). On other systems, there is only one available font backend, so it does not make sense to modify this frame parameter. -@vindex background-mode, a frame parameter +@vindex background-mode@r{, a frame parameter} @item background-mode This parameter is either @code{dark} or @code{light}, according to whether the background color is a light one or a dark one. -@vindex tty-color-mode, a frame parameter +@vindex tty-color-mode@r{, a frame parameter} @item tty-color-mode @cindex standard colors for character terminals This parameter overrides the terminal's color support as given by the @@ -2284,7 +2284,7 @@ If the parameter's value is a symbol, it specifies a number through the value of @code{tty-color-mode-alist}, and the associated number is used instead. -@vindex screen-gamma, a frame parameter +@vindex screen-gamma@r{, a frame parameter} @item screen-gamma @cindex gamma correction If this is a number, Emacs performs gamma correction which adjusts @@ -2304,7 +2304,7 @@ If your monitor displays colors too light, you should specify a that makes colors darker. A screen gamma value of 1.5 may give good results for LCD color displays. -@vindex alpha, a frame parameter +@vindex alpha@r{, a frame parameter} @item alpha @cindex opacity, frame @cindex transparency, frame @@ -2335,45 +2335,45 @@ automatically equivalent to particular face attributes of particular faces (@pxref{Standard Faces,,, emacs, The Emacs Manual}): @table @code -@vindex font, a frame parameter +@vindex font@r{, a frame parameter} @item font The name of the font for displaying text in the frame. This is a string, either a valid font name for your system or the name of an Emacs fontset (@pxref{Fontsets}). It is equivalent to the @code{font} attribute of the @code{default} face. -@vindex foreground-color, a frame parameter +@vindex foreground-color@r{, a frame parameter} @item foreground-color The color to use for the image of a character. It is equivalent to the @code{:foreground} attribute of the @code{default} face. -@vindex background-color, a frame parameter +@vindex background-color@r{, a frame parameter} @item background-color The color to use for the background of characters. It is equivalent to the @code{:background} attribute of the @code{default} face. -@vindex mouse-color, a frame parameter +@vindex mouse-color@r{, a frame parameter} @item mouse-color The color for the mouse pointer. It is equivalent to the @code{:background} attribute of the @code{mouse} face. -@vindex cursor-color, a frame parameter +@vindex cursor-color@r{, a frame parameter} @item cursor-color The color for the cursor that shows point. It is equivalent to the @code{:background} attribute of the @code{cursor} face. -@vindex border-color, a frame parameter +@vindex border-color@r{, a frame parameter} @item border-color The color for the border of the frame. It is equivalent to the @code{:background} attribute of the @code{border} face. -@vindex scroll-bar-foreground, a frame parameter +@vindex scroll-bar-foreground@r{, a frame parameter} @item scroll-bar-foreground If non-@code{nil}, the color for the foreground of scroll bars. It is equivalent to the @code{:foreground} attribute of the @code{scroll-bar} face. -@vindex scroll-bar-background, a frame parameter +@vindex scroll-bar-background@r{, a frame parameter} @item scroll-bar-background If non-@code{nil}, the color for the background of scroll bars. It is equivalent to the @code{:background} attribute of the diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi index 42be60449d..5dbdbdb943 100644 --- a/doc/lispref/os.texi +++ b/doc/lispref/os.texi @@ -1301,7 +1301,7 @@ or rounding errors occur. @section Time Zone Rules @cindex time zone rules -@vindex TZ, environment variable +@vindex TZ@r{, environment variable} The default time zone is determined by the @env{TZ} environment variable. @xref{System Environment}. For example, you can tell Emacs to default to Universal Time with @code{(setenv "TZ" "UTC0")}. If diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi index 687d597192..75651b99fd 100644 --- a/doc/lispref/windows.texi +++ b/doc/lispref/windows.texi @@ -5014,43 +5014,43 @@ code: @table @code @item delete-window -@vindex delete-window, a window parameter +@vindex delete-window@r{, a window parameter} This parameter affects the execution of @code{delete-window} (@pxref{Deleting Windows}). @item delete-other-windows -@vindex delete-other-windows, a window parameter +@vindex delete-other-windows@r{, a window parameter} This parameter affects the execution of @code{delete-other-windows} (@pxref{Deleting Windows}). @item no-delete-other-windows -@vindex no-delete-other-windows, a window parameter +@vindex no-delete-other-windows@r{, a window parameter} This parameter marks the window as not deletable by @code{delete-other-windows} (@pxref{Deleting Windows}). @item split-window -@vindex split-window, a window parameter +@vindex split-window@r{, a window parameter} This parameter affects the execution of @code{split-window} (@pxref{Splitting Windows}). @item other-window -@vindex other-window, a window parameter +@vindex other-window@r{, a window parameter} This parameter affects the execution of @code{other-window} (@pxref{Cyclic Window Ordering}). @item no-other-window -@vindex no-other-window, a window parameter +@vindex no-other-window@r{, a window parameter} This parameter marks the window as not selectable by @code{other-window} (@pxref{Cyclic Window Ordering}). @item clone-of -@vindex clone-of, a window parameter +@vindex clone-of@r{, a window parameter} This parameter specifies the window that this one has been cloned from. It is installed by @code{window-state-get} (@pxref{Window Configurations}). @item window-preserved-size -@vindex window-preserved-size, a window parameter +@vindex window-preserved-size@r{, a window parameter} This parameter specifies a buffer, a direction where @code{nil} means vertical and @code{t} horizontal, and a size in pixels. If this window displays the specified buffer and its size in the indicated direction @@ -5060,7 +5060,7 @@ parameter is installed and updated by the function @code{window-preserve-size} (@pxref{Preserving Window Sizes}). @item quit-restore -@vindex quit-restore, a window parameter +@vindex quit-restore@r{, a window parameter} This parameter is installed by the buffer display functions (@pxref{Choosing Window}) and consulted by @code{quit-restore-window} (@pxref{Quitting Windows}). It contains four elements: @@ -5092,18 +5092,18 @@ See the description of @code{quit-restore-window} in @ref{Quitting Windows} for details. @item window-side window-slot -@vindex window-side, a window parameter -@vindex window-slot, a window parameter +@vindex window-side@r{, a window parameter} +@vindex window-slot@r{, a window parameter} These parameters are used for implementing side windows (@pxref{Side Windows}). @item window-atom -@vindex window-atom, a window parameter +@vindex window-atom@r{, a window parameter} This parameter is used for implementing atomic windows, see @ref{Atomic Windows}. @item mode-line-format -@vindex mode-line-format, a window parameter +@vindex mode-line-format@r{, a window parameter} This parameter replaces the value of the buffer-local variable @code{mode-line-format} (@pxref{Mode Line Basics}) of this window's buffer whenever this window is displayed. The symbol @code{none} means @@ -5112,7 +5112,7 @@ contents of the mode line on other windows showing this buffer are not affected. @item header-line-format -@vindex header-line-format, a window parameter +@vindex header-line-format@r{, a window parameter} This parameter replaces the value of the buffer-local variable @code{header-line-format} (@pxref{Mode Line Basics}) of this window's buffer whenever this window is displayed. The symbol @code{none} means @@ -5121,7 +5121,7 @@ contents of the header line on other windows showing this buffer are not affected. @item min-margins -@vindex min-margins, a window parameter +@vindex min-margins@r{, a window parameter} The value of this parameter is a cons cell whose @sc{car} and @sc{cdr}, if non-@code{nil}, specify the minimum values (in columns) for the left and right margin of this window. When present, Emacs will use these diff --git a/doc/misc/cc-mode.texi b/doc/misc/cc-mode.texi index 2de56fa05c..151b512cb1 100644 --- a/doc/misc/cc-mode.texi +++ b/doc/misc/cc-mode.texi @@ -576,7 +576,7 @@ for the latest information on Emacs version and package compatibility (@pxref{Updating CC Mode}). @deffn Command c-version -@findex version (c-) +@findex version @r{(c-)} You can find out what version of @ccmode{} you are using by visiting a C file and entering @kbd{M-x c-version RET}. You should see this message in the echo area: @@ -673,7 +673,7 @@ These commands indent code: @item @kbd{@key{TAB}} (@code{c-indent-command}) @kindex TAB @findex c-indent-command -@findex indent-command (c-) +@findex indent-command @r{(c-)} This command indents the current line. That is all you need to know about it for normal use. @@ -707,7 +707,7 @@ you want only spaces. @xref{Just Spaces,,,@emacsman{}, @emacsmantitle{}}. @defopt c-tab-always-indent -@vindex tab-always-indent (c-) +@vindex tab-always-indent @r{(c-)} @cindex literal This variable modifies how @key{TAB} operates. @itemize @bullet @@ -726,7 +726,7 @@ is within a string or comment, some whitespace is inserted. @end defopt @defopt c-insert-tab-function -@vindex insert-tab-function (c-) +@vindex insert-tab-function @r{(c-)} @findex tab-to-tab-stop When ``some whitespace'' is inserted as described above, what actually happens is that the function stored in @code{c-insert-tab-function} is @@ -756,7 +756,7 @@ very useful in this case. @item @kbd{C-M-q} (@code{c-indent-exp}) @kindex C-M-q @findex c-indent-exp -@findex indent-exp (c-) +@findex indent-exp @r{(c-)} Indents an entire balanced brace or parenthesis expression. Note that point must be on the opening brace or parenthesis of the expression you want to indent. @@ -764,7 +764,7 @@ you want to indent. @item @kbd{C-c C-q} (@code{c-indent-defun}) @kindex C-c C-q @findex c-indent-defun -@findex indent-defun (c-) +@findex indent-defun @r{(c-)} Indents the entire top-level function, class or macro definition encompassing point. It leaves point unchanged. This function can't be used to reindent a nested brace construct, such as a nested class or @@ -782,7 +782,7 @@ and mark must delineate the region you want to indent. @item @kbd{C-M-h} (@code{c-mark-function}) @kindex C-M-h @findex c-mark-function -@findex mark-function (c-) +@findex mark-function @r{(c-)} While not strictly an indentation command, this is useful for marking the current top-level function or class definition as the current region. As with @code{c-indent-defun}, this command operates on @@ -798,7 +798,7 @@ indentation, otherwise only spaces are used. @end defopt @defopt c-progress-interval -@vindex progress-interval (c-) +@vindex progress-interval @r{(c-)} When indenting large regions of code, this variable controls how often a progress message is displayed. Set this variable to @code{nil} to inhibit the progress messages, or set it to an integer which is how @@ -845,7 +845,7 @@ together with any whitespace before it. This is a standard Emacs command, but @ccmode{} enhances it a bit with two variables: @defopt c-indent-comment-alist -@vindex indent-comment-alist (c-) +@vindex indent-comment-alist @r{(c-)} @vindex comment-column This style variable allows you to vary the column that @kbd{M-;} puts the comment at, depending on what sort of code is on the line, and @@ -860,7 +860,7 @@ variable (use @kbd{C-h v c-indent-comment-alist}). @end defopt @defopt c-indent-comments-syntactically-p -@vindex indent-comments-syntactically-p (c-) +@vindex indent-comments-syntactically-p @r{(c-)} Normally, when this style variable is @code{nil}, @kbd{M-;} will indent comment-only lines according to @code{c-indent-comment-alist}, just as it does with lines where other code precede the comments. @@ -889,7 +889,7 @@ lines. @findex c-beginning-of-defun @findex c-end-of-defun @vindex c-defun-tactic -@vindex defun-tactic (c-) +@vindex defun-tactic @r{(c-)} Move to the beginning or end of the current or next function. Other constructs (such as a structs or classes) which have a brace block @@ -923,9 +923,9 @@ must be in column zero. See @ref{Defuns,,,@emacsman{}, @kindex C-M-a (AWK Mode) @kindex C-M-e (AWK Mode) @findex c-awk-beginning-of-defun -@findex awk-beginning-of-defun (c-) +@findex awk-beginning-of-defun @r{(c-)} @findex c-awk-end-of-defun -@findex awk-end-of-defun (c-) +@findex awk-end-of-defun @r{(c-)} Move to the beginning or end of the current or next AWK defun. These commands can take prefix-arguments, their functionality being entirely equivalent to @code{beginning-of-defun} and @code{end-of-defun}. @@ -941,8 +941,8 @@ modes, is neither necessary nor helpful in AWK mode. @kindex M-e @findex c-beginning-of-statement @findex c-end-of-statement -@findex beginning-of-statement (c-) -@findex end-of-statement (c-) +@findex beginning-of-statement @r{(c-)} +@findex end-of-statement @r{(c-)} Move to the beginning or end of the innermost C statement. If point is already there, move to the next beginning or end of a statement, even if that means moving into a block. (Use @kbd{C-M-b} or @@ -961,7 +961,7 @@ strings. @item @kbd{C-c C-u} (@code{c-up-conditional}) @kindex C-c C-u @findex c-up-conditional -@findex up-conditional (c-) +@findex up-conditional @r{(c-)} Move back to the containing preprocessor conditional, leaving the mark behind. A prefix argument acts as a repeat count. With a negative argument, move forward to the end of the containing preprocessor @@ -976,13 +976,13 @@ preprocessor statements. @item @kbd{M-x c-up-conditional-with-else} @findex c-up-conditional-with-else -@findex up-conditional-with-else (c-) +@findex up-conditional-with-else @r{(c-)} A variety of @code{c-up-conditional} that also stops at @samp{#else} lines. Normally those lines are ignored. @item @kbd{M-x c-down-conditional} @findex c-down-conditional -@findex down-conditional (c-) +@findex down-conditional @r{(c-)} Move forward into the next nested preprocessor conditional, leaving the mark behind. A prefix argument acts as a repeat count. With a negative argument, move backward into the previous nested preprocessor @@ -993,7 +993,7 @@ function stops at them when going forward, but not when going backward. @item @kbd{M-x c-down-conditional-with-else} @findex c-down-conditional-with-else -@findex down-conditional-with-else (c-) +@findex down-conditional-with-else @r{(c-)} A variety of @code{c-down-conditional} that also stops at @samp{#else} lines. Normally those lines are ignored. @@ -1003,8 +1003,8 @@ lines. Normally those lines are ignored. @kindex C-c C-n @findex c-backward-conditional @findex c-forward-conditional -@findex backward-conditional (c-) -@findex forward-conditional (c-) +@findex backward-conditional @r{(c-)} +@findex forward-conditional @r{(c-)} Move backward or forward across a preprocessor conditional, leaving the mark behind. A prefix argument acts as a repeat count. With a negative argument, move in the opposite direction. @@ -1016,8 +1016,8 @@ preprocessor statements. @itemx @kbd{M-x c-forward-into-nomenclature} @findex c-backward-into-nomenclature @findex c-forward-into-nomenclature -@findex backward-into-nomenclature (c-) -@findex forward-into-nomenclature (c-) +@findex backward-into-nomenclature @r{(c-)} +@findex forward-into-nomenclature @r{(c-)} A popular programming style, especially for object-oriented languages such as C++ is to write symbols in a mixed case format, where the first letter of each word is capitalized, and not separated by @@ -1070,7 +1070,7 @@ and @pxref{Customizing Indentation})}. @item @kbd{M-q} (@code{c-fill-paragraph}) @kindex M-q @findex c-fill-paragraph -@findex fill-paragraph (c-) +@findex fill-paragraph @r{(c-)} @cindex Javadoc markup @cindex Pike autodoc markup This command fills multiline string literals and both block @@ -1090,7 +1090,7 @@ buffers. @item @kbd{M-j} (@code{c-indent-new-comment-line}) @kindex M-j @findex c-indent-new-comment-line -@findex indent-new-comment-line (c-) +@findex indent-new-comment-line @r{(c-)} This breaks the current line at point and indents the new line. If point was in a comment, the new line gets the proper comment line prefix. If point was inside a macro, a backslash is inserted before @@ -1099,7 +1099,7 @@ the line break. It is the replacement for @item @kbd{M-x c-context-line-break} @findex c-context-line-break -@findex context-line-break (c-) +@findex context-line-break @r{(c-)} Insert a line break suitable to the context: If the point is inside a comment, the new line gets the suitable indentation and comment line prefix like @code{c-indent-new-comment-line}. In normal code it's @@ -1118,7 +1118,7 @@ this function. @xref{Sample Init File}. @item @kbd{M-x c-context-open-line} @findex c-context-open-line -@findex context-open-line (c-) +@findex context-open-line @r{(c-)} This is to @kbd{C-o} (@kbd{M-x open-line}) as @code{c-context-line-break} is to @kbd{RET}. I.e., it works just like @code{c-context-line-break} but leaves the point before the inserted @@ -1196,7 +1196,7 @@ Here are the commands to toggle these modes: @item @kbd{C-c C-k} (@code{c-toggle-comment-style}) @kindex C-c C-k @findex c-toggle-comment-style -@findex toggle-comment-style (c-) +@findex toggle-comment-style @r{(c-)} Toggle the comment style between line style and block style. In modes (such as AWK Mode) which only have one of these styles, this function does nothing. @@ -1204,25 +1204,25 @@ does nothing. @item @kbd{C-c C-l} (@code{c-toggle-electric-state}) @kindex C-c C-l @findex c-toggle-electric-state -@findex toggle-electric-state (c-) +@findex toggle-electric-state @r{(c-)} Toggle electric minor mode. When the command turns the mode off, it also suppresses auto-newline mode. @item @kbd{C-c C-a} (@code{c-toggle-auto-newline}) @kindex C-c C-a @findex c-toggle-auto-newline -@findex toggle-auto-newline (c-) +@findex toggle-auto-newline @r{(c-)} Toggle auto-newline minor mode. When the command turns the mode on, it also enables electric minor mode. @item @kbd{M-x c-toggle-hungry-state}@footnote{Prior to @ccmode{} 5.31, this command was bound to @kbd{C-c C-d}.} @findex c-toggle-hungry-state -@findex toggle-hungry-state (c-) +@findex toggle-hungry-state @r{(c-)} Toggle hungry-delete minor mode. @item @kbd{M-x c-toggle-auto-hungry-state}@footnote{Prior to @ccmode{} 5.31, this command was bound to @kbd{C-c C-t}.} @findex c-toggle-auto-hungry-state -@findex toggle-auto-hungry-state (c-) +@findex toggle-auto-hungry-state @r{(c-)} Toggle both auto-newline and hungry delete minor modes. @item @kbd{C-c C-w} (@code{M-x subword-mode}) @@ -1232,7 +1232,7 @@ Toggle subword mode. @item @kbd{M-x c-toggle-syntactic-indentation} @findex c-toggle-syntactic-indentation -@findex toggle-syntactic-indentation (c-) +@findex toggle-syntactic-indentation @r{(c-)} Toggle syntactic-indentation mode. @end table @@ -1276,9 +1276,9 @@ These keys and keywords are: @item # @kindex # @findex c-electric-pound -@findex electric-pound (c-) +@findex electric-pound @r{(c-)} @vindex c-electric-pound-behavior -@vindex electric-pound-behavior (c-) +@vindex electric-pound-behavior @r{(c-)} Pound (bound to @code{c-electric-pound}) is electric when typed as the first non-whitespace character on a line and not within a macro definition. In this case, the variable @code{c-electric-pound-behavior} @@ -1298,9 +1298,9 @@ character. @itemx / @kindex / @findex c-electric-star -@findex electric-star (c-) +@findex electric-star @r{(c-)} @findex c-electric-slash -@findex electric-slash (c-) +@findex electric-slash @r{(c-)} A star (bound to @code{c-electric-star}) or a slash (@code{c-electric-slash}) causes reindentation when you type it as the second component of a C style block comment opener (@samp{/*}) or a @@ -1321,7 +1321,7 @@ electric. @itemx > @kindex > @findex c-electric-lt-gt -@findex electric-lt-gt (c-) +@findex electric-lt-gt @r{(c-)} A less-than or greater-than sign (bound to @code{c-electric-lt-gt}) is electric in two circumstances: when it is an angle bracket in a C++ @samp{template} declaration (and similar constructs in other @@ -1335,7 +1335,7 @@ electric. @itemx ) @kindex ) @findex c-electric-paren -@findex electric-paren (c-) +@findex electric-paren @r{(c-)} The normal parenthesis characters @samp{(} and @samp{)} (bound to @code{c-electric-paren}) reindent the current line. This is useful for getting the closing parenthesis of an argument list aligned @@ -1352,7 +1352,7 @@ get these actions. @xref{Clean-ups}. @itemx @} @kindex @} @findex c-electric-brace -@findex electric-brace (c-) +@findex electric-brace @r{(c-)} Typing a brace (bound to @code{c-electric-brace}) reindents the current line. Also, one or more newlines might be inserted if auto-newline minor mode is enabled. @xref{Auto-newlines}. @@ -1363,7 +1363,7 @@ inserted by auto-newline mode in certain circumstances. @item : @kindex : @findex c-electric-colon -@findex electric-colon (c-) +@findex electric-colon @r{(c-)} Typing a colon (bound to @code{c-electric-colon}) reindents the current line. Additionally, one or more newlines might be inserted if auto-newline minor mode is enabled. @xref{Auto-newlines}. If you @@ -1380,7 +1380,7 @@ avoiding all these spurious reindentations, newlines, and clean-ups. @itemx , @kindex , @findex c-electric-semi&comma -@findex electric-semi&comma (c-) +@findex electric-semi&comma @r{(c-)} Typing a semicolon or comma (bound to @code{c-electric-semi&comma}) reindents the current line. Also, a newline might be inserted if auto-newline minor mode is enabled. @xref{Auto-newlines}. @@ -1391,7 +1391,7 @@ when you type a semicolon or comma just after it. @xref{Clean-ups}. @end table @deffn Command c-electric-continued-statement -@findex electric-continued-statement (c-) +@findex electric-continued-statement @r{(c-)} Certain keywords are electric, causing reindentation when they are preceded only by whitespace on the line. The keywords are those that @@ -1520,7 +1520,7 @@ deletion. @item @kbd{@key{DEL}} (@code{c-electric-backspace}) @kindex DEL @findex c-electric-backspace -@findex electric-backspace (c-) +@findex electric-backspace @r{(c-)} This command is run by default when you hit the @kbd{DEL} key. When hungry delete mode is enabled, it deletes any amount of whitespace in the backwards direction. Otherwise, or when used with a prefix @@ -1531,7 +1531,7 @@ passing it the prefix argument, if any.) @item @code{c-backspace-function} @vindex c-backspace-function -@vindex backspace-function (c-) +@vindex backspace-function @r{(c-)} @findex backward-delete-char-untabify Hook that gets called by @code{c-electric-backspace} when it doesn't do an ``electric'' deletion of the preceding whitespace. The default @@ -1542,7 +1542,7 @@ deletes a single character. @item @kbd{C-d} (@code{c-electric-delete-forward}) @kindex C-d @findex c-electric-delete-forward -@findex electric-delete-forward (c-) +@findex electric-delete-forward @r{(c-)} This function, which is bound to @kbd{C-d} by default, works just like @code{c-electric-backspace} but in the forward direction. When it doesn't do an ``electric'' deletion of the following whitespace, it @@ -1552,7 +1552,7 @@ argument.) @item @code{c-delete-function} @vindex c-delete-function -@vindex delete-function (c-) +@vindex delete-function @r{(c-)} @findex delete-char Hook that gets called by @code{c-electric-delete-forward} when it doesn't do an ``electric'' deletion of the following whitespace. The @@ -1572,7 +1572,7 @@ rather than using the minor mode toggling. @kindex C-c C-DEL @kindex C-c DEL @findex c-hungry-delete-backwards -@findex hungry-delete-backwards (c-) +@findex hungry-delete-backwards @r{(c-)} Delete any amount of whitespace in the backwards direction (regardless whether hungry-delete mode is enabled or not). This command is bound to both @kbd{C-c C-@key{DEL}} and @kbd{C-c @key{DEL}}, since the more @@ -1584,7 +1584,7 @@ a character terminal. @kindex C-c C- @kindex C-c @findex c-hungry-delete-forward -@findex hungry-delete-forward (c-) +@findex hungry-delete-forward @r{(c-)} Delete any amount of whitespace in the forward direction (regardless whether hungry-delete mode is enabled or not). This command is bound to both @kbd{C-c C-@key{DELETE}} and @kbd{C-c @key{DELETE}} for the @@ -1601,9 +1601,9 @@ known as @key{Backspace} and @key{Delete}. The default bindings to those two keys depends on the flavor of (X)Emacs you are using. @findex c-electric-delete -@findex electric-delete (c-) +@findex electric-delete @r{(c-)} @findex c-hungry-delete -@findex hungry-delete (c-) +@findex hungry-delete @r{(c-)} @vindex delete-key-deletes-forward In XEmacs 20.3 and beyond, the @key{Backspace} key is bound to @code{c-electric-backspace} and the @key{Delete} key is bound to @@ -1678,23 +1678,23 @@ editing commands with variants that recognize subwords in a nomenclature and treat them as separate words: @findex c-forward-subword -@findex forward-subword (c-) +@findex forward-subword @r{(c-)} @findex c-backward-subword -@findex backward-subword (c-) +@findex backward-subword @r{(c-)} @findex c-mark-subword -@findex mark-subword (c-) +@findex mark-subword @r{(c-)} @findex c-kill-subword -@findex kill-subword (c-) +@findex kill-subword @r{(c-)} @findex c-backward-kill-subword -@findex backward-kill-subword (c-) +@findex backward-kill-subword @r{(c-)} @findex c-transpose-subwords -@findex transpose-subwords (c-) +@findex transpose-subwords @r{(c-)} @findex c-capitalize-subword -@findex capitalize-subword (c-) +@findex capitalize-subword @r{(c-)} @findex c-upcase-subword -@findex upcase-subword (c-) +@findex upcase-subword @r{(c-)} @findex c-downcase-subword -@findex downcase-subword (c-) +@findex downcase-subword @r{(c-)} @multitable @columnfractions .20 .40 .40 @c This could be converted to @headitem when we require Texinfo 4.7 @iftex @@ -1744,7 +1744,7 @@ Here are the various other commands that didn't fit anywhere else: @item @kbd{C-c .} (@code{c-set-style}) @kindex C-c . @findex c-set-style -@findex set-style (c-) +@findex set-style @r{(c-)} Switch to the specified style in the current buffer. Use like this: @example @@ -1764,7 +1764,7 @@ For details of the @ccmode{} style system, see @ref{Styles}. @item @kbd{C-c :} (@code{c-scope-operator}) @kindex C-c : @findex c-scope-operator -@findex scope-operator (c-) +@findex scope-operator @r{(c-)} In C++, it is also sometimes desirable to insert the double-colon scope operator without performing the electric behavior of colon insertion. @kbd{C-c :} does just this. @@ -1772,7 +1772,7 @@ operator without performing the electric behavior of colon insertion. @item @kbd{C-c C-z} (@code{c-display-defun-name}) @kindex C-c C-z @findex c-display-defun-name -@findex display-defun-name (c-) +@findex display-defun-name @r{(c-)} Display the current function name, if any, in the minibuffer. Additionally, if a prefix argument is given, push the function name to the kill ring. If there is no current function, @@ -1784,7 +1784,7 @@ customizable option @code{isearch-allow-scroll} to non-@code{nil}. @item @kbd{C-c C-\} (@code{c-backslash-region}) @kindex C-c C-\ @findex c-backslash-region -@findex backslash-region (c-) +@findex backslash-region @r{(c-)} This function inserts and aligns or deletes end-of-line backslashes in the current region. These are typically used in multi-line macros. @@ -1814,7 +1814,7 @@ with the trailing backslashes. @item @kbd{C-c C-e} (@code{c-macro-expand}) @kindex C-c C-e @findex c-macro-expand -@findex macro-expand (c-) +@findex macro-expand @r{(c-)} This command expands C, C++, Objective C or Pike macros in the region, using an appropriate external preprocessor program. Normally it displays its output in a temporary buffer, but if you give it a prefix @@ -2046,7 +2046,7 @@ or @code{font-lock-reference-face}, for lack of a closer equivalent. @item @vindex font-lock-warning-face @vindex c-invalid-face -@vindex invalid-face (c-) +@vindex invalid-face @r{(c-)} Some kinds of syntactic errors are fontified with @code{font-lock-warning-face} in Emacs. In older XEmacs versions there's no corresponding standard face, so there a special @@ -2071,7 +2071,7 @@ specially structured comments, e.g., the standard Javadoc tool in Java. the special markup inside them. @defopt c-doc-comment-style -@vindex doc-comment-style (c-) +@vindex doc-comment-style @r{(c-)} This is a style variable that specifies which documentation comment style to recognize, e.g., @code{javadoc} for Javadoc comments. @@ -2096,7 +2096,7 @@ to do @kbd{M-x java-mode} (or whatever mode you're currently using) to reinitialize. @findex c-setup-doc-comment-style -@findex setup-doc-comment-style (c-) +@findex setup-doc-comment-style @r{(c-)} Note also that when @ccmode{} starts up, the other variables are modified before the mode hooks are run. If you change this variable in a mode hook, you'll have to call @code{c-setup-doc-comment-style} @@ -2163,7 +2163,7 @@ foo& bar @code{c-asymmetry-fontification-flag}. @defvar c-asymmetry-fontification-flag -@vindex asymmetry-fontification-flag (c-) +@vindex asymmetry-fontification-flag @r{(c-)} When @code{c-asymmetry-fontification-flag} is non-nil (which it is by default), code like the above, with white space either before or after the operator, but not both, is fontified as a declaration. When the @@ -2461,14 +2461,14 @@ hook. Thus, any style settings done in these hooks will override those set by @code{c-default-style}. @defvar c-initialization-hook -@vindex initialization-hook (c-) +@vindex initialization-hook @r{(c-)} Hook run only once per Emacs session, when @ccmode{} is initialized. This is a good place to change key bindings (or add new ones) in any of the @ccmode{} key maps. @xref{Sample Init File}. @end defvar @defvar c-mode-common-hook -@vindex mode-common-hook (c-) +@vindex mode-common-hook @r{(c-)} Common hook across all languages. It's run immediately before the language specific hook. @end defvar @@ -2528,7 +2528,7 @@ initialized. @item @vindex c-old-style-variable-behavior -@vindex old-style-variable-behavior (c-) +@vindex old-style-variable-behavior @r{(c-)} The default global binding of any style variable (with two exceptions - see below) is the special symbol @code{set-from-style}. When the style system initializes a buffer-local copy of a style variable for a @@ -2724,7 +2724,7 @@ To set a buffer's style interactively, use the command @kbd{C-c .} list, @ref{File Styles}. @defopt c-default-style -@vindex default-style (c-) +@vindex default-style @r{(c-)} This variable specifies which style to install by default in new buffers. It takes either a style name string, or an association list of major mode symbols to style names: @@ -2757,7 +2757,7 @@ The standard value of @code{c-default-style} is @w{@code{((java-mode @end defopt @defvar c-indentation-style -@vindex indentation-style (c-) +@vindex indentation-style @r{(c-)} This variable always contains the buffer's current style name, as a string. @end defvar @@ -2827,7 +2827,7 @@ should never modify this variable directly. Instead, @ccmode{} provides the function @code{c-add-style} for this purpose. @defun c-add-style stylename description &optional set-p -@findex add-style (c-) +@findex add-style @r{(c-)} Add or update a style called @var{stylename}, a string. @var{description} is the new style definition in the form described above. If @var{stylename} already exists in @code{c-style-alist} then @@ -2845,7 +2845,7 @@ style can be added and automatically set. @xref{Sample Init File}. @end defun @defvar c-style-alist -@vindex style-alist (c-) +@vindex style-alist @r{(c-)} This is the variable that holds the definitions for the styles. It should not be changed directly; use @code{c-add-style} instead. @end defvar @@ -2881,9 +2881,9 @@ You can then set the guessed style in any @ccmode{} buffer with @findex c-guess-no-install @findex c-guess-buffer-no-install @findex c-guess-region-no-install -@findex guess-no-install (c-) -@findex guess-buffer-no-install (c-) -@findex guess-region-no-install (c-) +@findex guess-no-install @r{(c-)} +@findex guess-buffer-no-install @r{(c-)} +@findex guess-region-no-install @r{(c-)} These commands analyze a part of the current buffer and guess the style from it. @@ -2904,9 +2904,9 @@ guesses before forming the guessed style. @findex c-guess @findex c-guess-buffer @findex c-guess-region -@findex guess (c-) -@findex guess-buffer (c-) -@findex guess-region (c-) +@findex guess @r{(c-)} +@findex guess-buffer @r{(c-)} +@findex guess-region @r{(c-)} These commands analyze a part of the current buffer, guess the style from it, then install the guessed style on the buffer. The guessed style is given a name based on the buffer's absolute file name, and @@ -2922,14 +2922,14 @@ guesses before forming the guessed style. @end table @defopt c-guess-region-max -@vindex guess-region-max (c-) +@vindex guess-region-max @r{(c-)} This variable, default 50000, is the size in bytes of the buffer portion examined by c-guess and c-guess-no-install. If set to @code{nil}, the entire buffer is examined. @end defopt @defopt c-guess-offset-threshold -@vindex guess-offset-threshold (c-) +@vindex guess-offset-threshold @r{(c-)} This variable, default 10, is the maximum offset, either outwards or inwards, which will be taken into account by the analysis process. Any offset bigger than this will be ignored. For no limit, set this @@ -2939,7 +2939,7 @@ variable to a large number. @table @asis @item @kbd{M-x c-guess-install} @findex c-guess-install -@findex guess-install (c-) +@findex guess-install @r{(c-)} Set the current buffer's style to the guessed style. This prompts you to enter an optional new style name to give to the guessed style. By @@ -2948,7 +2948,7 @@ can then use this style like any other. @item @kbd{M-x c-guess-view} @findex c-guess-view -@findex guess-view (c-) +@findex guess-view @r{(c-)} Display the most recently guessed style in a temporary buffer. This display is in the form of a @code{c-add-style} form (@pxref{Adding Styles}) which can be easily copied to your @file{.emacs}. You will @@ -2994,14 +2994,14 @@ Don't use them anywhere else! These allow you to customize the style on a per-file basis: @defvar c-file-style -@vindex file-style (c-) +@vindex file-style @r{(c-)} Set this variable to a style name string in the Local Variables list. From now on, when you visit the file, @ccmode{} will automatically set the file's style to this one using @code{c-set-style}. @end defvar @defvar c-file-offsets -@vindex file-offsets (c-) +@vindex file-offsets @r{(c-)} Set this variable (in the Local Variables list) to an association list of the same format as @code{c-offsets-alist}. From now on, when you visit the file, @ccmode{} will automatically institute these offsets @@ -3034,7 +3034,7 @@ this by hooking in on the different line breaking functions and tuning relevant variables as necessary. @vindex c-comment-prefix-regexp -@vindex comment-prefix-regexp (c-) +@vindex comment-prefix-regexp @r{(c-)} @cindex comment line prefix @vindex comment-start @vindex comment-end @@ -3055,7 +3055,7 @@ variables@footnote{@code{comment-start}, @code{comment-end}, according to the language syntax and the comment line prefix. @defopt c-comment-prefix-regexp -@vindex comment-prefix-regexp (c-) +@vindex comment-prefix-regexp @r{(c-)} This style variable contains the regexp used to recognize the @dfn{comment line prefix}, which is the line decoration that starts every line in a comment. The variable is either the comment line @@ -3092,7 +3092,7 @@ this variable, please make sure it still matches the comment starter block comments. @findex c-setup-paragraph-variables -@findex setup-paragraph-variables (c-) +@findex setup-paragraph-variables @r{(c-)} Also note that since @ccmode{} uses the value of @code{c-comment-prefix-regexp} to set up several other variables at mode initialization, there won't be any effect if you just change it @@ -3128,7 +3128,7 @@ margins of the texts kept intact: @end example @findex c-setup-filladapt -@findex setup-filladapt (c-) +@findex setup-filladapt @r{(c-)} @findex filladapt-mode @vindex filladapt-mode @cindex Filladapt mode @@ -3153,9 +3153,9 @@ something like this in your @file{.emacs}: @end example @defopt c-block-comment-prefix -@vindex block-comment-prefix (c-) +@vindex block-comment-prefix @r{(c-)} @vindex c-comment-continuation-stars -@vindex comment-continuation-stars (c-) +@vindex comment-continuation-stars @r{(c-)} Normally the comment line prefix inserted for a new line inside a comment is deduced from other lines in it. However there's one situation when there's no hint about what the prefix should look like, @@ -3193,7 +3193,7 @@ most common comment styles, see @ref{Line-Up Functions}. @end defopt @defopt c-ignore-auto-fill -@vindex ignore-auto-fill (c-) +@vindex ignore-auto-fill @r{(c-)} When auto fill mode is enabled, @ccmode{} can selectively ignore it depending on the context the line break would occur in, e.g., to never break a line automatically inside a string literal. This variable @@ -3346,7 +3346,7 @@ newline both before and after the brace. In place of a is useful when the auto newlines depend on the code around the brace. @defopt c-hanging-braces-alist -@vindex hanging-braces-alist (c-) +@vindex hanging-braces-alist @r{(c-)} This variable is an association list which maps syntactic symbols to lists of places to insert a newline. @xref{Association @@ -3454,7 +3454,7 @@ themselves. @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @vindex c-hanging-braces-alist -@vindex hanging-braces-alist (c-) +@vindex hanging-braces-alist @r{(c-)} @cindex action functions Syntactic symbols aren't the only place where you can customize @ccmode{} with the lisp equivalent of callback functions. Remember @@ -3475,7 +3475,7 @@ some combination of @code{before} and @code{after}, including neither of them (i.e., @code{nil}). @defvar c-syntactic-context -@vindex syntactic-context (c-) +@vindex syntactic-context @r{(c-)} During the call to the indentation or brace hanging @var{action} function, this variable is bound to the full syntactic analysis list. This might be, for example, @samp{((block-close 73))}. Don't ever @@ -3528,7 +3528,7 @@ associate the @code{block-close} symbol with the @var{action} function @end example @findex c-snug-do-while -@findex snug-do-while (c-) +@findex snug-do-while @r{(c-)} This function simply looks to see if the brace closes a ``do-while'' clause and if so, returns the list @samp{(before)} indicating that a newline should be inserted before the brace, but not after it. @@ -3544,7 +3544,7 @@ that the brace appears on a line by itself. @cindex customization, colon hanging @vindex c-hanging-colons-alist -@vindex hanging-colons-alist (c-) +@vindex hanging-colons-alist @r{(c-)} Using a mechanism similar to brace hanging (@pxref{Hanging Braces}), colons can also be made to hang using the style variable @@ -3556,7 +3556,7 @@ syntactic symbol in the alist, no newlines are inserted around the newly typed colon. @defopt c-hanging-colons-alist -@vindex hanging-colons-alist (c-) +@vindex hanging-colons-alist @r{(c-)} @table @asis @item The Key: the syntactic symbol @@ -3589,7 +3589,7 @@ them are controlled by a different mechanism, called @dfn{clean-ups} in @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @defopt c-hanging-semi&comma-criteria -@vindex hanging-semi&comma-criteria (c-) +@vindex hanging-semi&comma-criteria @r{(c-)} This style variable takes a list of functions; these get called when you type a semicolon or comma. The functions are called in order without arguments. When these functions are entered, point is just @@ -3624,7 +3624,7 @@ semicolons, apart from those separating @code{for}-clause statements. @end defopt @defun c-semi&comma-no-newlines-before-nonblanks -@findex semi&comma-no-newlines-before-nonblanks (c-) +@findex semi&comma-no-newlines-before-nonblanks @r{(c-)} This is an example of a criteria function, provided by @ccmode{}. It prevents newlines from being inserted after semicolons when there is a non-blank following line. Otherwise, it makes no determination. To @@ -3644,9 +3644,9 @@ use, add this function to the front of the @end defun @defun c-semi&comma-inside-parenlist -@findex semi&comma-inside-parenlist (c-) +@findex semi&comma-inside-parenlist @r{(c-)} @defunx c-semi&comma-no-newlines-for-oneline-inliners -@findex semi&comma-no-newlines-for-oneline-inliners (c-) +@findex semi&comma-no-newlines-for-oneline-inliners @r{(c-)} The function @code{c-semi&comma-inside-parenlist} is what prevents newlines from being inserted inside the parenthesis list of @code{for} statements. In addition to @@ -3687,7 +3687,7 @@ of the construct, and (apart from @code{comment-close-slash}) when the construct does not occur within a literal (@pxref{Auto-newlines}). @defopt c-cleanup-list -@vindex cleanup-list (c-) +@vindex cleanup-list @r{(c-)} @cindex literal You configure @ccmode{}'s clean-ups by setting the style variable @@ -3870,7 +3870,7 @@ BEGIN @{FS = "\t"@} # use as a field separator @end example @defopt c-max-one-liner-length -@vindex max-one-liner-length (c-) +@vindex max-one-liner-length @r{(c-)} The maximum length of the resulting line for which the clean-up @code{one-liner-defun} will be triggered. This length is that of the entire line, including any leading whitespace and any trailing comment. Its @@ -3953,7 +3953,7 @@ it by setting @code{c-syntactic-indentation} to @code{nil}. (To set the variable interactively, @ref{Minor Modes}). @defopt c-syntactic-indentation -@vindex syntactic-indentation (c-) +@vindex syntactic-indentation @r{(c-)} When this is non-@code{nil} (which it is by default), the indentation of code is done according to its syntactic structure. When it's @code{nil}, every line is just indented to the same level as the @@ -3988,7 +3988,7 @@ Line-up functions (@pxref{Custom Line-Up}) or in functions on @code{c-special-indent-hook} (@pxref{Other Indentation}). @defun c-guess-basic-syntax -@findex guess-basic-syntax (c-) +@findex guess-basic-syntax @r{(c-)} Determine the syntactic context of the current line. @end defun @@ -4042,7 +4042,7 @@ report what the syntactic analysis is for the current line: @item @kbd{C-c C-s} (@code{c-show-syntactic-information}) @kindex C-c C-s @findex c-show-syntactic-information -@findex show-syntactic-information (c-) +@findex show-syntactic-information @r{(c-)} This command calculates the syntactic analysis of the current line and displays it in the minibuffer. The command also highlights the anchor position(s). @@ -4138,7 +4138,7 @@ anchor position. @cindex syntactic symbols, brief list @vindex c-offsets-alist -@vindex offsets-alist (c-) +@vindex offsets-alist @r{(c-)} This section is a complete list of the syntactic symbols which appear in the @code{c-offsets-alist} style variable, along with brief descriptions. The previous section (@pxref{Syntactic Analysis}) @@ -5284,7 +5284,7 @@ The simplest and most used kind of ``offset'' setting in @code{c-basic-offset}: @defopt c-basic-offset -@vindex basic-offset (c-) +@vindex basic-offset @r{(c-)} This style variable holds the basic offset between indentation levels. It's factory default is 4, but all the built-in styles set it themselves, to some value between 2 (for @code{gnu} style) and 8 (for @@ -5322,7 +5322,7 @@ indentation. Details of how to set it up, and its relationship to @ccmode{}'s style system are given in @ref{Style Variables}. @defopt c-offsets-alist -@vindex offsets-alist (c-) +@vindex offsets-alist @r{(c-)} This is an alist which associates an offset with each syntactic symbol. This @dfn{offset} is a rule specifying how to indent a line whose syntactic context matches the symbol. @xref{Syntactic @@ -5355,7 +5355,7 @@ of these kinds of offsets: @end defopt @deffn Command c-set-offset (@kbd{C-c C-o}) -@findex set-offset (c-) +@findex set-offset @r{(c-)} @kindex C-c C-o This command changes the entry for a syntactic symbol in the current binding of @code{c-offsets-alist}, or it inserts a new entry if there @@ -5470,7 +5470,7 @@ will be combined according to the method @code{first}. @end table @vindex c-strict-syntax-p -@vindex strict-syntax-p (c-) +@vindex strict-syntax-p @r{(c-)} If an offset specification evaluates to @code{nil}, then a relative offset of 0 (zero) is used@footnote{There is however a variable @code{c-strict-syntax-p} that when set to non-@code{nil} will cause an @@ -5575,7 +5575,7 @@ adjustments. @c Move this bit to "Styles" (2005/10/7) @deffn Command c-set-offset symbol offset -@findex set-offset (c-) +@findex set-offset @r{(c-)} @kindex C-c C-o This is the command bound to @kbd{C-c C-o}. It provides a convenient way to set offsets on @code{c-offsets-alist} both interactively (see @@ -5671,7 +5671,7 @@ The line-up functions here calculate the indentation for braces, parentheses and statements within brace blocks. @defun c-lineup-close-paren -@findex lineup-close-paren (c-) +@findex lineup-close-paren @r{(c-)} Line up the closing paren under its corresponding open paren if the open paren is followed by code. If the open paren ends its line, no indentation is added. E.g.: @@ -5707,7 +5707,7 @@ open parenthesis of the argument list, the indentation is @anchor{c-lineup-arglist-close-under-paren} @defun c-lineup-arglist-close-under-paren -@findex lineup-arglist-close-under-paren (c-) +@findex lineup-arglist-close-under-paren @r{(c-)} Set your @code{arglist-close} syntactic symbol to this line-up function so that parentheses that close argument lists will line up under the parenthesis that opened the argument list. It can also be used with @@ -5727,7 +5727,7 @@ discussion of this ``DWIM'' measure. @comment ------------------------------------------------------------ @defun c-indent-one-line-block -@findex indent-one-line-block (c-) +@findex indent-one-line-block @r{(c-)} Indent a one line block @code{c-basic-offset} extra. E.g.: @example @@ -5761,7 +5761,7 @@ which makes the function usable in list expressions. @comment ------------------------------------------------------------ @defun c-indent-multi-line-block -@findex indent-multi-line-block (c-) +@findex indent-multi-line-block @r{(c-)} Indent a multiline block @code{c-basic-offset} extra. E.g.: @example @@ -5797,7 +5797,7 @@ block, which makes the function usable in list expressions. @comment ------------------------------------------------------------ @defun c-lineup-runin-statements -@findex lineup-runin-statements (c-) +@findex lineup-runin-statements @r{(c-)} Line up statements for coding standards which place the first statement in a block on the same line as the block opening brace@footnote{Run-in style doesn't really work too well. You might need to write your own @@ -5822,7 +5822,7 @@ expressions. @comment ------------------------------------------------------------ @defun c-lineup-inexpr-block -@findex lineup-inexpr-block (c-) +@findex lineup-inexpr-block @r{(c-)} This can be used with the in-expression block symbols to indent the whole block to the column where the construct is started. E.g., for Java anonymous classes, this lines up the class under the @samp{new} keyword, @@ -5837,7 +5837,7 @@ construct. @comment ------------------------------------------------------------ @defun c-lineup-after-whitesmith-blocks -@findex lineup-after-whitesmith-blocks (c-) +@findex lineup-after-whitesmith-blocks @r{(c-)} Compensate for Whitesmith style indentation of blocks. Due to the way @ccmode{} calculates anchor positions for normal lines inside blocks, this function is necessary for those lines to get correct Whitesmith @@ -5882,7 +5882,7 @@ indents relative to the surrounding block just like @comment ------------------------------------------------------------ @defun c-lineup-whitesmith-in-block -@findex lineup-whitesmith-in-block (c-) +@findex lineup-whitesmith-in-block @r{(c-)} Line up lines inside a block in Whitesmith style. It's done in a way that works both when the opening brace hangs and when it doesn't. E.g.: @@ -5932,7 +5932,7 @@ for indenting a close parenthesis, is also useful for the lines contained within parentheses. @defun c-lineup-arglist -@findex lineup-arglist (c-) +@findex lineup-arglist @r{(c-)} Line up the current argument line under the first argument. As a special case, if an argument on the same line as the open @@ -5960,7 +5960,7 @@ indent such cases this way. @comment ------------------------------------------------------------ @defun c-lineup-arglist-intro-after-paren -@findex lineup-arglist-intro-after-paren (c-) +@findex lineup-arglist-intro-after-paren @r{(c-)} Line up a line to just after the open paren of the surrounding paren or brace block. @@ -5972,7 +5972,7 @@ brace block. @comment ------------------------------------------------------------ @defun c-lineup-multi-inher -@findex lineup-multi-inher (c-) +@findex lineup-multi-inher @r{(c-)} Line up the classes in C++ multiple inheritance clauses and member initializers under each other. E.g.: @@ -6012,7 +6012,7 @@ Foo::Foo (int a, int b) @comment ------------------------------------------------------------ @defun c-lineup-java-inher -@findex lineup-java-inher (c-) +@findex lineup-java-inher @r{(c-)} Line up Java implements and extends declarations. If class names follow on the same line as the @samp{implements}/@samp{extends} keyword, they are lined up under each other. Otherwise, they are @@ -6045,7 +6045,7 @@ class Foo @comment ------------------------------------------------------------ @defun c-lineup-java-throws -@findex lineup-java-throws (c-) +@findex lineup-java-throws @r{(c-)} Line up Java throws declarations. If exception names follow on the same line as the throws keyword, they are lined up under each other. Otherwise, they are indented by adding @code{c-basic-offset} to the @@ -6079,7 +6079,7 @@ int foo() throws Cyphr, @comment ------------------------------------------------------------ @defun c-lineup-template-args -@findex lineup-template-args (c-) +@findex lineup-template-args @r{(c-)} Line up the arguments of a template argument list under each other, but only in the case where the first argument is on the same line as the opening @samp{<}. @@ -6093,7 +6093,7 @@ returned if there's no template argument on the first line. @comment ------------------------------------------------------------ @defun c-lineup-ObjC-method-call -@findex lineup-ObjC-method-call (c-) +@findex lineup-ObjC-method-call @r{(c-)} For Objective-C code, line up selector args as Emacs Lisp mode does with function args: go to the position right after the message receiver, and if you are at the end of the line, indent the current line @@ -6107,7 +6107,7 @@ lineup the current line with it. @comment ------------------------------------------------------------ @defun c-lineup-ObjC-method-args -@findex lineup-ObjC-method-args (c-) +@findex lineup-ObjC-method-args @r{(c-)} For Objective-C code, line up the colons that separate args. The colon on the current line is aligned with the one on the first line. @@ -6117,7 +6117,7 @@ on the current line is aligned with the one on the first line. @comment ------------------------------------------------------------ @defun c-lineup-ObjC-method-args-2 -@findex lineup-ObjC-method-args-2 (c-) +@findex lineup-ObjC-method-args-2 @r{(c-)} Similar to @code{c-lineup-ObjC-method-args} but lines up the colon on the current line with the colon on the previous line. @@ -6135,7 +6135,7 @@ start with an operator, by lining it up with something on the previous line. @defun c-lineup-argcont -@findex lineup-argcont (c-) +@findex lineup-argcont @r{(c-)} Line up a continued argument. E.g.: @example @@ -6158,7 +6158,7 @@ expressions for the operands. @comment ------------------------------------------------------------ @defun c-lineup-arglist-operators -@findex lineup-arglist-operators (c-) +@findex lineup-arglist-operators @r{(c-)} Line up lines starting with an infix operator under the open paren. Return @code{nil} on lines that don't start with an operator, to leave those cases to other line-up functions. Example: @@ -6192,7 +6192,7 @@ suggestion to get a consistent style): @comment ------------------------------------------------------------ @defun c-lineup-assignments -@findex lineup-assignments (c-) +@findex lineup-assignments @r{(c-)} Line up the current line after the assignment operator on the first line in the statement. If there isn't any, return @code{nil} to allow stacking with other line-up functions. If the current line contains an assignment @@ -6206,7 +6206,7 @@ operator too, try to align it with the first one. @comment ------------------------------------------------------------ @defun c-lineup-math -@findex lineup-math (c-) +@findex lineup-math @r{(c-)} Like @code{c-lineup-assignments} but indent with @code{c-basic-offset} if no assignment operator was found on the first line. I.e., this function is the same as specifying a list @code{(c-lineup-assignments @@ -6219,7 +6219,7 @@ function is the same as specifying a list @code{(c-lineup-assignments @comment ------------------------------------------------------------ @defun c-lineup-cascaded-calls -@findex lineup-cascaded-calls (c-) +@findex lineup-cascaded-calls @r{(c-)} Line up ``cascaded calls'' under each other. If the line begins with @code{->} or @code{.} and the preceding line ends with one or more function calls preceded by the same token, then the arrow is lined up @@ -6243,7 +6243,7 @@ expressions. @comment ------------------------------------------------------------ @defun c-lineup-streamop -@findex lineup-streamop (c-) +@findex lineup-streamop @r{(c-)} Line up C++ stream operators (i.e., @samp{<<} and @samp{>>}). @workswith @code{stream-op}. @@ -6252,7 +6252,7 @@ Line up C++ stream operators (i.e., @samp{<<} and @samp{>>}). @comment ------------------------------------------------------------ @defun c-lineup-string-cont -@findex lineup-string-cont (c-) +@findex lineup-string-cont @r{(c-)} Line up a continued string under the one it continues. A continued string in this sense is where a string literal follows directly after another one. E.g.: @@ -6282,7 +6282,7 @@ The lineup functions here calculate the indentation for several types of comment structure. @defun c-lineup-C-comments -@findex lineup-C-comments (c-) +@findex lineup-C-comments @r{(c-)} Line up C block comment continuation lines. Various heuristics are used to handle most of the common comment styles. Some examples: @@ -6334,13 +6334,13 @@ line inside a comment. @comment ------------------------------------------------------------ @defun c-lineup-comment -@findex lineup-comment (c-) +@findex lineup-comment @r{(c-)} Line up a comment-only line according to the style variable @code{c-comment-only-line-offset}. If the comment is lined up with a comment starter on the previous line, that alignment is preserved. @defopt c-comment-only-line-offset -@vindex comment-only-line-offset (c-) +@vindex comment-only-line-offset @r{(c-)} This style variable specifies the extra offset for the line. It can contain an integer or a cons cell of the form @@ -6361,7 +6361,7 @@ is equivalent to @code{(@r{@var{value}} . -1000)}. @comment ------------------------------------------------------------ @defun c-lineup-knr-region-comment -@findex lineup-knr-region-comment (c-) +@findex lineup-knr-region-comment @r{(c-)} Line up a comment in the ``K&R region'' with the declaration. That is the region between the function or class header and the beginning of the block. E.g.: @@ -6392,7 +6392,7 @@ The line-up functions here are the odds and ends which didn't fit into any earlier category. @defun c-lineup-dont-change -@findex lineup-dont-change (c-) +@findex lineup-dont-change @r{(c-)} This lineup function makes the line stay at whatever indentation it already has; think of it as an identity function for lineups. @@ -6413,7 +6413,7 @@ disregarded. @comment ------------------------------------------------------------ @defun c-lineup-cpp-define -@findex lineup-cpp-define (c-) +@findex lineup-cpp-define @r{(c-)} Line up macro continuation lines according to the indentation of the construct preceding the macro. E.g.: @@ -6502,7 +6502,7 @@ described above. @comment ------------------------------------------------------------ @defun c-lineup-gcc-asm-reg -@findex lineup-gcc-asm-reg (c-) +@findex lineup-gcc-asm-reg @r{(c-)} Line up a gcc asm register under one on a previous line. @example @@ -6534,7 +6534,7 @@ arglist lineups, e.g.: @comment ------------------------------------------------------------ @defun c-lineup-topmost-intro-cont -@findex lineup-topmost-intro-cont (c-) +@findex lineup-topmost-intro-cont @r{(c-)} Line up declaration continuation lines zero or one indentation step@footnote{This function is mainly provided to mimic the behavior of CC Mode 5.28 and earlier where this case wasn't handled consistently so @@ -6644,9 +6644,9 @@ your setup for this by using the access functions (@code{c-langelem-sym}, etc.)@: described below. @vindex c-syntactic-element -@vindex syntactic-element (c-) +@vindex syntactic-element @r{(c-)} @vindex c-syntactic-context -@vindex syntactic-context (c-) +@vindex syntactic-context @r{(c-)} Some syntactic symbols, e.g., @code{arglist-cont-nonempty}, have more info in the syntactic element: typically other positions that can be interesting besides the anchor position. That info can't be accessed @@ -6664,24 +6664,24 @@ used in the line-up function argument and the new list form used in @code{c-syntactic-element} and everywhere else. The functions are: @defun c-langelem-sym langelem -@findex langelem-sym (c-) +@findex langelem-sym @r{(c-)} Return the syntactic symbol in @var{langelem}. @end defun @defun c-langelem-pos langelem -@findex langelem-pos (c-) +@findex langelem-pos @r{(c-)} Return the anchor position in @var{langelem}, or @code{nil} if there is none. @end defun @defun c-langelem-col langelem &optional preserve-point -@findex langelem-col (c-) +@findex langelem-col @r{(c-)} Return the column of the anchor position in @var{langelem}. Also move the point to that position unless @var{preserve-point} is non-@code{nil}. @end defun @defun c-langelem-2nd-pos langelem -@findex langelem-2nd-pos (c-) +@findex langelem-2nd-pos @r{(c-)} Return the secondary position in @var{langelem}, or @code{nil} if there is none. @@ -6712,20 +6712,20 @@ see @xref{Macros with ;}. Here are the remaining odds and ends regarding indentation: @defopt c-label-minimum-indentation -@vindex label-minimum-indentation (c-) +@vindex label-minimum-indentation @r{(c-)} In @samp{gnu} style (@pxref{Built-in Styles}), a minimum indentation is imposed on lines inside code blocks. This minimum indentation is controlled by this style variable. The default value is 1. @findex c-gnu-impose-minimum -@findex gnu-impose-minimum (c-) +@findex gnu-impose-minimum @r{(c-)} It's the function @code{c-gnu-impose-minimum} that enforces this minimum indentation. It must be present on @code{c-special-indent-hook} to work. @end defopt @defopt c-special-indent-hook -@vindex special-indent-hook (c-) +@vindex special-indent-hook @r{(c-)} This style variable is a standard hook variable that is called after every line is indented by @ccmode{}. It is called only if @code{c-syntactic-indentation} is non-@code{nil} (which it is by @@ -6772,7 +6772,7 @@ each other as though they were code. You can suppress this behavior by setting the following user option: @defopt c-syntactic-indentation-in-macros -@vindex syntactic-indentation-in-macros (c-) +@vindex syntactic-indentation-in-macros @r{(c-)} Enable syntactic analysis inside macros, which is the default. If this is @code{nil}, all lines inside macro definitions are analyzed as @code{cpp-macro-cont}. @@ -6808,9 +6808,9 @@ backslashes in macros neat and tidy. Their precise action is customized with these variables: @defopt c-backslash-column -@vindex backslash-column (c-) +@vindex backslash-column @r{(c-)} @defoptx c-backslash-max-column -@vindex backslash-max-column (c-) +@vindex backslash-max-column @r{(c-)} These variables control the alignment columns for line continuation backslashes in multiline macros. They are used by the functions that automatically insert or align such backslashes, @@ -6831,7 +6831,7 @@ the automatic alignment of backslashes, use @end defopt @defopt c-auto-align-backslashes -@vindex auto-align-backslashes (c-) +@vindex auto-align-backslashes @r{(c-)} Align automatically inserted line continuation backslashes if non-@code{nil}. When line continuation backslashes are inserted automatically for line breaks in multiline macros, e.g., by @@ -6862,7 +6862,7 @@ You can prevent these by specifying which macros have semicolons. It doesn't matter whether or not such a macro has a parameter list: @defopt c-macro-names-with-semicolon -@vindex macro-names-with-semicolon (c-) +@vindex macro-names-with-semicolon @r{(c-)} This buffer-local variable specifies which macros have semicolons. After setting its value, you need to call @code{c-make-macro-with-semi-re} for it to take effect. It should be @@ -6894,7 +6894,7 @@ example: @end defopt @defun c-make-macro-with-semi-re -@findex make-macro-with-semi-re (c-) +@findex make-macro-with-semi-re @r{(c-)} Call this (non-interactive) function, which sets internal variables, each time you change the value of @code{c-macro-names-with-semicolon} after the major mode function has run. It takes no arguments, and its @@ -6921,7 +6921,7 @@ can prevent this confusion by specifying the identifiers which constitute noise macros. @defopt c-noise-macro-names -@vindex noise-macro-names (c-) +@vindex noise-macro-names @r{(c-)} This variable is a list of names of noise macros which never have parenthesized arguments. Each element is a string, and must be a valid identifier. An element in @code{c-noise-macro-names} must not @@ -6930,7 +6930,7 @@ treated as whitespace by @ccmode{}. @end defopt @defopt c-noise-macro-with-parens-names -@vindex noise-macro-with-parens-names (c-) +@vindex noise-macro-with-parens-names @r{(c-)} This variable is a list of names of noise macros which optionally have arguments in parentheses. Each element of the list is a string, and must be a valid identifier. An element in @@ -6949,7 +6949,7 @@ but doing so is OK. @end defopt @defun c-make-noise-macro-regexps -@findex make-noise-macro-regexps (c-) +@findex make-noise-macro-regexps @r{(c-)} Call this (non-interactive) function, which sets internal variables, on changing the value of @code{c-noise-macro-names} or @code{c-noise-macro-with-parens-names} after the major mode's function @@ -6966,7 +6966,7 @@ after the mode hooks have run. The stuff that didn't fit in anywhere else is documented here. @defopt c-require-final-newline -@vindex require-final-newline (c-) +@vindex require-final-newline @r{(c-)} 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 @@ -6980,7 +6980,7 @@ These are C, C++ and Objective-C. @end defopt @defopt c-echo-syntactic-information-p -@vindex echo-syntactic-information-p (c-) +@vindex echo-syntactic-information-p @r{(c-)} If non-@code{nil}, the syntactic analysis for the current line is shown in the echo area when it's indented (unless @code{c-syntactic-indentation} is @code{nil}). That's useful when @@ -6989,7 +6989,7 @@ want. @end defopt @defopt c-report-syntactic-errors -@vindex report-syntactic-errors (c-) +@vindex report-syntactic-errors @r{(c-)} If non-@code{nil}, certain syntactic errors are reported with a ding and a message, for example when an @code{else} is indented for which there is no corresponding @code{if}. @@ -7106,7 +7106,7 @@ except perhaps when you've just moved a long way inside the file. @findex defun-prompt-regexp @vindex c-Java-defun-prompt-regexp -@vindex Java-defun-prompt-regexp (c-) +@vindex Java-defun-prompt-regexp @r{(c-)} A special note about @code{defun-prompt-regexp} in Java mode: The common style is to hang the opening braces of functions and classes on the right side of the line, and that doesn't work well with the Emacs @@ -7132,7 +7132,7 @@ typically gives good performance even when the code doesn't fit the Emacs approach to finding the defun starts. @vindex c-enable-xemacs-performance-kludge-p -@vindex enable-xemacs-performance-kludge-p (c-) +@vindex enable-xemacs-performance-kludge-p @r{(c-)} XEmacs users can set the variable @code{c-enable-xemacs-performance-kludge-p} to non-@code{nil}. This tells @ccmode{} to use XEmacs-specific built-in functions which, in some @@ -7390,7 +7390,7 @@ compatibility, etc.@: are all available on the web site: @kindex C-c C-b @findex c-submit-bug-report -@findex submit-bug-report (c-) +@findex submit-bug-report @r{(c-)} To report bugs, use the @kbd{C-c C-b} (bound to @code{c-submit-bug-report}) command. This provides vital information we need to reproduce your problem. Make sure you include a concise, diff --git a/doc/misc/dired-x.texi b/doc/misc/dired-x.texi index 8c613080c3..130c06b40e 100644 --- a/doc/misc/dired-x.texi +++ b/doc/misc/dired-x.texi @@ -640,7 +640,7 @@ A non-@code{nil} value means that @samp{-q} is passed to @code{gzip} overriding a verbose option in the @env{GZIP} environment variable. @item dired-guess-shell-znew-switches nil -@vindex dired-guess-shell-znew-switches nil +@vindex dired-guess-shell-znew-switches @cindex @code{znew} Default: @code{nil} @@ -649,7 +649,7 @@ A string of switches passed to @code{znew}. An example is smaller than the @file{.gz} file. @item dired-shell-command-history nil -@vindex dired-shell-command-history nil +@vindex dired-shell-command-history History list for commands that read dired-shell commands. @end table diff --git a/doc/misc/ediff.texi b/doc/misc/ediff.texi index c0b160cf89..e488fc07f8 100644 --- a/doc/misc/ediff.texi +++ b/doc/misc/ediff.texi @@ -345,7 +345,7 @@ file name will be appended to that directory. In addition, if the variable @code{ediff-use-last-dir} is not @code{nil}, Ediff will offer previously entered directories as defaults (which will be maintained separately for each type of file, A, B, or C). -@vindex @code{ediff-use-last-dir} +@vindex ediff-use-last-dir All the above functions use the POSIX @code{diff} or @code{diff3} programs to find differences between two files. They process the @code{diff} output @@ -2304,7 +2304,7 @@ version control, Ediff first tries to check the file out. If @code{t}, all variant buffers are made read-only at Ediff startup. @item ediff-keep-variants -@vindex @code{ediff-keep-variants} +@vindex ediff-keep-variants The default is @code{t}, meaning that the buffers being compared or merged will be preserved when Ediff quits. Setting this to @code{nil} causes Ediff to offer the user a chance to delete these buffers (if they are not modified). @@ -2323,14 +2323,14 @@ Using @code{ediff-cleanup-hook}, one can make Ediff delete the variants unconditionally (e.g., by making @code{ediff-janitor} into one of these hooks). @item ediff-keep-tmp-versions -@vindex @code{ediff-keep-tmp-versions} +@vindex ediff-keep-tmp-versions Default is @code{nil}. If @code{t}, the versions of the files being compared or merged using operations such as @code{ediff-revision} or @code{ediff-merge-revisions} are not deleted on exit. The normal action is to clean up and delete these version files. @item ediff-grab-mouse -@vindex @code{ediff-grab-mouse} +@vindex ediff-grab-mouse Default is @code{t}. Normally, Ediff grabs mouse and puts it in its control frame. This is useful since the user can be sure that when he needs to type an Ediff command the focus will be in an appropriate Ediff's diff --git a/doc/misc/mh-e.texi b/doc/misc/mh-e.texi index 29caefd9f0..5f0cc32cc4 100644 --- a/doc/misc/mh-e.texi +++ b/doc/misc/mh-e.texi @@ -1163,7 +1163,7 @@ your initials. (Unless, of course, your initials happen to be @emph{mh}!) @cindex customizing MH-E @cindex setting options @findex customize-option -@vindex mh-lpr-command-format, example +@vindex mh-lpr-command-format@r{, example} Many string or integer options are easy to modify using @kbd{M-x customize-option}. For example, to modify the option that controls @@ -1181,7 +1181,7 @@ Sessions}. To read more about @code{mh-lpr-command-format}, see @cindex option, turning on and off @cindex t @findex customize-option -@vindex mh-bury-show-buffer-flag, example +@vindex mh-bury-show-buffer-flag@r{, example} Options can also hold boolean values. In Emacs Lisp, the boolean values are @code{nil}, which means false, and @code{t}, which means @@ -1196,7 +1196,7 @@ the @samp{Erase Customization} menu item to reset the option to the default, which places the MH-Show buffer at the bottom of the buffer stack. -@vindex mh-mhl-format-file, example +@vindex mh-mhl-format-file@r{, example} The text usually says to turn on an option by setting it to a @emph{non-@code{nil}} value, because sometimes values other than @@ -1520,9 +1520,9 @@ after running @kbd{M-x mh-rmail} the first time or when you've changed the message numbers from outside of MH-E. @findex mh-execute-commands -@findex mh-rescan-folder, example -@findex mh-show, example -@vindex mh-inc-folder-hook, example +@findex mh-rescan-folder@r{, example} +@findex mh-show@r{, example} +@vindex mh-inc-folder-hook@r{, example} @smalllisp @group @@ -3175,7 +3175,7 @@ code to @file{~/.emacs}. @filbreak @end iftex -@findex mh-rmail, example +@findex mh-rmail@r{, example} @smalllisp @group @@ -3490,7 +3490,7 @@ The hook @code{mh-folder-mode-hook} is called when visiting a new folder in MH-Folder mode. This could be used to set your own key bindings, for example: -@vindex mh-folder-mode-hook, example +@vindex mh-folder-mode-hook@r{, example} @smalllisp @group @@ -3810,9 +3810,9 @@ again. @findex mh-execute-commands @kindex q @vindex mh-before-quit-hook -@vindex mh-before-quit-hook, example +@vindex mh-before-quit-hook@r{, example} @vindex mh-quit-hook -@vindex mh-quit-hook, example +@vindex mh-quit-hook@r{, example} The two hooks @code{mh-before-quit-hook} and @code{mh-quit-hook} are called by @kbd{q}. The former one is called before the quit occurs, so @@ -4099,7 +4099,7 @@ may have a complicated @file{components} file and need to tell MH-E where the cursor should go. Here's an example of how you would use this hook. -@findex mh-insert-signature, example +@findex mh-insert-signature@r{, example} @smalllisp @group @@ -8478,7 +8478,7 @@ message according to MH; it also uses that column for notations. @vindex mh-adaptive-cmd-note-flag @vindex mh-scan-format-file -@vindex mh-scan-format-file, example +@vindex mh-scan-format-file@r{, example} The first thing you have to do is tell MH-E to use this file. Customize @code{mh-scan-format-file} and set its value to @samp{Use @@ -8488,7 +8488,7 @@ Default scan Format}. If you didn't get already turn off Next, tell MH-E what a valid scan line looks like so that you can at least display the output of scan in your MH-Folder buffer. -@vindex mh-scan-valid-regexp, example +@vindex mh-scan-valid-regexp@r{, example} @smalllisp (setq mh-scan-valid-regexp "[0-9]+[+D^ ]$") @@ -8499,8 +8499,8 @@ message, you need to tell MH-E how to access the message number. You should also see why MH-E requires that you include a message number in the first place. -@vindex mh-scan-msg-number-regexp, example -@vindex mh-scan-msg-search-regexp, example +@vindex mh-scan-msg-number-regexp@r{, example} +@vindex mh-scan-msg-search-regexp@r{, example} @smalllisp (setq mh-scan-msg-number-regexp "^.* \\([0-9]+\\)[+D^ ]$") @@ -8509,7 +8509,7 @@ the first place. In order to get the next and previous commands working, add this. -@vindex mh-scan-good-msg-regexp, example +@vindex mh-scan-good-msg-regexp@r{, example} @smalllisp (setq mh-scan-good-msg-regexp "^.* \\([0-9]+\\)[+D^ ]$") @@ -8519,8 +8519,8 @@ Note that the current message isn't marked with a @samp{+} when moving between the next and previous messages. Here is the code required to get this working. -@vindex set-mh-cmd-note, example -@vindex mh-scan-cur-msg-number-regexp, example +@vindex set-mh-cmd-note@r{, example} +@vindex mh-scan-cur-msg-number-regexp@r{, example} @smalllisp (set-mh-cmd-note 76) @@ -8529,8 +8529,8 @@ get this working. Finally, add the following to delete and refile messages. -@vindex mh-scan-deleted-msg-regexp, example -@vindex mh-scan-refiled-msg-regexp, example +@vindex mh-scan-deleted-msg-regexp@r{, example} +@vindex mh-scan-refiled-msg-regexp@r{, example} @smalllisp (setq mh-scan-deleted-msg-regexp "^.* \\([0-9]+\\)D$") diff --git a/doc/misc/pcl-cvs.texi b/doc/misc/pcl-cvs.texi index d0427eb5aa..1163530e7a 100644 --- a/doc/misc/pcl-cvs.texi +++ b/doc/misc/pcl-cvs.texi @@ -1331,13 +1331,13 @@ default. @node Customizing Faces @section Customizing Faces -@vindex cvs-header (face) -@vindex cvs-filename (face) -@vindex cvs-unknown (face) -@vindex cvs-handled (face) -@vindex cvs-need-action (face) -@vindex cvs-marked (face) -@vindex cvs-msg (face) +@vindex cvs-header @r{(face)} +@vindex cvs-filename @r{(face)} +@vindex cvs-unknown @r{(face)} +@vindex cvs-handled @r{(face)} +@vindex cvs-need-action @r{(face)} +@vindex cvs-marked @r{(face)} +@vindex cvs-msg @r{(face)} PCL-CVS adds a few extra features, including menus, mouse bindings, and fontification of the @file{*cvs*} buffer. The faces defined for diff --git a/doc/misc/reftex.texi b/doc/misc/reftex.texi index 86329652ee..55060d09b8 100644 --- a/doc/misc/reftex.texi +++ b/doc/misc/reftex.texi @@ -1732,8 +1732,8 @@ seems inconvenient to you.@footnote{You could, e.g., bind @cindex LaTeX packages, @code{varioref} @cindex @code{fancyref}, LaTeX package @cindex LaTeX packages, @code{fancyref} -@vindex reftex-vref-is-default (deprecated) -@vindex reftex-fref-is-default (deprecated) +@vindex reftex-vref-is-default @r{(deprecated)} +@vindex reftex-fref-is-default @r{(deprecated)} In former versions of @RefTeX{} only support for @code{varioref} and @code{fancyref} was included. @code{varioref} is a @LaTeX{} package to create cross-references with page information. @code{fancyref} is a @@ -3295,11 +3295,11 @@ The following list describes the individual parts of the interface. @itemize @bullet @item @findex reftex-label -@vindex LaTeX-label-function, @r{AUCTeX} +@vindex LaTeX-label-function@r{, AUCTeX} @kindex C-c C-e @kindex C-c C-s -@findex LaTeX-section, @r{AUCTeX} -@findex TeX-insert-macro, @r{AUCTeX} +@findex LaTeX-section@r{, AUCTeX} +@findex TeX-insert-macro@r{, AUCTeX} @b{@AUCTeX{} calls @code{reftex-label} to insert labels}@* When a new section is created with @kbd{C-c C-s}, or a new environment is inserted with @kbd{C-c C-e}, @AUCTeX{} normally prompts for a label to @@ -3327,14 +3327,14 @@ have to rescan the buffer in order to see it. @item @findex reftex-arg-label -@findex TeX-arg-label, @r{AUCTeX function} +@findex TeX-arg-label@r{, AUCTeX function} @findex reftex-arg-ref -@findex TeX-arg-ref, @r{AUCTeX function} +@findex TeX-arg-ref@r{, AUCTeX function} @findex reftex-arg-cite -@findex TeX-arg-cite, @r{AUCTeX function} +@findex TeX-arg-cite@r{, AUCTeX function} @findex reftex-arg-index -@findex TeX-arg-index, @r{AUCTeX function} -@findex TeX-insert-macro, @r{AUCTeX function} +@findex TeX-arg-index@r{, AUCTeX function} +@findex TeX-insert-macro@r{, AUCTeX function} @kindex C-c @key{RET} @b{@RefTeX{} supplies macro arguments}@* When you insert a macro interactively with @kbd{C-c @key{RET}}, @AUCTeX{} normally prompts for @@ -3357,7 +3357,7 @@ Labels}). @node Style Files @subsection Style Files @cindex Style files, AUCTeX -@findex TeX-add-style-hook, @r{AUCTeX} +@findex TeX-add-style-hook@r{, AUCTeX} Style files are Emacs Lisp files which are evaluated by @AUCTeX{} in association with the @code{\documentclass} and @code{\usepackage} commands of a document (@pxref{Style Files,,,auctex}). Support for @@ -3396,7 +3396,7 @@ style file of @AUCTeX{} for example contains the following: @end lisp @noindent -@findex LaTeX-add-environments, @r{AUCTeX} +@findex LaTeX-add-environments@r{, AUCTeX} while a package @code{myprop} defining a @code{proposition} environment with @code{\newtheorem} might use diff --git a/doc/misc/sc.texi b/doc/misc/sc.texi index f214152b5f..03ca842cd0 100644 --- a/doc/misc/sc.texi +++ b/doc/misc/sc.texi @@ -274,7 +274,7 @@ Notice here that my inclusion of Jane's inclusion of John's original message did not result in a line cited with @samp{Jane>John>}. @vindex sc-nested-citation-p -@vindex nested-citation-p (sc-) +@vindex nested-citation-p @r{(sc-)} Supercite supports both styles of citation, and the variable @code{sc-nested-citation-p} controls which style it will use when citing previously uncited text. When this variable is @code{nil} (the @@ -292,7 +292,7 @@ directly user definable. The elements are concatenated together, in this order: @cindex citation leader -@vindex citation-leader (sc-) +@vindex citation-leader @r{(sc-)} @vindex sc-citation-leader @enumerate @item @@ -309,7 +309,7 @@ headers, though you may be asked to confirm Supercite's choice. @cindex citation delimiter @vindex sc-citation-delimiter -@vindex citation-delimiter (sc-) +@vindex citation-delimiter @r{(sc-)} @item The @dfn{citation delimiter}. This string, contained in the variable @code{sc-citation-delimiter} visually separates the citation from the @@ -317,7 +317,7 @@ text of the line. This variable has a default value of @code{">"} and for best results, the string should consist of only a single character. @cindex citation separator -@vindex citation-separator (sc-) +@vindex citation-separator @r{(sc-)} @vindex sc-citation-separator @item The @dfn{citation separator}. The citation separator is contained in @@ -348,15 +348,15 @@ Recognition of cited lines is controlled by variables analogous to those that make up the citation string as mentioned previously. @vindex sc-citation-leader-regexp -@vindex citation-leader-regexp (sc-) +@vindex citation-leader-regexp @r{(sc-)} @vindex sc-citation-delimiter-regexp -@vindex citation-delimiter-regexp (sc-) +@vindex citation-delimiter-regexp @r{(sc-)} @vindex sc-citation-separator-regexp -@vindex citation-separator-regexp (sc-) +@vindex citation-separator-regexp @r{(sc-)} @vindex sc-citation-root-regexp -@vindex citation-root-regexp (sc-) +@vindex citation-root-regexp @r{(sc-)} @vindex sc-citation-nonnested-root-regexp -@vindex citation-nonnested-root-regexp (sc-) +@vindex citation-nonnested-root-regexp @r{(sc-)} The variable @code{sc-citation-leader-regexp} describes how citation leaders can look, by default it matches any number of spaces or tabs. @@ -388,7 +388,7 @@ change @code{sc-citation-root-regexp} you should always also change @cindex Info Alist @cindex information extracted from mail fields @findex sc-mail-field -@findex mail-field (sc-) +@findex mail-field @r{(sc-)} @dfn{Mail header information keys} are nuggets of information that Supercite extracts from the various mail headers of the original @@ -409,7 +409,7 @@ Subject:@: Better get out your asbestos suit @end example @vindex sc-mumble -@vindex mumble (sc-) +@vindex mumble @r{(sc-)} @noindent then, the following lisp constructs return: @@ -513,7 +513,7 @@ header. @cindex header rewrite functions @vindex sc-rewrite-header-list -@vindex rewrite-header-list (sc-) +@vindex rewrite-header-list @r{(sc-)} There are a number of built-in @dfn{header rewrite functions} supplied by Supercite, but you can write your own custom header rewrite functions (perhaps using the built-in ones as examples). The variable @@ -523,7 +523,7 @@ reference header, and when displaying @dfn{electric references}. @xref{Electric References}. @vindex sc-preferred-header-style -@vindex preferred-header-style (sc-) +@vindex preferred-header-style @r{(sc-)} When Supercite is initially run on a reply buffer (via @code{sc-cite-original}), it will automatically call one of these functions. The one it uses is defined in the variable @@ -544,7 +544,7 @@ below, @var{date} and @var{from} correspond to the values of the @samp{Date:@:} and @samp{From:@:} mail headers respectively. @vindex sc-reference-tag-string -@vindex reference-tag-string (sc-) +@vindex reference-tag-string @r{(sc-)} Also, the string @code{">>>>>"} below is really the value of the variable @code{sc-reference-tag-string}. This variable is used in all built-in header rewrite functions, and you can customize its value to @@ -559,7 +559,7 @@ problem either in your MUA or in Supercite's installation). @table @code @findex sc-no-header -@findex no-header (sc-) +@findex no-header @r{(sc-)} @item sc-no-header This function produces no header. It should be used instead of @code{nil} to produce a blank header. This header can possibly @@ -567,38 +567,38 @@ contain a blank line after the @code{mail-header-separator} line. @item sc-no-blank-line-or-header @findex sc-no-blank-line-or-header -@findex no-blank-line-or-header (sc-) +@findex no-blank-line-or-header @r{(sc-)} This function is similar to @code{sc-no-header} except that any blank line after the @code{mail-header-separator} line will be removed. @item sc-header-on-said @findex sc-header-on-said -@findex header-on-said (sc-) +@findex header-on-said @r{(sc-)} @code{>>>>> On @var{date}, @var{from} said:} @item sc-header-inarticle-writes @findex sc-header-inarticle-writes -@findex header-inarticle-writes (sc-) +@findex header-inarticle-writes @r{(sc-)} @code{>>>>> In article @var{message-id}, @var{from} writes:} @item sc-header-regarding-adds @findex sc-header-regarding-adds -@findex header-regarding-adds (sc-) +@findex header-regarding-adds @r{(sc-)} @code{>>>>> Regarding @var{subject}; @var{from} adds:} @item sc-header-attributed-writes @findex sc-header-attributed-writes -@findex header-attributed-writes (sc-) +@findex header-attributed-writes @r{(sc-)} @code{>>>>> "@var{sc-attribution}" == @var{sc-author} <@var{sc-reply-address}> writes:} @item sc-header-author-writes @findex sc-header-author-writes -@findex header-author-writes (sc-) +@findex header-author-writes @r{(sc-)} @code{>>>>> @var{sc-author} writes:} @item sc-header-verbose @findex sc-header-verbose -@findex header-verbose (sc-) +@findex header-verbose @r{(sc-)} @code{>>>>> On @var{date},}@* @code{>>>>> @var{sc-author}}@* @code{>>>>> from the organization of @var{organization}}@* @@ -624,7 +624,7 @@ not. Supercite provides an optional @dfn{electric reference} mode which you can drop into to give you this functionality. @vindex sc-electric-references-p -@vindex electric-references-p (sc-) +@vindex electric-references-p @r{(sc-)} If the variable @code{sc-electric-references-p} is non-@code{nil}, Supercite will bring up an electric reference mode buffer and place you into a recursive edit. The electric reference buffer is read-only, so @@ -644,10 +644,10 @@ The following commands are available while in electric reference mode @table @asis @item @code{sc-eref-next} (@kbd{n}) @findex sc-eref-next -@findex eref-next (sc-) +@findex eref-next @r{(sc-)} @kindex n @vindex sc-electric-circular-p -@vindex electric-circular-p (sc-) +@vindex electric-circular-p @r{(sc-)} Displays the next reference header in the electric reference buffer. If the variable @code{sc-electric-circular-p} is non-@code{nil}, invoking @code{sc-eref-next} while viewing the last reference header in the list @@ -655,7 +655,7 @@ will wrap around to the first header. @item @code{sc-eref-prev} (@kbd{p}) @findex sc-eref-prev -@findex eref-prev (sc-) +@findex eref-prev @r{(sc-)} @kindex p Displays the previous reference header in the electric reference buffer. If the variable @code{sc-electric-circular-p} is non-@code{nil}, @@ -663,7 +663,7 @@ invoking @code{sc-eref-prev} will wrap around to the last header. @item @code{sc-eref-goto} (@kbd{g}) @findex sc-eref-goto -@findex eref-goto (sc-) +@findex eref-goto @r{(sc-)} @kindex g Goes to a specified reference header. The index (into the @code{sc-rewrite-header-list}) can be specified as a numeric argument to @@ -672,14 +672,14 @@ minibuffer. @item @code{sc-eref-jump} (@kbd{j}) @findex sc-eref-jump -@findex eref-jump (sc-) +@findex eref-jump @r{(sc-)} @kindex j Display the preferred reference header, i.e., the one indexed by the current value of @code{sc-preferred-header-style}. @item @code{sc-eref-setn} (@kbd{s}) @findex sc-eref-setn -@findex eref-setn (sc-) +@findex eref-setn @r{(sc-)} @kindex s Set the preferred reference header (i.e., @code{sc-preferred-header-style}) to the currently displayed header. @@ -689,19 +689,19 @@ Set the preferred reference header (i.e., @kindex C-j @kindex q @findex sc-eref-exit -@findex eref-exit (sc-) +@findex eref-exit @r{(sc-)} Exit from electric reference mode and insert the current header into the reply buffer. @item @code{sc-eref-abort} (@kbd{q}, @kbd{x}) @findex sc-eref-abort -@findex eref-abort (sc-) +@findex eref-abort @r{(sc-)} @kindex x Exit from electric reference mode without inserting the current header. @end table @vindex sc-electric-mode-hook -@vindex electric-mode-hook (sc-) +@vindex electric-mode-hook @r{(sc-)} @noindent Supercite will execute the hook @code{sc-electric-mode-hook} before entering electric reference mode. @@ -747,7 +747,7 @@ interface specifications, or if you are writing or maintaining an MUA, @cindex autoload @cindex .emacs file @findex sc-cite-original -@findex cite-original (sc-) +@findex cite-original @r{(sc-)} The first thing that everyone should do, regardless of the MUA you are using is to set up Emacs so it will load Supercite at the appropriate time. This happens automatically if Supercite is distributed with your @@ -789,7 +789,7 @@ message from an MUA. @node Reply Buffer Initialization @section Reply Buffer Initialization @findex sc-cite-original -@findex cite-original (sc-) +@findex cite-original @r{(sc-)} Executing @code{sc-cite-original} performs the following steps as it initializes the reply buffer: @@ -797,7 +797,7 @@ initializes the reply buffer: @enumerate @item @vindex sc-pre-hook -@vindex pre-hook (sc-) +@vindex pre-hook @r{(sc-)} @emph{Runs @code{sc-pre-hook}.} This hook variable is run before @code{sc-cite-original} does any other work. You could conceivably use this hook to set certain Supercite @@ -808,7 +808,7 @@ an article). @item @emph{Inserts Supercite's keymap.} @vindex sc-mode-map-prefix -@vindex mode-map-prefix (sc-) +@vindex mode-map-prefix @r{(sc-)} @kindex C-c C-p @cindex keymap prefix Supercite provides a number of commands for performing post-yank @@ -842,9 +842,9 @@ affect alternative citing styles. @item @emph{Processes the mail headers.} @vindex sc-confirm-always-p -@vindex confirm-always-p (sc-) +@vindex confirm-always-p @r{(sc-)} @vindex sc-mail-warn-if-non-rfc822-p -@vindex mail-warn-if-non-rfc822-p (sc-) +@vindex mail-warn-if-non-rfc822-p @r{(sc-)} All previously retrieved info key-value pairs are deleted from the info alist, then the mail headers in the body of the yanked message are scanned. Info key-value pairs are created for each header found. Also, @@ -857,8 +857,8 @@ transport agent) along the way. @vindex sc-nuke-mail-headers @vindex sc-nuke-mail-header-list -@vindex nuke-mail-headers (sc-) -@vindex nuke-mail-header-list (sc-) +@vindex nuke-mail-headers @r{(sc-)} +@vindex nuke-mail-header-list @r{(sc-)} Once the info keys have been extracted from the mail headers, the headers are nuked from the reply buffer. You can control exactly which headers are removed or kept, but by default, all headers are removed. @@ -881,7 +881,7 @@ The line is matched against the regexp using @code{looking-at} rooted at the beginning of the line. @vindex sc-blank-lines-after-headers -@vindex blank-lines-after-headers (sc-) +@vindex blank-lines-after-headers @r{(sc-)} If the variable @code{sc-blank-lines-after-headers} is non-@code{nil}, it contains the number of blank lines remaining in the buffer after mail headers are nuked. By default, only one blank line is left in the buffer. @@ -895,7 +895,7 @@ original message. @xref{Selecting an Attribution}, for details. @item @emph{Cites the message body.} @vindex sc-cite-region-limit -@vindex cite-region-limit (sc-)b +@vindex cite-region-limit @r{(sc-)} After the selection of the attribution and citation strings, Supercite cites the original message by inserting the citation string prefix in front of every uncited line. You may not want Supercite to @@ -918,7 +918,7 @@ automatically. Use this if you always want to be able to edit and cite the message manually. @vindex sc-cite-blank-lines-p -@vindex cite-blank-lines-p (sc-) +@vindex cite-blank-lines-p @r{(sc-)} The variable @code{sc-cite-blank-lines-p} controls whether blank lines in the original message should be cited or not. If this variable is non-@code{nil}, blank lines will be cited just like non-blank lines. @@ -936,7 +936,7 @@ recognize those styles you see often. @item @emph{Runs @code{sc-post-hook}.} @vindex sc-post-hook -@vindex post-hook (sc-) +@vindex post-hook @r{(sc-)} This variable is very similar to @code{sc-pre-hook}, except that it runs after @code{sc-cite-original} is finished. This hook is provided mostly for completeness and backward compatibility. Perhaps it could be used to @@ -947,11 +947,11 @@ reset certain variables set in @code{sc-pre-hook}. @section Filling Cited Text @cindex filling paragraphs @vindex sc-auto-fill-region-p -@vindex auto-fill-region-p (sc-) +@vindex auto-fill-region-p @r{(sc-)} @cindex filladapt @cindex gin-mode @findex sc-setup-filladapt -@findex setup-filladapt (sc-) +@findex setup-filladapt @r{(sc-)} Supercite will automatically fill newly cited text from the original message unless the variable @code{sc-auto-fill-region-p} has a @@ -971,7 +971,7 @@ makes @dfn{filladapt} a little more Supercite savvy than its default setup. @vindex sc-fixup-whitespace-p -@vindex fixup-whitespace-p (sc-) +@vindex fixup-whitespace-p @r{(sc-)} Also, Supercite will collapse leading whitespace between the citation string and the text on a line when the variable @code{sc-fixup-whitespace-p} is non-@code{nil}. The default value for @@ -1025,7 +1025,7 @@ fill cited text. @chapter Selecting an Attribution @cindex attribution list @vindex sc-preferred-attribution-list -@vindex preferred-attribution-list (sc-) +@vindex preferred-attribution-list @r{(sc-)} As you know, the attribution string is the part of the author's name that will be used to composed a non-nested citation string. Supercite @@ -1080,7 +1080,7 @@ recite paragraphs in the reply. @item "sc-consult" @vindex sc-attrib-selection-list -@vindex attrib-selection-list (sc-) +@vindex attrib-selection-list @r{(sc-)} consults the customizable list @code{sc-attrib-selection-list} which can be used to select special attributions based on the value of any info key. See below for details. @@ -1114,7 +1114,7 @@ suggested that if you change the order of the keys in this list, that @code{"sc-lastchoice"}. This latter is the default. @vindex sc-attrib-selection-list -@vindex attrib-selection-list (sc-) +@vindex attrib-selection-list @r{(sc-)} The value @code{"sc-consult"} in @code{sc-preferred-attribution-list} has a special meaning during attribution selection. When Supercite encounters this preference, it begins processing a customizable list of @@ -1131,7 +1131,7 @@ Each element in this list contains lists of the following form: @noindent @findex sc-mail-field -@findex mail-field (sc-) +@findex mail-field @r{(sc-)} where @var{infokey} is a key for @code{sc-mail-field} and @var{regexp} is a regular expression to match against the @var{infokey}'s value. If @var{regexp} matches the @var{infokey}'s value, the @var{attribution} is @@ -1148,9 +1148,9 @@ to cite your friend's message with the appropriate attribution. @node Anonymous Attributions @section Anonymous Attributions @vindex sc-default-author-name -@vindex default-author-name (sc-) +@vindex default-author-name @r{(sc-)} @vindex sc-default-attribution -@vindex default-attribution (sc-) +@vindex default-attribution @r{(sc-)} When the author's name cannot be found in the @samp{From:@:} mail header, a fallback author name and attribution string must be supplied. @@ -1163,7 +1163,7 @@ author name or attribution is a sign that something is set up incorrectly. @vindex sc-use-only-preference-p -@vindex use-only-preference-p (sc-) +@vindex use-only-preference-p @r{(sc-)} Also, if the preferred attribution, which you specified in your @code{sc-preferred-attribution-list} variable cannot be found, a secondary method can be employed to find a valid attribution string. The @@ -1199,7 +1199,7 @@ attribution alist. @end enumerate @vindex sc-confirm-always-p -@vindex confirm-always-p (sc-) +@vindex confirm-always-p @r{(sc-)} Once the attribution string has been automatically selected, a number of things can happen. If the variable @code{sc-confirm-always-p} is non-@code{nil}, you are queried for confirmation of the chosen @@ -1210,15 +1210,15 @@ you enter becomes the value associated with the @code{"sc-lastchoice"} key in the attribution alist. @vindex sc-downcase-p -@vindex downcase-p (sc-) +@vindex downcase-p @r{(sc-)} Once an attribution string has been selected, Supercite will force the string to lower case if the variable @code{sc-downcase-p} is non-@code{nil}. @vindex sc-attribs-preselect-hook -@vindex attribs-preselect-hook (sc-) +@vindex attribs-preselect-hook @r{(sc-)} @vindex sc-attribs-postselect-hook -@vindex attribs-postselect-hook (sc-) +@vindex attribs-postselect-hook @r{(sc-)} Two hook variables provide even greater control of the attribution selection process. The hook @code{sc-attribs-preselect-hook} is run @@ -1245,7 +1245,7 @@ formats in use. If you encounter a @samp{From:@:} field that Supercite cannot parse, please report this bug using @kbd{M-x report-emacs-bug}. @vindex sc-titlecue-regexp -@vindex titlecue-regexp (sc-) +@vindex titlecue-regexp @r{(sc-)} There are a number of Supercite variables that control how author names are extracted from the @samp{From:@:} header. Some headers may contain a descriptive title as in: @@ -1263,7 +1263,7 @@ This variable has the default value of @code{"\\\\s +-+\\\\s +"}. Any text after this regexp is encountered is ignored as noise. @vindex sc-name-filter-alist -@vindex name-filter-alist (sc-) +@vindex name-filter-alist @r{(sc-)} Some @samp{From:@:} headers may contain extra titles in the name fields not separated by a title cue, but which are nonetheless not part of the author's name proper. Examples include the titles ``Dr.'', ``Mr.'', @@ -1497,7 +1497,7 @@ is not found from the alist, then the appropriate default frame is used. @node Post-yank Formatting Commands @chapter Post-yank Formatting Commands @vindex sc-mode-map-prefix -@vindex mode-map-prefix (sc-) +@vindex mode-map-prefix @r{(sc-)} @kindex C-c C-p Once the original message has been yanked into the reply buffer, and @@ -1540,10 +1540,10 @@ Here is the list of Supercite citing commands: @table @asis @findex sc-cite-region -@findex cite-region (sc-) +@findex cite-region @r{(sc-)} @kindex C-c C-p c @vindex sc-pre-cite-hook -@vindex pre-cite-hook (sc-) +@vindex pre-cite-hook @r{(sc-)} @vindex sc-confirm-always-p @vindex confirm-always-p @kindex C-u @@ -1558,7 +1558,7 @@ attribution string for a single manual citing. @xref{Configuring the Citation Engine}. @findex sc-uncite-region -@findex uncite-region (sc-) +@findex uncite-region @r{(sc-)} @kindex C-c C-p u @item @code{sc-uncite-region} (@kbd{C-c C-p u}) This command removes any citation strings from the beginning of each @@ -1569,7 +1569,7 @@ cited line in the region by interpreting the selected frame from @xref{Configuring the Citation Engine}. @findex sc-recite-region -@findex recite-region (sc-) +@findex recite-region @r{(sc-)} @kindex C-c C-p r @item @code{sc-recite-region} (@kbd{C-c C-p r}) This command recites each line the region by interpreting the selected @@ -1579,7 +1579,7 @@ frame from @code{sc-recite-frame-alist}, or the default reciting frame @xref{Configuring the Citation Engine}. @vindex sc-confirm-always-p -@vindex confirm-always-p (sc-) +@vindex confirm-always-p @r{(sc-)} Supercite will always ask you to confirm the attribution when reciting a region, regardless of the value of @code{sc-confirm-always-p}. @end table @@ -1591,11 +1591,11 @@ These two functions insert various strings into the reply buffer. @table @asis @findex sc-insert-reference -@findex insert-reference (sc-) +@findex insert-reference @r{(sc-)} @kindex C-c C-p w @item @code{sc-insert-reference} (@kbd{C-c C-p w}) @vindex sc-preferred-header-style -@vindex preferred-header-style (sc-) +@vindex preferred-header-style @r{(sc-)} Inserts a reference header into the reply buffer at @samp{point}. With no arguments, the header indexed by @code{sc-preferred-header-style} is inserted. An optional numeric argument is the index into @@ -1606,7 +1606,7 @@ With just the universal argument (@kbd{C-u}), electric reference mode is entered, regardless of the value of @code{sc-electric-references-p}. @findex sc-insert-citation -@findex insert-citation (sc-) +@findex insert-citation @r{(sc-)} @kindex C-c C-p i @item @code{sc-insert-citation} (@kbd{C-c C-p i}) Inserts the current citation string at the beginning of the line that @@ -1704,7 +1704,7 @@ of information from the info alist. @table @asis @kindex C-c C-p f @findex sc-mail-field-query -@findex mail-field-query (sc-) +@findex mail-field-query @r{(sc-)} @kindex C-c C-p f @item @code{sc-mail-field-query} (@kbd{C-c C-p f}) Allows you to interactively view, modify, add, and delete info alist @@ -1732,7 +1732,7 @@ will override any old value. It will not replace it though; if you subsequently delete the key-value pair, the old value will reappear. @findex sc-mail-process-headers -@findex mail-process-headers (sc-) +@findex mail-process-headers @r{(sc-)} @kindex C-c C-p g @item @code{sc-mail-process-headers} (@kbd{C-c C-p g}) This command lets you re-initialize Supercite's info alist from any set @@ -1749,7 +1749,7 @@ old information is lost. @table @asis @findex sc-open-line -@findex open-line (sc-) +@findex open-line @r{(sc-)} @findex open-line @kindex C-c C-p o @item @code{sc-open-line} (@kbd{C-c C-p o}) diff --git a/doc/misc/vhdl-mode.texi b/doc/misc/vhdl-mode.texi index cf3909c67b..e94fba6fc6 100644 --- a/doc/misc/vhdl-mode.texi +++ b/doc/misc/vhdl-mode.texi @@ -147,7 +147,7 @@ your personal coding style. @cindex Syntactic Analysis @vindex vhdl-offsets-alist -@vindex offsets-alist (vhdl-) +@vindex offsets-alist @r{(vhdl-)} @cindex relative buffer position @cindex syntactic symbol @cindex syntactic component @@ -186,7 +186,7 @@ in this and future examples don't actually appear in the buffer.}: @kindex C-c C-x @findex vhdl-show-syntactic-information -@findex show-syntactic-information (vhdl-) +@findex show-syntactic-information @r{(vhdl-)} We can use the command @kbd{C-c C-x} (@code{vhdl-show-syntactic-information}) to simply report what the syntactic analysis is for the current line. Running this command on @@ -241,7 +241,7 @@ components. Also notice that the first component, @cindex Indentation Calculation @vindex vhdl-offsets-alist -@vindex offsets-alist (vhdl-) +@vindex offsets-alist @r{(vhdl-)} Indentation for the current line is calculated using the syntactic component list derived in step 1 above (see @ref{Syntactic Analysis}). Each component contributes to the final total indentation @@ -301,7 +301,7 @@ indentation, it's helpful to understand the general indentation model being used. @vindex vhdl-echo-syntactic-information-p -@vindex echo-syntactic-information-p (vhdl-) +@vindex echo-syntactic-information-p @r{(vhdl-)} @cindex TAB To help you configure VHDL Mode, you can set the variable @code{vhdl-echo-syntactic-information-p} to non-@code{nil} so that the @@ -428,7 +428,7 @@ line. Hitting @kbd{C-c C-x} on line 3 yields: @end example @findex vhdl-set-offset -@findex set-offset (vhdl-) +@findex set-offset @r{(vhdl-)} @kindex C-c O @noindent So we know that to change the offset of the first signal assignment, we need to @@ -447,7 +447,7 @@ basic indent with the syntactic symbol @code{statement-block-intro} in the @code{vhdl-offsets-alist} variable. @findex vhdl-indent-defun -@findex indent-defun (vhdl-) +@findex indent-defun @r{(vhdl-)} To check your changes quickly, just enter @kbd{M-x vhdl-indent-defun} to reindent the entire function. The example should now look like: @example @@ -546,7 +546,7 @@ already built-in. These include: @end itemize @findex vhdl-set-style -@findex set-style (vhdl-) +@findex set-style @r{(vhdl-)} If you'd like to experiment with these built-in styles you can simply type @kbd{M-x vhdl-set-style RET} in a VHDL Mode buffer. @@ -583,9 +583,9 @@ files. You would add this: @cindex Adding Styles @vindex vhdl-style-alist -@vindex style-alist (vhdl-) +@vindex style-alist @r{(vhdl-)} @findex vhdl-add-style -@findex add-style (vhdl-) +@findex add-style @r{(vhdl-)} If none of the built-in styles is appropriate, you'll probably want to add a new style definition. Styles are kept in the @code{vhdl-style-alist} variable, but you probably won't want to modify this variable directly. @@ -615,9 +615,9 @@ block. VHDL Mode provides two variables that make it easier for you to customize your style on a per-file basis. @vindex vhdl-file-style -@vindex file-style (vhdl-) +@vindex file-style @r{(vhdl-)} @vindex vhdl-file-offsets -@vindex file-offsets (vhdl-) +@vindex file-offsets @r{(vhdl-)} The variable @code{vhdl-file-style} can be set to a style name string as described in @ref{Built-in Styles}. When the file is visited, @@ -625,9 +625,9 @@ VHDL Mode will automatically set the file's style to this style using @code{vhdl-set-style}. @vindex vhdl-offsets-alist -@vindex offsets-alist (vhdl-) +@vindex offsets-alist @r{(vhdl-)} @findex vhdl-set-offset -@findex set-offset (vhdl-) +@findex set-offset @r{(vhdl-)} Another variable, @code{vhdl-file-offsets}, takes an association list similar to what is allowed in @code{vhdl-offsets-alist}. When the file is visited, VHDL Mode will automatically institute these offsets using @@ -642,9 +642,9 @@ before file offset settings (i.e., @code{vhdl-file-offsets}). @cindex Advanced Customizations @vindex vhdl-style-alist -@vindex style-alist (vhdl-) +@vindex style-alist @r{(vhdl-)} @vindex vhdl-basic-offset -@vindex basic-offset (vhdl-) +@vindex basic-offset @r{(vhdl-)} For most users, VHDL Mode will support their coding styles with very little need for customizations. Usually, one of the standard styles defined in @code{vhdl-style-alist} will do the trick. Sometimes, @@ -743,7 +743,7 @@ don't want that value added into the final total twice. @cindex statement-cont syntactic symbol @findex vhdl-lineup-statement-cont -@findex lineup-statement-cont (vhdl-) +@findex lineup-statement-cont @r{(vhdl-)} Now, to associate the function @code{vhdl-lineup-statement-cont} with the @code{statement-cont} syntactic symbol, we can add something like the following to our @code{vhdl-mode-hook}: @@ -765,7 +765,7 @@ vhdl-indent-defun}): @end example @vindex vhdl-offsets-alist -@vindex offsets-alist (vhdl-) +@vindex offsets-alist @r{(vhdl-)} Custom indentation functions can be as simple or as complex as you like, and any syntactic symbol that appears in @code{vhdl-offsets-alist} can have a custom indentation function associated with it. Note however that @@ -777,7 +777,7 @@ VHDL Mode. @cindex Other Special Indentations @vindex vhdl-special-indent-hook -@vindex special-indent-hook (vhdl-) +@vindex special-indent-hook @r{(vhdl-)} One other variable is available for you to customize VHDL Mode: @code{vhdl-special-indent-hook}. This is a standard hook variable that is called after every line is indented by VHDL Mode. You can use @@ -956,7 +956,7 @@ The index menu does not work on my XEmacs installation (don't know why). @kindex C-c C-b @findex vhdl-submit-bug-report -@findex submit-bug-report (vhdl-) +@findex submit-bug-report @r{(vhdl-)} @cindex beta testers mailing list @cindex announcement mailing list To report bugs, use the @kbd{C-c C-b} (@code{vhdl-submit-bug-report}) diff --git a/doc/misc/viper.texi b/doc/misc/viper.texi index 967fd49b51..8948437632 100644 --- a/doc/misc/viper.texi +++ b/doc/misc/viper.texi @@ -376,8 +376,8 @@ toggles Viperization of Emacs on and off. @cindex Insert state @cindex Replace state @cindex Ex commands -@findex @code{viper-go-away} -@findex @code{toggle-viper-mode} +@findex viper-go-away +@findex toggle-viper-mode Viper has four states, Emacs, Vi, Insert, and Replace. @@ -1182,7 +1182,7 @@ variable that controls how search patterns are highlighted is @example (copy-face 'default 'viper-search-face) @end example -@vindex @code{viper-search-face} +@vindex viper-search-face @noindent in your Viper customization file. If you want to change how patterns are highlighted, you will have to change @code{viper-search-face} to your liking. @@ -1240,7 +1240,7 @@ watch out for is that it is possible to be on the end-of-line character. The keys @kbd{x} and @kbd{%} will still work correctly, i.e., as if they were on the last character. -@vindex @code{viper-syntax-preference} +@vindex viper-syntax-preference @cindex syntax table The word-movement commands @kbd{w}, @kbd{e}, etc., and the associated @@ -1278,7 +1278,7 @@ the following example: (viper-set-syntax-preference nil "emacs") @end example -@findex @code{viper-set-syntax-preference} +@findex viper-set-syntax-preference The above discussion of the meaning of Viper's words concerns only Viper's movement commands. In regular expressions, words remain the same as in @@ -1369,7 +1369,7 @@ character(s) appropriate for the current major mode. Check spelling of words in the region (@code{spell-region}). The function used for spelling is determined from the variable @code{viper-spell-function}. -@vindex @code{viper-spell-function} +@vindex viper-spell-function @item * @kindex @kbd{*} Call last keyboard macro. @@ -1775,7 +1775,7 @@ Use @code{viper-glob-unix-files} and @code{viper-glob-mswindows-files} in This feature is used to expand wildcards in the Ex command @kbd{:e}. Note that Viper doesn't support wildcards in the @kbd{:r} and @kbd{:w} commands, because file completion is a better mechanism. -@findex @code{viper-glob-function} +@findex viper-glob-function @item ex-cycle-other-window t If not @code{nil}, @kbd{:n} and @kbd{:b} will cycle through files in another @@ -1845,16 +1845,16 @@ For a complete list of colors available to you, evaluate the expression hit the @kbd{C-j} key. @item viper-replace-overlay-cursor-color "Red" -@vindex @code{viper-replace-overlay-cursor-color} +@vindex viper-replace-overlay-cursor-color Cursor color when it is inside the replacement region. This has effect only on color displays and only when Emacs runs as an X application. @item viper-insert-state-cursor-color nil -@vindex @code{viper-insert-state-cursor-color} +@vindex viper-insert-state-cursor-color If set to a valid color, this will be the cursor color when Viper is in insert state. @item viper-emacs-state-cursor-color nil -@vindex @code{viper-emacs-state-cursor-color} +@vindex viper-emacs-state-cursor-color If set to a valid color, this will be the cursor color when Viper is in emacs state. @item viper-replace-region-end-delimiter "$" @@ -1913,45 +1913,45 @@ can include a line like this in your Viper customization file: @example (setq viper-case-fold-search t) @end example -@vindex @code{viper-auto-indent} -@vindex @code{viper-electric-mode} -@vindex @code{viper-case-fold-search} -@vindex @code{viper-re-search} -@vindex @code{viper-shift-width} -@vindex @code{buffer-read-only} -@vindex @code{viper-search-wrap-around} -@vindex @code{viper-search-scroll-threshold} -@vindex @code{viper-search-face} -@vindex @code{viper-tags-file-name} -@vindex @code{viper-re-query-replace} -@vindex @code{viper-want-ctl-h-help} -@vindex @code{viper-vi-style-in-minibuffer} -@vindex @code{viper-no-multiple-ESC} -@vindex @code{viper-always} -@vindex @code{viper-fast-keyseq-timeout} -@vindex @code{viper-ex-style-motion} -@vindex @code{viper-ex-style-editing} -@vindex @code{viper-ESC-moves-cursor-back} -@vindex @code{viper-custom-file-name} -@vindex @code{viper-spell-function} -@vindex @code{ex-cycle-other-window} -@vindex @code{ex-cycle-through-non-files} -@vindex @code{viper-want-emacs-keys-in-insert} -@vindex @code{viper-want-emacs-keys-in-vi} -@vindex @code{viper-keep-point-on-repeat} -@vindex @code{viper-keep-point-on-undo} -@vindex @code{viper-delete-backwards-in-replace} -@vindex @code{viper-replace-overlay-face} -@vindex @code{viper-replace-region-end-symbol} -@vindex @code{viper-replace-region-start-symbol} -@vindex @code{viper-allow-multiline-replace-regions} -@vindex @code{viper-toggle-key} -@vindex @code{viper-buffer-search-char} -@vindex @code{viper-surrounding-word-function} -@vindex @code{viper-vi-state-hook} -@vindex @code{viper-insert-state-hook} -@vindex @code{viper-replace-state-hook} -@vindex @code{viper-emacs-state-hook} +@vindex viper-auto-indent +@vindex viper-electric-mode +@vindex viper-case-fold-search +@vindex viper-re-search +@vindex viper-shift-width +@vindex buffer-read-only +@vindex viper-search-wrap-around +@vindex viper-search-scroll-threshold +@vindex viper-search-face +@vindex viper-tags-file-name +@vindex viper-re-query-replace +@vindex viper-want-ctl-h-help +@vindex viper-vi-style-in-minibuffer +@vindex viper-no-multiple-ESC +@vindex viper-always +@vindex viper-fast-keyseq-timeout +@vindex viper-ex-style-motion +@vindex viper-ex-style-editing +@vindex viper-ESC-moves-cursor-back +@vindex viper-custom-file-name +@vindex viper-spell-function +@vindex ex-cycle-other-window +@vindex ex-cycle-through-non-files +@vindex viper-want-emacs-keys-in-insert +@vindex viper-want-emacs-keys-in-vi +@vindex viper-keep-point-on-repeat +@vindex viper-keep-point-on-undo +@vindex viper-delete-backwards-in-replace +@vindex viper-replace-overlay-face +@vindex viper-replace-region-end-symbol +@vindex viper-replace-region-start-symbol +@vindex viper-allow-multiline-replace-regions +@vindex viper-toggle-key +@vindex viper-buffer-search-char +@vindex viper-surrounding-word-function +@vindex viper-vi-state-hook +@vindex viper-insert-state-hook +@vindex viper-replace-state-hook +@vindex viper-emacs-state-hook @node Key Bindings @section Key Bindings @@ -2059,7 +2059,7 @@ Viper users can also change bindings on a per major mode basis. As with global bindings, this can be done separately for each of the three main Viper states. To this end, Viper provides the function @code{viper-modify-major-mode}. -@findex @code{viper-modify-major-mode} +@findex viper-modify-major-mode To modify keys in Emacs state for @code{my-favorite-major-mode}, the user needs to create a sparse keymap, say, @code{my-fancy-map}, bind whatever @@ -2099,7 +2099,7 @@ Dired functions, the trick can be accomplished via the following code: Yet another way to customize key bindings in a major mode is to edit the list @code{viper-major-mode-modifier-list} using the customization widget. -@vindex @code{viper-major-mode-modifier-list} +@vindex viper-major-mode-modifier-list (This variable is in the Viper-misc customization group.) The elements of this list are triples of the form: (major-mode viper-state keymap), where the keymap contains bindings that are supposed to be active @@ -2184,13 +2184,13 @@ So much about Viper-specific bindings. Manual}, and the Emacs quick reference card for the general info on key bindings in Emacs. -@vindex @code{input-decode-map} -@vindex @code{function-key-map} -@vindex @code{viper-vi-global-user-map} -@vindex @code{viper-insert-global-user-map} -@vindex @code{viper-emacs-global-user-map} -@findex @code{viper-add-local-keys} -@findex @code{viper-zap-local-keys} +@vindex input-decode-map +@vindex function-key-map +@vindex viper-vi-global-user-map +@vindex viper-insert-global-user-map +@vindex viper-emacs-global-user-map +@findex viper-add-local-keys +@findex viper-zap-local-keys @node Packages that Change Keymaps @section Packages that Change Keymaps @@ -2261,9 +2261,9 @@ on the @code{viper-emacs-state-mode-list} list and delete them from @code{viper-vi-state-mode-list}. Likewise, you can force Viper's Insert state on a major mode by putting it in @code{viper-insert-state-mode-list}. -@vindex @code{viper-emacs-state-mode-list} -@vindex @code{viper-insert-state-mode-list} -@vindex @code{viper-vi-state-mode-list} +@vindex viper-emacs-state-mode-list +@vindex viper-insert-state-mode-list +@vindex viper-vi-state-mode-list It is also possible to impose Vi on some major modes, even though they may bind common keys to specialized commands. This might make sense for modes @@ -2312,14 +2312,14 @@ compatible with Viper is to have the file @file{my-mode.el} include the followin (viper-harness-minor-mode lib))) @end lisp -@vindex @code{viper-want-emacs-keys-in-vi} -@vindex @code{viper-want-emacs-keys-in-insert} -@vindex @code{viper-always} -@findex @code{viper-set-hooks} -@findex @code{viper-mode} -@findex @code{viper-harness-minor-mode} -@findex @code{remove-hook} -@findex @code{add-hook} +@vindex viper-want-emacs-keys-in-vi +@vindex viper-want-emacs-keys-in-insert +@vindex viper-always +@findex viper-set-hooks +@findex viper-mode +@findex viper-harness-minor-mode +@findex remove-hook +@findex add-hook @node Viper Specials @section Viper Specials @@ -2339,8 +2339,8 @@ sets @code{viper-buffer-search-char} to @kbd{g}. Alternatively, the user can set @code{viper-buffer-search-char} in his/her Viper customization file to a key sequence to be used for buffer search. There is no need to call @code{viper-buffer-search-enable} in that case. -@findex @code{viper-buffer-search-enable} -@vindex @code{viper-buffer-search-char} +@findex viper-buffer-search-enable +@vindex viper-buffer-search-char @item viper-toggle-search-style This function, bound to @kbd{C-c /}, lets one toggle case-sensitive and case-insensitive search, and also switch between plain vanilla search and @@ -2365,7 +2365,7 @@ feature, put this in the file: @example (viper-set-searchstyle-toggling-macros 'undefine) @end example -@findex @code{viper-set-searchstyle-toggling-macros} +@findex viper-set-searchstyle-toggling-macros If you don't like this feature as a default, but would still like to have it in some major modes, you can do so by first unsetting it globally, as @@ -2389,8 +2389,8 @@ case-insensitivity and regexp-search. If you don't like these features---which I don't really understand---you can unbind @kbd{/} and @kbd{:} in @code{viper-dired-modifier-map} (for Dired) or in @code{viper-slash-and-colon-map}, for other modes. -@vindex @code{viper-slash-and-colon-map} -@vindex @code{viper-dired-modifier-map} +@vindex viper-slash-and-colon-map +@vindex viper-dired-modifier-map To unbind the macros @kbd{//} and @kbd{///} for a major mode where you feel they @@ -2400,7 +2400,7 @@ prefix argument, or by placing @example (viper-set-emacs-state-searchstyle-macros 'undefine) @end example -@findex @code{viper-set-emacs-state-searchstyle-macros} +@findex viper-set-emacs-state-searchstyle-macros in the hook to the major mode (e.g., @code{dired-mode-hook}). @xref{Vi Macros}, for more information on Vi macros. @@ -2414,10 +2414,10 @@ Regular Expressions for @kbd{[[} and @kbd{]]}. Note that Emacs defines Regexps for paragraphs and sentences. @xref{Paragraphs,,Paragraphs and Sentences,emacs,The GNU Emacs Manual}, for details. @item M-x viper-set-expert-level -@findex @code{viper-set-expert-level} +@findex viper-set-expert-level Change your user level interactively. @item viper-smart-suffix-list '("" "tex" "c" "cc" "el" "p") -@vindex @code{viper-smart-suffix-list} +@vindex viper-smart-suffix-list Viper supports Emacs-style file completion when it prompts the user for a file name. However, in many cases, the same directory may contain files with identical prefix but different suffixes, e.g., prog.c, prog.o, @@ -2437,7 +2437,7 @@ the intended file name, hitting return will accept it. To turn this feature off, set the above variable to @code{nil}. @item viper-insertion-ring-size 14 -@vindex @code{viper-insertion-ring-size} +@vindex viper-insertion-ring-size @cindex Insertion ring Viper remembers what was previously inserted in Insert and Replace states. Several such recent insertions are kept in a special ring of strings of size @@ -2470,7 +2470,7 @@ this will interfere with the minibuffer histories and, possibly, other major modes. @item viper-command-ring-size 14 -@vindex @code{viper-command-ring-size} +@vindex viper-command-ring-size @cindex Destructive command ring @cindex Destructive command history Viper keeps track of the recent history of destructive @@ -2527,11 +2527,11 @@ indication of the current Viper state in the minibuffer. (This is important if the user accidentally switches to another Viper state by typing @key{ESC} or @kbd{C-z}). @item M-x viper-go-away -@findex @code{viper-go-away} +@findex viper-go-away Make Viper disappear from the face of your running Emacs instance. If your fingers start aching again, @kbd{M-x viper-mode} might save your day. @item M-x toggle-viper-mode -@findex @code{toggle-viper-mode} +@findex toggle-viper-mode Toggle Viperization of Emacs on and off. @end table @@ -2581,7 +2581,7 @@ is available). Clicking the mouse when Emacs is invoked in an Xterm window @cindex mouse @cindex mouse-search @item viper-mouse-search-key (meta shift 1) -@vindex @code{viper-mouse-insert-key} +@vindex viper-mouse-insert-key This variable controls the @emph{mouse-search} feature of Viper. The default value states that holding Meta and Shift keys while clicking mouse button 1 @@ -2636,7 +2636,7 @@ occurred with all leading and trailing spaces and tabs removed. @cindex mouse-insert @item viper-mouse-insert-key (meta shift 2) -@vindex @code{viper-mouse-insert-key} +@vindex viper-mouse-insert-key This variable controls the @emph{mouse-insert} feature of Viper. The above default value states that holding Meta and Shift keys while clicking mouse button 2 @@ -2673,9 +2673,9 @@ purpose of mouse search and mouse insert. By default, this is set to @kindex @kbd{S-mouse-2} @kindex @kbd{meta shift button1up} @kindex @kbd{meta shift button2up} -@vindex @code{viper-multiclick-timeout} -@findex @code{viper-mouse-click-insert-word} -@findex @code{viper-mouse-click-search-word} +@vindex viper-multiclick-timeout +@findex viper-mouse-click-insert-word +@findex viper-mouse-click-search-word Note: The above functions search and insert in the selected window of the latest active frame. This means that you can click in another window or @@ -2852,7 +2852,7 @@ The latter is more powerful, since it can delete macros even in needed only when the user needs to get rid of the macros that are already predefined in Viper. The syntax is: -@findex @code{viper-unrecord-kbd-macro} +@findex viper-unrecord-kbd-macro @example (viper-unrecord-kbd-macro macro state) @end example @@ -2992,7 +2992,7 @@ keys have to be redefined for TTY's (and possibly for every type of TTY you may be using). To do this, start Emacs on an appropriate TTY device and define the macro using @kbd{:map}, as usual. -@findex @code{viper-describe-kbd-macros} +@findex viper-describe-kbd-macros Finally, Viper provides a function that conveniently displays all macros currently defined. To see all macros along with their definitions, type @kbd{M-x viper-describe-kbd-macros}. @@ -3199,8 +3199,8 @@ modes, you should execute, for example, in the appropriate major mode hooks. -@vindex @code{viper-syntax-preference} -@findex @code{viper-set-syntax-preference} +@vindex viper-syntax-preference +@findex viper-set-syntax-preference @cindex syntax table @@ -3378,7 +3378,7 @@ don't want this macro, put @example (viper-set-parsing-style-toggling-macro 'undefine) @end example -@findex @code{viper-set-parsing-style-toggling-macro} +@findex viper-set-parsing-style-toggling-macro in your Viper customization file. @@ -3437,7 +3437,7 @@ in your Viper customization file. @kindex @kbd{j} @kindex @kbd{k} @kindex @kbd{l} -@vindex @code{viper-parse-sexp-ignore-comments} +@vindex viper-parse-sexp-ignore-comments @node Marking @subsection Marking @@ -4069,7 +4069,7 @@ The variable @code{viper-read-buffer-function} controls which function is actually used to read the buffer name. The default is @code{read-buffer}, but better alternatives are also available in Emacs (e.g., @code{ido-read-buffer}). -@vindex @code{viper-read-buffer-function} +@vindex viper-read-buffer-function @item :B Like @kbd{:b}, but the meaning of @code{ex-cycle-other-window} is reversed. @item :
r commit 088b1b864c3e6f3962636f5c2308608d01097c39 Author: Eli Zaretskii Date: Fri Feb 23 08:54:28 2018 +0200 Fix documentation from recent changes * lisp/isearch.el (isearch-yank-symbol-or-char): Doc fix. * doc/emacs/search.texi (Isearch Yank): Fix wording. * doc/emacs/building.texi (Grep Searching): Fix last change. diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi index 91705711b8..549ccaf3ae 100644 --- a/doc/emacs/building.texi +++ b/doc/emacs/building.texi @@ -435,10 +435,13 @@ the variable @code{grep-files-aliases}. by various version control systems. @vindex grep-find-hide - The boolean option @code{grep-find-hide} controls shortening of the -displayed command line by hiding the part containing ignored -directories and files. The hidden part can be revealed by clicking on -the button with ellipsis. + By default, the shell commands constructed for @code{lgrep}, +@code{rgrep}, and @code{zgrep} are abbreviated for display by +concealing the part that contains a long list of files and directories +to ignore. You can reveal the concealed part by clicking on the +button with ellipsis, which represents them. To disable this +abbreviation of the shell commands, customize the option +@code{grep-find-hide} to a @code{nil} value. @node Flymake @section Finding Syntax Errors On The Fly diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi index 37446ca1c4..9d7ff59bee 100644 --- a/doc/emacs/search.texi +++ b/doc/emacs/search.texi @@ -234,7 +234,7 @@ of whether to copy a character or a word is heuristic.) @kbd{C-M-w} (@code{isearch-yank-symbol-or-char}) appends the next character or symbol at point to the search string. This is an easy way to search for another occurrence of the symbol at point. (The decision -of whether to copy a character or a word is heuristic.) +of whether to copy a character or a symbol is heuristic.) @kindex M-s C-e @r{(Incremental search)} @findex isearch-yank-line diff --git a/lisp/isearch.el b/lisp/isearch.el index b6422401a8..a41adf0c2c 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -2106,7 +2106,7 @@ If optional ARG is non-nil, pull in the next ARG characters." (isearch--yank-char-or-syntax '(?w) 'forward-word)) (defun isearch-yank-symbol-or-char () - "Pull next character or word from buffer into search string." + "Pull next character or symbol from buffer into search string." (interactive) (isearch--yank-char-or-syntax '(?w ?_) 'forward-symbol)) commit a12dccc713c3de1c1069ea6b4c173a789bd4a45c Author: Daniel Colascione Date: Thu Feb 22 17:45:01 2018 -0800 Add more build outputs to .gitignore * .gitignore: Add more generated files diff --git a/.gitignore b/.gitignore index d3712b0d6c..a231b80b2d 100644 --- a/.gitignore +++ b/.gitignore @@ -48,6 +48,9 @@ src/config.h src/epaths.h src/emacs-module.h +# Miscellaneous build stuf +build-aux/ + # C-level sources built by 'make'. lib/alloca.h lib/byteswap.h @@ -112,6 +115,9 @@ lisp/subdirs.el # Dependencies. deps/ +lib/.deps +src/stamp-h.in +src/stamp-h1 # Logs and temporaries. *.log commit b9d414e77c4f6396e202069fdd233b6687e6da64 Author: Daniel Colascione Date: Thu Feb 22 17:42:48 2018 -0800 Add isearch-yank-symbol-or-char * doc/emacs/search.texi (Isearch Yank): Document new function, keybindings. * etc/NEWS: Mention isearch changes. * lisp/isearch.el (isearch--yank-char-or-syntax): New function. (isearch-yank-word-or-char): Call it. (isearch-yank-symbol-or-char): New function. (isearch-mode-map): Change 'C-M-w' binding from 'isearch-del-char' to isearch-yank-symbol-or-char; add 'C-M-d' binding for 'isearch-del-char'. diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi index 319f64fbae..37446ca1c4 100644 --- a/doc/emacs/search.texi +++ b/doc/emacs/search.texi @@ -229,6 +229,13 @@ character or word at point to the search string. This is an easy way to search for another occurrence of the text at point. (The decision of whether to copy a character or a word is heuristic.) +@kindex C-M-w @r{(Incremental search)} +@findex isearch-yank-symbol-or-char + @kbd{C-M-w} (@code{isearch-yank-symbol-or-char}) appends the next +character or symbol at point to the search string. This is an easy way +to search for another occurrence of the symbol at point. (The decision +of whether to copy a character or a word is heuristic.) + @kindex M-s C-e @r{(Incremental search)} @findex isearch-yank-line Similarly, @kbd{M-s C-e} (@code{isearch-yank-line}) appends the rest @@ -250,11 +257,11 @@ appended text with an earlier kill, similar to the usual @kbd{M-y} in the echo area appends the current X selection (@pxref{Primary Selection}) to the search string (@code{isearch-yank-x-selection}). -@kindex C-M-w @r{(Incremental search)} +@kindex C-M-d @r{(Incremental search)} @kindex C-M-y @r{(Incremental search)} @findex isearch-del-char @findex isearch-yank-char - @kbd{C-M-w} (@code{isearch-del-char}) deletes the last character + @kbd{C-M-d} (@code{isearch-del-char}) deletes the last character from the search string, and @kbd{C-M-y} (@code{isearch-yank-char}) appends the character after point to the search string. An alternative method to add the character after point is to enter the diff --git a/etc/NEWS b/etc/NEWS index 70bafcd01b..dacaf023bb 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -109,6 +109,11 @@ regular expression was previously invalid, but is now accepted: * Editing Changes in Emacs 27.1 ++++ +** New isearch bindings. +'C-M-w' in isearch changed from isearch-del-char to the new function +isearch-yank-symbol-or-char. isearch-del-char is now bound to 'C-M-d'. + --- ** New variable 'x-wait-for-event-timeout'. This controls how long Emacs will wait for updates to the graphical diff --git a/lisp/isearch.el b/lisp/isearch.el index 1835469bb2..b6422401a8 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -480,7 +480,8 @@ This is like `describe-bindings', but displays only Isearch keys." (define-key map [?\S-\ ] 'isearch-printing-char) (define-key map "\C-w" 'isearch-yank-word-or-char) - (define-key map "\M-\C-w" 'isearch-del-char) + (define-key map "\M-\C-w" 'isearch-yank-symbol-or-char) + (define-key map "\M-\C-d" 'isearch-del-char) (define-key map "\M-\C-y" 'isearch-yank-char) (define-key map "\C-y" 'isearch-yank-kill) (define-key map "\M-s\C-e" 'isearch-yank-line) @@ -2089,17 +2090,26 @@ If optional ARG is non-nil, pull in the next ARG characters." (interactive "p") (isearch-yank-internal (lambda () (forward-char arg) (point)))) -(defun isearch-yank-word-or-char () - "Pull next character or word from buffer into search string." - (interactive) +(defun isearch--yank-char-or-syntax (syntax-list fn) (isearch-yank-internal (lambda () - (if (or (= (char-syntax (or (char-after) 0)) ?w) - (= (char-syntax (or (char-after (1+ (point))) 0)) ?w)) - (forward-word 1) + (if (or (memq (char-syntax (or (char-after) 0)) syntax-list) + (memq (char-syntax (or (char-after (1+ (point))) 0)) + syntax-list)) + (funcall fn 1) (forward-char 1)) (point)))) +(defun isearch-yank-word-or-char () + "Pull next character or word from buffer into search string." + (interactive) + (isearch--yank-char-or-syntax '(?w) 'forward-word)) + +(defun isearch-yank-symbol-or-char () + "Pull next character or word from buffer into search string." + (interactive) + (isearch--yank-char-or-syntax '(?w ?_) 'forward-symbol)) + (defun isearch-yank-word (&optional arg) "Pull next word from buffer into search string. If optional ARG is non-nil, pull in the next ARG words." commit b7542b2a0a00adc8d216697db0b8afd8d568de00 Author: Daniel Colascione Date: Thu Feb 22 17:28:38 2018 -0800 Remove unnecessary explicit subword-mode use from isearch * lisp/isearch.el (isearch-yank-word-or-char): Remove explicit use of subword-mode. These days, subword-mode use is an automatic side effect of forward-word. diff --git a/lisp/isearch.el b/lisp/isearch.el index 41350c2d30..1835469bb2 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -2089,19 +2089,14 @@ If optional ARG is non-nil, pull in the next ARG characters." (interactive "p") (isearch-yank-internal (lambda () (forward-char arg) (point)))) -(declare-function subword-forward "subword" (&optional arg)) (defun isearch-yank-word-or-char () - "Pull next character, subword or word from buffer into search string. -Subword is used when `subword-mode' is activated. " + "Pull next character or word from buffer into search string." (interactive) (isearch-yank-internal (lambda () (if (or (= (char-syntax (or (char-after) 0)) ?w) (= (char-syntax (or (char-after (1+ (point))) 0)) ?w)) - (if (or (and (boundp 'subword-mode) subword-mode) - (and (boundp 'superword-mode) superword-mode)) - (subword-forward 1) - (forward-word 1)) + (forward-word 1) (forward-char 1)) (point)))) commit ea1604537ae7ea69c8e1bad9c63024d6727e33fd Author: Glenn Morris Date: Thu Feb 22 20:47:26 2018 -0500 * lisp/vc/vc-git.el: Avoid bootstrap errors since recent grep change. The introduction of grep-find-hide-properties caused an "invalid read syntax" failure when saving ja-dic.el, when vc-git.el loaded grep.el. Fortunately, vc-git doesn't actually need to load grep when being compiled. diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 163333af3b..5db02f4ce5 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -102,8 +102,7 @@ (eval-when-compile (require 'cl-lib) (require 'vc) - (require 'vc-dir) - (require 'grep)) + (require 'vc-dir)) (defgroup vc-git nil "VC Git backend." commit 9793a4616833a26157b4c60278ec17a9be233d8f Author: Stefan Monnier Date: Thu Feb 22 16:59:30 2018 -0500 * test/lisp/emacs-lisp/package-tests.el: Improve signature tests (package-test-signed): Don't rely on return value of 'package-install'. Make sure 'package-install' does indeed install the package. diff --git a/test/lisp/emacs-lisp/package-tests.el b/test/lisp/emacs-lisp/package-tests.el index 62fba58919..83f5228488 100644 --- a/test/lisp/emacs-lisp/package-tests.el +++ b/test/lisp/emacs-lisp/package-tests.el @@ -484,14 +484,16 @@ Must called from within a `tar-mode' buffer." (package-import-keyring keyring) (package-refresh-contents) (let ((package-check-signature 'allow-unsigned)) - (should (package-install 'signed-good)) + (should (progn (package-install 'signed-good) 'noerror)) (should-error (package-install 'signed-bad))) + (package-delete (car (alist-get 'signed-good package-alist))) (let ((package-check-signature t)) - (should (package-install 'signed-good)) + (should (progn (package-install 'signed-good) 'noerror)) (should-error (package-install 'signed-bad))) + (package-delete (car (alist-get 'signed-good package-alist))) (let ((package-check-signature nil)) - (should (package-install 'signed-good)) - (should (package-install 'signed-bad))) + (should (progn (package-install 'signed-good) 'noerror)) + (should (progn (package-install 'signed-bad) 'noerror))) ;; Check if the installed package status is updated. (let ((buf (package-list-packages))) (package-menu-refresh) commit dad1aeb30760ef524e95e636c22346b051233a38 Author: Juri Linkov Date: Thu Feb 22 23:59:32 2018 +0200 * lisp/help.el (view-lossage): Use the same format as in edit-last-kbd-macro. Call comment-indent with let-bound comment-start and comment-column. (Bug#30560) diff --git a/etc/NEWS b/etc/NEWS index 6a89182493..70bafcd01b 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -160,6 +160,14 @@ bound to 'C-c C-f'. 'dired-do-copy' and 'dired-rename-file' should create non-existent directories in the destination. +** Help + +*** 'C-h l' (view-lossage) now displays last keystrokes and commands +in the same format as the edit buffer of edit-last-kbd-macro. +This makes possible to copy the lines from the buffer generated +by 'view-lossage', yank them to the buffer "*Edit Macro*" created by +'edit-last-kbd-macro', and save the macro by 'C-c C-c'. + ** Ibuffer --- diff --git a/lisp/help.el b/lisp/help.el index 4899bc44e0..9575f5b090 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -465,8 +465,8 @@ To record all your input, use `open-dribble-file'." (princ (mapconcat (lambda (key) (cond ((and (consp key) (null (car key))) - (format "[%s]\n" (if (symbolp (cdr key)) (cdr key) - "anonymous-command"))) + (format ";; %s\n" (if (symbolp (cdr key)) (cdr key) + "anonymous-command"))) ((or (integerp key) (symbolp key) (listp key)) (single-key-description key)) (t @@ -475,11 +475,11 @@ To record all your input, use `open-dribble-file'." " ")) (with-current-buffer standard-output (goto-char (point-min)) - (while (not (eobp)) - (move-to-column 50) - (unless (eolp) - (fill-region (line-beginning-position) (line-end-position))) - (forward-line 1)) + (let ((comment-start ";; ") + (comment-column 24)) + (while (not (eobp)) + (comment-indent) + (forward-line 1))) ;; jidanni wants to see the last keystrokes immediately. (set-marker help-window-point-marker (point))))) commit 8ba61ffd8cebb0ff9f7a219022f3c1f3eac2f6d0 Author: Juri Linkov Date: Thu Feb 22 23:51:41 2018 +0200 * lisp/progmodes/grep.el (grep-find-hide): New defcustom (bug#30503). (grep-find-hide-properties): New variable. (grep-mode-font-lock-keywords): Put grep-find-hide-properties on part of grep command line. (grep-find-show): New function. * doc/emacs/building.texi (Grep Searching): Document grep-find-hide. diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi index b6b664ddb3..91705711b8 100644 --- a/doc/emacs/building.texi +++ b/doc/emacs/building.texi @@ -434,6 +434,12 @@ the variable @code{grep-files-aliases}. @kbd{M-x rgrep}. The default value includes the data directories used by various version control systems. +@vindex grep-find-hide + The boolean option @code{grep-find-hide} controls shortening of the +displayed command line by hiding the part containing ignored +directories and files. The hidden part can be revealed by clicking on +the button with ellipsis. + @node Flymake @section Finding Syntax Errors On The Fly @cindex checking syntax diff --git a/etc/NEWS b/etc/NEWS index 848b66d20d..6a89182493 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -182,6 +182,13 @@ by default. ** Gamegrid +** grep + +*** rgrep, lgrep and zrgrep now hide part of the command line +that contains a list of ignored directories and files. +Clicking on the button with ellipsis unhides the truncated part. +This truncation can be disabled by the new option 'grep-find-hide'. + ** ERT +++ diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index 755c9c73d3..9b2c6f112c 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el @@ -433,6 +433,26 @@ See `compilation-error-regexp-alist' for format details.") help-echo "Number of matches so far") "]")) +(defcustom grep-find-hide t + "If non-nil, hide part of rgrep/lgrep/zrgrep command line. +The hidden part contains a list of ignored directories and files. +Clicking on the button-like ellipsis unhides the abbreviated part +and reveals the entire command line." + :type 'boolean + :version "27.1" + :group 'grep) + +(defvar grep-find-hide-properties + (let ((ellipsis (if (char-displayable-p ?…) "[…]" "[...]")) + (map (make-sparse-keymap))) + (define-key map [down-mouse-2] 'mouse-set-point) + (define-key map [mouse-2] 'grep-find-show) + (define-key map "\C-m" 'grep-find-show) + `(face nil display ,ellipsis mouse-face highlight + help-echo "RET, mouse-2: show unabbreviated command" + keymap ,map)) + "Properties of button-like ellipsis on part of rgrep command line.") + (defvar grep-mode-font-lock-keywords '(;; Command output lines. (": \\(.+\\): \\(?:Permission denied\\|No such \\(?:file or directory\\|device or address\\)\\)$" @@ -450,9 +470,16 @@ See `compilation-error-regexp-alist' for format details.") (2 grep-error-face nil t)) ;; "filename-linenumber-" format is used for context lines in GNU grep, ;; "filename=linenumber=" for lines with function names in "git grep -p". - ("^.+?\\([-=\0]\\)[0-9]+\\([-=]\\).*\n" (0 grep-context-face) + ("^.+?\\([-=\0]\\)[0-9]+\\([-=]\\).*\n" + (0 grep-context-face) (1 (if (eq (char-after (match-beginning 1)) ?\0) - `(face nil display ,(match-string 2)))))) + `(face nil display ,(match-string 2))))) + ;; Hide excessive part of rgrep command + ("^find \\(\\. -type d .*\\\\)\\)" + (1 (when grep-find-hide grep-find-hide-properties))) + ;; Hide excessive part of lgrep command + ("^grep \\( *--exclude.*--exclude[^ ]+\\)" + (1 (when grep-find-hide grep-find-hide-properties)))) "Additional things to highlight in grep output. This gets tacked on the end of the generated expressions.") @@ -1168,6 +1195,24 @@ to specify a command to run." (shell-quote-argument ")") " -prune -o "))))) +(defun grep-find-show () + "Show the hidden part of rgrep/lgrep/zrgrep command line." + (interactive) + (when (get-text-property (point) 'display) + (let ((beg (or (previous-single-property-change + (min (point-max) (1+ (point))) 'display) + (point))) + (end (or (next-single-property-change + (point) 'display) + (point))) + (inhibit-modification-hooks t) + (inhibit-read-only t) + (buffer-undo-list t) + (modified (buffer-modified-p))) + (remove-list-of-text-properties + beg end '(display help-echo mouse-face help-echo keymap)) + (set-buffer-modified-p modified)))) + ;;;###autoload (defun zrgrep (regexp &optional files dir confirm template) "Recursively grep for REGEXP in gzipped FILES in tree rooted at DIR. commit 76f5242838c84bcaf5003b18a31104114930f197 Author: Alan Mackenzie Date: Thu Feb 22 18:21:47 2018 +0000 Document, in the Elisp manual, how to get a character's raw syntax descriptor * doc/lispref/syntax.texi (Syntax Table internals): mention the use of `aref' to get a character's raw syntax descriptor. diff --git a/doc/lispref/syntax.texi b/doc/lispref/syntax.texi index fd461b755c..3327d7855c 100644 --- a/doc/lispref/syntax.texi +++ b/doc/lispref/syntax.texi @@ -972,6 +972,10 @@ encodes the syntax class and syntax flags, according to the table below. @var{matching-char}, if non-@code{nil}, specifies a matching character (similar to the second character in a syntax descriptor). +@cindex syntax tables (accessing elements of) +Use @code{aref} (@pxref{Array Functions}) to get the raw syntax +descriptor of a character, e.g. @w{@code{(aref (syntax-table) ch)}}. + Here are the syntax codes corresponding to the various syntax classes: commit 5fb29578de07d0f5002d88dea58843478c0bc114 Author: Eli Zaretskii Date: Thu Feb 22 20:27:24 2018 +0200 Improvements in the Emacs manual * doc/emacs/custom.texi (Customization Groups) (Changing a Variable, Browsing Custom, Customizing Faces): Fix markup of keys. (Changing a Variable, Saving Customizations): Update the description of buttons in the Custom buffer. (Face Customization): More accurate description. (Specific Customization, Examining, Locals): Add blank lines in the @table. Reported by Michael Albinus in emacs-manual-bugs@gnu.org. diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi index 1fa47634d4..d54363047b 100644 --- a/doc/emacs/custom.texi +++ b/doc/emacs/custom.texi @@ -83,7 +83,7 @@ top-level @code{Emacs} group. It looks like this, in part: @c @page @smallexample @group -For help, see [Easy Customization] in the [Emacs manual]. +For help using this buffer, see [Easy Customization] in the [Emacs manual]. ________________________________________ [ Search ] @@ -95,10 +95,10 @@ Emacs group: Customization of the One True Editor. [State]: visible group members are all at standard values. See also [Manual]. -[Editing] : Basic text editing facilities. -[Convenience] : Convenience features for faster editing. +[Editing] Basic text editing facilities. +[Convenience] Convenience features for faster editing. -@var{more second-level groups} +@var{...more second-level groups...} @end group @end smallexample @@ -119,7 +119,7 @@ has been edited, set, or saved. @xref{Changing a Variable}. the customization buffer is an editable field for searching for settings (@pxref{Browsing Custom}). There are also @dfn{buttons} and @dfn{links}, which you can activate by either clicking with the mouse, -or moving point there and typing @key{RET}. For example, the group +or moving point there and typing @kbd{@key{RET}}. For example, the group names like @samp{[Editing]} are links; activating one of these links brings up the customization buffer for that group. @@ -127,7 +127,7 @@ brings up the customization buffer for that group. @kindex S-TAB @r{(customization buffer)} @findex widget-forward @findex widget-backward - In the customization buffer, you can type @key{TAB} + In the customization buffer, you can type @kbd{@key{TAB}} (@code{widget-forward}) to move forward to the next button or editable field. @kbd{S-@key{TAB}} (@code{widget-backward}) moves back to the previous button or editable field. @@ -146,16 +146,16 @@ settings that you want to customize. If you are interested in customizing a particular setting or customization group, you can go straight there with the commands -@kbd{M-x customize-option}, @kbd{M-x customize-face}, or @kbd{M-x -customize-group}. @xref{Specific Customization}. +@kbd{M-x customize-option}, @kbd{M-x customize-face}, or @w{@kbd{M-x +customize-group}}. @xref{Specific Customization}. @vindex custom-search-field If you don't know exactly what groups or settings you want to customize, you can search for them using the editable search field at the top of each customization buffer. Here, you can type in a search term---either one or more words separated by spaces, or a regular -expression (@pxref{Regexps}). Then type @key{RET} in the field, or -activate the @samp{Search} button next to it, to switch to a +expression (@pxref{Regexps}). Then type @kbd{@key{RET}} in the field, +or activate the @samp{Search} button next to it, to switch to a customization buffer containing groups and settings that match those terms. Note, however, that this feature only finds groups and settings that are loaded in the current Emacs session. @@ -252,11 +252,11 @@ names, and Emacs command names, you can perform completion with @kbd{M-@key{TAB}} or @kbd{@key{ESC} @key{TAB}}. This behaves much like minibuffer completion (@pxref{Completion}). - Typing @key{RET} on an editable value field moves point forward to -the next field or button, like @key{TAB}. You can thus type @key{RET} -when you are finished editing a field, to move on to the next button -or field. To insert a newline within an editable field, use @kbd{C-o} -or @kbd{C-q C-j}. + Typing @kbd{@key{RET}} on an editable value field moves point +forward to the next field or button, like @kbd{@key{TAB}}. You can +thus type @kbd{@key{RET}} when you are finished editing a field, to +move on to the next button or field. To insert a newline within an +editable field, use @kbd{C-o} or @kbd{C-q C-j}. For some variables, there is only a fixed set of legitimate values, and you are not allowed to edit the value directly. Instead, a @@ -306,9 +306,10 @@ operation. There are actually four reset operations: If you have modified but not yet set the variable, this restores the text in the customization buffer to match the actual value. -@item Reset to Saved -This restores the value of the variable to the last saved value, -and updates the text accordingly. +@item Revert This Session's Customizations +This restores the value of the variable to the last saved value, if +there was one. Otherwise it restores the standard value. It updates +the text accordingly. @item Erase Customization This sets the variable to its standard value. Any saved value that @@ -329,15 +330,17 @@ customization. Use the @samp{Add Comment} item from the Near the top of the customization buffer are two lines of buttons: @smallexample - [Set for Current Session] [Save for Future Sessions] - [Undo Edits] [Reset to Saved] [Erase Customization] [Exit] + Operate on all settings in this buffer: + [Revert...] [Apply] [Apply and Save] @end smallexample @noindent -Each of the first five buttons performs the stated operation---set, -save, reset, etc.---on all the settings in the buffer that could -meaningfully be affected. They do not operate on settings that are -hidden, nor on subgroups that are hidden or not visible in the buffer. +The @samp{[Revert...]} button drops a menu with the first 3 reset +operations described above. The @samp{[Apply]} button applies the +settings for the current session. The @samp{[Apply and Save]} button +applies the settings and saves them for future sessions; this button +does not appear if Emacs was started with the @option{-q} or +@option{-Q} option (@pxref{Initial Options}). @kindex C-c C-c @r{(customization buffer)} @kindex C-x C-c @r{(customization buffer)} @@ -360,8 +363,8 @@ kill the customization buffer instead, change the variable In the customization buffer, you can @dfn{save} a customization setting by choosing the @samp{Save for Future Sessions} choice from its @samp{[State]} button. The @kbd{C-x C-s} (@code{Custom-save}) -command, or the @samp{[Save for Future Sessions]} button at the top of -the customization buffer, saves all applicable settings in the buffer. +command, or the @samp{[Apply and Save]} button at the top of the +customization buffer, saves all applicable settings in the buffer. Saving works by writing code to a file, usually your initialization file (@pxref{Init File}). Future Emacs sessions automatically read @@ -427,7 +430,8 @@ both variables and faces. For example, in programming language modes, source code comments are shown with @code{font-lock-comment-face} (@pxref{Font Lock}). In a -customization buffer, that face appears like this: +customization buffer, that face appears like this, after you click on +the @samp{[Show All Attributes]} link: @smallexample [Hide] Font Lock Comment Face:[sample] @@ -469,7 +473,7 @@ Any unspecified attribute is taken from the special face named have an explicitly-assigned face; furthermore, its background color attribute serves as the background color of the frame. - The @samp{Hide Unused Attributes} button, at the end of the + The @samp{[Hide Unused Attributes]} button, at the end of the attribute list, hides the unspecified attributes of the face. When attributes are being hidden, the button changes to @samp{[Show All Attributes]}, which reveals the entire attribute list. The @@ -482,8 +486,8 @@ usual ways. Foreground and background colors can be specified using either color names or RGB triplets (@pxref{Colors}). You can also use the @samp{[Choose]} button to switch to a list of color names; select a -color with @key{RET} in that buffer to put the color name in the value -field. +color with @kbd{@key{RET}} in that buffer to put the color name in the +value field. Setting, saving and resetting a face work like the same operations for variables (@pxref{Changing a Variable}). @@ -501,19 +505,29 @@ menu you get from invoking @samp{[State]}. @item M-x customize-option @key{RET} @var{option} @key{RET} @itemx M-x customize-variable @key{RET} @var{option} @key{RET} Set up a customization buffer for just one user option, @var{option}. + @item M-x customize-face @key{RET} @var{face} @key{RET} Set up a customization buffer for just one face, @var{face}. + @item M-x customize-group @key{RET} @var{group} @key{RET} Set up a customization buffer for just one group, @var{group}. + @item M-x customize-apropos @key{RET} @var{regexp} @key{RET} Set up a customization buffer for all the settings and groups that match @var{regexp}. + @item M-x customize-changed @key{RET} @var{version} @key{RET} Set up a customization buffer with all the settings and groups whose meaning has changed since Emacs version @var{version}. + +@item M-x customize-changed-options @key{RET} @var{version} @key{RET} +Set up a customization buffer with all the options whose meaning or +default values have changed since Emacs version @var{version}. + @item M-x customize-saved Set up a customization buffer containing all settings that you have saved with customization buffers. + @item M-x customize-unsaved Set up a customization buffer containing all settings that you have set but not saved. @@ -759,6 +773,7 @@ expects (@pxref{Examining}). @item C-h v @var{var} @key{RET} Display the value and documentation of variable @var{var} (@code{describe-variable}). + @item M-x set-variable @key{RET} @var{var} @key{RET} @var{value} @key{RET} Change the value of variable @var{var} to @var{value}. @end table @@ -951,8 +966,10 @@ be run as well. @table @kbd @item M-x make-local-variable @key{RET} @var{var} @key{RET} Make variable @var{var} have a local value in the current buffer. + @item M-x kill-local-variable @key{RET} @var{var} @key{RET} Make variable @var{var} use its global value in the current buffer. + @item M-x make-variable-buffer-local @key{RET} @var{var} @key{RET} Mark variable @var{var} so that setting it will make it local to the buffer that is current at that time. commit de17b8e5f06f9c70018d6220dd8eb2056eab7bed Author: Glenn Morris Date: Thu Feb 22 12:42:13 2018 -0500 Tiny doc/misc markup fixes * doc/misc/ediff.texi (Patch and Diff Programs): * doc/misc/viper.texi (File and Buffer Handling): Fix markup typos. diff --git a/doc/misc/ediff.texi b/doc/misc/ediff.texi index 3547af3e4f..c0b160cf89 100644 --- a/doc/misc/ediff.texi +++ b/doc/misc/ediff.texi @@ -1924,7 +1924,7 @@ versions only permit @option{-b}, which (usually) assumes the extension @file{.orig}. Yet others force you to use @option{-z@var{extension}}. -Both @code{ediff-backup-extension} and @var{ediff-backup-specs} must +Both @code{ediff-backup-extension} and @code{ediff-backup-specs} must be properly set. If your patch program takes the option @option{-b}, but not @option{-b @var{extension}}, the variable @code{ediff-backup-extension} must still be set so Ediff will know diff --git a/doc/misc/viper.texi b/doc/misc/viper.texi index f45f2a03b9..967fd49b51 100644 --- a/doc/misc/viper.texi +++ b/doc/misc/viper.texi @@ -4061,7 +4061,7 @@ List files not shown anywhere with counts for next Edit file, or edit files. The count comes from @kbd{:args}. @item :N [count] [+] [] Like @kbd{:n}, but the meaning of the variable -@var{ex-cycle-other-window} is reversed. +@code{ex-cycle-other-window} is reversed. @item :b Switch to another buffer. If @code{ex-cycle-other-window} is @code{t}, switch in another window. Buffer completion is supported. @@ -4069,7 +4069,7 @@ The variable @code{viper-read-buffer-function} controls which function is actually used to read the buffer name. The default is @code{read-buffer}, but better alternatives are also available in Emacs (e.g., @code{ido-read-buffer}). -@vindex @var{viper-read-buffer-function} +@vindex @code{viper-read-buffer-function} @item :B Like @kbd{:b}, but the meaning of @code{ex-cycle-other-window} is reversed. @item :
r commit 6bfb754c3ee2e0d667d36fb4300e2880715ea895 Merge: cb55ccae8b 83187cd900 Author: Glenn Morris Date: Thu Feb 22 09:27:21 2018 -0800 Merge from origin/emacs-26 83187cd (origin/emacs-26) Skip mouse-face overlap check when mouse-fa... a6d8f2b Fix capitalization of "Mail-Followup-To" f9640f9 * lisp/progmodes/grep.el (grep-compute-defaults): 3a26c8a Semantic manual fixes 106a9f6 More improvements in the Emacs manual 244db85 * doc/misc/viper.texi (File and Buffer Handling): Add missing... f0d6a16 Fix documentation of 'x-underline-at-descent-line' 69a8f45 * lisp/textmodes/flyspell.el (flyspell-get-word): Doc fix. 05214c6 Correct variable markup in manuals 355c644 Improve the "Sending Mail" chapter of Emacs manual Conflicts: src/nsterm.m src/w32term.c commit cb55ccae8be946f1562d74718086a4c8c8308ee5 Author: Alexei Khlebnikov Date: Thu Feb 22 12:21:49 2018 +0100 Fix for: "25.0.50; auto-revert-mode breaks git rebase" (Bug#21559) * lisp/autorevert.el (auto-revert-handler): Set "revert-buffer-in-progress-p" flag before calling "vc-refresh-state". * lisp/vc/vc-git.el (vc-git-command): If "revert-buffer-in-progress-p" flag is set, prepend "GIT_OPTIONAL_LOCKS=0" to "process-environment". (Bug#21559) diff --git a/lisp/autorevert.el b/lisp/autorevert.el index cf145e0ee3..0a9d3bef54 100644 --- a/lisp/autorevert.el +++ b/lisp/autorevert.el @@ -709,7 +709,8 @@ This is an internal function used by Auto-Revert Mode." ;; `preserve-modes' avoids changing the (minor) modes. But we do ;; want to reset the mode for VC, so we do it manually. (when (or revert auto-revert-check-vc-info) - (vc-refresh-state)))) + (let ((revert-buffer-in-progress-p t)) + (vc-refresh-state))))) (defun auto-revert-tail-handler (size) (let ((modified (buffer-modified-p)) diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 26af99805d..163333af3b 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -1569,7 +1569,14 @@ The difference to vc-do-command is that this function always invokes (or coding-system-for-read vc-git-log-output-coding-system)) (coding-system-for-write (or coding-system-for-write vc-git-commits-coding-system)) - (process-environment (cons "GIT_DIR" process-environment))) + (process-environment + (append + `("GIT_DIR" + ;; Avoid repository locking during background operations + ;; (bug#21559). + ,@(when revert-buffer-in-progress-p + '("GIT_OPTIONAL_LOCKS=0"))) + process-environment))) (apply 'vc-do-command (or buffer "*vc*") okstatus vc-git-program ;; https://debbugs.gnu.org/16897 (unless (and (not (cdr-safe file-or-list)) commit 130c1b8e0e94e7f309db54e440a73cb15a2c8ab6 Author: Michael Albinus Date: Thu Feb 22 11:49:07 2018 +0100 Fix Bug#30533 * lisp/net/ange-ftp.el (ange-ftp-file-regular-p) (ange-ftp-real-file-regular-p): New defuns. (Bug#30533) diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el index f5a5474e88..b1e0bf24aa 100644 --- a/lisp/net/ange-ftp.el +++ b/lisp/net/ange-ftp.el @@ -3373,6 +3373,13 @@ system TYPE.") (file-error nil)) (ange-ftp-real-file-symlink-p file))) +(defun ange-ftp-file-regular-p (file) + ;; Reuse Tramp's implementation. + (if (ange-ftp-ftp-name file) + (and (file-exists-p file) + (eq ?- (aref (file-attribute-modes (file-attributes file)) 0))) + (ange-ftp-real-file-regular-p file))) + (defun ange-ftp-file-exists-p (name) (setq name (expand-file-name name)) (if (ange-ftp-ftp-name name) @@ -4395,6 +4402,7 @@ NEWNAME should be the name to give the new compressed or uncompressed file.") (put 'file-readable-p 'ange-ftp 'ange-ftp-file-readable-p) (put 'file-executable-p 'ange-ftp 'ange-ftp-file-executable-p) (put 'file-symlink-p 'ange-ftp 'ange-ftp-file-symlink-p) +(put 'file-regular-p 'ange-ftp 'ange-ftp-file-regular-p) (put 'delete-file 'ange-ftp 'ange-ftp-delete-file) (put 'verify-visited-file-modtime 'ange-ftp 'ange-ftp-verify-visited-file-modtime) @@ -4485,6 +4493,8 @@ NEWNAME should be the name to give the new compressed or uncompressed file.") (ange-ftp-run-real-handler 'file-executable-p args)) (defun ange-ftp-real-file-symlink-p (&rest args) (ange-ftp-run-real-handler 'file-symlink-p args)) +(defun ange-ftp-real-file-regular-p (&rest args) + (ange-ftp-run-real-handler 'file-regular-p args)) (defun ange-ftp-real-delete-file (&rest args) (ange-ftp-run-real-handler 'delete-file args)) (defun ange-ftp-real-verify-visited-file-modtime (&rest args) commit 83187cd900c799865c967620eef3b7c18f3d168f Author: Martin Rudalics Date: Thu Feb 22 08:50:47 2018 +0100 Skip mouse-face overlap check when mouse-face is hidden (Bug#30519) * src/xdisp.c (note_mouse_highlight): Skip check whether mouse-face highlighting overlay overlaps other mouse-face overlays when mouse-face highlighting is hidden (Bug#30519). diff --git a/src/xdisp.c b/src/xdisp.c index da9c31314c..b003a2f9cc 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -31357,10 +31357,12 @@ note_mouse_highlight (struct frame *f, int x, int y) /* Check mouse-face highlighting. */ if (! same_region /* If there exists an overlay with mouse-face overlapping - the one we are currently highlighting, we have to - check if we enter the overlapping overlay, and then - highlight only that. */ - || (OVERLAYP (hlinfo->mouse_face_overlay) + the one we are currently highlighting, we have to check + if we enter the overlapping overlay, and then highlight + only that. Skip the check when mouse-face highlighting + is currently hidden to avoid Bug#30519. */ + || (!hlinfo->mouse_face_hidden + && OVERLAYP (hlinfo->mouse_face_overlay) && mouse_face_overlay_overlaps (hlinfo->mouse_face_overlay))) { /* Find the highest priority overlay with a mouse-face. */ commit a6d8f2ba02934249fb831d00dde8d3885026a160 Author: Eli Zaretskii Date: Thu Feb 22 09:37:00 2018 +0200 Fix capitalization of "Mail-Followup-To" * doc/emacs/sending.texi (Header Editing, Mail Headers): Standardize on "Mail-Followup-To" as the capitalization. diff --git a/doc/emacs/sending.texi b/doc/emacs/sending.texi index 750680b2af..b7bdd69c7c 100644 --- a/doc/emacs/sending.texi +++ b/doc/emacs/sending.texi @@ -180,7 +180,7 @@ This field takes precedence over @samp{Reply-to}. It is used because some mailing lists set the @samp{Reply-to} field for their own purposes (a somewhat controversial practice). -@item Mail-followup-to +@item Mail-Followup-To One of more address(es) to use as default recipient(s) for follow-up messages. This is typically used when you reply to a message from a mailing list that you are subscribed to, and want replies to go to the @@ -424,7 +424,7 @@ Move to the @samp{Bcc} header (@code{message-goto-bcc}). @item C-c C-f C-r Move to the @samp{Reply-to} header (@code{message-goto-reply-to}). @item C-c C-f C-f -Move to the @samp{Mail-followup-to} header field +Move to the @samp{Mail-Followup-To} header field (@code{message-goto-followup-to}). @item C-c C-f C-w Add a new @samp{Fcc} header field, with file-name completion commit f9640f982705ee6ddb0c8ab16c28f242b87f0d3d Author: Juri Linkov Date: Wed Feb 21 22:30:29 2018 +0200 * lisp/progmodes/grep.el (grep-compute-defaults): Add grep-use-null-filename-separator to grep-host-defaults-alist. (Bug#30559) diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index 14e251e066..755c9c73d3 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el @@ -734,6 +734,8 @@ This function is called from `compilation-filter-hook'." (grep-use-null-device ,grep-use-null-device) (grep-find-command ,grep-find-command) (grep-find-template ,grep-find-template) + (grep-use-null-filename-separator + ,grep-use-null-filename-separator) (grep-find-use-xargs ,grep-find-use-xargs) (grep-highlight-matches ,grep-highlight-matches)))))) commit 3a26c8a0cdeacdc2903500b2c46d826e6a8158ef Author: Charles A. Roelli Date: Wed Feb 21 20:13:01 2018 +0100 Semantic manual fixes * doc/misc/semantic.texi (Tools): Fix wording and grammar, and remove a reference to "document-vars.el" which, in the Emacs repository, is part of lisp/cedet/srecode/document.el. diff --git a/doc/misc/semantic.texi b/doc/misc/semantic.texi index 9597b4b23d..8d4920ce72 100644 --- a/doc/misc/semantic.texi +++ b/doc/misc/semantic.texi @@ -445,7 +445,7 @@ completion lists. @node Tools @section Tools -These files contain various tools a user can use. +These files contain various tools for users. @table @file @item semantic-idle.el @@ -485,8 +485,7 @@ A bunch of small minor-modes that exposes aspects of the semantic parser state. Includes @code{semantic-stickyfunc-mode}. @item document.el -@itemx document-vars.el -Create an update comments for tags. +Create and update comments for tags. @item semantic-adebug.el Extensions of @file{data-debug.el} for @semantic{}. commit 106a9f60ae1d63b7d1c69950873885cdec9a2790 Author: Eli Zaretskii Date: Wed Feb 21 20:32:11 2018 +0200 More improvements in the Emacs manual * doc/emacs/help.texi (Misc Help): * doc/emacs/m-x.texi (M-x): * doc/emacs/mini.texi (Minibuffer File, Repetition): Prevent breaking of command sequences between lines. Reported by Wojciech Politarczyk in emacs-manual-bugs@gnu.org. * doc/emacs/sending.texi (Header Editing): Fix capitalization. diff --git a/doc/emacs/help.texi b/doc/emacs/help.texi index 6c093f13d0..e005fe358d 100644 --- a/doc/emacs/help.texi +++ b/doc/emacs/help.texi @@ -595,8 +595,8 @@ typing @kbd{C-h}, @kbd{?}, or @key{F1} few prefix keys for which not all of these keys work---those that provide their own bindings for that key. One of these prefix keys is @key{ESC}, because @kbd{@key{ESC} C-h} is actually @kbd{C-M-h}, -which marks a defun. However, @kbd{@key{ESC} @key{F1}} and -@kbd{@key{ESC} ?} work fine.) +which marks a defun. However, @w{@kbd{@key{ESC} @key{F1}}} and +@w{@kbd{@key{ESC} ?}} work fine.) @node Help Files @section Help Files diff --git a/doc/emacs/m-x.texi b/doc/emacs/m-x.texi index a9b80d1add..adf46ff19d 100644 --- a/doc/emacs/m-x.texi +++ b/doc/emacs/m-x.texi @@ -82,8 +82,8 @@ setting of @code{suggest-key-bindings} affects these hints as well. In this manual, when we speak of running a command by name, we often omit the @key{RET} that terminates the name. Thus we might say -@kbd{M-x auto-fill-mode} rather than @kbd{M-x auto-fill-mode -@key{RET}}. We mention the @key{RET} only for emphasis, such as when +@kbd{M-x auto-fill-mode} rather than @w{@kbd{M-x auto-fill-mode +@key{RET}}}. We mention the @key{RET} only for emphasis, such as when the command is followed by arguments. @findex execute-extended-command diff --git a/doc/emacs/mini.texi b/doc/emacs/mini.texi index 332602dcf2..03e371f499 100644 --- a/doc/emacs/mini.texi +++ b/doc/emacs/mini.texi @@ -117,7 +117,7 @@ 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 -Shadow mode with the command @kbd{M-x file-name-shadow-mode}.) +Shadow mode with the command @w{@kbd{M-x file-name-shadow-mode}}.) When completing remote file names (@pxref{Remote Files}), a double slash behaves slightly differently: it causes Emacs to ignore only the @@ -747,7 +747,7 @@ it by typing @key{RET}. @vindex isearch-resume-in-command-history Incremental search does not, strictly speaking, use the minibuffer. Therefore, although it behaves like a complex command, it normally -does not appear in the history list for @kbd{C-x @key{ESC} @key{ESC}}. +does not appear in the history list for @w{@kbd{C-x @key{ESC} @key{ESC}}}. You can make incremental search commands appear in the history by setting @code{isearch-resume-in-command-history} to a non-@code{nil} value. @xref{Incremental Search}. diff --git a/doc/emacs/sending.texi b/doc/emacs/sending.texi index 491cda4217..750680b2af 100644 --- a/doc/emacs/sending.texi +++ b/doc/emacs/sending.texi @@ -422,9 +422,9 @@ Move to the @samp{Cc} header (@code{message-goto-cc}). @item C-c C-f C-b Move to the @samp{Bcc} header (@code{message-goto-bcc}). @item C-c C-f C-r -Move to the @samp{Reply-To} header (@code{message-goto-reply-to}). +Move to the @samp{Reply-to} header (@code{message-goto-reply-to}). @item C-c C-f C-f -Move to the @samp{Mail-Followup-To} header field +Move to the @samp{Mail-followup-to} header field (@code{message-goto-followup-to}). @item C-c C-f C-w Add a new @samp{Fcc} header field, with file-name completion commit 244db85d731432a739646980b2a10dba03cff409 Author: tino calancha Date: Wed Feb 21 19:41:16 2018 +0900 * doc/misc/viper.texi (File and Buffer Handling): Add missing '@' diff --git a/doc/misc/viper.texi b/doc/misc/viper.texi index 3432e57869..f45f2a03b9 100644 --- a/doc/misc/viper.texi +++ b/doc/misc/viper.texi @@ -4071,7 +4071,7 @@ but better alternatives are also available in Emacs (e.g., @code{ido-read-buffer}). @vindex @var{viper-read-buffer-function} @item :B -Like @kbd{:b}, but the meaning of code{ex-cycle-other-window} is reversed. +Like @kbd{:b}, but the meaning of @code{ex-cycle-other-window} is reversed. @item :
r Read the file into the buffer after the line
. @item v, V, C-v commit f0d6a16d744c133166cf203daf478e14d53e4e8c Author: Eli Zaretskii Date: Wed Feb 21 06:20:58 2018 +0200 Fix documentation of 'x-underline-at-descent-line' * doc/emacs/display.texi (Display Custom): * src/nsterm.m (syms_of_nsterm): * src/xterm.c (syms_of_xterm): * src/w32term.c (syms_of_w32term): Mention the effect of 'line-spacing' on the underline position. (Bug#30553) diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi index 205ca54728..64a1d4b5fa 100644 --- a/doc/emacs/display.texi +++ b/doc/emacs/display.texi @@ -1848,8 +1848,11 @@ it may improve the legibility of underlined text for certain fonts. area.) The variable @code{x-underline-at-descent-line} determines how to draw underlined text. The default is @code{nil}, which means to draw it at the baseline level of the font; if you change it to -@code{nil}, Emacs draws the underline at the same height as the font's -descent line. +@code{t}, Emacs draws the underline at the same height as the font's +descent line. (If non-default line spacing was specified for the +underlined text, see @ref{Line Height,,, elisp, The Emacs Lisp +Reference Manual}, Emacs draws the underline below the additional +spacing.) @vindex overline-margin The variable @code{overline-margin} specifies the vertical position diff --git a/src/nsterm.m b/src/nsterm.m index 51a53828b5..3d58cd5ec6 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -9381,6 +9381,8 @@ Nil means use fullscreen the old (< 10.7) way. The old way works better with DEFVAR_BOOL ("x-underline-at-descent-line", x_underline_at_descent_line, doc: /* Non-nil means to draw the underline at the same place as the descent line. +(If `line-spacing' is in effect, that moves the underline lower by +that many pixels.) A value of nil means to draw the underline according to the value of the variable `x-use-underline-position-properties', which is usually at the baseline level. The default value is nil. */); diff --git a/src/w32term.c b/src/w32term.c index ac29bbbbd4..611b7c66e7 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -7401,6 +7401,8 @@ sizes. */); DEFVAR_BOOL ("x-underline-at-descent-line", x_underline_at_descent_line, doc: /* Non-nil means to draw the underline at the same place as the descent line. +(If `line-spacing' is in effect, that moves the underline lower by +that many pixels.) A value of nil means to draw the underline according to the value of the variable `x-use-underline-position-properties', which is usually at the baseline level. The default value is nil. */); diff --git a/src/xterm.c b/src/xterm.c index b10664dda9..c5163aa990 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -13260,6 +13260,8 @@ sizes. */); DEFVAR_BOOL ("x-underline-at-descent-line", x_underline_at_descent_line, doc: /* Non-nil means to draw the underline at the same place as the descent line. +(If `line-spacing' is in effect, that moves the underline lower by +that many pixels.) A value of nil means to draw the underline according to the value of the variable `x-use-underline-position-properties', which is usually at the baseline level. The default value is nil. */); commit 69a8f45e15e8fcd73062e810886b0d0993442b06 Author: Glenn Morris Date: Tue Feb 20 20:31:30 2018 -0500 * lisp/textmodes/flyspell.el (flyspell-get-word): Doc fix. diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el index aaa8ebfd48..d87cb5e72e 100644 --- a/lisp/textmodes/flyspell.el +++ b/lisp/textmodes/flyspell.el @@ -1309,7 +1309,7 @@ that may be included as part of a word (see `ispell-dictionary-alist'). This finds the word to spell-check by searching for CASECHARS defined in `ispell-dictionary-alist' for the current dictionary. Thus, the -word could be far away of point if point is inside whitespace or +word could be far away from point if point is inside whitespace or punctuation characters, or in text that belongs to a different language." (let* ((flyspell-casechars (flyspell-get-casechars)) commit 05214c65a357657266e125c26ff382b4c2901dd2 Author: Robert Pluim Date: Tue Feb 20 21:15:19 2018 +0200 Correct variable markup in manuals * doc/lispref/minibuf.texi (Completion in Buffers): Fix markup. * doc/lispref/text.texi (Filling): Likewise. * doc/misc/dired-x.texi (Advanced Mark Commands): Likewise. * doc/misc/epa.texi (Encrypting/decrypting gpg files): Likewise. (Encrypting/decrypting gpg files): Likewise. * doc/misc/tramp.texi (External methods): Likewise. (Default Method): Likewise. * doc/misc/viper.texi (Editing in Insert State): Likewise. (File and Buffer Handling): Likewise. * doc/misc/gnus.texi (Mail Source Customization): Likewise. * doc/misc/url.texi (Customization): Likewise. Note obsolete status of url-temporary-directory. diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi index c7f8ba96e2..0ef81858ea 100644 --- a/doc/lispref/minibuf.texi +++ b/doc/lispref/minibuf.texi @@ -1916,7 +1916,7 @@ may internally call functions in @code{completion-at-point-functions} many times, but care about the value of @var{collection} for only some of these calls. By supplying a function for @var{collection}, Emacs can defer generating completions until necessary. You can use -@var{completion-table-dynamic} to create a wrapper function: +@code{completion-table-dynamic} to create a wrapper function: @smallexample ;; Avoid this pattern. diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index f45b81c983..426940b2f3 100644 --- a/doc/lispref/text.texi +++ b/doc/lispref/text.texi @@ -1637,7 +1637,7 @@ This function returns the proper justification style to use for filling the text around point. This returns the value of the @code{justification} text property at -point, or the variable @var{default-justification} if there is no such +point, or the variable @code{default-justification} if there is no such text property. However, it returns @code{nil} rather than @code{none} to mean ``don't justify''. @end defun diff --git a/doc/misc/dired-x.texi b/doc/misc/dired-x.texi index 8566c7c0b9..8c613080c3 100644 --- a/doc/misc/dired-x.texi +++ b/doc/misc/dired-x.texi @@ -733,7 +733,7 @@ and an optional argument @var{marker-char} specifies the marker used. @findex dired-mark-suffix Mark all files with a certain suffix for use in later commands. A @samp{.} is not automatically prepended to the string entered, you must type it -explicitly. This is different from @var{dired-mark-extension} which prepends +explicitly. This is different from @code{dired-mark-extension} which prepends a @samp{.} if not present. If invoked with prefix argument @kbd{C-u}, this command unmarks files instead. If called with the @kbd{C-u C-u} prefix, asks for a character to use diff --git a/doc/misc/epa.texi b/doc/misc/epa.texi index 8c21a262a1..237617a524 100644 --- a/doc/misc/epa.texi +++ b/doc/misc/epa.texi @@ -363,7 +363,7 @@ Similarly, when you save the buffer to a @file{foo.gpg} file, encrypted data is written. The file name pattern for encrypted files can be controlled by -@var{epa-file-name-regexp}. +@code{epa-file-name-regexp}. @defvar epa-file-name-regexp Regexp which matches filenames treated as encrypted. @@ -392,7 +392,7 @@ public key encryption. @end deffn You can also change the default behavior with the variable -@var{epa-file-select-keys}. +@code{epa-file-select-keys}. @defvar epa-file-select-keys Control whether or not to pop up the key selection dialog. diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi index 1b941bca2a..a63b5a0f12 100644 --- a/doc/misc/gnus.texi +++ b/doc/misc/gnus.texi @@ -15174,7 +15174,7 @@ All new mail files will get this file mode. The default is @code{#o600}. @item mail-source-movemail-program @vindex mail-source-movemail-program If non-@code{nil}, name of program for fetching new mail. If -@code{nil}, @code{movemail} in @var{exec-directory}. +@code{nil}, @code{movemail} in @code{exec-directory}. @end table diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index f82c9b5003..c3beeb79eb 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi @@ -809,7 +809,7 @@ External methods save on the overhead of encoding and decoding of inline methods. Since external methods have the overhead of opening a new channel, -files smaller than @var{tramp-copy-size-limit} still use inline +files smaller than @code{tramp-copy-size-limit} still use inline methods. @table @asis @@ -1201,7 +1201,7 @@ Start by using an inline method. External methods might be more efficient for large files, but most @value{tramp} users edit small files more often than large files. -Enable compression, @var{tramp-inline-compress-start-size}, for a +Enable compression, @code{tramp-inline-compress-start-size}, for a performance boost for large files. Since @command{ssh} has become the most common method of remote host diff --git a/doc/misc/url.texi b/doc/misc/url.texi index b665e6ad8a..ed39aab2a3 100644 --- a/doc/misc/url.texi +++ b/doc/misc/url.texi @@ -1271,8 +1271,9 @@ operation at startup. @item TMPDIR @vindex TMPDIR @vindex url-temporary-directory -If this is defined, @var{url-temporary-directory} is initialized from -it. +If this is defined, @code{url-temporary-directory} is initialized from +it. This variable was obsoleted in 23.1, please use +@code{temporary-file-directory} instead. @end table The following user options affect the general operation of diff --git a/doc/misc/viper.texi b/doc/misc/viper.texi index 1e6e08b873..3432e57869 100644 --- a/doc/misc/viper.texi +++ b/doc/misc/viper.texi @@ -3579,7 +3579,7 @@ Viper customization file. @xref{Viper Specials}, for details. Minibuffer can be edited similarly to Insert state, and you can switch between Insert/Replace/Vi states at will. Some users prefer plain Emacs feel in the minibuffer. To this end, set -@var{viper-vi-style-in-minibuffer} to @code{nil}. +@code{viper-vi-style-in-minibuffer} to @code{nil}. @cindex Insert state @@ -4063,15 +4063,15 @@ Edit file, or edit files. The count comes from @kbd{:args}. Like @kbd{:n}, but the meaning of the variable @var{ex-cycle-other-window} is reversed. @item :b -Switch to another buffer. If @var{ex-cycle-other-window} is @code{t}, +Switch to another buffer. If @code{ex-cycle-other-window} is @code{t}, switch in another window. Buffer completion is supported. -The variable @var{viper-read-buffer-function} controls which function is +The variable @code{viper-read-buffer-function} controls which function is actually used to read the buffer name. The default is @code{read-buffer}, but better alternatives are also available in Emacs (e.g., @code{ido-read-buffer}). @vindex @var{viper-read-buffer-function} @item :B -Like @kbd{:b}, but the meaning of @var{ex-cycle-other-window} is reversed. +Like @kbd{:b}, but the meaning of code{ex-cycle-other-window} is reversed. @item :
r Read the file into the buffer after the line
. @item v, V, C-v commit 355c644cc24a3aa1cf4e9d940690342ad4e67e6f Author: Eli Zaretskii Date: Tue Feb 20 21:13:29 2018 +0200 Improve the "Sending Mail" chapter of Emacs manual * doc/emacs/sending.texi (Mail Format, Header Editing) (Mail Aliases): Fix capitalization of mail headers. (Mail Aliases): Use ~/.mailrc consistently. (Mail Misc): More accurate description of disposition. Suggested by Michael Albinus in emacs-manual-bugs@gnu.org. diff --git a/doc/emacs/sending.texi b/doc/emacs/sending.texi index 299f789617..491cda4217 100644 --- a/doc/emacs/sending.texi +++ b/doc/emacs/sending.texi @@ -70,7 +70,7 @@ or using some other method. @xref{Mail Sending}, for details. @example To: subotai@@example.org -CC: mongol.soldier@@example.net, rms@@gnu.org +Cc: mongol.soldier@@example.net, rms@@gnu.org Subject: Re: What is best in life? From: conan@@example.org --text follows this line-- @@ -152,23 +152,23 @@ more than one address, use commas to separate them. @item Subject The subject of the message. -@item CC +@item Cc Additional mailing address(es) to send the message to. This is like @samp{To}, except that these readers should not regard the message as directed at them. -@item BCC +@item Bcc Additional mailing address(es) to send the message to, which should -not appear in the header of the message actually sent. @samp{BCC} stands +not appear in the header of the message actually sent. @samp{Bcc} stands for @dfn{blind carbon copies}. -@item FCC +@item Fcc The name of a file, to which a copy of the sent message should be appended. Emacs writes the message in mbox format, unless the file is in Babyl format (used by Rmail before Emacs 23), in which case Emacs writes in Babyl format. If an Rmail buffer is visiting the file, Emacs updates it accordingly. To specify more than one file, use -several @samp{FCC} fields, with one file name in each field. +several @samp{Fcc} fields, with one file name in each field. @item Reply-to An address to which replies should be sent, instead of @samp{From}. @@ -198,7 +198,7 @@ this is normally filled in automatically for you. @end table @noindent -The @samp{To}, @samp{CC}, and @samp{BCC} fields can appear any number +The @samp{To}, @samp{Cc}, and @samp{Bcc} fields can appear any number of times, and each such header field can contain multiple addresses, separated by commas. This way, you can specify any number of places to send the message. These fields can also have continuation lines: @@ -221,11 +221,11 @@ To: foo@@example.net, this@@example.net, buffer by setting the variable @code{mail-default-headers} to a string. Then @kbd{C-x m} inserts this string into the message headers. For example, here is how to add a @samp{Reply-to} and -@samp{FCC} header to each message: +@samp{Fcc} header to each message: @smallexample (setq mail-default-headers - "Reply-to: foo@@example.com\nFCC: ~/Mail/sent") + "Reply-to: foo@@example.com\nFcc: ~/Mail/sent") @end smallexample @noindent @@ -245,7 +245,7 @@ aliases are defined in the file @file{~/.mailrc}. You can specify a different file name to use, by setting the variable @code{mail-personal-alias-file}. - To define an alias in @file{.mailrc}, write a line like this: + To define an alias in @file{~/.mailrc}, write a line like this: @example alias @var{nick} @var{fulladdresses} @@ -276,7 +276,7 @@ of the address, such as the person's full name. Emacs puts them in if they are needed. For instance, it inserts the above address as @samp{"John Q. Smith" }. - Emacs also recognizes include commands in @file{.mailrc}. They + Emacs also recognizes include commands in @file{~/.mailrc}. They look like this: @example @@ -284,7 +284,7 @@ source @var{filename} @end example @noindent -The @file{.mailrc} file is not unique to Emacs; many other +The @file{~/.mailrc} file is not unique to Emacs; many other mail-reading programs use it for mail aliases, and it can contain various other commands. However, Emacs ignores everything except alias definitions and include commands. @@ -293,7 +293,7 @@ alias definitions and include commands. Mail aliases expand as abbrevs---that is to say, as soon as you type a word-separator character after an alias (@pxref{Abbrevs}). This expansion takes place only within the @samp{To}, @samp{From}, -@samp{CC}, @samp{BCC}, and @samp{Reply-to} header fields (plus their +@samp{Cc}, @samp{Bcc}, and @samp{Reply-to} header fields (plus their @samp{Resent-} variants); it does not take place in other header fields, such as @samp{Subject}. @@ -418,16 +418,16 @@ Move to the @samp{To} header (@code{message-goto-to}). @item C-c C-f C-s Move to the @samp{Subject} header (@code{message-goto-subject}). @item C-c C-f C-c -Move to the @samp{CC} header (@code{message-goto-cc}). +Move to the @samp{Cc} header (@code{message-goto-cc}). @item C-c C-f C-b -Move to the @samp{BCC} header (@code{message-goto-bcc}). +Move to the @samp{Bcc} header (@code{message-goto-bcc}). @item C-c C-f C-r Move to the @samp{Reply-To} header (@code{message-goto-reply-to}). @item C-c C-f C-f Move to the @samp{Mail-Followup-To} header field (@code{message-goto-followup-to}). @item C-c C-f C-w -Add a new @samp{FCC} header field, with file-name completion +Add a new @samp{Fcc} header field, with file-name completion (@code{message-goto-fcc}). @item C-c C-b Move to the start of the message body (@code{message-goto-body}). @@ -463,7 +463,7 @@ the body. @findex message-tab @kindex TAB @r{(Message mode)} While editing a header field that contains addresses, such as -@samp{To:}, @samp{CC:} and @samp{BCC:}, you can complete an address by +@samp{To:}, @samp{Cc:} and @samp{Bcc:}, you can complete an address by typing @key{TAB} (@code{message-tab}). This attempts to insert the full name corresponding to the address based on a couple of methods, including EUDC, a library that recognizes a number of directory server @@ -534,9 +534,9 @@ and for the attachment's @dfn{content type}, @dfn{description}, and automatically; just type @key{RET} to accept the default. The description is a single line of text that the recipient will see next to the attachment; you may also choose to leave this empty. The -disposition is either @samp{inline} (the default), which means the -recipient will see a link to the attachment within the message body, -or @samp{attachment}, which means the link will be separate from the +disposition is either @samp{inline}, which means the recipient will +see a link to the attachment within the message body, or +@samp{attachment}, which means the link will be separate from the body. @findex mail-add-attachment