]> git.eshelyaron.com Git - emacs.git/log
emacs.git
3 years ago* Prevent stale eln loading checking file timestamp before load (bug#46617)
Andrea Corallo [Fri, 26 Mar 2021 07:06:09 +0000 (08:06 +0100)]
* Prevent stale eln loading checking file timestamp before load (bug#46617)

* src/lread.c (maybe_swap_for_eln): Add file timestamp check.
(openp): Update 'maybe_swap_for_eln' call sites.

3 years agoMerge remote-tracking branch 'savannah/master' into native-comp
Andrea Corallo [Thu, 25 Mar 2021 15:29:07 +0000 (16:29 +0100)]
Merge remote-tracking branch 'savannah/master' into native-comp

3 years agoAdapt Tramp file notification support
Michael Albinus [Thu, 25 Mar 2021 11:02:57 +0000 (12:02 +0100)]
Adapt Tramp file notification support

* lisp/net/tramp-integration.el (tramp-use-ssh-controlmaster-options):
Declare it.

* lisp/net/tramp-sh.el (tramp-sh-handle-file-notify-add-watch):
Remove "gvfs-monitor-dir".
(tramp-sh-gvfs-monitor-dir-process-filter)
(tramp-get-remote-gvfs-monitor-dir): Remove.
(tramp-get-remote-gio-file-monitor): Support also cygwin, and
GFamDirectoryMonitor, GPollFileMonitor.

3 years ago* doc/emacs/maintaining.texi (Managing Projects): Fixes and copyedits.
Glenn Morris [Thu, 25 Mar 2021 03:15:46 +0000 (20:15 -0700)]
* doc/emacs/maintaining.texi (Managing Projects): Fixes and copyedits.

3 years agoFix typo
Dmitry Gutov [Wed, 24 Mar 2021 23:20:26 +0000 (01:20 +0200)]
Fix typo

* lisp/progmodes/project.el (project-remove-known-project):
Fix typo (bug#47287).

3 years agoAdd command project-remove-known-project
Theodor Thornhill [Sun, 21 Mar 2021 23:19:23 +0000 (00:19 +0100)]
Add command project-remove-known-project

* etc/NEWS: Mention the new command.

* lisp/progmodes/project.el (project--remove-from-project-list): Add
new argument, report-message, used to signal various messages when
removal has happened.

* lisp/progmodes/project.el (project-remove-known-project): New
command that removes the selected directory from the project-list-file.

* lisp/progmodes/project.el (project-current): Add the report message.

* doc/emacs/maintaining.text: Add information about the new command to
the manual.

3 years ago* list/progmodes/idl*.el: Use lexical-binding
Stefan Monnier [Wed, 24 Mar 2021 21:11:05 +0000 (17:11 -0400)]
* list/progmodes/idl*.el: Use lexical-binding

* lisp/progmodes/idlw-complete-structtag.el: Use lexical-binding.

* lisp/progmodes/idlw-help.el: Use lexical-binding.
Delete redundant `:group` arguments.
(idlwave-query-class, idlwave-force-class-query, idlw-help-name)
(idlw-help-kwd, idlw-help-link): Declare vars.
(idlwave-highlight-linked-completions): Remove unused var `class`.
(idlwave-help-find-in-doc-header): Remove unused var `header-re`.

* lisp/progmodes/idlw-shell.el (idlwave-shell-input-mode-magic):
Remove XEmacs-only code.
(idlwave-shell-filter, idlwave-shell-scan-for-state):
Use `functionp` since a function can also satisfy `listp`.
(idlwave-shell--mouse-examine): Rename from `idlwave-shell-mouse-examine`.
Make it a function, and simplify for Emacs≥22.  Simplify calling convention
since all callers always immediately `funcall`d the result.
Update all callers.
(idlwave-default-mouse-track-event-is-with-button): Use `always`.
(idlwave-shell-filter-bp): Simplify a tiny bit.

* lisp/progmodes/idlw-toolbar.el: Use lexical-binding.
(idlwave-toolbar-add, idlwave-toolbar-remove)
(idlwave-toolbar-add-everywhere, idlwave-toolbar-remove-everywhere)
(idlwave-toolbar-toggle): Remove XEmacs-only code.

* lisp/progmodes/idlwave.el: Use lexical-binding.
(idlwave--dlet): New macro.
(<toplevel>): Use it.
(idlwave-keyword-abbrev): Turn it into a function.
(idlwave-code-abbrev): Delete macro.
(idlwave-mode-abbrev-table): Use `:enable-function` instead.
(idlwave-with-special-syntax): Delete macro; use `with-syntax-table`
instead in all callers.
(idlwave-action-and-binding): Use `alist-get` and replace `(lambda...)
with a proper closure.  Change all callers to prefer passing a function
in the `cmd` argument.
(idlwave-fill-function): Delete constant var.
Replace its uses with its value (the symbol `auto-fill-function`).
(idlwave-mode): Set `normal-auto-fill-function` instead of the
cumbersome use of `idlwave-fill-function`.  Tighten a regexp.
Don't set `imenu-create-index-function` to the value it should already have.
(idlwave-auto-fill-mode): Make it an obsolete alias for `auto-fill-mode`.
(idlwave-modify-abbrev): Rename from `idlwave-check-abbrev`.
Don't check `idlwave-quoted` since `:enable-function` did it for us already.
(idlwave--command-function): Rename from `idlwave-command-hook`
and make it hold a function rather than an expression.
(idlwave-command-hook, idlwave-modify-abbrev): Adjust accordingly.
(idlwave-show-begin-check): Don't check `idlwave-quoted` since
`:enable-function` did it for us already.
(idlwave-do-action): Use `functionp` since a function can also satisfy `listp`
(idlwave-new-sintern-type): Make it a macro, so we don't need to
`declare-function` for the functions it defines.
(idlwave--class-selector, idlwave--type-selector)
(idlwave--method-selector, idlwave--super-classes): Rename those vars
by adding the `idlwave--` prefix.  Adjust all uses.
(idlwave-complete-functions): Rename from `idlwave-complete-special`.
(idlwave-call-special): Declare obsolete.  Change all callers to use
`run-hook-with-args-until-success` instead.
(idlwave-complete-filename): Use `dlet`.
(idlwave-rinfo-assq-any-class): Remove unused var `class`.
(idlwave-determine-class-functions): Rename from
`idlwave-determine-class-special`; fix docstring since the functions
are called with only one argument.
(idlwave--complete-after-success-function): Rename from
`idlwave-complete-after-success-form` and make it hold a function.
Adjust all users.
(idlwave--complete-after-success-force-function): Rename from
`idlwave-complete-after-success-form-force` and make it hold a function.
Adjust all users.
(idlwave-attach-classes): Remove always-t variable `do-dots`.
(idlwave-local-value): Use `local-variable-p` and `buffer-local-value`
to avoid `with-current-buffer`.
(idlwave-default-choose-completion): Comment out (unused and calls
a function that doesn't exist).
(idlwave-shell-filter-sysvars): Remove unused vars `type`, `name`, and `class`
(idlwave-fix-module-if-obj_new): Remove unused var `name`.
(idlwave-fix-keywords): Bind `idlwave--super-classes` via `let` than
via the function's argument.
(idlwave-twin-class, idlwave-twin-name): Move before first use.
(idlwave-study-twins): Remove stealth/redundant `type` variable.
(idlwave-routine-entry-compare-twins): Remove unused var `type`.
(idlwave-path-alist-add-flag): Avoid `add-to-list` on a local var.
(idlwave-list-abbrevs): Simplify a tiny bit.

3 years ago* lisp/tab-bar.el (tab-bar-tab-post-change-group-functions): New hook.
Juri Linkov [Wed, 24 Mar 2021 20:14:52 +0000 (22:14 +0200)]
* lisp/tab-bar.el (tab-bar-tab-post-change-group-functions): New hook.

(tab-bar-change-tab-group): Run it.
(tab-bar-move-tab-to-group): New command for new hook.

3 years agoImprove failure reporting in test/lisp/electric-tests.el
Alan Mackenzie [Wed, 24 Mar 2021 18:57:48 +0000 (18:57 +0000)]
Improve failure reporting in test/lisp/electric-tests.el

In particular, on a failure, output the test's doc string to
electric-tests.log, along with all the other failure information.
Fixes bug #47320.

* electric-tests.el (electric-pair-test-for) New parameter doc-string.  On a
test failure, output the doc-string parameter with message.
(electric-pair-define-test-form): Set the new variable doc-string to the
generated doc string, and pass this as argument to both ert-deftest and
electric-pair-test-for.

3 years ago* lisp/auth-source-pass.el (auth-source): Silence spurious warning
Stefan Monnier [Wed, 24 Mar 2021 17:45:13 +0000 (13:45 -0400)]
* lisp/auth-source-pass.el (auth-source): Silence spurious warning

3 years agoFix previous format-prompt change: The default can be a symbol
Lars Ingebrigtsen [Wed, 24 Mar 2021 17:29:11 +0000 (18:29 +0100)]
Fix previous format-prompt change: The default can be a symbol

* lisp/minibuffer.el (format-prompt): The default can also be a
symbol.

3 years agoperl-mode: Fix regexps for fontification
Harald Jörg [Wed, 24 Mar 2021 16:06:21 +0000 (17:06 +0100)]
perl-mode: Fix regexps for fontification

* test/lisp/progmodes/cperl-mode-tests.el
(cperl-test-fontify-declarations): New test to ensure consistency
between perl-mode.el and cperl-mode.el (bug#47345).
* lisp/progmodes/perl-mode.el (perl-font-lock-keywords-1): pick
correct capture groups for "use Pack::Age;"
Fontify all components of "Pack::Age", not just "Pack"
(perl-font-lock-keywords-2): Use keyword-face for declarators

3 years agoImprove two native compiler related docstrings.
Andrea Corallo [Wed, 24 Mar 2021 15:59:52 +0000 (16:59 +0100)]
Improve two native compiler related docstrings.

* lisp/emacs-lisp/comp.el (comp-eln-load-path-eff): Improve docstring.
* src/comp.c (comp-eln-load-path): Likewise.

3 years agoRevert "Remove font-lock toggle from font-lock-update"
Lars Ingebrigtsen [Wed, 24 Mar 2021 16:02:17 +0000 (17:02 +0100)]
Revert "Remove font-lock toggle from font-lock-update"

This reverts commit 23995414fec483287e7fb9c9a279483319f9fc54.

The subject is under discussion.

3 years agoRemove font-lock toggle from font-lock-update
Paul W. Rankin [Wed, 24 Mar 2021 14:26:59 +0000 (00:26 +1000)]
Remove font-lock toggle from font-lock-update

* lisp/font-lock.el (font-lock-update): Remove call to
font-lock-unfontify-region and font-lock-mode toggle with ARG; this
did not perform what original author intended

3 years ago* src/lread.c (maybe_swap_for_eln): Fix eln filename (bug#bug#47337).
Andrea Corallo [Wed, 24 Mar 2021 10:23:00 +0000 (11:23 +0100)]
* src/lread.c (maybe_swap_for_eln): Fix eln filename (bug#bug#47337).

3 years agoxref.el: Keep Emacs 26 compatibility
Dmitry Gutov [Wed, 24 Mar 2021 10:39:08 +0000 (12:39 +0200)]
xref.el: Keep Emacs 26 compatibility

* lisp/progmodes/xref.el (xref--read-identifier)
(xref-find-definitions, xref-find-definitions-other-window)
(xref-find-definitions-other-frame, xref-find-references):
Undo the latest change for Emacs 26 compatibility (bug#47286).

3 years agoAdd optional FORMAT argument to 'emacs-init-time'
Gabriel do Nascimento Ribeiro [Wed, 24 Mar 2021 09:34:22 +0000 (10:34 +0100)]
Add optional FORMAT argument to 'emacs-init-time'

* lisp/time.el (emacs-init-time): Add optional FORMAT argument
(bug#47306).

3 years agoReplace "(default %s)" with 'format-prompt'
Gabriel do Nascimento Ribeiro [Wed, 24 Mar 2021 09:31:31 +0000 (10:31 +0100)]
Replace "(default %s)" with 'format-prompt'

* lisp/cmuscheme.el (scheme-load-file, scheme-compile-file):
* lisp/comint.el (comint-get-source):
* lisp/emulation/viper-cmd.el (viper-quote-region, viper-kill-buffer)
(viper-query-replace, viper-read-string-with-history):
* lisp/eshell/esh-mode.el (eshell-find-tag):
* lisp/gnus/gnus-sum.el (gnus-articles-to-read)
(gnus-summary-search-article-forward)
(gnus-summary-search-article-backward):
* lisp/international/mule-cmds.el (set-input-method, toggle-input-method)
(describe-input-method, set-language-environment)
(describe-language-environment):
* lisp/mh-e/mh-gnus.el (mh-mml-minibuffer-read-disposition):
* lisp/mh-e/mh-letter.el (mh-insert-letter):
* lisp/mh-e/mh-mime.el (mh-display-with-external-viewer)
(mh-mime-save-parts, mh-mh-forward-message)
(mh-mml-query-cryptographic-method, mh-minibuffer-read-type):
* lisp/mh-e/mh-seq.el (mh-read-seq, mh-read-range):
* lisp/mh-e/mh-utils.el (mh-prompt-for-folder):
* lisp/progmodes/etags.el (find-tag-tag):
(find-tag-noselect, find-tag, find-tag-other-window)
(find-tag-other-frame, find-tag-regexp):
* lisp/progmodes/idlwave.el (idlwave-find-module):
* lisp/progmodes/inf-lisp.el (lisp-load-file, lisp-compile-file):
* lisp/progmodes/tcl.el (tcl-load-file, tcl-restart-with-file):
* lisp/progmodes/xref.el (xref--read-identifier):
(xref-find-definitions, xref-find-definitions-other-window)
(xref-find-definitions-other-frame, xref-find-references):
* lisp/ses.el (ses-read-printer):
(ses-read-cell-printer, ses-read-column-printer)
(ses-read-default-printer, ses-define-local-printer):
* lisp/subr.el (read-number):
* lisp/term.el (term-get-source):
* src/minibuf.c (read-buffer): Remove prompt suffix and
use 'format-prompt'.
* lisp/minibuffer.el (format-prompt): Ignore DEFAULT empty strings
(bug#47286).

3 years agoFix problem with filling with a computed fill prefix
Lars Ingebrigtsen [Wed, 24 Mar 2021 09:23:07 +0000 (10:23 +0100)]
Fix problem with filling with a computed fill prefix

* lisp/textmodes/fill.el (fill-region-as-paragraph): Fix problem
when filling text with a computed fill prefix (bug#47338).

3 years agoConvert many more links to use HTTPS
Stefan Kangas [Wed, 24 Mar 2021 08:28:32 +0000 (09:28 +0100)]
Convert many more links to use HTTPS

3 years agoMove string-trim functions to subr.el
Lars Ingebrigtsen [Wed, 24 Mar 2021 08:22:40 +0000 (09:22 +0100)]
Move string-trim functions to subr.el

* doc/lispref/strings.texi (Creating Strings): Document them.

* lisp/faces.el: Don't require subr-x, because that leads to build
errors.

* lisp/subr.el (string-trim, string-trim-right)
(string-trim-left): Move here from subr-x.el.

* lisp/emacs-lisp/shortdoc.el (string): Adjust.

3 years agoUse lexical-binding in iimage.el
Stefan Kangas [Wed, 24 Mar 2021 08:09:52 +0000 (09:09 +0100)]
Use lexical-binding in iimage.el

* lisp/iimage.el: Use lexical-binding.  Remove redundant :group args.

3 years ago* lisp/talk.el: Use lexical-binding.
Stefan Kangas [Wed, 24 Mar 2021 08:05:06 +0000 (09:05 +0100)]
* lisp/talk.el: Use lexical-binding.

3 years agoUse lexical-binding in two trivial org-mode files
Stefan Kangas [Wed, 24 Mar 2021 05:33:45 +0000 (06:33 +0100)]
Use lexical-binding in two trivial org-mode files

This change has already been made on org-mode's master branch.

* lisp/org/org-install.el:
* lisp/org/org-version.el: Use lexical-binding.

3 years ago* lisp/help-at-pt.el: Use lexical-binding.
Stefan Kangas [Wed, 24 Mar 2021 05:31:23 +0000 (06:31 +0100)]
* lisp/help-at-pt.el: Use lexical-binding.

3 years ago* lisp/progmodes/simula.el (hilit-set-mode-patterns): Use regexp-opt.
Stefan Kangas [Wed, 24 Mar 2021 05:23:10 +0000 (06:23 +0100)]
* lisp/progmodes/simula.el (hilit-set-mode-patterns): Use regexp-opt.

3 years ago* lisp/progmodes/modula2.el: Use lexical-binding.
Stefan Kangas [Wed, 24 Mar 2021 05:20:33 +0000 (06:20 +0100)]
* lisp/progmodes/modula2.el: Use lexical-binding.

3 years agoUse lexical-binding in view.el
Stefan Kangas [Wed, 24 Mar 2021 04:46:11 +0000 (05:46 +0100)]
Use lexical-binding in view.el

* lisp/view.el: Use lexical-binding.  Remove redundant :group args.

3 years agoDelete some commented out defgroups
Stefan Kangas [Wed, 24 Mar 2021 05:06:41 +0000 (06:06 +0100)]
Delete some commented out defgroups

* lisp/eshell/esh-opt.el:
* lisp/international/ccl.el:
* lisp/pcmpl-linux.el:
* lisp/shell.el:
* lisp/url/url-news.el: Delete some commented out defgroups.

3 years agoDoc fixes in view.el
Stefan Kangas [Wed, 24 Mar 2021 04:43:53 +0000 (05:43 +0100)]
Doc fixes in view.el

* lisp/view.el:
(view-try-extend-at-buffer-end, kill-buffer-if-not-modified)
(view-buffer, view-buffer-other-window, view-buffer-other-frame)
(view-page-size-default, view-set-half-page-size-default)
(view-really-at-end, view-end-message)
(view-search-no-match-lines): Doc fixes.

3 years ago* lisp/master.el: Use lexical-binding.
Stefan Kangas [Wed, 24 Mar 2021 04:32:47 +0000 (05:32 +0100)]
* lisp/master.el: Use lexical-binding.

3 years agoUse lexical-binding in ruler-mode.el
Stefan Kangas [Wed, 24 Mar 2021 02:47:27 +0000 (03:47 +0100)]
Use lexical-binding in ruler-mode.el

* lisp/ruler-mode.el: Use lexical-binding.  Remove redundant
:group args.

3 years ago* lisp/progmodes/ebnf-*.el: Use lexical-binding
Stefan Monnier [Wed, 24 Mar 2021 02:38:41 +0000 (22:38 -0400)]
* lisp/progmodes/ebnf-*.el: Use lexical-binding

* lisp/progmodes/ebnf-abn.el:
* lisp/progmodes/ebnf-bnf.el:
* lisp/progmodes/ebnf-dtd.el:
* lisp/progmodes/ebnf-ebx.el:
* lisp/progmodes/ebnf-iso.el:
* lisp/progmodes/ebnf-otz.el:
* lisp/progmodes/ebnf-yac.el: Enable lexical-binding.
* lisp/progmodes/ebnf2ps.el (ebnf-apply-style1)
(ebnf-insert-ebnf-prologue): Use lexical-binding.

3 years ago* lisp/mh-e: Enable lexical-binding in all the files
Stefan Monnier [Tue, 23 Mar 2021 05:00:56 +0000 (01:00 -0400)]
* lisp/mh-e: Enable lexical-binding in all the files

* lisp/mh-e/mh-alias.el: Use lexical-binding.
(mh-alias-insert-file): Completion tables can be mere lists of strings.

* lisp/mh-e/mh-mime.el: Use lexical-binding.
(mh-mm-inline-message): Remove always-nil var `visible-headers`.

* lisp/mh-e/mh-search.el: Use lexical-binding.
(mh-search-folder): Remove unused var `pick-folder`.

* lisp/mh-e/mh-show.el: Use lexical-binding.
(mh-display-msg): Remove always-nil var `visible-headers`.

* lisp/mh-e/mh-utils.el: Use lexical-binding.
(completion-root-regexp): Always declare var.

* lisp/mh-e/mh-buffers.el: Use lexical-binding.
* lisp/mh-e/mh-comp.el: Use lexical-binding.
* lisp/mh-e/mh-folder.el: Use lexical-binding.
* lisp/mh-e/mh-funcs.el: Use lexical-binding.
* lisp/mh-e/mh-gnus.el: Use lexical-binding.
* lisp/mh-e/mh-identity.el: Use lexical-binding.
* lisp/mh-e/mh-inc.el: Use lexical-binding.
* lisp/mh-e/mh-junk.el: Use lexical-binding.
* lisp/mh-e/mh-letter.el: Use lexical-binding.
* lisp/mh-e/mh-limit.el: Use lexical-binding.
* lisp/mh-e/mh-print.el: Use lexical-binding.
* lisp/mh-e/mh-scan.el: Use lexical-binding.
* lisp/mh-e/mh-seq.el: Use lexical-binding.
* lisp/mh-e/mh-speed.el: Use lexical-binding.
* lisp/mh-e/mh-thread.el: Use lexical-binding.
* lisp/mh-e/mh-tool-bar.el: Use lexical-binding.
* lisp/mh-e/mh-xface.el: Use lexical-binding.

3 years ago* lisp/wdired.el: Fix typo in last change.
Stefan Monnier [Tue, 23 Mar 2021 04:08:24 +0000 (00:08 -0400)]
* lisp/wdired.el: Fix typo in last change.

Reported by Michael Heerdegen <michael_heerdegen@web.de>.

(wdired-change-to-wdired-mode, wdired-change-to-dired-mode):
The `(local FOO)` form takes an expression, so the var needs to be quoted.

3 years agoMention `C-o' in the `RET' doc string
Lars Ingebrigtsen [Mon, 22 Mar 2021 19:25:37 +0000 (20:25 +0100)]
Mention `C-o' in the `RET' doc string

* lisp/simple.el (newline-and-indent): Mention `C-o' in the doc
string.

3 years agoFix previous face.el change
Lars Ingebrigtsen [Mon, 22 Mar 2021 19:18:00 +0000 (20:18 +0100)]
Fix previous face.el change

* lisp/faces.el (require): Fix compilation warning from previous
face.el change.

3 years ago* lisp/tab-bar.el (tab-bar-new-tab-group): Set default to t.
Juri Linkov [Mon, 22 Mar 2021 18:55:49 +0000 (20:55 +0200)]
* lisp/tab-bar.el (tab-bar-new-tab-group): Set default to t.

(tab-bar-tabs, tab-bar-select-tab, tab-bar-new-tab-to):
Use tab-bar--current-tab-make instead of tab-bar--current-tab.
(tab-bar--tab): Add arg 'frame' to tab-bar--current-tab-find.
(tab-bar--current-tab, tab-bar--current-tab-make): Move most of body
from the former to the latter, thus reverting tab-bar--current-tab
to its previous behavior.
https://lists.gnu.org/archive/html/emacs-devel/2021-03/msg00959.html

3 years agoUse read-color in read-face-attribute for color attributes
Lars Ingebrigtsen [Mon, 22 Mar 2021 18:47:25 +0000 (19:47 +0100)]
Use read-color in read-face-attribute for color attributes

* lisp/faces.el (read-face-attribute): Use read-color when
prompting for a color (bug#47316).

3 years ago* lisp/files-x.el (connection-local-criteria-for-default-directory):
Michael Albinus [Mon, 22 Mar 2021 16:47:45 +0000 (17:47 +0100)]
* lisp/files-x.el (connection-local-criteria-for-default-directory):

Add optional argument APPLICATION.

3 years agoRemove unnecessary requires of rx
Stefan Kangas [Sun, 21 Mar 2021 23:02:14 +0000 (00:02 +0100)]
Remove unnecessary requires of rx

* lisp/cedet/semantic/wisent/python.el (rx):
* test/src/process-tests.el (rx): Remove unnecessary requires.

3 years agoUse lexical-binding in notifications.el
Stefan Kangas [Sun, 21 Mar 2021 16:27:44 +0000 (17:27 +0100)]
Use lexical-binding in notifications.el

* lisp/notifications.el: Use lexical-binding.
(notifications-notify): Prefer 'push' to 'add-to-list'.

3 years ago* lisp/emacs-lisp/comp.el (comp-lookup-eln): Add autoload cookie.
Andrea Corallo [Sun, 21 Mar 2021 20:55:13 +0000 (21:55 +0100)]
* lisp/emacs-lisp/comp.el (comp-lookup-eln): Add autoload cookie.

3 years ago; * src/comp.c (Fcomp_el_to_eln_filename): Improve docstring.
Andrea Corallo [Sun, 21 Mar 2021 20:49:03 +0000 (21:49 +0100)]
; * src/comp.c (Fcomp_el_to_eln_filename): Improve docstring.

3 years ago* lisp/emacs-lisp/comp.el (comp-lookup-eln): Add new function.
Andrea Corallo [Sun, 21 Mar 2021 20:24:26 +0000 (21:24 +0100)]
* lisp/emacs-lisp/comp.el (comp-lookup-eln): Add new function.

3 years agoPrevent unnecessary multiple .el hashing in 'maybe_swap_for_eln'
Andrea Corallo [Sun, 21 Mar 2021 19:40:45 +0000 (20:40 +0100)]
Prevent unnecessary multiple .el hashing in 'maybe_swap_for_eln'

* src/comp.c (Fcomp_el_to_eln_rel_filename): New function.
(Fcomp_el_to_eln_filename): Make use of.
(syms_of_comp): Register 'Scomp_el_to_eln_rel_filename'.
* src/lread.c (maybe_swap_for_eln): Make use of
'Fcomp_el_to_eln_rel_filename' to hash prevent unnecessary
multiple hashing.

3 years ago; * test/Makefile.in (TEST_HOME): Add a note.
Andrea Corallo [Sun, 21 Mar 2021 18:39:52 +0000 (19:39 +0100)]
; * test/Makefile.in (TEST_HOME): Add a note.

3 years agoPrevent open minibuffers getting lost when their frame gets deleted
Alan Mackenzie [Sun, 21 Mar 2021 16:54:31 +0000 (16:54 +0000)]
Prevent open minibuffers getting lost when their frame gets deleted

This happened with minibuffer-follows-selected-frame set to t.

* doc/emacs/mini.texi (Basic Minibuffer): State where a command's action takes
place when a minibuffer's frame has been deleted.

* lisp/window.el (window--before-delete-windows, record-window-buffer): Take
into account that minibuffers are now recorded on w->prev_buffers field.

* src/fns.c (merge_c): New version of `merge' taking a C function, rather than
a Lisp function as the comparison function.

* src/frame.c (do_switch_frame): Pass arguments sf and for_deletion to
move_minibuffers_onnto_frame.

* src/lisp.h (top level): Declare merge_c and
move_minibuffers_onto_selected_frame.

* src/minibuf.c (MB_frame): New Lisp_Object recording the minibuffer's frame.
(choose_minibuf_frame): Remove all code except that which sets minibuf_window
to the current frame's minibuffer.
(minibuffer_ent_greater): New comparison function, passed to merge_c.
(zip_minibuffer_stacks): New function.
(move_minibuffers_onto_frame): Renamed from `move_minibuffer_onto_frame' given
two arguments, the old frame and for_deletion, and simplified.  Minibuffers
are now stacked in the mini-window's ->prev_buffers field.
(read_minibuf): Several detailed amendments.
(exp_MB_frame): New Lisp_Object, the expired minibuffer's frame.
(read_minibuf_unwind): Search for the expired minibuffer's frame, rather than
taking it from (unreliable) variables.  Switch temporarily to this frame for
tidying up operations.
(minibuffer_unwind): New function which pops a stacked minibuffer.
(syms_of_minibuf): Call staticpro for the two new Lisp variables.

* src/window.c (Fset_window_configuration): Don't record minibuffers with
record-window-buffer.

* src/xdisp.c (gui_consider_frame_title): Remove redundant Fselect_window,
which caused an unwanted frame switch.  Amend the arguments to
format_mode_line_unwind_data to match.

3 years agoAdd a tmp dir to `comp-eln-load-path' when running the testsuite.
Andrea Corallo [Sun, 21 Mar 2021 15:55:19 +0000 (16:55 +0100)]
Add a tmp dir to `comp-eln-load-path' when running the testsuite.

* lisp/startup.el (normal-top-level): Tweak `comp-eln-load-path'
adding a temp directory when running the testsuite.

3 years ago* lisp/thumbs.el (thumbs-conversion-program): Simplify.
Glenn Morris [Sun, 21 Mar 2021 16:15:51 +0000 (09:15 -0700)]
* lisp/thumbs.el (thumbs-conversion-program): Simplify.

/usr/bin is (normally) always in PATH, and this need not be absolute,
so the executable-find is unnecesary.

3 years agoActually use lexical-binding in wid-browse.el
Stefan Kangas [Sun, 21 Mar 2021 16:04:32 +0000 (17:04 +0100)]
Actually use lexical-binding in wid-browse.el

* lisp/wid-browse.el: Use lexical-binding.  I apparently forgot to
commit the lexical-binding cookie in my previous attempt.

3 years agoRevert "* lisp/emacs-lisp/comp.el (comp-clean-up-stale-eln): Clean-up all..."
Andrea Corallo [Sun, 21 Mar 2021 14:32:52 +0000 (15:32 +0100)]
Revert "* lisp/emacs-lisp/comp.el (comp-clean-up-stale-eln): Clean-up all..."

This reverts commit be22cda7be9e77e67f224f6f07cca9dd44aaa078.

Older binaries might still need those .eln if they where preloaded.

3 years agoUse pop-to-buffer-same-window for shell
Theodor Thornhill [Sun, 21 Mar 2021 07:02:28 +0000 (08:02 +0100)]
Use pop-to-buffer-same-window for shell

* lisp/progmodes/project.el (project-shell): Behave the same way as
'M-x project-eshell'.
* lisp/shell.el (shell): Behave the same way as 'M-x eshell'.
* etc/NEWS: Add news entry describing the change.
* lisp/tutorial.el: Use lexical-binding.

3 years ago; Remove two unnecessary quotes
Andrea Corallo [Sun, 21 Mar 2021 08:28:25 +0000 (09:28 +0100)]
; Remove two unnecessary quotes

* lisp/emacs-lisp/comp-cstr.el (comp-cstr-=): Remove unnecessary
quote.
* lisp/emacs-lisp/comp.el (comp-compile-ctxt-to-file): Likewise.

3 years ago* lisp/emacs-lisp/comp.el (comp-clean-up-stale-eln): Clean-up all .eln dirs.
Andrea Corallo [Sun, 21 Mar 2021 08:15:25 +0000 (09:15 +0100)]
* lisp/emacs-lisp/comp.el (comp-clean-up-stale-eln): Clean-up all .eln dirs.

3 years agoAllow hide-ifdef-guts to work in buffers not visiting files
Zhiwei Chen [Sun, 21 Mar 2021 07:09:14 +0000 (08:09 +0100)]
Allow hide-ifdef-guts to work in buffers not visiting files

* lisp/progmodes/hideif.el (hide-ifdef-guts): Allow working in
buffers not visiting files (bug#47279).

Copyright-paperwork-exempt: yes

3 years ago* lisp/tutorial.el: Use lexical-binding.
Stefan Kangas [Sun, 21 Mar 2021 01:26:37 +0000 (02:26 +0100)]
* lisp/tutorial.el: Use lexical-binding.

3 years ago* lisp/cedet/semantic/ia.el (semantic-ia-complete-symbol): Simplify
Stefan Monnier [Sun, 21 Mar 2021 00:39:01 +0000 (20:39 -0400)]
* lisp/cedet/semantic/ia.el (semantic-ia-complete-symbol): Simplify

Cut the `semantic-ia-get-completions-deprecated` middle man.

3 years agoRemove support for Syndic8.com, defunct since 2013
Stefan Kangas [Sat, 20 Mar 2021 15:09:29 +0000 (16:09 +0100)]
Remove support for Syndic8.com, defunct since 2013

* lisp/gnus/nnrss.el (nnrss-discover-feed)
(nnrss-find-rss-via-syndic8): Remove support for Syndic8.com, as
the site was shut down in 2013.

3 years ago; * etc/NEWS: Minor improvement to the last change.
Eli Zaretskii [Sat, 20 Mar 2021 10:11:04 +0000 (12:11 +0200)]
; * etc/NEWS: Minor improvement to the last change.

3 years ago; Improve a recent change in NEWS
Eli Zaretskii [Sat, 20 Mar 2021 09:08:25 +0000 (11:08 +0200)]
; Improve a recent change in NEWS

* etc/NEWS: Enhance the description of how to get the old bindings
removed with the 'M-o' keymap.

3 years agoFix cl-progv binding order
Toby Cubitt [Sat, 20 Mar 2021 09:01:13 +0000 (10:01 +0100)]
Fix cl-progv binding order

* lisp/emacs-lisp/cl-macs.el (cl-progv): Bind variables in the
correct order (bug#47272).

3 years ago* etc/NEWS: Small corrections for the new command 'font-lock-update'
Gregory Heytings [Sat, 20 Mar 2021 07:54:07 +0000 (08:54 +0100)]
* etc/NEWS: Small corrections for the new command 'font-lock-update'

3 years agoRemove Gnus specific .dir-locals.el
Stefan Kangas [Sat, 20 Mar 2021 08:58:02 +0000 (09:58 +0100)]
Remove Gnus specific .dir-locals.el

* lisp/gnus/.dir-locals.el: Delete file.  The only variable it set was
'show-trailing-whitespace', but this should be up to the individual
developer.  (Bug#47278)

3 years agoPrefer https and fix broken links in ERC
Stefan Kangas [Sat, 20 Mar 2021 06:48:51 +0000 (07:48 +0100)]
Prefer https and fix broken links in ERC

* lisp/erc/erc-button.el (erc-button-rfc-url)
(erc-button-search-url): Prefer https.
* lisp/erc/erc-capab.el:
* lisp/erc/erc.el (erc-cmd-MODE): Fix broken links.

3 years ago* lisp/thumbs.el (thumbs-show-from-dir): Improve prompt.
Stefan Kangas [Sat, 20 Mar 2021 04:12:18 +0000 (05:12 +0100)]
* lisp/thumbs.el (thumbs-show-from-dir): Improve prompt.

3 years agoFix args-out-of-range error in format.el
Eli Zaretskii [Sat, 20 Mar 2021 08:48:07 +0000 (10:48 +0200)]
Fix args-out-of-range error in format.el

* lisp/format.el (format-deannotate-region): Ignore todo items
with FROM > TO.  (Bug#47277)

3 years agoDon’t convert pointer to bool
Paul Eggert [Sat, 20 Mar 2021 00:47:24 +0000 (17:47 -0700)]
Don’t convert pointer to bool

Without this patch, Oracle Studio 12.6 complains about converting
pointer to bool.
* src/editfns.c (styled_format): Use !!.

3 years agoAssume something more recent than X11R6
Stefan Kangas [Sat, 20 Mar 2021 00:16:26 +0000 (01:16 +0100)]
Assume something more recent than X11R6

* lisp/bindings.el:
* lisp/menu-bar.el:
* lisp/printing.el:
* lisp/thumbs.el (thumbs-conversion-program): Assume we have something
more recent than X11R6.

3 years agoUse lexical-binding in thumbs.el
Stefan Kangas [Sat, 20 Mar 2021 00:10:37 +0000 (01:10 +0100)]
Use lexical-binding in thumbs.el

* lisp/thumbs.el: Use lexical-binding.  Remove redundant :group args.
* test/lisp/thumbs-tests.el: New file.

3 years ago* lisp/novice.el: Use lexical-binding.
Stefan Kangas [Fri, 19 Mar 2021 23:12:38 +0000 (00:12 +0100)]
* lisp/novice.el: Use lexical-binding.

3 years ago* lisp/wdired.el: Use lexical-binding
Stefan Monnier [Fri, 19 Mar 2021 23:04:27 +0000 (19:04 -0400)]
* lisp/wdired.el: Use lexical-binding

Remove redundant `:group` args.

(wdired-change-to-wdired-mode): Use `add-function` to modify
`revert-buffer-function`.
(wdired-change-to-dired-mode): Adjust accordingly.
(wdired-do-renames): Make sure to bind `dired-backup-overwrite` dynamically.

3 years agoDon't tag mouse command as mode exclusive
Stefan Kangas [Fri, 19 Mar 2021 22:59:47 +0000 (23:59 +0100)]
Don't tag mouse command as mode exclusive

* lisp/finder.el (finder-mouse-select): Don't tag for finder-mode.

3 years ago* lisp/emacs-lisp/bytecomp.el: Remember location of unresolved calls
Stefan Monnier [Fri, 19 Mar 2021 22:33:38 +0000 (18:33 -0400)]
* lisp/emacs-lisp/bytecomp.el: Remember location of unresolved calls

I've gotten tired of seeing the "function foo not known to be defined"
warning without any line number information.  So this patch adds as
line number the position of the first use of that function in the file
(well, approximately, as usual).

(byte-compile-unresolved-functions): Add POSITIONs in the alist.
(byte-compile-function-warn): Store the current position in
`byte-compile-unresolved-functions`.
(byte-compile-arglist-warn): Adjust accordingly.
(byte-compile-print-syms): Delete unused function.
(byte-compile-warn-about-unresolved-functions): Use the stored position
to give more precise warnings.

3 years ago* lisp/emacs-lisp/pcase.el (pcase-compile-patterns): New function (bug#47261)
Stefan Monnier [Fri, 19 Mar 2021 21:42:22 +0000 (17:42 -0400)]
* lisp/emacs-lisp/pcase.el (pcase-compile-patterns): New function (bug#47261)

Extracted from `pcase--expand`.
(pcase--expand): Use it.

3 years agoMerge remote-tracking branch 'savannah/master' into native-comp
Andrea Corallo [Fri, 19 Mar 2021 14:28:00 +0000 (15:28 +0100)]
Merge remote-tracking branch 'savannah/master' into native-comp

3 years agoImprove the docs of a recent change in mb-depth.el
Eli Zaretskii [Fri, 19 Mar 2021 12:46:15 +0000 (14:46 +0200)]
Improve the docs of a recent change in mb-depth.el

* lisp/mb-depth.el (minibuffer-depth-indicator-function): Improve
the wording of the doc string and of the label used for the
default value.  (Bug#47252)

3 years agoDo not load native code when `load' is explicitly called on a .elc file
Andrea Corallo [Fri, 19 Mar 2021 09:23:41 +0000 (10:23 +0100)]
Do not load native code when `load' is explicitly called on a .elc file

* src/lread.c (Fload): Do not load native code when `load' is
explicitly called on a .elc file.
(Flocate_file_internal): Update 'openp' call sites.
(maybe_swap_for_eln): Add new 'no_native' parameter.
(openp): Likewise + update 'maybe_swap_for_eln' and 'openp' call
sites.
* src/lisp.h: Update 'openp' signature.
* src/w32proc.c (sys_spawnve): Update 'openp' call sites.
* src/w32.c (check_windows_init_file): Likewise.
* src/sound.c (Fplay_sound_internal): Likewise.
* src/process.c (Fmake_process): Likewise.
* src/image.c (image_create_bitmap_from_file)
(image_find_image_fd): Likewise.
* src/emacs.c (set_invocation_vars): Likewise.
* src/charset.c (load_charset_map_from_file): Likewise.
* src/callproc.c (call_process): Likewise.

3 years agoFix :type of recently introduced defcustom
Mauro Aranda [Fri, 19 Mar 2021 08:50:55 +0000 (05:50 -0300)]
Fix :type of recently introduced defcustom

* lisp/mb-depth.el (minibuffer-depth-indicator-function): The option
can be nil, so add nil as a choice.  (Bug#47252)

3 years agoMake minibuffer-depth-indicator-function a defcustom
Gabriel do Nascimento Ribeiro [Fri, 19 Mar 2021 08:37:55 +0000 (09:37 +0100)]
Make minibuffer-depth-indicator-function a defcustom

* lisp/mb-depth.el (minibuffer-depth-indicator-function): Make
into a user option (bug#47252).

3 years agoWarn the user if we can't find pkg-config
Lars Ingebrigtsen [Fri, 19 Mar 2021 07:58:32 +0000 (08:58 +0100)]
Warn the user if we can't find pkg-config

* configure.ac (WITH_IFAVAILABLE): Warn the user if we can't find
a usable pkg-config (bug#47159).

3 years agoAdd a note to NEWS as to how to restore the facemenu
Lars Ingebrigtsen [Fri, 19 Mar 2021 07:44:19 +0000 (08:44 +0100)]
Add a note to NEWS as to how to restore the facemenu

3 years agoFix copyright lines mistakenly treated as outline headers
Stefan Monnier [Fri, 19 Mar 2021 03:32:57 +0000 (23:32 -0400)]
Fix copyright lines mistakenly treated as outline headers

* lisp/emacs-lisp/generator.el:
* test/lisp/cedet/semantic-utest.el:
* test/lisp/cedet/semantic/format-tests.el:
* test/lisp/cedet/semantic/fw-tests.el:
* test/lisp/cedet/semantic/bovine/gcc-tests.el:
* test/lisp/cedet/semantic/format-resources/test-fmt.el:
* test/manual/cedet/semantic-tests.el:
* lisp/obsolete/inversion.el: Use only 2 semi-colons before "Copyright".

3 years agolisp/erc: Use lexical-binding
Stefan Monnier [Fri, 19 Mar 2021 03:14:33 +0000 (23:14 -0400)]
lisp/erc: Use lexical-binding

Also remove various redundant `:group` arguments.

* lisp/erc/erc-backend.el (define-erc-response-handler): Move `declare`
after the docstring.

* lisp/erc/erc-capab.el: Use lexical-binding.
(erc-capab-identify-activate): Simplify with `member`.

* lisp/erc/erc-dcc.el (erc-dcc): Move before erc-dcc-mode definition,
which refers to it.
(erc-dcc-chat-accept): Remove unused vars `nick` and `buffer`.

* lisp/erc/erc-imenu.el: Use lexical-binding.
(erc-create-imenu-index): Remove unused var `prev-pos`.

* lisp/erc/erc-match.el: Use lexical-binding.
(erc-match-message): Remove unused var `old-pt`.
(erc-match-message): Strength-reduce `eval` to `symbol-value`.

* lisp/erc/erc-page.el: Use lexical-binding.
(erc-page): Move Custom group before `erg-page-mode` which refers to it.

* lisp/erc/erc-replace.el: Use lexical-binding.
(erc-replace-insert): Use `functionp`.

* lisp/erc/erc-status-sidebar.el: Use lexical-binding.
(erc-status-sidebar-open): Remove unused var `sidebar-window`.

* lisp/erc/erc.el: Fix header to use the customary 3 semi-colons.
(erc-fill-column): Declare variable.

* lisp/erc/erc-autoaway.el: Use lexical-binding.
* lisp/erc/erc-ezbounce.el: Use lexical-binding.
* lisp/erc/erc-fill.el: Use lexical-binding.
* lisp/erc/erc-goodies.el: Use lexical-binding.
* lisp/erc/erc-ibuffer.el: Use lexical-binding.
* lisp/erc/erc-identd.el: Use lexical-binding.
* lisp/erc/erc-join.el: Use lexical-binding.
* lisp/erc/erc-lang.el: Use lexical-binding.
* lisp/erc/erc-log.el: Use lexical-binding.
* lisp/erc/erc-menu.el: Use lexical-binding.
* lisp/erc/erc-netsplit.el: Use lexical-binding.
* lisp/erc/erc-networks.el: Use lexical-binding.
* lisp/erc/erc-pcomplete.el: Use lexical-binding.
* lisp/erc/erc-ring.el: Use lexical-binding.
* lisp/erc/erc-speedbar.el: Use lexical-binding.
* lisp/erc/erc-spelling.el: Use lexical-binding.
* lisp/erc/erc-truncate.el: Use lexical-binding.
* lisp/erc/erc-xdcc.el: Use lexical-binding.

3 years agoDo interactive mode tagging for finder.el
Stefan Kangas [Fri, 19 Mar 2021 01:22:25 +0000 (02:22 +0100)]
Do interactive mode tagging for finder.el

3 years agoUse lexical-binding in finder.el
Stefan Kangas [Fri, 19 Mar 2021 01:14:10 +0000 (02:14 +0100)]
Use lexical-binding in finder.el

* lisp/finder.el: Use lexical-binding.
(finder-mode-map, finder-compile-keywords): Remove unused lexical
variables.

3 years agoFix a warning due to not preloading facemenu.el
Stefan Kangas [Fri, 19 Mar 2021 01:12:01 +0000 (02:12 +0100)]
Fix a warning due to not preloading facemenu.el

* test/src/undo-tests.el (facemenu): Require.

3 years ago* lisp/faces.el (help-key-binding): Tweak background.
Stefan Kangas [Thu, 18 Mar 2021 22:36:08 +0000 (23:36 +0100)]
* lisp/faces.el (help-key-binding): Tweak background.

3 years ago* lisp/emacs-lisp/cl-macs.el (cl--self-tco): Optimize the "return nil" case
Stefan Monnier [Thu, 18 Mar 2021 21:54:43 +0000 (17:54 -0400)]
* lisp/emacs-lisp/cl-macs.el (cl--self-tco): Optimize the "return nil" case

3 years ago* test/lisp/progmodes/cperl-mode-tests.el: Silence warnings
Stefan Monnier [Thu, 18 Mar 2021 18:32:36 +0000 (14:32 -0400)]
* test/lisp/progmodes/cperl-mode-tests.el: Silence warnings

(cperl-test-bug-47112): Actually obey the major-mode for the test.

3 years ago* lisp/newcomment.el: Allow 'comment-continue' with whitespace (bug#47167)
Juri Linkov [Thu, 18 Mar 2021 18:01:26 +0000 (20:01 +0200)]
* lisp/newcomment.el: Allow 'comment-continue' with whitespace (bug#47167)

* lisp/newcomment.el (comment-region-default-1): Still use 'comment-continue'
as a string with whitespace even when 'comment-padright' returns nil.

3 years ago* lisp/simple.el (next-error-quit-window): New function (bug#44611).
Juri Linkov [Thu, 18 Mar 2021 17:56:45 +0000 (19:56 +0200)]
* lisp/simple.el (next-error-quit-window): New function (bug#44611).

(next-error-found-function): Add it as a choice.

3 years ago; ChangeLog.3 fix
Glenn Morris [Thu, 18 Mar 2021 16:16:10 +0000 (09:16 -0700)]
; ChangeLog.3 fix

admin/make-tarball.txt:
"It's best not to commit these files until the release is actually made"

3 years ago* admin/make-tarball.txt: Be kind to people merging branches.
Glenn Morris [Thu, 18 Mar 2021 16:02:30 +0000 (09:02 -0700)]
* admin/make-tarball.txt: Be kind to people merging branches.

3 years agoMerge from origin/emacs-27
Glenn Morris [Thu, 18 Mar 2021 15:52:48 +0000 (08:52 -0700)]
Merge from origin/emacs-27

d5b160d7cc (tag: emacs-27.2-rc1, origin/emacs-27) Prepare the Emacs 2...
216bd67a4f ; * admin/make-tarball.txt: Advise to remove stale subdire...

# Conflicts:
# ChangeLog.3
# README
# configure.ac
# etc/AUTHORS
# etc/NEWS
# lisp/ldefs-boot.el
# msdos/sed2v2.inp
# nt/README.W32

3 years ago; Merge from origin/emacs-27
Glenn Morris [Thu, 18 Mar 2021 15:50:32 +0000 (08:50 -0700)]
; Merge from origin/emacs-27

The following commit was skipped:

7ae4588bb4 Document that `buffer-string' retains text properties

3 years agoMerge from origin/emacs-27
Glenn Morris [Thu, 18 Mar 2021 15:50:32 +0000 (08:50 -0700)]
Merge from origin/emacs-27

a7f95d5244 Remove duplicate @table item from ELisp manual
be1b3512f7 Fix reference to 'diff-font-lock-syntax' in diff-mode docu...

3 years ago; Merge from origin/emacs-27
Glenn Morris [Thu, 18 Mar 2021 15:50:32 +0000 (08:50 -0700)]
; Merge from origin/emacs-27

The following commit was skipped:

b9ec6111e2 Fix buffer overflow in xbm_scan (bug#47094)

3 years agoMerge from origin/emacs-27
Glenn Morris [Thu, 18 Mar 2021 15:50:32 +0000 (08:50 -0700)]
Merge from origin/emacs-27

f60eb988f6 Fix typos and omissions for (elisp)Button Buffer Commands
876b95bf90 Teach Rmail about NBSP in "Re:"

# Conflicts:
# lisp/mail/rmail.el