1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-26 23:31:55 -08:00
Commit graph

153531 commits

Author SHA1 Message Date
Glenn Morris
0cbc41322e Prefer unexport in Makefiles
* admin/grammars/Makefile.in, leim/Makefile.in:
* lisp/Makefile.in, test/Makefile.in:
Use unexport for EMACSLOADPATH.
2022-01-12 09:37:39 -08:00
Glenn Morris
745580a36d Avoid user environment interfering with bootstrap
* Makefile.in, admin/unidata/Makefile.in:
* doc/misc/Makefile.in, lib-src/Makefile.in:
Don't export user environment variables that can affect running
emacs.  (Bug#53038)
2022-01-12 09:35:43 -08:00
Jim Porter
db745f37ae Follow POSIX/GNU argument conventions for 'eshell-eval-using-options'
* lisp/eshell/esh-opt.el (eshell--split-switch): New function.
(eshell-set-option): Allow setting a supplied value instead of always
consuming from 'eshell--args'.
(eshell--process-option): Support consuming option values specified as
a single token.
(eshell--process-args): For short options, pass full switch token to
'eshell--process-option'.

* test/lisp/eshell/esh-opt-tests.el (esh-opt-process-args-test): Fix
test.
(test-eshell-eval-using-options): Add tests for various types of
options.

* doc/misc/eshell.texi (Defining new built-in commands): New
subsection, describe how to use 'eshell-eval-using-options'.

* etc/NEWS: Announce the change.
2022-01-12 16:58:37 +02:00
Eli Zaretskii
7ebcb4b6f2 Avoid assertion violations with variable-weight fonts
* src/font.c (font_score, font_delete_unmatched): Don't assume
weight, slant, and width properties of the font must be fixnums:
some variable-weight fonts violate that assumption.  Reported
by Sean Whitton <spwhitton@spwhitton.name>.  This is for builds
with Fontconfig < v2.11.91, for which the fix in
'ftfont_pattern_entity' cannot work.  (Bug#52888)
2022-01-12 16:52:14 +02:00
Sean Whitton
f373b52ba9 Skip virtual FcPattern entries for variable weight fonts
* src/ftfont.c (ftfont_list): Pass FC_VARIABLE to FcObjectSetBuild.
* src/ftfont.c (ftfont_pattern_entity): Skip meta/virtual FcPattern
entries for variable weight fonts (Bug#52888).
2022-01-12 16:42:27 +02:00
Po Lu
492bf1e06e Use correct coordinates when translating XI2 crossing events
* src/xwidget.c (xwidget_motion_or_crossing): Use displaced
position instead of event position.
2022-01-12 20:13:28 +08:00
Po Lu
aa685a465b Ignore scroll lock key on Haiku
* src/haiku_support.cc (keysym_from_raw_char): Return special
value for keys that shouldn't be sent to Emacs.
(DispatchMessage): Respect said value.
2022-01-12 11:09:38 +00:00
Po Lu
60dd962507 Translate more keys on Haiku
* src/haiku_support.cc (keysym_from_raw_char): Translate print,
scroll lock, and pause/break.
2022-01-12 07:21:28 +00:00
Lars Ingebrigtsen
552d58d5b9 Don't do Gnus article emphasis in text/html parts
* lisp/gnus/gnus-art.el (gnus-treat-emphasize): Don't do emphasis
in text/html parts, because this leads to mis-filled text
(especially with *...* that's boldified, which typically becomes
much wider).
2022-01-12 06:28:19 +01:00
Po Lu
8555a3e1ed Fix arity error when trying to add a file to an automake project
* lisp/cedet/ede/project-am.el (project-add-file): Add ignored
_FILE parameter like the other `project-add-file' methods.
2022-01-12 11:25:15 +08:00
Po Lu
9376f456af Fix display of text decorations in the mode line
This is considered a temporary fix until the cause of
fringe-overwriting underlines is established.

* src/xterm.c (x_draw_glyph_string): Don't constrain decorations
if the row is a tab or modeline.
2022-01-12 11:09:52 +08:00
Po Lu
f2fcea2716 Avoid unnecessary lookup of min and max keycodes when XKB is present
* src/xterm.c (x_emacs_to_x_modifiers): Avoid calling
XDisplayKeycodes when that information is available in the xkb
desc and is not needed anyway.
2022-01-12 10:24:01 +08:00
Po Lu
ee025b7f0c Ignore resetting devices upon some events we don't have to handle
* src/xterm.c (handle_one_xevent): Ignore SlaveSwitch
DeviceChanged events.
2022-01-12 09:28:48 +08: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