diff --git a/ChangeLog.3 b/ChangeLog.3 index be1a9bfe26a..f0297fd1f08 100644 --- a/ChangeLog.3 +++ b/ChangeLog.3 @@ -1293,7 +1293,7 @@ Don't bug out on certain empty elements with ids - * lisp/net/shr.el (shr-descend): Fix empty-element #id targetting + * lisp/net/shr.el (shr-descend): Fix empty-element #id targeting (bug#52391). 2021-12-09 Paul Eggert diff --git a/Makefile.in b/Makefile.in index 877802ec11c..4b749636656 100644 --- a/Makefile.in +++ b/Makefile.in @@ -965,6 +965,7 @@ bootstrap-clean: $(distclean_dirs:=_bootstrap-clean) [ ! -f config.log ] || mv -f config.log config.log~ rm -rf ${srcdir}/info rm -f ${srcdir}/etc/refcards/emacsver.tex + rm -rf native-lisp/ lisp/leim/ja-dic/ ${top_bootclean} ### 'maintainer-clean' diff --git a/admin/MAINTAINERS b/admin/MAINTAINERS index 092978f6d2c..f0239db0089 100644 --- a/admin/MAINTAINERS +++ b/admin/MAINTAINERS @@ -275,14 +275,6 @@ Vibhav Pant lisp/net/browse-url.el lisp/erc/* -Alan Third - The NS port: - nextstep/* - src/ns* - src/*.m - lisp/term/ns-win.el - doc/emacs/macos.texi - Amin Bandali Eshell lisp/eshell/* @@ -313,7 +305,9 @@ Tramp Modus themes Maintainer: Protesilaos Stavrou - Repository and issue tracker: https://gitlab.com/protesilaos/modus-themes + Repository: https://git.sr.ht/~protesilaos + Mailing list: https://lists.sr.ht/~protesilaos/modus-themes + Bug Reports: M-x modus-themes-report-bug doc/misc/modus-themes.org etc/themes/modus*.el diff --git a/admin/admin.el b/admin/admin.el index 8c68b181831..6be378b9246 100644 --- a/admin/admin.el +++ b/admin/admin.el @@ -351,11 +351,13 @@ Optional argument TYPE is type of output (nil means all)." \"https://www.w3.org/TR/html4/loose.dtd\">\n\n") (defconst manual-meta-string - " - + "\n") + +(defconst manual-links-string + " -\n\n") +\n") (defconst manual-style-string "\n") @@ -486,6 +488,12 @@ the @import directive." (delete-region opoint (point)) (search-forward "\n") + (delete-region opoint (point)) + (search-forward "") (goto-char (match-beginning 0)) (delete-region opoint (point)) diff --git a/admin/alloc-colors.c b/admin/alloc-colors.c index 4db447332ba..b78dd42b7e6 100644 --- a/admin/alloc-colors.c +++ b/admin/alloc-colors.c @@ -23,6 +23,7 @@ along with GNU Emacs. If not, see . */ #include #include #include +#include void fatal (const char *fmt, ...) diff --git a/admin/make-tarball.txt b/admin/make-tarball.txt index c8ee3349cdb..02b4f318e26 100644 --- a/admin/make-tarball.txt +++ b/admin/make-tarball.txt @@ -334,6 +334,9 @@ looks like this: +Also, make sure the copyright years at the bottom of emacs.html are +up-to-date. + The file download.html may need to be updated, for example if the MS-Windows binaries will be signed by a different person/key than those mentioned there. diff --git a/admin/unidata/unidata-gen.el b/admin/unidata/unidata-gen.el index 149f7535588..0a9fd5108ce 100644 --- a/admin/unidata/unidata-gen.el +++ b/admin/unidata/unidata-gen.el @@ -89,6 +89,7 @@ ;; PROPn: string representing the nth property value (eval-when-compile (require 'cl-lib)) +(require 'generate-lisp-file) (defvar unidata-list nil) @@ -1422,13 +1423,13 @@ Property value is a symbol `o' (Open), `c' (Close), or `n' (None)." (or elt (user-error "Unknown output file: %s" basename)) (or noninteractive (message "Generating %s..." file)) (with-temp-file file - (insert ";;; " basename " -*- lexical-binding:t -*- -;; " copyright " -;; Generated from Unicode data files by unidata-gen.el. -;; The sources for this file are found in the admin/unidata/ directory in -;; the Emacs sources. The Unicode data files are used under the -;; Unicode Terms of Use, as contained in the file copyright.html in that -;; same directory.\n") + (generate-lisp-file-heading + basename 'unidata-gen-file + :commentary (concat copyright " \ +The sources for this file are found in the admin/unidata/ directory in \ +the Emacs sources. The Unicode data files are used under the \ +Unicode Terms of Use, as contained in the file copyright.html in that \ +same directory.")) (dolist (proplist (cdr elt)) (let ((prop (unidata-prop-prop proplist)) (index (unidata-prop-index proplist)) @@ -1446,21 +1447,15 @@ Property value is a symbol `o' (Open), `c' (Close), or `n' (None)." (set-char-table-extra-slot table 3 describer)) (insert (format "(define-char-code-property '%S\n %S\n %S)\n" prop table docstring)))) - (insert ";; Local Variables:\n" - ";; coding: utf-8\n" - ";; version-control: never\n" - ";; no-byte-compile: t\n" - ";; no-update-autoloads: t\n" - ";; End:\n\n" - (format ";;; %s ends here\n" basename))))) + (generate-lisp-file-trailer basename :inhibit-provide t)))) (or noninteractive (message "Generating %s...done" file))) (defun unidata-gen-charprop (&optional charprop-file text) (or charprop-file (setq charprop-file (pop command-line-args-left))) (with-temp-file charprop-file - (insert ";; Automatically generated by unidata-gen.el." - " -*- lexical-binding: t -*-\n" - ";; See the admin/unidata/ directory in the Emacs sources.\n") + (generate-lisp-file-heading + charprop-file 'unidata-gen-charprop + :commentary "See the admin/unidata/ directory in the Emacs sources.") (if text (insert text) (dolist (elt unidata-file-alist) @@ -1469,19 +1464,7 @@ Property value is a symbol `o' (Open), `c' (Close), or `n' (None)." (unidata-prop-prop proplist) (car elt) (unidata-prop-docstring proplist)))))) (or noninteractive (message "Writing %s..." charprop-file)) - (insert "\n" - (format "(provide '%s)\n" - (file-name-sans-extension - (file-name-nondirectory charprop-file))) - " \n" - ";; Local Variables:\n" - ";; coding: utf-8\n" - ";; version-control: never\n" - ";; no-byte-compile: t\n" - ";; no-update-autoloads: t\n" - ";; End:\n\n" - (format ";;; %s ends here\n" - (file-name-nondirectory charprop-file))))) + (generate-lisp-file-trailer charprop-file))) (defun unidata-gen-scripts (&optional file) ;; Running from Makefile. diff --git a/build-aux/config.guess b/build-aux/config.guess index 7f76b6228f7..160ecf0951b 100755 --- a/build-aux/config.guess +++ b/build-aux/config.guess @@ -4,7 +4,7 @@ # shellcheck disable=SC2006,SC2268 # see below for rationale -timestamp='2022-01-09' +timestamp='2022-05-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 @@ -1151,16 +1151,27 @@ EOF ;; x86_64:Linux:*:*) set_cc_for_build + CPU=$UNAME_MACHINE LIBCABI=$LIBC if test "$CC_FOR_BUILD" != no_compiler_found; then - if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_X32 >/dev/null - then - LIBCABI=${LIBC}x32 - fi + ABI=64 + sed 's/^ //' << EOF > "$dummy.c" + #ifdef __i386__ + ABI=x86 + #else + #ifdef __ILP32__ + ABI=x32 + #endif + #endif +EOF + cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'` + eval "$cc_set_abi" + case $ABI in + x86) CPU=i686 ;; + x32) LIBCABI=${LIBC}x32 ;; + esac fi - GUESS=$UNAME_MACHINE-pc-linux-$LIBCABI + GUESS=$CPU-pc-linux-$LIBCABI ;; xtensa*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC diff --git a/config.bat b/config.bat index 758e4621386..e9a180c8eed 100644 --- a/config.bat +++ b/config.bat @@ -310,7 +310,7 @@ rm -f makefile.tmp sed -f ../msdos/sedlibcf.inp < gnulib.mk-in > gnulib.tmp sed -f ../msdos/sedlibmk.inp < gnulib.tmp > gnulib.mk rm -f gnulib.tmp -Rem Create directorys in lib/ that MKDIR_P is supposed to create +Rem Create directories in lib/ that MKDIR_P is supposed to create Rem but I have no idea how to do that on MS-DOS. mkdir sys Rem Create .d files for new files in lib/ and lib/malloc/ diff --git a/configure.ac b/configure.ac index 5a82d47db3d..a2b24e39616 100644 --- a/configure.ac +++ b/configure.ac @@ -492,6 +492,7 @@ OPTION_DEFAULT_ON([threads],[don't compile with elisp threading support]) OPTION_DEFAULT_OFF([native-compilation],[compile with Emacs Lisp native compiler support]) OPTION_DEFAULT_OFF([cygwin32-native-compilation],[use native compilation on 32-bit Cygwin]) OPTION_DEFAULT_ON([xinput2],[don't use version 2 of the X Input Extension for input]) +OPTION_DEFAULT_OFF([small-ja-dic],[generate a smaller-size Japanese dictionary]) AC_ARG_WITH([file-notification],[AS_HELP_STRING([--with-file-notification=LIB], [use a file notification library (LIB one of: yes, inotify, kqueue, gfile, w32, no)])], @@ -1025,6 +1026,7 @@ AS_IF([test $gl_gcc_warnings = no], gl_WARN_ADD([-Wno-pointer-sign]) gl_WARN_ADD([-Wno-string-plus-int]) gl_WARN_ADD([-Wno-unknown-attributes]) + gl_WARN_ADD([-Wno-unknown-pragmas]) ]) ],[ isystem='-isystem ' @@ -1080,8 +1082,12 @@ AS_IF([test $gl_gcc_warnings = no], # option problematic. nw="$nw -Wsuggest-attribute=pure" + # Emacs doesn't need this paranoia. + nw="$nw -Wbidi-chars=any,ucn" + if test "$emacs_cv_clang" = yes; then nw="$nw -Wdouble-promotion" + nm="$nm -Wunknown-pragmas" fi # This causes too much noise in the MinGW build. @@ -1101,6 +1107,7 @@ AS_IF([test $gl_gcc_warnings = no], gl_WARN_ADD([-Wno-type-limits]) # Too many warnings for now gl_WARN_ADD([-Wno-unused-parameter]) # Too many warnings for now gl_WARN_ADD([-Wno-format-nonliteral]) + gl_WARN_ADD([-Wno-bidi-chars]) # clang is unduly picky about some things. if test "$emacs_cv_clang" = yes; then @@ -1618,16 +1625,63 @@ AC_DEFUN([AC_TYPE_SIZE_T]) # Likewise for obsolescent test for uid_t, gid_t; Emacs assumes them. AC_DEFUN([AC_TYPE_UID_T]) -# sqrt and other floating-point functions such as fmod and frexp -# are found in -lm on many systems. -OLD_LIBS=$LIBS -AC_SEARCH_LIBS([sqrt], [m]) -if test "X$LIBS" = "X$OLD_LIBS"; then - LIB_MATH= -else - LIB_MATH=$ac_cv_search_sqrt -fi -LIBS=$OLD_LIBS +# Check for all math.h functions that Emacs uses; on some platforms, +# -lm is needed for some of these functions. +AC_CACHE_CHECK([for math library], + [emacs_cv_lib_math], + [OLD_LIBS=$LIBS + AC_LINK_IFELSE( + [AC_LANG_SOURCE([[ + #include + int + main (int argc, char **argv) + { + double d = argc; + float f = argc; + int i = argc; + long l = argc; + d = acos (d); + d = asin (d); + d = atan (d); + d = atan2 (d, d); + d = ceil (d); + d = copysign (d, d); + d = cos (d); + d = exp (d); + d = fabs (d); + d = floor (d); + d = fmod (d, d); + d = frexp (d, &i); + d = ldexp (d, i); + d = log (d); + d = log2 (d); + d = log10 (d); + d = pow (d, d); + d = rint (d); + d = scalbn (d, l); + d = sin (d); + d = sqrt (d); + d = tan (d); + d = trunc (d); + f = fabsf (f); + f = powf (f, f); + i = ilogb (d); + i = signbit (d); + l = lrint (d); + l = lround (d); + return d == f && i == l; + } + ]])], + [emacs_cv_lib_math='none required'], + [LIBS="-lm $LIBS" + AC_LINK_IFELSE([], + [emacs_cv_lib_math=-lm], + [AC_MSG_ERROR([Math library (-lm) not found])])]) + LIBS=$OLD_LIBS]) +case $emacs_cv_lib_math in + -*) LIB_MATH=$emacs_cv_lib_math;; + *) LIB_MATH=;; +esac dnl Current possibilities handled by sed (aix4-2 -> aix, dnl gnu-linux -> gnu/linux, etc.): @@ -2031,6 +2085,16 @@ Either fix this, or re-configure with the option '--without-ns'.])]) fi fi + AC_CACHE_CHECK([for Mac OS X 12.0 or later], + [emacs_cv_macosx_12_0], + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +#include +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 120000 +Mac OS X 12.x or later. +#endif + ]])], [emacs_cv_macosx_12_0=no], + [emacs_cv_macosx_12_0=yes])) + if test "${with_native_image_api}" = yes; then AC_DEFINE(HAVE_NATIVE_IMAGE_API, 1, [Define to use native OS APIs for images.]) NATIVE_IMAGE_API="yes (ns)" @@ -6203,6 +6267,9 @@ case "$opsys" in if test "$NS_IMPL_COCOA" = "yes"; then libs_nsgui="$libs_nsgui -framework IOKit -framework Carbon \ -framework IOSurface -framework QuartzCore" + if test "$emacs_cv_macosx_12_0" = "yes"; then + libs_nsgui="$libs_nsgui -framework UniformTypeIdentifiers" + fi fi else libs_nsgui= @@ -6465,6 +6532,7 @@ AS_ECHO([" Does Emacs use -lXaw3d? ${HAVE_XAW3D Which dumping strategy does Emacs use? ${with_dumping} Does Emacs have native lisp compiler? ${HAVE_NATIVE_COMP} Does Emacs use version 2 of the the X Input Extension? ${HAVE_XINPUT2} + Does Emacs generate a smaller-size Japanese dictionary? ${with_small_ja_dic} "]) if test -n "${EMACSDATA}"; then @@ -6563,6 +6631,9 @@ SUBDIR_MAKEFILES_IN=`echo " ${SUBDIR_MAKEFILES}" | sed -e 's| | $(srcdir)/|g' -e AC_SUBST(SUBDIR_MAKEFILES_IN) +SMALL_JA_DIC=$with_small_ja_dic +AC_SUBST(SMALL_JA_DIC) + dnl You might wonder (I did) why epaths.h is generated by running make, dnl rather than just letting configure generate it from epaths.in. dnl One reason is that the various paths are not fully expanded (see above); diff --git a/doc/emacs/abbrevs.texi b/doc/emacs/abbrevs.texi index 9f339a03577..07f66ec10ac 100644 --- a/doc/emacs/abbrevs.texi +++ b/doc/emacs/abbrevs.texi @@ -411,10 +411,13 @@ away in the buffer to search for an expansion. @vindex dabbrev-check-all-buffers @vindex dabbrev-check-other-buffers +@vindex dabbrev-ignored-buffer-modes After scanning the current buffer, @kbd{M-/} normally searches other buffers. The variables @code{dabbrev-check-all-buffers} and @code{dabbrev-check-other-buffers} can be used to determine which -other buffers, if any, are searched. +other buffers, if any, are searched. Buffers that have major modes +derived from any of the modes in @code{dabbrev-ignored-buffer-modes} +are ignored. @vindex dabbrev-ignored-buffer-names @vindex dabbrev-ignored-buffer-regexps diff --git a/doc/emacs/basic.texi b/doc/emacs/basic.texi index 196a28be5a1..1a4abdc9ecd 100644 --- a/doc/emacs/basic.texi +++ b/doc/emacs/basic.texi @@ -347,11 +347,11 @@ move to the column number specified by the argument's numeric value. @kindex C-x C-n @findex set-goal-column Use the current column of point as the @dfn{semipermanent goal column} -for @kbd{C-n} and @kbd{C-p} (@code{set-goal-column}) in the current -buffer. When a semipermanent goal column is in effect, those commands -always try to move to this column, or as close as possible to it, -after moving vertically. The goal column remains in effect until -canceled. +(@code{set-goal-column}) in the current buffer. When a semipermanent +goal column is in effect, @kbd{C-n}, @kbd{C-p}, @kbd{} and +@kbd{} always try to move to this column, or as close as +possible to it, after moving vertically. The goal column remains in +effect until canceled. @item C-u C-x C-n Cancel the goal column. Henceforth, @kbd{C-n} and @kbd{C-p} try to @@ -653,14 +653,14 @@ Toggle automatic display of the current line number or column number. displayed before each line, see @ref{Display Custom}. @item M-= -Display the number of lines, words, and characters that are present in -the region (@code{count-words-region}). @xref{Mark}, for information -about the region. +Display the number of lines, sentences, words, and characters that are +present in the region (@code{count-words-region}). @xref{Mark}, for +information about the region. @item M-x count-words -Display the number of lines, words, and characters that are present in -the buffer. If the region is active (@pxref{Mark}), display the -numbers for the region instead. +Display the number of lines, sentences, words, and characters that are +present in the buffer. If the region is active (@pxref{Mark}), +display the numbers for the region instead. @item C-x = Display the character code of character after point, character position of @@ -689,7 +689,7 @@ narrowed region and the line number relative to the whole buffer. @kindex M-= @findex count-words-region @kbd{M-=} (@code{count-words-region}) displays a message reporting -the number of lines, words, and characters in the region +the number of lines, sentences, words, and characters in the region (@pxref{Mark}, for an explanation of the region). With a prefix argument, @kbd{C-u M-=}, the command displays a count for the entire buffer. diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi index 994ad460333..b79fa0a755c 100644 --- a/doc/emacs/building.texi +++ b/doc/emacs/building.texi @@ -178,7 +178,9 @@ list of customization variables and faces. If you change the variable @code{compilation-auto-jump-to-first-error} to a non-@code{nil} value, Emacs automatically visits the locus of the first error message that -appears in the @file{*compilation*} buffer. +appears in the @file{*compilation*} buffer. (This variable can also +have the values @code{if-location-known} and @code{first-known}, which +modify the conditions for automatically visiting the error locus.) Compilation mode provides the following additional commands. These commands can also be used in @file{*grep*} buffers, where the @@ -287,6 +289,19 @@ window so that the current error message is @var{n} lines from the top, whether or not there is a fringe; the default value, @code{nil}, gives the behavior described above. +@vindex compilation-hidden-output + Compilation output can sometimes be very verbose, and much of it isn't +of particular interest to a user. The +@code{compilation-hidden-output} user option should either be a regexp +or a list of regexps, and output that matches will be made invisible. +For instance, to hide the verbose output from recursive makefiles, you +can say something like: + +@lisp +(setq compilation-hidden-output + '("^make[^\n]+\n")) +@end lisp + @vindex compilation-error-regexp-alist @vindex grep-regexp-alist To parse messages from the compiler, Compilation mode uses the diff --git a/doc/emacs/cmdargs.texi b/doc/emacs/cmdargs.texi index 946afb6fc14..0f7acd87978 100644 --- a/doc/emacs/cmdargs.texi +++ b/doc/emacs/cmdargs.texi @@ -800,29 +800,45 @@ changing any environment or registry settings. @pindex addpm, MS-Windows installation program @cindex registry, setting environment variables (MS-Windows) -On MS-Windows, the installation program @command{addpm.exe} adds -values for @env{emacs_dir}, @env{EMACSLOADPATH}, @env{EMACSDATA}, -@env{EMACSPATH}, @env{EMACSDOC}, @env{SHELL} and @env{TERM} to the -@file{HKEY_LOCAL_MACHINE} section of the system registry, under -@file{/Software/GNU/Emacs}. It does this because there is no standard -place to set environment variables across different versions of -Windows. Running @command{addpm.exe} is no longer strictly necessary -in recent versions of Emacs, but if you are upgrading from an older -version, running @command{addpm.exe} ensures that you do not have -older registry entries from a previous installation, which may not be -compatible with the latest version of Emacs. - -When Emacs starts, as well as checking the environment, it also checks -the System Registry for those variables and for @env{HOME}, @env{LANG} -and @env{PRELOAD_WINSOCK}. +On MS-Windows, the environment variables @env{emacs_dir}, +@env{EMACSLOADPATH}, @env{EMACSDATA}, @env{EMACSPATH}, @env{EMACSDOC}, +@env{SHELL}, @env{TERM}, @env{HOME}, @env{LANG}, and +@env{PRELOAD_WINSOCK} can also be set in the @file{HKEY_CURRENT_USER} +or the @file{HKEY_LOCAL_MACHINE} section of the system registry, under +the @file{/Software/GNU/Emacs} key. When Emacs starts, as well as +checking the environment, it also checks the system registry for those +variables. To determine the value of those variables, Emacs goes through the -following procedure. First, the environment is checked. If the -variable is not found there, Emacs looks for registry keys by that -name under @file{/Software/GNU/Emacs}; first in the +following procedure. First, it checks the environment. If the +variable is not found there, Emacs looks for a registry key by the +name of the variable under @file{/Software/GNU/Emacs}; first in the @file{HKEY_CURRENT_USER} section of the registry, and if not found there, in the @file{HKEY_LOCAL_MACHINE} section. Finally, if Emacs -still cannot determine the values, compiled-in defaults are used. +still cannot determine the values, it uses the compiled-in defaults. + +Note that the registry settings have global system-wide effect: they +will affect all Emacs sessions run on the system. Thus, if you run +different Emacs versions, or use both installed and un-installed Emacs +executables, or build newer versions of Emacs, the settings in the +registry will cause all of them to use the same directories, which is +probably not what you want. For this reason, @emph{we recommend +against setting these variables in the registry}. If you have such +settings in the registry, we recommend that you remove them. + +If you run the Emacs MS-Windows installation program +@command{addpm.exe}, it will update any existing registry settings of +the @env{emacs_dir}, @env{EMACSLOADPATH}, @env{EMACSDATA}, +@env{EMACSPATH}, @env{EMACSDOC}, @env{SHELL}, and @env{TERM} variables +to have the values suitable for the installed Emacs version with which +@command{addpm.exe} came. Note that @command{addpm.exe} will +@emph{not} create any registry setting that didn't exist, it will only +update existing settings, which are most probably inherited from an +old Emacs installation, so that they are compatible with the newly +installed Emacs version. Running @command{addpm.exe} is no longer +necessary when installing recent versions of Emacs, so we only +recommend doing that if you are upgrading from an older version, and +cannot remove these settings from the registry for some reason. In addition to the environment variables above, you can also add settings to the @file{/Software/GNU/Emacs} registry key to specify X diff --git a/doc/emacs/dired.texi b/doc/emacs/dired.texi index 92106ae1ed3..9e14e0f9a99 100644 --- a/doc/emacs/dired.texi +++ b/doc/emacs/dired.texi @@ -122,7 +122,7 @@ listing. As an exception, if you type @kbd{C-x C-j} in a Dired buffer, Emacs displays the directory listing of the parent directory and places point on the line that corresponds to the directory where you invoked @code{dired-jump}. Typing @kbd{C-x 4 C-j} -(@code{dired-jump-other-window} has the same effect, but displays the +(@code{dired-jump-other-window}) has the same effect, but displays the Dired buffer in a new window. The variable @code{dired-listing-switches} specifies the options to @@ -1711,6 +1711,9 @@ the originating program. Dragging files out of a Dired buffer is also supported, by enabling the user option @code{dired-mouse-drag-files}, the mouse can be used to drag files onto other programs. When set to @code{link}, it will make the other program (typically a file manager) -create a symbolic link to the file, and setting it to any other -non-@code{nil} value will make the other program open or create a copy -of the file. +create a symbolic link to the file; when set to @code{move}, it will +make the other program move the file to a new location, and setting it +to any other non-@code{nil} value will make the other program open or +create a copy of the file. The keyboard modifiers pressed during the +drag-and-drop operation can also control what action the other program +takes towards the file. diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi index 7a6c7f391b9..16d6d5567e2 100644 --- a/doc/emacs/display.texi +++ b/doc/emacs/display.texi @@ -1594,7 +1594,9 @@ charge on the mode-line, by using the command @code{battery-mode-line-format} determines the way the battery charge is displayed; the exact mode-line message depends on the operating system, and it usually shows the current battery charge as a -percentage of the total charge. +percentage of the total charge. The functions in +@code{battery-update-functions} are run after updating the mode line, +and can be used to trigger actions based on the battery status. @cindex mode line, 3D appearance @cindex attributes of mode line, changing @@ -1980,7 +1982,7 @@ The command @kbd{M-x display-line-numbers-mode} provides a convenient way to turn on display of line numbers. This mode has a globalized variant, @code{global-display-line-numbers-mode}. The user option @code{display-line-numbers-type} controls which sub-mode of -line-number display, described above, will these modes activate. +line-number display, described above, these modes will activate. @noindent Note that line numbers are not displayed in the minibuffer and in the diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi index ffd8079fc15..062185fb4af 100644 --- a/doc/emacs/files.texi +++ b/doc/emacs/files.texi @@ -326,6 +326,48 @@ of @code{require-final-newline} (@pxref{Customize Save}). If you have already visited the same file in the usual (non-literal) manner, this command asks you whether to visit it literally instead. +@findex find-sibling-file +@vindex find-sibling-rules +Files are sometimes (loosely) tied to other files, and you could call +these files @dfn{sibling files}. For instance, when editing C files, +if you have a file called @samp{"foo.c"}, you often also have a file +called @samp{"foo.h"}, and that could be its sibling file. Or you may +have different versions of a file, for instance +@samp{"src/emacs/emacs-27/lisp/allout.el"} and +@samp{"src/emacs/emacs-28/lisp/allout.el"} might be considered +siblings. Emacs provides the @code{find-sibling-file} command to jump +between sibling files, but it's impossible to guess at which files a +user might want to be considered siblings, so Emacs lets you configure +this freely by altering the @code{find-sibling-rules} user option. +This is a list of match/expansion elements. + +For instance, to do the @samp{".c"} to @samp{".h"} mapping, you could +say: + +@lisp +(setq find-sibling-rules + '(("\\([^/]+\\)\\.c\\'" "\\1.h"))) +@end lisp + +(@code{ff-find-related-file} offers similar functionality especially +geared towards C files, @pxref{Other C Commands}.) + +Or, if you want to consider all files under +@samp{"src/emacs/DIR/file-name"} to be siblings of other @var{dir}s, +you could say: + +@lisp +(setq find-sibling-rules + '(("src/emacs/[^/]+/\\(.*\\)\\'" "src/emacs/.*/\\1"))) +@end lisp + +As you can see, this is a list of @var{(MATCH EXPANSION...)} elements. +The @var{match} is a regular expression that matches the visited file +name, and each @var{expansion} may refer to match groups by using +@samp{\\1} and so on. The resulting expansion string is then applied +to the file system to see if any files match this expansion +(interpreted as a regexp). + @vindex find-file-hook @vindex find-file-not-found-functions Two special hook variables allow extensions to modify the operation diff --git a/doc/emacs/frames.texi b/doc/emacs/frames.texi index 7c564a87763..fa248c1a586 100644 --- a/doc/emacs/frames.texi +++ b/doc/emacs/frames.texi @@ -128,6 +128,12 @@ In addition, the text in the region becomes the primary selection non-@code{nil} value, dragging the mouse over a stretch of text also adds the text to the kill ring. The default is @code{nil}. + If this variable is @code{non-empty}, only copy to the kill ring if +the region is non-empty. For instance, if you mouse drag an area that +is less than a half a character, you'd normally get the empty string +in your kill ring, but with @code{non-empty}, this short mouse drag +won't affect the kill ring. + @vindex mouse-scroll-min-lines If you move the mouse off the top or bottom of the window while dragging, the window scrolls at a steady rate until you move the mouse @@ -136,6 +142,12 @@ entirely on the screen. The number of lines scrolled per step depends on how far away from the window edge the mouse has gone; the variable @code{mouse-scroll-min-lines} specifies a minimum step size. +@vindex mouse-drag-mode-line-buffer + If you enable the option @code{mouse-drag-mode-line-buffer} and +dragging files is supported by the window system, then dragging the +mouse on the buffer name portion of the mode line will drag that +buffer's file to another program or frame. + @findex mouse-yank-primary @findex mouse-yank-at-click Clicking with the middle mouse button, @kbd{mouse-2}, moves point to @@ -1651,11 +1663,15 @@ For additional customization options for displaying tooltips, use @kbd{M-x customize-group @key{RET} tooltip @key{RET}}. @vindex use-system-tooltips - If Emacs is built with the GTK+ toolkit or Haiku windowing support, -it displays tooltips via the toolkit, using the default appearance of -the toolkit's tooltips. To disable this, change the variable + If Emacs is built with the GTK+ toolkit, Nextstep windowing, or +Haiku windowing support, it displays tooltips via the toolkit, using +the default appearance of the toolkit's tooltips.@footnote{The +foreground and background colors of toolkit-created tooltips on +Nextstep can also be customized by setting the @code{foreground} and +@code{background} frame parameters that are part of +@code{tooltip-frame-parameters}.} To disable this, change the variable @code{use-system-tooltips} to @code{nil}. If you do this, or if Emacs -is built without GTK+ or Haiku windowing support, most attributes of +is built without the appropriate windowing support, most attributes of the tooltip text are specified by the @code{tooltip} face, and by X resources (@pxref{X Resources}). diff --git a/doc/emacs/glossary.texi b/doc/emacs/glossary.texi index 7e0c84d7237..a78a2c9e2d7 100644 --- a/doc/emacs/glossary.texi +++ b/doc/emacs/glossary.texi @@ -229,9 +229,11 @@ from a variety of coding systems when reading or writing it. @item Command A command is a Lisp function specially defined to be able to serve as a key binding in Emacs or to be invoked by its name -(@pxref{Glossary---Command Name}). When you type a key sequence -(q.v.), its binding (q.v.@:) is looked up in the relevant keymaps -(q.v.@:) to find the command to run. @xref{Commands}. +(@pxref{Glossary---Command Name}). (Another term for @dfn{command} is +@dfn{interactive function}---they are used interchangeably.) When you +type a key sequence (q.v.), its binding (q.v.@:) is looked up in the +relevant keymaps (q.v.@:) to find the command to run. +@xref{Commands}. @item Command History @xref{Glossary---Minibuffer History}. @@ -775,6 +777,14 @@ typing sequences of @acronym{ASCII} characters (q.v.). @xref{Input Methods}. Insertion means adding text into the buffer, either from the keyboard or from some other place in Emacs. +@item Interactive Function +A different term for @dfn{command} (q.v.). + +@item Interactive Invocation +A function can be called from Lisp code, or called as a user level +command (via @kbd{M-x}, a key binding or a menu). In the latter case, +the function is said to be @dfn{called interactively}. + @item Interlocking @xref{Glossary---File Locking}. diff --git a/doc/emacs/killing.texi b/doc/emacs/killing.texi index 2fd2d21dd35..4435f6e4946 100644 --- a/doc/emacs/killing.texi +++ b/doc/emacs/killing.texi @@ -111,24 +111,27 @@ active (@pxref{Using Region}). @kindex M-\ @findex delete-horizontal-space -@kindex M-SPC -@findex just-one-space -@findex cycle-spacing - The other delete commands are those that delete only whitespace +The other delete commands are those that delete only whitespace characters: spaces, tabs and newlines. @kbd{M-\} (@code{delete-horizontal-space}) deletes all the spaces and tab characters before and after point. With a prefix argument, this only -deletes spaces and tab characters before point. @kbd{M-@key{SPC}} -(@code{just-one-space}) does likewise but leaves a single space before +deletes spaces and tab characters before point. + +@findex just-one-space +@code{just-one-space} does likewise but leaves a single space before point, regardless of the number of spaces that existed previously (even if there were none before). With a numeric argument @var{n}, it leaves @var{n} spaces before point if @var{n} is positive; if @var{n} is negative, it deletes newlines in addition to spaces and tabs, -leaving @minus{}@var{n} spaces before point. The command @code{cycle-spacing} -acts like a more flexible version of @code{just-one-space}. It -does different things if you call it repeatedly in succession. -The first call acts like @code{just-one-space}, the next removes -all whitespace, and a third call restores the original whitespace. +leaving @minus{}@var{n} spaces before point. + +@kindex M-SPC +@findex cycle-spacing +@vindex cycle-spacing-actions +The command @code{cycle-spacing} (@kbd{M-@key{SPC}}) acts like a more +flexible version of @code{just-one-space}. It performs different +space cleanup actions defined by @code{cycle-spacing-actions}, in a +cyclic manner, if you call it repeatedly in succession. @kbd{C-x C-o} (@code{delete-blank-lines}) deletes all blank lines after the current line. If the current line is blank, it deletes all diff --git a/doc/emacs/kmacro.texi b/doc/emacs/kmacro.texi index 60880941db3..88df2937659 100644 --- a/doc/emacs/kmacro.texi +++ b/doc/emacs/kmacro.texi @@ -179,7 +179,7 @@ itself counts as the first repetition, since it is executed as you define it, so @kbd{C-u 4 C-x )} executes the macro immediately 3 additional times. -@findex kdb-macro-redisplay +@findex kmacro-redisplay @kindex C-x C-k d While executing a long-running keyboard macro, it can sometimes be useful to trigger a redisplay (to show how far we've gotten). The diff --git a/doc/emacs/macos.texi b/doc/emacs/macos.texi index 37f48619d12..d7c432d420e 100644 --- a/doc/emacs/macos.texi +++ b/doc/emacs/macos.texi @@ -223,6 +223,7 @@ keystrokes. Here is a list of these events. @table @key @item ns-open-file +@cindex ns-open-file event @vindex ns-pop-up-frames This event occurs when another Nextstep application requests that Emacs open a file. A typical reason for this would be a user @@ -239,44 +240,29 @@ means to always visit the file in a new frame. A value of @code{nil} means to always visit the file in the selected frame. @item ns-open-temp-file +@cindex ns-open-temp-file event This event occurs when another application requests that Emacs open a temporary file. By default, this is handled by just generating a @code{ns-open-file} event, the results of which are described above. @item ns-open-file-line +@cindex ns-open-file-line event Some applications, such as ProjectBuilder and gdb, request not only a particular file, but also a particular line or sequence of lines in the file. Emacs handles this by visiting that file and highlighting the requested line (@code{ns-open-file-select-line}). -@item ns-drag-n-drop -This event occurs when a user drags an object from another application -into an Emacs frame. The default behavior is to open a file in the -window under the mouse, or to insert text at point of the window under -the mouse. - -The sending application has some limited ability to decide how Emacs -handles the sent object, but the user may override the default -behavior by holding one or more modifier key. - -@table @kbd -@item control -Insert as text in the current buffer. If the object is a file, this -will insert the filename. -@item alt/option -Attempt to open the object as though it is a file or URL. -@item super/command -Perform the default action for the type. This can be useful when an -application is overriding the default behavior. -@end table - -The modifier keys listed above are defined by macOS and are unaffected -by user changes to the modifiers in Emacs. - @item ns-power-off +@cindex ns-power-off event This event occurs when the user logs out and Emacs is still running, or when ``Quit Emacs'' is chosen from the application menu. The default behavior is to save all file-visiting buffers. + +@item ns-show-prefs +@cindex ns-show-prefs event +This event occurs when the user selects ``Preferences'' from the +application menu. By default, it is bound to the command +@code{customize}. @end table @cindex using Nextstep services (macOS) diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi index cca8441daa5..e5b3664a4cc 100644 --- a/doc/emacs/maintaining.texi +++ b/doc/emacs/maintaining.texi @@ -1316,6 +1316,12 @@ point is on a directory entry, mark all files in that directory tree (@code{vc-dir-mark-all-files}). With a prefix argument, mark all listed files and directories. +@findex vc-dir-mark-by-regexp +@item % +You can use this command to mark files by regexp +(@code{vc-dir-mark-by-regexp}). If given a prefix, unmark files +instead. + @item G Add the file under point to the list of files that the VC should ignore (@code{vc-dir-ignore}). For instance, if the VC is Git, it @@ -1660,6 +1666,9 @@ support additional types of projects. Which files do or don't belong to a project is also determined by the project back-end. For example, the VC back-end doesn't consider ``ignored'' files (@pxref{VC Ignore}) to be part of the project. +Also, the VC Project back-end considers ``untracked'' files by default. +That behavior is controllable with the variable +@code{project-vc-include-untracked}. @menu * Project File Commands:: Commands for handling project files. @@ -2817,6 +2826,13 @@ place of a file name on the command line. @command{etags} will read from standard input and mark the produced tags as belonging to the file @var{file}. + For C and C++, if the source files don't observe the GNU Coding +Standards' convention if having braces (@samp{@{} and @samp{@}}) in +column zero only for top-level definitions, like functions and +@code{struct} definitions, we advise that you use the +@samp{--ignore-indentation} option, to prevent @command{etags} from +incorrectly interpreting closing braces in column zero. + @samp{etags --help} outputs the list of the languages @command{etags} knows, and the file name rules for guessing the language. It also prints a list of all the available @command{etags} options, together with a short diff --git a/doc/emacs/mark.texi b/doc/emacs/mark.texi index 91c44d527b3..ad25ed6a8aa 100644 --- a/doc/emacs/mark.texi +++ b/doc/emacs/mark.texi @@ -291,12 +291,23 @@ instead signal an error if the mark is inactive. @cindex Delete Selection mode @cindex mode, Delete Selection @findex delete-selection-mode +@vindex delete-selection-temporary-region By default, text insertion occurs normally even if the mark is active---for example, typing @kbd{a} inserts the character @samp{a}, then deactivates the mark. Delete Selection mode, a minor mode, modifies this behavior: if you enable that mode, then inserting text while the mark is active causes the text in the region to be deleted -first. To toggle Delete Selection mode on or off, type @kbd{M-x +first. However, you can tune this behavior by customizing the +@code{delete-selection-temporary-region} option. Its default value is +@code{nil}, but you can set it to @code{t}, in which case only +temporarily-active regions will be replaced: those which are set by +dragging the mouse (@pxref{Setting Mark}) or by shift-selection +(@pxref{Shift Selection}), as well as by @kbd{C-u C-x C-x} when +Transient Mark Mode is disabled. You can further tune the behavior by +setting @code{delete-selection-temporary-region} to @code{selection}: +then temporary regions by @kbd{C-u C-x C-x} won't be replaced, only +the ones activated by dragging the mouse or shift-selection. To +toggle Delete Selection mode on or off, type @kbd{M-x delete-selection-mode}. @node Mark Ring diff --git a/doc/emacs/mini.texi b/doc/emacs/mini.texi index a899fea7e39..4e71793b66e 100644 --- a/doc/emacs/mini.texi +++ b/doc/emacs/mini.texi @@ -381,16 +381,16 @@ used with the completion list: @vindex minibuffer-completion-auto-choose @item M-@key{DOWN} @itemx M-@key{UP} -These keys will navigate through the completions displayed in the -completions buffer. When @code{minibuffer-completion-auto-choose} is -non-@code{nil} (which is the default), using these commands will -automatically insert the current completion candidate in the -minibuffer. If this user option is @code{nil}, the keys will navigate -the same way as before, but won't automatically insert the candidate -in the minibuffer. Instead you have to use the @kbd{M-@key{RET}} command to -do that. With a prefix argument, @kbd{C-u M-@key{RET}} inserts the -currently active candidate to the minibuffer, but doesn't exit the -minibuffer. +While in the minibuffer, these keys navigate through the completions +displayed in the completions buffer. When +@code{minibuffer-completion-auto-choose} is non-@code{nil} (which is +the default), using these commands also inserts the current completion +candidate into the minibuffer. If +@code{minibuffer-completion-auto-choose} is @code{nil}, you can use +the @kbd{M-@key{RET}} command to insert the completion candidates into +the minibuffer. By default, that exits the minibuffer, but with a +prefix argument, @kbd{C-u M-@key{RET}} inserts the currently active +candidate without exiting the minibuffer. @findex switch-to-completions @item M-v @@ -407,7 +407,10 @@ ways (@pxref{Windows}). @itemx mouse-1 @itemx mouse-2 While in the completion list buffer, this chooses the completion at -point (@code{choose-completion}). +point (@code{choose-completion}). With a prefix argument, @kbd{C-u +@key{RET}} inserts the completion at point into the minibuffer, but +doesn't exit the minibuffer---thus, you can change your mind and +choose another candidate. @findex next-completion @item @key{TAB} @@ -682,17 +685,20 @@ behavior only when there are @var{n} or fewer alternatives. @vindex completions-format When displaying completions, Emacs will normally pop up a new buffer -to display the completions. The completions will (by default) be -sorted in columns horizontally in alphabetical order, but this can be -changed by changing the @code{completions-format} user option. If -@code{vertical}, sort the completions vertically in columns instead, -and if @code{one-column}, just use a single column. +to display the completions. The completions will by default be sorted +horizontally, using as many columns as will fit in the window-width, +but this can be changed by customizing the @code{completions-format} +user option. If its value is @code{vertical}, Emacs will sort the +completions vertically instead, and if it's @code{one-column}, Emacs +will use just one column. @vindex completions-sort - This user option controls how completions are sorted in the -@samp{*Completions*} buffer. The default is @code{alphabetical}, but -it can also be a function which will be called with the list of -completions, and should return the list in the desired order. + The @code{completions-sort} user option controls the order in which +the completions are sorted in the @samp{*Completions*} buffer. The +default is @code{alphabetical}, which sorts in alphabetical order. +The value @code{nil} disables sorting. The value can also be a +function, which will be called with the list of completions, and +should return the list in the desired order. @vindex completions-max-height When @code{completions-max-height} is non-@code{nil}, it limits the diff --git a/doc/emacs/package.texi b/doc/emacs/package.texi index bd3ae2aa6ad..eb4f5b0edab 100644 --- a/doc/emacs/package.texi +++ b/doc/emacs/package.texi @@ -89,6 +89,11 @@ list of available packages from package archive servers. If the network is unavailable, it falls back on the most recently retrieved list. +The main command to use in the package list buffer is the @key{x} +command. If the package under point isn't installed already, this +command will install it. If the package under point is already +installed, this command will delete it. + The following commands are available in the package menu: @table @kbd @@ -162,7 +167,10 @@ installed versions (marked with status @samp{obsolete}). @findex package-menu-execute Download and install all packages marked with @kbd{i}, and their dependencies; also, delete all packages marked with @kbd{d} -(@code{package-menu-execute}). This also removes the marks. +(@code{package-menu-execute}). This also removes the marks. If no +packages are marked, this command will install the package under point +(if it isn't installed already), or delete the package under point (if +it's already installed). @item g @item r @@ -321,12 +329,14 @@ version of the package, a newer version is also installed. @findex package-install @findex package-update +@findex package-update-all Packages are most conveniently installed using the package menu (@pxref{Package Menu}), but you can also use the command @kbd{M-x package-install}. This prompts for the name of a package with the @samp{available} status, then downloads and installs it. Similarly, if you want to update a package, you can use the @kbd{M-x -package-update} command. +package-update} command, and if you just want to update all the +packages, you can use the @kbd{M-x package-update-all} command. @cindex package requirements A package may @dfn{require} certain other packages to be installed, diff --git a/doc/emacs/programs.texi b/doc/emacs/programs.texi index 45bc4c79b4f..795aabee743 100644 --- a/doc/emacs/programs.texi +++ b/doc/emacs/programs.texi @@ -250,10 +250,10 @@ where it treats each chapter, section, etc., as a definition. together.) @findex imenu - If you type @kbd{M-g i}, it reads the name of a definition using the -minibuffer, then moves point to that definition. You can use -completion to specify the name; the command always displays the whole -list of valid names. + If you type @kbd{M-g i} (@code{imenu}), it reads the name of a +definition using the minibuffer, then moves point to that definition. +You can use completion to specify the name; the command always +displays the whole list of valid names. @findex imenu-add-menubar-index Alternatively, you can bind the command @code{imenu} to a mouse @@ -1439,9 +1439,13 @@ performs completion using the function, variable, or property names defined in the current Emacs session. In all other respects, in-buffer symbol completion behaves like -minibuffer completion. For instance, if Emacs cannot complete to a -unique symbol, it displays a list of completion alternatives in -another window. @xref{Completion}. +minibuffer completion. For instance, if Emacs cannot complete to +a unique symbol, it displays a list of completion alternatives in +another window. Then you can use the keys @kbd{M-@key{DOWN}} and +@kbd{M-@key{UP}} to navigate through the completions displayed +in the completions buffer without leaving the original buffer, +and the key @kbd{M-@key{RET}} to insert the currently highlighted +completion to the buffer. @xref{Completion}. In Text mode and related modes, @kbd{M-@key{TAB}} completes words based on the spell-checker's dictionary. @xref{Spelling}. diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi index c990f5d766a..f4e12d29e99 100644 --- a/doc/emacs/search.texi +++ b/doc/emacs/search.texi @@ -1027,24 +1027,11 @@ you search for @samp{a.*?$} against the text @samp{abbab} followed by a newline, it matches the whole string. Since it @emph{can} match starting at the first @samp{a}, it does. -@item @kbd{\@{@var{n}\@}} -is a postfix operator specifying @var{n} repetitions---that is, the -preceding regular expression must match exactly @var{n} times in a -row. For example, @samp{x\@{4\@}} matches the string @samp{xxxx} and -nothing else. - -@item @kbd{\@{@var{n},@var{m}\@}} -is a postfix operator specifying between @var{n} and @var{m} -repetitions---that is, the preceding regular expression must match at -least @var{n} times, but no more than @var{m} times. If @var{m} is -omitted, then there is no upper limit, but the preceding regular -expression must match at least @var{n} times.@* @samp{\@{0,1\@}} is -equivalent to @samp{?}. @* @samp{\@{0,\@}} is equivalent to -@samp{*}. @* @samp{\@{1,\@}} is equivalent to @samp{+}. - +@cindex set of alternative characters, in regular expressions +@cindex character set, in regular expressions @item @kbd{[ @dots{} ]} -is a @dfn{character set}, beginning with @samp{[} and terminated by -@samp{]}. +is a @dfn{set of alternative characters}, or a @dfn{character set}, +beginning with @samp{[} and terminated by @samp{]}. In the simplest case, the characters between the two brackets are what this set can match. Thus, @samp{[ad]} matches either one @samp{a} or @@ -1061,9 +1048,10 @@ which matches any lower-case @acronym{ASCII} letter or @samp{$}, @samp{%} or period. As another example, @samp{[α-ωί]} matches all lower-case Greek letters. +@cindex character classes, in regular expressions You can also include certain special @dfn{character classes} in a character set. A @samp{[:} and balancing @samp{:]} enclose a -character class inside a character alternative. For instance, +character class inside a set of alternative characters. For instance, @samp{[[:alnum:]]} matches any letter or digit. @xref{Char Classes,,, elisp, The Emacs Lisp Reference Manual}, for a list of character classes. @@ -1131,13 +1119,13 @@ no preceding expression on which the @samp{*} can act. It is poor practice to depend on this behavior; it is better to quote the special character anyway, regardless of where it appears. -As a @samp{\} is not special inside a character alternative, it can -never remove the special meaning of @samp{-} or @samp{]}. So you -should not quote these characters when they have no special meaning -either. This would not clarify anything, since backslashes can -legitimately precede these characters where they @emph{have} special -meaning, as in @samp{[^\]} (@code{"[^\\]"} for Lisp string syntax), -which matches any single character except a backslash. +As a @samp{\} is not special inside a set of alternative characters, it can +never remove the special meaning of @samp{-}, @samp{^} or @samp{]}. +You should not quote these characters when they have no special +meaning. This would not clarify anything, since backslashes +can legitimately precede these characters where they @emph{have} +special meaning, as in @samp{[^\]} (@code{"[^\\]"} for Lisp string +syntax), which matches any single character except a backslash. @node Regexp Backslash @section Backslash in Regular Expressions @@ -1202,11 +1190,11 @@ matches the same text that matched the @var{d}th occurrence of a @samp{\( @dots{} \)} construct. This is called a @dfn{back reference}. -After the end of a @samp{\( @dots{} \)} construct, the matcher remembers -the beginning and end of the text matched by that construct. Then, -later on in the regular expression, you can use @samp{\} followed by the -digit @var{d} to mean ``match the same text matched the @var{d}th time -by the @samp{\( @dots{} \)} construct''. +After the end of a @samp{\( @dots{} \)} construct, the matcher +remembers the beginning and end of the text matched by that construct. +Then, later on in the regular expression, you can use @samp{\} +followed by the digit @var{d} to mean ``match the same text matched +the @var{d}th @samp{\( @dots{} \)} construct''. The strings matching the first nine @samp{\( @dots{} \)} constructs appearing in a regular expression are assigned numbers 1 through 9 in @@ -1223,6 +1211,21 @@ If a particular @samp{\( @dots{} \)} construct matches more than once (which can easily happen if it is followed by @samp{*}), only the last match is recorded. +@item @kbd{\@{@var{m}\@}} +is a postfix operator specifying @var{m} repetitions---that is, the +preceding regular expression must match exactly @var{m} times in a +row. For example, @samp{x\@{4\@}} matches the string @samp{xxxx} and +nothing else. + +@item @kbd{\@{@var{m},@var{n}\@}} +is a postfix operator specifying between @var{m} and @var{n} +repetitions---that is, the preceding regular expression must match at +least @var{m} times, but no more than @var{n} times. If @var{n} is +omitted, then there is no upper limit, but the preceding regular +expression must match at least @var{m} times.@* @samp{\@{0,1\@}} is +equivalent to @samp{?}. @* @samp{\@{0,\@}} is equivalent to +@samp{*}. @* @samp{\@{1,\@}} is equivalent to @samp{+}. + @item \` matches the empty string, but only at the beginning of the string or buffer (or its accessible portion) being matched against. @@ -1824,12 +1827,18 @@ occurrence of @var{string}. When done, exit the recursive editing level with @kbd{C-M-c} to proceed to the next occurrence. @item e -@itemx E to edit the replacement string in the minibuffer. When you exit the minibuffer by typing @key{RET}, the minibuffer contents replace the current occurrence of the pattern. They also become the new replacement string for any further occurrences. +@item E +is like @kbd{e}, but the next replacement will be done with exact +case. I.e., if you have a @code{query-replace} from @samp{foo} to +@samp{bar}, a text like @samp{Foo} will be normally be replaced with +@samp{Bar}. Use this command to do the current replacement with exact +case. + @item C-l to redisplay the screen. Then you must type another character to specify what to do with this occurrence. diff --git a/doc/emacs/sending.texi b/doc/emacs/sending.texi index ea87e0a77b6..cc54224200a 100644 --- a/doc/emacs/sending.texi +++ b/doc/emacs/sending.texi @@ -659,6 +659,7 @@ such as MIME support. Another available mode is MH-E (@pxref{Top,,MH-E,mh-e, The Emacs Interface to MH}). @vindex mail-user-agent +@findex define-mail-user-agent You can choose any of these @dfn{mail user agents} as your preferred method for editing and sending mail. The commands @kbd{C-x m}, @kbd{C-x 4 m} and @kbd{C-x 5 m} use whichever agent you have @@ -667,7 +668,10 @@ the bug reporter (@pxref{Bugs}). To specify a mail user agent, customize the variable @code{mail-user-agent}. Currently, legitimate values include @code{message-user-agent} (Message mode) @code{sendmail-user-agent} (Mail mode), @code{gnus-user-agent}, and -@code{mh-e-user-agent}. +@code{mh-e-user-agent}. Additional options may be available; check +in the manual of your mail user agent package for details. You may +also define another mail user agent using +@code{define-mail-user-agent}. If you select a different mail-composition method, the information in this chapter about the mail buffer and Message mode does not apply; diff --git a/doc/emacs/vc1-xtra.texi b/doc/emacs/vc1-xtra.texi index 2d984f4b926..3ccad507159 100644 --- a/doc/emacs/vc1-xtra.texi +++ b/doc/emacs/vc1-xtra.texi @@ -269,7 +269,7 @@ with the file's version control type. @vindex vc-handled-backends The variable @code{vc-handled-backends} determines which version control systems VC should handle. The default value is @code{(RCS CVS -SVN SCCS SRC Bzr Git Hg Mtn)}, so it contains all the version systems +SVN SCCS SRC Bzr Git Hg)}, so it contains all the version systems that are currently supported. If you want VC to ignore one or more of these systems, exclude its name from the list. To disable VC entirely, set this variable to @code{nil}. diff --git a/doc/lispref/buffers.texi b/doc/lispref/buffers.texi index d8cf3d7919b..1cbe8bc0933 100644 --- a/doc/lispref/buffers.texi +++ b/doc/lispref/buffers.texi @@ -541,10 +541,12 @@ file formerly visited. @ref{Text}. @defun buffer-modified-p &optional buffer -This function returns @code{t} if the buffer @var{buffer} has been modified -since it was last read in from a file or saved, or @code{nil} -otherwise. If @var{buffer} is not supplied, the current buffer -is tested. +This function returns non-@code{nil} if @var{buffer} has +been modified since it was last read in from a file or saved, or +@code{nil} otherwise. If @var{buffer} has been auto-saved since the +time it was last modified, this function returns the symbol +@code{autosaved}. If @var{buffer} is @code{nil} or omitted, it +defaults to the current buffer. @end defun @defun set-buffer-modified-p flag @@ -563,8 +565,10 @@ function @code{force-mode-line-update} works by doing this: @end defun @defun restore-buffer-modified-p flag -Like @code{set-buffer-modified-p}, but does not force redisplay -of mode lines. +Like @code{set-buffer-modified-p}, but does not force redisplay of +mode lines. This function also allows @var{flag}'s value to be +the symbol @code{autosaved}, which marks the buffer as modified and +auto-saved after the last modification. @end defun @deffn Command not-modified &optional arg diff --git a/doc/lispref/commands.texi b/doc/lispref/commands.texi index 6c60216796c..0a82bba3bc7 100644 --- a/doc/lispref/commands.texi +++ b/doc/lispref/commands.texi @@ -2615,7 +2615,7 @@ POSITION is assumed to lie in a window text area." @end example @end defun -@defun posn-col-row position +@defun posn-col-row position &optional use-window This function returns a cons cell @w{@code{(@var{col} . @var{row})}}, containing the estimated column and row corresponding to buffer position described by @var{position}. The return value is given in @@ -2623,7 +2623,11 @@ units of the frame's default character width and default line height (including spacing), as computed from the @var{x} and @var{y} values corresponding to @var{position}. (So, if the actual characters have non-default sizes, the actual row and column may differ from these -computed values.) +computed values.) If the optional @var{window} argument is +non-@code{nil}, use the default character width in the window +indicated by @var{position} instead of the frame. (This makes a +difference if that window is showing a buffer with a non-default +zooming level, for instance.) Note that @var{row} is counted from the top of the text area. If the window given by @var{position} possesses a header line (@pxref{Header diff --git a/doc/lispref/control.texi b/doc/lispref/control.texi index 2f1666ba771..d4520ebdee5 100644 --- a/doc/lispref/control.texi +++ b/doc/lispref/control.texi @@ -525,7 +525,7 @@ core pattern can have the following forms: @table @code -@item _ +@item _@r{ (underscore)} Matches any @var{expval}. This is also known as @dfn{don't care} or @dfn{wildcard}. @@ -629,7 +629,10 @@ Attempts to match @var{pattern1}, @var{pattern2}, @dots{}, in order, until one of them succeeds. In that case, @code{or} likewise matches, and the rest of the sub-patterns are not tested. -To present a consistent environment (@pxref{Intro Eval}) +To present a consistent environment +@ifnottex +(@pxref{Intro Eval}) +@end ifnottex to @var{body-forms} (thus avoiding an evaluation error on match), the set of variables bound by the pattern is the union of the variables bound by each sub-pattern. If a variable is not bound by diff --git a/doc/lispref/customize.texi b/doc/lispref/customize.texi index 54059d7b6ed..528421bf3b4 100644 --- a/doc/lispref/customize.texi +++ b/doc/lispref/customize.texi @@ -376,7 +376,7 @@ name) and the new value, and should do whatever is necessary to update the value properly for this option (which may not mean simply setting the option as a Lisp variable); preferably, though, it should not modify its value argument destructively. The default for -@var{setfunction} is @code{set-default}. +@var{setfunction} is @code{set-default-toplevel-value}. If you specify this keyword, the variable's documentation string should describe how to do the same job in hand-written Lisp code. @@ -387,7 +387,7 @@ Specify @var{getfunction} as the way to extract the value of this option. The function @var{getfunction} should take one argument, a symbol, and should return whatever customize should use as the current value for that symbol (which need not be the symbol's Lisp -value). The default is @code{default-value}. +value). The default is @code{default-toplevel-value}. You have to really understand the workings of Custom to use @code{:get} correctly. It is meant for values that are treated in @@ -409,11 +409,11 @@ do not reinitialize it if it is already non-void. @item custom-initialize-default Like @code{custom-initialize-set}, but use the function -@code{set-default} to set the variable, instead of the variable's -@code{:set} function. This is the usual choice for a variable whose -@code{:set} function enables or disables a minor mode; with this choice, -defining the variable will not call the minor mode function, but -customizing the variable will do so. +@code{set-default-toplevel-value} to set the variable, instead of the +variable's @code{:set} function. This is the usual choice for a +variable whose @code{:set} function enables or disables a minor mode; +with this choice, defining the variable will not call the minor mode +function, but customizing the variable will do so. @item custom-initialize-reset Always use the @code{:set} function to initialize the variable. If @@ -424,7 +424,7 @@ This is the default @code{:initialize} function. @item custom-initialize-changed Use the @code{:set} function to initialize the variable, if it is already set or has been customized; otherwise, just use -@code{set-default}. +@code{set-default-toplevel-value}. @item custom-initialize-delay This function behaves like @code{custom-initialize-set}, but it diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index 9650d227909..b98c2f8fa93 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi @@ -2010,6 +2010,11 @@ Tables}). The width of a tab character is usually @code{tab-width} (@pxref{Usual Display}). @end defun +@defun char-uppercase-p char +Return non-@code{nil} if @var{char} is an uppercase character +according to Unicode. +@end defun + @defun string-width string &optional from to This function returns the width in columns of the string @var{string}, if it were displayed in the current buffer and the selected window. @@ -2252,20 +2257,6 @@ This is a convenience function that uses @code{window-text-pixel-size} to compute the width of @var{string} (in pixels). @end defun -@defun window-char-pixel-width &optional window face -Return the average character width for the font used by @var{face} in -@var{window}. If @var{face} is @code{nil} or omitted, the -@code{default} face is used. If @var{windows} is @code{nil} or -omitted, the currently selected window is used. -@end defun - -@defun window-char-pixel-height &optional window face -Return the average character height for the font used by @var{face} in -@var{window}. If @var{face} is @code{nil} or omitted, the -@code{default} face is used. If @var{windows} is @code{nil} or -omitted, the currently selected window is used. -@end defun - @defun line-pixel-height This function returns the height in pixels of the line at point in the selected window. The value includes the line spacing of the line @@ -5066,7 +5057,7 @@ which are evaluated at display time. This could be unsafe in certain situations, e.g., when the display specification was generated by some external program/agent. Wrapping a display specification in a list that begins with the special symbol @code{disable-eval}, as in -@w{@code{('disable-eval @var{spec})}}, will disable evaluation of any +@w{@code{(disable-eval @var{spec})}}, will disable evaluation of any Lisp in @var{spec}, while still supporting all the other display property features. @@ -8228,7 +8219,10 @@ help buffer. The window's display table, if there is one, takes precedence over the buffer's display table. If neither exists, Emacs tries to use the standard display table; if that is @code{nil}, Emacs uses the usual -character display conventions (@pxref{Usual Display}). +character display conventions (@pxref{Usual Display}). (Emacs does +not ``merge'' display tables: For instance, if the window has a +display table, the buffer's display table and the standard display +table are completely ignored.) Note that display tables affect how the mode line is displayed, so if you want to force redisplay of the mode line using a new display diff --git a/doc/lispref/elisp.texi b/doc/lispref/elisp.texi index 73903520160..09e7aad714e 100644 --- a/doc/lispref/elisp.texi +++ b/doc/lispref/elisp.texi @@ -593,6 +593,7 @@ Advising Emacs Lisp Functions * Advising Named Functions:: Advising named functions. * Advice Combinators:: Ways to compose advice. * Porting Old Advice:: Adapting code using the old defadvice. +* Advice and Byte Code:: Not all functions can be advised. Macros @@ -739,6 +740,7 @@ Reading and Printing Lisp Objects * Output Functions:: Functions to print Lisp objects as text. * Output Variables:: Variables that control what the printing functions do. +* Output Overrides:: Overriding output variables. Minibuffers diff --git a/doc/lispref/eval.texi b/doc/lispref/eval.texi index e94e222e6a6..ed3cf56e098 100644 --- a/doc/lispref/eval.texi +++ b/doc/lispref/eval.texi @@ -435,7 +435,7 @@ expansion. @cindex forms, special @cindex evaluation of special forms - A @dfn{special form} is a primitive function specially marked so that + A @dfn{special form} is a primitive specially marked so that its arguments are not all evaluated. Most special forms define control structures or perform variable bindings---things which functions cannot do. diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi index 75905658e64..ea8683a6d8e 100644 --- a/doc/lispref/files.texi +++ b/doc/lispref/files.texi @@ -581,9 +581,12 @@ contents of the file. This is better than simply deleting the buffer contents and inserting the whole file, because (1) it preserves some marker positions and (2) it puts less data in the undo list. -It is possible to read a special file (such as a FIFO or an I/O device) -with @code{insert-file-contents}, as long as @var{replace} and -@var{visit} are @code{nil}. +It is possible to read a special file (such as a FIFO or an I/O +device) with @code{insert-file-contents}, as long as @var{replace}, +and @var{visit} and @var{beg} are @code{nil}. However, you should +normally use an @var{end} argument for these files to avoid inserting +(potentially) unlimited data into the buffer (for instance, when +inserting data from @file{/dev/urandom}). @end defun @defun insert-file-contents-literally filename &optional visit beg end replace @@ -3112,10 +3115,16 @@ except those two. It is useful as the @var{match-regexp} argument to returns @code{nil}, if directory @samp{/foo} is empty. @end defvr -@defun file-expand-wildcards pattern &optional full +@defun file-expand-wildcards pattern &optional full regexp This function expands the wildcard pattern @var{pattern}, returning a list of file names that match it. +@var{pattern} is, by default, a ``glob''/wildcard string, e.g., +@samp{"/tmp/*.png"} or @samp{"/*/*/foo.png"}, but can also be a +regular expression if the optional @var{regexp} parameter is non-nil. +In any case, the matches are applied per sub-directory, so a match +can't span a parent/sub directory. + If @var{pattern} is written as an absolute file name, the values are absolute also. diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi index 05c6e4b719b..16f7ad312a4 100644 --- a/doc/lispref/frames.texi +++ b/doc/lispref/frames.texi @@ -458,6 +458,18 @@ monitor, the same string as returned by the function @var{display} should be the name of an X display (a string). @end deffn +@cindex monitor change functions +@defvar display-monitors-changed-functions +This variable is an abnormal hook run when the monitor configuration +changes, which can happen if a monitor is rotated, moved, added or +removed from a multiple-monitor setup, if the primary monitor changes, +or if the resolution of a monitor changes. It is called with a single +argument consisting of the terminal on which the monitor configuration +changed. Programs should call @code{display-monitor-attributes-list} +with the terminal as the argument to retrieve the new monitor +configuration on that terminal. +@end defvar + @node Frame Geometry @section Frame Geometry @cindex frame geometry @@ -683,9 +695,9 @@ The position of the top left corner of the native frame specifies the indicate that position for the various builds: @itemize @w{} -@item (1) non-toolkit and terminal frames +@item (1) non-toolkit, Haiku, and terminal frames -@item (2) Lucid, Motif, MS-Windows, and Haiku frames +@item (2) Lucid, Motif, and MS-Windows frames @item (3) GTK+ and NS frames @end itemize @@ -1734,16 +1746,14 @@ fit will be clipped by the window manager. @item fullscreen This parameter specifies whether to maximize the frame's width, height or both. Its value can be @code{fullwidth}, @code{fullheight}, -@code{fullboth}, or @code{maximized}.@footnote{On Haiku, setting -@code{fullscreen} to @code{fullwidth} or @code{fullheight} has no -effect.} A @dfn{fullwidth} frame is as +@code{fullboth}, or @code{maximized}. A @dfn{fullwidth} frame is as wide as possible, a @dfn{fullheight} frame is as tall as possible, and a @dfn{fullboth} frame is both as wide and as tall as possible. A -@dfn{maximized} frame is like a ``fullboth'' frame, except that it usually -keeps its title bar and the buttons for resizing -and closing the frame. Also, maximized frames typically avoid hiding -any task bar or panels displayed on the desktop. A ``fullboth'' frame, -on the other hand, usually omits the title bar and occupies the entire +@dfn{maximized} frame is like a ``fullboth'' frame, except that it +usually keeps its title bar and the buttons for resizing and closing +the frame. Also, maximized frames typically avoid hiding any task bar +or panels displayed on the desktop. A ``fullboth'' frame, on the +other hand, usually omits the title bar and occupies the entire available screen space. Full-height and full-width frames are more similar to maximized @@ -3877,8 +3887,9 @@ in the buffer. The default is to use the @code{arrow} (non-text) pointer style. @end defopt - When using X, you can specify what the @code{text} pointer style -really looks like by setting the variable @code{x-pointer-shape}. + When using some window systems, you can specify what the @code{text} +pointer style really looks like by setting the variable +@code{x-pointer-shape}. @defvar x-pointer-shape This variable specifies the pointer shape to use ordinarily in the @@ -3932,6 +3943,13 @@ overlay or a pair of markers stands for text in the overlay or between the markers. The argument @var{data} may also be a vector of valid non-vector selection values. +If @var{data} is a string, then its text properties can specify values +used for individual data types. For example, if @var{data} has a +property named @code{text/uri-list}, then a call to +@code{gui-get-selection} with the data type @code{text/uri-list} will +result in the value of that property being used instead of @var{data} +itself. + This function returns @var{data}. @end deffn @@ -4018,16 +4036,46 @@ amount of different data types on the clipboard. @section Drag and Drop @cindex drag and drop + When the user drops something from another application over Emacs, +Emacs will try to insert any text and open any URL that was dropped. +If text was dropped, then it will always be inserted at the location +of the mouse pointer when the drop happened, or saved in the kill ring +if insertion failed (which can happen if the buffer is read-only). If +it was an URL, then Emacs tries to call an appropriate handler +function by first matching the URL against regexps defined in +@code{dnd-protocol-alist}, and then against @code{browse-url-handlers} +and @code{browse-url-default-handlers}, and failing that, inserting +the URL as plain text. + +@defvar dnd-protocol-alist + This variable is a list of cons cells of the form +@w{@code{(@var{pattern} . @var{action})}}. @var{pattern} is a regexp +that URLs are matched against after being dropped. @var{action} is a +function that is called with two arguments should a URL being dropped +match @var{pattern}: the URL being dropped, and the action being +performed for the drop (one of the symbols @code{copy}, @code{move}, +@code{link}, @code{private} or @code{ask}). +@end defvar + +@cindex drag and drop, X +@cindex drag and drop, other formats + Emacs implements drag-and-drop for text and URLs individually for +each window system, and does not by default support the dropping of +anything else. Code that wishes to support the dropping of content +types not supported by Emacs can utilize the X-specific interface +described below: + @vindex x-dnd-test-function @vindex x-dnd-known-types - When a user drags something from another application over Emacs, that other -application expects Emacs to tell it if Emacs can handle the data that is -dragged. The variable @code{x-dnd-test-function} is used by Emacs to determine -what to reply. The default value is @code{x-dnd-default-test-function} -which accepts drops if the type of the data to be dropped is present in -@code{x-dnd-known-types}. You can customize @code{x-dnd-test-function} and/or -@code{x-dnd-known-types} if you want Emacs to accept or reject drops based -on some other criteria. + When a user drags something from another application over Emacs on +the X Window System, that other application expects Emacs to tell it +if Emacs can handle the data that was dragged. The variable +@code{x-dnd-test-function} is used by Emacs to determine what to +reply. The default value is @code{x-dnd-default-test-function} which +accepts drops if the type of the data to be dropped is present in +@code{x-dnd-known-types}. You can customize +@code{x-dnd-test-function} and/or @code{x-dnd-known-types} if you want +Emacs to accept or reject drops based on some other criteria. @vindex x-dnd-types-alist If you want to change the way Emacs handles drop of different types @@ -4035,28 +4083,126 @@ or add a new type, customize @code{x-dnd-types-alist}. This requires detailed knowledge of what types other applications use for drag and drop. -@vindex dnd-protocol-alist -@vindex browse-url-handlers -@vindex browse-url-default-handlers - When an URL is dropped on Emacs it may be a file, but it may also be -another URL type (https, etc.). Emacs first checks -@code{dnd-protocol-alist} to determine what to do with the URL@. If -there is no match there, Emacs looks for a match in -@code{browse-url-handlers} and @code{browse-url-default-handlers}. If -still no match has been found, the text for the URL is inserted. If -you want to alter Emacs behavior, you can customize these variables. + Those data types are typically implemented as special data types an +X selection provided by the other application can be converted to. +They can either be the same data types that are typically accepted by +@code{gui-set-selection}, or they can be MIME types, depending on the +specific drag-n-drop protocol being used. Plain text may be +@code{"STRING"} or @code{"text/plain"}, for example. @cindex initiating drag-and-drop On capable window systems, Emacs also supports dragging contents from its frames to windows of other applications. -@defun x-begin-drag targets &optional action frame return-frame allow-current-frame +@cindex drop target, in drag-and-drop operations +@defun dnd-begin-text-drag text &optional frame action allow-same-frame +This function begins dragging text from @var{frame} to another program +(known as the @dfn{drop target}), and returns the result of +drag-and-drop operation when the text is dropped or the drag-and-drop +operation is canceled. @var{text} is the text that will be inserted +by the drop target. + +@var{action} must be one of the symbols @code{copy} or @code{move}, +where @code{copy} means that @var{text} should be inserted by the drop +target, and @code{move} means the same as @code{copy}, but in addition +the caller may have to delete @var{text} from its source as explained +below. + +@var{frame} is the frame where the mouse is currently held down, or +@code{nil}, which means to use the selected frame. This function may +return immediately if no mouse buttons are held down, so it should be +only called immediately after a @code{down-mouse-1} or similar event +(@pxref{Mouse Events}), with @var{frame} set to the frame where that +event was generated (@pxref{Click Events}). + +@var{allow-same-frame} specifies whether or not drops on top of +@var{frame} itself are to be ignored. + +The return value specifies the action that the drop target actually +performed, and optionally what the caller should do. It can be one of +the following symbols: + +@table @code +@item copy +The drop target inserted the dropped text. + +@item move +The drop target inserted the dropped text, but in addition the caller +should delete @var{text} from wherever it originated, such as its +buffer. + +@item private +The drop target performed some other unspecified action. + +@item nil +The drag-and-drop operation was canceled. +@end table + +@end defun + +@defun dnd-begin-file-drag file &optional frame action allow-same-frame +This function begins dragging @var{file} from @var{frame} to another +program, and returns the result of the drag-and-drop operation when +the file is dropped or the drag-and-drop operation is canceled. + +If @var{file} is a remote file, then a temporary copy will be made. + +@var{action} must be one of the symbols @code{copy}, @code{move} or +@code{link}, where @code{copy} means that @var{file} should be opened +or copied by the drop target, @code{move} means the drop target should +move the file to another location, and @code{link} means the drop +target should create a symbolic link to @var{file}. It is an error to +specify @code{link} as the action if @var{file} is a remote file. + +@var{frame} and @var{allow-same-frame} have the same meaning as in +@code{dnd-begin-text-drag}. + +The return value is the action that the drop target actually +performed, which can be one of the following symbols: + +@table @code +@item copy +The drop target opened or copied @var{file} to a different location. + +@item move +The drop target moved @var{file} to a different location. + +@item link +The drop target (usually a file manager) created a symbolic link to +@var{file}. + +@item private +The drop target performed some other unspecified action. + +@item nil +The drag-and-drop operation was canceled. +@end table + +@end defun + +@defun dnd-begin-drag-files files &optional frame action allow-same-frame +This function is like @code{dnd-begin-file-drag}, except that +@var{files} is a list of files. If the drop target doesn't support +dropping multiple files, then the first file will be used instead. +@end defun + +@cindex initiating drag-and-drop, low-level + The high-level interfaces described above are implemented on top of +a lower-level primitive. If you need to drag content other than files +or text, use the low-level interface @code{x-begin-drag} +instead. However, using it will require detailed knowledge of the +data types and actions used by the programs to transfer content via +drag-and-drop on each platform you want to support. + +@defun x-begin-drag targets &optional action frame return-frame allow-current-frame follow-tooltip This function begins a drag from @var{frame}, and returns when the drag-and-drop operation ends, either because the drop was successful, or because the drop was rejected. The drop occurs when all mouse buttons are released on top of an X window other than @var{frame} (the @dfn{drop target}), or any X window if @var{allow-current-frame} is -non-@code{nil}. +non-@code{nil}. If no mouse buttons are held down when the +drag-and-drop operation begins, this function may immediately return +@code{nil}. @var{targets} is a list of strings describing selection targets, much like the @var{data-type} argument to @code{gui-get-selection}, that @@ -4085,6 +4231,12 @@ want to treat dragging content from one frame to another specially, while also being able to drag content to other programs, but it is not guaranteed to work on all systems and with all window managers. +If @var{follow-tooltip} is non-@code{nil}, the position of any tooltip +(such as one shown by @code{tooltip-show}) will follow the location of +the mouse pointer whenever it moves during the drag-and-drop +operation. The tooltip will be hidden once all mouse buttons are +released. + If the drop was rejected or no drop target was found, this function returns @code{nil}. Otherwise, it returns a symbol describing the action the target chose to perform, which can differ from @var{action} @@ -4093,6 +4245,10 @@ is also a valid return value in addition to @code{XdndActionCopy} and @code{XdndActionMove}; it means that the drop target chose to perform an unspecified action, and no further processing is required by the caller. + +The caller must cooperate with the target to fully perform the action +chosen by the target. For example, callers should delete the buffer +text that was dragged if this function returns @code{XdndActionMove}. @end defun @node Color Names diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi index 2f386eaa47e..e3de6009e90 100644 --- a/doc/lispref/functions.texi +++ b/doc/lispref/functions.texi @@ -146,7 +146,12 @@ function: This function returns @code{t} if @var{object} is any kind of function, i.e., can be passed to @code{funcall}. Note that @code{functionp} returns @code{t} for symbols that are function names, -and returns @code{nil} for special forms. +and returns @code{nil} for symbols that are macros or special forms. + +If @var{object} is not a function, this function ordinarily returns +@code{nil}. However, the representation of function objects is +complicated, and for efficiency reasons in rare cases this function +can return @code{t} even when @var{object} is not a function. @end defun It is also possible to find out how many arguments an arbitrary @@ -1712,6 +1717,7 @@ ways to do it. The added function is also called a piece of @emph{advice}. * Advising Named Functions:: Advising named functions. * Advice Combinators:: Ways to compose advice. * Porting Old Advice:: Adapting code using the old defadvice. +* Advice and Byte Code:: Not all functions can be advised. @end menu @node Core Advising Primitives @@ -2133,6 +2139,37 @@ changing @code{ad-return-value}, whereas new @code{:after} advice cannot, so when porting such old @code{after} advice, you'll need to turn it into new @code{:around} or @code{:filter-return} advice instead. +@c This is its own node because we link to it from *Help* buffers. +@node Advice and Byte Code +@subsection Advice and Byte Code +@cindex compiler macros, advising +@cindex @code{byte-compile} and @code{byte-optimize}, advising + + Not all functions can be reliably advised. The byte compiler may +choose to replace a call to a function with a sequence of instructions +that doesn't call the function you were interested in altering. + +This usually happens due to one of the three following mechanisms: + +@table @asis +@item @code{byte-compile} properties +If a function's symbol has a @code{byte-compile} property, that +property will be used instead of the symbol's function definition. +@xref{Compilation Functions}. + +@item @code{byte-optimize} properties +If a function's symbol has a @code{byte-optimize} property, the byte +compiler may rewrite the function arguments, or decide to use a +different function altogether. + +@item @code{compiler-macro} declare forms +A function can have a special @code{compiler-macro} @code{declare} +form in its definition (@pxref{Declare Form}) that defines an +@dfn{expander} to call when compiling the function. The expander +could then cause the produced byte-code not to call the original +function. +@end table + @node Obsolete Functions @section Declaring Functions Obsolete @cindex obsolete functions diff --git a/doc/lispref/help.texi b/doc/lispref/help.texi index d53bfad8e9e..463039c5a0e 100644 --- a/doc/lispref/help.texi +++ b/doc/lispref/help.texi @@ -345,7 +345,10 @@ stands for a key sequence @var{KEYSEQ}, which will use the same face as a command substitution. This should be used only when a key sequence has no corresponding command, for example when it is read directly with @code{read-key-sequence}. It must be a valid key -sequence according to @code{key-valid-p}. +sequence according to @code{key-valid-p}. It can also be used with +command names, like @samp{\`M-x foo'}, where you want this to be +fontified like a keyboard sequence, but you want to inhibit +translating it into a key sequence like @samp{\[foo]} does. @item ` (grave accent) stands for a left quote. @@ -362,6 +365,10 @@ depending on the value of @code{text-quoting-style}. quotes the following character and is discarded; thus, @samp{\=`} puts @samp{`} into the output, @samp{\=\[} puts @samp{\[} into the output, and @samp{\=\=} puts @samp{\=} into the output. + +@item \+ +This indicates that the symbol directly following should not be marked +as link in the @file{*Help*} buffer. @end table @strong{Please note:} Each @samp{\} must be doubled when written in a @@ -386,7 +393,7 @@ quotes. You can customize it freely according to your personal preference. @end defopt -@defun substitute-command-keys string &optional no-face +@defun substitute-command-keys string &optional no-face include-menus @vindex help-key-binding@r{ (face)} This function scans @var{string} for the above special sequences and replaces them by what they stand for, returning the result as a string. @@ -436,6 +443,9 @@ RET minibuffer-complete-and-exit C-g abort-recursive-edit " +The keymap description will normally exclude menu items, but if +@var{include-menus} is non-@code{nil}, include them. + @group (substitute-command-keys "To abort a recursive edit from the minibuffer, type \ diff --git a/doc/lispref/loading.texi b/doc/lispref/loading.texi index 68cd74c7d16..8a2bb5fa2db 100644 --- a/doc/lispref/loading.texi +++ b/doc/lispref/loading.texi @@ -529,7 +529,7 @@ primitive for autoloading; any Lisp program can call @code{autoload} at any time. Magic comments are the most convenient way to make a function autoload, for packages installed along with Emacs. These comments do nothing on their own, but they serve as a guide for the command -@code{update-file-autoloads}, which constructs calls to @code{autoload} +@code{loaddefs-generate}, which constructs calls to @code{autoload} and arranges to execute them when Emacs is built. @defun autoload function filename &optional docstring interactive type @@ -627,22 +627,19 @@ subroutines not loaded successfully because they come later in the file. macro, then an error is signaled with data @code{"Autoloading failed to define function @var{function-name}"}. -@findex update-file-autoloads -@findex make-directory-autoloads +@findex loaddefs-generate @cindex magic autoload comment @cindex autoload cookie @anchor{autoload cookie} A magic autoload comment (often called an @dfn{autoload cookie}) consists of @samp{;;;###autoload}, on a line by itself, just before the real definition of the function in its -autoloadable source file. The command @kbd{M-x update-file-autoloads} +autoloadable source file. The function @code{loaddefs-generate} writes a corresponding @code{autoload} call into @file{loaddefs.el}. (The string that serves as the autoload cookie and the name of the -file generated by @code{update-file-autoloads} can be changed from the +file generated by @code{loaddefs-generate} can be changed from the above defaults, see below.) Building Emacs loads @file{loaddefs.el} and thus calls @code{autoload}. -@kbd{M-x make-directory-autoloads} is even more powerful; it updates -autoloads for all files in the current directory. The same magic comment can copy any kind of form into @file{loaddefs.el}. The form following the magic comment is copied @@ -675,7 +672,7 @@ and @code{define-global-minor-mode}. @emph{without} executing it when the file itself is loaded. To do this, write the form @emph{on the same line} as the magic comment. Since it is in a comment, it does nothing when you load the source file; but -@kbd{M-x update-file-autoloads} copies it to @file{loaddefs.el}, where +@code{loaddefs-generate} copies it to @file{loaddefs.el}, where it is executed while building Emacs. The following example shows how @code{doctor} is prepared for @@ -728,11 +725,11 @@ corresponding autoload calls written into a file whose name is different from the default @file{loaddefs.el}. Emacs provides two variables to control this: -@defvar generate-autoload-cookie -The value of this variable should be a string whose syntax is a Lisp -comment. @kbd{M-x update-file-autoloads} copies the Lisp form that -follows the cookie into the autoload file it generates. The default -value of this variable is @code{";;;###autoload"}. +@defvar lisp-mode-autoload-regexp +The value of this constant is a regexp that matches autoload cookies. +@code{loaddefs-generate} copies the Lisp form that follows the +cookie into the autoload file it generates. This will match comments +like like @samp{;;;###autoload} and @samp{;;;###calc-autoload}. @end defvar @defvar generated-autoload-file @@ -769,7 +766,7 @@ contain definitions matching the prefix being completed. The variable @code{definition-prefixes} holds a hashtable which maps a prefix to the corresponding list of files to load for it. Entries to this mapping are added by calls to @code{register-definition-prefixes} -which are generated by @code{update-file-autoloads} +which are generated by @code{loaddefs-generate} (@pxref{Autoload}). Files which don't contain any definitions worth loading (test files, for examples), should set @code{autoload-compute-prefixes} to @code{nil} as a file-local diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi index be81b5b3fbb..f2adc01c8f7 100644 --- a/doc/lispref/minibuf.texi +++ b/doc/lispref/minibuf.texi @@ -309,6 +309,22 @@ The optional argument @var{history}, if non-@code{nil}, is a symbol specifying a minibuffer history list to use (@pxref{Minibuffer History}). If it is omitted or @code{nil}, the history list defaults to @code{regexp-history}. + +@cindex @code{case-fold}, text property +@findex read-regexp-case-fold-search +The user can use the @kbd{M-c} command to indicate whether case +folding should be on or off. If the user has used this command, the +returned string will have the text property @code{case-fold} set to +either @code{fold} or @code{inhibit-fold}. It is up to the caller of +@code{read-regexp} to actually use this value, and the convenience +function @code{read-regexp-case-fold-search} is provided for that. A +typical usage pattern here might look like: + +@lisp +(let* ((regexp (read-regexp "Search for: ")) + (case-fold-search (read-regexp-case-fold-search regexp))) + (re-search-forward regexp)) +@end lisp @end defun @defopt read-regexp-defaults-function @@ -1121,6 +1137,11 @@ completion command (i.e., one of the commands in @code{minibuffer-confirm-exit-commands}) and the resulting input is not an element of @var{collection}. @xref{Completion Commands}. +@item +If a function, it is called with the input as the only argument. The +function should return a non-@code{nil} value if the input is +acceptable. + @item Any other value of @var{require-match} behaves like @code{t}, except that the exit commands won't exit if it performs completion. diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi index c6ea74324bc..2e40cb25ef8 100644 --- a/doc/lispref/modes.texi +++ b/doc/lispref/modes.texi @@ -2575,7 +2575,23 @@ mode line feature, except that it's controlled by This variable, local in every buffer, specifies how to display the header line, for windows displaying the buffer. The format of the value is the same as for @code{mode-line-format} (@pxref{Mode Line Data}). -It is normally @code{nil}, so that ordinary buffers have no header line. +It is normally @code{nil}, so that ordinary buffers have no header +line. + +@findex header-line-indent-mode +If @code{display-line-numbers-mode} is used, and you want the header +line to be indented by the same amount as the buffer contents, you can +use the @code{header-line-indent-mode} minor mode. This minor mode +keeps the @code{header-line-indent} variable updated, so that you can +say something like: + +@lisp +(setq header-line-format + `("" header-line-format ,my-header-line)) +@end lisp + +This can be useful if you're displaying columnar data, and the header +line should align with that data in the buffer. @end defvar @defun window-header-line-height &optional window @@ -3652,6 +3668,10 @@ the value is @code{nil}, Font Lock will call @code{jit-lock-register} (@pxref{Other Font Lock Variables}) to set up for automatic refontification of buffer text following a modified line to reflect the new syntactic context due to the change. + +To use only syntactic fontification, this variable should +be non-@code{nil}, while @code{font-lock-keywords} should be set to +@code{nil} (@pxref{Font Lock Basics}). @end defvar @defvar font-lock-syntax-table diff --git a/doc/lispref/nonascii.texi b/doc/lispref/nonascii.texi index d7d25dc36af..6dc23637a79 100644 --- a/doc/lispref/nonascii.texi +++ b/doc/lispref/nonascii.texi @@ -280,11 +280,12 @@ to the codepoints @code{#x3FFF80} through @code{#x3FFFFF}, inclusive @defun string-to-unibyte string This function returns a unibyte string containing the same sequence of -characters as @var{string}. It signals an error if @var{string} -contains a non-@acronym{ASCII} character. If @var{string} is a -unibyte string, it is returned unchanged. Use this function for -@var{string} arguments that contain only @acronym{ASCII} and eight-bit -characters. +characters as @var{string}. If @var{string} is a unibyte string, it +is returned unchanged. Otherwise, @acronym{ASCII} characters and +characters in the @code{eight-bit} charset are converted to their +corresponding byte values. Use this function for @var{string} +arguments that contain only @acronym{ASCII} and eight-bit characters; +the function signals an error if any other characters are encountered. @end defun @defun byte-to-string byte diff --git a/doc/lispref/objects.texi b/doc/lispref/objects.texi index 07caaa2a07a..1bae1924557 100644 --- a/doc/lispref/objects.texi +++ b/doc/lispref/objects.texi @@ -178,6 +178,12 @@ files. Skip the next @samp{N} characters (@pxref{Comments}). This is used in byte-compiled files, and is not meant to be used in Emacs Lisp source files. + +@item #f +Indicates that the following form isn't readable by the Emacs Lisp +reader. This is only in text for display purposes (when that would +look prettier than alternative ways of indicating an unreadable form) +and will never appear in any Lisp file. @end table diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi index 9df708532d8..11a0d02338f 100644 --- a/doc/lispref/os.texi +++ b/doc/lispref/os.texi @@ -329,10 +329,10 @@ file will not inhibit the message for someone else. @end defopt @defopt initial-scratch-message -This variable, if non-@code{nil}, should be a string, which is -treated as documentation to be -inserted into the @file{*scratch*} buffer when Emacs starts up. If it -is @code{nil}, the @file{*scratch*} buffer is empty. +This variable, if non-@code{nil}, should be a string, which is treated +as documentation to be inserted into the @file{*scratch*} buffer when +Emacs starts up or when that buffer is recreated. If it is +@code{nil}, the @file{*scratch*} buffer is empty. @end defopt @noindent @@ -1649,8 +1649,8 @@ this default may change in future Emacs releases, so callers requiring a particular form should specify @var{form}. @strong{Common Lisp Note:} Common Lisp has different meanings for -@var{dow} and @var{utcoff}, and its @var{second} is an integer between -0 and 59 inclusive. +@var{dow}, @code{dst} and @var{utcoff}, and its @var{second} is an +integer between 0 and 59 inclusive. To access (or alter) the elements in the calendrical information, the @code{decoded-time-second}, @code{decoded-time-minute}, diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi index 18f446735bb..8c8f8fd6b2a 100644 --- a/doc/lispref/processes.texi +++ b/doc/lispref/processes.texi @@ -1011,16 +1011,18 @@ terminated (due to calling @code{exit} or to a signal). If it is they exit. @end defopt -@defun delete-process process +@defun delete-process &optional process This function deletes a process, killing it with a @code{SIGKILL} signal if the process was running a program. The argument may be a process, the name of a process, a buffer, or the name of a buffer. (A buffer or buffer-name stands for the process that -@code{get-buffer-process} returns.) Calling @code{delete-process} on -a running process terminates it, updates the process status, and runs -the sentinel immediately. If the process has already terminated, -calling @code{delete-process} has no effect on its status, or on the -running of its sentinel (which will happen sooner or later). +@code{get-buffer-process} returns, and a missing or @code{nil} +@var{process} means that the current buffer's process should be +killed.) Calling @code{delete-process} on a running process +terminates it, updates the process status, and runs the sentinel +immediately. If the process has already terminated, calling +@code{delete-process} has no effect on its status, or on the running +of its sentinel (which will happen sooner or later). If the process object represents a network, serial, or pipe connection, its status changes to @code{closed}; otherwise, it changes @@ -3468,20 +3470,67 @@ type values: @itemx byte Unsigned byte, with length 1. -@item uint @var{bitlen} -Unsigned integer in network byte order, with @var{bitlen} bits. +@item uint @var{bitlen} &optional @var{le} +Unsigned integer in network byte order (big-endian), with @var{bitlen} bits. @var{bitlen} has to be a multiple of 8. +If @var{le} is non-@code{nil}, then use little-endian byte order. -@item uintr @var{bitlen} -Unsigned integer in little endian order, with @var{bitlen} bits. +@item sint @var{bitlen} @var{le} +Signed integer in network byte order (big-endian), with @var{bitlen} bits. @var{bitlen} has to be a multiple of 8. +If @var{le} is non-@code{nil}, then use little-endian byte order. @item str @var{len} -String of bytes of length @var{len}. +Unibyte string (@pxref{Text Representations}) of length @var{len} bytes. +When packing, the first @var{len} bytes of the input string are copied +to the packed output. If the input string is shorter than @var{len}, +the remaining bytes will be null (zero) unless a pre-allocated string +was provided to @code{bindat-pack}, in which case the remaining bytes +are left unmodified. If the input string is multibyte with only ASCII +and @code{eight-bit} characters, it is converted to unibyte before it +is packed; other multibyte strings signal an error. When unpacking, +any null bytes in the packed input string will appear in the unpacked +output. @item strz &optional @var{len} -Zero-terminated string of bytes, can be of arbitrary length or in a fixed-size -field with length @var{len}. +If @var{len} is not provided: Variable-length null-terminated unibyte +string (@pxref{Text Representations}). When packing, the entire input +string is copied to the packed output. The following byte will be +null (zero) unless a pre-allocated string was provided to +@code{bindat-pack}, in which case that byte is left unmodified. The +length of the packed output is the length of the input string plus one +(for the null terminator). The input string must not contain any null +bytes. If the input string is multibyte with only ASCII and +@code{eight-bit} characters, it is converted to unibyte before it is +packed; other multibyte strings signal an error. When unpacking, the +resulting string contains all bytes up to (but excluding) the null +byte. + +@quotation Caution +If a pre-allocated string is provided to @code{bindat-pack}, the +packed output will not be properly null-terminated unless the +pre-allocated string already has a null byte at the appropriate +location. +@end quotation + +If @var{len} is provided: @code{strz} behaves the same as @code{str} +with one difference: When unpacking, the first null byte encountered +in the packed string and all subsequent bytes are excluded from the +unpacked result. + +@quotation Caution +The packed output will not be null-terminated unless one of the +following is true: +@itemize +@item +The input string is shorter than @var{len} bytes and either no pre-allocated +string was provided to @code{bindat-pack} or the appropriate byte in +the pre-allocated string was already null. +@item +The input string contains a null byte within the first @var{len} +bytes. +@end itemize +@end quotation @item vec @var{len} [@var{type}] Vector of @var{len} elements. The type of the elements is given by diff --git a/doc/lispref/searching.texi b/doc/lispref/searching.texi index c9828f9c868..21a2c6c51e4 100644 --- a/doc/lispref/searching.texi +++ b/doc/lispref/searching.texi @@ -549,12 +549,12 @@ can act. It is poor practice to depend on this behavior; quote the special character anyway, regardless of where it appears. As a @samp{\} is not special inside a character alternative, it can -never remove the special meaning of @samp{-} or @samp{]}. So you -should not quote these characters when they have no special meaning -either. This would not clarify anything, since backslashes can -legitimately precede these characters where they @emph{have} special -meaning, as in @samp{[^\]} (@code{"[^\\]"} for Lisp string syntax), -which matches any single character except a backslash. +never remove the special meaning of @samp{-}, @samp{^} or @samp{]}. +You should not quote these characters when they have no special +meaning. This would not clarify anything, since backslashes +can legitimately precede these characters where they @emph{have} +special meaning, as in @samp{[^\]} (@code{"[^\\]"} for Lisp string +syntax), which matches any single character except a backslash. In practice, most @samp{]} that occur in regular expressions close a character alternative and hence are special. However, occasionally a @@ -823,21 +823,22 @@ the characters that stand for them. matches any character whose syntax is not @var{code}. @cindex category, regexp search for -@item \c@var{c} -matches any character whose category is @var{c}. Here @var{c} is a -character that represents a category: thus, @samp{c} for Chinese -characters or @samp{g} for Greek characters in the standard category -table. You can see the list of all the currently defined categories -with @kbd{M-x describe-categories @key{RET}}. You can also define -your own categories in addition to the standard ones using the -@code{define-category} function (@pxref{Categories}). +@item \c@var{code} +matches any character whose category is @var{code}. Here @var{code} +is a character that represents a category: for example, in the standard +category table, @samp{c} stands for Chinese characters and @samp{g} +stands for Greek characters. You can see the list of all the +currently defined categories with @w{@kbd{M-x describe-categories +@key{RET}}}. You can also define your own categories in addition to +the standard ones using the @code{define-category} function +(@pxref{Categories}). -@item \C@var{c} -matches any character whose category is not @var{c}. +@item \C@var{code} +matches any character whose category is not @var{code}. @end table The following regular expression constructs match the empty string---that is, -they don't use up any characters---but whether they match depends on the +they don't consume any characters---but whether they match depends on the context. For all, the beginning and end of the accessible portion of the buffer are treated as if they were the actual beginning and end of the buffer. diff --git a/doc/lispref/streams.texi b/doc/lispref/streams.texi index 781a50f5c49..bba1dc2eee9 100644 --- a/doc/lispref/streams.texi +++ b/doc/lispref/streams.texi @@ -21,6 +21,7 @@ reading) or where to put it (if printing). * Output Streams:: Various data types that can be used as output streams. * Output Functions:: Functions to print Lisp objects as text. * Output Variables:: Variables that control what the printing functions do. +* Output Overrides:: Overriding output variables. @end menu @node Streams Intro @@ -634,7 +635,7 @@ characters are used. @code{print} returns @var{object}. For example: @end example @end defun -@defun prin1 object &optional stream +@defun prin1 object &optional stream overrides This function outputs the printed representation of @var{object} to @var{stream}. It does not print newlines to separate output as @code{print} does, but it does use quoting characters just like @@ -649,6 +650,10 @@ This function outputs the printed representation of @var{object} to @result{} " came back" @end group @end example + +If @var{overrides} is non-@code{nil}, it should either be @code{t} +(which tells @code{prin1} to use the defaults for all printer related +variables), or a list of settings. @xref{Output Overrides}, for details. @end defun @defun princ object &optional stream @@ -694,7 +699,7 @@ newline character first, which enables you to display incomplete lines. @end defun -@defun prin1-to-string object &optional noescape +@defun prin1-to-string object &optional noescape overrides @cindex object to string This function returns a string containing the text that @code{prin1} would have printed for the same argument. @@ -708,6 +713,10 @@ would have printed for the same argument. (prin1-to-string (mark-marker)) @result{} "#" @end group + +If @var{overrides} is non-@code{nil}, it should either be @code{t} +(which tells @code{prin1} to use the defaults for all printer related +variables), or a list of settings. @xref{Output Overrides}, for details. @end example If @var{noescape} is non-@code{nil}, that inhibits use of quoting @@ -971,3 +980,84 @@ Letter, Number, Punctuation, Symbol and Private-use (@pxref{Character Properties}), as well as the control characters having their own escape syntax such as newline. @end defvar + +@node Output Overrides +@section Overriding Output Variables +@cindex overrides, in output functions +@cindex output variables, overriding + +The previous section (@pxref{Output Functions}) lists the numerous +variables that control how the Emacs Lisp printer formats data for +outputs. These are generally available for users to change, but +sometimes you want to output data in the default format, or override +the user settings in some other way. For instance, if you're storing +Emacs Lisp data in a file, you don't want that data to be shortened by +a @code{print-length} setting. + +The @code{prin1} and @code{prin1-to-string} functions therefore have +an optional @var{overrides} argument. This argument can either be +@code{t} (which means that all printing variables should be reset to +the default values), or a list of settings for some of the variables. +Each element in the list can be either @code{t} (which means ``reset +to defaults'', and will usually be the first element of the list), or +a pair whose @code{car} is a symbol that stands for an output variable +and whose @code{cdr} is the value for that variable. + +For instance, this prints using nothing but defaults: + +@lisp +(prin1 object nil t) +@end lisp + +This prints @var{object} using the current printing settings, but +overrides the value of @code{print-length} to be 5: + +@lisp +(prin1 object nil '((length . 5))) +@end lisp + +And finally, this prints @var{object} using only default settings, but +with @code{print-length} bound to 5: + +@lisp +(prin1 object nil '(t (length . 5))) +@end lisp + +Below is a list of symbols that can be used, and which variables they +map to: + +@table @code +@item length +This overrides @code{print-length}. +@item level +This overrides @code{print-level}. +@item circle +This overrides @code{print-circle}. +@item quoted +This overrides @code{print-quoted}. +@item escape-newlines +This overrides @code{print-escape-newlines}. +@item escape-control-characters +This overrides @code{print-escape-control-characters}. +@item escape-nonascii +This overrides @code{print-escape-nonascii}. +@item escape-multibyte +This overrides @code{print-escape-multibyte}. +@item charset-text-property +This overrides @code{print-charset-text-property}. +@item unreadeable-function +This overrides @code{print-unreadable-function}. +@item gensym +This overrides @code{print-gensym}. +@item continuous-numbering +This overrides @code{print-continuous-numbering}. +@item number-table +This overrides @code{print-number-table}. +@item float-format +This overrides @code{float-output-format}. +@item integers-as-characters +This overrides @code{print-integers-as-characters}. +@end table + +In the future, more overrides may be offered that do not map directly +to a variable, but can only be used via this parameter. diff --git a/doc/lispref/strings.texi b/doc/lispref/strings.texi index 5e41f8d57bf..addf195fad2 100644 --- a/doc/lispref/strings.texi +++ b/doc/lispref/strings.texi @@ -443,12 +443,12 @@ strings. @end defun @defun string-pad string length &optional padding start -Pad @var{string} to the be of @var{length} using @var{padding} as the -padding character (defaulting to the space character). If -@var{string} is shorter than @var{length}, no padding is done. If -@var{start} is @code{nil} (or not present), the padding is done to the -end of the string, and if it's non-@code{nil}, to the start of the -string. +Pad @var{string} to be of the given @var{length} using @var{padding} +as the padding character. @var{padding} defaults to the space +character. If @var{string} is longer than @var{length}, no padding is +done. If @var{start} is @code{nil} or omitted, the padding is +appended to the characters of @var{string}, and if it's +non-@code{nil}, the padding is prepended to @var{string}'s characters. @end defun @defun string-chop-newline string @@ -464,23 +464,29 @@ Remove the final newline, if any, from @var{string}. described in this section. @xref{Mutability}. The most basic way to alter the contents of an existing string is with -@code{aset} (@pxref{Array Functions}). @code{(aset @var{string} -@var{idx} @var{char})} stores @var{char} into @var{string} at index -@var{idx}. Each character occupies one or more bytes, and if @var{char} -needs a different number of bytes from the character already present at -that index, @code{aset} signals an error. +@code{aset} (@pxref{Array Functions}). @w{@code{(aset @var{string} +@var{idx} @var{char})}} stores @var{char} into @var{string} at character +index @var{idx}. It will automatically convert a pure-@acronym{ASCII} +@var{string} to a multibyte string (@pxref{Text Representations}) if +needed, but we recommend to always make sure @var{string} is multibyte +(e.g., by using @code{string-to-multibyte}, @pxref{Converting +Representations}), if @var{char} is a non-@acronym{ASCII} character, not +a raw byte. A more powerful function is @code{store-substring}: @defun store-substring string idx obj -This function alters part of the contents of the string @var{string}, by -storing @var{obj} starting at index @var{idx}. The argument @var{obj} -may be either a character or a (smaller) string. +This function alters part of the contents of the specified @var{string}, +by storing @var{obj} starting at character index @var{idx}. The +argument @var{obj} may be either a character (in which case the function +behaves exactly as @code{aset}) or a (smaller) string. If @var{obj} +is a multibyte string, we recommend to make sure @var{string} is also +multibyte, even if it's pure-@acronym{ASCII}. -Since it is impossible to change the length of an existing string, it is -an error if @var{obj} doesn't fit within @var{string}'s actual length, -or if any new character requires a different number of bytes from the -character currently present at that point in @var{string}. +Since it is impossible to change the number of characters in an +existing string, it is en error if @var{obj} consists of more +characters than would fit in @var{string} starting at character index +@var{idx}. @end defun To clear out a string that contained a password, use @@ -856,9 +862,7 @@ between 2 and 16 (inclusive), and integers are converted in that base. If @var{base} is @code{nil}, then base ten is used. Floating-point conversion only works in base ten; we have not implemented other radices for floating-point numbers, because that would be much more -work and does not seem useful. If @var{string} looks like an integer -but its value is too large to fit into a Lisp integer, -@code{string-to-number} returns a floating-point result. +work and does not seem useful. The parsing skips spaces and tabs at the beginning of @var{string}, then reads as much of @var{string} as it can interpret as a number in @@ -1350,7 +1354,7 @@ given width, if specified. This flag converts the substituted text to upper case (@pxref{Case Conversion}). -@item _ +@item _@r{ (underscore)} This flag converts the substituted text to lower case (@pxref{Case Conversion}). @end table diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index a1db715db6e..622f03d2a85 100644 --- a/doc/lispref/text.texi +++ b/doc/lispref/text.texi @@ -1034,6 +1034,9 @@ text in @var{string} according to the @code{yank-handler} text property, as well as the variables @code{yank-handled-properties} and @code{yank-excluded-properties} (see below), before inserting the result into the current buffer. + +@var{string} will be run through @code{yank-transform-functions} (see +below) before inserting. @end defun @defun insert-buffer-substring-as-yank buf &optional start end @@ -1108,6 +1111,23 @@ or specifying key bindings. It takes effect after @code{yank-handled-properties}. @end defopt +@defvar yank-transform-functions +This variable is a list of functions. Each function is called (in +order) with the string to be yanked as the argument, and should +return a (possibly transformed) string. This variable can be set +globally, but can also be used to create new commands that are +variations on @code{yank}. For instance, to create a command that +works like @code{yank}, but cleans up whitespace before inserting, you +could say something like: + +@lisp +(defun yank-with-clean-whitespace () + (interactive) + (let ((yank-transform-functions + '(string-clean-whitespace))) + (call-interactively #'yank))) +@end lisp +@end defvar @node Yank Commands @subsection Functions for Yanking diff --git a/doc/lispref/tips.texi b/doc/lispref/tips.texi index 061a5d672ec..30146a89ebf 100644 --- a/doc/lispref/tips.texi +++ b/doc/lispref/tips.texi @@ -694,26 +694,24 @@ starting double-quote is not part of the string! @cindex curly quotes @cindex curved quotes When a documentation string refers to a Lisp symbol, write it as it -would be printed (which usually means in lower case), surrounding it -with curved single quotes (@t{‘..’}). There are two exceptions: write -@code{t} and @code{nil} without surrounding punctuation. For example: +would be printed (which usually means in lower case), with a grave +accent @samp{`} before and apostrophe @samp{'} after it. There are +two exceptions: write @code{t} and @code{nil} without surrounding +punctuation. For example: @example - CODE can be ‘lambda’, nil, or t. + CODE can be `lambda', nil, or t. @end example -@noindent -@xref{Quotation Marks,,, emacs, The GNU Emacs Manual}, for how to -enter curved single quotes. - -Documentation strings can also use an older single-quoting convention, -which quotes symbols with grave accent @t{`} and apostrophe -@t{'}: @t{`like-this'} rather than @t{‘like-this’}. This -older convention was designed for now-obsolete displays in which grave -accent and apostrophe were mirror images. -Documentation using this convention is converted to the user's -preferred format when it is copied into a help buffer. @xref{Keys in -Documentation}. +Note that when Emacs displays these doc strings, Emacs will usually +display @samp{`} (grave accent) as @samp{‘} (left single quotation +mark) and @samp{'} (apostrophe) as @samp{’} (right single quotation +mark), if the display supports displaying these characters. +@xref{Keys in Documentation}. (Some previous versions of this section +recommended using the non-@acronym{ASCII} single quotation marks +directly in doc strings, but this is now discouraged, since that leads +to broken help string displays on terminals that don't support +displaying those characters.) @cindex hyperlinks in documentation strings Help mode automatically creates a hyperlink when a documentation string diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi index f0e3f337a69..c29547d00db 100644 --- a/doc/lispref/variables.texi +++ b/doc/lispref/variables.texi @@ -527,10 +527,11 @@ If @var{symbol} has a buffer-local binding in the current buffer, rather than the buffer-local binding. It sets the default value if the default value is void. @xref{Buffer-Local Variables}. -If @var{symbol} is already lexically bound (e.g., if the @code{defvar} -form occurs in a @code{let} form with lexical binding enabled), then -@code{defvar} sets the dynamic value. The lexical binding remains in -effect until its binding construct exits. @xref{Variable Scoping}. +If @var{symbol} is already let bound (e.g., if the @code{defvar} +form occurs in a @code{let} form), then @code{defvar} sets the toplevel +default value, like @code{set-default-toplevel-value}. +The let binding remains in effect until its binding construct exits. +@xref{Variable Scoping}. @cindex @code{eval-defun}, and @code{defvar} forms @cindex @code{eval-last-sexp}, and @code{defvar} forms diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi index 97908bea001..704ed30366c 100644 --- a/doc/lispref/windows.texi +++ b/doc/lispref/windows.texi @@ -759,15 +759,6 @@ column and total width (@pxref{Coordinates and Windows}). The optional argument @var{round} behaves as it does for @code{window-total-height}. @end defun -@defun window-max-characters-per-line &optional window face -The maximum width of a line that can be displayed in a window (without -breaking the line) depends on many things, like the font used on the -line, and whether there are fringes around the window. This -convenience function can be used to calculate that number. If -@var{window} isn't given, this defaults to the currently selected -window. if @var{var} isn't given, the @code{default} face is used. -@end defun - @defun window-total-size &optional window horizontal round This function returns either the total height in lines or the total width in columns of the window @var{window}. If @var{horizontal} is @@ -838,14 +829,18 @@ This function returns the height, in lines, of the body of window @var{window}. If @var{window} is omitted or @code{nil}, it defaults to the selected window; otherwise it must be a live window. -If the optional argument @var{pixelwise} is non-@code{nil}, this -function returns the body height of @var{window} counted in pixels. +The optional argument @var{pixelwise} defines the units to use for the +height. If @code{nil}, return the body height of @var{window} in +characters, rounded down to the nearest integer, if necessary. This +means that if a line at the bottom of the text area is only partially +visible, that line is not counted. It also means that the height of a +window's body can never exceed its total height as returned by +@code{window-total-height}. -If @var{pixelwise} is @code{nil}, the return value is rounded down to -the nearest integer, if necessary. This means that if a line at the -bottom of the text area is only partially visible, that line is not -counted. It also means that the height of a window's body can never -exceed its total height as returned by @code{window-total-height}. +If @var{pixelwise} is @code{remap} and the default face is remapped +(@pxref{Face Remapping}), use the remapped face to determine the +character height. For any other non-@code{nil} value, return the +height in pixels. @end defun @cindex window body width @@ -866,14 +861,18 @@ This function returns the width, in columns, of the body of window @var{window}. If @var{window} is omitted or @code{nil}, it defaults to the selected window; otherwise it must be a live window. -If the optional argument @var{pixelwise} is non-@code{nil}, this -function returns the body width of @var{window} in units of pixels. +The optional argument @var{pixelwise} defines the units to use for the +width. If @code{nil}, return the body width of @var{window} in +characters, rounded down to the nearest integer, if necessary. This +means that if a column on the right of the text area is only partially +visible, that column is not counted. It also means that the width of +a window's body can never exceed its total width as returned by +@code{window-total-width}. -If @var{pixelwise} is @code{nil}, the return value is rounded down to -the nearest integer, if necessary. This means that if a column on the -right of the text area is only partially visible, that column is not -counted. It also means that the width of a window's body can never -exceed its total width as returned by @code{window-total-width}. +If @var{pixelwise} is @code{remap} and the default face is remapped +(@pxref{Face Remapping}), use the remapped face to determine the +character width. For any other non-@code{nil} value, return the width +in pixels. @end defun @cindex window body size @@ -2845,6 +2844,11 @@ the function specified in @code{pop-up-frame-function} the newly created frame's parameters. @end defun +@defun display-buffer-full-frame buffer alist +This function displays the buffer on the current frame, deleting all +other windows so that it takes up the full frame. +@end defun + @defun display-buffer-in-child-frame buffer alist This function tries to display @var{buffer} in a child frame (@pxref{Child Frames}) of the selected frame, either reusing an @@ -3300,6 +3304,13 @@ window has at least that many columns. If the value is @code{nil}, that means not to split this way. @end defopt +@defopt display-buffer-avoid-small-windows +If non-@code{nil}, this should be a number. Windows that have fewer +lines than that will be avoided when choosing an existing window. The +value is interpreted in units of the frame's canonical line height, +like @code{window-total-height} does (@pxref{Window Sizes}). +@end defopt + @defopt even-window-sizes This variable, if non-@code{nil}, causes @code{display-buffer} to even window sizes whenever it reuses an existing window, and that window is @@ -4173,6 +4184,13 @@ ignore this option, for example, when there is only one buffer left these functions can switch to. @end defopt +@defopt switch-to-prev-buffer-skip-regexp +This user option should be either a regular expression or a list of +regular expressions. Buffers whose names match one of those regular +expressions will be ignored by @code{switch-to-prev-buffer} and +@code{switch-to-next-buffer} (except when there's no other buffer to +switch to). +@end defopt @node Dedicated Windows @section Dedicated Windows @@ -5508,7 +5526,7 @@ pixels, rather than in units of the normal line height. @end example @end defun -@defun set-window-vscroll window lines &optional pixels-p +@defun set-window-vscroll window lines &optional pixels-p preserve-vscroll-p This function sets @var{window}'s vertical scroll position to @var{lines}. If @var{window} is @code{nil}, the selected window is used. The argument @var{lines} should be zero or positive; if not, it @@ -5530,6 +5548,12 @@ The return value is the result of this rounding. If @var{pixels-p} is non-@code{nil}, @var{lines} specifies a number of pixels. In this case, the return value is @var{lines}. + +Normally, the vscroll does not take effect on windows that aren't the +@code{minibuffer-scroll-window} or the selected window when the +mini-window is resized (@pxref{Minibuffer Windows}). This ``frozen'' +behavior is disabled when the @var{preserve-vscroll-p} parameter is +non-@code{nil}, which means to set the vscroll as usual. @end defun @defvar auto-window-vscroll @@ -6123,11 +6147,10 @@ configuration on the current frame. This function returns @code{t} if @var{object} is a window configuration. @end defun -@defun compare-window-configurations config1 config2 -This function compares two window configurations as regards the -structure of windows, but ignores the values of point and the -saved scrolling positions---it can return @code{t} even if those -aspects differ. +@defun window-configuration-equal-p config1 config2 +This function says whether two window configurations have the same +window layout, but ignores the values of point and the saved scrolling +positions---it can return @code{t} even if those aspects differ. @end defun @defun window-configuration-frame config diff --git a/doc/man/emacs.1.in b/doc/man/emacs.1.in index 9fdf65e0ff7..7b2b5539795 100644 --- a/doc/man/emacs.1.in +++ b/doc/man/emacs.1.in @@ -1,5 +1,5 @@ .\" See section COPYING for copyright and redistribution information. -.TH EMACS 1 "2021-09-28" "GNU Emacs @version@" "GNU" +.TH EMACS 1 "2022-06-07" "GNU Emacs @version@" "GNU" . . .SH NAME @@ -117,6 +117,10 @@ Load .IR user 's init file. .TP +.BI \-\-init\-directory= "directory" +Start emacs with user-emacs-directory set to +.IR directory . +.TP .BI \-t " file\fR,\fP " \-\-terminal= "file" Use specified .I file diff --git a/doc/man/etags.1 b/doc/man/etags.1 index d345b8bd73f..4681a9dadbf 100644 --- a/doc/man/etags.1 +++ b/doc/man/etags.1 @@ -1,5 +1,5 @@ .\" See section COPYING for copyright and redistribution information. -.TH ETAGS 1 "2021-03-30" "GNU Tools" "GNU" +.TH ETAGS 1 "2022-06-10" "GNU Tools" "GNU" .de BP .sp .ti -.2i @@ -122,7 +122,9 @@ current file. Only \fBetags\fP accepts this option. .B \-I, \-\-ignore\-indentation Don't rely on indentation as much as we normally do. Currently, this means not to assume that a closing brace in the first column is the -final brace of a function or structure definition in C and C++. +final brace of a function or structure definition in C and C++. This +is important for code that doesn't observe the GNU Coding conventions +of placing only top-level braces in column zero. .TP \fB\-l\fP \fIlanguage\fP, \fB\-\-language=\fIlanguage\fP Parse the following files according to the given language. More than diff --git a/doc/misc/dbus.texi b/doc/misc/dbus.texi index 0b4f53ba136..bb97446d127 100644 --- a/doc/misc/dbus.texi +++ b/doc/misc/dbus.texi @@ -795,13 +795,7 @@ and interface. Example: (dbus-get-all-managed-objects :session "org.gnome.SettingsDaemon" "/") -@result{} (("/org/gnome/SettingsDaemon/MediaKeys" - ("org.gnome.SettingsDaemon.MediaKeys") - ("org.freedesktop.DBus.Peer") - ("org.freedesktop.DBus.Introspectable") - ("org.freedesktop.DBus.Properties") - ("org.freedesktop.DBus.ObjectManager")) - ("/org/gnome/SettingsDaemon/Power" +@result{} (("/org/gnome/SettingsDaemon/Power" ("org.gnome.SettingsDaemon.Power.Keyboard") ("org.gnome.SettingsDaemon.Power.Screen") ("org.gnome.SettingsDaemon.Power" diff --git a/doc/misc/efaq-w32.texi b/doc/misc/efaq-w32.texi index 8dcdb121abe..55175a3b89f 100644 --- a/doc/misc/efaq-w32.texi +++ b/doc/misc/efaq-w32.texi @@ -1742,23 +1742,6 @@ You will need an implementation of TeX for Windows. A number of implementations are listed on the @uref{http://www.tug.org/interest.html#free, TeX Users Group} website. -@menu -* AUCTeX:: -@end menu - -@node AUCTeX -@subsection AUCTeX -@cindex auctex, precompiled for Windows -@cindex latex -@cindex preview-latex - -AUCTeX is an Emacs package for writing LaTeX files, which also -includes preview-latex, an Emacs mode for previewing the formatted -contents of LaTeX documents. Pre-compiled versions for Windows are -available from -@uref{https://www.gnu.org/software/auctex/download-for-windows.html, the -AUCTeX site}. - @node Spell check @section How do I perform spell checks? @cindex spell checking diff --git a/doc/misc/efaq.texi b/doc/misc/efaq.texi index 87a70d064ea..a98c4b6a614 100644 --- a/doc/misc/efaq.texi +++ b/doc/misc/efaq.texi @@ -9,10 +9,9 @@ @copying Copyright @copyright{} 2001--2022 Free Software Foundation, Inc.@* -Copyright @copyright{} 1994, 1995, 1996, 1997, 1998, 1999, 2000 -Reuven M. Lerner@* -Copyright @copyright{} 1992, 1993 Steven Byrnes@* -Copyright @copyright{} 1990, 1991, 1992 Joseph Brian Wells@* +Copyright @copyright{} 1994--2000 Reuven M. Lerner@* +Copyright @copyright{} 1992--1993 Steven Byrnes@* +Copyright @copyright{} 1990--1992 Joseph Brian Wells@* @quotation This list of frequently asked questions about GNU Emacs with answers @@ -882,10 +881,11 @@ divergent TECO command sets and key bindings at MIT, and completed by RMS. Many people have said that TECO code looks a lot like line noise; you -can read more at @uref{news:alt.lang.teco}. Someone has written a TECO -implementation in Emacs Lisp (to find it, see @ref{Packages that do not -come with Emacs}); it would be an interesting project to run the -original TECO Emacs inside of Emacs. +can read more on +@uref{https://en.wikipedia.org/wiki/TECO_(text_editor), Wikipedia}. +Someone has written a TECO implementation in Emacs Lisp (to find it, +see @ref{Packages that do not come with Emacs}); it would be an +interesting project to run the original TECO Emacs inside of Emacs. @cindex Why Emacs? For some not-so-serious alternative reasons for Emacs to have that @@ -3712,7 +3712,6 @@ information is available from * Compose Character:: * Binding combinations of modifiers and function keys:: * Meta key does not work in xterm:: -* SPC no longer completes file names:: @end menu @node Binding keys to commands @@ -4157,10 +4156,6 @@ If there is an @code{rlogin} connection between @code{xterm} and Emacs, the @samp{-8} argument may need to be given to rlogin to make it pass all 8 bits of every character. -@item -If Emacs is running on Ultrix, it is reported that evaluating -@code{(set-input-mode t nil)} helps. - @item If all else fails, you can make @code{xterm} generate @kbd{@key{ESC} W} when you type @kbd{M-W}, which is the same conversion Emacs would make if it @@ -4186,22 +4181,6 @@ You might have to replace @samp{Meta} with @samp{Alt}. @end itemize -@node SPC no longer completes file names -@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 -the minibuffer, so that file names with embedded spaces could be typed -without the need to quote the spaces. - -You can get the old behavior by binding @kbd{SPC} to -@code{minibuffer-complete-word} in the minibuffer, as follows: - -@lisp -(define-key minibuffer-local-filename-completion-map (kbd "SPC") - 'minibuffer-complete-word) -@end lisp - @c ------------------------------------------------------------ @node Alternate character sets @chapter Alternate character sets @@ -4295,75 +4274,6 @@ add the following line to your @file{~/.emacs}: (setq ps-multibyte-buffer 'bdf-font-except-latin) @end lisp -A few additional steps are necessary for MS-Windows; they are listed -below. - -First, make sure @emph{all} the directories with BDF font files are -mentioned in @code{bdf-directory-list}. On Unix and GNU/Linux -systems, one normally runs @kbd{make install} to install the BDF fonts -in the same directory. By contrast, Windows users typically don't run -the Intlfonts installation command, but unpack the distribution in -some directory, which leaves the BDF fonts in its subdirectories. For -example, assume that you unpacked Intlfonts in @file{C:/Intlfonts}; -then you should set @code{bdf-directory-list} as follows: - -@lisp - (setq bdf-directory-list - '("C:/Intlfonts/Asian" - "C:/Intlfonts/Chinese" "C:/Intlfonts/Chinese.X" - "C:/Intlfonts/Chinese.BIG" "C:/Intlfonts/Ethiopic" - "C:/Intlfonts/European" "C:/Intlfonts/European.BIG" - "C:/Intlfonts/Japanese" "C:/Intlfonts/Japanese.X" - "C:/Intlfonts/Japanese.BIG" "C:/Intlfonts/Korean.X" - "C:/Intlfonts/Misc")) -@end lisp - -@cindex @code{w32-bdf-filename-alist} -@cindex @code{w32-find-bdf-fonts} -Next, you need to set up the variable @code{w32-bdf-filename-alist} to -an alist of the BDF fonts and their corresponding file names. -Assuming you have set @code{bdf-directory-list} to name all the -directories with the BDF font files, the following Lisp snippet will -set up @code{w32-bdf-filename-alist}: - -@lisp - (setq w32-bdf-filename-alist - (w32-find-bdf-fonts bdf-directory-list)) -@end lisp - -Now, create fontsets for the BDF fonts: - -@smallexample - (create-fontset-from-fontset-spec - "-*-fixed-medium-r-normal-*-16-*-*-*-c-*-fontset-bdf, - japanese-jisx0208:-*-*-medium-r-normal-*-16-*-*-*-c-*-jisx0208.1983-*, - katakana-jisx0201:-*-*-medium-r-normal-*-16-*-*-*-c-*-jisx0201*-*, - latin-jisx0201:-*-*-medium-r-normal-*-16-*-*-*-c-*-jisx0201*-*, - japanese-jisx0208-1978:-*-*-medium-r-normal-*-16-*-*-*-c-*-jisx0208.1978-*, - thai-tis620:-misc-fixed-medium-r-normal--16-160-72-72-m-80-tis620.2529-1, - lao:-misc-fixed-medium-r-normal--16-160-72-72-m-80-MuleLao-1, - tibetan-1-column:-TibMdXA-fixed-medium-r-normal--16-160-72-72-m-80-MuleTibetan-1, - ethiopic:-Admas-Ethiomx16f-Medium-R-Normal--16-150-100-100-M-160-Ethiopic-Unicode, - tibetan:-TibMdXA-fixed-medium-r-normal--16-160-72-72-m-160-MuleTibetan-0") -@end smallexample - -Many of the international bdf fonts from Intlfonts are type 0, and -therefore need to be added to font-encoding-alist: - -@lisp - (setq font-encoding-alist - (append '(("MuleTibetan-0" (tibetan . 0)) - ("GB2312" (chinese-gb2312 . 0)) - ("JISX0208" (japanese-jisx0208 . 0)) - ("JISX0212" (japanese-jisx0212 . 0)) - ("VISCII" (vietnamese-viscii-lower . 0)) - ("KSC5601" (korean-ksc5601 . 0)) - ("MuleArabic-0" (arabic-digit . 0)) - ("MuleArabic-1" (arabic-1-column . 0)) - ("MuleArabic-2" (arabic-2-column . 0))) - font-encoding-alist)) -@end lisp - You can now use the Emacs font menu to select the @samp{bdf: 16-dot medium} fontset, or you can select it by setting the default font in your @file{~/.emacs}: @@ -4372,7 +4282,6 @@ fontset, or you can select it by setting the default font in your (set-frame-font "fontset-bdf") @end lisp - @c ------------------------------------------------------------ @node Mail and news @chapter Mail and news diff --git a/doc/misc/eshell.texi b/doc/misc/eshell.texi index d35a642b62d..85e5a4933fd 100644 --- a/doc/misc/eshell.texi +++ b/doc/misc/eshell.texi @@ -1758,14 +1758,6 @@ alias arg=blah function arg () @{ blah $* @} @end example -@item @samp{for i in 1 2 3 @{ grep -q a b && *echo has it @} | wc -l} outputs result after prompt - -In fact, piping to a process from a looping construct doesn't work in -general. If I change the call to @code{eshell-copy-handles} in -@code{eshell-rewrite-for-command} to use @code{eshell-protect}, it seems -to work, but the output occurs after the prompt is displayed. The whole -structured command thing is too complicated at present. - @item Pcomplete sometimes gets stuck You press @key{TAB}, but no completions appear, even though the diff --git a/doc/misc/eudc.texi b/doc/misc/eudc.texi index d2850282fea..7fd5add67ea 100644 --- a/doc/misc/eudc.texi +++ b/doc/misc/eudc.texi @@ -713,6 +713,7 @@ be passed to the program. @node Inline Query Expansion @section Inline Query Expansion +@subsection Inline Query Expansion Using a Key Binding Inline query expansion is a powerful method to get completion from your directory servers. The most common usage is for expanding names @@ -885,6 +886,29 @@ An error is signaled. The expansion aborts. Default is @code{select} @end defvar +@subsection Inline Query Expansion Using completion-at-point + +In addition to providing a dedicated EUDC function for binding to a +key shortcut (@pxref{Inline Query Expansion}), EUDC also provides a +function to contribute search results to the Emacs in-buffer +completion system available via the function +@code{completion-at-point} (@pxref{Identifier +Inquiries,,,maintaining}) in @code{message-mode} buffers +(@pxref{Top,Message,, message, Message}). When using this mechanism, +queries are made in the multi-server query mode of operation +(@pxref{Multi-server Queries}). + +When a buffer in @code{message-mode} is created, EUDC's inline +expansion function is automatically added to the variable +@code{completion-at-point-functions}. As a result, whenever +@code{completion-at-point} is invoked in a @code{message-mode} buffer, +EUDC will be queried for email addresses matching the words before +point. Since this will be useful only when editing specific message +header fields that require specifying one or more email addresses, an +additional check is performed whether point is actually in one of +those header fields. Thus, any matching email addresses will be +offered for completion in suitable message header fields only, and not +in other places, like for example the body of the message. @node The Server Hotlist diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi index e51ae7d424d..a0be13dac88 100644 --- a/doc/misc/gnus.texi +++ b/doc/misc/gnus.texi @@ -29685,10 +29685,9 @@ Gnus not to use @acronym{NOV}. As the variables for the other back ends, there are @code{nndiary-nov-is-evil}, @code{nndir-nov-is-evil}, -@code{nnfolder-nov-is-evil}, @code{nnimap-nov-is-evil}, -@code{nnml-nov-is-evil}, and @code{nnspool-nov-is-evil}. Note that a -non-@code{nil} value for @code{gnus-nov-is-evil} overrides all those -variables. +@code{nnfolder-nov-is-evil}, @code{nnml-nov-is-evil}, and +@code{nnspool-nov-is-evil}. Note that a non-@code{nil} value for +@code{gnus-nov-is-evil} overrides all those variables. @end table diff --git a/doc/misc/modus-themes.org b/doc/misc/modus-themes.org index 42ad3ee35fe..7b566f51c26 100644 --- a/doc/misc/modus-themes.org +++ b/doc/misc/modus-themes.org @@ -5,9 +5,9 @@ #+options: ':t toc:nil author:t email:t num:t #+startup: content -#+macro: stable-version 2.3.0 -#+macro: release-date 2022-04-01 -#+macro: development-version 2.4.0-dev +#+macro: stable-version 2.4.0 +#+macro: release-date 2022-06-01 +#+macro: development-version 2.5.0-dev #+macro: file @@texinfo:@file{@@$1@@texinfo:}@@ #+macro: space @@texinfo:@: @@ #+macro: kbd @@texinfo:@kbd{@@$1@@texinfo:}@@ @@ -34,6 +34,10 @@ explicitly marked as such. Current development target is {{{development-version}}}. ++ Homepage: https://protesilaos.com/emacs/modus-themes. ++ Git repository: https://git.sr.ht/~protesilaos/modus-themes. ++ Mailing list: https://lists.sr.ht/~protesilaos/modus-themes. + #+toc: headlines 8 insert TOC here, with eight headline levels * COPYING @@ -165,14 +169,10 @@ The themes are now ready to be used: [[#h:3f3c3728-1b34-437d-9d0c-b110f5b161a9][ The ~modus-themes~ package is available from the GNU ELPA archive, which is configured by default. -Prior to querying any package archive, make sure to have updated the -index, with {{{kbd(M-x package-refresh-contents)}}}. Then all you need to do +Prior to querying any package archive, make sure to update the index, +with {{{kbd(M-x package-refresh-contents)}}}. Then all you need to do is type {{{kbd(M-x package-install)}}} and specify the ~modus-themes~. -Note that older versions of the themes used to be distributed as -standalone packages. This practice has been discontinued starting with -version 1.0.0 of this project. - Once installed, the themes are ready to be used: [[#h:3f3c3728-1b34-437d-9d0c-b110f5b161a9][Enable and load]]. ** Install on GNU/Linux @@ -211,6 +211,34 @@ guix package -i emacs-modus-themes They are now ready to be used: [[#h:3f3c3728-1b34-437d-9d0c-b110f5b161a9][Enable and load]]. +** Dealing with byte compilation errors +:properties: +:custom_id: h:e6268471-e847-4c9d-998f-49a83257b7f1 +:end: + +From time to time, we receive bug reports pertaining to errors with byte +compilation. These seldom have to do with faulty code in the themes: it +might be a shortcoming of =package.el=, some regression in the current +development target of Emacs, a misconfiguration in an otherwise exotic +setup, and the like. + +The common solution with a stable version of Emacs is to: + +1. Delete the =modus-themes= package. +2. Close the current Emacs session. +3. Install the =modus-themes= again. + +For those building Emacs directly from source, the solution may involve +reverting to an earlier commit in emacs.git. + +At any rate, if you encounter such an issue please report it: we will +either fix the bug on our end if it is truly ours, or help forward it to +the relevant upstream maintainer. Whatever you do, please understand +that a build failure does not mean we are necessarily doing something +wrong. + +[[#h:6536c8d5-3f98-43ab-a787-b94120e735e8][Issues you can help with]]. + * Enable and load :properties: :custom_id: h:3f3c3728-1b34-437d-9d0c-b110f5b161a9 @@ -4053,6 +4081,44 @@ comments are gray. Regexp constructs are adapted accordingly. (set-face-attribute 'font-lock-warning-face nil :inherit 'modus-themes-bold :foreground red-nuanced-fg))) #+end_src +** Custom hl-todo colors +:PROPERTIES: +:CUSTOM_ID: h:2ef83a21-2f0a-441e-9634-473feb940743 +:END: + +The =hl-todo= package provides the user option ~hl-todo-keyword-faces~: +it specifies a pair of keyword and corresponding color value. The Modus +themes configure that option in the interest of legibility. While this +works for our purposes, users may still prefer to apply their custom +values, in which case the following approach is necessary: + +#+begin_src emacs-lisp +(defun my-modus-themes-hl-todo-faces () + (setq hl-todo-keyword-faces '(("TODO" . "#ff0000") + ("HACK" . "#ffff00") + ("XXX" . "#00ffff") + ("NOTE" . "#ff00ff")))) + +(add-hook 'modus-themes-after-load-theme-hook #'my-modus-themes-hl-todo-faces) +#+end_src + +Or include a ~let~ form, if needed: + +#+begin_src emacs-lisp +(defun my-modus-themes-hl-todo-faces () + (let ((red "#ff0000") + (blue "#0000ff")) + (setq hl-todo-keyword-faces `(("TODO" . ,blue) + ("HACK" . ,red) + ("XXX" . ,red) + ("NOTE" . ,blue))))) + +(add-hook 'modus-themes-after-load-theme-hook #'my-modus-themes-hl-todo-faces) +#+end_src + +Normally, we do not touch user options, though this is an exception: +otherwise the defaults are not always legible. + * Face coverage :properties: :custom_id: h:a9c8f29d-7f72-4b54-b74b-ddefe15d6a19 @@ -4098,6 +4164,7 @@ have lots of extensions, so the "full support" may not be 100% true… + breakpoint (provided by the built-in {{{file(gdb-mi.el)}}} library) + calendar and diary + calfw ++ calibredb + centaur-tabs + cfrs + change-log and log-view (such as ~vc-print-log~, ~vc-print-root-log~) @@ -4112,6 +4179,7 @@ have lots of extensions, so the "full support" may not be 100% true… + completions + consult + corfu ++ corfu-quick + counsel* + counsel-css + cov @@ -4146,6 +4214,7 @@ have lots of extensions, so the "full support" may not be 100% true… + easy-jekyll + ebdb + ediff ++ ein (Emacs IPython Notebook) + eglot + el-search + eldoc-box @@ -4344,6 +4413,7 @@ have lots of extensions, so the "full support" may not be 100% true… + tomatinho + transient (pop-up windows such as Magit's) + trashed ++ tree-sitter + treemacs + tty-menu + tuareg @@ -4357,6 +4427,7 @@ have lots of extensions, so the "full support" may not be 100% true… + visible-mark + visual-regexp + vterm ++ vundo + wcheck-mode + web-mode + wgrep @@ -4398,6 +4469,7 @@ supported by the themes. + dtache + easy-kill + edit-indirect ++ egerrit + elfeed-summary + evil-owl + flyspell-correct @@ -4432,40 +4504,6 @@ supported by the themes. This section covers information that may be of interest to users of individual packages. -** Note on avy hints -:properties: -:custom_id: h:2fdce705-6de7-44e6-ab7f-18f59af99e01 -:end: - -Hints can appear everywhere, in wildly varying contexts, hence, their -appearance, by necessity, is a compromise. However, there are various -options for making them stand out. First is dimming the surroundings: - -#+begin_src emacs-lisp -(setq avy-background t) -#+end_src - -Dimming works well when you find it difficult to spot hints, any hint. -Second is limiting the number of faces used by hints: - -#+begin_src emacs-lisp -(setq avy-lead-faces - '(avy-lead-face - avy-lead-face-1 - avy-lead-face-1 - avy-lead-face-1 - avy-lead-face-1)) -#+end_src - -Limiting the number of faces works well with longer hints when you find -it difficult to identify individual hints, especially with hints -touching each other. The first character of the hint will have an -intense color, the remaining ones the same neutral color. - -Third is preferring commands that produce fewer candidates. Fewer hints -is less noise: ~avy-goto-char-timer~ is an excellent alternative to -~avy-goto-char~. - ** Note on calendar.el weekday and weekend colors :properties: :custom_id: h:b2db46fb-32f4-44fd-8e11-d2b261cf51ae @@ -4495,6 +4533,72 @@ weekends uniformly. For changes to take effect, the Calendar buffer needs to be generated anew. +** Note on git-gutter in Doom Emacs +:PROPERTIES: +:CUSTOM_ID: h:a195e37c-e58c-4148-b254-8ba1ed8a731a +:END: + +The =git-gutter= and =git-gutter-fr= packages default to drawing bitmaps +for the indicators they display (e.g. bitmap of a plus sign for added +lines). In Doom Emacs, these bitmaps are replaced with contiguous lines +which may look nicer, but require a change to the foreground of the +relevant faces to yield the desired colour combinations. + +Since this is Doom-specific, we urge users to apply changes in their +local setup. Below is some sample code, based on what we cover at +length elsewhere in this manual: + +[[#h:f4651d55-8c07-46aa-b52b-bed1e53463bb][Advanced customization]]. + +[[#h:51ba3547-b8c8-40d6-ba5a-4586477fd4ae][Face specs at scale using the themes' palette]]. + +#+begin_src emacs-lisp +(defun my-modus-themes-custom-faces () + (modus-themes-with-colors + (custom-set-faces + ;; Replace green with blue if you use `modus-themes-deuteranopia'. + `(git-gutter-fr:added ((,class :foreground ,green-fringe-bg))) + `(git-gutter-fr:deleted ((,class :foreground ,red-fringe-bg))) + `(git-gutter-fr:modified ((,class :foreground ,yellow-fringe-bg)))))) + +(add-hook 'modus-themes-after-load-theme-hook #'my-modus-themes-custom-faces) +#+end_src + +If the above does not work, try this instead: + +#+begin_src emacs-lisp +(after! modus-themes + (modus-themes-with-colors + (custom-set-faces + ;; Replace green with blue if you use `modus-themes-deuteranopia'. + `(git-gutter-fr:added ((,class :foreground ,green-fringe-bg))) + `(git-gutter-fr:deleted ((,class :foreground ,red-fringe-bg))) + `(git-gutter-fr:modified ((,class :foreground ,yellow-fringe-bg)))))) +#+end_src + +Replace ~green-fringe-bg~ with ~blue-fringe-bg~ if you want to optimize +for red-green color deficiency. + +[[#h:3ed03a48-20d8-4ce7-b214-0eb7e4c79abe][Option for red-green color deficiency or deuteranopia]]. + +** Note on php-mode multiline comments +:PROPERTIES: +:CUSTOM_ID: h:d0a3157b-9c04-46e8-8742-5fb2a7ae8798 +:END: + +Depending on your build of Emacs and/or the environment it runs in, +multiline comments in PHP with the =php-mode= package use the +~font-lock-doc-face~ instead of ~font-lock-comment-face~. + +This seems to make all comments use the appropriate face: + +#+begin_src emacs-lisp +(defun my-multine-comments () + (setq-local c-doc-face-name 'font-lock-comment-face)) + +(add-hook 'php-mode-hook #'my-multine-comments) +#+end_src + ** Note on underlines in compilation buffers :properties: :custom_id: h:420f5a33-c7a9-4112-9b04-eaf2cbad96bd @@ -4594,6 +4698,17 @@ elsewhere in this document. For example: [[#h:51ba3547-b8c8-40d6-ba5a-4586477fd4ae][Face specs at scale using the themes' palette]]. +To make the line thicker, set the height to be equal to the base font +size instead of the one pixel we use. This is done by specifying a rate +instead of an absolute number, as in =:height 1.0= versus =:height 1=. +For example: + +#+begin_src emacs-lisp +(modus-themes-with-colors + (custom-set-faces + `(fill-column-indicator ((,class :height 1.0 :background ,bg-inactive :foreground ,bg-inactive))))) +#+end_src + ** Note on highlight-parentheses.el :PROPERTIES: :CUSTOM_ID: h:24bab397-dcb2-421d-aa6e-ec5bd622b913 @@ -5271,8 +5386,8 @@ and hints of green give us suitable shades of purple. Due to the need of maintaining some difference in hueness between adjacent colors, it is not possible to make red, green, and yellow the -primary colors, because blue could not be used to control their -luminance and, thus the relevant space would shrink considerably. +main colors, because blue cannot be used to control their luminance and, +thus the relevant space will shrink considerably. [[#h:5ce7ae2e-9348-4e55-b4cf-9302345b1826][Is the contrast ratio about adjacent colors?]] @@ -5508,8 +5623,8 @@ in which you can contribute to their ongoing development. The ~modus-operandi~ and ~modus-vivendi~ themes are built into Emacs 28. -The source code of the themes is [[https://gitlab.com/protesilaos/modus-themes/][available on GitLab]], for the time -being. A [[https://github.com/protesilaos/modus-themes/][mirror on GitHub]] is also on offer. +The source code of the themes is [[https://git.sr.ht/~protesilaos/modus-themes][available on SourceHut]]. Or check the +[[https://gitlab.com/protesilaos/modus-themes/][GitLab mirror (former main source)]] and the [[https://github.com/protesilaos/modus-themes/][GitHub mirror]]. An HTML version of this manual is provided as an extension of the [[https://protesilaos.com/emacs/modus-themes/][author's personal website]] (does not rely on any non-free code). @@ -5520,7 +5635,10 @@ An HTML version of this manual is provided as an extension of the :end: #+cindex: Contributing -A few tasks you can help with: +#+findex: modus-themes-report-bug +A few tasks you can help with by sending an email to the general +[[https://lists.sr.ht/~protesilaos/modus-themes][modus-themes public mailing list]] (or use the command +~modus-themes-report-bug~). + Suggest refinements to packages that are covered. + Report packages not covered thus far. @@ -5528,7 +5646,8 @@ A few tasks you can help with: + Help expand the documentation of covered-but-not-styled packages. + Suggest refinements to the color palette. + Help expand this document or any other piece of documentation. -+ Merge requests for code refinements. ++ Send patches for code refinements (if you need, ask me for help with + Git---we all start out as beginners). [[#h:111773e2-f26f-4b68-8c4f-9794ca6b9633][Patches require copyright assignment to the FSF]]. @@ -5536,6 +5655,10 @@ It is preferable that your feedback includes some screenshots, GIFs, or short videos, as well as further instructions to reproduce a given setup. Though this is not a requirement. +#+findex: modus-themes-version +Also consider mentioning the version of the themes you are using, such +as by invoking the command ~modus-themes-version~. + Whatever you do, bear in mind the overarching objective of the Modus themes: to keep a contrast ratio that is greater or equal to 7:1 between background and foreground colors. If a compromise is ever necessary @@ -5567,7 +5690,7 @@ will send you the assignment form for your past and future changes. Please use your full legal name (in ASCII characters) as the subject line of the message. ----------------------------------------------------------------------- + REQUEST: SEND FORM FOR PAST AND FUTURE CHANGES [What is the name of the program or package you're contributing to?] @@ -5619,41 +5742,44 @@ The Modus themes are a collective effort. Every bit of work matters. Johansson, Basil L.{{{space()}}} Contovounesios, Björn Lindström, Carlo Zancanaro, Christian Tietze, Daniel Mendler, Eli Zaretskii, Fritz Grabo, Illia Ostapyshyn, Kévin Le Gouguec, Kostadin Ninev, - Madhavan Krishnan, Markus Beppler, Matthew Stevenson, Mauro Aranda, - Nicolas De Jaeghere, Philip Kaludercic, Pierre Téchoueyres, Rudolf - Adamkovič, Stephen Gildea, Shreyas Ragavan, Stefan Kangas, Utkarsh - Singh, Vincent Murphy, Xinglu Chen, Yuanchen Xie. + Madhavan Krishnan, Manuel Giraud, Markus Beppler, Matthew Stevenson, + Mauro Aranda, Nicolas De Jaeghere, Philip Kaludercic, Pierre + Téchoueyres, Rudolf Adamkovič, Stephen Gildea, Shreyas Ragavan, Stefan + Kangas, Utkarsh Singh, Vincent Murphy, Xinglu Chen, Yuanchen Xie. + Ideas and user feedback :: Aaron Jensen, Adam Porter, Adam Spiers, Adrian Manea, Alex Griffin, Alex Koen, Alex Peitsinis, Alexey Shmalko, - Alok Singh, Anders Johansson, André Alexandre Gomes, Antonio Hernández - Blas, Arif Rezai, Augusto Stoffel, Basil L.{{{space()}}} - Contovounesios, Burgess Chang, Christian Tietze, Christopher Dimech, - Damien Cassou, Daniel Mendler, Dario Gjorgjevski, David Edmondson, - Davor Rotim, Divan Santana, Eliraz Kedmi, Emanuele Michele Alberto - Monterosso, Farasha Euker, Feng Shu, Gautier Ponsinet, Gerry Agbobada, - Gianluca Recchia, Guilherme Semente, Gustavo Barros, Hörmetjan Yiltiz, - Ilja Kocken, Iris Garcia, Jeremy Friesen, Jerry Zhang, Johannes - Grødem, John Haman, Jorge Morais, Joshua O'Connor, Julio - C. Villasante, Kenta Usami, Kevin Fleming, Kévin Le Gouguec, Kostadin - Ninev, Len Trigg, Lennart C. Karssen, Magne Hov, Manuel Uberti, Mark - Bestley, Mark Burton, Markus Beppler, Mauro Aranda, Michael + Alok Singh, Anders Johansson, André Alexandre Gomes, Andrew Tropin, + Antonio Hernández Blas, Arif Rezai, Augusto Stoffel, Basil + L.{{{space()}}} Contovounesios, Burgess Chang, Christian Tietze, + Christopher Dimech, Christopher League, Damien Cassou, Daniel Mendler, + Dario Gjorgjevski, David Edmondson, Davor Rotim, Divan Santana, Eliraz + Kedmi, Emanuele Michele Alberto Monterosso, Farasha Euker, Feng Shu, + Gautier Ponsinet, Gerry Agbobada, Gianluca Recchia, Gonçalo Marrafa, + Guilherme Semente, Gustavo Barros, Hörmetjan Yiltiz, Ilja Kocken, Iris + Garcia, Ivan Popovych, Jeremy Friesen, Jerry Zhang, Johannes Grødem, + John Haman, Jorge Morais, Joshua O'Connor, Julio C. Villasante, Kenta + Usami, Kevin Fleming, Kévin Le Gouguec, Kostadin Ninev, Len Trigg, + Lennart C. Karssen, Magne Hov, Manuel Uberti, Mark Bestley, Mark + Burton, Markus Beppler, Mauro Aranda, Maxime Tréca, Michael Goldenberg, Morgan Smith, Morgan Willcock, Murilo Pereira, Nicky van Foreest, Nicolas De Jaeghere, Paul Poloskov, Pengji Zhang, Pete - Kazmier, Peter Wu, Philip Kaludercic, Pierre Téchoueyres, Robert - Hepple, Roman Rudakov, Ryan Phillips, Rytis Paškauskas, Rudolf - Adamkovič, Sam Kleinman, Samuel Culpepper, Saša Janiška, Shreyas - Ragavan, Simon Pugnet, Tassilo Horn, Thibaut Verron, Thomas Heartman, - Togan Muftuoglu, Tony Zorman, Trey Merkley, Tomasz Hołubowicz, Toon - Claes, Uri Sharf, Utkarsh Singh, Vincent Foley. As well as users: - Ben, CsBigDataHub1, Emacs Contrib, Eugene, Fourchaux, Fredrik, - Moesasji, Nick, TheBlob42, Trey, bepolymathe, bit9tream, derek-upham, - doolio, fleimgruber, gitrj95, iSeeU, jixiuf, okamsn, pRot0ta1p. + Kazmier, Peter Wu, Philip Kaludercic, Pierre Téchoueyres, Przemysław + Kryger, Robert Hepple, Roman Rudakov, Ryan Phillips, Rytis Paškauskas, + Rudolf Adamkovič, Sam Kleinman, Samuel Culpepper, Saša Janiška, + Shreyas Ragavan, Simon Pugnet, Tassilo Horn, Thibaut Verron, Thomas + Heartman, Togan Muftuoglu, Tony Zorman, Trey Merkley, Tomasz + Hołubowicz, Toon Claes, Uri Sharf, Utkarsh Singh, Vincent Foley. As + well as users: Ben, CsBigDataHub1, Emacs Contrib, Eugene, Fourchaux, + Fredrik, Moesasji, Nick, TheBlob42, Trey, bepolymathe, bit9tream, + derek-upham, doolio, fleimgruber, gitrj95, iSeeU, jixiuf, okamsn, + pRot0ta1p. -+ Packaging :: Basil L.{{{space()}}} Contovounesios, Eli Zaretskii, Glenn - Morris, Mauro Aranda, Richard Stallman, Stefan Kangas (core Emacs), - Stefan Monnier (GNU Elpa), André Alexandre Gomes, Dimakakos Dimos, - Morgan Smith, Nicolas Goaziou (Guix), Dhavan Vaidya (Debian). ++ Packaging :: Basil L.{{{space()}}} Contovounesios, Eli Zaretskii, + Glenn Morris, Mauro Aranda, Richard Stallman, Stefan Kangas (core + Emacs), Stefan Monnier (GNU Elpa), André Alexandre Gomes, Andrew + Tropin, Dimakakos Dimos, Morgan Smith, Nicolas Goaziou (Guix), Dhavan + Vaidya (Debian). + Inspiration for certain features :: Bozhidar Batsov (zenburn-theme), Fabrice Niessen (leuven-theme). @@ -5663,7 +5789,7 @@ Jaeghere, and Omar Antolín Camarena for their long time contributions and insightful commentary on key aspects of the themes' design and/or aspects of their functionality. -* Meta +* Other notes about the project :properties: :custom_id: h:13752581-4378-478c-af17-165b6e76bc1b :end: @@ -5688,12 +5814,16 @@ of this sort): + [[https://protesilaos.com/codelog/2021-06-02-modus-themes-org-agenda/][Introducing the variable modus-themes-org-agenda]] (2021-06-02) + [[https://protesilaos.com/codelog/2022-01-02-review-modus-themes-org-habit-colours/][Modus themes: review of the org-habit graph colours]] (2022-01-02) + [[https://protesilaos.com/codelog/2022-01-03-modus-themes-port-faq/][Re: VSCode or Vim ports of the Emacs modus-themes?]] (2022-01-03) ++ [[https://protesilaos.com/codelog/2022-04-20-modus-themes-case-study-avy/][Modus themes: case study on Avy faces and colour combinations]] (2022-04-20) ++ [[https://protesilaos.com/codelog/2022-04-21-modus-themes-colour-theory/][Emacs: colour theory and techniques used in the Modus themes]] (2022-04-21) -And here are the canonical sources of this project's documentation: +And here are the canonical sources of this project: + Manual :: + Change Log :: + Screenshots :: ++ Git repository :: https://git.sr.ht/~protesilaos/modus-themes ++ Mailing list :: https://lists.sr.ht/~protesilaos/modus-themes * GNU Free Documentation License :properties: diff --git a/doc/misc/org.org b/doc/misc/org.org index 3dce83c936b..baab2efedaf 100644 --- a/doc/misc/org.org +++ b/doc/misc/org.org @@ -12442,7 +12442,7 @@ should in principle be exportable as a Beamer presentation. When =ignoreheading= is set, Org export ignores the entry's headline but not its content. This is useful for inserting content between frames. It is also useful for properly closing a =column= - environment. @end itemize + environment. #+cindex: @samp{BEAMER_ACT}, property #+cindex: @samp{BEAMER_OPT}, property diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index bb91aec0cc0..12d49877269 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi @@ -4478,6 +4478,11 @@ HP-UX SD depots @cindex @file{depot} file archive suffix @cindex file archive suffix @file{depot} +@item @samp{.epub} --- +Electronic publications +@cindex @file{epub} file archive suffix +@cindex file archive suffix @file{epub} + @item @samp{.exe} --- Self extracting Microsoft Windows EXE files @cindex @file{exe} file archive suffix diff --git a/doc/misc/transient.texi b/doc/misc/transient.texi index 191fe8cd853..d634ad5197a 100644 --- a/doc/misc/transient.texi +++ b/doc/misc/transient.texi @@ -2025,7 +2025,7 @@ They are defined here anyway to allow sharing certain methods. @code{value} The value. Should not be accessed directly. @item -@code{init-value} Function that is responsable for setting the object's +@code{init-value} Function that is responsible for setting the object's value. If bound, then this is called with the object as the only argument. Usually this is not bound, in which case the object's primary @code{transient-init-value} method is called instead. diff --git a/etc/HELLO b/etc/HELLO index dbbcc0493bf..d73465318ca 100644 --- a/etc/HELLO +++ b/etc/HELLO @@ -1,9 +1,11 @@ Content-Type: text/enriched Text-Width: 70 -This is a list of ways to say hello in various languages. -It is not intended to be comprehensive, but to demonstrate -some of the character sets that Emacs supports. +This is a list of ways to write a orange red"hello" greeting using +various scripts. It is not intended to be comprehensive, +but to demonstrate some of the character sets and writing +systems that Emacs supports. Look for the script used to +write your language, to see if it is supported. Non-ASCII examples: @@ -11,7 +13,7 @@ Non-ASCII examples: Cześć!,latin-iso8859-2 Dobrý den,cyrillic-iso8859-5 Здравствуйте!,greek-iso8859-7 Γειά σας, გამარჯობა Africa: ethiopicሠላም Middle/Near East:hebrew-iso8859-8 שָׁלוֹם, السّلام عليكم - South Asia: નમસ્તે, नमस्ते, ನಮಸ್ಕಾರ, നമസ്കാരം, ଶୁଣିବେ, + South Asia: નમસ્તે, नमस्ते, ನಮಸ್ಕಾರ, നമസ്കാരം, ନମସ୍କାର, ආයුබෝවන්, வணக்கம், నమస్కారం,tibetan བཀྲ་ཤིས་བདེ་ལེགས༎ South East Asia: ជំរាបសួរ,lao ສະບາຍດີ, မင်္ဂလာပါ,thai-tis620 สวัสดีครับ,vietnamese-viscii-lower vietnamese-viscii-upperCvietnamese-viscii-lowerhào bạn East Asia:chinese-gb2312 你好,chinese-big5-1 早晨,japanese-jisx0208 こんにちは,korean-ksc5601 안녕하세요 @@ -25,11 +27,14 @@ LANGUAGE (NATIVE NAME) HELLO Amharic (አማርኛ) ሠላም Arabic (العربيّة) السّلام عليكم Armenian (հայերեն) Բարև ձեզ +Balinese (ᬅᬓ᭄ᬱᬭᬩᬮᬶ) ᬒᬁᬲ᭄ᬯᬲ᭄ᬢ᭄ᬬᬲ᭄ᬢᬸ +Batak (ᯘᯮᯒᯗ᯲ᯅᯗᯂ᯲) ᯂᯬᯒᯘ᯲ / ᯔᯧᯐᯬᯀᯱᯐᯬᯀᯱ Belarusian (беларуская) Прывітанне Bengali (বাংলা) নমস্কার Brahmi (𑀩𑁆𑀭𑀸𑀳𑁆𑀫𑀻) 𑀦𑀫𑀲𑁆𑀢𑁂 Braille ⠓⠑⠇⠇⠕ +Buginese (ᨒᨚᨈᨑ) ᨖᨒᨚ Burmese (မြန်မာ) မင်္ဂလာပါ C printf (orange red"Hello, world!\n"); Cham (ꨌꩌ) ꨦꨤꩌ ꨦꨁꨰ @@ -38,6 +43,7 @@ Comanche /kəˈmæntʃiː/ Haa marʉ́awe Cree (ᓀᐦᐃᔭᐍᐏᐣ) ᑕᓂᓯ / ᐙᒋᔮ Czech (čeština) Dobrý den Danish (dansk) Hej / Goddag / Halløj +Devanagari (देवनागरी) नमस्ते / नमस्कार Dutch (Nederlands) Hallo / Dag Efik /ˈɛfɪk/ Mɔkɔm Egyptian Hieroglyphs (𓂋𓏤𓈖𓆎𓅓‌𓏏𓊖) 𓅓𓊵𓏏𓊪, 𓇍𓇋𓂻𓍘𓇋 @@ -50,40 +56,60 @@ Finnish (suomi) Hei / Hyvää päivää French (français) Bonjour / Salut Georgian (ქართული) გამარჯობა German (Deutsch) Guten Tag / Grüß Gott +Grantha (𑌗𑍍𑌰𑌨𑍍𑌥) 𑌨𑌮𑌸𑍍𑌤𑍇 / 𑌨𑌮𑌸𑍍𑌕𑌾𑌰𑌃 Greek (ελληνικά) Γειά σας Greek, ancient (ἑλληνική) Οὖλέ τε καὶ μέγα χαῖρε Gujarati (ગુજરાતી) નમસ્તે +Gurmukhi (ਗੁਰਮੁਖੀ) ਸਤ ਸ੍ਰੀ ਅਕਾਲ +Hanifi Rohingya (𐴌𐴟𐴇𐴥𐴝𐴚𐴒𐴙𐴝 𐴇𐴝𐴕𐴞𐴉𐴞 𐴓𐴠𐴑𐴤𐴝) 𐴀𐴝𐴏𐴓𐴝𐴀𐴡𐴤𐴛𐴝𐴓𐴝𐴙𐴑𐴟𐴔 +Hanunoo (ᜱᜨᜳᜨᜳᜢ) ᜫᜬᜧ᜴ ᜣᜭᜯᜥ᜴ ᜰᜲᜭᜥ᜴ Hebrew (עִבְרִית) שָׁלוֹם +Hindi (हिन्दी) प्रणाम / पाय लागू Hungarian (magyar) Szép jó napot! -Hindi (हिंदी) नमस्ते / नमस्कार । Inuktitut (ᐃᓄᒃᑎᑐᑦ) ᐊᐃ Italian (italiano) Ciao / Buon giorno Javanese (ꦧꦱꦗꦮꦶ) console.log("ꦲꦭꦺꦴ"); + +Kaithi (𑂍𑂶𑂟𑂲) 𑂩𑂰𑂧𑂩𑂰𑂧 Kannada (ಕನ್ನಡ) ನಮಸ್ಕಾರ +Kharoṣṭhī (𐨑𐨪𐨆𐨛𐨁) 𐨣𐨨𐨲𐨪𐨆 𐨐𐨪𐨅𐨨𐨁 Khmer (ភាសាខ្មែរ) ជំរាបសួរ Lakota (Lakȟotiyapi) Taŋyáŋ yahí! Lao (ພາສາລາວ) ສະບາຍດີ / ຂໍໃຫ້ໂຊກດີ +Lepcha (ᰛᰩᰵᰛᰧᰵᰶ) ᰂᰦᰕᰥᰬ +Limbu (ᤕᤰᤌᤢᤱ ᤐᤠᤴ) ᤛᤣᤘᤠᤖᤥ +Makasar (𑻪𑻢𑻪𑻢) 𑻦𑻤𑻵𑻱 Malayalam (മലയാളം) നമസ്കാരം Maldivian (ދިވެހި) އައްސަލާމު ޢަލައިކުމް / ކިހިނެހް؟ Maltese (il-Malti) Bonġu / Saħħa Mathematics ∀ p ∈ world • hello p □ +Meetei Mayek (ꯃꯤꯇꯩ ꯃꯌꯦꯛ) ꯈꯨꯔꯨꯝꯖꯔꯤ +Modi (𑘦𑘻𑘚𑘲) 𑘡𑘦𑘭𑘿𑘎𑘰𑘨 Mongolian (монгол хэл) Сайн байна уу? Northern Thai (ᨣᩣᩴᨾᩮᩬᩥᨦ / ᨽᩣᩈᩣᩃ᩶ᩣ᩠ᨶᨶᩣ) ᩈ᩠ᩅᩢᩔ᩠ᨯᩦᨣᩕᩢ᩠ᨸ Norwegian (norsk) Hei / God dag -Oriya (ଓଡ଼ିଆ) ଶୁଣିବେ +Odia (ଓଡ଼ିଆ) ନମସ୍କାର Polish (język polski) Dzień dobry! / Cześć! +Rejang (ꥆꤰ꥓ꤼꤽ ꤽꥍꤺꥏ) ꤸꥉꥐꤺꥉꥂꥎ Russian (русский) Здра́вствуйте! +Sharada (𑆯𑆳𑆫𑆢𑆳) 𑆤𑆩𑆱𑇀𑆑𑆳𑆫 +Siddham (𑖭𑖰𑖟𑖿𑖠𑖽) 𑖡𑖦𑖫𑖿𑖝𑖸 Sinhala (සිංහල) ආයුබෝවන් Slovak (slovenčina) Dobrý deň Slovenian (slovenščina) Pozdravljeni! Spanish (español) ¡Hola! +Sundanese (ᮃᮊ᮪ᮟᮛᮞᮥᮔ᮪ᮓ) ᮞᮙ᮪ᮕᮥᮛᮞᮥᮔ᮪ Swedish (svenska) Hej / Goddag / Hallå +Syloti Nagri (ꠍꠤꠟꠐꠤ ꠘꠣꠉꠞꠤ) ꠀꠌ꠆ꠍꠣꠟꠣꠝꠥ ꠀꠟꠣꠁꠇꠥꠝ / ꠘꠝꠡ꠆ꠇꠣꠞ Tamil (தமிழ்) வணக்கம் Telugu (తెలుగు) నమస్కారం +Tagalog (ᜊᜌ᜔ᜊᜌᜒᜈ᜔) ᜃᜓᜋᜓᜐ᜔ᜆ +Tagbanwa (ᝦᝪᝯ) ᝫᝩᝬᝥ ᝣᝮᝧᝯ TaiViet (ꪁꪫꪱꪣ ꪼꪕ) ꪅꪰꪙꫂ ꪨꪮꫂ ꪁꪫꪱ / ꪅꪽ ꪨꪷ ꪁꪫꪱ Thai (ภาษาไทย) สวัสดีครับ / สวัสดีค่ะ Tibetan (བོད་སྐད་) བཀྲ་ཤིས་བདེ་ལེགས༎ Tigrigna (ትግርኛ) ሰላማት +Tirhuta (𑒞𑒱𑒩𑒯𑒳𑒞𑒰) 𑒣𑓂𑒩𑒢𑒰𑒧 / 𑒮𑒲𑒞𑒰𑒩𑒰𑒧 Turkish (Türkçe) Merhaba Ukrainian (українська) Вітаю Vietnamese (tiếng Việt) Chào bạn diff --git a/etc/NEWS b/etc/NEWS index f7dddd36de1..19ca21f666d 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -65,9 +65,24 @@ headers installed, Emacs will use the X Input Extension for handling input. If this causes problems, you can configure Emacs with the option '--without-xinput2' to disable this support. -(featurep 'xinput2) can be used to test for the presence of XInput 2 +'(featurep 'xinput2)' can be used to test for the presence of XInput 2 support from Lisp programs. +--- +** Emacs no longer reduces the size of the Japanese dictionary. +Building Emacs includes generation of a Japanese dictionary, which is +used by Japanese input methods. Previously, the build included a step +of reducing the size of this dictionary's vocabulary. This vocabulary +reduction is now optional, by default off. If you need the Emacs +build to include the vocabulary reduction, configure Emacs with the +option '--with-small-ja-dic'. In an Emacs source tree already +configured without that option, you can force the vocabulary reduction +by saying + + make -C leim generate-ja-dic JA_DIC_NO_REDUCTION_OPTION='' + +after deleting lisp/leim/ja-dic/ja-dic.el. + +++ ** Emacs now supports being built with pure GTK. To use this option, make sure the GTK 3 (version 3.20 or later) and @@ -121,7 +136,7 @@ This will output a string identifying the current Emacs build. +++ ** New hook 'after-pdump-load-hook'. -This is run at the end of the Emacs startup process, and it meant to +This is run at the end of the Emacs startup process, and is meant to be used to reinitialize structures that would normally be done at load time. @@ -136,8 +151,28 @@ of 'user-emacs-directory'. * Incompatible changes in Emacs 29.1 ++++ +** 'E' in 'query-replace' now edits the replacement with exact case. +Previously, this command did the same as 'e'. + --- -** Isearch in *Help* and *info* now char-folds quote characters by default. +** '/ a' in *Packages* now limits by package name(s) instead of regexp. + ++++ +** Setting the goal columns now also affects '' and ''. +Previously, 'C-x C-n' only affected 'next-line' and 'previous-line', +but it now also affects 'scroll-up-command' and 'scroll-down-command'. + +--- +** The 'd' command in Dired now more consistently skip dot files. +In previous Emacs versions, commands like `C-u 10 d' would put the "D" +mark on the next ten files, no matter whether they were dot files +(i.e., "." and "..") or not, while marking the next ten lines with the +mouse (in 'transient-mark-mode') and then hitting 'd' would skip dot +files. These now work equivalently. + +--- +** Isearch in "*Help*" and "*info*" now char-folds quote characters by default. This means that you can say 'C-s `foo' (GRAVE ACCENT) if the buffer contains "‘foo" (LEFT SINGLE QUOTATION MARK) and the like. These quotation characters look somewhat similar in some fonts. To switch @@ -158,10 +193,10 @@ newline. --- ** 'TAB' and '' are now bound in 'button-map'. -This means that if your cursor is on a button, 'TAB' will take you to -the next button, even if the mode has bound it to something else. -This also means that 'TAB' on a button in an 'outline-minor-mode' -heading will move point instead of collapsing the outline. +This means that if point is on a button, 'TAB' will take you to the +next button, even if the mode has bound it to something else. This +also means that 'TAB' on a button in an 'outline-minor-mode' heading +will move point instead of collapsing the outline. --- ** 'Info-default-directory-list' is no longer populated at Emacs startup. @@ -171,7 +206,7 @@ If you have code in your init file that removes directories from --- ** 'C-k' no longer deletes files in 'ido-mode'. To get the previous action back, put something like the following in -your init file: +your Init file: (require 'ido) (keymap-set ido-file-completion-map "C-k" #'ido-delete-file-at-head) @@ -195,6 +230,13 @@ files that were compiled with an old EIEIO (Emacs<25). ** 'C-x 8 .' has been moved to 'C-x 8 . .'. This is to open up the 'C-x 8 .' map to bind further characters there. +--- +** 'C-x 8 =' moved to 'C-x 8 = ='. +You can now use 'C-x 8 =' to insert several characters with macron; +for example, 'C-x 8 = a' will insert U+0101 LATIN SMALL LETTER A WITH +MACRON. To insert a lone macron, type 'C-x 8 = =' instead of the +previous 'C-x ='. + ** Eshell --- @@ -235,19 +277,60 @@ use the new 'tamil-itrans-digits' and 'tamil-inscript-digits' input methods instead. +++ -** New variable current-time-list governing default timestamp form. -Functions like current-time now yield (TICKS . HZ) timestamps if this -new variable is nil. The variable defaults to t, which means these -functions default to timestamps of the forms (HI LO US PS), (HI LO US) -or (HI LO), which are less regular and less efficient. This is part -of a long-planned change first documented in Emacs 27. Developers are -encouraged to test timestamp-related code with this variable set to -nil, as it will default to nil in a future Emacs version and will be -removed some time after that. +** New variable 'current-time-list' governing default timestamp form. +Functions like 'current-time' now yield '(TICKS . HZ)' timestamps if +this new variable is nil. The variable defaults to t, which means +these functions default to timestamps of the forms '(HI LO US PS)', +'(HI LO US)' or '(HI LO)', which are less regular and less efficient. +This is part of a long-planned change first documented in Emacs 27. +Developers are encouraged to test timestamp-related code with this +variable set to nil, as it will default to nil in a future Emacs +version and will be removed some time after that. + ++++ +** Functions which recreate the "*scratch*" buffer now also initialize it. +When functions like 'other-buffer' and 'server-execute' recreate +"*scratch*", they now also insert 'initial-scratch-message' and set +the major mode according to 'initial-major-mode', like at Emacs +startup. Previously, these functions ignored +'initial-scratch-message' and left "*scratch*" in 'fundamental-mode'. * Changes in Emacs 29.1 +--- +** Files with the '.eld' extension are now visited in 'lisp-data-mode'. + ++++ +** New command 'find-sibling-file'. +This command jumps to a file considered a "sibling file", which is +determined according to the new user option 'find-sibling-rules'. + ++++ +** New user option 'delete-selection-temporary-region'. +When non-nil, 'delete-selection-mode' will only delete the temporary +regions (usually set by mouse-dragging or shift-selection). + ++++ +** New user option 'switch-to-prev-buffer-skip-regexp'. +This should be a regexp or a list of regexps; buffers whose names +match those regexps will be ignored by 'switch-to-prev-buffer' and +'switch-to-next-buffer'. + +** Menus + +--- +*** The entries following the buffers in the "Buffers" menu can now be altered. +Change the 'menu-bar-buffers-menu-command-entries' variable to alter +the entries that follow the buffer list. + +--- +** 'delete-process' is now a command. +When called interactively, it will kill the process running in the +current buffer (if any). This can be useful if you have runaway +output in the current buffer (from a process or a network connection), +and want to stop it. + +++ ** New command 'restart-emacs'. This is like 'save-buffers-kill-emacs', but instead of just killing @@ -257,6 +340,12 @@ the current Emacs process at the end, it starts a new Emacs process optional parameters to restart instead of just killing the current process. ++++ +** New user option 'mouse-drag-mode-line-buffer'. +If non-nil, dragging on the buffer name part of the mode-line will +drag the buffer's associated file to other programs. This option is +currently only available on X, Haiku and Nextstep (GNUstep or macOS). + +++ ** New user option 'mouse-drag-and-drop-region-cross-program'. If non-nil, this option allows dragging text in the region from Emacs @@ -267,6 +356,10 @@ to another program. If non-nil, this option allows scrolling a window while dragging text around without a scroll wheel. ++++ +*** 'mouse-drag-copy-region' can now be 'non-empty'. +This inhibits putting empty strings onto the kill ring. + +++ ** New user options 'dnd-indicate-insertion-point' and 'dnd-scroll-margin'. These options allow adjusting point and scrolling a window when @@ -287,6 +380,9 @@ a convenient method of making commands disabled in this way. --- ** 'count-lines' will now report buffer totals if given a prefix. ++++ +** 'count-words' will now report sentence count when used interactively. + --- ** New user option 'find-library-include-other-files'. If set to nil, commands like 'find-library' will only include library @@ -363,10 +459,16 @@ instead of XIM input methods. ** New user option 'use-system-tooltips'. This controls whether to use the toolkit tooltips, or Emacs's own native implementation of tooltips as small frames. This option is -only meaningful if Emacs was built with GTK+ or Haiku support, and -defaults to t, which makes Emacs use the toolkit tooltips. The -existing GTK-specific option 'x-gtk-use-system-tooltips' is now an -alias of this new option. +only meaningful if Emacs was built with GTK+, Nextstep, or Haiku +support, and defaults to t, which makes Emacs use the toolkit +tooltips. The existing GTK-specific option +'x-gtk-use-system-tooltips' is now an alias of this new option. + ++++ +** Non-native tooltips are now supported on Nextstep. +This means Emacs built with GNUstep or built on macOS is now able to +display different faces and images inside tooltips when the +'use-system-tooltips' user option is nil. ** Connection-local variables @@ -381,8 +483,8 @@ make it more convenient to inspect and modify them. Running 'with-connection-local-variables' defaults to application 'tramp'. This can be changed by let-binding 'connection-local-default-application' to another symbol. This is -useful when running code in a buffer, where Tramp has already set some -connection local variables. +useful when running code in a buffer where Tramp has already set some +connection-local variables. --- ** New minor mode 'pixel-scroll-precision-mode'. @@ -456,27 +558,39 @@ command also works for non-Emoji characters.) --- *** New input method 'emoji'. -This allows you to enter emoji using short strings, eg :face_palm: or -:scream:. +This allows you to enter emoji using short strings, eg ':face_palm:' +or ':scream:'. ** Help +--- +*** 'M-x apropos-variable' output now includes values of variables. + ++++ +*** New doc string syntax to indicate that symbols shouldn't be links. +When displaying doc strings in "*Help*" buffers, strings that are +"`like-this'" are made into links (if they point to a bound +function/variable). This can lead to false positives when talking +about values that are symbols that happen to have the same names as +functions/variables. To inhibit this buttonification, the new +"\\+`like-this'" syntax can be used. + +++ *** New user option 'help-window-keep-selected'. If non-nil, commands to show the info manual and the source will reuse -the same window the *Help* buffer is shown in. +the same window the "*Help*" buffer is shown in. --- *** Commands like 'C-h f' have changed how they describe menu bindings. For instance, previously a command might be described as having the following bindings: - It is bound to , C-x C-f, . + It is bound to , C-x C-f, . This has been changed to: - It is bound to and C-x C-f. - It can also be invoked from the menu: File → Visit New File... + It is bound to and C-x C-f. + It can also be invoked from the menu: File → Visit New File... +++ *** The 'C-h .' command now accepts a prefix argument. @@ -487,7 +601,7 @@ instead. --- *** New user option 'help-enable-variable-value-editing'. -If enabled, 'e' on a value in *Help* will pop you to a new buffer +If enabled, 'e' on a value in "*Help*" will pop you to a new buffer where you can edit the value. This is not enabled by default, because it's easy to make an edit that yields an invalid result. @@ -522,6 +636,11 @@ minor modes are listed after the major mode. The apropos commands will now select the apropos window if 'help-window-select' is non-nil. +--- +*** 'describe-keymap' now considers the symbol at point. +If the symbol at point is a keymap, 'describe-keymap' suggests it as +the default candidate. + ** Outline Mode +++ @@ -539,7 +658,7 @@ or is itself too long. +++ *** New user option 'outline-minor-mode-use-buttons'. If non-nil, Outline Minor Mode will use buttons to hide/show outlines -in addition to the ellipsis. Default nil. +in addition to the ellipsis. The default is nil. --- *** New user option 'outline-minor-mode-buttons'. @@ -548,12 +667,21 @@ This is a list of pairs of open/close strings used to display buttons. +++ ** Support for the WebP image format. This support is built by default when the libwebp library is -available. (This also includes support for animated WebP images.) To -disable WebP support, use the '--without-webp' configure flag. Image +available, and includes support for animated WebP images. To disable +WebP support, use the '--without-webp' configure flag. Image specifiers can now use ':type webp'. ** Windows +*** New user option 'display-buffer-avoid-small-windows'. +If non-nil, this should be a window height, a number. Windows smaller +than this will be avoided by 'display-buffer', if possible. + ++++ +*** New display action 'display-buffer-full-frame'. +This action removes other windows on the frame when displaying a +buffer. + +++ *** 'display-buffer' now can set up the body size of the chosen window. For example, a 'display-buffer-alist' entry of @@ -620,13 +748,32 @@ Rcirc will use the default 'completion-at-point' mechanism. The conventional IRC behaviour of completing by cycling through the available options can be restored by enabling this option. +** Imenu + +++ -** 'imenu' is now bound to 'M-g i' globally. +*** 'imenu' is now bound to 'M-g i' globally. + +--- +*** New function 'imenu-flush-cache'. +Use it if you want Imenu to forget the buffer's index alist and +recreate it anew next time 'imenu' is invoked. * Editing Changes in Emacs 29.1 ++++ +** 'M-SPC' is now bound to 'cycle-spacing'. +Formerly it invoked 'just-one-space'. The actions performed by +'cycle-spacing' and their order can now be customized via the user +option 'cycle-spacing-actions'. + --- -** 'scroll-other-window' and 'scroll-other-window-down' now respects remapping. +** 'zap-to-char' and 'zap-up-to-char' are case-sensitive for upper-case chars. +These commands now behave as case-sensitive for interactive calls when +they are invoked with an uppercase character, regardless of the +`case-fold-search' value. + +--- +** 'scroll-other-window' and 'scroll-other-window-down' now respect remapping. These commands (bound to 'C-M-v' and 'C-M-V') used to scroll the other windows without looking a customizations in that other window. These functions now check whether they have been rebound in the buffer in @@ -647,7 +794,7 @@ This change also affects 'cl-macrolet', 'cl-flet*' and +++ ** New user option 'translate-upper-case-key-bindings'. -This can be set to nil to inhibit translating upper case keys to lower +Set this option to nil to inhibit translating upper case keys to lower case keys. +++ @@ -657,8 +804,8 @@ point. --- ** Improved mouse behavior with auto-scrolling modes. -When clicking inside the 'scroll-margin' or 'hscroll-margin' region -the point is now moved only when releasing the mouse button. This no +When clicking inside the 'scroll-margin' or 'hscroll-margin' region, +point is now moved only when releasing the mouse button. This no longer results in a bogus selection, unless the mouse has been effectively dragged. @@ -679,9 +826,9 @@ Customize this option to limit the number of entries in the menu *** New user option 'show-paren-context-when-offscreen'. When non-nil, if the point is in a closing delimiter and the opening delimiter is offscreen, shows some context around the opening -delimiter in the echo area. Default nil. +delimiter in the echo area. The default is nil. -May also be set to the symbols 'overlay' or 'child-frame' in which +May also be set to the symbols 'overlay' or 'child-frame', in which case the context is shown in an overlay or child-frame at the top-left of the current window. The latter option requires a graphical frame. On non-graphical frames, the context is shown in the echo area. @@ -690,7 +837,7 @@ On non-graphical frames, the context is shown in the echo area. +++ *** 'comint-term-environment' is now aware of connection-local variables. -The user option 'comint-terminfo-terminal' and variable +The user option 'comint-terminfo-terminal' and the variable 'system-uses-terminfo' can now be set as connection-local variables to change the terminal used on a remote host. @@ -703,7 +850,7 @@ The options 'mouse-wheel-down-alternate-event', and 'mouse-wheel-right-alternate-event' have been added to better support systems where two kinds of wheel events can be received. -** Editing complex text layout (CTL) scripts +** Internationalization changes *** The function key now allows deleting the entire composed sequence. For the details, see the item about the 'delete-forward-char' command @@ -714,17 +861,116 @@ Setting it to a non-nil value temporarily disables automatic composition of character sequences at point, and thus makes it easier to edit such sequences by allowing point to "enter" the sequence. -*** New language environment "Northern Thai". -This uses the Tai Tham script, whose support has been enhanced. +--- +*** Support for many old scripts and writing systems. +Emacs now supports and has language-environments and input methods for +several dozens of old scripts that were used in the past for various +languages in South and South-East Asia. For each such script Emacs +now has font-selection and character composition rules, a language +environment, and an input method. The newly-added scripts and the +corresponding language environments are: -*** New language environment "Brahmi". -This language environment supports Brahmi, which is a historical -script that was used in ancient South Asia. A new input method, -'brahmi', is provided to type text in this script. +**** Tai Tham script and the Northern Thai language environment +**** Brahmi script and language environment +**** Kaithi script and language environment +**** Tirhuta script and language environment +**** Sharada script and language environment +**** Siddham script and language environment +**** Syloti Nagri script and language environment +**** Modi script and language environment +**** Baybayin script and Tagalog language environment +**** Hanunoo script and language environment +**** Buhid script and language environment +**** Tagbanwa script and language environment +**** Limbu script and language environment +**** Balinese script and language environment +**** Javanese script and language environment +**** Sundanese script and language environment +**** Batak script and language environment +**** Rejang script and language environment +**** Makasar script and language environment +**** Lontara script and language environment +**** Hanifi Rohingya script and language environment +**** Grantha script and language environment +**** Kharoshthi script and language environment +**** Lepcha script and language environment +**** Meetei Mayek script and language environment + +--- +*** The "Oriya" language environment was renamed to "Odia". +This is to follow the change in the official name of the script. The +'oriya' input method was also renamed to 'odia'. However, the old +name of the language environment and the input method are still +supported. + +--- +*** New Greek translation of the Emacs tutorial. +Type 'C-u C-h t' to select it in case your language setup does not do +so automatically. * Changes in Specialized Modes and Packages in Emacs 29.1 +** Battery + ++++ +*** New user option 'battery-update-functions'. +This can be used to trigger actions based on the battery status. + +** Enriched Mode + ++++ +*** New command 'enriched-toggle-markup'. +This allows you to see the markup in 'enriched-mode' buffers (e.g., +the HELLO file). + +** Shell Script Mode + +--- +*** New user option 'sh-indent-statement-after-and'. +This controls how statements like the following are indented: + + foo && + bar + +** Cperl Mode +--- +*** New user option 'cperl-file-style'. +This option determines the indentation style to be used. It can also +be used as a file-local variable. + +** Gud + +--- +*** 'gud-go' is now bound to 'C-c C-v'. +If given a prefix, it will query the user for an argument to use for +the run/continue command. + +** Customize + +--- +*** New command 'custom-toggle-hide-all-widgets'. +This is bound to 'H' and toggles whether to hide or show the widget +contents. + +** Ispell + +--- +*** 'ispell-region' and 'ispell-buffer' now push the mark. +These commands push onto the mark ring the location of the last +misspelled word where corrections were offered, so that you can then +skip back to that location with 'C-x C-x'. + +** Dabbrev + +--- +*** New function 'dabbrev-capf' for use on 'completion-at-point-functions'. + ++++ +*** New user option 'dabbrev-ignored-buffer-modes'. +Buffers with major modes in this list will be ignored. By default, +this includes "binary" buffers like 'archive-mode' and 'image-mode'. + ** Package +++ @@ -732,24 +978,51 @@ script that was used in ancient South Asia. A new input method, This command allows you to upgrade packages without using 'M-x list-packages'. ++++ +*** New command 'package-update-all'. +This command allows updating all packages without any queries. + ++++ +*** New DWIM action on 'x' in "*Packages*" buffer. +If no packages are marked, 'x' will install the package under point if +it isn't already, and remove it if it is installed. + ** Miscellaneous +++ *** New command 'scratch-buffer'. -This command switches to the *scratch* buffer. If *scratch* doesn't +This command switches to the "*scratch*" buffer. If "*scratch*" doesn't exist, the command creates it first. You can use this command if you -inadvertently delete the *scratch* buffer. +inadvertently delete the "*scratch*" buffer. ** Debugging +--- +*** 'q' in a *Backtrace* buffer no longer clears the buffer. +Instead it just buries the buffer and switches the mode from +'debugger-mode' to 'backtrace-mode', since commands like 'e' are no +longer available after exiting the recursive edit. + ++++ *** New user option 'debug-allow-recursive-debug'. -This user option controls whether the 'e' (in a *Backtrace* +This user option controls whether the 'e' (in a "*Backtrace*" buffer or while edebugging) and 'C-x C-e' (while edebugging) commands lead to a (further) backtrace. By default, this variable is nil, which is a change in behaviour from previous Emacs versions. ** Compile ++++ +*** New user option 'compilation-hidden-output'. +This can be used to make specific parts of compilation output +invisible. + ++++ +*** The 'compilation-auto-jump-to-first-error' user option has been extended. +It can now have the additional values 'if-location-known' (which will +only jump if the location of the first error is known), and +'first-known' (which will jump to the first known error location). + +++ *** New user option 'compilation-max-output-line-length'. Lines longer than this will have the ends hidden, with a button to @@ -772,7 +1045,7 @@ This mode adds some highlighting, fixes the 'M-q' command, and has commands for doing maintenance. --- -** kmacro +** Kmacro Kmacros are now OClosures and have a new constructor 'kmacro' which uses the 'key-parse' syntax. It replaces the old 'kmacro-lambda-form' (which is now declared obsolete). @@ -797,7 +1070,9 @@ a completion candidate to the minibuffer, then 'M-RET' can be used to choose the currently active candidate from the "*Completions*" buffer and exit the minibuffer. With a prefix argument, 'C-u M-RET' inserts the currently active candidate to the minibuffer, but doesn't -exit the minibuffer. +exit the minibuffer. These keys are also available for in-buffer +completion, but they don't insert candidates automatically, you need +to type 'M-RET' to insert the selected candidate to the buffer. +++ *** The "*Completions*" buffer can now be automatically selected. @@ -808,17 +1083,11 @@ To enable this behavior, customize the user option the second one will switch to the "*Completions*" buffer. --- -*** New user option 'completion-wrap-movement'. +*** New user option 'completion-auto-wrap'. When non-nil, the commands 'next-completion' and 'previous-completion' automatically wrap around on reaching the beginning or the end of the "*Completions*" buffer. -+++ -*** New user option 'completions-sort'. -This option controls the sorting of the completion candidates in -the "*Completions*" buffer. Available styles are no sorting, -alphabetical (the default), or a custom sort function. - +++ *** New values for the 'completion-auto-help' user option. There are two new values to control the way the "*Completions*" buffer @@ -828,6 +1097,18 @@ to complete. The value 'visual' is like 'always', but only updates the completions if they are already visible. The default value 't' always hides the completion buffer after some completion is made. +*** New commands to complete the minibuffer history. +'minibuffer-complete-history' ('C-x up') is like 'minibuffer-complete' +but completes on the history items instead of the default completion +table. 'minibuffer-complete-defaults' ('C-x down') completes +on the list of default items. + ++++ +*** New user option 'completions-sort'. +This option controls the sorting of the completion candidates in +the "*Completions*" buffer. Available styles are no sorting, +alphabetical (the default), or a custom sort function. + +++ *** New user option 'completions-max-height'. This option limits the height of the "*Completions*" buffer. @@ -845,7 +1126,7 @@ When this user option names a face, the current candidate in the "*Completions*" buffer is highlighted with that face. The nil value disables this highlighting. ---- ++++ *** Choosing a completion with a prefix argument doesn't exit the minibuffer. This means that typing 'C-u RET' on a completion candidate in the "*Completions*" buffer inserts the completion to the minibuffer, @@ -886,7 +1167,7 @@ For instance, to enable jumping to the "*Messages*" buffer with (set-register ?m '(buffer . "*Messages*")) -** pixel-fill +** Pixel-fill +++ *** This is a new package that deals with filling variable-pitch text. @@ -905,7 +1186,12 @@ This fills the region to be no wider than a specified pixel width. This will take you to the gnu.org web server's version of the current info node. This command only works for the Emacs and Emacs Lisp manuals. -** vc +** VC + ++++ +*** New command '%' ('vc-dir-mark-by-regexp'). +This command marks files based on a regexp. If given a prefix +argument, unmark instead. --- *** 'C-x v v' on an unregistered file will now use the most specific backend. @@ -976,7 +1262,13 @@ is called, and the returned values are used to populate the phrase and comment parts (see RFC 5322 for definitions). In both cases, the phrase part will be automatically quoted if necessary. -** eww/shr ++++ +*** New function 'eudc-capf-complete' with 'message-mode' integration. +EUDC can now contribute email addresses to 'completion-at-point' by +adding the new function 'eudc-capf-complete' to +'completion-at-point-functions' in 'message-mode'. + +** EWW/SHR +++ *** New user option to automatically rename EWW buffers. @@ -995,7 +1287,7 @@ allowed images. *** New user option 'shr-use-xwidgets-for-media'. If non-nil (and Emacs has been built with support for xwidgets), display