1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-25 23:10:47 -08:00
Commit graph

149253 commits

Author SHA1 Message Date
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
Mattias Engdegård
660b17ef3e 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.
2021-08-01 14:42:07 +02:00
Juri Linkov
12af7ee46d * 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.
2021-08-01 11:38:51 +03:00
Kévin Le Gouguec
7640f1da0b 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.
2021-08-01 00:16:30 +02:00
Lars Ingebrigtsen
2a2e7e5466 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.
2021-08-01 00:01:59 +02:00
Lars Ingebrigtsen
4ca3cf996e 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.
2021-07-31 23:49:37 +02:00
Mattias Engdegård
5f33ad6954 ; compilation-error-regexp-alist-alist): eval-when-compile 2021-07-31 23:44:17 +02:00
Mattias Engdegård
6413f08887 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.
2021-07-31 22:46:24 +02:00
Mattias Engdegård
ff16bea7f4 * etc/NEWS: Mention occur-mode highlight changes. 2021-07-31 22:46:24 +02:00
Lars Ingebrigtsen
943d79914b C-x 5 5 manual tweak
* doc/emacs/frames.texi (Creating Frames): Mention
other-frame-prefix function name.
2021-07-31 22:36:19 +02:00
Lars Ingebrigtsen
fa09452ab5 Update NEWS tagging for a couple entries 2021-07-31 22:27:08 +02:00
Lars Ingebrigtsen
3019d628e2 Add an index entry for outline-minor-mode-cycle
* doc/emacs/text.texi (Outline Mode): Document outline-minor-mode-cycle.
2021-07-31 22:25:38 +02:00
Lars Ingebrigtsen
59f80ffc7d Document outline-minor-mode-cycle in the manual.
* doc/emacs/text.texi (Outline Mode): Document outline-minor-mode-cycle.
2021-07-31 22:22:42 +02:00
Lars Ingebrigtsen
d3d6ea50d2 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.
2021-07-31 19:51:16 +02:00
Lars Ingebrigtsen
2dcb0f8f52 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.
2021-07-31 18:44:02 +02:00
Lars Ingebrigtsen
f6c5a801ef 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).
2021-07-31 17:44:43 +02:00
Lars Ingebrigtsen
c4239ec32c Extend whitespace-empty to the end of the line
* lisp/whitespace.el (whitespace-empty): Restore Emacs 26 look by
extending the face (bug#42112).
2021-07-31 16:52:44 +02:00
Lars Ingebrigtsen
5ecf39a5ea Revert "Fix `speedbar-directory-buttons' when using Tramp"
This reverts commit 5afad3918b.

This patch can't possibly be correct, and it breaks the stated interface.
2021-07-31 14:54:52 +02:00
Lars Ingebrigtsen
32b9c7d06f Revert "Allow nil initializers in define-minor-mode"
This reverts commit 02cbb37de7.

This was mistakenly commited and doesn't really make much sense.
2021-07-31 13:37:42 +02:00
Lars Ingebrigtsen
99600ee7b4 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.
2021-07-31 13:26:26 +02:00
Lars Ingebrigtsen
02cbb37de7 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.
2021-07-31 12:35:45 +02:00
Alan Third
12c5ca4d82 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.
2021-07-31 11:13:05 +01:00
Alan Third
5a48c99696 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.
2021-07-31 11:13:05 +01:00
Alan Third
0b5cf48509 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.
2021-07-31 11:13:05 +01:00
Alan Third
1ba02d85a9 Fix macOS live resize drawing
* src/nsterm.m ([EmacsView layout]):
([EmacsView layoutSublayersOfLayer:]): Rename layout to
layoutSublayersOfLayer.
2021-07-31 11:13:05 +01:00
Alan Third
960f3fc589 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.
2021-07-31 11:13:05 +01:00
Alan Third
1535c81f77 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.
2021-07-31 11:13:05 +01:00
Alan Third
a4d2c88cde 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.
2021-07-31 11:13:05 +01:00
Eli Zaretskii
0992335d12 * src/fontset.c (check_fontset_name): A better fix for bug#49782. 2021-07-31 09:28:36 +03:00
Adam Porter
44fe0043d3 * 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.
2021-07-30 17:23:32 -04:00
Eli Zaretskii
d9bc7dbefd * src/fontset.c (check_fontset_name): Fix last change. 2021-07-30 21:51:59 +03:00
Eli Zaretskii
1da5b2c60b 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)
2021-07-30 21:17:58 +03:00
Michael Albinus
55a9c17cef Change Tramp version to "2.5.2-pre"
* doc/misc/trampver.texi:
* lisp/net/trampver.el: Change version to "2.5.2-pre".
2021-07-30 17:19:29 +02:00
Stephen Gildea
3f70e85609 ; 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
2021-07-30 06:35:48 -07:00
Dmitry Gutov
df1dbaf121 Make fileloop skip missing files
* lisp/fileloop.el (fileloop-next-file): If a file doesn't exist,
skip to the next one (bug#44979).
2021-07-30 14:58:25 +02:00
Maxim Nikulin
ce8d5c6fa5 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
2021-07-30 14:42:07 +02:00
k3tu0isui
9ffbe99b11 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
2021-07-30 14:40:21 +02:00
Mattias Engdegård
f472dd8ea5 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
2021-07-30 14:37:38 +02:00
Lars Ingebrigtsen
16876744d4 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).
2021-07-30 14:07:04 +02:00
Lars Ingebrigtsen
2ece0f8d3c 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).
2021-07-30 14:03:43 +02:00
Max Nikulin
920aaef9d9 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
2021-07-30 14:00:41 +02:00
Lars Ingebrigtsen
88ba1a86c2 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).
2021-07-30 13:51:46 +02:00
Lars Ingebrigtsen
0bd1346318 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.
2021-07-30 13:32:54 +02:00
Lars Ingebrigtsen
4053bd5201 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.)
2021-07-30 13:13:46 +02:00
Basil L. Contovounesios
97894b07c2 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.
2021-07-30 11:30:53 +01:00
Michael Albinus
5f65b67dac * etc/NEWS: Tramp supports authentication via yubikey now. Fix typos. 2021-07-30 11:57:50 +02:00
Michael Albinus
245d3e9ffd 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)
2021-07-30 11:57:39 +02:00
Mattias Engdegård
52a55e11de 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.
2021-07-30 09:54:30 +02:00
Mattias Engdegård
ab9c06449d 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).
2021-07-30 09:54:30 +02:00