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.
This commit is contained in:
Phillip Lord 2015-12-03 21:27:33 +00:00
parent 7d611e25ff
commit eaa1fd6dbf
3 changed files with 12 additions and 12 deletions

View file

@ -1352,7 +1352,7 @@ Mostly, however, this function is called automatically at an
appropriate time.
@end defun
@defun undo-auto--amalgamate
@defun undo-auto-amalgamate
The editor command loop automatically calls @code{undo-boundary} just
before executing each key sequence, so that each undo normally undoes
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}
will be called in each of them.
@end defun
@defvar undo-auto--boundary-timer
@defvar undo-auto-current-boundary-timer
Some buffers, such as process buffers, can change even when no
commands are executing. In these cases, @code{undo-boundary} is
normally called periodically by the timer in this variable. Setting

View file

@ -2802,7 +2802,7 @@ an amalgamating command. The car of the list is the number of
times an amalgamating command has been called, and the cdr are the
buffers that were changed during the last command.")
(defvar undo-auto--current-boundary-timer nil
(defvar undo-auto-current-boundary-timer nil
"Current timer which will run `undo-auto--boundary-timer' or nil.
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.")
(defvar undo-auto--this-command-amalgamating nil
"Non-nil if `this-command' should be amalgamated.
This variable is set to nil by `undo-auto--boundaries' and is set
by `undo-auto--amalgamate'." )
by `undo-auto-amalgamate'." )
(defun undo-auto--needs-boundary-p ()
"Return non-nil if `buffer-undo-list' needs a boundary at the start."
@ -2820,7 +2820,7 @@ by `undo-auto--amalgamate'." )
"Return the number of amalgamating last commands or nil.
Amalgamating commands are, by default, either
`self-insert-command' and `delete-char', but can be any command
that calls `undo-auto--amalgamate'."
that calls `undo-auto-amalgamate'."
(car-safe undo-auto--last-boundary-cause))
(defun undo-auto--ensure-boundary (cause)
@ -2851,13 +2851,13 @@ REASON describes the reason that the boundary is being added; see
(defun undo-auto--boundary-timer ()
"Timer which will run `undo--auto-boundary-timer'."
(setq undo-auto--current-boundary-timer nil)
(setq undo-auto-current-boundary-timer nil)
(undo-auto--boundaries 'timer))
(defun undo-auto--boundary-ensure-timer ()
"Ensure that the `undo-auto-boundary-timer' is set."
(unless undo-auto--current-boundary-timer
(setq undo-auto--current-boundary-timer
(unless undo-auto-current-boundary-timer
(setq undo-auto-current-boundary-timer
(run-at-time 10 nil #'undo-auto--boundary-timer))))
(defvar undo-auto--undoably-changed-buffers nil
@ -2878,7 +2878,7 @@ See also `undo-auto--buffer-undoably-changed'.")
'amalgamate
'command))))
(defun undo-auto--amalgamate ()
(defun undo-auto-amalgamate ()
"Amalgamate undo if necessary.
This function can be called before an amalgamating command. It
removes the previous `undo-boundary' if a series of such calls

View file

@ -233,7 +233,7 @@ because it respects values of `delete-active-region' and `overwrite-mode'. */)
CHECK_NUMBER (n);
if (eabs (XINT (n)) < 2)
call0 (Qundo_auto__amalgamate);
call0 (Qundo_auto_amalgamate);
pos = PT + XINT (n);
if (NILP (killflag))
@ -279,7 +279,7 @@ At the end, it runs `post-self-insert-hook'. */)
error ("Negative repetition argument %"pI"d", XINT (n));
if (XFASTINT (n) < 2)
call0 (Qundo_auto__amalgamate);
call0 (Qundo_auto_amalgamate);
/* Barf if the key that invoked this was not a character. */
if (!CHARACTERP (last_command_event))
@ -494,7 +494,7 @@ internal_self_insert (int c, EMACS_INT n)
void
syms_of_cmds (void)
{
DEFSYM (Qundo_auto__amalgamate, "undo-auto--amalgamate");
DEFSYM (Qundo_auto_amalgamate, "undo-auto-amalgamate");
DEFSYM (Qundo_auto__this_command_amalgamating,
"undo-auto--this-command-amalgamating");