diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2022-01-10 22:34:55 -0500 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2022-01-10 22:34:55 -0500 |
commit | 73b15f45f9369f511985b7b424c1a6cc54b323c2 (patch) | |
tree | 81aa29ac8e6a6339a5da256df5fa591357098fe0 | |
parent | 4d621ffd30749de93519161c5094e40ee1b08fb6 (diff) | |
parent | 99a9b545f09dc78494e62c9dc34c0cdb280b879e (diff) | |
download | emacs-73b15f45f9369f511985b7b424c1a6cc54b323c2.tar.gz |
Merge remote-tracking branch 'origin/emacs-28' into trunk
-rw-r--r-- | lisp/abbrev.el | 10 | ||||
-rw-r--r-- | lisp/emacs-lisp/package.el | 8 | ||||
-rw-r--r-- | lisp/emacs-lisp/tabulated-list.el | 3 | ||||
-rw-r--r-- | lisp/files.el | 21 | ||||
-rw-r--r-- | src/fns.c | 28 | ||||
-rw-r--r-- | test/lisp/files-tests.el | 2 |
6 files changed, 39 insertions, 33 deletions
diff --git a/lisp/abbrev.el b/lisp/abbrev.el index 8247130e322..44328a2b283 100644 --- a/lisp/abbrev.el +++ b/lisp/abbrev.el @@ -147,12 +147,18 @@ Otherwise display all abbrevs." Selects a buffer containing a list of abbrev definitions with point located in the abbrev table for the current buffer, and turns on `edit-abbrevs-mode' in that buffer. -You can edit them and type \\<edit-abbrevs-map>\\[edit-abbrevs-redefine] to redefine abbrevs + +You can edit them and type \\<edit-abbrevs-mode-map>\\[edit-abbrevs-redefine] \ +to redefine abbrevs according to your editing. + The abbrevs editing buffer contains a header line for each abbrev table, which is the abbrev table name in parentheses. + This is followed by one line per abbrev in that table: -NAME USECOUNT EXPANSION HOOK + + NAME USECOUNT EXPANSION HOOK + where NAME and EXPANSION are strings with quotes, USECOUNT is an integer, and HOOK is any valid function or may be omitted (it is usually omitted)." diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 5a3ec4f4af5..aa3e48155c3 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -397,10 +397,10 @@ a sane initial value." :type '(repeat symbol)) (defcustom package-native-compile nil - "Non-nil means to native compile packages after installing them. -This controls ahead-of-time compilation. If this option is nil, -packages are normally compiled after they have been loaded for -the first time. + "Non-nil means to natively compile packages as part of their installation. +This controls ahead-of-time compilation of packages when they are +installed. If this option is nil, packages will be natively +compiled when they are loaded for the first time. This option does not have any effect if Emacs was not built with native compilation support." diff --git a/lisp/emacs-lisp/tabulated-list.el b/lisp/emacs-lisp/tabulated-list.el index 13f610bd230..4a9814b5daf 100644 --- a/lisp/emacs-lisp/tabulated-list.el +++ b/lisp/emacs-lisp/tabulated-list.el @@ -596,8 +596,7 @@ Return the column number after insertion." (when not-last-col (when (> pad-right 0) (insert (make-string pad-right ?\s))) (insert (propertize - ;; We need at least one space to align correctly. - (make-string (- width (min 1 width label-width)) ?\s) + (make-string (- width (min width label-width)) ?\s) 'display `(space :align-to ,next-x)))) (put-text-property opoint (point) 'tabulated-list-column-name name) next-x))) diff --git a/lisp/files.el b/lisp/files.el index a11786fca2c..cd43b94622e 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -5799,7 +5799,7 @@ to return a predicate used to check buffers." ;; FIXME nil should not be a valid option, let alone the default, ;; eg so that add-function can be used. :type '(choice (const :tag "Default" nil) - (function :tag "Only in subdirs of root" + (function :tag "Only in subdirs of current project" save-some-buffers-root) (function :tag "Custom function")) :version "26.1") @@ -5835,21 +5835,22 @@ all with no questions. Optional second argument PRED determines which buffers are considered: If PRED is nil, all the file-visiting buffers are considered. If PRED is t, then certain non-file buffers will also be considered. -If PRED is a zero-argument function, it indicates for each buffer whether -to consider it or not when called with that buffer current. +If PRED is a function, it is called with no argument in each buffer and +should return non-nil if that buffer should be considered. PRED defaults to the value of `save-some-buffers-default-predicate'. See `save-some-buffers-action-alist' if you want to change the additional actions you can take on files." (interactive "P") (unless pred - (setq pred save-some-buffers-default-predicate)) - ;; Allow `pred' to be a function that returns a predicate - ;; with lexical bindings in its original environment (bug#46374). - (when (and (symbolp pred) (get pred 'save-some-buffers-function)) - (let ((pred-fun (and (functionp pred) (funcall pred)))) - (when (functionp pred-fun) - (setq pred pred-fun)))) + (setq pred + ;; Allow `pred' to be a function that returns a predicate + ;; with lexical bindings in its original environment (bug#46374). + (if (and (symbolp save-some-buffers-default-predicate) + (get save-some-buffers-default-predicate + 'save-some-buffers-function)) + (funcall save-some-buffers-default-predicate) + save-some-buffers-default-predicate))) (let* ((switched-buffer nil) (save-some-buffers--switch-window-callback (lambda (buffer) diff --git a/src/fns.c b/src/fns.c index 86c49e6fc6b..7b9142d4718 100644 --- a/src/fns.c +++ b/src/fns.c @@ -3105,25 +3105,25 @@ require_unwind (Lisp_Object old_value) } DEFUN ("require", Frequire, Srequire, 1, 3, 0, - doc: /* If feature FEATURE is not loaded, load it from FILENAME. -If FEATURE is not a member of the list `features', then the feature is -not loaded; so load the file FILENAME. + doc: /* If FEATURE is not already loaded, load it from FILENAME. +If FEATURE is not a member of the list `features', then the feature was +not yet loaded; so load it from file FILENAME. If FILENAME is omitted, the printname of FEATURE is used as the file -name, and `load' will try to load this name appended with the suffix -`.elc', `.el', or the system-dependent suffix for dynamic module -files, in that order. The name without appended suffix will not be -used. See `get-load-suffixes' for the complete list of suffixes. +name, and `load' is called to try to load the file by that name, after +appending the suffix `.elc', `.el', or the system-dependent suffix for +dynamic module files, in that order; but the function will not try to +load the file without any suffix. See `get-load-suffixes' for the +complete list of suffixes. -The directories in `load-path' are searched when trying to find the -file name. +To find the file, this function searches that directories in `load-path'. -If the optional third argument NOERROR is non-nil, then return nil if -the file is not found instead of signaling an error. Normally the -return value is FEATURE. +If the optional third argument NOERROR is non-nil, then, if +the file is not found, the function returns nil instead of signaling +an error. Normally the return value is FEATURE. -The normal messages at start and end of loading FILENAME are -suppressed. */) +The normal messages issued by `load' at start and end of loading +FILENAME are suppressed. */) (Lisp_Object feature, Lisp_Object filename, Lisp_Object noerror) { Lisp_Object tem; diff --git a/test/lisp/files-tests.el b/test/lisp/files-tests.el index a3c67bc3d64..1b09cdb397e 100644 --- a/test/lisp/files-tests.el +++ b/test/lisp/files-tests.el @@ -1777,7 +1777,7 @@ PRED is nil." (files-tests-with-all-permutations buffers-offer buffers-offer-init - (dolist (pred `(nil t save-some-buffers-root)) + (dolist (pred `(nil t)) (dolist (callers-dir `(nil save-some-buffers-root)) (let* ((head-offer (cadar buffers-offer)) (res (cond ((null pred) |