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

153500 commits

Author SHA1 Message Date
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
Stefan Kangas
8dba3a0626 Improve docstring of edit-abbrevs
* lisp/abbrev.el (edit-abbrevs): Doc fix; don't use obsolete name.
Improve docstring formatting.
2022-01-10 01:00:58 +01:00
Stefan Monnier
dc1ee5b502 * lisp/gnus/nnnil.el (nnnil-close-server): Add new defs arg 2022-01-09 17:16:47 -05:00
Eli Zaretskii
4b6efda54e ; * src/filelock.c (lock_if_free): Fix comment wording. 2022-01-09 19:21:03 +02:00
Eli Zaretskii
362ceb75a9 ; * src/fns.c (Frequire): Fix wording of doc string. 2022-01-09 19:02:17 +02:00
Ivan Sokolov
4509095d79 Add doc-string indices to easy-mmode-{defmap,defsyntax}
* lisp/emacs-lisp/easy-mmode.el (easy-mmode-defmap)
(easy-mmode-defsyntax): Declare third argument as doc-string.
(Bug#52978)
2022-01-09 16:37:02 +01:00
Po Lu
691015fedb Fix filelock.c for Haiku
This was found during the investigation surrounding bug#53136,
but is not directly related.

* src/filelock.c (lock_if_free): Explictly test err against -1
or -2, and reverse sign of system errors on Haiku.  (No Haiku
error occupies -1 or -2.)
2022-01-09 13:34:19 +00:00
Po Lu
54971f5c14 Add an option to display the cursor at the beginning of any preedit text
Believe it or not, people actually want this, because it makes
Emacs behave closer to some other editors such as WPS Office.

* lisp/term/x-win.el
(x-display-cursor-at-start-of-preedit-string): New user option.
(x-preedit-text): Respect new option.
2022-01-09 20:55:16 +08:00
Po Lu
e91848344e Pass through caret position from native GTK input methods
* src/gtkutil.c (xg_im_context_preedit_changed): Set caret
position appropriately.
* src/xfns.c (xg_widget_key_press_event_cb): Ignore modifier
keys.
(xic_preedit_caret_callback, xic_preedit_draw_callback):
Constrain caret position to the string length as well.
2022-01-09 20:43:17 +08:00
Po Lu
59ede5cce8 Fix specification of caret position
* src/xfns.c (xic_preedit_caret_callback):
(xic_preedit_draw_callback): Use `cursor' property correctly.

* src/xterm.c (handle_one_xevent): Stop filtering XI release
events.  This caused more problems than it fixed.
2022-01-09 20:30:58 +08:00
Eli Zaretskii
fea3bed792 ; Minor wording fix in last NEWS entry. 2022-01-09 14:14:10 +02:00
Po Lu
5cee447ed0 Add missing part of last commit
* src/xterm.h (struct x_output): Add field `preedit_caret'.
2022-01-09 19:48:13 +08:00
Po Lu
d5499e3eb2 Display caret in preedit text where the input method asked
* src/xfns.c (xic_preedit_start_callback): Clear caret position.
(xic_preedit_caret_callback): Record new caret position and
announce it.
(xic_preedit_done_callback): Clear caret position.
(xic_preedit_draw_callback): Set caret position appropriately.
2022-01-09 19:46:14 +08:00
Eli Zaretskii
e28849eb02 Revert "Fix alignment on font size change in tabulated-list-mode"
This reverts commit 2767c89db7.

That change caused a regression in a much more important use
case, see bug#53133.
2022-01-09 12:38:26 +02:00
Po Lu
3dfefb8bb4 Fix native GTK input for cyrillic input methods
* src/gtkutil.c (xg_widget_key_press_cb): Get unicode mapping of
keyval if string doesn't exist.
* src/xterm.c (handle_one_xevent): Fix build without
HAVE_X_I18N.
2022-01-09 18:16:46 +08:00
Stefan Kangas
262a7c9ea0 New minor mode elide-head-mode
* lisp/elide-head.el (elide-head-mode): New minor mode.  (Bug#52980)
(elide-head--delete-overlay, elide-head--show)
(elide-head--hide): New functions factored out from ...
(elide-head, elide-head-show): ... here.  Make obsolete in favor
of elide-head-mode.
(elide-head-headers-to-hide): Doc fix.

* test/lisp/elide-head-tests.el (ert-x): Require.
(elide-head-tests-elide-head-mode)
(elide-head-tests-elide-head-mode/enable-disable)
(elide-head-tests-elide-head-mode/normal-mode)
(elide-head-tests-elide-head-mode/revert-buffer): New tests.
(elide-head--add-test): Update test to use elide-head-mode.
(elide-head-tests-elide-head)
(elide-head-tests-elide-head-with-prefix-arg)
(elide-head-tests-show): Make obsolete.
2022-01-09 11:12:06 +01:00
Po Lu
a2868656ab * lisp/term/x-win.el (x-preedit-text): Make edit overlay window local. 2022-01-09 17:50:51 +08:00
Eli Zaretskii
4c724af1e3 ; * lisp/emacs-lisp/package.el (package-native-compile): Fix doc wording. 2022-01-09 10:25:36 +02:00
Po Lu
51ee62bf28 Reduce flicker on Haiku Emacs tooltips
* src/haikuterm.c (haiku_read_socket): Ignore motion events from
tooltip frames.
2022-01-09 06:54:08 +00:00
Stefan Kangas
3984ea8553 Merge from origin/emacs-28
30f1bdb41f Clarify docstring of package-native-compile
c54fda643d Fix Subject "simplification" in Rmail
2022-01-09 06:30:18 +01:00