diff options
| author | Phillip Lord | 2015-12-03 21:27:33 +0000 |
|---|---|---|
| committer | Phillip Lord | 2015-12-03 21:27:33 +0000 |
| commit | eaa1fd6dbff8346eb38485de5ebf0fbfacf374d9 (patch) | |
| tree | 3582bd8b840f066f6b1435ea9cf73cbe48fc3d0d | |
| parent | 7d611e25ffdfb31e321d4612b282542690f26534 (diff) | |
| download | emacs-eaa1fd6dbff8346eb38485de5ebf0fbfacf374d9.tar.gz emacs-eaa1fd6dbff8346eb38485de5ebf0fbfacf374d9.zip | |
Externalize some symbols in undo-auto
* doc/lispref/text.texi: Update symbols.
* lisp/simple.el (undo-auto--amalgamate,
undo-auto--current-boundary-timer): Make symbols public.
* src/cmds.c (Fself_insert_command,Fdelete_char): Call
updated symbol.
| -rw-r--r-- | doc/lispref/text.texi | 4 | ||||
| -rw-r--r-- | lisp/simple.el | 14 | ||||
| -rw-r--r-- | src/cmds.c | 6 |
3 files changed, 12 insertions, 12 deletions
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index 45373675998..1bb5303620d 100644 --- a/doc/lispref/text.texi +++ b/doc/lispref/text.texi | |||
| @@ -1352,7 +1352,7 @@ Mostly, however, this function is called automatically at an | |||
| 1352 | appropriate time. | 1352 | appropriate time. |
| 1353 | @end defun | 1353 | @end defun |
| 1354 | 1354 | ||
| 1355 | @defun undo-auto--amalgamate | 1355 | @defun undo-auto-amalgamate |
| 1356 | The editor command loop automatically calls @code{undo-boundary} just | 1356 | The editor command loop automatically calls @code{undo-boundary} just |
| 1357 | before executing each key sequence, so that each undo normally undoes | 1357 | before executing each key sequence, so that each undo normally undoes |
| 1358 | the effects of one command. A few exceptional commands are | 1358 | the effects of one command. A few exceptional commands are |
| @@ -1368,7 +1368,7 @@ buffer other than the @code{current-buffer}, then @code{undo-boundary} | |||
| 1368 | will be called in each of them. | 1368 | will be called in each of them. |
| 1369 | @end defun | 1369 | @end defun |
| 1370 | 1370 | ||
| 1371 | @defvar undo-auto--boundary-timer | 1371 | @defvar undo-auto-current-boundary-timer |
| 1372 | Some buffers, such as process buffers, can change even when no | 1372 | Some buffers, such as process buffers, can change even when no |
| 1373 | commands are executing. In these cases, @code{undo-boundary} is | 1373 | commands are executing. In these cases, @code{undo-boundary} is |
| 1374 | normally called periodically by the timer in this variable. Setting | 1374 | normally called periodically by the timer in this variable. Setting |
diff --git a/lisp/simple.el b/lisp/simple.el index 99e6bd31363..2ccb016aca5 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -2802,7 +2802,7 @@ an amalgamating command. The car of the list is the number of | |||
| 2802 | times an amalgamating command has been called, and the cdr are the | 2802 | times an amalgamating command has been called, and the cdr are the |
| 2803 | buffers that were changed during the last command.") | 2803 | buffers that were changed during the last command.") |
| 2804 | 2804 | ||
| 2805 | (defvar undo-auto--current-boundary-timer nil | 2805 | (defvar undo-auto-current-boundary-timer nil |
| 2806 | "Current timer which will run `undo-auto--boundary-timer' or nil. | 2806 | "Current timer which will run `undo-auto--boundary-timer' or nil. |
| 2807 | 2807 | ||
| 2808 | If set to non-nil, this will effectively disable the timer.") | 2808 | If set to non-nil, this will effectively disable the timer.") |
| @@ -2810,7 +2810,7 @@ If set to non-nil, this will effectively disable the timer.") | |||
| 2810 | (defvar undo-auto--this-command-amalgamating nil | 2810 | (defvar undo-auto--this-command-amalgamating nil |
| 2811 | "Non-nil if `this-command' should be amalgamated. | 2811 | "Non-nil if `this-command' should be amalgamated. |
| 2812 | This variable is set to nil by `undo-auto--boundaries' and is set | 2812 | This variable is set to nil by `undo-auto--boundaries' and is set |
| 2813 | by `undo-auto--amalgamate'." ) | 2813 | by `undo-auto-amalgamate'." ) |
| 2814 | 2814 | ||
| 2815 | (defun undo-auto--needs-boundary-p () | 2815 | (defun undo-auto--needs-boundary-p () |
| 2816 | "Return non-nil if `buffer-undo-list' needs a boundary at the start." | 2816 | "Return non-nil if `buffer-undo-list' needs a boundary at the start." |
| @@ -2820,7 +2820,7 @@ by `undo-auto--amalgamate'." ) | |||
| 2820 | "Return the number of amalgamating last commands or nil. | 2820 | "Return the number of amalgamating last commands or nil. |
| 2821 | Amalgamating commands are, by default, either | 2821 | Amalgamating commands are, by default, either |
| 2822 | `self-insert-command' and `delete-char', but can be any command | 2822 | `self-insert-command' and `delete-char', but can be any command |
| 2823 | that calls `undo-auto--amalgamate'." | 2823 | that calls `undo-auto-amalgamate'." |
| 2824 | (car-safe undo-auto--last-boundary-cause)) | 2824 | (car-safe undo-auto--last-boundary-cause)) |
| 2825 | 2825 | ||
| 2826 | (defun undo-auto--ensure-boundary (cause) | 2826 | (defun undo-auto--ensure-boundary (cause) |
| @@ -2851,13 +2851,13 @@ REASON describes the reason that the boundary is being added; see | |||
| 2851 | 2851 | ||
| 2852 | (defun undo-auto--boundary-timer () | 2852 | (defun undo-auto--boundary-timer () |
| 2853 | "Timer which will run `undo--auto-boundary-timer'." | 2853 | "Timer which will run `undo--auto-boundary-timer'." |
| 2854 | (setq undo-auto--current-boundary-timer nil) | 2854 | (setq undo-auto-current-boundary-timer nil) |
| 2855 | (undo-auto--boundaries 'timer)) | 2855 | (undo-auto--boundaries 'timer)) |
| 2856 | 2856 | ||
| 2857 | (defun undo-auto--boundary-ensure-timer () | 2857 | (defun undo-auto--boundary-ensure-timer () |
| 2858 | "Ensure that the `undo-auto-boundary-timer' is set." | 2858 | "Ensure that the `undo-auto-boundary-timer' is set." |
| 2859 | (unless undo-auto--current-boundary-timer | 2859 | (unless undo-auto-current-boundary-timer |
| 2860 | (setq undo-auto--current-boundary-timer | 2860 | (setq undo-auto-current-boundary-timer |
| 2861 | (run-at-time 10 nil #'undo-auto--boundary-timer)))) | 2861 | (run-at-time 10 nil #'undo-auto--boundary-timer)))) |
| 2862 | 2862 | ||
| 2863 | (defvar undo-auto--undoably-changed-buffers nil | 2863 | (defvar undo-auto--undoably-changed-buffers nil |
| @@ -2878,7 +2878,7 @@ See also `undo-auto--buffer-undoably-changed'.") | |||
| 2878 | 'amalgamate | 2878 | 'amalgamate |
| 2879 | 'command)))) | 2879 | 'command)))) |
| 2880 | 2880 | ||
| 2881 | (defun undo-auto--amalgamate () | 2881 | (defun undo-auto-amalgamate () |
| 2882 | "Amalgamate undo if necessary. | 2882 | "Amalgamate undo if necessary. |
| 2883 | This function can be called before an amalgamating command. It | 2883 | This function can be called before an amalgamating command. It |
| 2884 | removes the previous `undo-boundary' if a series of such calls | 2884 | removes the previous `undo-boundary' if a series of such calls |
diff --git a/src/cmds.c b/src/cmds.c index 167ebb74302..650b4628c32 100644 --- a/src/cmds.c +++ b/src/cmds.c | |||
| @@ -233,7 +233,7 @@ because it respects values of `delete-active-region' and `overwrite-mode'. */) | |||
| 233 | CHECK_NUMBER (n); | 233 | CHECK_NUMBER (n); |
| 234 | 234 | ||
| 235 | if (eabs (XINT (n)) < 2) | 235 | if (eabs (XINT (n)) < 2) |
| 236 | call0 (Qundo_auto__amalgamate); | 236 | call0 (Qundo_auto_amalgamate); |
| 237 | 237 | ||
| 238 | pos = PT + XINT (n); | 238 | pos = PT + XINT (n); |
| 239 | if (NILP (killflag)) | 239 | if (NILP (killflag)) |
| @@ -279,7 +279,7 @@ At the end, it runs `post-self-insert-hook'. */) | |||
| 279 | error ("Negative repetition argument %"pI"d", XINT (n)); | 279 | error ("Negative repetition argument %"pI"d", XINT (n)); |
| 280 | 280 | ||
| 281 | if (XFASTINT (n) < 2) | 281 | if (XFASTINT (n) < 2) |
| 282 | call0 (Qundo_auto__amalgamate); | 282 | call0 (Qundo_auto_amalgamate); |
| 283 | 283 | ||
| 284 | /* Barf if the key that invoked this was not a character. */ | 284 | /* Barf if the key that invoked this was not a character. */ |
| 285 | if (!CHARACTERP (last_command_event)) | 285 | if (!CHARACTERP (last_command_event)) |
| @@ -494,7 +494,7 @@ internal_self_insert (int c, EMACS_INT n) | |||
| 494 | void | 494 | void |
| 495 | syms_of_cmds (void) | 495 | syms_of_cmds (void) |
| 496 | { | 496 | { |
| 497 | DEFSYM (Qundo_auto__amalgamate, "undo-auto--amalgamate"); | 497 | DEFSYM (Qundo_auto_amalgamate, "undo-auto-amalgamate"); |
| 498 | DEFSYM (Qundo_auto__this_command_amalgamating, | 498 | DEFSYM (Qundo_auto__this_command_amalgamating, |
| 499 | "undo-auto--this-command-amalgamating"); | 499 | "undo-auto--this-command-amalgamating"); |
| 500 | 500 | ||