commit 298275c595f6ca9e77f8131d34dda2b58fe1faa5 (HEAD, refs/remotes/origin/master) Author: Glenn Morris Date: Tue Feb 13 14:29:59 2018 -0800 ; Replace "Written by" with standard "Author:" header in some C files diff --git a/src/bidi.c b/src/bidi.c index 1f05a1f7d5..9bc8dbe860 100644 --- a/src/bidi.c +++ b/src/bidi.c @@ -1,6 +1,8 @@ /* Low-level bidirectional buffer/string-scanning functions for GNU Emacs. - Copyright (C) 2000-2001, 2004-2005, 2009-2018 Free Software - Foundation, Inc. + +Copyright (C) 2000-2001, 2004-2005, 2009-2018 Free Software Foundation, Inc. + +Author: Eli Zaretskii This file is part of GNU Emacs. @@ -17,9 +19,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see . */ -/* Written by Eli Zaretskii . - - A sequential implementation of the Unicode Bidirectional algorithm, +/* A sequential implementation of the Unicode Bidirectional algorithm, (UBA) as per UAX#9, a part of the Unicode Standard. Unlike the Reference Implementation and most other implementations, diff --git a/src/sound.c b/src/sound.c index ce1a11e386..b149acd752 100644 --- a/src/sound.c +++ b/src/sound.c @@ -2,6 +2,8 @@ Copyright (C) 1998-1999, 2001-2018 Free Software Foundation, Inc. +Author: Gerd Moellmann + This file is part of GNU Emacs. GNU Emacs is free software: you can redistribute it and/or modify @@ -17,8 +19,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see . */ -/* Written by Gerd Moellmann . Tested with Luigi's - driver on FreeBSD 2.2.7 with a SoundBlaster 16. */ +/* Tested with Luigi's driver on FreeBSD 2.2.7 with a SoundBlaster 16. */ /* Modified by Ben Key to add a partial diff --git a/src/w16select.c b/src/w16select.c index 2d740a3ee6..5a80d1cba6 100644 --- a/src/w16select.c +++ b/src/w16select.c @@ -2,6 +2,8 @@ Copyright (C) 1996-1997, 2001-2018 Free Software Foundation, Inc. +Author: Dale P. Smith + This file is part of GNU Emacs. GNU Emacs is free software: you can redistribute it and/or modify @@ -22,7 +24,6 @@ along with GNU Emacs. If not, see . */ "old" (character-mode) application access to Dynamic Data Exchange, menus, and the Windows clipboard. */ -/* Written by Dale P. Smith */ /* Adapted to DJGPP by Eli Zaretskii */ #ifdef MSDOS diff --git a/src/w32notify.c b/src/w32notify.c index c16a8d11b6..5c1d212054 100644 --- a/src/w32notify.c +++ b/src/w32notify.c @@ -1,5 +1,8 @@ /* Filesystem notifications support for GNU Emacs on the Microsoft Windows API. - Copyright (C) 2012-2018 Free Software Foundation, Inc. + +Copyright (C) 2012-2018 Free Software Foundation, Inc. + +Author: Eli Zaretskii This file is part of GNU Emacs. @@ -16,9 +19,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see . */ -/* Written by Eli Zaretskii . - - Design overview: +/* Design overview: For each watch request, we launch a separate worker thread. The worker thread runs the watch_worker function, which issues an diff --git a/src/w32reg.c b/src/w32reg.c index df61847887..4ddbaa3f26 100644 --- a/src/w32reg.c +++ b/src/w32reg.c @@ -1,6 +1,8 @@ /* Emulate the X Resource Manager through the registry. - Copyright (C) 1990, 1993-1994, 2001-2018 Free Software Foundation, - Inc. + +Copyright (C) 1990, 1993-1994, 2001-2018 Free Software Foundation, Inc. + +Author: Kevin Gallo This file is part of GNU Emacs. @@ -17,8 +19,6 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see . */ -/* Written by Kevin Gallo */ - #include #include "lisp.h" #include "w32term.h" /* for XrmDatabase, xrdb */ diff --git a/src/w32select.c b/src/w32select.c index ce062ccfe6..a9df3f770b 100644 --- a/src/w32select.c +++ b/src/w32select.c @@ -2,6 +2,9 @@ Copyright (C) 1993-1994, 2001-2018 Free Software Foundation, Inc. +Author: Kevin Gallo + Benjamin Riefenstahl + This file is part of GNU Emacs. GNU Emacs is free software: you can redistribute it and/or modify @@ -17,9 +20,6 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see . */ -/* Written by Kevin Gallo, Benjamin Riefenstahl */ - - /* * Notes on usage of selection-coding-system and * next-selection-coding-system on MS Windows: diff --git a/src/xmenu.c b/src/xmenu.c index 835db9191f..a5865a6ec2 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -3,6 +3,10 @@ Copyright (C) 1986, 1988, 1993-1994, 1996, 1999-2018 Free Software Foundation, Inc. +Author: Jon Arnold + Roman Budzianowski + Robert Krawitz + This file is part of GNU Emacs. GNU Emacs is free software: you can redistribute it and/or modify @@ -19,9 +23,6 @@ You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see . */ /* X pop-up deck-of-cards menu facility for GNU Emacs. - * - * Written by Jon Arnold and Roman Budzianowski - * Mods and rewrite by Robert Krawitz * */ commit 4bee1b8bacb9ce6107ea605da464d01f6bd3aa7d Author: Glenn Morris Date: Tue Feb 13 14:22:16 2018 -0800 Stop keeping multiple doc copies for items defined multiple times It was always a nuisance to keep all the copies in sync. * src/doc.c (Fsnarf_documentation): Don't skip entire files. Instead, skip individual doc strings starting with "SKIP". * doc/lispref/internals.texi (Writing Emacs Primitives): Mention this skipping. * lisp/term/ns-win.el, lisp/term/pc-win.el, src/dosfns.c: * src/frame.c, src/nsfns.m, src/nsmenu.m, src/nsterm.m: * src/w16select.c, src/w32fns.c, src/w32menu.c, src/w32select.c: * src/w32term.c, src/xmenu.c: Remove duplicated doc strings. * src/xfns.c: Merge in information from doc string duplicates. diff --git a/doc/lispref/internals.texi b/doc/lispref/internals.texi index 8bf9abfc61..76be7bf0ac 100644 --- a/doc/lispref/internals.texi +++ b/doc/lispref/internals.texi @@ -758,6 +758,13 @@ names in the documentation string from the ones used in the C code. @samp{usage:} is required if the function has an unlimited number of arguments. +Some primitives have multiple definitions, one per platform (e.g., +@code{x-create-frame}). In such cases, rather than writing the +same documentation string in each definition, only one definition has +the actual documentation. The others have placeholders beginning with +@samp{SKIP}, which are ignored by the function that parses the +@file{DOC} file. + All the usual rules for documentation strings in Lisp code (@pxref{Documentation Tips}) apply to C code documentation strings too. diff --git a/lisp/term/ns-win.el b/lisp/term/ns-win.el index ca2cc725a6..7d89ec33a4 100644 --- a/lisp/term/ns-win.el +++ b/lisp/term/ns-win.el @@ -437,14 +437,7 @@ Lines are highlighted according to `ns-input-line'." ;;;; File handling. (defun x-file-dialog (prompt dir default_filename mustmatch only_dir_p) -"Read file name, prompting with PROMPT in directory DIR. -Use a file selection dialog. Select DEFAULT-FILENAME in the dialog's file -selection box, if specified. If MUSTMATCH is non-nil, the returned file -or directory must exist. - -This function is only defined on NS, MS Windows, and X Windows with the -Motif or Gtk toolkits. With the Motif toolkit, ONLY-DIR-P is ignored. -Otherwise, if ONLY-DIR-P is non-nil, the user can only select directories." +"SKIP: real doc in xfns.c." (ns-read-file-name prompt dir mustmatch default_filename only_dir_p)) (defun ns-open-file-using-panel () diff --git a/lisp/term/pc-win.el b/lisp/term/pc-win.el index 3ed21b8e43..9c1b471d48 100644 --- a/lisp/term/pc-win.el +++ b/lisp/term/pc-win.el @@ -158,159 +158,59 @@ created." ;; a useful function for returning 'nil regardless of argument. ;; Note: Any re-definition in this file of a function that is defined -;; in C on other platforms, should either have no doc-string, or one -;; that is identical to the C version, but with the arglist signature -;; at the end. Otherwise help-split-fundoc gets confused on other -;; platforms. (Bug#10783) +;; in C on other platforms, should either have a doc-string that +;; starts with "SKIP", or one that is identical to the C version, +;; but with the arglist signature at the end. Otherwise +;; help-split-fundoc gets confused on other platforms. (Bug#10783) -;; From src/xfns.c (defun x-list-fonts (_pattern &optional _face _frame _maximum width) - "Return a list of the names of available fonts matching PATTERN. -If optional arguments FACE and FRAME are specified, return only fonts -the same size as FACE on FRAME. - -PATTERN should be a string containing a font name in the XLFD, -Fontconfig, or GTK format. A font name given in the XLFD format may -contain wildcard characters: - the * character matches any substring, and - the ? character matches any single character. - PATTERN is case-insensitive. - -The return value is a list of strings, suitable as arguments to -`set-face-font'. - -Fonts Emacs can't use may or may not be excluded -even if they match PATTERN and FACE. -The optional fourth argument MAXIMUM sets a limit on how many -fonts to match. The first MAXIMUM fonts are reported. -The optional fifth argument WIDTH, if specified, is a number of columns -occupied by a character of a font. In that case, return only fonts -the WIDTH times as wide as FACE on FRAME." + "SKIP: real doc in xfaces.c." (if (or (null width) (and (numberp width) (= width 1))) (list "ms-dos") (list "no-such-font"))) (defun x-display-pixel-width (&optional frame) - "Return the width in pixels of DISPLAY. -The optional argument DISPLAY specifies which display to ask about. -DISPLAY should be either a frame or a display name (a string). -If omitted or nil, that stands for the selected frame's display. - -On \"multi-monitor\" setups this refers to the pixel width for all -physical monitors associated with DISPLAY. To get information for -each physical monitor, use `display-monitor-attributes-list'." + "SKIP: real doc in xfns.c." (frame-width frame)) (defun x-display-pixel-height (&optional frame) - "Return the height in pixels of DISPLAY. -The optional argument DISPLAY specifies which display to ask about. -DISPLAY should be either a frame or a display name (a string). -If omitted or nil, that stands for the selected frame's display. - -On \"multi-monitor\" setups this refers to the pixel height for all -physical monitors associated with DISPLAY. To get information for -each physical monitor, use `display-monitor-attributes-list'." + "SKIP: real doc in xfns.c." (frame-height frame)) (defun x-display-planes (&optional _frame) - "Return the number of bitplanes of DISPLAY. -The optional argument DISPLAY specifies which display to ask about. -DISPLAY should be either a frame or a display name (a string). -If omitted or nil, that stands for the selected frame's display." + "SKIP: real doc in xfns.c." 4) ;bg switched to 16 colors as well (defun x-display-color-cells (&optional _frame) - "Return the number of color cells of DISPLAY. -The optional argument DISPLAY specifies which display to ask about. -DISPLAY should be either a frame or a display name (a string). -If omitted or nil, that stands for the selected frame's display." + "SKIP: real doc in xfns.c." 16) (defun x-server-max-request-size (&optional _frame) - "Return the maximum request size of the server of DISPLAY. -The optional argument DISPLAY specifies which display to ask about. -DISPLAY should be either a frame or a display name (a string). -If omitted or nil, that stands for the selected frame's display." + "SKIP: real doc in xfns.c." 1000000) ; ??? (defun x-server-vendor (&optional _frame) - "Return the \"vendor ID\" string of the GUI software on TERMINAL. - -\(Labeling every distributor as a \"vendor\" embodies the false assumption -that operating systems cannot be developed and distributed noncommercially.) - -For GNU and Unix systems, this queries the X server software; for -MS-Windows, this queries the OS. - -The optional argument TERMINAL specifies which display to ask about. -TERMINAL should be a terminal object, a frame or a display name (a string). -If omitted or nil, that stands for the selected frame's display." + "SKIP: real doc in xfns.c." "GNU") (defun x-server-version (&optional _frame) - "Return the version numbers of the GUI software on TERMINAL. -The value is a list of three integers specifying the version of the GUI -software in use. - -For GNU and Unix system, the first 2 numbers are the version of the X -Protocol used on TERMINAL and the 3rd number is the distributor-specific -release number. For MS-Windows, the 3 numbers report the version and -the build number of the OS. - -See also the function `x-server-vendor'. - -The optional argument TERMINAL specifies which display to ask about. -TERMINAL should be a terminal object, a frame or a display name (a string). -If omitted or nil, that stands for the selected frame's display." + "SKIP: real doc in xfns.c." '(1 0 0)) (defun x-display-screens (&optional _frame) - "Return the number of screens on the server of DISPLAY. -The optional argument DISPLAY specifies which display to ask about. -DISPLAY should be either a frame or a display name (a string). -If omitted or nil, that stands for the selected frame's display." + "SKIP: real doc in xfns.c." 1) (defun x-display-mm-height (&optional _frame) - "Return the height in millimeters of DISPLAY. -The optional argument DISPLAY specifies which display to ask about. -DISPLAY should be either a frame or a display name (a string). -If omitted or nil, that stands for the selected frame's display. - -On \"multi-monitor\" setups this refers to the height in millimeters for -all physical monitors associated with DISPLAY. To get information -for each physical monitor, use `display-monitor-attributes-list'." + "SKIP: real doc in xfns.c." 245) ; Guess the size of my... (defun x-display-mm-width (&optional _frame) - "Return the width in millimeters of DISPLAY. -The optional argument DISPLAY specifies which display to ask about. -DISPLAY should be either a frame or a display name (a string). -If omitted or nil, that stands for the selected frame's display. - -On \"multi-monitor\" setups this refers to the width in millimeters for -all physical monitors associated with TERMINAL. To get information -for each physical monitor, use `display-monitor-attributes-list'." + "SKIP: real doc in xfns.c." 322) ; ...monitor, EZ... (defun x-display-backing-store (&optional _frame) - "Return an indication of whether DISPLAY does backing store. -The value may be `always', `when-mapped', or `not-useful'. -The optional argument DISPLAY specifies which display to ask about. -DISPLAY should be either a frame or a display name (a string). -If omitted or nil, that stands for the selected frame's display." + "SKIP: real doc in xfns.c." 'not-useful) (defun x-display-visual-class (&optional _frame) - "Return the visual class of DISPLAY. -The value is one of the symbols `static-gray', `gray-scale', -`static-color', `pseudo-color', `true-color', or `direct-color'. - -The optional argument DISPLAY specifies which display to ask about. -DISPLAY should be either a frame or a display name (a string). -If omitted or nil, that stands for the selected frame's display." + "SKIP: real doc in xfns.c." 'static-color) (fset 'x-display-save-under 'ignore) (fset 'x-get-resource 'ignore) -;; From lisp/term/x-win.el (defvar x-display-name "pc" - "The name of the window display on which Emacs was started. -On X, the display name of individual X frames is recorded in the -`display' frame parameter.") + "SKIP: real doc in common-win.el.") (defvar x-colors (mapcar 'car msdos-color-values) - "List of basic colors available on color displays. -For X, the list comes from the `rgb.txt' file,v 10.41 94/02/20. -For Nextstep, this is a list of non-PANTONE colors returned by -the operating system.") + "SKIP: real doc in common-win.el.") ;; From lisp/term/w32-win.el ; diff --git a/src/doc.c b/src/doc.c index 3424bffdf9..4264ed5064 100644 --- a/src/doc.c +++ b/src/doc.c @@ -535,7 +535,6 @@ the same file name is found in the `doc-directory'. */) EMACS_INT pos; Lisp_Object sym; char *p, *name; - bool skip_file = 0; ptrdiff_t count; char const *dirname; ptrdiff_t dirlen; @@ -609,34 +608,24 @@ the same file name is found in the `doc-directory'. */) { end = strchr (p, '\n'); - /* See if this is a file name, and if it is a file in build-files. */ - if (p[1] == 'S') - { - skip_file = 0; - if (end - p > 4 && end[-2] == '.' - && (end[-1] == 'o' || end[-1] == 'c')) - { - ptrdiff_t len = end - p - 2; - char *fromfile = SAFE_ALLOCA (len + 1); - memcpy (fromfile, &p[2], len); - fromfile[len] = 0; - if (fromfile[len-1] == 'c') - fromfile[len-1] = 'o'; - - skip_file = NILP (Fmember (build_string (fromfile), - Vbuild_files)); - } - } + /* We used to skip files not in build_files, so that when a + function was defined several times in different files + (typically, once in xterm, once in w32term, ...), we only + paid attention to the relevant one. + + But this meant the doc had to be kept and updated in + multiple files. Nowadays we keep the doc only in eg xterm. + The (f)boundp checks below ensure we don't report + docs for eg w32-specific items on X. + */ sym = oblookup (Vobarray, p + 2, multibyte_chars_in_text ((unsigned char *) p + 2, end - p - 2), end - p - 2); - /* Check skip_file so that when a function is defined several - times in different files (typically, once in xterm, once in - w32term, ...), we only pay attention to the one that - matters. */ - if (! skip_file && SYMBOLP (sym)) + /* Ignore docs that start with SKIP. These mark + placeholders where the real doc is elsewhere. */ + if (SYMBOLP (sym)) { /* Attach a docstring to a variable? */ if (p[1] == 'V') @@ -644,8 +633,9 @@ the same file name is found in the `doc-directory'. */) /* Install file-position as variable-documentation property and make it negative for a user-variable (doc starts with a `*'). */ - if (!NILP (Fboundp (sym)) + if ((!NILP (Fboundp (sym)) || !NILP (Fmemq (sym, delayed_init))) + && strncmp (end, "\nSKIP", 5)) Fput (sym, Qvariable_documentation, make_number ((pos + end + 1 - buf) * (end[1] == '*' ? -1 : 1))); @@ -654,7 +644,7 @@ the same file name is found in the `doc-directory'. */) /* Attach a docstring to a function? */ else if (p[1] == 'F') { - if (!NILP (Ffboundp (sym))) + if (!NILP (Ffboundp (sym)) && strncmp (end, "\nSKIP", 5)) store_function_docstring (sym, pos + end + 1 - buf); } else if (p[1] == 'S') diff --git a/src/dosfns.c b/src/dosfns.c index c6d4d5b8d8..f9845a3049 100644 --- a/src/dosfns.c +++ b/src/dosfns.c @@ -480,11 +480,7 @@ x_set_title (struct frame *f, Lisp_Object name) #endif /* !HAVE_X_WINDOWS */ DEFUN ("file-system-info", Ffile_system_info, Sfile_system_info, 1, 1, 0, - doc: /* Return storage information about the file system FILENAME is on. -Value is a list of floats (TOTAL FREE AVAIL), where TOTAL is the total -storage of the file system, FREE is the free storage, and AVAIL is the -storage available to a non-superuser. All 3 numbers are in bytes. -If the underlying system call fails, value is nil. */) + doc: /* SKIP: real doc in fileio.c. */) (Lisp_Object filename) { struct statfs stfs; diff --git a/src/frame.c b/src/frame.c index 9eac242ea3..fdde3d99a9 100644 --- a/src/frame.c +++ b/src/frame.c @@ -317,7 +317,7 @@ predicates which report frame's specific UI-related capabilities. */) /* Placeholder used by temacs -nw before window.el is loaded. */ DEFUN ("frame-windows-min-size", Fframe_windows_min_size, Sframe_windows_min_size, 4, 4, 0, - doc: /* */ + doc: /* SKIP: real doc in window.el. */ attributes: const) (Lisp_Object frame, Lisp_Object horizontal, Lisp_Object ignore, Lisp_Object pixelwise) diff --git a/src/nsfns.m b/src/nsfns.m index 06827f6dd1..6407560d89 100644 --- a/src/nsfns.m +++ b/src/nsfns.m @@ -998,15 +998,7 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side DEFUN ("x-create-frame", Fx_create_frame, Sx_create_frame, 1, 1, 0, - doc: /* Make a new Nextstep window, called a "frame" in Emacs terms. -Return an Emacs frame object. -PARMS is an alist of frame parameters. -If the parameters specify that the frame should not have a minibuffer, -and do not specify a specific minibuffer window to use, -then `default-minibuffer-frame' must be a frame whose minibuffer can -be shared by the new frame. - -This function is an internal primitive--use `make-frame' instead. */) + doc: /* SKIP: real doc in xfns.c. */) (Lisp_Object parms) { struct frame *f; @@ -1702,7 +1694,7 @@ Frames are listed from topmost (first) to bottommost (last). */) DEFUN ("x-server-max-request-size", Fx_server_max_request_size, Sx_server_max_request_size, 0, 1, 0, - doc: /* This function is a no-op. It is only present for completeness. */) + doc: /* SKIP: real doc in xfns.c. */) (Lisp_Object terminal) { check_ns_display_info (terminal); @@ -1713,12 +1705,7 @@ Frames are listed from topmost (first) to bottommost (last). */) DEFUN ("x-server-vendor", Fx_server_vendor, Sx_server_vendor, 0, 1, 0, - doc: /* Return the "vendor ID" string of Nextstep display server TERMINAL. -\(Labeling every distributor as a "vendor" embodies the false assumption -that operating systems cannot be developed and distributed noncommercially.) -The optional argument TERMINAL specifies which display to ask about. -TERMINAL should be a terminal object, a frame or a display name (a string). -If omitted or nil, that stands for the selected frame's display. */) + doc: /* SKIP: real doc in xfns.c. */) (Lisp_Object terminal) { check_ns_display_info (terminal); @@ -1731,14 +1718,7 @@ Frames are listed from topmost (first) to bottommost (last). */) DEFUN ("x-server-version", Fx_server_version, Sx_server_version, 0, 1, 0, - doc: /* Return the version numbers of the server of display TERMINAL. -The value is a list of three integers: the major and minor -version numbers of the X Protocol in use, and the distributor-specific release -number. See also the function `x-server-vendor'. - -The optional argument TERMINAL specifies which display to ask about. -TERMINAL should be a terminal object, a frame or a display name (a string). -If omitted or nil, that stands for the selected frame's display. */) + doc: /* SKIP: real doc in xfns.c. */) (Lisp_Object terminal) { check_ns_display_info (terminal); @@ -1753,14 +1733,7 @@ and GNUstep implementations ("distributor-specific release DEFUN ("x-display-screens", Fx_display_screens, Sx_display_screens, 0, 1, 0, - doc: /* Return the number of screens on Nextstep display server TERMINAL. -The optional argument TERMINAL specifies which display to ask about. -TERMINAL should be a terminal object, a frame or a display name (a string). -If omitted or nil, that stands for the selected frame's display. - -Note: "screen" here is not in Nextstep terminology but in X11's. For -the number of physical monitors, use `(length -\(display-monitor-attributes-list TERMINAL))' instead. */) + doc: /* SKIP: real doc in xfns.c. */) (Lisp_Object terminal) { check_ns_display_info (terminal); @@ -1769,14 +1742,7 @@ and GNUstep implementations ("distributor-specific release DEFUN ("x-display-mm-height", Fx_display_mm_height, Sx_display_mm_height, 0, 1, 0, - doc: /* Return the height in millimeters of the Nextstep display TERMINAL. -The optional argument TERMINAL specifies which display to ask about. -TERMINAL should be a terminal object, a frame or a display name (a string). -If omitted or nil, that stands for the selected frame's display. - -On \"multi-monitor\" setups this refers to the height in millimeters for -all physical monitors associated with TERMINAL. To get information -for each physical monitor, use `display-monitor-attributes-list'. */) + doc: /* SKIP: real doc in xfns.c. */) (Lisp_Object terminal) { struct ns_display_info *dpyinfo = check_ns_display_info (terminal); @@ -1786,14 +1752,7 @@ and GNUstep implementations ("distributor-specific release DEFUN ("x-display-mm-width", Fx_display_mm_width, Sx_display_mm_width, 0, 1, 0, - doc: /* Return the width in millimeters of the Nextstep display TERMINAL. -The optional argument TERMINAL specifies which display to ask about. -TERMINAL should be a terminal object, a frame or a display name (a string). -If omitted or nil, that stands for the selected frame's display. - -On \"multi-monitor\" setups this refers to the width in millimeters for -all physical monitors associated with TERMINAL. To get information -for each physical monitor, use `display-monitor-attributes-list'. */) + doc: /* SKIP: real doc in xfns.c. */) (Lisp_Object terminal) { struct ns_display_info *dpyinfo = check_ns_display_info (terminal); @@ -1804,14 +1763,11 @@ and GNUstep implementations ("distributor-specific release DEFUN ("x-display-backing-store", Fx_display_backing_store, Sx_display_backing_store, 0, 1, 0, - doc: /* Return an indication of whether the Nextstep display TERMINAL does backing store. -The value may be `buffered', `retained', or `non-retained'. -The optional argument TERMINAL specifies which display to ask about. -TERMINAL should be a terminal object, a frame or a display name (a string). -If omitted or nil, that stands for the selected frame's display. */) + doc: /* SKIP: real doc in xfns.c. */) (Lisp_Object terminal) { check_ns_display_info (terminal); + /* Note that the xfns.c version has different return values. */ switch ([ns_get_window (terminal) backingType]) { case NSBackingStoreBuffered: @@ -1831,13 +1787,7 @@ and GNUstep implementations ("distributor-specific release DEFUN ("x-display-visual-class", Fx_display_visual_class, Sx_display_visual_class, 0, 1, 0, - doc: /* Return the visual class of the Nextstep display TERMINAL. -The value is one of the symbols `static-gray', `gray-scale', -`static-color', `pseudo-color', `true-color', or `direct-color'. - -The optional argument TERMINAL specifies which display to ask about. -TERMINAL should a terminal object, a frame or a display name (a string). -If omitted or nil, that stands for the selected frame's display. */) + doc: /* SKIP: real doc in xfns.c. */) (Lisp_Object terminal) { NSWindowDepth depth; @@ -1863,10 +1813,7 @@ and GNUstep implementations ("distributor-specific release DEFUN ("x-display-save-under", Fx_display_save_under, Sx_display_save_under, 0, 1, 0, - doc: /* Return t if TERMINAL supports the save-under feature. -The optional argument TERMINAL specifies which display to ask about. -TERMINAL should be a terminal object, a frame or a display name (a string). -If omitted or nil, that stands for the selected frame's display. */) + doc: /* SKIP: real doc in xfns.c. */) (Lisp_Object terminal) { check_ns_display_info (terminal); @@ -1890,12 +1837,7 @@ and GNUstep implementations ("distributor-specific release DEFUN ("x-open-connection", Fx_open_connection, Sx_open_connection, 1, 3, 0, - doc: /* Open a connection to a display server. -DISPLAY is the name of the display to connect to. -Optional second arg XRM-STRING is a string of resources in xrdb format. -If the optional third arg MUST-SUCCEED is non-nil, -terminate Emacs if we can't open the connection. -\(In the Nextstep version, the last two arguments are currently ignored.) */) + doc: /* SKIP: real doc in xfns.c. */) (Lisp_Object display, Lisp_Object resource_string, Lisp_Object must_succeed) { struct ns_display_info *dpyinfo; @@ -1920,10 +1862,7 @@ and GNUstep implementations ("distributor-specific release DEFUN ("x-close-connection", Fx_close_connection, Sx_close_connection, 1, 1, 0, - doc: /* Close the connection to TERMINAL's Nextstep display server. -For TERMINAL, specify a terminal object, a frame or a display name (a -string). If TERMINAL is nil, that stands for the selected frame's -terminal. */) + doc: /* SKIP: real doc in xfns.c. */) (Lisp_Object terminal) { check_ns_display_info (terminal); @@ -1933,7 +1872,7 @@ and GNUstep implementations ("distributor-specific release DEFUN ("x-display-list", Fx_display_list, Sx_display_list, 0, 0, 0, - doc: /* Return the list of display names that Emacs has connections to. */) + doc: /* SKIP: real doc in xfns.c. */) (void) { Lisp_Object result = Qnil; @@ -2306,8 +2245,7 @@ and GNUstep implementations ("distributor-specific release DEFUN ("xw-color-defined-p", Fxw_color_defined_p, Sxw_color_defined_p, 1, 2, 0, - doc: /* Internal function called by `color-defined-p', which see. -\(Note that the Nextstep version of this function ignores FRAME.) */) + doc: /* SKIP: real doc in xfns.c. */) (Lisp_Object color, Lisp_Object frame) { NSColor * col; @@ -2317,7 +2255,7 @@ and GNUstep implementations ("distributor-specific release DEFUN ("xw-color-values", Fxw_color_values, Sxw_color_values, 1, 2, 0, - doc: /* Internal function called by `color-values', which see. */) + doc: /* SKIP: real doc in xfns.c. */) (Lisp_Object color, Lisp_Object frame) { NSColor * col; @@ -2342,7 +2280,7 @@ and GNUstep implementations ("distributor-specific release DEFUN ("xw-display-color-p", Fxw_display_color_p, Sxw_display_color_p, 0, 1, 0, - doc: /* Internal function called by `display-color-p', which see. */) + doc: /* SKIP: real doc in xfns.c. */) (Lisp_Object terminal) { NSWindowDepth depth; @@ -2360,11 +2298,7 @@ and GNUstep implementations ("distributor-specific release DEFUN ("x-display-grayscale-p", Fx_display_grayscale_p, Sx_display_grayscale_p, 0, 1, 0, - doc: /* Return t if the Nextstep display supports shades of gray. -Note that color displays do support shades of gray. -The optional argument TERMINAL specifies which display to ask about. -TERMINAL should be a terminal object, a frame or a display name (a string). -If omitted or nil, that stands for the selected frame's display. */) + doc: /* SKIP: real doc in xfns.c. */) (Lisp_Object terminal) { NSWindowDepth depth; @@ -2378,14 +2312,7 @@ and GNUstep implementations ("distributor-specific release DEFUN ("x-display-pixel-width", Fx_display_pixel_width, Sx_display_pixel_width, 0, 1, 0, - doc: /* Return the width in pixels of the Nextstep display TERMINAL. -The optional argument TERMINAL specifies which display to ask about. -TERMINAL should be a terminal object, a frame or a display name (a string). -If omitted or nil, that stands for the selected frame's display. - -On \"multi-monitor\" setups this refers to the pixel width for all -physical monitors associated with TERMINAL. To get information for -each physical monitor, use `display-monitor-attributes-list'. */) + doc: /* SKIP: real doc in xfns.c. */) (Lisp_Object terminal) { struct ns_display_info *dpyinfo = check_ns_display_info (terminal); @@ -2396,14 +2323,7 @@ and GNUstep implementations ("distributor-specific release DEFUN ("x-display-pixel-height", Fx_display_pixel_height, Sx_display_pixel_height, 0, 1, 0, - doc: /* Return the height in pixels of the Nextstep display TERMINAL. -The optional argument TERMINAL specifies which display to ask about. -TERMINAL should be a terminal object, a frame or a display name (a string). -If omitted or nil, that stands for the selected frame's display. - -On \"multi-monitor\" setups this refers to the pixel height for all -physical monitors associated with TERMINAL. To get information for -each physical monitor, use `display-monitor-attributes-list'. */) + doc: /* SKIP: real doc in xfns.c. */) (Lisp_Object terminal) { struct ns_display_info *dpyinfo = check_ns_display_info (terminal); @@ -2648,10 +2568,7 @@ and GNUstep implementations ("distributor-specific release DEFUN ("x-display-planes", Fx_display_planes, Sx_display_planes, 0, 1, 0, - doc: /* Return the number of bitplanes of the Nextstep display TERMINAL. -The optional argument TERMINAL specifies which display to ask about. -TERMINAL should be a terminal object, a frame or a display name (a string). -If omitted or nil, that stands for the selected frame's display. */) + doc: /* SKIP: real doc in xfns.c. */) (Lisp_Object terminal) { check_ns_display_info (terminal); @@ -2662,10 +2579,7 @@ and GNUstep implementations ("distributor-specific release DEFUN ("x-display-color-cells", Fx_display_color_cells, Sx_display_color_cells, 0, 1, 0, - doc: /* Returns the number of color cells of the Nextstep display TERMINAL. -The optional argument TERMINAL specifies which display to ask about. -TERMINAL should be a terminal object, a frame or a display name (a string). -If omitted or nil, that stands for the selected frame's display. */) + doc: /* SKIP: real doc in xfns.c. */) (Lisp_Object terminal) { struct ns_display_info *dpyinfo = check_ns_display_info (terminal); @@ -2753,35 +2667,7 @@ and GNUstep implementations ("distributor-specific release DEFUN ("x-show-tip", Fx_show_tip, Sx_show_tip, 1, 6, 0, - doc: /* Show STRING in a \"tooltip\" window on frame FRAME. -A tooltip window is a small window displaying a string. - -This is an internal function; Lisp code should call `tooltip-show'. - -FRAME nil or omitted means use the selected frame. - -PARMS is an optional list of frame parameters which can be used to -change the tooltip's appearance. - -Automatically hide the tooltip after TIMEOUT seconds. TIMEOUT nil -means use the default timeout of 5 seconds. - -If the list of frame parameters PARMS contains a `left' parameter, -display the tooltip at that x-position. If the list of frame parameters -PARMS contains no `left' but a `right' parameter, display the tooltip -right-adjusted at that x-position. Otherwise display it at the -x-position of the mouse, with offset DX added (default is 5 if DX isn't -specified). - -Likewise for the y-position: If a `top' frame parameter is specified, it -determines the position of the upper edge of the tooltip window. If a -`bottom' parameter but no `top' frame parameter is specified, it -determines the position of the lower edge of the tooltip window. -Otherwise display the tooltip window at the y-position of the mouse, -with offset DY added (default is -10). - -A tooltip's maximum size is specified by `x-max-tooltip-size'. -Text larger than the specified size is clipped. */) + doc: /* SKIP: real doc in xfns.c. */) (Lisp_Object string, Lisp_Object frame, Lisp_Object parms, Lisp_Object timeout, Lisp_Object dx, Lisp_Object dy) { int root_x, root_y; @@ -2842,8 +2728,7 @@ with offset DY added (default is -10). DEFUN ("x-hide-tip", Fx_hide_tip, Sx_hide_tip, 0, 0, 0, - doc: /* Hide the current tooltip window, if there is any. -Value is t if tooltip was open, nil otherwise. */) + doc: /* SKIP: real doc in xfns.c. */) (void) { if (ns_tooltip == nil || ![ns_tooltip isActive]) diff --git a/src/nsmenu.m b/src/nsmenu.m index 58b45fb38e..29b0f99e64 100644 --- a/src/nsmenu.m +++ b/src/nsmenu.m @@ -1874,7 +1874,7 @@ - (Lisp_Object)runDialogAt: (NSPoint)p DEFUN ("menu-or-popup-active-p", Fmenu_or_popup_active_p, Smenu_or_popup_active_p, 0, 0, 0, - doc: /* Return t if a menu or popup dialog is active. */) + doc: /* SKIP: real doc in xmenu.c. */) (void) { return popup_activated () ? Qt : Qnil; diff --git a/src/nsterm.m b/src/nsterm.m index 8a66643cfb..627a61cac6 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -9380,27 +9380,17 @@ Nil means use fullscreen the old (< 10.7) way. The old way works better with /* TODO: move to common code */ DEFVAR_LISP ("x-toolkit-scroll-bars", Vx_toolkit_scroll_bars, - doc: /* Which toolkit scroll bars Emacs uses, if any. -A value of nil means Emacs doesn't use toolkit scroll bars. -With the X Window system, the value is a symbol describing the -X toolkit. Possible values are: gtk, motif, xaw, or xaw3d. -With MS Windows or Nextstep, the value is t. */); + doc: /* SKIP: real doc in xterm.c. */); Vx_toolkit_scroll_bars = Qt; DEFVAR_BOOL ("x-use-underline-position-properties", x_use_underline_position_properties, - doc: /*Non-nil means make use of UNDERLINE_POSITION font properties. -A value of nil means ignore them. If you encounter fonts with bogus -UNDERLINE_POSITION font properties, for example 7x13 on XFree prior -to 4.1, set this to nil. */); + doc: /* SKIP: real doc in xterm.c. */); x_use_underline_position_properties = 0; DEFVAR_BOOL ("x-underline-at-descent-line", x_underline_at_descent_line, - doc: /* Non-nil means to draw the underline at the same place as the descent line. -A value of nil means to draw the underline according to the value of the -variable `x-use-underline-position-properties', which is usually at the -baseline level. The default value is nil. */); + doc: /* SKIP: real doc in xterm.c. */); x_underline_at_descent_line = 0; /* Tell Emacs about this window system. */ diff --git a/src/w16select.c b/src/w16select.c index ed3d041f2d..2d740a3ee6 100644 --- a/src/w16select.c +++ b/src/w16select.c @@ -678,43 +678,11 @@ syms_of_win16select (void) defsubr (&Sw16_selection_exists_p); DEFVAR_LISP ("selection-coding-system", Vselection_coding_system, - doc: /* Coding system for communicating with other programs. - -For MS-Windows and MS-DOS: -When sending or receiving text via selection and clipboard, the text -is encoded or decoded by this coding system. The default value is -the current system default encoding on 9x/Me, `utf-16le-dos' -\(Unicode) on NT/W2K/XP, and `iso-latin-1-dos' on MS-DOS. - -For X Windows: -When sending text via selection and clipboard, if the target -data-type matches with the type of this coding system, it is used -for encoding the text. Otherwise (including the case that this -variable is nil), a proper coding system is used as below: - -data-type coding system ---------- ------------- -UTF8_STRING utf-8 -COMPOUND_TEXT compound-text-with-extensions -STRING iso-latin-1 -C_STRING no-conversion - -When receiving text, if this coding system is non-nil, it is used -for decoding regardless of the data-type. If this is nil, a -proper coding system is used according to the data-type as above. - -See also the documentation of the variable `x-select-request-type' how -to control which data-type to request for receiving text. - -The default value is nil. */); + doc: /* SKIP: real doc in select.el. */); Vselection_coding_system = intern ("iso-latin-1-dos"); DEFVAR_LISP ("next-selection-coding-system", Vnext_selection_coding_system, - doc: /* Coding system for the next communication with other programs. -Usually, `selection-coding-system' is used for communicating with -other programs (X Windows clients or MS Windows programs). But, if this -variable is set, it is used for the next communication only. -After the communication, this variable is set to nil. */); + doc: /* SKIP: real doc in select.el. */); Vnext_selection_coding_system = Qnil; DEFSYM (QCLIPBOARD, "CLIPBOARD"); diff --git a/src/w32fns.c b/src/w32fns.c index 2b8c34a5ab..2b920f29c6 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -5670,15 +5670,7 @@ x_default_font_parameter (struct frame *f, Lisp_Object parms) DEFUN ("x-create-frame", Fx_create_frame, Sx_create_frame, 1, 1, 0, - doc: /* Make a new window, which is called a \"frame\" in Emacs terms. -Return an Emacs frame object. -PARAMETERS is an alist of frame parameters. -If the parameters specify that the frame should not have a minibuffer, -and do not specify a specific minibuffer window to use, -then `default-minibuffer-frame' must be a frame whose minibuffer can -be shared by the new frame. - -This function is an internal primitive--use `make-frame' instead. */) + doc: /* SKIP: real doc in xfns.c. */) (Lisp_Object parameters) { struct frame *f; @@ -6097,8 +6089,7 @@ x_get_focus_frame (struct frame *frame) } DEFUN ("xw-color-defined-p", Fxw_color_defined_p, Sxw_color_defined_p, 1, 2, 0, - doc: /* Internal function called by `color-defined-p', which see. -\(Note that the Nextstep version of this function ignores FRAME.) */) + doc: /* SKIP: real doc in xfns.c. */) (Lisp_Object color, Lisp_Object frame) { XColor foo; @@ -6113,7 +6104,7 @@ DEFUN ("xw-color-defined-p", Fxw_color_defined_p, Sxw_color_defined_p, 1, 2, 0, } DEFUN ("xw-color-values", Fxw_color_values, Sxw_color_values, 1, 2, 0, - doc: /* Internal function called by `color-values', which see. */) + doc: /* SKIP: real doc in xfns.c. */) (Lisp_Object color, Lisp_Object frame) { XColor foo; @@ -6130,7 +6121,7 @@ DEFUN ("xw-color-values", Fxw_color_values, Sxw_color_values, 1, 2, 0, } DEFUN ("xw-display-color-p", Fxw_display_color_p, Sxw_display_color_p, 0, 1, 0, - doc: /* Internal function called by `display-color-p', which see. */) + doc: /* SKIP: real doc in xfns.c. */) (Lisp_Object display) { struct w32_display_info *dpyinfo = check_x_display_info (display); @@ -6143,11 +6134,7 @@ DEFUN ("xw-display-color-p", Fxw_display_color_p, Sxw_display_color_p, 0, 1, 0, DEFUN ("x-display-grayscale-p", Fx_display_grayscale_p, Sx_display_grayscale_p, 0, 1, 0, - doc: /* Return t if DISPLAY supports shades of gray. -Note that color displays do support shades of gray. -The optional argument DISPLAY specifies which display to ask about. -DISPLAY should be either a frame or a display name (a string). -If omitted or nil, that stands for the selected frame's display. */) + doc: /* SKIP: real doc in xfns.c. */) (Lisp_Object display) { struct w32_display_info *dpyinfo = check_x_display_info (display); @@ -6160,14 +6147,7 @@ If omitted or nil, that stands for the selected frame's display. */) DEFUN ("x-display-pixel-width", Fx_display_pixel_width, Sx_display_pixel_width, 0, 1, 0, - doc: /* Return the width in pixels of DISPLAY. -The optional argument DISPLAY specifies which display to ask about. -DISPLAY should be either a frame or a display name (a string). -If omitted or nil, that stands for the selected frame's display. - -On \"multi-monitor\" setups this refers to the pixel width for all -physical monitors associated with DISPLAY. To get information for -each physical monitor, use `display-monitor-attributes-list'. */) + doc: /* SKIP: real doc in xfns.c. */) (Lisp_Object display) { struct w32_display_info *dpyinfo = check_x_display_info (display); @@ -6177,14 +6157,7 @@ each physical monitor, use `display-monitor-attributes-list'. */) DEFUN ("x-display-pixel-height", Fx_display_pixel_height, Sx_display_pixel_height, 0, 1, 0, - doc: /* Return the height in pixels of DISPLAY. -The optional argument DISPLAY specifies which display to ask about. -DISPLAY should be either a frame or a display name (a string). -If omitted or nil, that stands for the selected frame's display. - -On \"multi-monitor\" setups this refers to the pixel height for all -physical monitors associated with DISPLAY. To get information for -each physical monitor, use `display-monitor-attributes-list'. */) + doc: /* SKIP: real doc in xfns.c. */) (Lisp_Object display) { struct w32_display_info *dpyinfo = check_x_display_info (display); @@ -6194,10 +6167,7 @@ each physical monitor, use `display-monitor-attributes-list'. */) DEFUN ("x-display-planes", Fx_display_planes, Sx_display_planes, 0, 1, 0, - doc: /* Return the number of bitplanes of DISPLAY. -The optional argument DISPLAY specifies which display to ask about. -DISPLAY should be either a frame or a display name (a string). -If omitted or nil, that stands for the selected frame's display. */) + doc: /* SKIP: real doc in xfns.c. */) (Lisp_Object display) { struct w32_display_info *dpyinfo = check_x_display_info (display); @@ -6207,10 +6177,7 @@ If omitted or nil, that stands for the selected frame's display. */) DEFUN ("x-display-color-cells", Fx_display_color_cells, Sx_display_color_cells, 0, 1, 0, - doc: /* Return the number of color cells of DISPLAY. -The optional argument DISPLAY specifies which display to ask about. -DISPLAY should be either a frame or a display name (a string). -If omitted or nil, that stands for the selected frame's display. */) + doc: /* SKIP: real doc in xfns.c. */) (Lisp_Object display) { struct w32_display_info *dpyinfo = check_x_display_info (display); @@ -6228,57 +6195,28 @@ If omitted or nil, that stands for the selected frame's display. */) DEFUN ("x-server-max-request-size", Fx_server_max_request_size, Sx_server_max_request_size, 0, 1, 0, - doc: /* Return the maximum request size of the server of DISPLAY. -The optional argument DISPLAY specifies which display to ask about. -DISPLAY should be either a frame or a display name (a string). -If omitted or nil, that stands for the selected frame's display. */) + doc: /* SKIP: real doc in xfns.c. */) (Lisp_Object display) { return make_number (1); } DEFUN ("x-server-vendor", Fx_server_vendor, Sx_server_vendor, 0, 1, 0, - doc: /* Return the "vendor ID" string of the GUI software on TERMINAL. - -\(Labeling every distributor as a "vendor" embodies the false assumption -that operating systems cannot be developed and distributed noncommercially.) - -For GNU and Unix systems, this queries the X server software; for -MS-Windows, this queries the OS. - -The optional argument TERMINAL specifies which display to ask about. -TERMINAL should be a terminal object, a frame or a display name (a string). -If omitted or nil, that stands for the selected frame's display. */) + doc: /* SKIP: real doc in xfns.c. */) (Lisp_Object terminal) { return build_string ("Microsoft Corp."); } DEFUN ("x-server-version", Fx_server_version, Sx_server_version, 0, 1, 0, - doc: /* Return the version numbers of the GUI software on TERMINAL. -The value is a list of three integers specifying the version of the GUI -software in use. - -For GNU and Unix system, the first 2 numbers are the version of the X -Protocol used on TERMINAL and the 3rd number is the distributor-specific -release number. For MS-Windows, the 3 numbers report the version and -the build number of the OS. - -See also the function `x-server-vendor'. - -The optional argument TERMINAL specifies which display to ask about. -TERMINAL should be a terminal object, a frame or a display name (a string). -If omitted or nil, that stands for the selected frame's display. */) + doc: /* SKIP: real doc in xfns.c. */) (Lisp_Object terminal) { return list3i (w32_major_version, w32_minor_version, w32_build_number); } DEFUN ("x-display-screens", Fx_display_screens, Sx_display_screens, 0, 1, 0, - doc: /* Return the number of screens on the server of DISPLAY. -The optional argument DISPLAY specifies which display to ask about. -DISPLAY should be either a frame or a display name (a string). -If omitted or nil, that stands for the selected frame's display. */) + doc: /* SKIP: real doc in xfns.c. */) (Lisp_Object display) { return make_number (1); @@ -6286,14 +6224,7 @@ If omitted or nil, that stands for the selected frame's display. */) DEFUN ("x-display-mm-height", Fx_display_mm_height, Sx_display_mm_height, 0, 1, 0, - doc: /* Return the height in millimeters of DISPLAY. -The optional argument DISPLAY specifies which display to ask about. -DISPLAY should be either a frame or a display name (a string). -If omitted or nil, that stands for the selected frame's display. - -On \"multi-monitor\" setups this refers to the height in millimeters for -all physical monitors associated with DISPLAY. To get information -for each physical monitor, use `display-monitor-attributes-list'. */) + doc: /* SKIP: real doc in xfns.c. */) (Lisp_Object display) { struct w32_display_info *dpyinfo = check_x_display_info (display); @@ -6309,14 +6240,7 @@ for each physical monitor, use `display-monitor-attributes-list'. */) } DEFUN ("x-display-mm-width", Fx_display_mm_width, Sx_display_mm_width, 0, 1, 0, - doc: /* Return the width in millimeters of DISPLAY. -The optional argument DISPLAY specifies which display to ask about. -DISPLAY should be either a frame or a display name (a string). -If omitted or nil, that stands for the selected frame's display. - -On \"multi-monitor\" setups this refers to the width in millimeters for -all physical monitors associated with TERMINAL. To get information -for each physical monitor, use `display-monitor-attributes-list'. */) + doc: /* SKIP: real doc in xfns.c. */) (Lisp_Object display) { struct w32_display_info *dpyinfo = check_x_display_info (display); @@ -6333,11 +6257,7 @@ for each physical monitor, use `display-monitor-attributes-list'. */) DEFUN ("x-display-backing-store", Fx_display_backing_store, Sx_display_backing_store, 0, 1, 0, - doc: /* Return an indication of whether DISPLAY does backing store. -The value may be `always', `when-mapped', or `not-useful'. -The optional argument DISPLAY specifies which display to ask about. -DISPLAY should be either a frame or a display name (a string). -If omitted or nil, that stands for the selected frame's display. */) + doc: /* SKIP: real doc in xfns.c. */) (Lisp_Object display) { return intern ("not-useful"); @@ -6345,13 +6265,7 @@ If omitted or nil, that stands for the selected frame's display. */) DEFUN ("x-display-visual-class", Fx_display_visual_class, Sx_display_visual_class, 0, 1, 0, - doc: /* Return the visual class of DISPLAY. -The value is one of the symbols `static-gray', `gray-scale', -`static-color', `pseudo-color', `true-color', or `direct-color'. - -The optional argument DISPLAY specifies which display to ask about. -DISPLAY should be either a frame or a display name (a string). -If omitted or nil, that stands for the selected frame's display. */) + doc: /* SKIP: real doc in xfns.c. */) (Lisp_Object display) { struct w32_display_info *dpyinfo = check_x_display_info (display); @@ -6360,7 +6274,7 @@ If omitted or nil, that stands for the selected frame's display. */) if (dpyinfo->has_palette) result = intern ("pseudo-color"); else if (dpyinfo->n_planes * dpyinfo->n_cbits == 1) - result = intern ("static-grey"); + result = intern ("static-gray"); else if (dpyinfo->n_planes * dpyinfo->n_cbits == 4) result = intern ("static-color"); else if (dpyinfo->n_planes * dpyinfo->n_cbits > 8) @@ -6371,10 +6285,7 @@ If omitted or nil, that stands for the selected frame's display. */) DEFUN ("x-display-save-under", Fx_display_save_under, Sx_display_save_under, 0, 1, 0, - doc: /* Return t if DISPLAY supports the save-under feature. -The optional argument DISPLAY specifies which display to ask about. -DISPLAY should be either a frame or a display name (a string). -If omitted or nil, that stands for the selected frame's display. */) + doc: /* SKIP: real doc in xfns.c. */) (Lisp_Object display) { return Qnil; @@ -6639,12 +6550,7 @@ x_display_info_for_name (Lisp_Object name) } DEFUN ("x-open-connection", Fx_open_connection, Sx_open_connection, - 1, 3, 0, doc: /* Open a connection to a display server. -DISPLAY is the name of the display to connect to. -Optional second arg XRM-STRING is a string of resources in xrdb format. -If the optional third arg MUST-SUCCEED is non-nil, -terminate Emacs if we can't open the connection. -\(In the Nextstep version, the last two arguments are currently ignored.) */) + 1, 3, 0, doc: /* SKIP: real doc in xfns.c. */) (Lisp_Object display, Lisp_Object xrm_string, Lisp_Object must_succeed) { char *xrm_option; @@ -6726,9 +6632,7 @@ terminate Emacs if we can't open the connection. DEFUN ("x-close-connection", Fx_close_connection, Sx_close_connection, 1, 1, 0, - doc: /* Close the connection to DISPLAY's server. -For DISPLAY, specify either a frame or a display name (a string). -If DISPLAY is nil, that stands for the selected frame's display. */) + doc: /* SKIP: real doc in xfns.c. */) (Lisp_Object display) { struct w32_display_info *dpyinfo = check_x_display_info (display); @@ -6746,7 +6650,7 @@ If DISPLAY is nil, that stands for the selected frame's display. */) } DEFUN ("x-display-list", Fx_display_list, Sx_display_list, 0, 0, 0, - doc: /* Return the list of display names that Emacs has connections to. */) + doc: /* SKIP: real doc in xfns.c. */) (void) { Lisp_Object result = Qnil; @@ -6759,17 +6663,7 @@ DEFUN ("x-display-list", Fx_display_list, Sx_display_list, 0, 0, 0, } DEFUN ("x-synchronize", Fx_synchronize, Sx_synchronize, 1, 2, 0, - doc: /* If ON is non-nil, report X errors as soon as the erring request is made. -This function only has an effect on X Windows. With MS Windows, it is -defined but does nothing. - -If ON is nil, allow buffering of requests. -Turning on synchronization prohibits the Xlib routines from buffering -requests and seriously degrades performance, but makes debugging much -easier. -The optional second argument TERMINAL specifies which display to act on. -TERMINAL should be a terminal object, a frame or a display name (a string). -If TERMINAL is omitted or nil, that stands for the selected frame's display. */) + doc: /* SKIP: real doc in xfns.c. */) (Lisp_Object on, Lisp_Object display) { return Qnil; @@ -6785,21 +6679,7 @@ If TERMINAL is omitted or nil, that stands for the selected frame's display. */ DEFUN ("x-change-window-property", Fx_change_window_property, Sx_change_window_property, 2, 6, 0, - doc: /* Change window property PROP to VALUE on the X window of FRAME. -PROP must be a string. VALUE may be a string or a list of conses, -numbers and/or strings. If an element in the list is a string, it is -converted to an atom and the value of the Atom is used. If an element -is a cons, it is converted to a 32 bit number where the car is the 16 -top bits and the cdr is the lower 16 bits. - -FRAME nil or omitted means use the selected frame. -If TYPE is given and non-nil, it is the name of the type of VALUE. -If TYPE is not given or nil, the type is STRING. -FORMAT gives the size in bits of each element if VALUE is a list. -It must be one of 8, 16 or 32. -If VALUE is a string or FORMAT is nil or not given, FORMAT defaults to 8. -If OUTER-P is non-nil, the property is changed for the outer X window of -FRAME. Default is to change on the edit X window. */) + doc: /* SKIP: real doc in xfns.c. */) (Lisp_Object prop, Lisp_Object value, Lisp_Object frame, Lisp_Object type, Lisp_Object format, Lisp_Object outer_p) { @@ -6825,8 +6705,7 @@ FRAME. Default is to change on the edit X window. */) DEFUN ("x-delete-window-property", Fx_delete_window_property, Sx_delete_window_property, 1, 2, 0, - doc: /* Remove window property PROP from X window of FRAME. -FRAME nil or omitted means use the selected frame. Value is PROP. */) + doc: /* SKIP: real doc in xfns.c. */) (Lisp_Object prop, Lisp_Object frame) { struct frame *f = decode_window_system_frame (frame); @@ -6847,21 +6726,7 @@ FRAME nil or omitted means use the selected frame. Value is PROP. */) DEFUN ("x-window-property", Fx_window_property, Sx_window_property, 1, 6, 0, - doc: /* Value is the value of window property PROP on FRAME. -If FRAME is nil or omitted, use the selected frame. - -On X Windows, the following optional arguments are also accepted: -If TYPE is nil or omitted, get the property as a string. -Otherwise TYPE is the name of the atom that denotes the type expected. -If SOURCE is non-nil, get the property on that window instead of from -FRAME. The number 0 denotes the root window. -If DELETE-P is non-nil, delete the property after retrieving it. -If VECTOR-RET-P is non-nil, don't return a string but a vector of values. - -On MS Windows, this function accepts but ignores those optional arguments. - -Value is nil if FRAME hasn't a property with name PROP or if PROP has -no value of TYPE (always string in the MS Windows case). */) + doc: /* SKIP: real doc in xfns.c. */) (Lisp_Object prop, Lisp_Object frame, Lisp_Object type, Lisp_Object source, Lisp_Object delete_p, Lisp_Object vector_ret_p) { @@ -7326,35 +7191,7 @@ x_hide_tip (bool delete) DEFUN ("x-show-tip", Fx_show_tip, Sx_show_tip, 1, 6, 0, - doc: /* Show STRING in a \"tooltip\" window on frame FRAME. -A tooltip window is a small window displaying a string. - -This is an internal function; Lisp code should call `tooltip-show'. - -FRAME nil or omitted means use the selected frame. - -PARMS is an optional list of frame parameters which can be -used to change the tooltip's appearance. - -Automatically hide the tooltip after TIMEOUT seconds. TIMEOUT nil -means use the default timeout of 5 seconds. - -If the list of frame parameters PARMS contains a `left' parameter, -display the tooltip at that x-position. If the list of frame parameters -PARMS contains no `left' but a `right' parameter, display the tooltip -right-adjusted at that x-position. Otherwise display it at the -x-position of the mouse, with offset DX added (default is 5 if DX isn't -specified). - -Likewise for the y-position: If a `top' frame parameter is specified, it -determines the position of the upper edge of the tooltip window. If a -`bottom' parameter but no `top' frame parameter is specified, it -determines the position of the lower edge of the tooltip window. -Otherwise display the tooltip window at the y-position of the mouse, -with offset DY added (default is -10). - -A tooltip's maximum size is specified by `x-max-tooltip-size'. -Text larger than the specified size is clipped. */) + doc: /* SKIP: real doc in xfns.c. */) (Lisp_Object string, Lisp_Object frame, Lisp_Object parms, Lisp_Object timeout, Lisp_Object dx, Lisp_Object dy) { @@ -7633,8 +7470,7 @@ Text larger than the specified size is clipped. */) DEFUN ("x-hide-tip", Fx_hide_tip, Sx_hide_tip, 0, 0, 0, - doc: /* Hide the current tooltip window, if there is any. -Value is t if tooltip was open, nil otherwise. */) + doc: /* SKIP: real doc in xfns.c. */) (void) { return x_hide_tip (!tooltip_reuse_hidden_frame); @@ -7765,18 +7601,7 @@ w32_dialog_in_progress (Lisp_Object in_progress) } DEFUN ("x-file-dialog", Fx_file_dialog, Sx_file_dialog, 2, 5, 0, - doc: /* Read file name, prompting with PROMPT in directory DIR. -Use a file selection dialog. Select DEFAULT-FILENAME in the dialog's file -selection box, if specified. If MUSTMATCH is non-nil, the returned file -or directory must exist. - -This function is only defined on NS, MS Windows, and X Windows with the -Motif or Gtk toolkits. With the Motif toolkit, ONLY-DIR-P is ignored. -Otherwise, if ONLY-DIR-P is non-nil, the user can only select directories. -On Windows 7 and later, the file selection dialog "remembers" the last -directory where the user selected a file, and will open that directory -instead of DIR on subsequent invocations of this function with the same -value of DIR as in previous invocations; this is standard Windows behavior. */) + doc: /* SKIP: real doc in xfns.c. */) (Lisp_Object prompt, Lisp_Object dir, Lisp_Object default_filename, Lisp_Object mustmatch, Lisp_Object only_dir_p) { /* Filter index: 1: All Files, 2: Directories only */ @@ -9242,11 +9067,7 @@ typedef BOOL (WINAPI *GetDiskFreeSpaceExA_Proc) (LPCSTR, PULARGE_INTEGER, PULARGE_INTEGER, PULARGE_INTEGER); DEFUN ("file-system-info", Ffile_system_info, Sfile_system_info, 1, 1, 0, - doc: /* Return storage information about the file system FILENAME is on. -Value is a list of floats (TOTAL FREE AVAIL), where TOTAL is the total -storage of the file system, FREE is the free storage, and AVAIL is the -storage available to a non-superuser. All 3 numbers are in bytes. -If the underlying system call fails, value is nil. */) + doc: /* SKIP: Real doc in fileio.c. */) (Lisp_Object filename) { Lisp_Object encoded, value; @@ -10529,9 +10350,7 @@ bass-down, bass-boost, bass-up, treble-down, treble-up */); #if 0 /* TODO: Mouse cursor customization. */ DEFVAR_LISP ("x-pointer-shape", Vx_pointer_shape, - doc: /* The shape of the pointer when over text. -Changing the value does not affect existing frames -unless you set the mouse color. */); + doc: /* SKIP: real doc in xfns.c. */); Vx_pointer_shape = Qnil; Vx_nontext_pointer_shape = Qnil; @@ -10539,58 +10358,42 @@ unless you set the mouse color. */); Vx_mode_pointer_shape = Qnil; DEFVAR_LISP ("x-hourglass-pointer-shape", Vx_hourglass_pointer_shape, - doc: /* The shape of the pointer when Emacs is busy. -This variable takes effect when you create a new frame -or when you set the mouse color. */); + doc: /* SKIP: real doc in xfns.c. */); Vx_hourglass_pointer_shape = Qnil; DEFVAR_LISP ("x-sensitive-text-pointer-shape", Vx_sensitive_text_pointer_shape, - doc: /* The shape of the pointer when over mouse-sensitive text. -This variable takes effect when you create a new frame -or when you set the mouse color. */); + doc: /* SKIP: real doc in xfns.c. */); Vx_sensitive_text_pointer_shape = Qnil; DEFVAR_LISP ("x-window-horizontal-drag-cursor", Vx_window_horizontal_drag_shape, - doc: /* Pointer shape to use for indicating a window can be dragged horizontally. -This variable takes effect when you create a new frame -or when you set the mouse color. */); + doc: /* SKIP: real doc in xfns.c. */); Vx_window_horizontal_drag_shape = Qnil; DEFVAR_LISP ("x-window-vertical-drag-cursor", Vx_window_vertical_drag_shape, - doc: /* Pointer shape to use for indicating a window can be dragged vertically. -This variable takes effect when you create a new frame -or when you set the mouse color. */); + doc: /* SKIP: real doc in xfns.c. */); Vx_window_vertical_drag_shape = Qnil; #endif DEFVAR_LISP ("x-cursor-fore-pixel", Vx_cursor_fore_pixel, - doc: /* A string indicating the foreground color of the cursor box. */); + doc: /* SKIP: real doc in xfns.c. */); Vx_cursor_fore_pixel = Qnil; DEFVAR_LISP ("x-max-tooltip-size", Vx_max_tooltip_size, - doc: /* Maximum size for tooltips. -Value is a pair (COLUMNS . ROWS). Text larger than this is clipped. */); + doc: /* SKIP: real doc in xfns.c. */); Vx_max_tooltip_size = Fcons (make_number (80), make_number (40)); DEFVAR_LISP ("x-no-window-manager", Vx_no_window_manager, - doc: /* Non-nil if no window manager is in use. -Emacs doesn't try to figure this out; this is always nil -unless you set it to something else. */); + doc: /* SKIP: real doc in xfns.c. */); /* We don't have any way to find this out, so set it to nil and maybe the user would like to set it to t. */ Vx_no_window_manager = Qnil; DEFVAR_LISP ("x-pixel-size-width-font-regexp", Vx_pixel_size_width_font_regexp, - doc: /* Regexp matching a font name whose width is the same as `PIXEL_SIZE'. - -Since Emacs gets width of a font matching with this regexp from -PIXEL_SIZE field of the name, font finding mechanism gets faster for -such a font. This is especially effective for such large fonts as -Chinese, Japanese, and Korean. */); + doc: /* SKIP: real doc in xfns.c. */); Vx_pixel_size_width_font_regexp = Qnil; DEFVAR_LISP ("w32-bdf-filename-alist", diff --git a/src/w32menu.c b/src/w32menu.c index 0cd7284c9b..30ad54db26 100644 --- a/src/w32menu.c +++ b/src/w32menu.c @@ -1571,7 +1571,7 @@ w32_free_menu_strings (HWND hwnd) /* The following is used by delayed window autoselection. */ DEFUN ("menu-or-popup-active-p", Fmenu_or_popup_active_p, Smenu_or_popup_active_p, 0, 0, 0, - doc: /* Return t if a menu or popup dialog is active on selected frame. */) + doc: /* SKIP: real doc in xmenu.c. */) (void) { struct frame *f; diff --git a/src/w32select.c b/src/w32select.c index c451b7ff93..ce062ccfe6 100644 --- a/src/w32select.c +++ b/src/w32select.c @@ -1170,45 +1170,13 @@ syms_of_w32select (void) defsubr (&Sw32_selection_targets); DEFVAR_LISP ("selection-coding-system", Vselection_coding_system, - doc: /* Coding system for communicating with other programs. - -For MS-Windows and MS-DOS: -When sending or receiving text via selection and clipboard, the text -is encoded or decoded by this coding system. The default value is -the current system default encoding on 9x/Me, `utf-16le-dos' -\(Unicode) on NT/W2K/XP, and `iso-latin-1-dos' on MS-DOS. - -For X Windows: -When sending text via selection and clipboard, if the target -data-type matches with the type of this coding system, it is used -for encoding the text. Otherwise (including the case that this -variable is nil), a proper coding system is used as below: - -data-type coding system ---------- ------------- -UTF8_STRING utf-8 -COMPOUND_TEXT compound-text-with-extensions -STRING iso-latin-1 -C_STRING no-conversion - -When receiving text, if this coding system is non-nil, it is used -for decoding regardless of the data-type. If this is nil, a -proper coding system is used according to the data-type as above. - -See also the documentation of the variable `x-select-request-type' how -to control which data-type to request for receiving text. - -The default value is nil. */); + doc: /* SKIP: real doc in select.el. */); /* The actual value is set dynamically in the dumped Emacs, see below. */ Vselection_coding_system = Qnil; DEFVAR_LISP ("next-selection-coding-system", Vnext_selection_coding_system, - doc: /* Coding system for the next communication with other programs. -Usually, `selection-coding-system' is used for communicating with -other programs (X Windows clients or MS Windows programs). But, if this -variable is set, it is used for the next communication only. -After the communication, this variable is set to nil. */); + doc: /* SKIP: real doc in select.el. */); Vnext_selection_coding_system = Qnil; DEFSYM (QCLIPBOARD, "CLIPBOARD"); diff --git a/src/w32term.c b/src/w32term.c index c1d039c137..97afb678c1 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -7329,14 +7329,7 @@ syms_of_w32term (void) DEFSYM (Qrenamed_to, "renamed-to"); DEFVAR_LISP ("x-wait-for-event-timeout", Vx_wait_for_event_timeout, - doc: /* How long to wait for X events. - -Emacs will wait up to this many seconds to receive X events after -making changes which affect the state of the graphical interface. -Under some window managers this can take an indefinite amount of time, -so it is important to limit the wait. - -If set to a non-float value, there will be no wait at all. */); + doc: /* SKIP: real doc in xterm.c. */); Vx_wait_for_event_timeout = make_float (0.1); DEFVAR_INT ("w32-num-mouse-buttons", @@ -7390,28 +7383,16 @@ the cursor have no effect. */); from cus-start.el and other places, like "M-x set-variable". */ DEFVAR_BOOL ("x-use-underline-position-properties", x_use_underline_position_properties, - doc: /* Non-nil means make use of UNDERLINE_POSITION font properties. -A value of nil means ignore them. If you encounter fonts with bogus -UNDERLINE_POSITION font properties, for example 7x13 on XFree prior -to 4.1, set this to nil. You can also use `underline-minimum-offset' -to override the font's UNDERLINE_POSITION for small font display -sizes. */); + doc: /* SKIP: real doc in xterm.c. */); x_use_underline_position_properties = 0; DEFVAR_BOOL ("x-underline-at-descent-line", x_underline_at_descent_line, - doc: /* Non-nil means to draw the underline at the same place as the descent line. -A value of nil means to draw the underline according to the value of the -variable `x-use-underline-position-properties', which is usually at the -baseline level. The default value is nil. */); + doc: /* SKIP: real doc in xterm.c. */); x_underline_at_descent_line = 0; DEFVAR_LISP ("x-toolkit-scroll-bars", Vx_toolkit_scroll_bars, - doc: /* Which toolkit scroll bars Emacs uses, if any. -A value of nil means Emacs doesn't use toolkit scroll bars. -With the X Window system, the value is a symbol describing the -X toolkit. Possible values are: gtk, motif, xaw, or xaw3d. -With MS Windows or Nextstep, the value is t. */); + doc: /* SKIP: real doc in xterm.c. */); Vx_toolkit_scroll_bars = Qt; DEFVAR_BOOL ("w32-unicode-filenames", diff --git a/src/xfns.c b/src/xfns.c index 9f0d9468c1..78151c8138 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -4125,7 +4125,7 @@ x_focus_frame (struct frame *f, bool noactivate) DEFUN ("xw-color-defined-p", Fxw_color_defined_p, Sxw_color_defined_p, 1, 2, 0, - doc: /* Internal function called by `color-defined-p', which see. + doc: /* Internal function called by `color-defined-p'. \(Note that the Nextstep version of this function ignores FRAME.) */) (Lisp_Object color, Lisp_Object frame) { @@ -4141,7 +4141,8 @@ DEFUN ("xw-color-defined-p", Fxw_color_defined_p, Sxw_color_defined_p, 1, 2, 0, } DEFUN ("xw-color-values", Fxw_color_values, Sxw_color_values, 1, 2, 0, - doc: /* Internal function called by `color-values', which see. */) + doc: /* Internal function called by `color-values'. +\(Note that the Nextstep version of this function ignores FRAME.) */) (Lisp_Object color, Lisp_Object frame) { XColor foo; @@ -4156,7 +4157,7 @@ DEFUN ("xw-color-values", Fxw_color_values, Sxw_color_values, 1, 2, 0, } DEFUN ("xw-display-color-p", Fxw_display_color_p, Sxw_display_color_p, 0, 1, 0, - doc: /* Internal function called by `display-color-p', which see. */) + doc: /* Internal function called by `display-color-p'. */) (Lisp_Object terminal) { struct x_display_info *dpyinfo = check_x_display_info (terminal); @@ -4212,6 +4213,7 @@ DEFUN ("x-display-pixel-width", Fx_display_pixel_width, Sx_display_pixel_width, The optional argument TERMINAL specifies which display to ask about. TERMINAL should be a terminal object, a frame or a display name (a string). If omitted or nil, that stands for the selected frame's display. +\(On MS Windows, this function does not accept terminal objects.) On \"multi-monitor\" setups this refers to the pixel width for all physical monitors associated with TERMINAL. To get information for @@ -4229,6 +4231,7 @@ DEFUN ("x-display-pixel-height", Fx_display_pixel_height, The optional argument TERMINAL specifies which display to ask about. TERMINAL should be a terminal object, a frame or a display name (a string). If omitted or nil, that stands for the selected frame's display. +\(On MS Windows, this function does not accept terminal objects.) On \"multi-monitor\" setups this refers to the pixel height for all physical monitors associated with TERMINAL. To get information for @@ -4245,7 +4248,8 @@ DEFUN ("x-display-planes", Fx_display_planes, Sx_display_planes, doc: /* Return the number of bitplanes of the X display TERMINAL. The optional argument TERMINAL specifies which display to ask about. TERMINAL should be a terminal object, a frame or a display name (a string). -If omitted or nil, that stands for the selected frame's display. */) +If omitted or nil, that stands for the selected frame's display. +\(On MS Windows, this function does not accept terminal objects.) */) (Lisp_Object terminal) { struct x_display_info *dpyinfo = check_x_display_info (terminal); @@ -4258,7 +4262,8 @@ DEFUN ("x-display-color-cells", Fx_display_color_cells, Sx_display_color_cells, doc: /* Return the number of color cells of the X display TERMINAL. The optional argument TERMINAL specifies which display to ask about. TERMINAL should be a terminal object, a frame or a display name (a string). -If omitted or nil, that stands for the selected frame's display. */) +If omitted or nil, that stands for the selected frame's display. +\(On MS Windows, this function does not accept terminal objects.) */) (Lisp_Object terminal) { struct x_display_info *dpyinfo = check_x_display_info (terminal); @@ -4282,7 +4287,10 @@ DEFUN ("x-server-max-request-size", Fx_server_max_request_size, doc: /* Return the maximum request size of the X server of display TERMINAL. The optional argument TERMINAL specifies which display to ask about. TERMINAL should be a terminal object, a frame or a display name (a string). -If omitted or nil, that stands for the selected frame's display. */) +If omitted or nil, that stands for the selected frame's display. + +On MS Windows, this function just returns 1. +On Nextstep, this function just returns nil. */) (Lisp_Object terminal) { struct x_display_info *dpyinfo = check_x_display_info (terminal); @@ -4297,8 +4305,8 @@ DEFUN ("x-server-vendor", Fx_server_vendor, Sx_server_vendor, 0, 1, 0, that operating systems cannot be developed and distributed noncommercially.) The optional argument TERMINAL specifies which display to ask about. -For GNU and Unix systems, this queries the X server software; for -MS-Windows, this queries the OS. +For GNU and Unix systems, this queries the X server software. +For MS Windows and Nextstep the result is hard-coded. TERMINAL should be a terminal object, a frame or a display name (a string). If omitted or nil, that stands for the selected frame's display. */) @@ -4318,8 +4326,9 @@ software in use. For GNU and Unix system, the first 2 numbers are the version of the X Protocol used on TERMINAL and the 3rd number is the distributor-specific -release number. For MS-Windows, the 3 numbers report the version and -the build number of the OS. +release number. For MS Windows, the 3 numbers report the OS major and +minor version and build number. For Nextstep, the first 2 numbers are +hard-coded and the 3rd represents the OS version. See also the function `x-server-vendor'. @@ -4339,7 +4348,12 @@ DEFUN ("x-display-screens", Fx_display_screens, Sx_display_screens, 0, 1, 0, doc: /* Return the number of screens on the X server of display TERMINAL. The optional argument TERMINAL specifies which display to ask about. TERMINAL should be a terminal object, a frame or a display name (a string). -If omitted or nil, that stands for the selected frame's display. */) +If omitted or nil, that stands for the selected frame's display. + +On MS Windows, this function just returns 1. +On Nextstep, "screen" is in X terminology, not that of Nextstep. +For the number of physical monitors, use `(length +\(display-monitor-attributes-list TERMINAL))' instead. */) (Lisp_Object terminal) { struct x_display_info *dpyinfo = check_x_display_info (terminal); @@ -4352,6 +4366,7 @@ DEFUN ("x-display-mm-height", Fx_display_mm_height, Sx_display_mm_height, 0, 1, The optional argument TERMINAL specifies which display to ask about. TERMINAL should be a terminal object, a frame or a display name (a string). If omitted or nil, that stands for the selected frame's display. +\(On MS Windows, this function does not accept terminal objects.) On \"multi-monitor\" setups this refers to the height in millimeters for all physical monitors associated with TERMINAL. To get information @@ -4368,6 +4383,7 @@ DEFUN ("x-display-mm-width", Fx_display_mm_width, Sx_display_mm_width, 0, 1, 0, The optional argument TERMINAL specifies which display to ask about. TERMINAL should be a terminal object, a frame or a display name (a string). If omitted or nil, that stands for the selected frame's display. +\(On MS Windows, this function does not accept terminal objects.) On \"multi-monitor\" setups this refers to the width in millimeters for all physical monitors associated with TERMINAL. To get information @@ -4382,10 +4398,13 @@ for each physical monitor, use `display-monitor-attributes-list'. */) DEFUN ("x-display-backing-store", Fx_display_backing_store, Sx_display_backing_store, 0, 1, 0, doc: /* Return an indication of whether X display TERMINAL does backing store. -The value may be `always', `when-mapped', or `not-useful'. The optional argument TERMINAL specifies which display to ask about. TERMINAL should be a terminal object, a frame or a display name (a string). -If omitted or nil, that stands for the selected frame's display. */) +If omitted or nil, that stands for the selected frame's display. + +The value may be `always', `when-mapped', or `not-useful'. +On Nextstep, the value may be `buffered', `retained', or `non-retained'. +On MS Windows, this returns nothing useful. */) (Lisp_Object terminal) { struct x_display_info *dpyinfo = check_x_display_info (terminal); @@ -4417,10 +4436,12 @@ DEFUN ("x-display-visual-class", Fx_display_visual_class, doc: /* Return the visual class of the X display TERMINAL. The value is one of the symbols `static-gray', `gray-scale', `static-color', `pseudo-color', `true-color', or `direct-color'. +\(On MS Windows, the second and last result above are not possible.) The optional argument TERMINAL specifies which display to ask about. TERMINAL should a terminal object, a frame or a display name (a string). -If omitted or nil, that stands for the selected frame's display. */) +If omitted or nil, that stands for the selected frame's display. +\(On MS Windows, this function does not accept terminal objects.) */) (Lisp_Object terminal) { struct x_display_info *dpyinfo = check_x_display_info (terminal); @@ -4458,7 +4479,9 @@ DEFUN ("x-display-save-under", Fx_display_save_under, doc: /* Return t if the X display TERMINAL supports the save-under feature. The optional argument TERMINAL specifies which display to ask about. TERMINAL should be a terminal object, a frame or a display name (a string). -If omitted or nil, that stands for the selected frame's display. */) +If omitted or nil, that stands for the selected frame's display. + +On MS Windows, this just returns nil. */) (Lisp_Object terminal) { struct x_display_info *dpyinfo = check_x_display_info (terminal); @@ -5652,8 +5675,8 @@ DEFUN ("x-close-connection", Fx_close_connection, Sx_close_connection, 1, 1, 0, doc: /* Close the connection to TERMINAL's X server. For TERMINAL, specify a terminal object, a frame or a display name (a -string). If TERMINAL is nil, that stands for the selected frame's -terminal. */) +string). If TERMINAL is nil, that stands for the selected frame's terminal. +\(On MS Windows, this function does not accept terminal objects.) */) (Lisp_Object terminal) { struct x_display_info *dpyinfo = check_x_display_info (terminal); @@ -5926,8 +5949,6 @@ FRAME. The number 0 denotes the root window. If DELETE-P is non-nil, delete the property after retrieving it. If VECTOR-RET-P is non-nil, don't return a string but a vector of values. -On MS Windows, this function accepts but ignores those optional arguments. - Value is nil if FRAME hasn't a property with name PROP or if PROP has no value of TYPE (always string in the MS Windows case). */) (Lisp_Object prop, Lisp_Object frame, Lisp_Object type, @@ -7039,18 +7060,7 @@ clean_up_file_dialog (void *arg) DEFUN ("x-file-dialog", Fx_file_dialog, Sx_file_dialog, 2, 5, 0, - doc: /* Read file name, prompting with PROMPT in directory DIR. -Use a file selection dialog. Select DEFAULT-FILENAME in the dialog's file -selection box, if specified. If MUSTMATCH is non-nil, the returned file -or directory must exist. - -This function is only defined on NS, MS Windows, and X Windows with the -Motif or Gtk toolkits. With the Motif toolkit, ONLY-DIR-P is ignored. -Otherwise, if ONLY-DIR-P is non-nil, the user can only select directories. -On Windows 7 and later, the file selection dialog "remembers" the last -directory where the user selected a file, and will open that directory -instead of DIR on subsequent invocations of this function with the same -value of DIR as in previous invocations; this is standard Windows behavior. */) + doc: /* SKIP: real doc in USE_GTK definition in xfns.c. */) (Lisp_Object prompt, Lisp_Object dir, Lisp_Object default_filename, Lisp_Object mustmatch, Lisp_Object only_dir_p) { @@ -7219,10 +7229,10 @@ or directory must exist. This function is only defined on NS, MS Windows, and X Windows with the Motif or Gtk toolkits. With the Motif toolkit, ONLY-DIR-P is ignored. Otherwise, if ONLY-DIR-P is non-nil, the user can only select directories. -On Windows 7 and later, the file selection dialog "remembers" the last +On MS Windows 7 and later, the file selection dialog "remembers" the last directory where the user selected a file, and will open that directory instead of DIR on subsequent invocations of this function with the same -value of DIR as in previous invocations; this is standard Windows behavior. */) +value of DIR as in previous invocations; this is standard MS Windows behavior. */) (Lisp_Object prompt, Lisp_Object dir, Lisp_Object default_filename, Lisp_Object mustmatch, Lisp_Object only_dir_p) { struct frame *f = SELECTED_FRAME (); @@ -7797,9 +7807,9 @@ unless you set it to something else. */); Vx_pixel_size_width_font_regexp, doc: /* Regexp matching a font name whose width is the same as `PIXEL_SIZE'. -Since Emacs gets width of a font matching with this regexp from -PIXEL_SIZE field of the name, font finding mechanism gets faster for -such a font. This is especially effective for such large fonts as +Since Emacs gets the width of a font matching this regexp from the +PIXEL_SIZE field of the name, the font-finding mechanism gets faster for +such a font. This is especially effective for large fonts such as Chinese, Japanese, and Korean. */); Vx_pixel_size_width_font_regexp = Qnil; diff --git a/src/xmenu.c b/src/xmenu.c index e7ef31ac56..835db9191f 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -278,12 +278,7 @@ popup_get_selection (XEvent *initial_event, struct x_display_info *dpyinfo, } DEFUN ("x-menu-bar-open-internal", Fx_menu_bar_open_internal, Sx_menu_bar_open_internal, 0, 1, "i", - doc: /* Start key navigation of the menu bar in FRAME. -This initially opens the first menu bar item and you can then navigate with the -arrow keys, select a menu entry with the return key or cancel with the -escape key. If FRAME has no menu bar this function does nothing. - -If FRAME is nil or not given, use the selected frame. */) + doc: /* SKIP: real doc in USE_GTK definition in xmenu.c. */) (Lisp_Object frame) { XEvent ev; @@ -2376,7 +2371,8 @@ popup_activated (void) /* The following is used by delayed window autoselection. */ DEFUN ("menu-or-popup-active-p", Fmenu_or_popup_active_p, Smenu_or_popup_active_p, 0, 0, 0, - doc: /* Return t if a menu or popup dialog is active. */) + doc: /* Return t if a menu or popup dialog is active. +\(On MS Windows, this refers to the selected frame.) */) (void) { return (popup_activated ()) ? Qt : Qnil; commit 6c7186de3bbb2b7652cdc01a68bee035761197e5 Author: Glenn Morris Date: Tue Feb 13 14:13:53 2018 -0800 Doc tweak for x-use-underline-position-properties * src/xterm.c (syms_of_xterm) : Remove ancient information from doc. * etc/PROBLEMS: Related edit. diff --git a/etc/PROBLEMS b/etc/PROBLEMS index dedbf80b35..0797176619 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS @@ -783,10 +783,8 @@ frame's parameter list, like this: ** Underlines appear at the wrong position. This is caused by fonts having a wrong UNDERLINE_POSITION property. -Examples are the 7x13 font on XFree86 prior to version 4.1, or the jmk -neep font from the Debian xfonts-jmk package prior to version 3.0.17. -To circumvent this problem, set x-use-underline-position-properties -to nil in your '.emacs'. +To avoid this problem (seen in some very old X releases and font packages), +set x-use-underline-position-properties to nil. To see what is the value of UNDERLINE_POSITION defined by the font, type 'xlsfonts -lll FONT' and look at the font's UNDERLINE_POSITION property. diff --git a/src/xterm.c b/src/xterm.c index deae65d1d8..2371058cd4 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -13242,10 +13242,9 @@ syms_of_xterm (void) x_use_underline_position_properties, doc: /* Non-nil means make use of UNDERLINE_POSITION font properties. A value of nil means ignore them. If you encounter fonts with bogus -UNDERLINE_POSITION font properties, for example 7x13 on XFree prior -to 4.1, set this to nil. You can also use `underline-minimum-offset' -to override the font's UNDERLINE_POSITION for small font display -sizes. */); +UNDERLINE_POSITION font properties, set this to nil. You can also use +`underline-minimum-offset' to override the font's UNDERLINE_POSITION for +small font display sizes. */); x_use_underline_position_properties = true; DEFVAR_BOOL ("x-underline-at-descent-line", commit 98f4e336e879e54251694fa0d47b69d8d325176d Merge: 1d135af78c 333d6f4d99 Author: Glenn Morris Date: Tue Feb 13 09:26:20 2018 -0800 Merge from origin/emacs-26 333d6f4 (origin/emacs-26) More changes in the Emacs manual 52ca0d1 * lisp/vc/vc.el (vc-deduce-backend): Use ignore-errors. 69e8046 Don't signal error in vc-deduce-backend f568c91 * doc/misc/tramp.texi: Index more user options. 92ca881 Minor change in the Emacs manual e055a12 NEWS update about 'string-trim' 96b6e24 Clarify TRAMP process-environment interaction (Bug#30419) 4fa467e * lisp/progmodes/grep.el (grep-num-matches-found): New variable. a22820a Avoid aborts in cm.c due to too small TTY frame 26f6441 Another set of improvements in the Emacs manual cef3b42 Fix help in mode-line-mode-menu f8a493c Improve documentation of desktop restoring 10637af Improve the Emacs manual's chapter "Frames" d924953 Fix unbound mm-uu-entry in mm-uu cb2487b Improve Emacs user manual in fixit.texi 66e9527 Another minor change in the manual 6a1c03d More minor changes in the Emacs manual 32fb8c4 Avoid printing garbled error message from image.el Conflicts: etc/NEWS lisp/image.el commit 333d6f4d99a80f30ae6cd3880b9d9ec38a85691b Author: Eli Zaretskii Date: Tue Feb 13 19:12:37 2018 +0200 More changes in the Emacs manual * doc/emacs/search.texi (Regexp Backslash): Say that symbol-constituent characters are determined by the syntax table. (Lax Search): Fix example of case-insensitive search. Fix a typo. (Unconditional Replace): Improve wording. (Regexp Replace): More consistent wording. Reported by Michael Albinus in emacs-manual-bugs@gnu.org. * doc/emacs/msdos.texi (Windows HOME): Avoid enumerating all the Windows versions. Reported by Isaac Carter in emacs-manual-bugs@gnu.org. diff --git a/doc/emacs/msdos.texi b/doc/emacs/msdos.texi index 032e82eb62..dd368adb54 100644 --- a/doc/emacs/msdos.texi +++ b/doc/emacs/msdos.texi @@ -430,9 +430,9 @@ names, which might cause misalignment of columns in Dired display. The Windows equivalent of @code{HOME} is the @dfn{user-specific application data directory}. The actual location depends on the Windows version; typical values are @file{C:\Documents and -Settings\@var{username}\Application Data} on Windows 2000/XP/2K3, -@file{C:\Users\@var{username}\AppData\Roaming} on Windows -Vista/7/2008, and either @file{C:\WINDOWS\Application Data} or +Settings\@var{username}\Application Data} on Windows 2000 up to XP, +@file{C:\Users\@var{username}\AppData\Roaming} on Windows Vista and +later, and either @file{C:\WINDOWS\Application Data} or @file{C:\WINDOWS\Profiles\@var{username}\Application Data} on Windows 9X/ME@. If this directory does not exist or cannot be accessed, Emacs falls back to @file{C:\} as the default value of @code{HOME}. diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi index c0adab497b..51a0685197 100644 --- a/doc/emacs/search.texi +++ b/doc/emacs/search.texi @@ -1114,7 +1114,8 @@ matches the empty string, but only at the beginning of a symbol. A symbol is a sequence of one or more symbol-constituent characters. A symbol-constituent character is a character whose syntax is either @samp{w} or @samp{_}. @samp{\_<} matches at the beginning of the -buffer only if a symbol-constituent character follows. +buffer only if a symbol-constituent character follows. As with words, +the syntax table determines which characters are symbol-constituent. @item \_> matches the empty string, but only at the end of a symbol. @samp{\_>} @@ -1214,7 +1215,7 @@ search string matches exactly one space. Searches in Emacs by default ignore the case of the text they are searching through, if you specify the search string in lower case. Thus, if you specify searching for @samp{foo}, then @samp{Foo} and -@samp{foo} also match. Regexps, and in particular character sets, +@samp{fOO} also match. Regexps, and in particular character sets, behave likewise: @samp{[ab]} matches @samp{a} or @samp{A} or @samp{b} or @samp{B}. This feature is known as @dfn{case folding}, and it is supported in both incremental and non-incremental search modes. @@ -1226,9 +1227,9 @@ case-sensitive. Thus, searching for @samp{Foo} does not find as well as to literal string search. The effect ceases if you delete the upper-case letter from the search string. The variable @code{search-upper-case} controls this: if it is non-@code{nil} (the -default), an upper-case character in the search string make the search -case-sensitive; setting it to @code{nil} disables this effect of -upper-case characters. +default), an upper-case character in the search string makes the +search case-sensitive; setting it to @code{nil} disables this effect +of upper-case characters. @vindex case-fold-search If you set the variable @code{case-fold-search} to @code{nil}, then @@ -1349,7 +1350,7 @@ activating the mark; use @kbd{C-u C-@key{SPC}} to move back there. surrounded by word boundaries. @xref{Replacement and Lax Matches}, for details about -case-sensitivity in replace commands. +case-sensitivity and character folding in replace commands. @node Regexp Replace @subsection Regexp Replacement @@ -1411,13 +1412,14 @@ symbol name goes with the symbol name, so the value replaces them both. Inside such an expression, you can use some special sequences. -@samp{\&} and @samp{\@var{n}} refer here, as usual, to the entire -match as a string, and to a submatch as a string. @var{n} may be -multiple digits, and the value of @samp{\@var{n}} is @code{nil} if -subexpression @var{n} did not match. You can also use @samp{\#&} and -@samp{\#@var{n}} to refer to those matches as numbers (this is valid -when the match or submatch has the form of a numeral). @samp{\#} here -too stands for the number of already-completed replacements. +@samp{\&} and @samp{\@var{d}} refer here, as usual, to the entire +match as a string, and to a submatch as a string. @var{d} may be +multiple digits, and the value of @samp{\@var{d}} is @code{nil} if the +@var{d}'th parenthesized grouping did not match. You can also use +@samp{\#&} and @samp{\#@var{d}} to refer to those matches as numbers +(this is valid when the match or submatch has the form of a numeral). +@samp{\#} here too stands for the number of already-completed +replacements. Repeating our example to exchange @samp{x} and @samp{y}, we can thus do it also this way: commit 52ca0d1a3e01a3af8b482bd1f174f48a5c0b1fa2 Author: Andreas Schwab Date: Tue Feb 13 14:05:20 2018 +0100 * lisp/vc/vc.el (vc-deduce-backend): Use ignore-errors. diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index e767deace2..a0b4cc9271 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -996,9 +996,7 @@ Within directories, only files already under version control are noticed." ((derived-mode-p 'diff-mode) diff-vc-backend) ;; Maybe we could even use comint-mode rather than shell-mode? ((derived-mode-p 'dired-mode 'shell-mode 'compilation-mode) - (condition-case nil - (vc-responsible-backend default-directory) - (error nil))) + (ignore-errors (vc-responsible-backend default-directory))) (vc-mode (vc-backend buffer-file-name)))) (declare-function vc-dir-current-file "vc-dir" ()) commit 69e804669bacfef05c1ecdcd3f664dd486273db4 Author: Andreas Schwab Date: Tue Feb 13 12:13:27 2018 +0100 Don't signal error in vc-deduce-backend * lisp/vc/vc.el (vc-deduce-backend): Return nil if vc-responsible-backend signals an error. diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 6516c91de3..e767deace2 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -996,7 +996,9 @@ Within directories, only files already under version control are noticed." ((derived-mode-p 'diff-mode) diff-vc-backend) ;; Maybe we could even use comint-mode rather than shell-mode? ((derived-mode-p 'dired-mode 'shell-mode 'compilation-mode) - (vc-responsible-backend default-directory)) + (condition-case nil + (vc-responsible-backend default-directory) + (error nil))) (vc-mode (vc-backend buffer-file-name)))) (declare-function vc-dir-current-file "vc-dir" ()) commit f568c916b6d1e20e18fced8d773aa8f86e7c576f Author: Michael Albinus Date: Tue Feb 13 08:35:50 2018 +0100 * doc/misc/tramp.texi: Index more user options. diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index 8bb34e2c56..161f48ca3c 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi @@ -670,6 +670,7 @@ In case both @command{mimencode} and @command{uuencode} are unavailable, @value{tramp} first transfers a small Perl program to the remote host, and then tries that program for encoding and decoding. +@vindex tramp-inline-compress-start-size To increase transfer speeds for large text files, use compression before encoding. The user option @option{tramp-inline-compress-start-size} specifies the file size for @@ -1020,6 +1021,7 @@ can. @cindex adb method @cindex android (with adb method) +@vindex tramp-adb-program This method uses Android Debug Bridge program for accessing Android devices. The Android Debug Bridge must be installed locally for @value{tramp} to work. Some GNU/Linux distributions provide Android @@ -1028,6 +1030,7 @@ is installed as part of the Android SDK@. @value{tramp} finds the @command{adb} program either via the @env{PATH} environment variable or the absolute path set in the user option @option{tramp-adb-program}. +@vindex tramp-adb-connect-if-not-connected @value{tramp} connects to Android devices with @option{adb} only when the user option @option{tramp-adb-connect-if-not-connected} is not @code{nil}. Otherwise, the connection must be established outside @@ -1678,6 +1681,7 @@ Set @code{password-cache} to @code{nil} to disable password caching. @cindex caching @vindex tramp-persistency-file-name +@vindex tramp-persistency-file-name For faster initial connection times, @value{tramp} stores previous connection properties in a file specified by the user option @option{tramp-persistency-file-name}. @@ -1880,6 +1884,7 @@ prompts, for which @value{tramp} uses @option{tramp-wrong-passwd-regexp}. @cindex tset unix command @vindex tramp-terminal-type +@vindex tramp-terminal-type To suppress inappropriate prompts for terminal type, @value{tramp} sets the @env{TERM} to @code{dumb} before the remote login process begins via the user option @option{tramp-terminal-type}. This will @@ -2153,6 +2158,8 @@ Disabling backups can be targeted to just the @option{su} and @end group @end lisp +@vindex backup-directory-alist +@vindex tramp-backup-directory-alist Another option is to create better backup file naming with user and host names prefixed to the file name. For example, transforming @file{/etc/secretfile} to @@ -2186,6 +2193,7 @@ The backup file name of @file{@trampfn{su,root@@localhost,~/.emacs.d/backups/![su!root@@localhost]!etc!secretfile~}} @end ifset +@vindex auto-save-file-name-transforms Just as for backup files, similar issues of file naming affect auto-saving @value{tramp} files. Auto-saved files are saved in the directory specified by the user option @@ -2197,6 +2205,7 @@ compiled. Reset such values to a valid directory. Set @option{auto-save-file-name-transforms} to @code{nil} to save auto-saved files to the same directory as the original file. +@vindex tramp-auto-save-directory Alternatively, set the user option @option{tramp-auto-save-directory} to direct all auto saves to that location. @@ -3284,6 +3293,7 @@ the following code in @file{~/.emacs} file. How to get a Visual Warning when working with @samp{root} privileges? Host indication in the mode line? +@vindex tramp-theme-face-remapping-alist Install @file{tramp-theme} from GNU ELPA via Emacs' Package Manager. Enable it via @kbd{M-x load-theme @key{RET} tramp}. Further customization is explained in user option @@ -3311,10 +3321,11 @@ then set them with a hook as follows: @item Why is @file{~/.sh_history} file on the remote host growing? +@vindex tramp-histfile-override Due to the remote shell saving tilde expansions triggered by @value{tramp}, the history file is probably growing rapidly. @value{tramp} can suppress this behaviour with the user option -@code{tramp-histfile-override}. When set to @code{t}, environment +@option{tramp-histfile-override}. When set to @code{t}, environment variable @env{HISTFILE} is unset, and environment variables @env{HISTFILESIZE} @env{HISTSIZE} are set to 0. commit 92ca881dc83617a53fb057bcb9e91877cc848f9a Author: Eli Zaretskii Date: Tue Feb 13 07:59:26 2018 +0200 Minor change in the Emacs manual * doc/emacs/building.texi (Lisp Libraries): Explain why nil in load-path is not a good idea. Suggested by James Yoo in emacs-manual-bugs@gnu.org. diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi index f2819c67c5..878d2f53d5 100644 --- a/doc/emacs/building.texi +++ b/doc/emacs/building.texi @@ -1410,12 +1410,13 @@ Loading,,, elisp, the Emacs Lisp Reference Manual}. @code{load-path}. Its value should be a list of directories (strings). These directories are searched, in the specified order, by the @kbd{M-x load-library} command, the lower-level @code{load} -function, and other Emacs functions that find Emacs Lisp libraries. A -list entry in @code{load-path} can also have the special value +function, and other Emacs functions that find Emacs Lisp libraries. +An entry in @code{load-path} can also have the special value @code{nil}, which stands for the current default directory, but it is -almost always a bad idea to use this. (If you find yourself wishing -that @code{nil} were in the list, most likely what you really want is -to use @kbd{M-x load-file}.) +almost always a bad idea to use this, because its meaning will depend +on the buffer that is current when @code{load-path} is used by Emacs. +(If you find yourself wishing that @code{nil} were in the list, most +likely what you really want is to use @kbd{M-x load-file}.) The default value of @code{load-path} is a list of directories where the Lisp code for Emacs itself is stored. If you have libraries of commit e055a12839b7b41f76f553dfaf13ca9202a5f5af Author: Eli Zaretskii Date: Tue Feb 13 07:49:30 2018 +0200 NEWS update about 'string-trim' * etc/NEWS: Mention changes in string-trim family of functions. (Bug#30442) diff --git a/etc/NEWS b/etc/NEWS index 00ff9cda8e..a8880d0f32 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1714,7 +1714,13 @@ t for all Emacs integers N. --- ** Calls that accept floating-point integers (for use on hosts with limited integer range) now signal an error if arguments are not -integral. For example '(decode-char 'ascii 0.5)' now signals an error. +integral. For example '(decode-char 'ascii 0.5)' now signals an +error. + +--- +** Functions 'string-trim-left', 'string-trim-right' and 'string-trim' +now accept optional arguments which specify the regexp of a substring +to trim. +++ ** The new function 'char-from-name' converts a Unicode name string commit 96b6e243ec006b6c69642506a4f470aa5878e299 Author: Noam Postavsky Date: Sun Feb 11 09:20:29 2018 -0500 Clarify TRAMP process-environment interaction (Bug#30419) * doc/misc/tramp.texi (Remote processes): Index the tramp-remote-process-environment description. Clarify the effects of let-binding process-environment and the motivation for that behavior. diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index 25ae8ae3e8..8bb34e2c56 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi @@ -2596,6 +2596,7 @@ upon first connection. Alternatively, use an absolute path or extend @end group @end lisp +@vindex tramp-remote-process-environment Customize user option @option{tramp-remote-process-environment} to suit the remote program's environment for the remote host. @option{tramp-remote-process-environment} is a list of strings @@ -2641,11 +2642,13 @@ this. You could overwrite this behavior by evaluating @end group @end lisp -@value{tramp} does not use the defaults specified in -@code{process-environment} for running @code{process-file} or -@code{start-file-process} on remote hosts. When values from -@code{process-environment} are needed for remote processes, then set -them as follows: +In addition to @option{tramp-remote-process-environment}, you can set +environment variables for invidivual remote process calls by +let-binding @code{process-environment}. @value{tramp} will apply any +entries which are not present in the global default value of +@code{process-environment} (overriding +@option{tramp-remote-process-environment} settings, if they conflict). +For example: @lisp @group @@ -2654,8 +2657,10 @@ them as follows: @end group @end lisp -This works only for environment variables not already set in the -@code{process-environment}. +Let-binding in this way works regardless of whether the process to be +called is local or remote, since @value{tramp} would add just the +@env{HGPLAIN} setting and local processes would take whole value of +@code{process-environment} along with the new value of @env{HGPLAIN}. For integrating other Emacs packages so @value{tramp} can execute remotely, please file a bug report. @xref{Bug Reports}. commit 4fa467eefa6c8ef97a4e1526c809cdabeba98878 Author: Juri Linkov Date: Mon Feb 12 23:39:28 2018 +0200 * lisp/progmodes/grep.el (grep-num-matches-found): New variable. (grep-mode-line-matches): New defconst. (grep-mode-font-lock-keywords): Update the regexp for “Grep finished” to include the number of matches found. (grep-process-setup): Set grep-num-matches-found to 0. (grep-exit-message): New function with body moved from lambda in grep-process-setup. Use grep-num-matches-found to return the number of matches found. (grep-filter): Increment grep-num-matches-found. (grep-mode): Set compilation-mode-line-errors to grep-mode-line-matches. (Bug#30397, bug#14017) diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index 9ce4ff8462..14e251e066 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el @@ -425,6 +425,14 @@ See `compilation-error-regexp-alist' for format details.") (defvar grep-context-face 'shadow "Face name to use for grep context lines.") +(defvar grep-num-matches-found 0) + +(defconst grep-mode-line-matches + `(" [" (:propertize (:eval (int-to-string grep-num-matches-found)) + face ,grep-hit-face + help-echo "Number of matches so far") + "]")) + (defvar grep-mode-font-lock-keywords '(;; Command output lines. (": \\(.+\\): \\(?:Permission denied\\|No such \\(?:file or directory\\|device or address\\)\\)$" @@ -432,7 +440,7 @@ See `compilation-error-regexp-alist' for format details.") ;; remove match from grep-regexp-alist before fontifying ("^Grep[/a-zA-z]* started.*" (0 '(face nil compilation-message nil help-echo nil mouse-face nil) t)) - ("^Grep[/a-zA-z]* finished \\(?:(\\(matches found\\))\\|with \\(no matches found\\)\\).*" + ("^Grep[/a-zA-z]* finished with \\(?:\\(\\(?:[0-9]+ \\)?matches found\\)\\|\\(no matches found\\)\\).*" (0 '(face nil compilation-message nil help-echo nil mouse-face nil) t) (1 compilation-info-face nil t) (2 compilation-warning-face nil t)) @@ -503,21 +511,28 @@ Set up `compilation-exit-message-function' and run `grep-setup-hook'." (setenv "GREP_COLOR" "01;31") ;; GREP_COLORS is used in GNU grep 2.5.2 and later versions (setenv "GREP_COLORS" "mt=01;31:fn=:ln=:bn=:se=:sl=:cx=:ne")) + (setq-local grep-num-matches-found 0) (set (make-local-variable 'compilation-exit-message-function) - (lambda (status code msg) - (if (eq status 'exit) - ;; This relies on the fact that `compilation-start' - ;; sets buffer-modified to nil before running the command, - ;; so the buffer is still unmodified if there is no output. - (cond ((and (zerop code) (buffer-modified-p)) - '("finished (matches found)\n" . "matched")) - ((not (buffer-modified-p)) - '("finished with no matches found\n" . "no match")) - (t - (cons msg code))) - (cons msg code)))) + 'grep-exit-message) (run-hooks 'grep-setup-hook)) +(defun grep-exit-message (status code msg) + "Return a status message for grep results." + (if (eq status 'exit) + ;; This relies on the fact that `compilation-start' + ;; sets buffer-modified to nil before running the command, + ;; so the buffer is still unmodified if there is no output. + (cond ((and (zerop code) (buffer-modified-p)) + (if (> grep-num-matches-found 0) + (cons (format "finished with %d matches found\n" grep-num-matches-found) + "matched") + '("finished with matches found\n" . "matched"))) + ((not (buffer-modified-p)) + '("finished with no matches found\n" . "no match")) + (t + (cons msg code))) + (cons msg code))) + (defun grep-filter () "Handle match highlighting escape sequences inserted by the grep process. This function is called from `compilation-filter-hook'." @@ -535,7 +550,8 @@ This function is called from `compilation-filter-hook'." (while (re-search-forward "\033\\[0?1;31m\\(.*?\\)\033\\[[0-9]*m" end 1) (replace-match (propertize (match-string 1) 'face nil 'font-lock-face grep-match-face) - t t)) + t t) + (cl-incf grep-num-matches-found)) ;; Delete all remaining escape sequences (goto-char beg) (while (re-search-forward "\033\\[[0-9;]*[mK]" end 1) @@ -775,6 +791,8 @@ This function is called from `compilation-filter-hook'." grep-hit-face) (set (make-local-variable 'compilation-error-regexp-alist) grep-regexp-alist) + (set (make-local-variable 'compilation-mode-line-errors) + grep-mode-line-matches) ;; compilation-directory-matcher can't be nil, so we set it to a regexp that ;; can never match. (set (make-local-variable 'compilation-directory-matcher) '("\\`a\\`")) commit a22820a31c191451334eec101125f7b621d6dbc0 Author: Eli Zaretskii Date: Mon Feb 12 20:02:36 2018 +0200 Avoid aborts in cm.c due to too small TTY frame * src/frame.c (frame_windows_min_size): Limit TTY frames to a minimum height large enough to allow for a menu bar, the mode line, one text line and one echo-area line. This avoids aborts in cm.c:cmcheckmagic. (Bug#30320) diff --git a/src/frame.c b/src/frame.c index d5b080d688..a86f05191a 100644 --- a/src/frame.c +++ b/src/frame.c @@ -341,7 +341,9 @@ DEFUN ("frame-windows-min-size", Fframe_windows_min_size, * of `window-min-height' (`window-min-width' if HORIZONTAL is non-nil). * With IGNORE non-nil the values of these variables are ignored. * - * In either case, never return a value less than 1. + * In either case, never return a value less than 1. For TTY frames, + * additionally limit the minimum frame height to a value large enough + * to support the menu bar, the mode line, and the echo area. */ static int frame_windows_min_size (Lisp_Object frame, Lisp_Object horizontal, @@ -349,6 +351,7 @@ frame_windows_min_size (Lisp_Object frame, Lisp_Object horizontal, { struct frame *f = XFRAME (frame); Lisp_Object par_size; + int retval; if ((!NILP (horizontal) && NUMBERP (par_size = get_frame_param (f, Qmin_width))) @@ -361,15 +364,27 @@ frame_windows_min_size (Lisp_Object frame, Lisp_Object horizontal, if (min_size < 1) min_size = 1; - return (NILP (pixelwise) - ? min_size - : min_size * (NILP (horizontal) - ? FRAME_LINE_HEIGHT (f) - : FRAME_COLUMN_WIDTH (f))); + retval = (NILP (pixelwise) + ? min_size + : min_size * (NILP (horizontal) + ? FRAME_LINE_HEIGHT (f) + : FRAME_COLUMN_WIDTH (f))); } else - return XINT (call4 (Qframe_windows_min_size, frame, horizontal, - ignore, pixelwise)); + retval = XINT (call4 (Qframe_windows_min_size, frame, horizontal, + ignore, pixelwise)); + /* Don't allow too small height of text-mode frames, or else cm.c + might abort in cmcheckmagic. */ + if ((FRAME_TERMCAP_P (f) || FRAME_MSDOS_P (f)) && NILP (horizontal)) + { + int min_height = (FRAME_MENU_BAR_LINES (f) + + FRAME_WANTS_MODELINE_P (f) + + 2); /* one text line and one echo-area line */ + if (retval < min_height) + retval = min_height; + } + + return retval; } commit 26f64410fd6845cde1a06373eea05e256b87513d Author: Eli Zaretskii Date: Mon Feb 12 19:52:48 2018 +0200 Another set of improvements in the Emacs manual * doc/emacs/msdos-xtra.texi (MS-DOS Keyboard): * doc/emacs/msdos.texi (Windows Keyboard): * doc/emacs/mark.texi (Using Region): * doc/emacs/frames.texi (Menu Mouse Clicks): * doc/emacs/macos.texi (Mac / GNUstep Basics): Fix spelling of keys. Reported by Michael Albinus in emacs-manual-bugs@gnu.org. * doc/emacs/glossary.texi (Glossary): Document that "c.f." is a misspelling. Reported by Robert Pluim . Various minor wording improvements. Suggested by Toon Claes in emacs-manual-bugs@gnu.org. More minor changes. Suggested by Michael Albinus in emacs-manual-bugs@gnu.org. * doc/emacs/cmdargs.texi (Title X): Improve wording. * doc/emacs/building.texi (Grep Searching, Compilation): Avoid passive tense. * doc/emacs/basic.texi (Moving Point): Move the description of the bidi-related effects of the arrow keys from here ... * doc/emacs/mule.texi (Bidirectional Editing): ... to here. Explain the behavior of arrow keys between paragraphs. diff --git a/doc/emacs/basic.texi b/doc/emacs/basic.texi index 8a8298bc2c..4db3855dd9 100644 --- a/doc/emacs/basic.texi +++ b/doc/emacs/basic.texi @@ -184,18 +184,8 @@ Move forward one character (@code{forward-char}). @item @key{RIGHT} @kindex RIGHT @findex right-char -@vindex visual-order-cursor-movement -@cindex cursor, visual-order motion -This command (@code{right-char}) behaves like @kbd{C-f}, with one -exception: when editing right-to-left scripts such as Arabic, it -instead moves @emph{backward} if the current paragraph is a -right-to-left paragraph. @xref{Bidirectional Editing}. - -If @code{visual-order-cursor-movement} is non-@code{nil}, this command -moves to the character that is to the right of the current screen -position, moving to the next or previous screen line as appropriate. -Note that this might potentially move point many buffer positions -away, depending on the surrounding bidirectional context. +This command (@code{right-char}) behaves like @kbd{C-f}, except when +point is in a right-to-left paragraph (@pxref{Bidirectional Editing}). @item C-b @kindex C-b @@ -205,12 +195,8 @@ Move backward one character (@code{backward-char}). @item @key{LEFT} @kindex LEFT @findex left-char -This command (@code{left-char}) behaves like @kbd{C-b}, except it -moves @emph{forward} if the current paragraph is right-to-left. -@xref{Bidirectional Editing}. - -The variable @code{visual-order-cursor-movement} affects this like -@key{RIGHT}, but moving left instead of right on the screen. +This command (@code{left-char}) behaves like @kbd{C-b}, except if the +current paragraph is right-to-left (@pxref{Bidirectional Editing}). @item C-n @itemx @key{DOWN} diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi index f61e333577..f2819c67c5 100644 --- a/doc/emacs/building.texi +++ b/doc/emacs/building.texi @@ -90,9 +90,9 @@ inserted above point, which remains at the end. Otherwise, point remains fixed while compilation output is added at the end of the buffer. - While compilation proceeds, the mode line is updated to show the -number of errors, warnings, and informational messages that have been -seen so far. + While compilation proceeds, the mode line shows the number of +errors, warnings, and informational messages emitted by the compiler +so far. @cindex compilation buffer, keeping point at end @vindex compilation-scroll-output @@ -384,16 +384,16 @@ grep -nH -e foo *.el | grep bar | grep toto can find the corresponding lines in the original files using @w{@kbd{C-x `}}, @key{RET}, and so forth, just like compilation errors. - As with compilation commands (@pxref{Compilation}), while the grep -command runs, the mode line is updated to show the number of matches -that have been seen so far. - Some grep programs accept a @samp{--color} option to output special markers around matches for the purpose of highlighting. You can make use of this feature by setting @code{grep-highlight-matches} to @code{t}. When displaying a match in the source buffer, the exact match will be highlighted, instead of the entire source line. + As with compilation commands (@pxref{Compilation}), while the grep +command runs, the mode line shows the running number of matches found +and highlighted so far. + The @command{grep} commands will offer to save buffers before running. This is controlled by the @code{grep-save-buffers} variable. The possible values are either @code{nil} (don't save), @code{ask} diff --git a/doc/emacs/cmdargs.texi b/doc/emacs/cmdargs.texi index e463e7c819..d18de8e7a0 100644 --- a/doc/emacs/cmdargs.texi +++ b/doc/emacs/cmdargs.texi @@ -1104,15 +1104,14 @@ border is 2. @node Title X @appendixsec Frame Titles - An Emacs frame may or may not have a specified title. The frame -title, if specified, appears in window decorations and icons as the -name of the frame. If an Emacs frame has no specified title, the -default title has the form @samp{@var{invocation-name}@@@var{machine}} -(if there is only one frame) or the selected window's buffer name (if -there is more than one frame). - - You can specify a title for the initial Emacs frame with a command -line option: + Each Emacs frame always has a title, which appears in window +decorations and icons as the name of the frame. The default title is +of the form @samp{@var{invocation-name}@@@var{machine}} (if there is +only one frame) or shows the selected window's buffer name (if there +is more than one frame). + + You can specify a non-default title for the initial Emacs frame with +a command line option: @table @samp @item -T @var{title} diff --git a/doc/emacs/frames.texi b/doc/emacs/frames.texi index 2c1a55b7dc..b2ec5746a0 100644 --- a/doc/emacs/frames.texi +++ b/doc/emacs/frames.texi @@ -312,7 +312,7 @@ button. @node Menu Mouse Clicks @section Mouse Clicks for Menus - Several mouse clicks with the @key{CTRL} and @key{SHIFT} modifiers + Several mouse clicks with the @key{Ctrl} and @key{SHIFT} modifiers bring up menus. @table @kbd diff --git a/doc/emacs/glossary.texi b/doc/emacs/glossary.texi index 7a34692dc5..a9120194a4 100644 --- a/doc/emacs/glossary.texi +++ b/doc/emacs/glossary.texi @@ -24,7 +24,7 @@ Setting the mark (q.v.@:) at a position in the text also activates it. When the mark is active, we call the region an active region. @xref{Mark}. -@item Alt +@item @key{Alt} Alt is the name of a modifier bit that a keyboard input character may have. To make a character Alt, type it while holding down the @key{Alt} key. Such characters are given names that start with @kbd{@key{Alt}-} @@ -160,10 +160,11 @@ right away when you press down on a mouse button. @xref{Mouse Buttons}. @item Byte Compilation @xref{Glossary---Compilation}. -@item c.f. -@itemx cf. +@item cf. +@itemx c.f. Short for ``confer'' in Latin, which means ``compare with'' or -``compare to''. +``compare to''. The second variant, ``c.f.'', is a widespread +misspelling. @anchor{Glossary---C-} @item @kbd{C-} @@ -192,7 +193,7 @@ other input events as well). @xref{User Input}. @item Character Folding Character folding means ignoring differences between similarly looking -characters, such as between @code{a}, and @code{@:a} and @code{@'a}. +characters, such as between @code{a}, and @code{@"a} and @code{@'a}. Emacs performs character folding by default in text search. @xref{Lax Search}. @@ -225,14 +226,16 @@ text to or from a variety of coding systems when reading or writing it. @xref{Coding Systems}. @item Command -A command is a Lisp function specially defined to be able to serve as a -key binding in Emacs. 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}. +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}. @item Command History @xref{Glossary---Minibuffer History}. +@anchor{Glossary---Command Name} @item Command Name A command name is the name of a Lisp symbol that is a command (@pxref{Commands}). You can invoke any command by its name using @@ -255,7 +258,8 @@ Compilation is the process of creating an executable program from source code. Emacs has commands for compiling files of Emacs Lisp code (@pxref{Byte Compilation,,, elisp, the Emacs Lisp Reference Manual}) and programs in C and other languages -(@pxref{Compilation}). +(@pxref{Compilation}). Byte-compiled Emacs Lisp code loads and +executes faster. @item Complete Key A complete key is a key sequence that fully specifies one action to be @@ -875,7 +879,7 @@ A local value of a variable (q.v.@:) applies to only one buffer. @xref{Locals}. @item @kbd{M-} -@kbd{M-} in the name of a character is an abbreviation for @key{Meta}, +@kbd{M-} in the name of a character is an abbreviation for @key{META}, one of the modifier keys that can accompany any character. @xref{User Input,M-}. @@ -933,15 +937,15 @@ a keyboard interface to navigate it. @xref{Menu Bars}. @item Meta Meta is the name of a modifier bit which you can use in a command -character. To enter a meta character, you hold down the @key{Meta} +character. To enter a meta character, you hold down the @key{META} key while typing the character. We refer to such characters with names that start with @kbd{Meta-} (usually written @kbd{M-} for -short). For example, @kbd{M-<} is typed by holding down @key{Meta} +short). For example, @kbd{M-<} is typed by holding down @key{META} and at the same time typing @kbd{<} (which itself is done, on most terminals, by holding down @key{SHIFT} and typing @kbd{,}). @xref{User Input,Meta}. -On some terminals, the @key{Meta} key is actually labeled @key{Alt} +On some terminals, the @key{META} key is actually labeled @key{Alt} or @key{Edit}. @item Meta Character @@ -1139,8 +1143,8 @@ one corner and putting the mark at the diagonally opposite corner. A recursive editing level is a state in which part of the execution of a command involves asking you to edit some text. This text may or may not be the same as the text to which the command was applied. -The mode line indicates recursive editing levels with square brackets -(@samp{[} and @samp{]}). @xref{Recursive Edit}. +The mode line (q.v.@:) indicates recursive editing levels with square +brackets (@samp{[} and @samp{]}). @xref{Recursive Edit}. @item Redisplay Redisplay is the process of correcting the image on the screen to @@ -1168,7 +1172,7 @@ digits. @xref{Regexps}. @item Remote File A remote file is a file that is stored on a system other than your own. Emacs can access files on other computers provided that they are -connected to the same network as your machine, and (obviously) that +reachable from your machine over the network, and (obviously) that you have a supported method to gain access to those files. @xref{Remote Files}. @@ -1190,8 +1194,9 @@ newline into the text. It is also used to terminate most arguments read in the minibuffer (q.v.). @xref{User Input,Return}. @item Reverting -Reverting means returning to the original state. Emacs lets you -revert a buffer by re-reading its file from disk. @xref{Reverting}. +Reverting means returning to the original state. For example, Emacs +lets you revert a buffer by re-reading its file from disk. +@xref{Reverting}. @c Seems too obvious, also there is nothing special about the format @c these days. @@ -1363,6 +1368,7 @@ Emacs does not make a termscript file unless you tell it to. @xref{Bugs}. @item Text + ``Text'' has two meanings (@pxref{Text}): @itemize @bullet @@ -1371,6 +1377,7 @@ Data consisting of a sequence of characters, as opposed to binary numbers, executable programs, and the like. The basic contents of an Emacs buffer (aside from the text properties, q.v.@:) are always text in this sense. + @item Data consisting of written human language (as opposed to programs), or following the stylistic conventions of human language. @@ -1473,7 +1480,7 @@ where they can be edited. @xref{Visiting}. @item Whitespace Whitespace is any run of consecutive formatting characters (space, -tab, newline, and backspace). +tab, newline, backspace, etc.). @item Widening Widening is removing any restriction (q.v.@:) on the current buffer; diff --git a/doc/emacs/macos.texi b/doc/emacs/macos.texi index 28a5f9041a..bf37d67b64 100644 --- a/doc/emacs/macos.texi +++ b/doc/emacs/macos.texi @@ -34,8 +34,8 @@ Support}), but we hope to improve it in the future. @node Mac / GNUstep Basics @section Basic Emacs usage under macOS and GNUstep - By default, the @key{alt} and @key{option} keys are the same as -@key{Meta}. The Mac @key{Cmd} key is the same as @key{Super}, and + By default, the @key{Alt} and @key{Option} keys are the same as +@key{META}. The Mac @key{Cmd} key is the same as @key{Super}, and Emacs provides a set of key bindings using this modifier key that mimic other Mac / GNUstep applications (@pxref{Mac / GNUstep Events}). You can change these bindings in the usual way (@pxref{Key Bindings}). @@ -43,7 +43,7 @@ can change these bindings in the usual way (@pxref{Key Bindings}). @vindex ns-alternate-modifier @vindex ns-right-alternate-modifier The variable @code{ns-right-alternate-modifier} controls the -behavior of the right @key{alt} and @key{option} keys. These keys +behavior of the right @key{Alt} and @key{Option} keys. These keys behave like the left-hand keys if the value is @code{left} (the default). A value of @code{control}, @code{meta}, @code{alt}, @code{super}, or @code{hyper} makes them behave like the corresponding diff --git a/doc/emacs/mark.texi b/doc/emacs/mark.texi index 7cb48a67e7..0ffa9f74ac 100644 --- a/doc/emacs/mark.texi +++ b/doc/emacs/mark.texi @@ -260,7 +260,7 @@ change the variable @code{use-empty-active-region} to @code{t}. @vindex delete-active-region As described in @ref{Erasing}, the @key{DEL} -(@code{backward-delete-char}) and @key{delete} +(@code{backward-delete-char}) and @key{Delete} (@code{delete-forward-char}) commands also act this way. If the mark is active, they delete the text in the region. (As an exception, if you supply a numeric argument @var{n}, where @var{n} is not one, these diff --git a/doc/emacs/msdos-xtra.texi b/doc/emacs/msdos-xtra.texi index 541e29aa25..39d003c453 100644 --- a/doc/emacs/msdos-xtra.texi +++ b/doc/emacs/msdos-xtra.texi @@ -84,7 +84,7 @@ a running command and for emergency escape @vindex dos-super-key @vindex dos-hyper-key The PC keyboard maps use the left @key{Alt} key as the @key{META} key. -You have two choices for emulating the @key{SUPER} and @key{HYPER} keys: +You have two choices for emulating the @key{SUPER} and @key{Hyper} keys: choose either the right @key{Ctrl} key or the right @key{Alt} key by setting the variables @code{dos-hyper-key} and @code{dos-super-key} to 1 or 2 respectively. If neither @code{dos-super-key} nor diff --git a/doc/emacs/msdos.texi b/doc/emacs/msdos.texi index 9c47f47a73..032e82eb62 100644 --- a/doc/emacs/msdos.texi +++ b/doc/emacs/msdos.texi @@ -575,7 +575,7 @@ keys (it converts lower-case characters to their upper-case variants). However, if you set the variable @code{w32-capslock-is-shiftlock} to a non-@code{nil} value, the @key{CapsLock} key will affect non-character keys as well, as if you -pressed the @key{Shift} key while typing the non-character key. +pressed the @key{SHIFT} key while typing the non-character key. @vindex w32-enable-caps-lock If the variable @code{w32-enable-caps-lock} is set to a @code{nil} diff --git a/doc/emacs/mule.texi b/doc/emacs/mule.texi index 4989982eca..dc80bc9217 100644 --- a/doc/emacs/mule.texi +++ b/doc/emacs/mule.texi @@ -1841,7 +1841,33 @@ sometimes jump when point traverses reordered bidirectional text. Similarly, a highlighted region covering a contiguous range of character positions may look discontinuous if the region spans reordered text. This is normal and similar to the behavior of other -programs that support bidirectional text. If you set -@code{visual-order-cursor-movement} to a non-@code{nil} value, cursor -motion by the arrow keys follows the visual order on screen -(@pxref{Moving Point, visual-order movement}). +programs that support bidirectional text. + +@kindex RIGHT@r{, and bidirectional text} +@kindex LEFT@r{, and bidirectional text} +@findex right-char@r{, and bidirectional text} +@findex left-char@r{, and bidirectional text} + Cursor motion commands bound to arrow keys, such as @key{LEFT} and +@kbd{C-@key{RIGHT}}, are sensitive to the base direction of the +current paragraph. In a left-to-right paragraph, commands bound to +@key{RIGHT} with or without modifiers move @emph{forward} through +buffer text, but in a right-to-left paragraph they move +@emph{backward} instead. This reflects the fact that in a +right-to-left paragraph buffer positions predominantly increase when +moving to the left on display. + + When you move out of a paragraph, the meaning of the arrow keys +might change if the base direction of the preceding or the following +paragraph is different from the paragraph out of which you moved. +When that happens, you need to adjust the arrow key you press to the +new base direction. + +@vindex visual-order-cursor-movement +@cindex cursor, visual-order motion + By default, @key{LEFT} and @key{RIGHT} move in the logical order, +but if @code{visual-order-cursor-movement} is non-@code{nil}, these +commands move to the character that is, correspondingly, to the left +or right of the current screen position, moving to the next or +previous screen line as appropriate. Note that this might potentially +move point many buffer positions away, depending on the surrounding +bidirectional context. commit cef3b4248c02d7540fd2b6b44317baf6d2f46eae Author: Michael Albinus Date: Mon Feb 12 11:10:17 2018 +0100 Fix help in mode-line-mode-menu * lisp/bindings.el (mode-line-mode-menu) [auto-revert-tail-mode]: Fix help string. diff --git a/lisp/bindings.el b/lisp/bindings.el index ac84add361..e03b9e9a0c 100644 --- a/lisp/bindings.el +++ b/lisp/bindings.el @@ -575,7 +575,7 @@ Switch to the most recently selected buffer other than the current one." :button (:toggle . (bound-and-true-p flyspell-mode)))) (bindings--define-key mode-line-mode-menu [auto-revert-tail-mode] '(menu-item "Auto revert tail (Tail)" auto-revert-tail-mode - :help "Revert the tail of the buffer when buffer grows" + :help "Revert the tail of the buffer when the file on disk grows" :enable (buffer-file-name) :button (:toggle . (bound-and-true-p auto-revert-tail-mode)))) (bindings--define-key mode-line-mode-menu [auto-revert-mode] commit f8a493c800252621403ef281d8a26e4d6d6acd9a Author: Eli Zaretskii Date: Sun Feb 11 19:59:00 2018 +0200 Improve documentation of desktop restoring * doc/emacs/misc.texi (Saving Emacs Sessions): Document 'desktop-auto-save-timeout', 'desktop-load-locked-desktop', and how to restore desktop in daemon mode. (Bug#30421) diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi index 5babd5081a..ae6f9446f2 100644 --- a/doc/emacs/misc.texi +++ b/doc/emacs/misc.texi @@ -2485,7 +2485,7 @@ since it bypasses the init file, where @code{desktop-save-mode} is usually turned on. @vindex desktop-restore-eager - By default, all the buffers in the desktop are restored at one go. + By default, all the buffers in the desktop are restored in one go. However, this may be slow if there are a lot of buffers in the desktop. You can specify the maximum number of buffers to restore immediately with the variable @code{desktop-restore-eager}; the @@ -2504,6 +2504,35 @@ expression matching the names of buffers not to kill. If you want to save minibuffer history from one session to another, use the @code{savehist} library. +@vindex desktop-auto-save-timeout + While Emacs runs with @code{desktop-save-mode} turned on, it by +default auto-saves the desktop whenever any of it changes. The +variable @code{desktop-auto-save-timeout} determines how frequently +Emacs checks for modifications to your desktop. + +@vindex desktop-load-locked-desktop + The file in which Emacs saves the desktop is locked while the +session runs, to avoid inadvertently overwriting it from another Emacs +session. That lock is normally removed when Emacs exits, but if Emacs +or your system crashes, the lock stays, and when you restart Emacs, it +will by default ask you whether to use the locked desktop file. You +can avoid the question by customizing the variable +@code{desktop-load-locked-desktop} to either @code{nil}, which means +never load the desktop in this case, or @code{t}, which means load the +desktop without asking. + +@cindex desktop restore in daemon mode + When Emacs starts in daemon mode, it cannot ask you any questions, +so if it finds the desktop file locked, it will not load it, unless +@code{desktop-load-locked-desktop} is @code{t}. Note that restoring +the desktop in daemon mode is somewhat problematic for other reasons: +e.g., the daemon cannot use GUI features, so parameters such as frame +position, size, and decorations cannot be restored. For that reason, +you may wish to delay restoring the desktop in daemon mode until the +first client connects, by calling @code{desktop-read} in a hook +function that you add to @code{after-make-frame-functions} +(@pxref{Creating Frames,,, elisp, The Emacs Lisp Reference Manual}). + @node Recursive Edit @section Recursive Editing Levels @cindex recursive editing level commit 10637af91ac1bf777d880473cc8c804fd6dff4e2 Author: Eli Zaretskii Date: Sun Feb 11 18:19:25 2018 +0200 Improve the Emacs manual's chapter "Frames" * doc/emacs/frames.texi (Creating Frames): Add a cross-reference to where frame visibility is described. (Word and Line Mouse): Clarify wording. (Scroll Bars): Qualify scroll-bar behavior. Reported by Dmitry Gutov in emacs-manual-bugs@gnu.org. diff --git a/doc/emacs/frames.texi b/doc/emacs/frames.texi index 15b576d332..2c1a55b7dc 100644 --- a/doc/emacs/frames.texi +++ b/doc/emacs/frames.texi @@ -248,13 +248,13 @@ this to move point to the beginning of the region, scrolling the display backward if necessary. @item Double-Drag-mouse-1 -Select the text you drag across, in the form of whole words. +Select the text you drag across, in units of whole words. @item Triple-mouse-1 Select the line you click on. @item Triple-Drag-mouse-1 -Select the text you drag across, in the form of whole lines. +Select the text you drag across, in units of whole lines. @end table @node Mouse References @@ -409,10 +409,11 @@ boundary to the left or right. The prefix key @kbd{C-x 5} is analogous to @kbd{C-x 4}. Whereas each @kbd{C-x 4} command pops up a buffer in a different window in the selected frame (@pxref{Pop Up Window}), the @kbd{C-x 5} commands use a -different frame. If an existing visible or iconified (a.k.a.@: ``minimized'') -frame already displays the requested buffer, that frame is raised and -deiconified (``un-minimized''); otherwise, a new frame is created on -the current display terminal. +different frame. If an existing visible or iconified (a.k.a.@: +``minimized'', @pxref{Visibility of Frames,,, elisp, The Emacs Lisp +Reference Manual}) frame already displays the requested buffer, that +frame is raised and deiconified (``un-minimized''); otherwise, a new +frame is created on the current display terminal. The various @kbd{C-x 5} commands differ in how they find or create the buffer to select: @@ -954,7 +955,8 @@ toolkits allow you to customize the scroll bars to not have those buttons). Clicking @kbd{mouse-1} above or below the scroll bar's inner box scrolls the window by nearly the entire height of the window, like @kbd{M-v} and @kbd{C-v} respectively (@pxref{Moving -Point}). Dragging the inner box scrolls continuously. +Point}). (This, too, can behave differently with some toolkits.) +Dragging the inner box scrolls continuously. If Emacs is compiled on the X Window System without X toolkit support, the scroll bar behaves differently. Clicking @kbd{mouse-1} commit d924953e05f67874440fffac816a143e56af788f Author: Andreas Schwab Date: Sat Feb 10 23:55:48 2018 +0100 Fix unbound mm-uu-entry in mm-uu * lisp/gnus/mm-uu.el (mm-uu-dissect): Rename entry to mm-uu-entry. diff --git a/lisp/gnus/mm-uu.el b/lisp/gnus/mm-uu.el index 32be336d13..e15eba7592 100644 --- a/lisp/gnus/mm-uu.el +++ b/lisp/gnus/mm-uu.el @@ -624,7 +624,7 @@ MIME-TYPE specifies a MIME type and parameters, which defaults to the value of `mm-uu-text-plain-type'." (let ((case-fold-search t) (mm-uu-text-plain-type (or mime-type mm-uu-text-plain-type)) - text-start start-point end-point file-name result entry func) + text-start start-point end-point file-name result mm-uu-entry func) (save-excursion (goto-char (point-min)) (cond @@ -637,26 +637,26 @@ value of `mm-uu-text-plain-type'." (setq text-start (point)) (while (re-search-forward mm-uu-beginning-regexp nil t) (setq start-point (match-beginning 0) - entry nil) + mm-uu-entry nil) (let ((alist mm-uu-type-alist) (beginning-regexp (match-string 0))) - (while (not entry) + (while (not mm-uu-entry) (if (string-match (mm-uu-beginning-regexp (car alist)) beginning-regexp) - (setq entry (car alist)) + (setq mm-uu-entry (car alist)) (pop alist)))) - (if (setq func (mm-uu-function-1 entry)) + (if (setq func (mm-uu-function-1 mm-uu-entry)) (funcall func)) (forward-line);; in case of failure - (when (and (not (mm-uu-configure-p (mm-uu-type entry) 'disabled)) - (let ((end-regexp (mm-uu-end-regexp entry))) + (when (and (not (mm-uu-configure-p (mm-uu-type mm-uu-entry) 'disabled)) + (let ((end-regexp (mm-uu-end-regexp mm-uu-entry))) (if (not end-regexp) (or (setq end-point (point-max)) t) (prog1 (re-search-forward end-regexp nil t) (forward-line) (setq end-point (point))))) - (or (not (setq func (mm-uu-function-2 entry))) + (or (not (setq func (mm-uu-function-2 mm-uu-entry))) (funcall func))) (if (and (> start-point text-start) (progn @@ -675,7 +675,7 @@ value of `mm-uu-text-plain-type'." mm-uu-text-plain-type) result)) (push - (funcall (mm-uu-function-extract entry)) + (funcall (mm-uu-function-extract mm-uu-entry)) result) (goto-char (setq text-start end-point)))) (when result commit cb2487b173f84055692a3c978ccbef75b0fb70b3 Author: Eli Zaretskii Date: Sat Feb 10 19:21:42 2018 +0200 Improve Emacs user manual in fixit.texi * doc/emacs/fixit.texi (Undo): Clarify inaccurate description of repeated undo. (Transpose): Describe explicitly what happens at EOL. (Spelling): Use "spell-checking" consistently. Clarify wording. Suggested by Toon Claes in emacs-manual-bugs@gnu.org. diff --git a/doc/emacs/fixit.texi b/doc/emacs/fixit.texi index c872e9bb3a..7cacac4240 100644 --- a/doc/emacs/fixit.texi +++ b/doc/emacs/fixit.texi @@ -69,10 +69,10 @@ changes have already been undone, the undo command signals an error. Any command other than an undo command breaks the sequence of undo commands. Starting from that moment, the entire sequence of undo commands that you have just performed are themselves placed into the -undo record, as a single set of changes. Therefore, to re-apply -changes you have undone, type @kbd{C-f} or any other command that -harmlessly breaks the sequence of undoing; then type @kbd{C-/} to undo -the undo command. +undo record. Therefore, to re-apply changes you have undone, type +@kbd{C-f} or any other command that harmlessly breaks the sequence of +undoing; then type @kbd{C-/} one or more times to undo some of the +undo commands. Alternatively, if you want to resume undoing, without redoing previous undo commands, use @kbd{M-x undo-only}. This is like @@ -180,7 +180,8 @@ Otherwise, a reverse search (@kbd{C-r}) is often the best way. dragging the word preceding or containing point forward as well. The punctuation characters between the words do not move. For example, @w{@samp{FOO, BAR}} transposes into @w{@samp{BAR, FOO}} rather than -@samp{@w{BAR FOO,}}. +@samp{@w{BAR FOO,}}. When point is at the end of the line, it will +transpose the word before point with the first word on the next line. @kbd{C-M-t} (@code{transpose-sexps}) is a similar command for transposing two expressions (@pxref{Expressions}), and @kbd{C-x C-t} @@ -344,16 +345,16 @@ wildcard. @item C-g @itemx X -Quit interactive spell checking, leaving point at the word that was +Quit interactive spell-checking, leaving point at the word that was being checked. You can restart checking again afterward with @kbd{C-u M-$}. @item x -Quit interactive spell checking and move point back to where it was -when you started spell checking. +Quit interactive spell-checking and move point back to where it was +when you started spell-checking. @item q -Quit interactive spell checking and kill the spell-checker subprocess. +Quit interactive spell-checking and kill the spell-checker subprocess. @item ? Show the list of options. @@ -371,7 +372,7 @@ character; type that digit or character to choose it. @cindex @code{ispell} program @findex ispell-kill-ispell Once started, the spell-checker subprocess continues -to run, waiting for something to do, so that subsequent spell checking +to run, waiting for something to do, so that subsequent spell-checking commands complete more quickly. If you want to get rid of the process, use @kbd{M-x ispell-kill-ispell}. This is not usually necessary, since the process uses no processor time except when you do @@ -392,19 +393,21 @@ so that it will use a different standard dictionary. Your personal dictionary is specified by the variable @code{ispell-personal-dictionary}. If that is @code{nil}, the spelling program looks for a personal dictionary in a default -location. +location, which is specific to each spell-checker. @vindex ispell-complete-word-dict A separate dictionary is used for word completion. The variable @code{ispell-complete-word-dict} specifies the file name of this dictionary. The completion dictionary must be different because it -cannot use root and affix information. For some languages, there -is a spell checking dictionary but no word completion dictionary. +cannot use the information about roots and affixes of the words, which +spell-checking uses to detect variations of words. For some +languages, there is a spell-checking dictionary but no word completion +dictionary. @cindex Flyspell mode @cindex mode, Flyspell @findex flyspell-mode - Flyspell mode is a minor mode that performs automatic spell checking + Flyspell mode is a minor mode that performs automatic spell-checking as you type. When it finds a word that it does not recognize, it highlights that word. Type @kbd{M-x flyspell-mode} to toggle Flyspell mode in the current buffer. To enable Flyspell mode in all text mode commit 66e9527b9a8c66bc3c5a4e5c3e68777d93310be1 Author: Eli Zaretskii Date: Sat Feb 10 13:23:22 2018 +0200 Another minor change in the manual * doc/emacs/glossary.texi (Glossary): Add popular Latin abbreviations, such as "e.g.". diff --git a/doc/emacs/glossary.texi b/doc/emacs/glossary.texi index 7a0dd6db75..7a34692dc5 100644 --- a/doc/emacs/glossary.texi +++ b/doc/emacs/glossary.texi @@ -160,6 +160,11 @@ right away when you press down on a mouse button. @xref{Mouse Buttons}. @item Byte Compilation @xref{Glossary---Compilation}. +@item c.f. +@itemx cf. +Short for ``confer'' in Latin, which means ``compare with'' or +``compare to''. + @anchor{Glossary---C-} @item @kbd{C-} @kbd{C-} in the name of a character is an abbreviation for Control. @@ -440,6 +445,9 @@ tell it to. @xref{Bugs}. @c TODO? Not really appropriate for the user manual I think. @c Dynamic Binding +@item e.g. +Short for ``exempli gratia'' in Latin, which means ``for example''. + @item Echo Area The echo area is the bottom line of the screen, used for echoing the arguments to commands, for asking questions, and showing brief messages @@ -499,6 +507,9 @@ like the @key{SHIFT} key, is held down while another character is typed), you press the @key{ESC} key as you would press a letter key, and it applies to the next character you type. +@item etc. +Short for ``et cetera'' in Latin, which means ``and so on''. + @item Expression @xref{Glossary---Balanced Expression}. @@ -709,6 +720,9 @@ have. To make a character Hyper, type it while holding down the @key{Hyper} key. Such characters are given names that start with @kbd{Hyper-} (usually written @kbd{H-} for short). @xref{User Input}. +@item i.e. +Short for ``id est'' in Latin, which means ``that is''. + @item Iff ``Iff'' means ``if and only if''. This terminology comes from mathematics. Try to avoid using this term in documentation, since @@ -1082,6 +1096,9 @@ read an argument (@pxref{Minibuffer}); the echoing that happens when you pause in the middle of typing a multi-character key sequence is also a kind of prompting (@pxref{Echo Area}). +@item q.v. +Short for ``quod vide'' in Latin, which means ``which see''. + @item Query-Replace Query-replace is an interactive string replacement feature provided by Emacs. @xref{Query Replace}. commit 6a1c03d65bcdd5a9cb2a130948285bbfde341154 Author: Eli Zaretskii Date: Sat Feb 10 11:19:43 2018 +0200 More minor changes in the Emacs manual * doc/emacs/xresources.texi (GTK resources): * doc/emacs/trouble.texi (Contributing): * doc/emacs/frames.texi (Fonts): Use HTTPS URLs instead of HTTP. * doc/emacs/docstyle.texi: Add a few @hyphenation directives, based on reports in emacs-manual-bugs@gnu.org about incorrect hyphenation. diff --git a/doc/emacs/docstyle.texi b/doc/emacs/docstyle.texi index dfd14306b3..f682e3d82b 100644 --- a/doc/emacs/docstyle.texi +++ b/doc/emacs/docstyle.texi @@ -8,3 +8,9 @@ @end ignore @set txicodequoteundirected @set txicodequotebacktick +@c It turns out TeX sometimes fails to hyphenate, so we help it here +@hyphenation{au-to-mat-i-cal-ly} +@hyphenation{spec-i-fied} +@hyphenation{work-a-round} +@hyphenation{work-a-rounds} +@hyphenation{un-marked} diff --git a/doc/emacs/frames.texi b/doc/emacs/frames.texi index afdfa6c39c..15b576d332 100644 --- a/doc/emacs/frames.texi +++ b/doc/emacs/frames.texi @@ -642,7 +642,7 @@ Monospace-12:weight=bold:slant=italic For a more detailed description of Fontconfig patterns, see the Fontconfig manual, which is distributed with Fontconfig and available -online at @url{http://fontconfig.org/fontconfig-user.html}. +online at @url{https://fontconfig.org/fontconfig-user.html}. @cindex GTK font pattern The second way to specify a font is to use a @dfn{GTK font pattern}. diff --git a/doc/emacs/trouble.texi b/doc/emacs/trouble.texi index 2edeb05f9e..330497c4ea 100644 --- a/doc/emacs/trouble.texi +++ b/doc/emacs/trouble.texi @@ -1322,7 +1322,7 @@ the Emacs Lisp Reference Manual @url{https://www.gnu.org/software/emacs} @item -@url{http://www.emacswiki.org/} +@url{https://www.emacswiki.org/} @end itemize @menu diff --git a/doc/emacs/xresources.texi b/doc/emacs/xresources.texi index d58c6b905e..ee59551a6a 100644 --- a/doc/emacs/xresources.texi +++ b/doc/emacs/xresources.texi @@ -512,7 +512,7 @@ those are governed by normal X resources (@pxref{Resources}). The following sections describe how to customize GTK+ resources for Emacs. For details about GTK+ resources, see the GTK+ API document at -@uref{http://developer.gnome.org/gtk2/stable/gtk2-Resource-Files.html}. +@uref{https://developer.gnome.org/gtk2/stable/gtk2-Resource-Files.html}. In GTK+ version 3, GTK+ resources have been replaced by a completely different system. The appearance of GTK+ widgets is now determined by @@ -522,7 +522,7 @@ style settings (where @var{theme} is the name of the current GTK+ theme). Therefore, the description of GTK+ resources in this section does not apply to GTK+ 3. For details about the GTK+ 3 styling system, see -@uref{http://developer.gnome.org/gtk3/3.0/GtkCssProvider.html}. +@uref{https://developer.gnome.org/gtk3/3.0/GtkCssProvider.html}. @menu * GTK Resource Basics:: Basic usage of GTK+ resources. commit 32fb8c4c33305fa3107f23d8ce8cfba8e04a7433 Author: Eli Zaretskii Date: Sat Feb 10 09:51:00 2018 +0200 Avoid printing garbled error message from image.el * lisp/image.el (image--get-imagemagick-and-warn): Don't use apostrophe in the error message, as that message is shown from a unibyte buffer, and will run afoul of the default style of showing quote characters. (Bug#30405) diff --git a/lisp/image.el b/lisp/image.el index 0fe03f55bb..b021edb33d 100644 --- a/lisp/image.el +++ b/lisp/image.el @@ -977,7 +977,7 @@ default is 20%." (defun image--get-imagemagick-and-warn () (unless (fboundp 'imagemagick-types) - (error "Can't rescale images without ImageMagick support")) + (error "Cannot rescale images without ImageMagick support")) (let ((image (image--get-image))) (image-flush image) (plist-put (cdr image) :type 'imagemagick)