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

153524 commits

Author SHA1 Message Date
Alan Mackenzie
2128cd8c08 Merge branch 'master' into scratch/correct-warning-pos 2022-01-11 21:57:54 +00:00
Alan Mackenzie
18dac47255 Remove the filename argument from the command line after an ELC+ELN build
This fixes bug #53164.  Without this fix, bootstrap-emacs loads the source
file uselessly into a buffer after completing the compilation.
2022-01-11 18:29:07 +00:00
Juri Linkov
368b8fe765 * lisp/window.el (display-comint-buffer-action): Move to the end of file.
Move closer to pop-to-buffer-same-window after its default value
display-buffer--same-window-action is defined.
2022-01-11 20:04:30 +02:00
Juri Linkov
c8ea3f09e0 * lisp/vc/vc.el (vc-shrink-buffer-window): New function (bug#51062).
(vc-diff-finish-functions): New variable.
(vc-diff-finish): Use it.
(vc-log-finish-functions): New variable.
(vc-log-internal-common): Use it.
2022-01-11 19:34:54 +02:00
Juri Linkov
ecdda194a8 * src/window.c (other-window-scroll-default): New variable (bug#51210).
(Fother_window_for_scrolling): Use it.
2022-01-11 19:28:52 +02:00
Juri Linkov
4765487d5d More fixes for display-comint-buffer-action
* lisp/window.el (display-comint-buffer-action):
Use display-buffer--same-window-action as the default value.

* lisp/progmodes/sh-script.el (sh-show-shell):
* lisp/shell.el (shell): Add display-comint-buffer-action to pop-to-buffer.

* lisp/progmodes/project.el (project-shell, project-eshell): Use
`bound-and-true-p display-comint-buffer-action' for backward-compatibility.

https://lists.gnu.org/archive/html/emacs-devel/2021-12/msg02964.html
2022-01-11 19:19:37 +02:00
Morgan Smith
a18517f619 Fix display-comint-buffer-action default behavior (closes bug#52878)
* lisp/window.el (display-comint-buffer-action): Make it an alist.
2022-01-11 19:13:04 +02:00
Paul Eggert
a980795fd0 Clean up filelock code related to errno
Reduce dependency on Haiku internals, by not assuming that
Haiku errno values (which are negative) are neither -1 nor -2.
This removes an #ifdef HAIKU while still maintaining
portability to Haiku.
* src/filelock.c (NEGATIVE_ERRNO, ANOTHER_OWNS_IT, I_OWN_IT):
New constants, which should work regardless of whether
we are on Haiku or B_USE_POSITIVE_POSIX_ERRORS is defined.
(current_lock_owner, lock_if_free, lock_file, unlock_file)
(Ffile_locked_p): Use them, without assuming anything about errno
value sign.
2022-01-11 08:58:39 -08:00
Paul Eggert
68f2d772e5 Fix userlock diagnostic
* lisp/userlock.el (ask-user-about-lock):
Fix typo (missing paren) in diagnostic.
2022-01-11 08:58:39 -08:00
Eli Zaretskii
8564af99b0 ; * doc/emacs/haiku.texi (Haiku Basics): Fix typo and wording. 2022-01-11 17:17:05 +02:00
Po Lu
46c1dd4cd5 Stop ungrabbing when freeing XI devices
This breaks when x_free_xi_devices is called from a
HierarchyChange event where a master device has been removed or
a slave device has been detached, and it should no longer be
required since we now rely on passive grabs.

* src/xterm.c (x_init_master_valuators): Stop calling
XIUngrabDevice on all devices.
2022-01-11 19:06:41 +08:00
Po Lu
e351948667 Make native input work on GTK 2
* src/gtkutil.c (xg_create_frame_widgets): Allow focusing fixed
widget.
2022-01-11 18:13:04 +08:00
Po Lu
73e4335c58 Stop decoding GTK event strings when using native input
* src/gtkutil.c (xg_widget_key_press_event_cb): Stop decoding
event strings.
2022-01-11 18:06:37 +08:00
Juri Linkov
0b0a8dab68 * lisp/outline.el (outline-minor-mode-cycle--bind): Fix outline-on-heading-p.
When calling outline-on-heading-p, set its argument INVISIBLE-OK to t,
so when <backtab> (bound to outline-cycle-buffer) hides the current outline
at a deep level, <backtab> should continue cycling outlines even when
the current outline heading is invisible.  It worked this way before
the recent change that moved cycling keys from font-lock text properties
to outline-minor-mode keymap with :filter.
2022-01-11 10:56:54 +02:00
Stefan Kangas
38575b7203 Merge from origin/emacs-28
8db5f82d45 ; Fix tabulated-list-mode tests after revert
2022-01-11 06:56:30 +01:00
Po Lu
da2bfc79b4 Fix creating GUI frames in an automatically started server on Haiku
* lisp/term/haiku-win.el: Correct specification of
`display-format-alist'.
2022-01-11 05:36:09 +00:00
Stefan Kangas
8db5f82d45 ; Fix tabulated-list-mode tests after revert
* test/lisp/emacs-lisp/tabulated-list-tests.el
(tabulated-list-print, tabulated-list-sort): Fix tests.
2022-01-11 06:17:59 +01:00
Stefan Monnier
ecea3f2c83 (files-tests--with-buffer-offer-save): Turn it into a function
* test/lisp/files-tests.el (files-tests--with-buffer-offer-save):
Turn it into a function.
(files-tests-save-buffers-kill-emacs--asks-to-save-buffers)
(files-tests-buffer-offer-save): Adjust calls accordingly
2022-01-10 22:40:55 -05:00
Stefan Monnier
f4e0562a2c (hack-one-local-variable-constantp): Mark as obsolete
* lisp/files.el (hack-one-local-variable-constantp): Mark as obsolete.
(hack-one-local-variable-eval-safep): Use `macroexp-const-p` instead.
2022-01-10 22:37:16 -05:00
Stefan Monnier
73b15f45f9 Merge remote-tracking branch 'origin/emacs-28' into trunk 2022-01-10 22:34:55 -05:00
Sam Steingold
4d621ffd30 Use 'auth-info-password' in tests
* test/lisp/auth-source-tests.el (auth-source-test-searches):
  (auth-source-test-secrets-create-secret):
  (auth-source-test-netrc-create-secret, auth-source-delete):
  Use 'auth-info-password' instead of ad hoc code.
2022-01-10 20:52:20 -05:00
Sam Steingold
063375e0ed Update for the recent change
* doc/misc/auth.texi (Help for developers): Document
  'auth-source-pick-first-password' and 'auth-info-password'.
  Update the 'auth-source-search' example.
2022-01-10 20:52:20 -05:00
Po Lu
4cad2ada78 ; * doc/lispref/display.texi (Face Attributes): Fix typo. 2022-01-11 09:40:32 +08:00
Po Lu
81cb96df88 Use window beneath mouse for determining scroll deltas on Haiku
* src/haikuterm.c (haiku_read_socket): Use window underneath
wheel for calculating scroll deltas.
2022-01-11 01:30:14 +00:00
Po Lu
c060e374a1 * src/filelock.c (lock_if_free): Fix Haiku positive errno check. 2022-01-11 00:51:53 +00:00
Paul Eggert
5705644810 Assume C99 when defining pD
* src/lisp.h (pD): Assume C99 or later, to simplify the ifdefs.
2022-01-10 15:24:30 -08:00
Karl Fogel
99f47ede41 Document external maintenance of some packages
Document the fact that some packages in Emacs are externally
maintained, and specifically document Org Mode's external maintenance.

For more context, see the thread that starts here:

  https://lists.gnu.org/archive/html/emacs-devel/2021-12/msg00366.html
  From: Karl Fogel
  To: Emacs Devel
  Subject: Improving documentation of Org Mode integration into Emacs.
  Date: Sat, 04 Dec 2021 15:14:59 -0600
  Message-ID: <87zgpgax7w.fsf@red-bean.com>
2022-01-10 13:20:29 -06:00
Juri Linkov
97806bc7de Add diff-mode-read-only to enable shorter keys in diff-mode
To be able to use outline-minor-mode-cycle keys in diff-mode,
outline-minor-mode should be higher in minor-mode-map-alist,
and a new variable diff-mode-read-only should be set
when the diff-mode buffer is read-only.
https://lists.gnu.org/archive/html/emacs-devel/2022-01/msg00740.html

* lisp/vc/diff-mode.el: Add diff-mode-read-only to minor-mode-map-alist.
(diff-mode-read-only): New buffer-local variable.
(diff-mode): Set diff-mode-read-only to t when buffer-read-only is non-nil.
Update diff-mode-read-only in read-only-mode-hook.
Remove buffer-read-only from minor-mode-overriding-map-alist.
Remove view-mode-hook because now view-mode is higher than
diff-mode-read-only in minor-mode-map-alist.

* lisp/vc/vc-git.el (vc-git-stash-show):
* lisp/vc/vc.el (vc-diff-internal): Set buffer-read-only to t
before calling diff-mode that will set diff-mode-read-only.
2022-01-10 20:29:53 +02:00
Juri Linkov
2b7a486605 * lisp/outline.el: Don't set outline-minor font-lock text property 'keymap'.
Instead of adding font-lock text property 'keymap' with
outline-minor-mode-cycle on headings in outline-minor-mode,
check for outline-minor-mode-cycle and outline-on-heading-p
in :filter on keys from the keymap of outline-minor-mode.
https://lists.gnu.org/archive/html/emacs-devel/2022-01/msg00180.html

(outline-minor-mode-cycle--bind): Add a condition on outline-minor-mode-cycle
and outline-on-heading-p in :filter.
(outline-font-lock-keywords): Remove if-branches for outline-minor-mode-cycle
that added keymap.
(outline-minor-mode-highlight-buffer): Don't put keymap on overlays.
(outline-minor-mode): Rewrite :keymap setting to rely on
easy-mmode-define-keymap, and add :inherit outline-minor-mode-cycle-map.
Don't check for outline-minor-mode-cycle to add font-lock keywords.
(outline--insert-open-button, outline--insert-close-button):
Remove :parent outline-minor-mode-cycle-map.
2022-01-10 20:20:09 +02:00
Eli Zaretskii
99a9b545f0 Revert "Remove the filename argument from the command line after an ELC+ELN build"
This reverts commit ffc047c896.

Please don't install anything non-trivial on the release branch
without asking first.
2022-01-10 20:02:39 +02:00
Eli Zaretskii
415ed4b425 Fix 'exchange-point-and-mark' in 'transient-mark-mode'
* lisp/simple.el (exchange-point-and-mark): Don't deactivate mark
when 'transient-mark-mode' is ON.  (Bug#53150)
2022-01-10 19:10:52 +02:00
Alan Mackenzie
ffc047c896 Remove the filename argument from the command line after an ELC+ELN build
This fixes bug #53164.  Without this fix, bootstrap-emacs loads the source
file uselessly into a buffer after completing the compilation.
2022-01-10 17:05:41 +00:00
Po Lu
aca1e31e36 Implement recent improvements to underline display on PGTK
* src/pgtkterm.c (pgtk_draw_glyph_string): Respect new underline
face fields.
2022-01-10 20:07:12 +08:00
Po Lu
77c3d41adc Prevent text decorations from overwriting surrounding areas on X
* src/xterm.c (x_draw_underwave): New parameter
`decoration_width'.
(x_draw_glyph_string): Constrain decoration width to current
text area.
2022-01-10 19:54:36 +08:00
Po Lu
4f50d964e5 Allow controlling the underline position of faces
* doc/lispref/display.texi (Face Attributes): Document new
`:position' property of the `:underline' attribute.
* etc/NEWS: Announce new property.
* lisp/cus-face.el (custom-face-attributes): Implement
customization for new face attribute.
* src/dispextern.h (struct face): New fields
`underline_pixels_above_descent_line' and
`underline_at_descent_line_p'.
* src/haikuterm.c (haiku_draw_text_decoration):
* src/nsterm.m (ns_draw_text_decoration):
* src/w32term.c (w32_draw_glyph_string):
* src/xterm.c (x_draw_glyph_string): Respect new face fields.

* src/xfaces.c (realize_gui_face): Handle new `:position'
keyword.
(syms_of_xfaces): New symbol `:position'.
2022-01-10 19:26:46 +08:00
Po Lu
e36f076eb7 * doc/emacs/xresources.texi (GTK resources): Fix dead links. 2022-01-10 18:07:46 +08:00
Po Lu
b1f33ff951 Load X resources from a settings file like other programs on Haiku
* doc/emacs/haiku.texi (Haiku Basics): Document how X resources
are discovered on Haiku.
* src/haiku_support.cc (class Emacs): Load settings file.
(be_find_setting): New function.
* src/haiku_support.h (be_find_setting): New prototype.
* src/haikuterm.c (get_string_resource): Look in the settings
file if there's nothing in the in-memory resource database.
2022-01-10 10:01:33 +00:00
Michael Albinus
cda372bfc2 * admin/MAINTAINERS: Add Tramp compatibility note 2022-01-10 10:00:58 +01:00
Po Lu
16ed07ac8d Use phys cursor height instead of font base to set spot Y
* src/xfns.c (xic_set_xfontset): Use `phys_cursor_height' to
avoid the spot potentially appearing at an incorrect position.
2022-01-10 14:38:18 +08:00
Po Lu
f591835838 Don't set callbacks on XIC when adjusting spot if callbacks are off
* src/xfns.c (xic_set_preeditarea): Don't set callbacks if the
XIC style is not XIMPreeditCallbacks.  (bug#53146)
2022-01-10 14:36:21 +08:00
Po Lu
d5cf772cad ; * src/xterm.c (handle_one_xevent): Fix typo in last change. 2022-01-10 11:35:30 +08:00
Po Lu
697298e745 Make toggling native input methods via shift work again
* src/xterm.c (handle_one_xevent): Start filtering XI key
release events again, but drop the event if the IM asked.
2022-01-10 11:31:41 +08:00
Stefan Kangas
3057e0458f Make old elide-head commands wrappers for mode
* lisp/elide-head.el (elide-head, elide-head-show): Make into
wrappers around elide-head-mode.
2022-01-10 04:30:13 +01:00
Stefan Monnier
74223bbdaf (save-some-buffers): Simplify the fix for bug#46374
* lisp/files.el (save-some-buffers): Only check the
`save-some-buffers-function` property on functions from
`save-some-buffers-default-predicate` since callers which provide
a `pred` argument can arrange to compute `pred` themselves if needed.

* test/lisp/files-tests.el (files-tests-buffer-offer-save): Don't test
with `pred` set to `save-some-buffers-root` since it's not an
appropriate function for that any more.
2022-01-09 22:17:45 -05:00
Po Lu
bf121747de Don't hard code key codes on Haiku
* src/haiku_support.cc (keysym_from_raw_char): New function.
(DispatchMessage): Map raw character to keysym if applicable.
(be_map_key): Delete function.
* src/haiku_support.h (struct haiku_key_event): Update fields
to hold keysym and character instead.
* src/haikuterm.c (haiku_read_socket): Don't call be_map_key,
and use keysym field if provided instead.
2022-01-10 02:32:01 +00:00
Po Lu
f3b1badfd6 Map some more keypad keys on Haiku
* src/haiku_support.cc (BMapKey): Rename to `be_map_key'.
(be_map_key): Recognize more key codes.
* src/haiku_support.h (BMapKey, be_map_key): Adjust accordingly.
* src/haikuterm.c (haiku_read_socket): Likewise.
2022-01-10 01:59:34 +00:00
Po Lu
8d0a2e4dce Fix build without X11 I18N
* src/xterm.c (event_handler_gdk):
(handle_one_xevent):
(x_draw_window_cursor):
(x_term_init): Fix build without HAVE_X_I18N.
2022-01-10 09:00:48 +08:00
Po Lu
0f5f2af51e Fix off-by-one errors in caret position application
* src/gtkutil.c (xg_im_context_preedit_changed):
* src/xfns.c (xic_preedit_caret_callback):
(xic_preedit_draw_callback): Constrain caret position to
SCHARS (arg) - 1.
2022-01-10 08:40:26 +08:00
Stefan Kangas
32f1ec449d * lisp/abbrev.el (edit-abbrevs-mode-map): Use defvar-keymap. 2022-01-10 01:09:10 +01:00
Stefan Kangas
fe54cf0b1f Do interactive mode tagging for edit-abbrevs-mode
* lisp/abbrev.el (edit-abbrevs-redefine)
(abbrev-edit-save-to-file, abbrev-edit-save-buffer): Interactive mode
tagging for edit-abbrevs-mode.
(edit-abbrevs-mode): Make non-interactive.
2022-01-10 01:09:10 +01:00