1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-29 19:48:19 +00:00
Commit Graph

149301 Commits

Author SHA1 Message Date
Konstantin Kharlamov
4ec10c80ab Reset mtime of a buffer reverted "delicately"
* lisp/files.el (revert-buffer-insert-file-contents-delicately):
Once buffer is reverted, reset its mtime to that of the file.
(Bug#49893)
2021-08-05 20:45:02 +03:00
Eli Zaretskii
9d1c3c9830 Fix files-tests on non-Posix systems
* test/lisp/files-tests.el (files-test-auto-save-name-default)
(files-test-auto-save-name-transform)
(files-test-auto-save-name-unique, files-test-lock-name-default)
(files-test-lock-name-unique): Skip the drive letter in absolute
file names on MS-Windows/MS-DOS when comparing file names against
the expected ones.
(files-tests-file-name-non-special--subprocess): Skip test on
MS-Windows/MS-DOS.
2021-08-05 20:42:10 +03:00
Mattias Engdegård
2a17925aab Cease attempts to const-propagate through setq
The current method of propagating constants through setq was unsound
because it relied on each setq form only being traversed at most once
during optimisation, which isn't necessarily true in general; it could
be made to miscompile code in rare cases.

Since it was only used in limited circumstances, disabling this
optimisation doesn't cost us much.

* lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker):
Don't update the known value when traversing `setq`.
* test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--test-cases):
Add test case.
2021-08-05 15:33:05 +02:00
Lars Ingebrigtsen
2d8c14d299 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).
2021-08-05 13:14:32 +02:00
Basil L. Contovounesios
0b5cc6c567 ; Fix oauth typos in last change. 2021-08-05 11:40:31 +01:00
Roland Winkler
1505dca91f 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.
2021-08-05 12:33:21 +02:00
Glenn Morris
50d3178a4f * lisp/cus-start.el (read-minibuffer-restore-windows): Fix entry. 2021-08-04 17:43:43 -07:00
Juri Linkov
4b729ff608 * lisp/vc/smerge-mode.el (smerge-mode-menu): Add menu item for smerge-refine. 2021-08-04 23:43:21 +03:00
dickmao
1910800f93 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).
2021-08-04 10:50:38 +02:00
Lars Ingebrigtsen
b8c43b594e 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.
2021-08-04 10:35:53 +02:00
Lars Ingebrigtsen
b41f31d2b6 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...)
2021-08-04 10:03:12 +02:00
Lars Ingebrigtsen
423a23ef75 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).
2021-08-04 09:38:45 +02:00
dickmao
253b36bd40 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.
2021-08-04 09:20:38 +02:00
Miha Rihtaršič
b4f3e6caba 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.
2021-08-04 09:15:25 +02:00
martin rudalics
51583a0f9f 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'.
2021-08-04 08:48:18 +02:00
Lars Ingebrigtsen
bee3e51550 Update outdated Gnus information
* doc/misc/gnus.texi (History): Update information.
2021-08-04 07:34:58 +02:00
Phil Sainty
b84986af52 ; * lisp/so-long.el: Bump version for the GNU ELPA build
GNU ELPA released commit 359a8e4eda as
version 1.1.
2021-08-04 17:17:23 +12:00
Lars Ingebrigtsen
516affe1b3 Fix apparent typo in new cl-generic-tests.el test case 2021-08-04 06:38:34 +02:00
Stefan Monnier
b0d07396e8 * lisp/emacs-lisp/cl-generic.el (cl-generic-generalizers): Don't emit warning
Also remove "WARNING" annotations after confirming that he code was right.
2021-08-03 19:02:11 -04:00
akater
6535fd1fa9 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.
2021-08-03 18:26:15 -04:00
Lars Ingebrigtsen
88577aed3a 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.
2021-08-03 19:41:57 +02:00
Lars Ingebrigtsen
301ce625cb 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.
2021-08-03 19:08:43 +02:00
Mattias Engdegård
354c682421 Remove ineffective expression in verilog-mode
* lisp/progmodes/verilog-mode.el (verilog-set-auto-endcomments):
Remove expression that now elicits a byte-compiler warning.
2021-08-03 15:55:55 +02:00
Mattias Engdegård
0809c9f6ef Declare match-beginning and match-end as side-effect-free
* lisp/emacs-lisp/byte-opt.el (side-effect-free-fns): Add functions.
2021-08-03 15:29:58 +02:00
Phil Sainty
3a56d4eea9 Merge branch 'scratch/so-long' 2021-08-03 23:42:35 +12:00
Phil Sainty
59128bb804 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.
2021-08-03 23:20:07 +12:00
Phil Sainty
12cbe8e509 ; Revert "Make so-long' restore view-mode'"
This reverts commit 3c2db0c541.

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.
2021-08-03 23:20:07 +12:00
Phil Sainty
10bd4bc6ec 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.
2021-08-03 23:20:07 +12:00
Phil Sainty
0ec67a2956 ; 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).
2021-08-03 23:20:07 +12:00
Phil Sainty
748df220ef ; * 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).
2021-08-03 23:20:06 +12:00
Phil Sainty
7828f69828 * lisp/so-long.el (so-long-minor-modes): Additional modes to disable 2021-08-03 23:20:06 +12:00
Phil Sainty
e8718522c2 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.
2021-08-03 23:20:06 +12:00
Phil Sainty
9df60d52d5 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.
2021-08-03 23:20:06 +12:00
Phil Sainty
359a8e4eda ; * lisp/so-long.el: Bump to version 1.1 2021-08-03 23:20:06 +12:00
Phil Sainty
985a3bd331 ; * lisp/so-long.el: Documentation 2021-08-03 23:20:06 +12:00
Jimmy Yuen Ho Wong
b44abacc8c * 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.
2021-08-03 10:27:20 +02:00
Amin Bandali
d50721bf02
Merge from origin/emacs-27
75ecce4323 Unbreak ERC's Ibuffer filter (Bug#44100)
2021-08-02 22:39:43 -04:00
Amin Bandali
72dc602459
; Merge from origin/emacs-27
The following commit was skipped:

61def1e392 ; Auto-commit of loaddefs files.
2021-08-02 22:39:43 -04:00
Olivier Certner
75ecce4323
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.
2021-08-02 22:34:25 -04:00
Juri Linkov
09c3620253 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'.
2021-08-03 01:08:23 +03:00
Stephen Gildea
a812992aee ; 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.
2021-08-01 21:09:16 -07:00
Stephen Gildea
d160d1aff5 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.
2021-08-01 21:01:42 -07:00
Stefan Monnier
e68bc86bcf * 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.
2021-08-01 18:13:41 -04:00
Stefan Monnier
1a7818824b * lisp/progmodes/flymake.el (flymake--mode-line-title): Don't quote lambda 2021-08-01 18:08:01 -04:00
Juri Linkov
a6f67d60e1 * lisp/progmodes/project.el (project-switch-project): Use 'let*' (bug#49635).
This allows overriding-local-map to have effect on read-key-sequence.
2021-08-01 23:43:37 +03:00
Juri Linkov
cd7eb4bee1 * lisp/emacs-lisp/autoload.el (autoload--make-defs-autoload): Display warning.
https://lists.gnu.org/archive/html/emacs-devel/2021-08/msg00007.html
2021-08-01 22:58:09 +03:00
Mattias Engdegård
b72f88518b 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`.
2021-08-01 17:12:40 +02:00
Glenn Morris
3b7f72ca55 ; Auto-commit of loaddefs files. 2021-08-01 06:30:07 -07:00
Mattias Engdegård
0ecebbf274 ; * lisp/replace.el (occur--set-arrow): Remove unused variable. 2021-08-01 15:25:02 +02:00
Glenn Morris
61def1e392 ; Auto-commit of loaddefs files. 2021-08-01 06:12:18 -07:00