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

104 Commits

Author SHA1 Message Date
Lars Ingebrigtsen
26f2b1faaa Rewrite the kmacro register function to avoid using obsolete functions
* lisp/kmacro.el (kmacro-register): New struct to replace the
general registerv struct.
(register-val-jump-to, register-val-describe)
(register-val-insert): New methods to implement the register
interface.
(kmacro-to-register): Use the kmacro-register struct.
2019-06-12 18:21:35 +02:00
Noam Postavsky
29531785a1 Improve printing for named keyboard macros (Bug#35486)
* lisp/macros.el (macros--insert-vector-macro): New function,
extracted from insert-kbd-macro.
(insert-kbd-macro): Use it and kmacro-extract-lambda to produce nicer
expressions for macros produced by kmacro-lambda-form.
2019-05-12 08:05:01 -04:00
Paul Eggert
3e99077ab3 Merge from origin/emacs-26
6c6b540711 Correct the docs of inserting kmacro counter
32555daf4c * doc/misc/calc.texi (Algebraic Tutorial): Fix a typo.  (B...
2019-02-01 08:40:53 -08:00
Eli Zaretskii
6c6b540711 Correct the docs of inserting kmacro counter
* doc/emacs/kmacro.texi (Keyboard Macro Counter): Correct the
description of the affect "C-u" has on inserting the macro
counter.  Define "previous counter value".

* lisp/kmacro.el (kmacro-insert-counter)
(kmacro-start-macro-or-insert-counter): Fix the doc strings
regarding the effect of "C-u".  (Bug#34263)
2019-02-01 17:34:23 +02:00
Paul Eggert
ba809612c0 Merge from origin/emacs-26
2fcf2df Fix copyright years by hand
26bed8b Update copyright year to 2019
2814292 Fix value of default frame height.  (Bug#33921)
2018-12-31 17:57:29 -08:00
Paul Eggert
26bed8ba10 Update copyright year to 2019
Run 'TZ=UTC0 admin/update-copyright $(git ls-files)'.
2019-01-01 01:01:13 +00:00
Glenn Morris
3ee1841f28 Merge from origin/emacs-26
b98cf9c ; Fix a typo in the Emacs manual
700fcd7 * doc/emacs/help.texi: Fix paren typo.
c9c0e40 More minor changes in shell-related nodes of Emacs manual
e6bf19c Fix inaccuracies in "Shell Ring" node of Emacs manual
087681b8 Improve documentation of kmacro commands and variables.
be2e8cb * doc/man/emacs.1.in: Document --fg-daemon and --bg-daemon.
1d9e66a Don't check non-X frames for z order (Bug#31373)
7dc028e Check NSWindow is actually a frame

Conflicts:
	src/nsfns.m
2018-05-15 09:09:48 -07:00
Eli Zaretskii
087681b859 Improve documentation of kmacro commands and variables.
* lisp/kmacro.el (kmacro-start-macro-or-insert-counter)
(kmacro-counter, kmacro-set-format, kmacro-set-counter)
(kmacro-add-counter, kmacro-counter-format)
(kmacro-insert-counter): Clarify and improve the doc strings.
(Bug#31243)
2018-05-11 12:11:14 +03:00
Paul Eggert
20b858ef13 Prefer \... to control chars in .el literals 2018-03-29 17:43:08 -07:00
Paul Eggert
bb267f17f9 Merge from origin/emacs-26
63b04c11d5 Fix copyright years by hand
5c7dd8a783 Update copyright year to 2018
220a9ecba1 Merge from Gnulib
312c565566 Don't add empty keyboard macro to macro ring (Bug#24992)
39ca289a7a Allow customization of decoding of "man" command
f8240815ea * etc/NEWS: Add security consideration note on passphrase ...
0c78822c70 Fix subtle problem with scroll-down when scroll-margin is ...
acd289c5a4 Fix problems with indexing in User manual
b240c7846b * lisp/help.el (describe-key): Only (copy-sequence elt) wh...
e879a5444a * src/buffer.c (Frestore_buffer_modified_p): Fix bug#29846
81b1028b63 Improve documentation of 'inhibit-modification-hooks' and ...
7175496d7a Fix doc string of 'enable-recursive-minibuffers'
5b38406491 Fix documentation of delsel and of killing text

# Conflicts:
#	etc/NEWS
#	etc/refcards/ru-refcard.tex
2018-01-01 01:13:04 -08:00
Paul Eggert
5c7dd8a783 Update copyright year to 2018
Run admin/update-copyright.
2018-01-01 00:57:59 -08:00
Gemini Lasswell
312c565566 Don't add empty keyboard macro to macro ring (Bug#24992)
* lisp/kmacro.el (kmacro-end-call-mouse): Don't save a newly defined
macro if it is empty.

* test/lisp/kmacro-tests.el (kmacro-tests-end-and-call-macro-mouse):
Remove expected failure tag.
2017-12-31 11:10:26 -08:00
Stefan Monnier
4f779ff8e6 * lisp/macros.el (insert-kbd-macro): Recognize kmacros reliably
* lisp/macros.el (name-last-kbd-macro): Make it an alias of
kmacro-name-last-macro.
(insert-kbd-macro): Use kmacro-keyboard-macro-p so it also works for
kmacros that fail to have a `kmacro' property.
(see https://emacs.stackexchange.com/questions/37065, for an example).

* lisp/kmacro.el: Remove redundant :group args.
(kmacro-insert-counter): Simplify.
(kmacro-extract-lambda): Use car/cdr-safe.
(kmacro-p, kmacro-keyboard-macro-p): New functions.
(kmacro-name-last-macro): Use them.
2017-11-24 11:32:14 -05:00
Stefan Monnier
57ca409111 Fix autoload of flymake from elisp-mode during bootstrap (bug#28994)
* lisp/loadup.el: add `progmodes` to load-path so we can find flymake.el.
* lisp/kmacro.el: Require `replace` since we use query-replace-map.
* lisp/replace.el: Require `text-mode` since we use text-mode-map.
2017-10-25 12:31:40 -04:00
Eli Zaretskii
db68cefe72 Fix errors in kmacro.el post-command-hook
* lisp/kmacro.el (kmacro-step-edit-active): Initialize to nil to
avoid 'void-variable' errors.  (Bug#28818)
* test/lisp/kmacro-tests.el
(kmacro-tests-step-edit-cleans-up-hook): Now succeeds.  (Bug#18708)
2017-10-16 19:36:06 +03:00
Paul Eggert
bc511a64f6 Prefer HTTPS to FTP and HTTP in documentation
Most of this change is to boilerplate commentary such as license URLs.
This change was prompted by ftp://ftp.gnu.org's going-away party,
planned for November.  Change these FTP URLs to https://ftp.gnu.org
instead.  Make similar changes for URLs to other organizations moving
away from FTP.  Also, change HTTP to HTTPS for URLs to gnu.org and
fsf.org when this works, as this will further help defend against
man-in-the-middle attacks (for this part I omitted the MS-DOS and
MS-Windows sources and the test tarballs to keep the workload down).
HTTPS is not fully working to lists.gnu.org so I left those URLs alone
for now.
2017-09-13 15:54:37 -07:00
Mark Oteiza
d7825cb09e * lisp/kmacro.el: Use lexical binding. 2017-07-29 11:01:57 -04:00
Eli Zaretskii
45c2544c34 Doc fixes for kmacro.el functions
* lisp/kmacro.el (kmacro-start-macro, kmacro-call-macro)
(kmacro-end-and-call-macro): Don't use "permanent name", as that
could be misinterpreted.  (Bug#27492)
2017-07-22 11:24:05 +03:00
Paul Eggert
bcf244ef9b Merge from origin/emacs-25
2e2a806 Fix copyright years by hand
5badc81 Update copyright year to 2017
2017-01-01 01:10:47 -08:00
Paul Eggert
5badc81c1c Update copyright year to 2017
Run admin/update-copyright.
2016-12-31 19:42:26 -08:00
Lars Ingebrigtsen
0669037126 Fix call of `kmacro-display'
* lisp/kmacro.el (kmacro-view-ring-2nd): Fix call of
`kmacro-display' (bug#15020).
2016-04-29 15:23:38 +02:00
Paul Eggert
0e963201d0 Update copyright year to 2016
Run admin/update-copyright.
2016-01-01 01:34:24 -08:00
Stefan Monnier
5dc644a6b0 Generalize the prefix-command machinery of C-u
* lisp/simple.el (prefix-command-echo-keystrokes-functions)
(prefix-command-preserve-state-hook): New hooks.
(internal-echo-keystrokes-prefix): New function.
(prefix-command--needs-update, prefix-command--last-echo): New vars.
(prefix-command-update, prefix-command-preserve): New functions.
(reset-this-command-lengths): New compatibility definition.
(universal-argument--mode): Call prefix-command-update.
(universal-argument, universal-argument-more, negative-argument)
(digit-argument): Call prefix-command-preserve-state.

* src/keyboard.c: Call internal-echo-keystrokes-prefix to build
the "prefix argument" to echo.
(this_command_key_count_reset, before_command_key_count)
(before_command_echo_length): Delete variables.
(echo_add_key): Always add a space.
(echo_char): Remove.
(echo_dash): Don't give up when this_command_key_count is 0, since that
is now the case after a prefix command.
(echo_update): New function, extracted from echo_now.
(echo_now): Use it.
(add_command_key, read_char, record_menu_key): Remove old disabled code.
(command_loop_1): Don't refrain from pushing an undo boundary when
prefix-arg is set.  Remove other prefix-arg special case, now handled
directly in the prefix commands instead.  But call echo_now if there's
a prefix state to echo.
(read_char, record_menu_key): Use echo_update instead of echo_char.
(read_key_sequence): Use echo_now rather than echo_dash/echo_char.
(Freset_this_command_lengths): Delete function.
(syms_of_keyboard): Define Qinternal_echo_keystrokes_prefix.
(syms_of_keyboard): Don't defsubr Sreset_this_command_lengths.

* lisp/simple.el: Use those new hooks for C-u.
(universal-argument--description): New function.
(prefix-command-echo-keystrokes-functions): Use it.
(universal-argument--preserve): New function.
(prefix-command-preserve-state-hook): Use it.
(command-execute): Call prefix-command-update if needed.

* lisp/kmacro.el (kmacro-step-edit-prefix-commands)
(kmacro-step-edit-prefix-index): Delete variables.
(kmacro-step-edit-query, kmacro-step-edit-insert): Remove ad-hoc
support for prefix arg commands.
(kmacro-step-edit-macro): Don't bind kmacro-step-edit-prefix-index.

* lisp/emulation/cua-base.el (cua--prefix-override-replay)
(cua--shift-control-prefix): Use prefix-command-preserve-state.
Remove now unused arg `arg'.
(cua--prefix-override-handler, cua--prefix-repeat-handler)
(cua--shift-control-c-prefix, cua--shift-control-x-prefix):
Update accordingly.
(cua--prefix-override-timeout): Don't call reset-this-command-lengths
any more.
(cua--keep-active, cua-exchange-point-and-mark): Don't set mark-active
if the mark is not set.
2015-09-01 21:14:18 -04:00
David Kastrup
5022e27dac ; Do not overwrite preexisting contents of unread-command-events 2015-08-04 14:34:15 +02:00
Paul Eggert
7e09ef09a4 Update copyright year to 2015
Run admin/update-copyright.
2015-01-01 14:26:41 -08:00
Paul Eggert
2baa4c05af Spelling fixes. 2014-02-12 11:40:35 -08:00
Lars Ingebrigtsen
87c79dcb46 * kmacro.el (kmacro-bind-to-key): Say that the parameter is unused.
Fixes: debbugs:14197
2014-02-09 22:51:32 -08:00
Lars Ingebrigtsen
dce8463bb9 * kmacro.el (kmacro-exec-ring-item): Doc fix.
Fixes: debbugs:14198
2014-02-08 04:34:52 -08:00
Glenn Morris
6a6b8e405e Be more consistent in using register-read-with-preview to read registers
* frameset.el (frameset-to-register):
* kmacro.el (kmacro-to-register):
* register.el (increment-register):
* calc/calc-yank.el (calc-copy-to-register, calc-insert-register)
(calc-append-to-register, calc-prepend-to-register):
* play/gametree.el (gametree-layout-to-register)
(gametree-apply-register-layout):
* textmodes/picture.el (picture-clear-rectangle-to-register)
(picture-yank-rectangle-from-register):
* vc/emerge.el (emerge-combine-versions-register):
Use register-read-with-preview to read registers.

* cedet/semantic/senator.el (senator-copy-tag-to-register):
Use register-read-with-preview, if available.

* calculator.el, emulation/viper-cmd.el: Comments.
2014-02-02 16:40:49 -08:00
Paul Eggert
ba3189039a Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
Chong Yidong
8cd22a0818 Rename set-temporary-overlay-map -> set-transient-map
* lisp/subr.el (set-transient-map): Rename from
set-temporary-overlay-map.  Doc fix.

* lisp/face-remap.el (text-scale-adjust):
* lisp/indent.el (indent-rigidly):
* lisp/kmacro.el (kmacro-call-macro):
* lisp/minibuffer.el (minibuffer-force-complete):
* lisp/repeat.el (repeat):
* lisp/simple.el (universal-argument--mode):
* lisp/calendar/todo-mode.el (todo-insert-item--next-param):
* lisp/progmodes/f90.el (f90-abbrev-start): Callers changed.

* lisp/org/org.el (orgstruct-make-binding): Call set-transient-map
instead of old name set-temporary-overlay-map.

* doc/lispref/keymaps.texi (Controlling Active Maps): Renamed
set-temporary-overlay-map to set-transient map.  Doc fixes.
(Searching Keymaps): The transient keymap takes precedence.
2013-12-23 11:59:10 +08:00
Juanma Barranquero
57b16162ce Remove references to universal-argument-num-events.
* lisp/autoarg.el (autoarg-kp-digit-argument):
* lisp/electric.el (Electric-command-loop):
* lisp/kmacro.el (kmacro-step-edit-insert):
  Do not set universal-argument-num-events.
2013-09-23 04:58:02 +02:00
Leo Liu
fc164b0c33 * kmacro.el (kmacro-call-macro): Fix bug#14135. 2013-04-05 16:38:06 +08:00
Leo Liu
0b1619da55 * etc/NEWS: Mention `kmacro-to-register' and new eldoc feature.
* lisp/kmacro.el (kmacro-call-macro): Add optional arg MACRO.
(kmacro-execute-from-register): Pass the keyboard macro to
kmacro-call-macro or repeating won't work correctly.
2013-03-30 21:49:00 +08:00
Leo Liu
35710234ce * kmacro.el (kmacro-to-register): New command.
(kmacro-execute-from-register): New function.
(kmacro-keymap): Bind to 'x'.

Fixes: debbugs:14071
2013-03-29 22:53:27 +08:00
Paul Eggert
ab422c4d68 Update copyright notices for 2013. 2013-01-01 09:11:05 +00:00
Glenn Morris
0d27a45e58 * lisp/kmacro.el (kmacro-call-macro): Restore repeat message. (Bug#11817) 2012-07-06 17:34:49 -04:00
Stefan Monnier
df96ab1e0a Use set-temporary-overlay-map.
* lisp/repeat.el: Use lexical-binding.
(repeat-last-self-insert, repeat-num-input-keys-at-self-insert)
(repeat-undo-count): Remove.
(repeat):
* lisp/progmodes/octave-mod.el (octave-abbrev-start):
* lisp/progmodes/f90.el (f90-abbrev-start):
* lisp/face-remap.el (text-scale-adjust):
* lisp/kmacro.el (kmacro-call-macro): Use set-temporary-overlay-map.
2012-05-04 22:50:20 -04:00
Chong Yidong
fb7ada5f94 Remove * characters from the front of variable docstrings. 2012-04-09 21:05:48 +08:00
Glenn Morris
acaf905b11 Add 2012 to FSF copyright years for Emacs files 2012-01-05 01:46:05 -08:00
Paul Eggert
c80e3b4aed Spelling fixes. 2011-12-04 00:02:42 -08:00
Paul Eggert
4c36be58ca Spelling fixes. 2011-11-17 01:09:20 -08:00
Juanma Barranquero
06b605171f lisp/*.el: Lexical-binding cleanup. 2011-04-19 15:44:55 +02:00
Stefan Monnier
b016851cb1 Move keymap initialization into declaration.
* lisp/textmodes/enriched.el (enriched-mode-map):
* lisp/textmodes/bib-mode.el (bib-mode-map):
* lisp/term/lk201.el (lk201-function-map):
* lisp/tar-mode.el (tar-mode-map):
* lisp/replace.el (occur-mode-map):
* lisp/progmodes/idlwave.el (idlwave-rinfo-mouse-map, idlwave-rinfo-map):
* lisp/progmodes/idlw-help.el (idlwave-help-mode-map):
* lisp/progmodes/gdb-mi.el (gdb-memory-format-menu, gdb-memory-unit-menu):
* lisp/play/solitaire.el (solitaire-mode-map):
* lisp/play/snake.el (snake-mode-map, snake-null-map):
* lisp/play/pong.el (pong-mode-map):
* lisp/play/handwrite.el (menu-bar-handwrite-map):
* lisp/play/gametree.el (gametree-mode-map):
* lisp/net/rcirc.el (rcirc-mode-map, rcirc-browse-url-map
(rcirc-multiline-minor-mode-map, rcirc-track-minor-mode-map):
* lisp/net/newst-plainview.el (newsticker-menu, newsticker-mode-map)
(newsticker--url-keymap):
* lisp/net/net-utils.el (nslookup-mode-map, ftp-mode-map):
* lisp/menu-bar.el (menu-bar-file-menu, menu-bar-i-search-menu)
(menu-bar-search-menu, menu-bar-replace-menu, menu-bar-goto-menu)
(menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-line-wrapping-menu, menu-bar-options-menu)
(menu-bar-games-menu, menu-bar-encryption-decryption-menu)
(menu-bar-tools-menu, menu-bar-describe-menu)
(menu-bar-search-documentation-menu, menu-bar-manuals-menu)
(menu-bar-help-menu):
* lisp/mail/rmailsum.el (rmail-summary-mode-map):
* lisp/kmacro.el (kmacro-step-edit-map):
* lisp/ibuffer.el (ibuffer-mode-groups-popup, ibuffer-mode-map)
(ibuffer-mode-operate-map):
* lisp/hi-lock.el (hi-lock-menu, hi-lock-map):
* lisp/emulation/vip.el (vip-mode-map):
* lisp/emacs-lisp/re-builder.el (reb-lisp-mode-map):
* lisp/bookmark.el (bookmark-bmenu-mode-map):
* lisp/help-mode.el (help-mode-map):
* lisp/erc/erc-list.el (erc-list-menu-mode-map):
* lisp/org/org-remember.el (org-remember-mode-map):
* lisp/org/org-src.el (org-src-mode-map): Move initialization into declaration.
2011-02-10 11:56:00 -05:00
Glenn Morris
95df8112a0 Refill some long/short copyright headers. 2011-01-26 00:36:39 -08:00
Glenn Morris
73b0cd5003 Convert consecutive FSF copyright years to ranges. 2011-01-24 20:08:28 -08:00
Glenn Morris
0d9f702fd0 Nuke arch-tags. 2011-01-15 15:16:57 -08:00
Stefan Monnier
77ab81d054 Merge from emacs-23 2011-01-14 12:18:41 -05:00
Glenn Morris
5df4f04cd3 Add 2011 to FSF/AIST copyright years. 2011-01-02 15:50:46 -08:00
Chong Yidong
8f8043160b Don't issue kmacro hint if echo area is in use (Bug#3412).
* lisp/kmacro.el (kmacro-call-macro): Don't issue hint message if the
echo area is in use (Bug#3412).
2010-06-24 15:16:33 -04:00