]> git.eshelyaron.com Git - emacs.git/log
emacs.git
3 years agoFix M-n description in refcards
Lars Ingebrigtsen [Thu, 5 Aug 2021 11:14:26 +0000 (13:14 +0200)]
Fix M-n description in refcards

* etc/refcards/pl-refcard.tex (section{Szukanie przyrostowe}):
Ditto (in comments).

* etc/refcards/refcard.tex (section{Incremental Search}): Fix M-n
description (bug#49872).

3 years ago; Fix oauth typos in last change.
Basil L. Contovounesios [Thu, 5 Aug 2021 10:40:31 +0000 (11:40 +0100)]
; Fix oauth typos in last change.

3 years agoAdd support for the oauth2.el library in nnimap and smtpmail
Roland Winkler [Thu, 5 Aug 2021 10:33:21 +0000 (12:33 +0200)]
Add support for the oauth2.el library in nnimap and smtpmail

* doc/misc/gnus.texi (Customizing the IMAP Connection):
* doc/misc/smtpmail.texi (Authentication): Mention it.

* lisp/gnus/nnimap.el (nnimap-login): Support oauth2.

* lisp/mail/smtpmail.el (smtpmail-try-auth-method): New function
for oauth2.

3 years ago* lisp/cus-start.el (read-minibuffer-restore-windows): Fix entry.
Glenn Morris [Thu, 5 Aug 2021 00:42:55 +0000 (17:42 -0700)]
* lisp/cus-start.el (read-minibuffer-restore-windows): Fix entry.

3 years ago* lisp/vc/smerge-mode.el (smerge-mode-menu): Add menu item for smerge-refine.
Juri Linkov [Wed, 4 Aug 2021 20:43:21 +0000 (23:43 +0300)]
* lisp/vc/smerge-mode.el (smerge-mode-menu): Add menu item for smerge-refine.

3 years agoPackage archive location needs to be absolute filename
dickmao [Wed, 4 Aug 2021 08:50:38 +0000 (10:50 +0200)]
Package archive location needs to be absolute filename

* lisp/emacs-lisp/package.el (package--with-response-buffer-1):
Actually check that URL is absolute (bug#49788).

3 years agoAdd a new thing-at-point type: existing-filename
Lars Ingebrigtsen [Wed, 4 Aug 2021 08:35:53 +0000 (10:35 +0200)]
Add a new thing-at-point type: existing-filename

* doc/lispref/text.texi (Buffer Contents): Mention it.

* lisp/thingatpt.el (thing-at-point-file-at-point): New function.
(existing-filename): Register it.

3 years agoMake `M-j' work reliably if `comment-auto-fill-only-comments' is set
Lars Ingebrigtsen [Wed, 4 Aug 2021 08:03:12 +0000 (10:03 +0200)]
Make `M-j' work reliably if `comment-auto-fill-only-comments' is set

* lisp/simple.el (default-indent-new-line): Force breaking the
line when called interactively (bug#49849).  (Perhaps the
interactive command should be rebound and call this function
instead...)

3 years agoImprove `define-globalized-minor-mode' doc strings
Lars Ingebrigtsen [Wed, 4 Aug 2021 07:38:45 +0000 (09:38 +0200)]
Improve `define-globalized-minor-mode' doc strings

* lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode):
Copy the description from easy-mmode--arg-docstring (bug#49843).

3 years agoffap ido accommodation
dickmao [Tue, 3 Aug 2021 16:02:48 +0000 (12:02 -0400)]
ffap ido accommodation

Now that ffap-file-finder can be ido-find-file, the
noninteractive portion of find-file-at-point cannot
assume ffap-file-finder always takes an argument
(ido-find-file does not).

* lisp/ffap.el (find-file-at-point): Do not call ffap-file-finder.
* test/lisp/ffap-tests.el (ffap-ido-mode): Test it.

3 years agoUse `abort-minibuffers' in delsel
Miha Rihtaršič [Wed, 4 Aug 2021 07:15:25 +0000 (09:15 +0200)]
Use `abort-minibuffers' in delsel

* lisp/delsel.el (minibuffer-keyboard-quit): Use
`abort-minibuffers' (bug#49821).

Previously, C-g was bound to abort-recursive-edit, now it is bound to
abort-minibuffers.  However, after requiring delsel, it gets bound to
minibuffer-keyboard-quit, which still uses abort-recursive-edit.  Use
the new function instead.

3 years agoAdd new user option 'read-minibuffer-restore-windows'
martin rudalics [Wed, 4 Aug 2021 06:48:18 +0000 (08:48 +0200)]
Add new user option 'read-minibuffer-restore-windows'

* doc/lispref/minibuf.texi (Text from Minibuffer): Document it
(bug#45072).

* lisp/cus-start.el (standard): Add.

* src/minibuf.c (syms_of_minibuf): New variable
'read-minibuffer-restore-windows'.

3 years agoUpdate outdated Gnus information
Lars Ingebrigtsen [Wed, 4 Aug 2021 05:34:36 +0000 (07:34 +0200)]
Update outdated Gnus information

* doc/misc/gnus.texi (History): Update information.

3 years ago; * lisp/so-long.el: Bump version for the GNU ELPA build
Phil Sainty [Wed, 4 Aug 2021 05:17:23 +0000 (17:17 +1200)]
; * lisp/so-long.el: Bump version for the GNU ELPA build

GNU ELPA released commit 359a8e4eda047b7dcb7e64faff7f8eaacf5d937c as
version 1.1.

3 years agoFix apparent typo in new cl-generic-tests.el test case
Lars Ingebrigtsen [Wed, 4 Aug 2021 04:38:34 +0000 (06:38 +0200)]
Fix apparent typo in new cl-generic-tests.el test case

3 years ago* lisp/emacs-lisp/cl-generic.el (cl-generic-generalizers): Don't emit warning
Stefan Monnier [Tue, 3 Aug 2021 23:02:11 +0000 (19:02 -0400)]
* lisp/emacs-lisp/cl-generic.el (cl-generic-generalizers): Don't emit warning

Also remove "WARNING" annotations after confirming that he code was right.

3 years agoEvaluate eql specializers
akater [Tue, 20 Jul 2021 01:25:01 +0000 (01:25 +0000)]
Evaluate eql specializers

* lisp/emacs-lisp/cl-generic.el (cl-generic-generalizers): Evaluate
forms that are eql specializers.  Provide backward compatibility
with a warning.

* test/lisp/emacs-lisp/cl-generic-tests.el: Add a test.
* lisp/emacs-lisp/bindat.el (bindat--type): Adhere to the new rule.
* lisp/emacs-lisp/edebug.el (edebug--match-&-spec-op): Adhere to the new rule.
* lisp/emacs-lisp/map.el (map-into): Adhere to the new rule.
* lisp/emacs-lisp/radix-tree.el (map-into): Adhere to the new rule.
* lisp/frame.el (cl-generic-define-context-rewriter): Adhere to the new rule.
* lisp/gnus/gnus-search.el
(gnus-search-transform-expression): Adhere to the new rule.
* lisp/image/image-converter.el
(image-converter--probe image-converter--convert): Adhere to the new rule.
* lisp/mail/smtpmail.el (smtpmail-try-auth-method): Adhere to the new rule.
* lisp/progmodes/elisp-mode.el
(xref-backend-definitions)
(xref-backend-apropos): Adhere to the new rule.
* lisp/progmodes/etags.el (xref-backend-identifier-at-point)
(xref-backend-identifier-completion-table)
(xref-backend-identifier-completion-ignore-case)
(xref-backend-definitions)(xref-backend-apropos): Adhere to the new rule.
* test/lisp/emacs-lisp/checkdoc-tests.el
(checkdoc-cl-defmethod-with-types-ok)
(checkdoc-cl-defmethod-qualified-ok)
(checkdoc-cl-defmethod-with-extra-qualifier-ok): Adhere to the new rule.

* etc/NEWS: Describe the change.

3 years agofile-name-concat is not error free
Lars Ingebrigtsen [Tue, 3 Aug 2021 17:41:57 +0000 (19:41 +0200)]
file-name-concat is not error free

* lisp/emacs-lisp/byte-opt.el (side-effect-free-fns): Declare
file-name-concat as side-effect free.

3 years agoDeclare file-name-concat as side-effect free
Lars Ingebrigtsen [Tue, 3 Aug 2021 17:08:43 +0000 (19:08 +0200)]
Declare file-name-concat as side-effect free

* lisp/emacs-lisp/byte-opt.el (side-effect-free-fns): Declare
file-name-concat as side-effect (and error) free.

3 years agoRemove ineffective expression in verilog-mode
Mattias Engdegård [Tue, 3 Aug 2021 13:55:55 +0000 (15:55 +0200)]
Remove ineffective expression in verilog-mode

* lisp/progmodes/verilog-mode.el (verilog-set-auto-endcomments):
Remove expression that now elicits a byte-compiler warning.

3 years agoDeclare `match-beginning` and `match-end` as side-effect-free
Mattias Engdegård [Tue, 3 Aug 2021 13:28:10 +0000 (15:28 +0200)]
Declare `match-beginning` and `match-end` as side-effect-free

* lisp/emacs-lisp/byte-opt.el (side-effect-free-fns): Add functions.

3 years agoMerge branch 'scratch/so-long'
Phil Sainty [Tue, 3 Aug 2021 11:42:35 +0000 (23:42 +1200)]
Merge branch 'scratch/so-long'

3 years agoMake `global-so-long-mode' use `buffer-line-statistics'
Phil Sainty [Sat, 16 Jan 2021 12:25:13 +0000 (01:25 +1300)]
Make `global-so-long-mode' use `buffer-line-statistics'

* lisp/so-long.el: (so-long-statistics-excessive-p): New predicate
function using `buffer-line-statistics'.
(so-long-predicate): Use `so-long-statistics-excessive-p' by default.

* etc/NEWS: Describe changes.

* test/lisp/so-long-tests/so-long-tests-helpers.el:
* test/lisp/so-long-tests/so-long-tests.el: Update tests.
Also improve the existing `so-long-tests-predicate' tests.

3 years ago; Revert "Make `so-long' restore `view-mode'"
Phil Sainty [Fri, 30 Jul 2021 01:46:00 +0000 (13:46 +1200)]
; Revert "Make `so-long' restore `view-mode'"

This reverts commit 3c2db0c541491fceb7081d5b54de5abec25e2f4b.

A more general solution to bug#45084 has been implemented via
new user options `so-long-mode-preserved-variables' and
`so-long-mode-preserved-minor-modes'.

See the previous commit (before this revert) for details.

3 years agoSupport 'preserved' variables and minor modes in `so-long-mode'
Phil Sainty [Sun, 10 Jan 2021 02:02:58 +0000 (15:02 +1300)]
Support 'preserved' variables and minor modes in `so-long-mode'

The default values support preserving the state of `view-mode' when
switching to (and reverting from) `so-long-mode' (bug#45084).

* lisp/so-long.el (so-long-mode-preserved-variables)
(so-long-mode-preserved-minor-modes): New user options.
(so-long-mode-maintain-preserved-variables)
(so-long-mode-maintain-preserved-minor-modes): New functions.
(so-long-remember-all, so-long-after-change-major-mode)
(so-long-mode-revert): Use them.

* etc/NEWS: Describe changes.

* test/lisp/so-long-tests/so-long-tests-helpers.el:
* test/lisp/so-long-tests/so-long-tests.el: Update tests.

3 years ago; so-long-tests.el: Suppress expected warnings
Phil Sainty [Sat, 20 Mar 2021 08:48:18 +0000 (21:48 +1300)]
; so-long-tests.el: Suppress expected warnings

* test/lisp/so-long-tests/so-long-tests.el
(so-long-tests-invisible-buffer-function): Suppress warning about
obsolete function `run-window-configuration-change-hook', as we are
using it intentionally (see the preceding code comments and URL for
details).

3 years ago; * lisp/so-long.el: Minor bug fixes
Phil Sainty [Sun, 10 Jan 2021 02:20:51 +0000 (15:20 +1300)]
; * lisp/so-long.el: Minor bug fixes

(so-long-disable-minor-modes): Don't call the mode function to disable
the mode unless it was actually enabled.

(so-long-restore-minor-modes, so-long-restore-variables): Use the
remembered list values, which might be different to the defaults.

Also comments, and spelling consistency changes for the so-long tests
(a fixup for commit 83bc4ad369 which had only addressed so-long.el,
and not the test files).

3 years ago* lisp/so-long.el (so-long-minor-modes): Additional modes to disable
Phil Sainty [Fri, 3 Jul 2020 13:44:32 +0000 (01:44 +1200)]
* lisp/so-long.el (so-long-minor-modes): Additional modes to disable

3 years agoMake `global-so-long-mode' handle unrecognised file types
Phil Sainty [Sun, 10 Jan 2021 01:43:16 +0000 (14:43 +1300)]
Make `global-so-long-mode' handle unrecognised file types

* lisp/so-long.el (so-long-target-modes): Add `fundamental-mode'

* etc/NEWS: Describe changes.

This doesn't affect buffers which are simply in `fundamental-mode' by
default.  It only affects buffers for which `set-auto-mode' has been
called (normally via `find-file') without establishing a different
major mode.

3 years agoIncrease `so-long-threshold' and `so-long-max-lines' defaults
Phil Sainty [Sun, 10 Jan 2021 01:29:32 +0000 (14:29 +1300)]
Increase `so-long-threshold' and `so-long-max-lines' defaults

* lisp/so-long.el (so-long-threshold, so-long-max-lines): Increase
default values to reduce false-positives.

* etc/NEWS: Describe changes.

Lines shorter than 10,000 characters shouldn't generally be causing
problems, so testing this explicitly will largely eliminate
false-positives.  We must also increase the maximum number of lines
to check, because 'minified' code may still include newlines, and so
there may be many lines shorter than the new threshold before we find
a line which exceeds it.

Previously we used a minimum-effort heuristic, testing a very small
number of lines against a maximum length which, while not remotely
long enough to cause problems, would nevertheless be uncommon in any
normal file of programming code (and hence indicative that the file
was likely to be minified code).

Testing indicates that the performance penalty for the larger values
should be negligible.

3 years ago; * lisp/so-long.el: Bump to version 1.1
Phil Sainty [Sun, 10 Jan 2021 01:28:17 +0000 (14:28 +1300)]
; * lisp/so-long.el: Bump to version 1.1

3 years ago; * lisp/so-long.el: Documentation
Phil Sainty [Sun, 10 Jan 2021 12:58:26 +0000 (01:58 +1300)]
; * lisp/so-long.el: Documentation

3 years ago* Fix error while disassembling native code on macOS
Jimmy Yuen Ho Wong [Tue, 3 Aug 2021 07:14:38 +0000 (08:14 +0100)]
* Fix error while disassembling native code on macOS

* lisp/emacs-lisp/disass.el (disassemble-internal): Make sure the
regexp that searches for a symbol takes into account of llvm-objdump's
output format.

3 years agoMerge from origin/emacs-27
Amin Bandali [Tue, 3 Aug 2021 02:39:43 +0000 (22:39 -0400)]
Merge from origin/emacs-27

75ecce4323 Unbreak ERC's Ibuffer filter (Bug#44100)

3 years ago; Merge from origin/emacs-27
Amin Bandali [Tue, 3 Aug 2021 02:39:43 +0000 (22:39 -0400)]
; Merge from origin/emacs-27

The following commit was skipped:

61def1e392 ; Auto-commit of loaddefs files.

3 years agoUnbreak ERC's Ibuffer filter (Bug#44100)
Olivier Certner [Tue, 6 Jul 2021 08:51:57 +0000 (10:51 +0200)]
Unbreak ERC's Ibuffer filter (Bug#44100)

* lisp/erc/erc-ibuffer.el (erc-modified): Don't use `length' on dotted
lists (and not even to test if there is more than one element, for
that matter).  Use `cdr' instead.

3 years agoAdjust tab-bar to the new mode-line-misc-info value (bug#49806)
Juri Linkov [Mon, 2 Aug 2021 22:08:23 +0000 (01:08 +0300)]
Adjust tab-bar to the new mode-line-misc-info value (bug#49806)

* lisp/tab-bar.el (tab-bar--define-keys): Adjust to the new
default value for `mode-line-misc-info'.

3 years ago; mh-junk-background: fix documentation typo
Stephen Gildea [Mon, 2 Aug 2021 04:07:52 +0000 (21:07 -0700)]
; mh-junk-background: fix documentation typo

* lisp/mh-e/mh-e.el (mh-junk-background), doc/misc/mh-e.texi:
In documentation, name the correct argument to call-process.

3 years agomh-junk: adjust messages for allow/block actions
Stephen Gildea [Mon, 2 Aug 2021 04:00:37 +0000 (21:00 -0700)]
mh-junk: adjust messages for allow/block actions

* lisp/mh-e/mh-junk.el: Remove messages that get overwritten quickly.
Keep messages that give status for slow operations.  Add information
that might be useful for debugging failures.

3 years ago* lisp/mwheel.el: Don't use `custom-initialize-delay`.
Stefan Monnier [Sun, 1 Aug 2021 22:13:41 +0000 (18:13 -0400)]
* lisp/mwheel.el: Don't use `custom-initialize-delay`.

Set up the keybindings when loading the file.

(mouse-wheel--installed-bindings-alist): Move to beginning.
(mouse-wheel-change-button): Don't update bindings when they're not installed.
(mouse-wheel--setup-bindings): New function extracted from `mouse-wheel-mode`.
(<topleve>): Call it when loading the file.
(mouse-wheel-mode): Use the default :initializer.

3 years ago* lisp/progmodes/flymake.el (flymake--mode-line-title): Don't quote lambda
Stefan Monnier [Sun, 1 Aug 2021 22:08:01 +0000 (18:08 -0400)]
* lisp/progmodes/flymake.el (flymake--mode-line-title): Don't quote lambda

3 years ago* lisp/progmodes/project.el (project-switch-project): Use 'let*' (bug#49635).
Juri Linkov [Sun, 1 Aug 2021 20:43:37 +0000 (23:43 +0300)]
* lisp/progmodes/project.el (project-switch-project): Use 'let*' (bug#49635).

This allows overriding-local-map to have effect on read-key-sequence.

3 years ago* lisp/emacs-lisp/autoload.el (autoload--make-defs-autoload): Display warning.
Juri Linkov [Sun, 1 Aug 2021 19:58:09 +0000 (22:58 +0300)]
* lisp/emacs-lisp/autoload.el (autoload--make-defs-autoload): Display warning.

https://lists.gnu.org/archive/html/emacs-devel/2021-08/msg00007.html

3 years agoMake dlet work like let, not let*
Mattias Engdegård [Sun, 1 Aug 2021 15:05:48 +0000 (17:05 +0200)]
Make dlet work like let, not let*

Change `dlet` so that it has binding semantics like `let` because that
is what a user would expect and it allows a corresponding `dlet*` to
be added later should the need arise.  Fortunately the change has no
effect where it is currently used.

* lisp/subr.el (dlet): Work like let.
* lisp/calendar/cal-bahai.el (calendar-bahai-date-string):
* lisp/calendar/cal-coptic.el (calendar-coptic-date-string):
* lisp/calendar/cal-dst.el (calendar-time-zone-daylight-rules)
(calendar-dst-starts, dst-in-effect):
* lisp/calendar/cal-persia.el (calendar-persian-date-string):
* lisp/calendar/calendar.el (calendar-dlet, calendar-generate-month)
(calendar-update-mode-line, calendar-date-string):
* lisp/calendar/diary-lib.el (diary-list-entries-2)
(diary-list-entries, diary-mark-entries-1, diary-sexp-entry)
(diary-remind, diary-font-lock-date-forms, diary-fancy-date-pattern):
* lisp/calendar/holidays.el (holiday-sexp):
* lisp/calendar/icalendar.el (icalendar--convert-float-to-ical):
* lisp/calendar/solar.el (solar-time-string):
* lisp/calendar/todo-mode.el (todo-date-pattern)
(todo-edit-item--header, todo-convert-legacy-date-time)
(todo-read-date):
Rename `calendar-dlet*` to `calendar-dlet` since it uses `dlet`.

3 years ago; Auto-commit of loaddefs files.
Glenn Morris [Sun, 1 Aug 2021 13:29:49 +0000 (06:29 -0700)]
; Auto-commit of loaddefs files.

3 years ago; * lisp/replace.el (occur--set-arrow): Remove unused variable.
Mattias Engdegård [Sun, 1 Aug 2021 13:25:02 +0000 (15:25 +0200)]
; * lisp/replace.el (occur--set-arrow): Remove unused variable.

3 years ago; Auto-commit of loaddefs files.
Glenn Morris [Sun, 1 Aug 2021 13:12:18 +0000 (06:12 -0700)]
; Auto-commit of loaddefs files.

3 years agoIndicate selected occur target with fringe arrow
Mattias Engdegård [Sun, 1 Aug 2021 09:52:00 +0000 (11:52 +0200)]
Indicate selected occur target with fringe arrow

* lisp/replace.el (occur--set-arrow): New function.
(occur-mode-goto-occurrence)
(occur-mode-goto-occurrence-other-window)
(occur-mode-display-occurrence): Call it.
* etc/NEWS: Announce.

3 years ago* lisp/filecache.el: Fix cycling (bug#49761).
Juri Linkov [Sun, 1 Aug 2021 08:38:51 +0000 (11:38 +0300)]
* lisp/filecache.el: Fix cycling (bug#49761).

(file-cache-cycle): Refactor from file-cache-minibuffer-complete.
(file-cache-minibuffer-complete): Use file-cache-cycle in 2 old places,
and in 1 following new place.  When last-command is equal to this-command,
use file-cache-cycle to continue cycling the previous completion
as long as the user continues typing C-TAB.
Also when displaying a list of completions, don't try to move point
to the common prefix.

3 years agoExtend Gnus summary highlight faces by default
Kévin Le Gouguec [Sat, 31 Jul 2021 21:54:06 +0000 (23:54 +0200)]
Extend Gnus summary highlight faces by default

* lisp/gnus/gnus.el (gnus-summary-selected):
(gnus-summary-normal-ancient):
(gnus-summary-normal-undownloaded):
(gnus-summary-normal-unread):
(gnus-summary-normal-read): Set :extend attribute.

3 years agoAdjust the fully qualified host name when nothing is set
Lars Ingebrigtsen [Sat, 31 Jul 2021 22:01:59 +0000 (00:01 +0200)]
Adjust the fully qualified host name when nothing is set

* doc/misc/message.texi (News Headers): Adjust index.
* lisp/gnus/message.el (message-check-news-header-syntax): Adjust check.
(message-make-fqdn): Be less hilarious.

3 years agoFix `u' binding in Gnus Browse mode
Lars Ingebrigtsen [Sat, 31 Jul 2021 21:49:00 +0000 (23:49 +0200)]
Fix `u' binding in Gnus Browse mode

* lisp/gnus/gnus-srvr.el (gnus-browse-mode-map): Bind to
`gnus-browse-toggle-subscription-at-point', which is the command.

3 years ago; compilation-error-regexp-alist-alist): eval-when-compile
Mattias Engdegård [Sat, 31 Jul 2021 21:44:17 +0000 (23:44 +0200)]
; compilation-error-regexp-alist-alist): eval-when-compile

3 years agoOccur-mode multi-line match property gap filling
Mattias Engdegård [Sat, 31 Jul 2021 20:37:03 +0000 (22:37 +0200)]
Occur-mode multi-line match property gap filling

When an occur-mode regexp matches across multiple lines, the spacing
prefixes inserted between each did not have the `occur-target`
property which is essential for jumping to the corresponding place in
the target buffer.  This prevented next-error and previous-error
from working.

* lisp/replace.el (occur-engine): Put the `occur-target` property on
the continuation prefix to avoid the gap.

3 years ago* etc/NEWS: Mention occur-mode highlight changes.
Mattias Engdegård [Sat, 31 Jul 2021 09:22:37 +0000 (11:22 +0200)]
* etc/NEWS: Mention occur-mode highlight changes.

3 years agoC-x 5 5 manual tweak
Lars Ingebrigtsen [Sat, 31 Jul 2021 20:36:19 +0000 (22:36 +0200)]
C-x 5 5 manual tweak

* doc/emacs/frames.texi (Creating Frames): Mention
other-frame-prefix function name.

3 years agoUpdate NEWS tagging for a couple entries
Lars Ingebrigtsen [Sat, 31 Jul 2021 20:27:08 +0000 (22:27 +0200)]
Update NEWS tagging for a couple entries

3 years agoAdd an index entry for outline-minor-mode-cycle
Lars Ingebrigtsen [Sat, 31 Jul 2021 20:25:38 +0000 (22:25 +0200)]
Add an index entry for outline-minor-mode-cycle

* doc/emacs/text.texi (Outline Mode): Document outline-minor-mode-cycle.

3 years agoDocument outline-minor-mode-cycle in the manual.
Lars Ingebrigtsen [Sat, 31 Jul 2021 20:22:42 +0000 (22:22 +0200)]
Document outline-minor-mode-cycle in the manual.

* doc/emacs/text.texi (Outline Mode): Document outline-minor-mode-cycle.

3 years agoMake `ffap-read-file-or-url' work again (to read URLs)
Lars Ingebrigtsen [Sat, 31 Jul 2021 17:51:16 +0000 (19:51 +0200)]
Make `ffap-read-file-or-url' work again (to read URLs)

* lisp/ffap.el (ffap--url-file-handler): New function (bug#44822).
(ffap-read-file-or-url): Use it to allow switching between URLs
and files.

3 years agoAdd new user option python-forward-sexp-function
Lars Ingebrigtsen [Sat, 31 Jul 2021 16:44:02 +0000 (18:44 +0200)]
Add new user option python-forward-sexp-function

* lisp/progmodes/python.el (python-forward-sexp-function): New
user option (bug#41361).
(python-mode): Use it.

3 years agoAdjust how `replace-match' runs modification hooks
Lars Ingebrigtsen [Sat, 31 Jul 2021 15:44:43 +0000 (17:44 +0200)]
Adjust how `replace-match' runs modification hooks

* src/editfns.c (Fsubst_char_in_region)
(Ftranslate_region_internal):
* src/cmds.c (internal_self_insert): Update callers.
* src/insdel.c (replace_range): Allow inhibiting
signal_after_change/update_compositions.
* src/lisp.h: Update.

* src/search.c (Freplace_match): Run the modification hooks at the
end instead of before adjusting point (bug#42424).

3 years agoExtend whitespace-empty to the end of the line
Lars Ingebrigtsen [Sat, 31 Jul 2021 14:52:44 +0000 (16:52 +0200)]
Extend whitespace-empty to the end of the line

* lisp/whitespace.el (whitespace-empty): Restore Emacs 26 look by
extending the face (bug#42112).

3 years agoRevert "Fix `speedbar-directory-buttons' when using Tramp"
Lars Ingebrigtsen [Sat, 31 Jul 2021 12:54:52 +0000 (14:54 +0200)]
Revert "Fix `speedbar-directory-buttons' when using Tramp"

This reverts commit 5afad3918bc8816b74e8efcff9cc441785446aa6.

This patch can't possibly be correct, and it breaks the stated interface.

3 years agoRevert "Allow nil initializers in define-minor-mode"
Lars Ingebrigtsen [Sat, 31 Jul 2021 11:37:42 +0000 (13:37 +0200)]
Revert "Allow nil initializers in define-minor-mode"

This reverts commit 02cbb37de73d563149389615ee44741322007108.

This was mistakenly commited and doesn't really make much sense.

3 years agoDon't bind <mouse-2> and RET in *Help* buffers
Lars Ingebrigtsen [Sat, 31 Jul 2021 11:26:26 +0000 (13:26 +0200)]
Don't bind <mouse-2> and RET in *Help* buffers

* lisp/help-mode.el (help-mode-map): Remove key bindings for RET
and <mouse-2> (bug#49784).
(help-xref-stack, help-xref-forward-stack, help-xref-stack-item)
(help-make-xrefs): Fix doc strings -- these aren't used by
`help-follow', but by `help-follow-symbol'.
(help-follow-mouse, help-follow): Make obsolete.

3 years agoAllow nil initializers in define-minor-mode
Lars Ingebrigtsen [Fri, 30 Jul 2021 16:25:12 +0000 (18:25 +0200)]
Allow nil initializers in define-minor-mode

* lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Make the
meaning of :initialize nil and a missing :initialize the same.

3 years agoFix some macOS problems
Alan Third [Wed, 23 Jun 2021 15:07:12 +0000 (16:07 +0100)]
Fix some macOS problems

* src/nsmenu.m (update_frame_tool_bar): Make sure the toolbar isn't
displayed when it's not supposed to be.
* src/nsterm.m ([EmacsView layoutSublayersOfLayer:]): Reinstate code
intended to prevent a crash when running redisplay.

3 years agoMove parent frame setting code into EmacsWindow
Alan Third [Sat, 12 Jun 2021 18:04:02 +0000 (19:04 +0100)]
Move parent frame setting code into EmacsWindow

* src/nsterm.m (ns_make_frame_visible):
(ns_set_parent_frame):
([EmacsWindow initWithEmacsFrame:fullscreen:screen:]):  Use new method.
([EmacsWindow setParentChildRelationships]): New method.

3 years agoMove NS port toolbar handling to the window
Alan Third [Sat, 12 Jun 2021 11:52:15 +0000 (12:52 +0100)]
Move NS port toolbar handling to the window

* src/nsmenu.m (free_frame_tool_bar):
(update_frame_tool_bar): Remove wait_for_tool_bar and get the toolbar
from the window.
* src/nsterm.h (EmacsView): Remove toolbar and wait_for_tool_bar.
* src/nsterm.m (ns_update_begin):
([EmacsView windowDidEnterFullScreen]):
([EmacsView windowDidExitFullScreen]): Get the toolbar from the
window, not the view.
([EmacsView dealloc]): Remove toolbar from view.
([EmacsView createToolbar:]): Move method to EmacsWindow.
([EmacsView initFrameFromEmacs:]): Don't create toolbar here any more.
([EmacsView toolbar]): Remove method.
([EmacsWindow initWithEmacsFrame:fullscreen:screen:]): Create toolbar here.
([EmacsWindow createToolbar:]): Moved from EmacsView.
([EmacsWindow dealloc]): Make sure we clean up the toolbar after
closing the window.

3 years agoFix macOS live resize drawing
Alan Third [Sat, 12 Jun 2021 09:25:47 +0000 (10:25 +0100)]
Fix macOS live resize drawing

* src/nsterm.m ([EmacsView layout]):
([EmacsView layoutSublayersOfLayer:]): Rename layout to
layoutSublayersOfLayer.

3 years agoChange NS port resize detection
Alan Third [Wed, 9 Jun 2021 16:57:00 +0000 (17:57 +0100)]
Change NS port resize detection

* src/nsterm.m ([EmacsView windowDidResize:]): Remove function, it's
not performing a useful function any more.
([EmacsView viewDidResize]):
([EmacsView resizeWithOldSuperviewSize:]): Replace viewDidResize with
resizeWithOldSuperviewSize.
([EmacsView initFrameFromEmacs:]): Remove the view resize notification
as we don't need it any more.

3 years agoTidy up NS port OS window handling
Alan Third [Sat, 5 Jun 2021 11:39:46 +0000 (12:39 +0100)]
Tidy up NS port OS window handling

* src/nsterm.h (EmacsWindow): Move above EmacsView definition and add
new method definitions.
(EmacsView): Remove redundant bwidth variable, and change NSWindow to
EmacsWindow.
(EmacsFSWindow): Delete definition.
* src/nsterm.m (ns_set_undecorated): Rewrite to work in GNUstep using
the new OS window creating methods.
([EmacsView initFrameFromEmacs:]): Move all NSWindow related code to
new init method in EmacsWindow, and use said method.
([EmacsView toggleFullScreen:]): Use EmacsWindow instead of NSWindow.
([EmacsWindow initWithEmacsFrame:]):
([EmacsWindow initWithEmacsFrame:fullscreen:screen:]):
([EmacsWindow borderWidth]): New methods.
(EmacsFSWindow): Remove implementation.

3 years agoSimplify macOS drawing code
Alan Third [Sat, 29 May 2021 08:48:51 +0000 (09:48 +0100)]
Simplify macOS drawing code

Convert EmacsSurface into a CALayer subclass so we can use the
built-in relationships.  Also simplify the macOS versioning code.
This will result in more warnings on older versions of macOS but makes
reading the code easier.

* configure.ac: Add QuartzCore framework.
* src/nsterm.h (NS_DRAW_TO_BUFFER): Remove define and all references.
(EmacsSurface, EmacsLayer): Rename EmacsSurface to EmacsLayer and
modify the definition to fit the new function.
* src/nsterm.m (ns_update_begin):
(ns_update_end):
(ns_focus):
(ns_unfocus): Use the new overridden lockFocus and unlockFocus and
simplify the frame management.
([EmacsView dealloc]):
([EmacsView viewDidResize:]):Don't explicitly release surfaces.
([EmacsView initFrameFromEmacs:]): Move the layer code to after the
NSWindow has been created as creating the layer now relies on some of
it's properties.
([EmacsView makeBackingLayer]): New function.
([EmacsView lockFocus]):
([EmacsView focusOnDrawingBuffer]): Rename to lockFocus.
([EmacsView unlockFocus]):
([EmacsView unfocusDrawingBuffer]): Rename to unlockFocus.
([EmacsView windowDidChangeBackingProperties]): Don't explicitly
release surfaces but reset EmacsLayer properties.
([EmacsView layout]):
([EmacsView viewWillDraw]): Rename to layout.
([EmacsView wantsUpdateLayer]): Remove function and change all callers
to [EmacsView wantsLayer].
(EmacsSurface, EmacsLayer): Rename to EmacsLayer.
([EmacsSurface getSize]):
([EmacsSurface initWithSize:ColorSpace:Scale:]): Remove methods.
([EmacsSurface initWithColorSpace:]):
([EmacsLayer checkDimensions]):
([EmacsLayer releaseSurfaces]):
([EmacsLayer display]): New functions.
* src/nsterm.m ([EmacsLayer dealloc]): Use releaseSurfaces.
([EmacsSurface getContext]): Automatically detect frame property
changes and clear the cache if required.  Use built-in CALayer
properties where available.
([EmacsLayer copyContentsTo:]): Use [CALayer contents] as source.

3 years ago* src/fontset.c (check_fontset_name): A better fix for bug#49782.
Eli Zaretskii [Sat, 31 Jul 2021 06:28:36 +0000 (09:28 +0300)]
* src/fontset.c (check_fontset_name): A better fix for bug#49782.

3 years ago* lisp/emacs-lisp/cl-macs.el: Add cl-type pattern
Adam Porter [Mon, 9 Mar 2020 18:01:32 +0000 (13:01 -0500)]
* lisp/emacs-lisp/cl-macs.el: Add cl-type pattern

* lisp/emacs-lisp/cl-macs.el:
((pcase-defmacro type)): Add 'cl-type' pattern.

* test/lisp/emacs-lisp/pcase-tests.el (pcase-tests-cl-type): Add test.

* doc/lispref/control.texi (pcase Macro): Update manual.

With thanks to Stefan Monnier and Eli Zaretskii for their guidance.

3 years ago* src/fontset.c (check_fontset_name): Fix last change.
Eli Zaretskii [Fri, 30 Jul 2021 18:51:59 +0000 (21:51 +0300)]
* src/fontset.c (check_fontset_name): Fix last change.

3 years agoAvoid segfault when set-fontset-font is called from non-GUI frames
Eli Zaretskii [Fri, 30 Jul 2021 18:17:58 +0000 (21:17 +0300)]
Avoid segfault when set-fontset-font is called from non-GUI frames

* src/fontset.c (check_fontset_name): Avoid crashes if this is
called from a non-GUI frame.  (Bug#49782)

3 years agoChange Tramp version to "2.5.2-pre"
Michael Albinus [Fri, 30 Jul 2021 15:19:29 +0000 (17:19 +0200)]
Change Tramp version to "2.5.2-pre"

* doc/misc/trampver.texi:
* lisp/net/trampver.el: Change version to "2.5.2-pre".

3 years ago; fix 2 typos in MH-E comments
Stephen Gildea [Fri, 30 Jul 2021 13:32:41 +0000 (06:32 -0700)]
; fix 2 typos in MH-E comments

* lisp/mh-e/ChangeLog.1: fix typo
* lisp/mh-e/mh-junk.el (mh-junk-allowlist): fix verb tense

3 years agoMake fileloop skip missing files
Dmitry Gutov [Fri, 30 Jul 2021 12:58:25 +0000 (14:58 +0200)]
Make fileloop skip missing files

* lisp/fileloop.el (fileloop-next-file): If a file doesn't exist,
skip to the next one (bug#44979).

3 years agoTweak previous mailcap-view-file change
Maxim Nikulin [Fri, 30 Jul 2021 12:42:07 +0000 (14:42 +0200)]
Tweak previous mailcap-view-file change

* lisp/net/mailcap.el (mailcap-view-file): Remove the :noquery t
mistakenly added (bug#12972).

Copyright-paperwork-exempt: yes

3 years agoFix problem when switching between different prolog versions
k3tu0isui [Fri, 30 Jul 2021 12:39:13 +0000 (14:39 +0200)]
Fix problem when switching between different prolog versions

* lisp/progmodes/prolog.el (run-prolog): Make switching between
different prolog systems work more reliably (bug#45795).

* lisp/progmodes/prolog.el (prolog-ensure-process): Don't start a
new process if one already exists.

Copyright-paperwork-exempt: yes

3 years agoSimplify lexical let-optimisations
Mattias Engdegård [Fri, 30 Jul 2021 10:22:01 +0000 (12:22 +0200)]
Simplify lexical let-optimisations

Ensure in cconv that let-bindings have the normal form (VAR EXPR)
where VAR is a valid variable name, so that we don't need to keep
re-checking this all the time in the optimiser.

* lisp/emacs-lisp/byte-opt.el
(byte-optimize-enable-variable-constprop)
(byte-optimize-warn-eliminated-variable): Remove; these were mainly
used for debugging.
* lisp/emacs-lisp/byte-opt.el (byte-optimize-let-form):
Assume normalised let-bindings (with lexical-binding).
Stop using the variables removed above.
* lisp/emacs-lisp/cconv.el (cconv-convert): Ensure normalised
let-bindings.  Malformed bindings are dropped after warning.

remove byte-optimize-warn-eliminated-variable

3 years agoEnsure that recover-file doesn't leave stale auto-save files behind
Lars Ingebrigtsen [Fri, 30 Jul 2021 12:07:04 +0000 (14:07 +0200)]
Ensure that recover-file doesn't leave stale auto-save files behind

* lisp/files.el (recover-file): Don't leave stale auto-save files
behind after crash recovery (bug#11331).

3 years agoAllow shell PROMPT strings to have ANSI codes
Lars Ingebrigtsen [Fri, 30 Jul 2021 12:03:43 +0000 (14:03 +0200)]
Allow shell PROMPT strings to have ANSI codes

* lisp/comint.el (comint-output-filter): Don't overwrite ANSI
codes from the prompt command (bug#11883).

3 years agomailcap.el: Avoid xdg-open silent failure
Max Nikulin [Fri, 30 Jul 2021 12:00:41 +0000 (14:00 +0200)]
mailcap.el: Avoid xdg-open silent failure

* lisp/net/mailcap.el (mailcap-view-file): Use 'pipe :connection-type
instead of 'pty to prevent killing of background process on handler
exit.  Avoid regression similar to Bug#44824.

Problem happens only in some desktop environments where mailcap handler
launches actual viewer (as defined in .desktop files and obtained from
mimeapps.list) in background.  E.g. xdg-open invokes "gio open" or
kde-open5 for Gnome or KDE accordingly and these handlers launch e.g.
eog or okular in background.  As soon as main process exits, temporary
terminal session created by `start-process-shell-command' is terminated.
As a result background processes receive SIGHUP.

Previously command were executed with no buffer as well, so the change
does not affect "needsterminal" and "copiousoutput" mailcap features,
they are not supported as earlier.

If main process of the handler fails then show a message with exit
reason.  Output (including error messages) is ignored as before.
Gtk applications tend to report significant amount of failed asserts
hardly informative for majority of users (bug#12972).

Copyright-paperwork-exempt: yes

3 years agoFix case insensitivity in `read-file-name'
Lars Ingebrigtsen [Fri, 30 Jul 2021 11:51:46 +0000 (13:51 +0200)]
Fix case insensitivity in `read-file-name'

* lisp/minibuffer.el (read-file-name-default): Make `read-file-name'
actually respect `read-file-name-completion-ignore-case' (bug#14340).

3 years agoFix issue with mml-preview from outside Gnus
Lars Ingebrigtsen [Fri, 30 Jul 2021 11:32:54 +0000 (13:32 +0200)]
Fix issue with mml-preview from outside Gnus

* lisp/gnus/gnus-art.el (gnus-mime-display-alternative): Be more
resilient when running from outside Gnus.

3 years agoWork around long-standing seq.el compilation warning
Lars Ingebrigtsen [Fri, 30 Jul 2021 11:13:46 +0000 (13:13 +0200)]
Work around long-standing seq.el compilation warning

* lisp/emacs-lisp/seq.el (seq-contains): When using cl-defgeneric
to define an obsolete function, it'll complain about it being
obsolete.  Suppress that warning.  (Should probably be fixed in
cl-defgeneric instead.)

3 years agoRemove a redundant let-binding from Ispell
Basil L. Contovounesios [Fri, 30 Jul 2021 10:30:53 +0000 (11:30 +0100)]
Remove a redundant let-binding from Ispell

Recent optimizer changes revealed a case-fold-search binding in
Ispell that was made redundant in the revision of 2020-11-03
"Simplify ispell-check-version’s use of -vv flag".

* lisp/textmodes/ispell.el (ispell-check-version): Remove no-op
binding of case-fold-search.

3 years ago* etc/NEWS: Tramp supports authentication via yubikey now. Fix typos.
Michael Albinus [Fri, 30 Jul 2021 09:57:50 +0000 (11:57 +0200)]
* etc/NEWS: Tramp supports authentication via yubikey now.  Fix typos.

3 years agoFix bug#49773 in Tramp
Michael Albinus [Fri, 30 Jul 2021 09:57:39 +0000 (11:57 +0200)]
Fix bug#49773 in Tramp

* lisp/net/tramp.el (tramp-handle-find-backup-file-name)
(tramp-handle-lock-file, tramp-handle-make-auto-save-file-name):
Check security hole only if action is in progress.  (Bug#49773)

3 years agoOptimise let and let* whose body is constant or the last variable
Mattias Engdegård [Thu, 29 Jul 2021 13:35:55 +0000 (15:35 +0200)]
Optimise let and let* whose body is constant or the last variable

Simplify  (let ((X1 E1) ... (Xn En)) Xn)
      =>  (progn E1 ... En)

and       (let* ((X1 E1) ... (Xn En)) Xn)
      =>  (let* ((X1 E1) ... (Xn-1 En-1)) En)

and similarly the case where the body is a constant, extending a
previous optimisation that only applied to the constant nil.
This reduces the number of bound variables, shortens the code, and
enables further optimisations.

* lisp/emacs-lisp/byte-opt.el (byte-optimize-letX): Rewrite using
`pcase` and add the aforementioned transformations.
* test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--test-cases):
Add test cases.

3 years agoMove warnings about bad let-bindings from source optimiser to cconv
Mattias Engdegård [Thu, 29 Jul 2021 15:20:41 +0000 (17:20 +0200)]
Move warnings about bad let-bindings from source optimiser to cconv

* lisp/emacs-lisp/byte-opt.el (byte-optimize-let-form): Move warnings...
* lisp/emacs-lisp/cconv.el (cconv-convert): ...here, which is an
overall better place (closer to the front-end).

3 years agoOptimise prog1 better
Mattias Engdegård [Thu, 29 Jul 2021 08:07:26 +0000 (10:07 +0200)]
Optimise prog1 better

Rewrite (prog1 CONST FORMS...) => (progn FORMS... CONST)
where CONST is a compile-time constant, because putting the value last
allows the lapcode peephole pass to do important improvements like
branch elimination.  Also use progn instead of prog1 for `ignore`.

* lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker):
New `prog1` and `ignore` transforms.

3 years agoElide lexical variables in for-effect context in source optimiser
Mattias Engdegård [Wed, 28 Jul 2021 15:31:44 +0000 (17:31 +0200)]
Elide lexical variables in for-effect context in source optimiser

* lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker):
Remove for-effect uses of lexical variables.  We previously relied on
this being done by the lapcode peephole optimiser but at source level
it enables more optimisation opportunities.
Keywords are elided for the same reason.

3 years agoSingle source optimiser entry point
Mattias Engdegård [Wed, 28 Jul 2021 19:12:27 +0000 (21:12 +0200)]
Single source optimiser entry point

Make the optimiser aware of lexical arguments.  Otherwise we cannot
know for sure whether a variable is lexical or dynamic during
traversal.

* lisp/emacs-lisp/byte-opt.el (byte-optimize-one-form): New optimiser
entry point, replacing the recursive byte-optimize-form.
* lisp/emacs-lisp/bytecomp.el (byte-optimize-one-form): Autoload.
(byte-compile-keep-pending, byte-compile-top-level):
Use byte-optimize-one-form.

3 years agomh-junk: replace color-based terms with descriptive words
Stephen Gildea [Fri, 30 Jul 2021 00:37:39 +0000 (17:37 -0700)]
mh-junk: replace color-based terms with descriptive words

* lisp/mh-e/*.el: "whitelist" -> "allowlist" and "blacklist" -> "blocklist".
* doc/misc/mh-e.texi: update manual to match.
* lisp/mh-e/folder.el: Change the binding of 'mh-junk-allowlist' to 'J a'.
  Add a compatibility binding for the old 'J w'.
* lisp/mh-e/mh-scan.el (mh-note-allowlisted): Change char from 'W' to 'A'.
* lisp/mh-e/junk.el: Rename 'mh-blacklist-a-msg' to 'mh-junk-blocklist-a-msg',
  adding the missing "junk-" to the function name.

3 years agoAvoid errors in rmailsum for messages without "From"
Nick Gasson [Thu, 29 Jul 2021 13:24:13 +0000 (21:24 +0800)]
Avoid errors in rmailsum for messages without "From"

* lisp/mail/rmailsum.el (rmail-header-summary): Be defensive about
the presence of the "From" header.  (Bug#49770)

Copyright-paperwork-exempt: yes