summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorK. Handa <handa@gnu.org>2015-09-02 18:28:54 +0900
committerK. Handa <handa@gnu.org>2015-09-02 18:28:54 +0900
commite7b62736aade24620c8ba6fa6bd467d017f16ee0 (patch)
treed00a2203437a168b2414c6b73afc00a88d90b4b1 /src
parentae08d073d7e2738580341534adc3c5924dc76860 (diff)
parent30866274e21c5f0a1c5f60cfe290743e7d482349 (diff)
downloademacs-e7b62736aade24620c8ba6fa6bd467d017f16ee0.tar.gz
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Diffstat (limited to 'src')
-rw-r--r--src/buffer.c54
-rw-r--r--src/category.c2
-rw-r--r--src/data.c2
-rw-r--r--src/dired.c2
-rw-r--r--src/editfns.c2
-rw-r--r--src/eval.c6
-rw-r--r--src/fileio.c2
-rw-r--r--src/fns.c4
-rw-r--r--src/frame.c6
-rw-r--r--src/image.c2
-rw-r--r--src/keyboard.c280
-rw-r--r--src/print.c2
-rw-r--r--src/process.c4
-rw-r--r--src/w32fns.c4
-rw-r--r--src/xfaces.c4
15 files changed, 116 insertions, 260 deletions
diff --git a/src/buffer.c b/src/buffer.c
index fc2ee82e447..33f7996a8c1 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -5402,140 +5402,140 @@ syms_of_buffer (void)
DEFVAR_BUFFER_DEFAULTS ("default-mode-line-format",
mode_line_format,
doc: /* Default value of `mode-line-format' for buffers that don't override it.
-This is the same as (default-value 'mode-line-format). */);
+This is the same as (default-value \\='mode-line-format). */);
DEFVAR_BUFFER_DEFAULTS ("default-header-line-format",
header_line_format,
doc: /* Default value of `header-line-format' for buffers that don't override it.
-This is the same as (default-value 'header-line-format). */);
+This is the same as (default-value \\='header-line-format). */);
DEFVAR_BUFFER_DEFAULTS ("default-cursor-type", cursor_type,
doc: /* Default value of `cursor-type' for buffers that don't override it.
-This is the same as (default-value 'cursor-type). */);
+This is the same as (default-value \\='cursor-type). */);
DEFVAR_BUFFER_DEFAULTS ("default-line-spacing",
extra_line_spacing,
doc: /* Default value of `line-spacing' for buffers that don't override it.
-This is the same as (default-value 'line-spacing). */);
+This is the same as (default-value \\='line-spacing). */);
DEFVAR_BUFFER_DEFAULTS ("default-cursor-in-non-selected-windows",
cursor_in_non_selected_windows,
doc: /* Default value of `cursor-in-non-selected-windows'.
-This is the same as (default-value 'cursor-in-non-selected-windows). */);
+This is the same as (default-value \\='cursor-in-non-selected-windows). */);
DEFVAR_BUFFER_DEFAULTS ("default-abbrev-mode",
abbrev_mode,
doc: /* Default value of `abbrev-mode' for buffers that do not override it.
-This is the same as (default-value 'abbrev-mode). */);
+This is the same as (default-value \\='abbrev-mode). */);
DEFVAR_BUFFER_DEFAULTS ("default-ctl-arrow",
ctl_arrow,
doc: /* Default value of `ctl-arrow' for buffers that do not override it.
-This is the same as (default-value 'ctl-arrow). */);
+This is the same as (default-value \\='ctl-arrow). */);
DEFVAR_BUFFER_DEFAULTS ("default-enable-multibyte-characters",
enable_multibyte_characters,
doc: /* Default value of `enable-multibyte-characters' for buffers not overriding it.
-This is the same as (default-value 'enable-multibyte-characters). */);
+This is the same as (default-value \\='enable-multibyte-characters). */);
DEFVAR_BUFFER_DEFAULTS ("default-buffer-file-coding-system",
buffer_file_coding_system,
doc: /* Default value of `buffer-file-coding-system' for buffers not overriding it.
-This is the same as (default-value 'buffer-file-coding-system). */);
+This is the same as (default-value \\='buffer-file-coding-system). */);
DEFVAR_BUFFER_DEFAULTS ("default-truncate-lines",
truncate_lines,
doc: /* Default value of `truncate-lines' for buffers that do not override it.
-This is the same as (default-value 'truncate-lines). */);
+This is the same as (default-value \\='truncate-lines). */);
DEFVAR_BUFFER_DEFAULTS ("default-fill-column",
fill_column,
doc: /* Default value of `fill-column' for buffers that do not override it.
-This is the same as (default-value 'fill-column). */);
+This is the same as (default-value \\='fill-column). */);
DEFVAR_BUFFER_DEFAULTS ("default-left-margin",
left_margin,
doc: /* Default value of `left-margin' for buffers that do not override it.
-This is the same as (default-value 'left-margin). */);
+This is the same as (default-value \\='left-margin). */);
DEFVAR_BUFFER_DEFAULTS ("default-tab-width",
tab_width,
doc: /* Default value of `tab-width' for buffers that do not override it.
NOTE: This controls the display width of a TAB character, and not
the size of an indentation step.
-This is the same as (default-value 'tab-width). */);
+This is the same as (default-value \\='tab-width). */);
DEFVAR_BUFFER_DEFAULTS ("default-case-fold-search",
case_fold_search,
doc: /* Default value of `case-fold-search' for buffers that don't override it.
-This is the same as (default-value 'case-fold-search). */);
+This is the same as (default-value \\='case-fold-search). */);
DEFVAR_BUFFER_DEFAULTS ("default-left-margin-width",
left_margin_cols,
doc: /* Default value of `left-margin-width' for buffers that don't override it.
-This is the same as (default-value 'left-margin-width). */);
+This is the same as (default-value \\='left-margin-width). */);
DEFVAR_BUFFER_DEFAULTS ("default-right-margin-width",
right_margin_cols,
doc: /* Default value of `right-margin-width' for buffers that don't override it.
-This is the same as (default-value 'right-margin-width). */);
+This is the same as (default-value \\='right-margin-width). */);
DEFVAR_BUFFER_DEFAULTS ("default-left-fringe-width",
left_fringe_width,
doc: /* Default value of `left-fringe-width' for buffers that don't override it.
-This is the same as (default-value 'left-fringe-width). */);
+This is the same as (default-value \\='left-fringe-width). */);
DEFVAR_BUFFER_DEFAULTS ("default-right-fringe-width",
right_fringe_width,
doc: /* Default value of `right-fringe-width' for buffers that don't override it.
-This is the same as (default-value 'right-fringe-width). */);
+This is the same as (default-value \\='right-fringe-width). */);
DEFVAR_BUFFER_DEFAULTS ("default-fringes-outside-margins",
fringes_outside_margins,
doc: /* Default value of `fringes-outside-margins' for buffers that don't override it.
-This is the same as (default-value 'fringes-outside-margins). */);
+This is the same as (default-value \\='fringes-outside-margins). */);
DEFVAR_BUFFER_DEFAULTS ("default-scroll-bar-width",
scroll_bar_width,
doc: /* Default value of `scroll-bar-width' for buffers that don't override it.
-This is the same as (default-value 'scroll-bar-width). */);
+This is the same as (default-value \\='scroll-bar-width). */);
DEFVAR_BUFFER_DEFAULTS ("default-vertical-scroll-bar",
vertical_scroll_bar_type,
doc: /* Default value of `vertical-scroll-bar' for buffers that don't override it.
-This is the same as (default-value 'vertical-scroll-bar). */);
+This is the same as (default-value \\='vertical-scroll-bar). */);
DEFVAR_BUFFER_DEFAULTS ("default-indicate-empty-lines",
indicate_empty_lines,
doc: /* Default value of `indicate-empty-lines' for buffers that don't override it.
-This is the same as (default-value 'indicate-empty-lines). */);
+This is the same as (default-value \\='indicate-empty-lines). */);
DEFVAR_BUFFER_DEFAULTS ("default-indicate-buffer-boundaries",
indicate_buffer_boundaries,
doc: /* Default value of `indicate-buffer-boundaries' for buffers that don't override it.
-This is the same as (default-value 'indicate-buffer-boundaries). */);
+This is the same as (default-value \\='indicate-buffer-boundaries). */);
DEFVAR_BUFFER_DEFAULTS ("default-fringe-indicator-alist",
fringe_indicator_alist,
doc: /* Default value of `fringe-indicator-alist' for buffers that don't override it.
-This is the same as (default-value 'fringe-indicator-alist). */);
+This is the same as (default-value \\='fringe-indicator-alist). */);
DEFVAR_BUFFER_DEFAULTS ("default-fringe-cursor-alist",
fringe_cursor_alist,
doc: /* Default value of `fringe-cursor-alist' for buffers that don't override it.
-This is the same as (default-value 'fringe-cursor-alist). */);
+This is the same as (default-value \\='fringe-cursor-alist). */);
DEFVAR_BUFFER_DEFAULTS ("default-scroll-up-aggressively",
scroll_up_aggressively,
doc: /* Default value of `scroll-up-aggressively'.
This value applies in buffers that don't have their own local values.
-This is the same as (default-value 'scroll-up-aggressively). */);
+This is the same as (default-value \\='scroll-up-aggressively). */);
DEFVAR_BUFFER_DEFAULTS ("default-scroll-down-aggressively",
scroll_down_aggressively,
doc: /* Default value of `scroll-down-aggressively'.
This value applies in buffers that don't have their own local values.
-This is the same as (default-value 'scroll-down-aggressively). */);
+This is the same as (default-value \\='scroll-down-aggressively). */);
DEFVAR_PER_BUFFER ("header-line-format",
&BVAR (current_buffer, header_line_format),
diff --git a/src/category.c b/src/category.c
index ab90f5ff093..bb4a75d3a4d 100644
--- a/src/category.c
+++ b/src/category.c
@@ -491,7 +491,7 @@ between C1 and C2.
For instance, to tell that there's a word boundary between Hiragana
and Katakana (both are in the same script `kana'),
-the element `(?H . ?K) should be in this list. */);
+the element `(?H . ?K)' should be in this list. */);
Vword_combining_categories = Qnil;
diff --git a/src/data.c b/src/data.c
index 784d127f18a..88c5a309859 100644
--- a/src/data.c
+++ b/src/data.c
@@ -1668,7 +1668,7 @@ this function causes a local value to exist for this buffer,
just as setting the variable would do.
This function returns VARIABLE, and therefore
- (set (make-local-variable 'VARIABLE) VALUE-EXP)
+ (set (make-local-variable \\='VARIABLE) VALUE-EXP)
works.
See also `make-variable-buffer-local'.
diff --git a/src/dired.c b/src/dired.c
index e70f136d0cc..97736673f5d 100644
--- a/src/dired.c
+++ b/src/dired.c
@@ -816,7 +816,7 @@ DEFUN ("file-attributes", Ffile_attributes, Sfile_attributes, 1, 2, 0,
Value is nil if specified file cannot be opened.
ID-FORMAT specifies the preferred format of attributes uid and gid (see
-below) - valid values are 'string and 'integer. The latter is the
+below) - valid values are `string' and `integer'. The latter is the
default, but we plan to change that, so you should specify a non-nil value
for ID-FORMAT if you use the returned uid or gid.
diff --git a/src/editfns.c b/src/editfns.c
index a85c9e79d4e..e7d5dd89e51 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -2156,7 +2156,7 @@ applied without consideration for daylight saving time.
You can pass more than 7 arguments; then the first six arguments
are used as SECOND through YEAR, and the *last* argument is used as ZONE.
The intervening arguments are ignored.
-This feature lets (apply 'encode-time (decode-time ...)) work.
+This feature lets (apply \\='encode-time (decode-time ...)) work.
Out-of-range values for SECOND, MINUTE, HOUR, DAY, or MONTH are allowed;
for example, a DAY of 0 means the day preceding the given month.
diff --git a/src/eval.c b/src/eval.c
index 6fde7e30b7f..77d435acbe6 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -517,7 +517,7 @@ DEFUN ("quote", Fquote, Squote, 1, UNEVALLED, 0,
Warning: `quote' does not construct its return value, but just returns
the value that was pre-constructed by the Lisp reader (see info node
`(elisp)Printed Representation').
-This means that '(a . b) is not identical to (cons 'a 'b): the former
+This means that \\='(a . b) is not identical to (cons \\='a \\='b): the former
does not cons. Quoting should be reserved for constants that will
never be modified by side-effects, unless you like self-modifying code.
See the common pitfall in info node `(elisp)Rearrangement' for an example
@@ -2196,7 +2196,7 @@ eval_sub (Lisp_Object form)
DEFUN ("apply", Fapply, Sapply, 1, MANY, 0,
doc: /* Call FUNCTION with our remaining args, using our last arg as list of args.
Then return the value FUNCTION returns.
-Thus, (apply '+ 1 2 '(3 4)) returns 10.
+Thus, (apply \\='+ 1 2 \\='(3 4)) returns 10.
usage: (apply FUNCTION &rest ARGUMENTS) */)
(ptrdiff_t nargs, Lisp_Object *args)
{
@@ -2557,7 +2557,7 @@ DEFUN ("functionp", Ffunctionp, Sfunctionp, 1, 1, 0,
DEFUN ("funcall", Ffuncall, Sfuncall, 1, MANY, 0,
doc: /* Call first argument as a function, passing remaining arguments to it.
Return the value that function returns.
-Thus, (funcall 'cons 'x 'y) returns (x . y).
+Thus, (funcall \\='cons \\='x \\='y) returns (x . y).
usage: (funcall FUNCTION &rest ARGUMENTS) */)
(ptrdiff_t nargs, Lisp_Object *args)
{
diff --git a/src/fileio.c b/src/fileio.c
index a36dfbcfa36..d4341f8fa59 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -5878,7 +5878,7 @@ the arguments that were passed to that primitive. For example, if you
do (file-exists-p FILENAME) and FILENAME is handled by HANDLER, then
HANDLER is called like this:
- (funcall HANDLER 'file-exists-p FILENAME)
+ (funcall HANDLER \\='file-exists-p FILENAME)
Note that HANDLER must be able to handle all I/O primitives; if it has
nothing special to do for a primitive, it should reinvoke the
diff --git a/src/fns.c b/src/fns.c
index 26a98abc1a6..aa917ac6ec9 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -347,7 +347,7 @@ This function obeys the conventions for collation order in your
locale settings. For example, punctuation and whitespace characters
might be considered less significant for sorting:
-\(sort '\("11" "12" "1 1" "1 2" "1.1" "1.2") 'string-collate-lessp)
+\(sort '\("11" "12" "1 1" "1 2" "1.1" "1.2") \\='string-collate-lessp)
=> \("11" "1 1" "1.1" "12" "1 2" "1.2")
The optional argument LOCALE, a string, overrides the setting of your
@@ -1083,7 +1083,7 @@ multibyte character of charset `eight-bit'.
See also `string-to-multibyte'.
Beware, this often doesn't really do what you think it does.
-It is similar to (decode-coding-string STRING 'utf-8-emacs).
+It is similar to (decode-coding-string STRING \\='utf-8-emacs).
If you're not sure, whether to use `string-as-multibyte' or
`string-to-multibyte', use `string-to-multibyte'. */)
(Lisp_Object string)
diff --git a/src/frame.c b/src/frame.c
index d3e478075c3..6debcb8e7bc 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -976,7 +976,7 @@ except when you want to create a new frame on another terminal.
In that case, the `tty' parameter specifies the device file to open,
and the `tty-type' parameter specifies the terminal type. Example:
- (make-terminal-frame '((tty . "/dev/pts/5") (tty-type . "xterm")))
+ (make-terminal-frame \\='((tty . "/dev/pts/5") (tty-type . "xterm")))
Note that changing the size of one terminal frame automatically
affects all frames on the same terminal device. */)
@@ -5018,7 +5018,7 @@ You can also use a floating number between 0.0 and 1.0. */);
DEFVAR_LISP ("default-frame-alist", Vdefault_frame_alist,
doc: /* Alist of default values for frame creation.
These may be set in your init file, like this:
- (setq default-frame-alist '((width . 80) (height . 55) (menu-bar-lines . 1)))
+ (setq default-frame-alist \\='((width . 80) (height . 55) (menu-bar-lines . 1)))
These override values given in window system configuration data,
including X Windows' defaults database.
For values specific to the first Emacs frame, see `initial-frame-alist'.
@@ -5176,7 +5176,7 @@ width by the width of one scroll bar provided this option is nil and
keep it unchanged if this option is either t or a list containing
`vertical-scroll-bars'.
-The default value is '(tool-bar-lines) on Lucid, Motif and Windows
+The default value is \\='(tool-bar-lines) on Lucid, Motif and Windows
\(which means that adding/removing a tool bar does not change the frame
height), nil on all other window systems including GTK+ (which means
that changing any of the parameters listed above may change the size of
diff --git a/src/image.c b/src/image.c
index 743d230ed3b..85cf801f6a9 100644
--- a/src/image.c
+++ b/src/image.c
@@ -9752,7 +9752,7 @@ syms_of_image (void)
defining the supported image types. */
DEFVAR_LISP ("image-types", Vimage_types,
doc: /* List of potentially supported image types.
-Each element of the list is a symbol for an image type, like 'jpeg or 'png.
+Each element of the list is a symbol for an image type, like `jpeg' or `png'.
To check whether it is really supported, use `image-type-available-p'. */);
Vimage_types = Qnil;
diff --git a/src/keyboard.c b/src/keyboard.c
index dab32b12826..a8b1e9828bf 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -107,10 +107,6 @@ static Lisp_Object recent_keys;
Lisp_Object this_command_keys;
ptrdiff_t this_command_key_count;
-/* True after calling Freset_this_command_lengths.
- Usually it is false. */
-static bool this_command_key_count_reset;
-
/* This vector is used as a buffer to record the events that were actually read
by read_key_sequence. */
static Lisp_Object raw_keybuf;
@@ -124,11 +120,6 @@ static int raw_keybuf_count;
that precede this key sequence. */
static ptrdiff_t this_single_command_key_start;
-/* Record values of this_command_key_count and echo_length ()
- before this command was read. */
-static ptrdiff_t before_command_key_count;
-static ptrdiff_t before_command_echo_length;
-
#ifdef HAVE_STACK_OVERFLOW_HANDLING
/* For longjmp to recover from C stack overflow. */
@@ -441,10 +432,12 @@ echo_add_key (Lisp_Object c)
ptrdiff_t size = sizeof initbuf;
char *buffer = initbuf;
char *ptr = buffer;
- Lisp_Object echo_string;
+ Lisp_Object echo_string = KVAR (current_kboard, echo_string);
USE_SAFE_ALLOCA;
- echo_string = KVAR (current_kboard, echo_string);
+ if (STRINGP (echo_string) && SCHARS (echo_string) > 0)
+ /* Add a space at the end as a separator between keys. */
+ ptr++[0] = ' ';
/* If someone has passed us a composite event, use its head symbol. */
c = EVENT_HEAD (c);
@@ -486,48 +479,12 @@ echo_add_key (Lisp_Object c)
ptr += len;
}
- /* Replace a dash from echo_dash with a space, otherwise add a space
- at the end as a separator between keys. */
- AUTO_STRING (space, " ");
- if (STRINGP (echo_string) && SCHARS (echo_string) > 1)
- {
- Lisp_Object last_char, prev_char, idx;
-
- idx = make_number (SCHARS (echo_string) - 2);
- prev_char = Faref (echo_string, idx);
-
- idx = make_number (SCHARS (echo_string) - 1);
- last_char = Faref (echo_string, idx);
-
- /* We test PREV_CHAR to make sure this isn't the echoing of a
- minus-sign. */
- if (XINT (last_char) == '-' && XINT (prev_char) != ' ')
- Faset (echo_string, idx, make_number (' '));
- else
- echo_string = concat2 (echo_string, space);
- }
- else if (STRINGP (echo_string) && SCHARS (echo_string) > 0)
- echo_string = concat2 (echo_string, space);
-
kset_echo_string
(current_kboard,
concat2 (echo_string, make_string (buffer, ptr - buffer)));
SAFE_FREE ();
}
-/* Add C to the echo string, if echoing is going on. C can be a
- character or a symbol. */
-
-static void
-echo_char (Lisp_Object c)
-{
- if (current_kboard->immediate_echo)
- {
- echo_add_key (c);
- echo_now ();
- }
-}
-
/* Temporarily add a dash to the end of the echo string if it's not
empty, so that it serves as a mini-prompt for the very next
character. */
@@ -539,9 +496,6 @@ echo_dash (void)
if (NILP (KVAR (current_kboard, echo_string)))
return;
- if (this_command_key_count == 0)
- return;
-
if (!current_kboard->immediate_echo
&& SCHARS (KVAR (current_kboard, echo_string)) == 0)
return;
@@ -574,39 +528,39 @@ echo_dash (void)
echo_now ();
}
-/* Display the current echo string, and begin echoing if not already
- doing so. */
-
static void
-echo_now (void)
+echo_update (void)
{
- if (!current_kboard->immediate_echo)
+ if (current_kboard->immediate_echo)
{
ptrdiff_t i;
- current_kboard->immediate_echo = true;
+ kset_echo_string (current_kboard,
+ call0 (Qinternal_echo_keystrokes_prefix));
for (i = 0; i < this_command_key_count; i++)
{
Lisp_Object c;
- /* Set before_command_echo_length to the value that would
- have been saved before the start of this subcommand in
- command_loop_1, if we had already been echoing then. */
- if (i == this_single_command_key_start)
- before_command_echo_length = echo_length ();
-
c = AREF (this_command_keys, i);
if (! (EVENT_HAS_PARAMETERS (c)
&& EQ (EVENT_HEAD_KIND (EVENT_HEAD (c)), Qmouse_movement)))
- echo_char (c);
+ echo_add_key (c);
}
- /* Set before_command_echo_length to the value that would
- have been saved before the start of this subcommand in
- command_loop_1, if we had already been echoing then. */
- if (this_command_key_count == this_single_command_key_start)
- before_command_echo_length = echo_length ();
+ echo_now ();
+ }
+}
+
+/* Display the current echo string, and begin echoing if not already
+ doing so. */
+static void
+echo_now (void)
+{
+ if (!current_kboard->immediate_echo)
+ {
+ current_kboard->immediate_echo = true;
+ echo_update ();
/* Put a dash at the end to invite the user to type more. */
echo_dash ();
}
@@ -666,20 +620,6 @@ echo_truncate (ptrdiff_t nchars)
static void
add_command_key (Lisp_Object key)
{
-#if 0 /* Not needed after we made Freset_this_command_lengths
- do the job immediately. */
- /* If reset-this-command-length was called recently, obey it now.
- See the doc string of that function for an explanation of why. */
- if (before_command_restore_flag)
- {
- this_command_key_count = before_command_key_count_1;
- if (this_command_key_count < this_single_command_key_start)
- this_single_command_key_start = this_command_key_count;
- echo_truncate (before_command_echo_length_1);
- before_command_restore_flag = 0;
- }
-#endif
-
if (this_command_key_count >= ASIZE (this_command_keys))
this_command_keys = larger_vector (this_command_keys, 1, -1);
@@ -754,7 +694,7 @@ force_auto_save_soon (void)
DEFUN ("recursive-edit", Frecursive_edit, Srecursive_edit, 0, 0, "",
doc: /* Invoke the editor command loop recursively.
To get out of the recursive edit, a command can throw to ‘exit’ -- for
-instance ‘(throw 'exit nil)’.
+instance ‘(throw \\='exit nil)’.
If you throw a value other than t, ‘recursive-edit’ returns normally
to the function that called it. Throwing a t value causes
‘recursive-edit’ to quit, so that control returns to the command loop
@@ -1285,10 +1225,6 @@ static void adjust_point_for_property (ptrdiff_t, bool);
/* The last boundary auto-added to buffer-undo-list. */
Lisp_Object last_undo_boundary;
-/* FIXME: This is wrong rather than test window-system, we should call
- a new set-selection, which will then dispatch to x-set-selection, or
- tty-set-selection, or w32-set-selection, ... */
-
Lisp_Object
command_loop_1 (void)
{
@@ -1306,7 +1242,6 @@ command_loop_1 (void)
cancel_echoing ();
this_command_key_count = 0;
- this_command_key_count_reset = false;
this_single_command_key_start = 0;
if (NILP (Vmemory_full))
@@ -1394,9 +1329,6 @@ command_loop_1 (void)
&& !NILP (Ffboundp (Qrecompute_lucid_menubar)))
call0 (Qrecompute_lucid_menubar);
- before_command_key_count = this_command_key_count;
- before_command_echo_length = echo_length ();
-
Vthis_command = Qnil;
Vreal_this_command = Qnil;
Vthis_original_command = Qnil;
@@ -1424,7 +1356,6 @@ command_loop_1 (void)
{
cancel_echoing ();
this_command_key_count = 0;
- this_command_key_count_reset = false;
this_single_command_key_start = 0;
goto finalize;
}
@@ -1509,14 +1440,13 @@ command_loop_1 (void)
}
#endif
- if (NILP (KVAR (current_kboard, Vprefix_arg))) /* FIXME: Why? --Stef */
- {
- Lisp_Object undo = BVAR (current_buffer, undo_list);
- Fundo_boundary ();
- last_undo_boundary
- = (EQ (undo, BVAR (current_buffer, undo_list))
- ? Qnil : BVAR (current_buffer, undo_list));
- }
+ {
+ Lisp_Object undo = BVAR (current_buffer, undo_list);
+ Fundo_boundary ();
+ last_undo_boundary
+ = (EQ (undo, BVAR (current_buffer, undo_list))
+ ? Qnil : BVAR (current_buffer, undo_list));
+ }
call1 (Qcommand_execute, Vthis_command);
#ifdef HAVE_WINDOW_SYSTEM
@@ -1544,31 +1474,23 @@ command_loop_1 (void)
safe_run_hooks (Qdeferred_action_function);
- /* If there is a prefix argument,
- 1) We don't want Vlast_command to be ``universal-argument''
- (that would be dumb), so don't set Vlast_command,
- 2) we want to leave echoing on so that the prefix will be
- echoed as part of this key sequence, so don't call
- cancel_echoing, and
- 3) we want to leave this_command_key_count non-zero, so that
- read_char will realize that it is re-reading a character, and
- not echo it a second time.
-
- If the command didn't actually create a prefix arg,
- but is merely a frame event that is transparent to prefix args,
- then the above doesn't apply. */
- if (NILP (KVAR (current_kboard, Vprefix_arg))
- || CONSP (last_command_event))
+ kset_last_command (current_kboard, Vthis_command);
+ kset_real_last_command (current_kboard, Vreal_this_command);
+ if (!CONSP (last_command_event))
+ kset_last_repeatable_command (current_kboard, Vreal_this_command);
+
+ this_command_key_count = 0;
+ this_single_command_key_start = 0;
+
+ if (current_kboard->immediate_echo
+ && !NILP (call0 (Qinternal_echo_keystrokes_prefix)))
{
- kset_last_command (current_kboard, Vthis_command);
- kset_real_last_command (current_kboard, Vreal_this_command);
- if (!CONSP (last_command_event))
- kset_last_repeatable_command (current_kboard, Vreal_this_command);
- cancel_echoing ();
- this_command_key_count = 0;
- this_command_key_count_reset = false;
- this_single_command_key_start = 0;
+ current_kboard->immediate_echo = false;
+ /* Refresh the echo message. */
+ echo_now ();
}
+ else
+ cancel_echoing ();
if (!NILP (BVAR (current_buffer, mark_active))
&& !NILP (Vrun_hooks))
@@ -2389,10 +2311,6 @@ read_char (int commandflag, Lisp_Object map,
also_record = Qnil;
-#if 0 /* This was commented out as part of fixing echo for C-u left. */
- before_command_key_count = this_command_key_count;
- before_command_echo_length = echo_length ();
-#endif
c = Qnil;
previous_echo_area_message = Qnil;
@@ -2471,8 +2389,6 @@ read_char (int commandflag, Lisp_Object map,
goto reread_for_input_method;
}
- this_command_key_count_reset = false;
-
if (!NILP (Vexecuting_kbd_macro))
{
/* We set this to Qmacro; since that's not a frame, nobody will
@@ -2570,7 +2486,7 @@ read_char (int commandflag, Lisp_Object map,
(3) There's only one place in 20.x where ok_to_echo_at_next_pause
is set to a non-null value. This is done in read_char and it is
- set to echo_area_glyphs after a call to echo_char. That means
+ set to echo_area_glyphs. That means
ok_to_echo_at_next_pause is either null or
current_kboard->echobuf with the appropriate current_kboard at
that time.
@@ -2674,7 +2590,8 @@ read_char (int commandflag, Lisp_Object map,
if (minibuf_level == 0
&& !end_time
&& !current_kboard->immediate_echo
- && this_command_key_count > 0
+ && (this_command_key_count > 0
+ || !NILP (call0 (Qinternal_echo_keystrokes_prefix)))
&& ! noninteractive
&& echo_keystrokes_p ()
&& (/* No message. */
@@ -3018,7 +2935,6 @@ read_char (int commandflag, Lisp_Object map,
{
Lisp_Object keys;
ptrdiff_t key_count;
- bool key_count_reset;
ptrdiff_t command_key_start;
ptrdiff_t count = SPECPDL_INDEX ();
@@ -3028,20 +2944,8 @@ read_char (int commandflag, Lisp_Object map,
Lisp_Object saved_echo_string = KVAR (current_kboard, echo_string);
ptrdiff_t saved_echo_after_prompt = current_kboard->echo_after_prompt;
-#if 0
- if (before_command_restore_flag)
- {
- this_command_key_count = before_command_key_count_1;
- if (this_command_key_count < this_single_command_key_start)
- this_single_command_key_start = this_command_key_count;
- echo_truncate (before_command_echo_length_1);
- before_command_restore_flag = 0;
- }
-#endif
-
/* Save the this_command_keys status. */
key_count = this_command_key_count;
- key_count_reset = this_command_key_count_reset;
command_key_start = this_single_command_key_start;
if (key_count > 0)
@@ -3051,7 +2955,6 @@ read_char (int commandflag, Lisp_Object map,
/* Clear out this_command_keys. */
this_command_key_count = 0;
- this_command_key_count_reset = false;
this_single_command_key_start = 0;
/* Now wipe the echo area. */
@@ -3075,7 +2978,6 @@ read_char (int commandflag, Lisp_Object map,
/* Restore the saved echoing state
and this_command_keys state. */
this_command_key_count = key_count;
- this_command_key_count_reset = key_count_reset;
this_single_command_key_start = command_key_start;
if (key_count > 0)
this_command_keys = keys;
@@ -3141,28 +3043,23 @@ read_char (int commandflag, Lisp_Object map,
goto retry;
}
- if ((! reread || this_command_key_count == 0
- || this_command_key_count_reset)
+ if ((! reread || this_command_key_count == 0)
&& !end_time)
{
/* Don't echo mouse motion events. */
- if (echo_keystrokes_p ()
- && ! (EVENT_HAS_PARAMETERS (c)
- && EQ (EVENT_HEAD_KIND (EVENT_HEAD (c)), Qmouse_movement)))
- {
- echo_char (c);
- if (! NILP (also_record))
- echo_char (also_record);
- /* Once we reread a character, echoing can happen
- the next time we pause to read a new one. */
- ok_to_echo_at_next_pause = current_kboard;
- }
+ if (! (EVENT_HAS_PARAMETERS (c)
+ && EQ (EVENT_HEAD_KIND (EVENT_HEAD (c)), Qmouse_movement)))
+ /* Once we reread a character, echoing can happen
+ the next time we pause to read a new one. */
+ ok_to_echo_at_next_pause = current_kboard;
/* Record this character as part of the current key. */
add_command_key (c);
if (! NILP (also_record))
add_command_key (also_record);
+
+ echo_update ();
}
last_input_event = c;
@@ -3218,23 +3115,13 @@ record_menu_key (Lisp_Object c)
record_char (c);
-#if 0
- before_command_key_count = this_command_key_count;
- before_command_echo_length = echo_length ();
-#endif
-
- /* Don't echo mouse motion events. */
- if (echo_keystrokes_p ())
- {
- echo_char (c);
-
- /* Once we reread a character, echoing can happen
- the next time we pause to read a new one. */
- ok_to_echo_at_next_pause = 0;
- }
+ /* Once we reread a character, echoing can happen
+ the next time we pause to read a new one. */
+ ok_to_echo_at_next_pause = NULL;
/* Record this character as part of the current key. */
add_command_key (c);
+ echo_update ();
/* Re-reading in the middle of a command. */
last_input_event = c;
@@ -9120,11 +9007,12 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt,
{
key = keybuf[t];
add_command_key (key);
- if (echo_keystrokes_p ()
- && current_kboard->immediate_echo)
+ if (current_kboard->immediate_echo)
{
- echo_add_key (key);
- echo_dash ();
+ /* Set immediate_echo to false so as to force echo_now to
+ redisplay (it will set immediate_echo right back to true). */
+ current_kboard->immediate_echo = false;
+ echo_now ();
}
}
@@ -9788,11 +9676,8 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt,
Better ideas? */
for (; t < mock_input; t++)
- {
- if (echo_keystrokes_p ())
- echo_char (keybuf[t]);
- add_command_key (keybuf[t]);
- }
+ add_command_key (keybuf[t]);
+ echo_update ();
return t;
}
@@ -9819,7 +9704,6 @@ read_key_sequence_vs (Lisp_Object prompt, Lisp_Object continue_echo,
if (NILP (continue_echo))
{
this_command_key_count = 0;
- this_command_key_count_reset = false;
this_single_command_key_start = 0;
}
@@ -10076,33 +9960,6 @@ The value is always a vector. */)
return Fvector (raw_keybuf_count, XVECTOR (raw_keybuf)->contents);
}
-DEFUN ("reset-this-command-lengths", Freset_this_command_lengths,
- Sreset_this_command_lengths, 0, 0, 0,
- doc: /* Make the unread events replace the last command and echo.
-Used in `universal-argument-other-key'.
-
-`universal-argument-other-key' rereads the event just typed.
-It then gets translated through `function-key-map'.
-The translated event has to replace the real events,
-both in the value of (this-command-keys) and in echoing.
-To achieve this, `universal-argument-other-key' calls
-`reset-this-command-lengths', which discards the record of reading
-these events the first time. */)
- (void)
-{
- this_command_key_count = before_command_key_count;
- if (this_command_key_count < this_single_command_key_start)
- this_single_command_key_start = this_command_key_count;
-
- echo_truncate (before_command_echo_length);
-
- /* Cause whatever we put into unread-command-events
- to echo as if it were being freshly read from the keyboard. */
- this_command_key_count_reset = true;
-
- return Qnil;
-}
-
DEFUN ("clear-this-command-keys", Fclear_this_command_keys,
Sclear_this_command_keys, 0, 1, 0,
doc: /* Clear out the vector that `this-command-keys' returns.
@@ -10113,7 +9970,6 @@ KEEP-RECORD is non-nil. */)
int i;
this_command_key_count = 0;
- this_command_key_count_reset = false;
if (NILP (keep_record))
{
@@ -11210,6 +11066,7 @@ syms_of_keyboard (void)
staticpro (&raw_keybuf);
DEFSYM (Qcommand_execute, "command-execute");
+ DEFSYM (Qinternal_echo_keystrokes_prefix, "internal-echo-keystrokes-prefix");
accent_key_syms = Qnil;
staticpro (&accent_key_syms);
@@ -11253,7 +11110,6 @@ syms_of_keyboard (void)
defsubr (&Sthis_command_keys_vector);
defsubr (&Sthis_single_command_keys);
defsubr (&Sthis_single_command_raw_keys);
- defsubr (&Sreset_this_command_lengths);
defsubr (&Sclear_this_command_keys);
defsubr (&Ssuspend_emacs);
defsubr (&Sabort_recursive_edit);
diff --git a/src/print.c b/src/print.c
index d3b1a927b22..94f3fcd7db1 100644
--- a/src/print.c
+++ b/src/print.c
@@ -2212,7 +2212,7 @@ This affects only `prin1'. */);
DEFVAR_BOOL ("print-quoted", print_quoted,
doc: /* Non-nil means print quoted forms with reader syntax.
-I.e., (quote foo) prints as 'foo, (function foo) as #'foo. */);
+I.e., (quote foo) prints as \\='foo, (function foo) as #\\='foo. */);
print_quoted = 0;
DEFVAR_LISP ("print-gensym", Vprint_gensym,
diff --git a/src/process.c b/src/process.c
index 17e9187aa65..1ab83780914 100644
--- a/src/process.c
+++ b/src/process.c
@@ -2685,7 +2685,7 @@ Examples:
\(serial-process-configure :process "/dev/ttyS0" :speed 1200)
\(serial-process-configure
- :buffer "COM1" :stopbits 1 :parity 'odd :flowcontrol 'hw)
+ :buffer "COM1" :stopbits 1 :parity \\='odd :flowcontrol \\='hw)
\(serial-process-configure :port "\\\\.\\COM13" :bytesize 7)
@@ -2785,7 +2785,7 @@ Examples:
\(make-serial-process :port "COM1" :speed 115200 :stopbits 2)
-\(make-serial-process :port "\\\\.\\COM13" :speed 1200 :bytesize 7 :parity 'odd)
+\(make-serial-process :port "\\\\.\\COM13" :speed 1200 :bytesize 7 :parity \\='odd)
\(make-serial-process :port "/dev/tty.BlueConsole-SPP-1" :speed nil)
diff --git a/src/w32fns.c b/src/w32fns.c
index f279fb86c2f..d8e22e2aa9c 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -5782,8 +5782,8 @@ Internal use only, use `display-monitor-attributes-list' instead. */)
DEFUN ("set-message-beep", Fset_message_beep, Sset_message_beep, 1, 1, 0,
doc: /* Set the sound generated when the bell is rung.
-SOUND is 'asterisk, 'exclamation, 'hand, 'question, 'ok, or 'silent
-to use the corresponding system sound for the bell. The 'silent sound
+SOUND is `asterisk', `exclamation', `hand', `question', `ok', or `silent'
+to use the corresponding system sound for the bell. The `silent' sound
prevents Emacs from making any sound at all.
SOUND is nil to use the normal beep. */)
(Lisp_Object sound)
diff --git a/src/xfaces.c b/src/xfaces.c
index 556f361c10d..d89adca8c57 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -6506,8 +6506,8 @@ If this variable is made buffer-local, the face remapping takes effect
only in that buffer. For instance, the mode my-mode could define a
face `my-mode-default', and then in the mode setup function, do:
- (set (make-local-variable 'face-remapping-alist)
- '((default my-mode-default)))).
+ (set (make-local-variable \\='face-remapping-alist)
+ \\='((default my-mode-default)))).
Because Emacs normally only redraws screen areas when the underlying
buffer contents change, you may need to call `redraw-display' after