1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-04 08:47:11 +00:00
Commit Graph

511 Commits

Author SHA1 Message Date
Damien Cassou
b1fa7974bb Make previous-buffer and next-buffer repeatable
* lisp/bindings.el (buffer-navigation-repeat-map): Add new map.
* lisp/bindings.el (previous-buffer, next-buffer): Mark as
repeatable.  (Bug#58800)
2022-10-30 14:14:13 +01:00
Miha Rihtaršič
825f4fdb51 Fix mode line mouse-1 binding when showing only column numbers
* lisp/bindings.el (mode-line-position): Fix the mouse-1 binding
when showing only column numbers (bug#56694).
2022-07-23 08:02:48 +02:00
Stefan Kangas
653503573c ; * lisp/bindings.el: Remove conflicting commented out bindings. 2022-07-19 13:52:12 +02:00
Stefan Kangas
1d0937c90d Prefer defvar-keymap in bindings.el
* lisp/bindings.el (narrow-map, undo-repeat-map)
(next-error-repeat-map, goto-map, search-map, ctl-x-r-map)
(page-navigation-repeat-map, abbrev-map, ctl-x-x-map): Prefer
defvar-keymap.
(mode-specific-map): Minor doc fix.
2022-07-19 13:52:03 +02:00
Stefan Kangas
99adfafdfc Re-add comment on autoloading cookies in preloaded files
This comment was removed in 2009, but it is useful to explain why
we are keeping these autoload cookies.
* lisp/bindings.el:
* lisp/font-core.el:
* lisp/format.el:
* lisp/international/mule-cmds.el: Re-add comment on autoloading.
* lisp/font-core.el (font-lock-defaults): Re-add autoload cookie,
despite the fact that this file is preloaded.
2022-07-11 11:31:03 +02:00
Stefan Kangas
da3f3dd091 Prefer :risky defcustom keyword
* lisp/align.el (align-region-separate, align-rules-list)
(align-exclude-rules-list, align-vhdl-rules-list):
* lisp/bindings.el (mode-line-percent-position):
* lisp/filesets.el (filesets-menu-cache-file, filesets-commands)
(filesets-external-viewers, filesets-ingroup-patterns)
(filesets-data):
* lisp/hi-lock.el (hi-lock-file-patterns-policy):
* lisp/mail/mailalias.el (mail-complete-alist)
(mail-directory-process, mail-directory-stream)
(mail-directory-parser):
* lisp/mail/rmail.el (rmail-confirm-expunge):
* lisp/mail/sendmail.el (mail-signature):
* lisp/mail/supercite.el (sc-cite-frame-alist)
(sc-uncite-frame-alist, sc-recite-frame-alist)
(sc-default-cite-frame, sc-default-uncite-frame)
(sc-default-recite-frame, sc-attrib-selection-list)
(sc-rewrite-header-list):
* lisp/progmodes/make-mode.el (makefile-special-targets-list):
* lisp/so-long.el (so-long-action-alist):
* lisp/textmodes/sgml-mode.el (sgml-tag-alist): Prefer defcustom
:risky keyword argument to directly setting the 'risky-local-variable'
symbol property.
2022-07-11 11:30:00 +02:00
Stefan Kangas
05297e40c0 Quote some literal keys to get help-key-binding face
* lisp/align.el (align):
* lisp/bindings.el (undo-repeat-map):
* lisp/calc/calc-embed.el (calc-do-embedded):
* lisp/calc/calc-prog.el (calc-user-define-invocation):
* lisp/calc/calc-yank.el (calc--edit-mode):
* lisp/comint.el (comint-history-isearch)
* lisp/dired.el (dired-mode):
* lisp/emulation/viper.el (viper-mode):
* lisp/erc/erc-button.el (erc-button-face):
* lisp/erc/erc-track.el (erc-track-enable-keybindings):
* lisp/gnus/gnus-art.el (gnus-article-button-face):
* lisp/gnus/gnus-eform.el (gnus-edit-form):
* lisp/gnus/gnus-sum.el (gnus-summary-stop-at-end-of-message)
(gnus-summary-goto-unread):
* lisp/icomplete.el (icomplete-show-matches-on-no-input):
* lisp/image-mode.el (image-scroll-up):
* lisp/international/iso-transl.el (iso-transl-set-language):
* lisp/isearch.el (isearch-forward-regexp):
* lisp/misc.el (butterfly):
* lisp/outline.el (outline-minor-mode-cycle-filter)
(outline-minor-mode-cycle):
* lisp/progmodes/grep.el (rgrep):
* lisp/progmodes/gud.el (gud-gdb-repeat-map, gud-sdb-repeat-map)
(gud-dbx-repeat-map, gud-xdb-repeat-map, gud-perldb-repeat-map)
(gud-pdb-repeat-map, gud-guiler-repeat-map, gud-jdb-repeat-map):
* lisp/progmodes/idlw-shell.el (idlwave-shell-graphics-window-size)
(idlwave-shell-mode):
* lisp/progmodes/idlwave.el (idlwave-shell-debug-modifiers)
(idlwave-list-shell-load-path-shadows):
* lisp/progmodes/python.el (python-shell-get-process-or-error):
* lisp/repeat.el (repeat-check-key):
* lisp/replace.el (query-replace, query-replace-regexp)
(read-regexp):
* lisp/simple.el (read-extended-command-predicate):
* lisp/tab-bar.el (tab-bar-switch-repeat-map)
(tab-bar-move-repeat-map):
* lisp/term.el (ansi-term):
* lisp/textmodes/reftex-index.el (reftex-index-phrases-set-macro-key):
* lisp/vc/emerge.el (emerge-scroll-left, emerge-scroll-right):
* lisp/windmove.el:
* lisp/winner.el (winner-mode): Quote literal keys to get
'help-key-binding' face.
* lisp/comint.el (comint-insert-previous-argument): Use regular
quotes.
2022-07-03 23:31:31 +02:00
Lars Ingebrigtsen
e02ebe9137 Allow appending to the kill ring with mouse selections
* lisp/bindings.el (ignore-preserving-kill-region): New function.
(global-map): Use it.

* lisp/mouse.el (mouse-set-region, mouse-drag-region)
(mouse-drag-track): Allow appending to kill ring with mouse
selections (bug#32747).
2022-06-20 01:00:06 +02:00
Tassilo Horn
42e4d6b8ce Improve cycle-spacing and bind it to M-SPC by default
* lisp/bindings.el (esc-map): Bind M-SPC to cycle-spacing instead of
just-one-space.
* lisp/simple.el (delete-space--internal): New function.
(delete-horizontal-space): Use it.
(delete-all-space): New command.
(just-one-space): Implement on its own instead of calling
cycle-spacing with a special flag.
(cycle-spacing--context): Make it a plist instead of a list.  Adapt
docstring accordingly.
(cycle-spacing-actions): New user option.
(cycle-spacing): Rewrite so that it performs the actions in
cycle-spacing-actions instead of the hard-coded ones.
* doc/emacs/killing.texi (characters): Mention and add a variable
index entry for cycle-spacing-actions.
* etc/NEWS: Document that M-SPC is now cycle-spacing instead of
just-one-space.
2022-05-16 08:33:15 +02:00
Sean Whitton
ad89ec84ee Bind 'imenu' to 'M-g i' globally
Another candidate was 'M-s i'.  Discussion on emacs-devel has led me
to conclude that most people will find 'M-g i' more intuitive and thus
easier to memorize.

* lisp/bindings.el (goto-map): Bind 'imenu' to 'M-g i' globally.
* etc/NEWS: Document the change.
* doc/emacs/programs.texi (Imenu):
* lisp/progmodes/cperl-mode.el: Replace 'M-x imenu' with 'M-g i'.
2022-04-21 11:57:01 -07:00
Lars Ingebrigtsen
36810a8164 Reinstate `C-M-<delete>'
* lisp/bindings.el (global-map): Reinstate `C-M-<delete>' and
`C-M-<backspace>' (bug#29430).  These used to kill X, but that
hasn't been the case in any common GNU/Linux distributions for
decades.
2022-03-23 14:29:03 +01:00
Lars Ingebrigtsen
de419bba04 Fix the Scroll key binding on Windows
* lisp/bindings.el (global-map): Fix the binding on Windows
(bug#38007).

* lisp/scroll-lock.el (scroll-lock-mode): The event is `scroll' on
Windows, not `Scroll_Lock'.
2022-02-07 04:58:49 +01:00
Lars Ingebrigtsen
8682756420 Add new function mode-line-window-selected-p
* doc/lispref/modes.texi (Mode Line Basics): Mention it (bug#53629).
* lisp/bindings.el (mode-line-window-selected-p): New function
from martin rudalics <rudalics@gmx.at>.
2022-02-05 22:46:08 +01:00
Eli Zaretskii
dcd76bd48d Merge from origin/emacs-28
836be7a112 ; * etc/refcards/ru-refcard.tex: Update Copyright year.
86cbc6ee4a * lisp/net/tramp-sh.el: Adapt copyright year
ebe8772f65 ; Minor fixes related to copyright years
23c1ee6989 ; * test/manual/etags/ETAGS.good_N: Adjust to copyright ye...
8d3fc7ec89 * src/xfaces.c (face_for_font): Make 'hash' be uintptr_t.
19dcb237b5 ; Add 2022 to copyright years.

# Conflicts:
#	etc/NEWS
#	etc/refcards/ru-refcard.tex
#	lib/cdefs.h
#	lisp/erc/erc-dcc.el
#	lisp/erc/erc-imenu.el
#	lisp/erc/erc-replace.el
#	lisp/image-dired.el
#	lisp/progmodes/xref.el
#	m4/alloca.m4
#	m4/byteswap.m4
#	m4/errno_h.m4
#	m4/getopt.m4
#	m4/gnulib-common.m4
#	m4/inttypes.m4
#	m4/stddef_h.m4
#	m4/stdint.m4
#	m4/sys_socket_h.m4
2022-01-01 07:03:03 -05:00
Eli Zaretskii
19dcb237b5 ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
Lars Ingebrigtsen
18ce031f9b Remove the `mode-line-percent-position' min width hack
* lisp/bindings.el (mode-line-position): Remove hack to get
min-width to work on the `mode-line-percent-position' bit.
* src/xdisp.c (display_string): Respect min-width in the non-Lisp
string case (bug#52332).
2021-12-21 05:23:11 +01:00
Eli Zaretskii
cdb4bc0a81 Revert "Avoid small parasitic button on mode line"
This reverts commit c9e901f4a6.

Turns out without that "ghost" button min-width doesn't work
on the mode line at all...
2021-12-06 20:47:43 +02:00
Eli Zaretskii
aa63064fec Fix mode-line display on TTY frames
* lisp/bindings.el (mode-line-frame-control): Remove the leading
'-' before '%F' on TTY frames.  It has no real purpose, and looks
ugly nowadays, since it's preceded by a blank, due to the new
min-width feature.
2021-12-06 19:36:07 +02:00
Eli Zaretskii
c9e901f4a6 Avoid small parasitic button on mode line
* lisp/bindings.el (mode-line-position): Remove stray space
character, which caused a "ghost" button on the mode line.
(Bug#52332)
2021-12-06 19:10:33 +02:00
Po Lu
5001f4f91b Add `touch-end' event type
* etc/NEWS:
* doc/lispref/commands.texi (Misc Events): Document new
`touch-end' event type.

* lisp/bindings.el: Ignore touch-end events by default.

* src/keyboard.c (make_lispy_event): Add support for
TOUCH_END_EVENT events.
(syms_of_keyboard): New symbol `touch-end'.

* src/termhooks.h (enum event_kind): New member
`TOUCH_END_EVENT'.

* src/xterm.c (handle_one_xevent): Send touch-end events when
appropriate.
2021-12-02 10:27:24 +08:00
Lars Ingebrigtsen
6e5fd99139 Add temporary mode-line-position change
* lisp/bindings.el (mode-line-position): Add interim solution to
make `min-width' work here; this should be fixed for real in the
display_line machinery somewhere.
2021-11-25 15:14:22 +01:00
Lars Ingebrigtsen
0ccbb6f6d3 Make min-width of the U:-- wider
* lisp/bindings.el (standard-mode-line-format): Make the modified
bits larger since there's often a big difference between - and %
characters.
2021-11-24 17:12:26 +01:00
Lars Ingebrigtsen
84bf954986 Use a proportional font for the mode line
* lisp/bindings.el (mode-line-position): Add min-width specs.
(standard-mode-line-format): Ditto.

* lisp/faces.el (mode-line): Inherit from `variable-pitch'.
2021-11-24 14:48:17 +01:00
Stefan Kangas
b5a0eda978 Prefer "graphical displays" to "X terminals" in documentation
* doc/lispref/objects.texi (Ctl-Char Syntax): Fix incorrect remark;
some text terminals can generate ASCII control characters.
(Other Char Bits):
* lisp/bindings.el:
* lisp/gnus/gnus-undo.el (gnus-undo-mode-map): Say "graphical display"
and "GUI display" instead of "X terminal"; the latter term is
archaic.  (Bug#51217)
2021-10-15 20:22:11 +02:00
Stefan Kangas
44ce50b0df Improve tooltip of mode-line-position again
* lisp/bindings.el (mode-line-position): Improve tooltip again.
This change was discussed in
https://lists.gnu.org/r/emacs-devel/2021-10/msg00952.html
2021-10-14 00:27:49 +02:00
Stefan Kangas
47cbd103f5 * lisp/bindings.el (mode-line-position): Improve tooltip. 2021-10-09 08:33:19 +02:00
Eli Zaretskii
6e3017d7de Fix a recent change of 'undo-redo' binding
* lisp/bindings.el (global-map): Fix the binding of 'undo-redo'.
(Bug#50911)
2021-09-30 14:32:58 +03:00
dickmao
d94ab4949c Fix bootstrap after recent undo-redo change
* lisp/bindings.el (global-map): Don't use `kbd' here -- it breaks
bootstrap (bug#50911).
2021-09-30 06:59:10 +02:00
Dmitry Gutov
6fecf6ef25 Add bindings for 'undo-redo'
* etc/NEWS: Describe the change.

* lisp/bindings.el (global-map): Add bindings for 'undo-redo'.

* lisp/simple.el (undo-no-redo): Turn into a user option.
2021-09-29 22:45:07 +03:00
Stefan Kangas
aebba085cb ; More minor stylistic fixes found by checkdoc 2021-09-22 20:26:40 +02:00
Stefan Kangas
fc8df2561b Revert previous mode-line-modes change to unbreak bootstrap
* lisp/bindings.el (mode-line-modes): Revert previous change to
unbreak bootstrap.
2021-09-19 01:17:16 +02:00
Stefan Kangas
ec0527d8e9 Use command substitution for exit-recursive-edit
* lisp/bindings.el (mode-line-modes):
* lisp/emacs-lisp/checkdoc.el (checkdoc-recursive-edit): Use command
substitution for 'exit-recursive-edit'.
2021-09-18 23:26:18 +02:00
Stefan Kangas
63f419f133 ; Minor stylistic fixes found by checkdoc 2021-09-16 19:37:07 +02:00
Glenn Morris
222d033254 * lisp/bindings.el (page-navigation-repeat-map): Fix bootstrap. 2021-08-20 15:56:27 -07:00
Davide Masserut
63cbb54d7e Mark page navigation commands as repeatable
* doc/emacs/basic.texi (Repeating): Document page navigation
repeatability.

* lisp/bindings.el (page-navigation-repeat-map): Add new map
(bug#50137).
* lisp/bindings.el (forward-page):
(backward-page): Mark as repeatable.

Copyright-paperwork-exempt: yes
2021-08-20 17:49:35 +02:00
Lars Ingebrigtsen
ebaae4480e Add a new command `revert-buffer-quick'
* doc/emacs/files.texi (Reverting): Document it.
* lisp/bindings.el (ctl-x-x-map): Bind `C-x x g' to
`revert-buffer-quick' instead.

* lisp/files.el (revert-buffer-quick-short-answers): New user option.
(revert-buffer-quick): New command (bug#49869).
2021-08-10 16:41:37 +02:00
Lars Ingebrigtsen
e5ddf91db2 Improve mode-line-position-column-format doc string
* lisp/bindings.el (mode-line-position-column-format): Improve doc
string.
(mode-line-position-line-format): Point to
`mode-line-position-column-line-format'.
2021-07-28 17:57:19 +02:00
Lars Ingebrigtsen
bb68faed02 'global-mode-string' elements should have a space at the end
* lisp/time.el (display-time-string-forms):
* lisp/battery.el (battery-mode-line-format): Add a space to the
end (bug#30056).
* lisp/bindings.el (mode-line-misc-info): Remove space from end.
This will make the default format have one space before the
line-of-dashes (instead of two) on terminals.
2021-07-23 14:40:53 +02:00
Lars Ingebrigtsen
553221fc55 Fix the name of the sorted minor mode map after previous change
* lisp/bindings.el (mode-line-major-mode-keymap): Change the name
of the minor mode menu items.
2021-06-25 15:58:03 +02:00
Stefan Monnier
1c10517f01 * lisp/bindings.el (bindings--sort-menu-keymap): Add "menu" in its name
(bindings--menu-item-string): Use `pcase`.
2021-06-24 17:34:57 -04:00
Jim Porter
3665735d66 Sort the items in 'mode-line-mode-menu' before displaying the menu
* lisp/bindings.el (bindings--menu-item-string, bindings--sort-keymap):
New functions.
(mode-line-major-mode-keymap, mode-line-minor-mode-keymap):
Sort 'mode-line-mode-menu'.
2021-06-24 16:50:58 +02:00
Lars Ingebrigtsen
4b90e4f44f Revert "Sort the items in 'mode-line-mode-menu' before displaying the menu"
This reverts commit d4d6d8f335.

This approach doesn't work on certain types of keymaps, so it should be implemented in a different way.
2021-06-23 16:10:25 +02:00
Jim Porter
d4d6d8f335 Sort the items in 'mode-line-mode-menu' before displaying the menu
* lisp/bindings.el (bindings--menu-item-string, bindings--sort-keymap):
New functions.
(mode-line-major-mode-keymap, mode-line-minor-mode-keymap):
Sort 'mode-line-mode-menu'.
2021-06-23 15:02:52 +02:00
Lars Ingebrigtsen
9068f8f10c Further fixes for bound-and-true-p doc string
* lisp/bindings.el (bound-and-true-p): Improve doc string.
2021-06-21 14:25:40 +02:00
Lars Ingebrigtsen
e910ef344f Improve bound-and-true-p doc string
* lisp/bindings.el (bound-and-true-p): Improve doc string (bug#49116).
2021-06-19 15:21:18 +02:00
Stefan Kangas
0eeb865aae Assume something more recent than X11R6
* lisp/bindings.el:
* lisp/menu-bar.el:
* lisp/printing.el:
* lisp/thumbs.el (thumbs-conversion-program): Assume we have something
more recent than X11R6.
2021-03-20 01:26:21 +01:00
Lars Ingebrigtsen
1e9c9ebee3 Unbind M-o' and add new C-x x f' binding
* doc/lispref/modes.texi (Other Font Lock Variables):
`font-lock-fontify-block' is no longer bound.
* lisp/bindings.el (ctl-x-x-map): Bind `font-lock-update'.

* lisp/font-lock.el (font-lock-update): New command written by
Gregory Heytings <gregory@heytings.org>.

* lisp/loadup.el: Remove transitional experimental code.
2021-03-18 05:10:37 +01:00
Juri Linkov
12409c9064 New transient mode 'repeat-mode' to allow shorter key sequences (bug#46515)
* doc/emacs/basic.texi (Repeating): Document repeat-mode.

* lisp/repeat.el (repeat-exit-key): New defcustom.
(repeat-mode): New global minor mode.
(repeat-post-hook): New function.

* lisp/bindings.el (undo-repeat-map): New variable.
(undo): Put 'repeat-map' property with
'undo-repeat-map'.
(next-error-repeat-map): New variable.
(next-error, previous-error): Put 'repeat-map' property with
'next-error-repeat-map'.

* lisp/window.el (other-window-repeat-map): New variable.
(other-window): Put 'repeat-map' property with
'other-window-repeat-map'.
(resize-window-repeat-map): New variable.
(enlarge-window, enlarge-window-horizontally)
(shrink-window-horizontally, shrink-window): Put 'repeat-map'
property with 'resize-window-repeat-map'.
2021-02-17 20:04:42 +02:00
Sean Whitton
657641fb83 Bind clone-buffer to C-x x n
* lisp/bindings.el (ctl-x-x-map): Bind clone-buffer.
* etc/NEWS: Document the change (bug#46369).
2021-02-08 07:52:16 +01:00
Lars Ingebrigtsen
e0c9399454 Add more commands to the new `C-x x' keymap
* doc/emacs/killing.texi (Accumulating Text):
* doc/emacs/display.texi (Line Truncation):
* doc/emacs/buffers.texi (Misc Buffer): Document it.

* lisp/bindings.el (ctl-x-x-map): Add new bindings for
rename-buffer, rename-uniquely, insert-buffer and
toggle-truncate-lines.
2021-02-07 13:53:44 +01:00