From e5471b2381e885d5d214bfa09ab0c35275fc6048 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 1 Jun 2018 15:34:30 +0300 Subject: [PATCH 1/7] Add commentary for subtle aspect of frame.el * lisp/frame.el: Explain why we use symbol-function when adding watchers for certain variables that need to trigger redisplay. --- lisp/frame.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lisp/frame.el b/lisp/frame.el index 447413b3256..29c31f41cb1 100644 --- a/lisp/frame.el +++ b/lisp/frame.el @@ -2475,6 +2475,9 @@ See also `toggle-frame-maximized'." ;; F5 then produces the correct effect, the variable doesn't need ;; to be in this list; otherwise, it does. (mapc (lambda (var) + ;; Using symbol-function here tells the watcher machinery to + ;; call the C function set-buffer-redisplay directly, thus + ;; avoiding a potential GC. (add-variable-watcher var (symbol-function 'set-buffer-redisplay))) '(line-spacing overline-margin From 9188291f7a3a2536ef0b694e4c75f3094cf46fcf Mon Sep 17 00:00:00 2001 From: Robert Pluim Date: Fri, 1 Jun 2018 15:05:23 +0200 Subject: [PATCH 2/7] Add detailed documentation about lock files * doc/emacs/files.texi (Interlocking): Point user at detailed file locking description in lisp reference manual. Add index entry for '.#' to improve disoverability of information about locking. * doc/lispref/files.texi (File Locks): Describe in detail what the form of the lock file is. Add index entry for '.#' to improve disoverability of information about locking. * src/filelock.c (create-lockfiles): Add cross reference to file locking in user manual and to 'lock-buffer'. Add string '.#' to help users find the doc string. --- doc/emacs/files.texi | 9 ++++++--- doc/lispref/files.texi | 14 ++++++++++++-- src/filelock.c | 5 ++++- 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi index 1ced7ca07c6..406e7d980c3 100644 --- a/doc/emacs/files.texi +++ b/doc/emacs/files.texi @@ -766,13 +766,16 @@ file. @findex ask-user-about-lock @cindex locking files +@cindex .#, lock file names +@cindex file locking When you make the first modification in an Emacs buffer that is visiting a file, Emacs records that the file is @dfn{locked} by you. (It does this by creating a specially-named symbolic link@footnote{If your file system does not support symbolic links, a regular file is -used.} with special contents in the same directory.) Emacs removes the lock -when you save the changes. The idea is that the file is locked -whenever an Emacs buffer visiting it has unsaved changes. +used.} with special contents in the same directory. @xref{File +Locks,,, elisp} for more details.) Emacs removes the lock when you +save the changes. The idea is that the file is locked whenever an +Emacs buffer visiting it has unsaved changes. @vindex create-lockfiles You can prevent the creation of lock files by setting the variable diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi index 5137f3a9ab4..6dfca0f2128 100644 --- a/doc/lispref/files.texi +++ b/doc/lispref/files.texi @@ -712,6 +712,7 @@ with-temp-buffer,, The Current Buffer}. @section File Locks @cindex file locks @cindex lock file +@cindex .#, lock file names When two users edit the same file at the same time, they are likely to interfere with each other. Emacs tries to prevent this situation @@ -720,8 +721,17 @@ modified. Emacs can then detect the first attempt to modify a buffer visiting a file that is locked by another Emacs job, and ask the user what to do. The file lock is really a file, a symbolic link with a special name, -stored in the same directory as the file you are editing. (On file -systems that do not support symbolic links, a regular file is used.) +stored in the same directory as the file you are editing. The name is +constructed by prepending @file{.#} to the filename of the buffer. +The target of the symbolic link will be of the form +@code{@var{user}@@@var{host}.@var{pid}:@var{boot}}, where @var{user} +is replaced with the current username (from @code{user-login-name}), +@var{host} with the name of the host where Emacs is running (from +@code{system-name}), @var{pid} with Emacs's process id, and @var{boot} +with the time since the last reboot. @code{:@var{boot}} is omitted if +the boot time is unavailable. (On file systems that do not support +symbolic links, a regular file is used instead, with contents of the +form @code{@var{user}@@@var{host}.@var{pid}:@var{boot}}.) When you access files using NFS, there may be a small probability that you and another user will both lock the same file simultaneously. diff --git a/src/filelock.c b/src/filelock.c index f2dc7234076..d33063c8790 100644 --- a/src/filelock.c +++ b/src/filelock.c @@ -849,7 +849,10 @@ syms_of_filelock (void) Vtemporary_file_directory = Qnil; DEFVAR_BOOL ("create-lockfiles", create_lockfiles, - doc: /* Non-nil means use lockfiles to avoid editing collisions. */); + doc: /* Non-nil means use lockfiles to avoid editing collisions. +The name of the (per-buffer) lockfile is constructed by prepending a +'.#' to the name of the file being locked. See also `lock-buffer' and +Info node `(emacs)Interlocking'. */); create_lockfiles = 1; defsubr (&Sunlock_buffer); From 6d2352594f4e4e17965834851547df3adaa6cd6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Sun, 27 May 2018 19:03:10 +0200 Subject: [PATCH 3/7] Fix typos in several manuals (Bug#31610) Copyright-paperwork-exempt: yes --- doc/lispintro/emacs-lisp-intro.texi | 6 +++--- doc/lispref/display.texi | 2 +- doc/lispref/errors.texi | 2 +- doc/misc/autotype.texi | 2 +- doc/misc/org.texi | 4 ++-- doc/misc/viper.texi | 2 +- doc/misc/wisent.texi | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/doc/lispintro/emacs-lisp-intro.texi b/doc/lispintro/emacs-lisp-intro.texi index 67df6f208fb..a256873ab1d 100644 --- a/doc/lispintro/emacs-lisp-intro.texi +++ b/doc/lispintro/emacs-lisp-intro.texi @@ -484,7 +484,7 @@ Narrowing and Widening @code{car}, @code{cdr}, @code{cons}: Fundamental Functions -* Strange Names:: An historical aside: why the strange names? +* Strange Names:: A historical aside: why the strange names? * car & cdr:: Functions for extracting part of a list. * cons:: Constructing a list. * nthcdr:: Calling @code{cdr} repeatedly. @@ -6797,7 +6797,7 @@ will see @code{cons} as well as two variants on @code{cdr}, namely, @code{setcdr} and @code{nthcdr}. (@xref{copy-region-as-kill}.) @menu -* Strange Names:: An historical aside: why the strange names? +* Strange Names:: A historical aside: why the strange names? * car & cdr:: Functions for extracting part of a list. * cons:: Constructing a list. * nthcdr:: Calling @code{cdr} repeatedly. @@ -7678,7 +7678,7 @@ The first part of the code looks like this: @end smallexample @noindent -@code{char-table-p} is an hitherto unseen function. It determines +@code{char-table-p} is a hitherto unseen function. It determines whether its argument is a character table. When it is, it sets the character passed to @code{zap-to-char} to one of them, if that character exists, or to the character itself. (This becomes important diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index 13a25af02c8..ce7ec3ac10d 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi @@ -1048,7 +1048,7 @@ commands operate as if that portion did not exist, allowing a single @code{next-line} command to skip any number of hidden lines. However, character movement commands (such as @code{forward-char}) do not skip the hidden portion, and it is possible (if tricky) to insert -or delete text in an hidden portion. +or delete text in a hidden portion. In the examples below, we show the @emph{display appearance} of the buffer @code{foo}, which changes with the value of diff --git a/doc/lispref/errors.texi b/doc/lispref/errors.texi index 5054172ff3b..a0e32c5631c 100644 --- a/doc/lispref/errors.texi +++ b/doc/lispref/errors.texi @@ -11,7 +11,7 @@ by concept. The list includes each symbol's message and a cross reference to a description of how the error can occur. - Each error symbol has an set of parent error conditions that is a + Each error symbol has a set of parent error conditions that is a list of symbols. Normally this list includes the error symbol itself and the symbol @code{error}. Occasionally it includes additional symbols, which are intermediate classifications, narrower than diff --git a/doc/misc/autotype.texi b/doc/misc/autotype.texi index 3d61d24fa9d..7e2476c225d 100644 --- a/doc/misc/autotype.texi +++ b/doc/misc/autotype.texi @@ -214,7 +214,7 @@ have been omitted.) @cindex skeleton language @findex skeleton-insert - Skeletons are an shorthand extension to the Lisp language, where various + Skeletons are a shorthand extension to the Lisp language, where various atoms directly perform either actions on the current buffer or rudimentary flow control mechanisms. Skeletons are interpreted by the function @code{skeleton-insert}. diff --git a/doc/misc/org.texi b/doc/misc/org.texi index 08ba33605e6..88cdb5f951b 100644 --- a/doc/misc/org.texi +++ b/doc/misc/org.texi @@ -5136,7 +5136,7 @@ that Org can parse this line correctly: In this example, @samp{GTD} is the @emph{group tag} and it is related to two other tags: @samp{Control}, @samp{Persp}. Defining @samp{Control} and -@samp{Persp} as group tags creates an hierarchy of tags: +@samp{Persp} as group tags creates a hierarchy of tags: @example #+TAGS: [ Control : Context Task ] @@ -11180,7 +11180,7 @@ Org exports text in this block only when using ASCII back-end. @cindex horizontal rules, in ASCII export ASCII back-end recognizes only one attribute, @code{:width}, which specifies -the width of an horizontal rule in number of characters. The keyword and +the width of a horizontal rule in number of characters. The keyword and syntax for specifying widths is: @example diff --git a/doc/misc/viper.texi b/doc/misc/viper.texi index 19d592f3e87..e67734bc01c 100644 --- a/doc/misc/viper.texi +++ b/doc/misc/viper.texi @@ -4330,7 +4330,7 @@ Same as @code{tabstop}, but affects all buffers. @cindex auto fill @cindex word wrap wrapmargin: In append mode Vi automatically -puts a whenever there is a or +puts an whenever there is an or within columns from the right margin. @item wrapscan @itemx ws diff --git a/doc/misc/wisent.texi b/doc/misc/wisent.texi index 2dffa089da5..12bb09c7b25 100644 --- a/doc/misc/wisent.texi +++ b/doc/misc/wisent.texi @@ -1937,7 +1937,7 @@ rule: @end example Set the @code{reparse-symbol} property of the expanded tag to -@samp{rule}. A important consequence is that: +@samp{rule}. An important consequence is that: @strong{Every nonterminal having any rule that calls @code{EXPANDTAG} in a semantic action, should be declared as a start symbol!} From 325708544323c7434c62c0ae3773de2cc09692a5 Mon Sep 17 00:00:00 2001 From: Robert Pluim Date: Fri, 1 Jun 2018 15:34:33 +0200 Subject: [PATCH 4/7] Fix previous commit * doc/emacs/files.texi (Interlocking): Two spaces at end of sentence --- doc/emacs/files.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi index 406e7d980c3..821d8c1eadb 100644 --- a/doc/emacs/files.texi +++ b/doc/emacs/files.texi @@ -772,7 +772,7 @@ file. visiting a file, Emacs records that the file is @dfn{locked} by you. (It does this by creating a specially-named symbolic link@footnote{If your file system does not support symbolic links, a regular file is -used.} with special contents in the same directory. @xref{File +used.} with special contents in the same directory. @xref{File Locks,,, elisp} for more details.) Emacs removes the lock when you save the changes. The idea is that the file is locked whenever an Emacs buffer visiting it has unsaved changes. From 4a3aed2507a3e347fc0488c21cbc0a898efef6b7 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 1 Jun 2018 17:11:36 +0300 Subject: [PATCH 5/7] Update Emacs Lisp Intro to match current behavior * doc/lispintro/emacs-lisp-intro.texi (Wrong Type of Argument) (debug, debug-on-entry, Void Function, Void Variable): Update the *Backtrace* buffer display to current Emacs. (Bug#31654) --- doc/lispintro/emacs-lisp-intro.texi | 57 +++++++++++++++++------------ 1 file changed, 34 insertions(+), 23 deletions(-) diff --git a/doc/lispintro/emacs-lisp-intro.texi b/doc/lispintro/emacs-lisp-intro.texi index a256873ab1d..aad572623a3 100644 --- a/doc/lispintro/emacs-lisp-intro.texi +++ b/doc/lispintro/emacs-lisp-intro.texi @@ -1818,10 +1818,12 @@ You will create a @file{*Backtrace*} buffer that says: ---------- Buffer: *Backtrace* ---------- Debugger entered--Lisp error: (void-function fill-column) (fill-column) - eval((fill-column)) - eval-last-sexp-1(nil) + eval((fill-column) nil) + elisp--eval-last-sexp(nil) eval-last-sexp(nil) - call-interactively(eval-last-sexp) + funcall-interactively(eval-last-sexp nil) + call-interactively(eval-last-sexp nil nil) + command-execute(eval-last-sexp) ---------- Buffer: *Backtrace* ---------- @end group @end smallexample @@ -1868,9 +1870,11 @@ says: ---------- Buffer: *Backtrace* ---------- Debugger entered--Lisp error: (void-variable +) eval(+) - eval-last-sexp-1(nil) + elisp--eval-last-sexp(nil) eval-last-sexp(nil) - call-interactively(eval-last-sexp) + funcall-interactively(eval-last-sexp nil) + call-interactively(eval-last-sexp nil nil) + command-execute(eval-last-sexp) ---------- Buffer: *Backtrace* ---------- @end group @end smallexample @@ -2137,10 +2141,12 @@ You will create and enter a @file{*Backtrace*} buffer that says: Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p hello) +(2 hello) - eval((+ 2 (quote hello))) - eval-last-sexp-1(nil) + eval((+ 2 'hello) nil) + elisp--eval-last-sexp(t) eval-last-sexp(nil) - call-interactively(eval-last-sexp) + funcall-interactively(eval-print-last-sexp nil) + call-interactively(eval-print-last-sexp nil nil) + command-execute(eval-print-last-sexp) ---------- Buffer: *Backtrace* ---------- @end group @end smallexample @@ -18103,10 +18109,11 @@ Debugger entered--Lisp error: (void-function 1=) triangle-bugged(4) @end group @group - eval((triangle-bugged 4)) - eval-last-sexp-1(nil) - eval-last-sexp(nil) - call-interactively(eval-last-sexp) + eval((triangle-bugged 4) nil) + eval-expression((triangle-bugged 4) nil nil 127) + funcall-interactively(eval-expression (triangle-bugged 4) nil nil 127) + call-interactively(eval-expression nil nil) + command-execute(eval-expression) ---------- Buffer: *Backtrace* ---------- @end group @end smallexample @@ -18220,12 +18227,13 @@ function: ---------- Buffer: *Backtrace* ---------- Debugger entered--entering a function: * triangle-bugged(5) - eval((triangle-bugged 5)) + eval((triangle-bugged 5) nil) @end group @group - eval-last-sexp-1(nil) - eval-last-sexp(nil) - call-interactively(eval-last-sexp) + eval-expression((triangle-bugged 5) nil nil 127) + funcall-interactively(eval-expression (triangle-bugged 5) nil nil 127) + call-interactively(eval-expression nil nil) + command-execute(eval-expression) ---------- Buffer: *Backtrace* ---------- @end group @end smallexample @@ -18244,9 +18252,11 @@ Debugger entered--beginning evaluation of function call form: eval((triangle-bugged 5)) @end group @group - eval-last-sexp-1(nil) - eval-last-sexp(nil) - call-interactively(eval-last-sexp) + eval((triangle-bugged 5) nil) + eval-expression((triangle-bugged 5) nil nil 127) + funcall-interactively(eval-expression (triangle-bugged 5) nil nil 127) + call-interactively(eval-expression nil nil) + command-execute(eval-expression) ---------- Buffer: *Backtrace* ---------- @end group @end smallexample @@ -18271,12 +18281,13 @@ Debugger entered--beginning evaluation of function call form: * (let ((total 0)) (while (> number 0) (setq total ...) (setq number ...)) total) * triangle-bugged(5) - eval((triangle-bugged 5)) + eval((triangle-bugged 5) nil) @group @end group - eval-last-sexp-1(nil) - eval-last-sexp(nil) - call-interactively(eval-last-sexp) + eval-expression((triangle-bugged 5) nil nil 127) + funcall-interactively(eval-expression (triangle-bugged 5) nil nil 127) + call-interactively(eval-expression nil nil) + command-execute(eval-expression) ---------- Buffer: *Backtrace* ---------- @end group @end smallexample From af82d1f4bd3c01786516c0d32cec4dc77a235778 Mon Sep 17 00:00:00 2001 From: Martin Rudalics Date: Sat, 2 Jun 2018 09:49:13 +0200 Subject: [PATCH 6/7] * etc/PROBLEMS: Document stickyness problem with FVWM (Bug#31650) --- etc/PROBLEMS | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/etc/PROBLEMS b/etc/PROBLEMS index 09027332d80..6b15ee9ecae 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS @@ -1288,6 +1288,14 @@ do not know what. If it is an Emacs bug, we hope someone can explain what the bug is so we can fix it. In the mean time, removing the resource prevents the problem. +*** FVWM: Some versions of FVWM incorrectly set the 'sticky' frame parameter. + +Version 2.6.4 of the FVWM can make a frame sticky (appear on all user +desktops) when setting the 'sticky' frame parameter to nil. This may +happen without any special user interaction, for example, when Emacs +restores a saved desktop. A fix is to install version 2.6.7 of FVWM, +see https://debbugs.gnu.org/cgi/bugreport.cgi?bug=31650. + ** General X problems *** Redisplay using X is much slower than previous Emacs versions. From 90bea37d466f47a65f3790b4bc46b11af9a4a27a Mon Sep 17 00:00:00 2001 From: Martin Rudalics Date: Sat, 2 Jun 2018 11:05:52 +0200 Subject: [PATCH 7/7] ; * etc/PROBLEMS: Fix fvwm version number in last commit --- etc/PROBLEMS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/PROBLEMS b/etc/PROBLEMS index 6b15ee9ecae..1e103e9af08 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS @@ -1293,7 +1293,7 @@ the resource prevents the problem. Version 2.6.4 of the FVWM can make a frame sticky (appear on all user desktops) when setting the 'sticky' frame parameter to nil. This may happen without any special user interaction, for example, when Emacs -restores a saved desktop. A fix is to install version 2.6.7 of FVWM, +restores a saved desktop. A fix is to install version 2.6.8 of FVWM, see https://debbugs.gnu.org/cgi/bugreport.cgi?bug=31650. ** General X problems