Commit 620c53a6 authored by Stefan Monnier's avatar Stefan Monnier

* lisp/minibuffer.el: Add metadata method to completion tables.

(completion-category-overrides): New defcustom.
(completion-metadata, completion--field-metadata)
(completion-metadata-get, completion--styles)
(completion--cycle-threshold): New functions.
(completion-try-completion, completion-all-completions):
Add `metadata' argument to choose completion-styles.
(completion--do-completion): Use metadata to choose cycling.
(completion-all-sorted-completions): Use metadata for sorting.
Remove :completion-cycle-penalty which is not needed any more.
(completion--try-word-completion): Add `metadata' argument.
(minibuffer-completion-help): Check metadata for annotation function
and sorting.
(completion-file-name-table): Return `category' metadata.
(minibuffer-completing-file-name): Make obsolete.
* lisp/simple.el (minibuffer-completing-symbol): Make obsolete.
* lisp/icomplete.el (icomplete-completions): Pass new `metadata' param to
completion-try-completion.
* src/minibuf.c (Finternal_complete_buffer): Return `category' metadata.
(read_minibuf): Use get_minibuffer.
(syms_of_minibuf): Use DEFSYM.
(Qmetadata): New var.
* src/data.c (Qbuffer): Don't make it static.
(syms_of_data): Use DEFSYM.
parent e003a292
......@@ -91,6 +91,10 @@ and pops down the *Completions* buffer accordingly.
*** New completion style `substring'.
*** Completion style can be set per-category `completion-category-overrides'.
*** Completion of buffers now uses substring completion by default.
*** `completing-read' can be customized using the new variable
`completing-read-function'.
......@@ -861,6 +865,14 @@ valid for completion-extra-properties.
*** completion-annotate-function is obsolete.
*** New `metadata' method for completion tables. The metadata thus returned
can specify various details of the data returned by `all-completions':
- `category' is the kind of objects returned (e.g., `buffer', `file', ...),
used to select a style in completion-category-overrides.
- `annotation-function' to add annotations in *Completions*.
- `display-sort-function' to specify how to sort entries in *Completions*.
- `cycle-sort-function' to specify how to sort entries when cycling.
** `glyphless-char-display' can now distinguish between graphical and
text terminal display, via a char-table entry that is a cons cell.
......
2011-05-31 Stefan Monnier <monnier@iro.umontreal.ca>
* minibuffer.el: Add metadata method to completion tables.
(completion-category-overrides): New defcustom.
(completion-metadata, completion--field-metadata)
(completion-metadata-get, completion--styles)
(completion--cycle-threshold): New functions.
(completion-try-completion, completion-all-completions):
Add `metadata' argument to choose completion-styles.
(completion--do-completion): Use metadata to choose cycling.
(completion-all-sorted-completions): Use metadata for sorting.
Remove :completion-cycle-penalty which is not needed any more.
(completion--try-word-completion): Add `metadata' argument.
(minibuffer-completion-help): Check metadata for annotation function
and sorting.
(completion-file-name-table): Return `category' metadata.
(minibuffer-completing-file-name): Make obsolete.
* simple.el (minibuffer-completing-symbol): Make obsolete.
* icomplete.el (icomplete-completions): Pass new `metadata' param to
completion-try-completion.
2011-05-30 Stefan Monnier <monnier@iro.umontreal.ca>
* mail/smtpmail.el (smtpmail-send-data): Add progress reporter.
......
......@@ -287,6 +287,7 @@ matches exist. \(Keybindings for uniquely matched commands
are exhibited within the square braces.)"
(let* ((non-essential t)
(md (completion--field-metadata (field-beginning)))
(comps (completion-all-sorted-completions))
(last (if (consp comps) (last comps)))
(base-size (cdr last))
......@@ -299,11 +300,11 @@ are exhibited within the square braces.)"
(let* ((most-try
(if (and base-size (> base-size 0))
(completion-try-completion
name candidates predicate (length name))
name candidates predicate (length name) md)
;; If the `comps' are 0-based, the result should be
;; the same with `comps'.
(completion-try-completion
name comps nil (length name))))
name comps nil (length name) md)))
(most (if (consp most-try) (car most-try)
(if most-try (car comps) "")))
;; Compare name and most, so we can determine if name is
......
......@@ -61,10 +61,7 @@
;; - for M-x, cycle-sort commands that have no key binding first.
;; - Make things like icomplete-mode or lightning-completion work with
;; completion-in-region-mode.
;; - extend `boundaries' to provide various other meta-data about the
;; output of `all-completions':
;; - preferred sorting order when displayed in *Completions*.
;; - annotations/text-properties to add when displayed in *Completions*.
;; - extend `metadata':
;; - quoting/unquoting (so we can complete files names with envvars
;; and backslashes, and all-completion can list names without
;; quoting backslashes and dollars).
......@@ -116,6 +113,32 @@ the closest directory separators."
(cons (or (cadr boundaries) 0)
(or (cddr boundaries) (length suffix)))))
(defun completion-metadata (string table pred)
"Return the metadata of elements to complete at the end of STRING.
This metadata is an alist. Currently understood keys are:
- `category': the kind of objects returned by `all-completions'.
Used by `completion-category-overrides'.
- `annotation-function': function to add annotations in *Completions*.
Takes one argument (STRING), which is a possible completion and
returns a string to append to STRING.
- `display-sort-function': function to sort entries in *Completions*.
Takes one argument (COMPLETIONS) and should return a new list
of completions. Can operate destructively.
- `cycle-sort-function': function to sort entries when cycling.
Works like `display-sort-function'."
(let ((metadata (if (functionp table)
(funcall table string pred 'metadata))))
(if (eq (car-safe metadata) 'metadata)
(cdr metadata))))
(defun completion--field-metadata (field-start)
(completion-metadata (buffer-substring-no-properties field-start (point))
minibuffer-completion-table
minibuffer-completion-predicate))
(defun completion-metadata-get (metadata prop)
(cdr (assq prop metadata)))
(defun completion--some (fun xs)
"Apply FUN to each element of XS in turn.
Return the first non-nil returned value.
......@@ -457,7 +480,34 @@ The available styles are listed in `completion-styles-alist'."
:group 'minibuffer
:version "23.1")
(defun completion-try-completion (string table pred point)
(defcustom completion-category-overrides
'((buffer (styles . (basic substring))))
"List of overrides for specific categories.
Each override has the shape (CATEGORY . ALIST) where ALIST is
an association list that can specify properties such as:
- `styles': the list of `completion-styles' to use for that category.
- `cycle': the `completion-cycle-threshold' to use for that category."
:type `(alist :key-type (choice (const buffer)
(const file)
symbol)
:value-type
(set
(cons (const style)
(repeat ,@(mapcar (lambda (x) (list 'const (car x)))
completion-styles-alist)))
(cons (const cycle)
(choice (const :tag "No cycling" nil)
(const :tag "Always cycle" t)
(integer :tag "Threshold"))))))
(defun completion--styles (metadata)
(let* ((cat (completion-metadata-get metadata 'category))
(over (assq 'styles (cdr (assq cat completion-category-overrides)))))
(if over
(delete-dups (append (cdr over) (copy-sequence completion-styles)))
completion-styles)))
(defun completion-try-completion (string table pred point metadata)
"Try to complete STRING using completion table TABLE.
Only the elements of table that satisfy predicate PRED are considered.
POINT is the position of point within STRING.
......@@ -468,9 +518,9 @@ a new position for point."
(completion--some (lambda (style)
(funcall (nth 1 (assq style completion-styles-alist))
string table pred point))
completion-styles))
(completion--styles metadata)))
(defun completion-all-completions (string table pred point)
(defun completion-all-completions (string table pred point metadata)
"List the possible completions of STRING in completion table TABLE.
Only the elements of table that satisfy predicate PRED are considered.
POINT is the position of point within STRING.
......@@ -481,7 +531,7 @@ in the last `cdr'."
(completion--some (lambda (style)
(funcall (nth 2 (assq style completion-styles-alist))
string table pred point))
completion-styles))
(completion--styles metadata)))
(defun minibuffer--bitset (modified completions exact)
(logior (if modified 4 0)
......@@ -532,6 +582,11 @@ candidates than this number."
(const :tag "Always cycle" t)
(integer :tag "Threshold")))
(defun completion--cycle-threshold (metadata)
(let* ((cat (completion-metadata-get metadata 'category))
(over (assq 'cycle (cdr (assq cat completion-category-overrides)))))
(if over (cdr over) completion-cycle-threshold)))
(defvar completion-all-sorted-completions nil)
(make-variable-buffer-local 'completion-all-sorted-completions)
(defvar completion-cycling nil)
......@@ -566,12 +621,14 @@ when the buffer's text is already an exact match."
(let* ((beg (field-beginning))
(end (field-end))
(string (buffer-substring beg end))
(md (completion--field-metadata beg))
(comp (funcall (or try-completion-function
'completion-try-completion)
string
minibuffer-completion-table
minibuffer-completion-predicate
(- (point) beg))))
(- (point) beg)
md)))
(cond
((null comp)
(minibuffer-hide-completions)
......@@ -610,16 +667,17 @@ when the buffer's text is already an exact match."
(completion--do-completion try-completion-function expect-exact)
;; It did find a match. Do we match some possibility exactly now?
(let ((exact (test-completion completion
(let* ((exact (test-completion completion
minibuffer-completion-table
minibuffer-completion-predicate))
(threshold (completion--cycle-threshold md))
(comps
;; Check to see if we want to do cycling. We do it
;; here, after having performed the normal completion,
;; so as to take advantage of the difference between
;; try-completion and all-completions, for things
;; like completion-ignored-extensions.
(when (and completion-cycle-threshold
(when (and threshold
;; Check that the completion didn't make
;; us jump to a different boundary.
(or (not completed)
......@@ -636,7 +694,7 @@ when the buffer's text is already an exact match."
(not (ignore-errors
;; This signal an (intended) error if comps is too
;; short or if completion-cycle-threshold is t.
(consp (nthcdr completion-cycle-threshold comps)))))
(consp (nthcdr threshold comps)))))
;; Fewer than completion-cycle-threshold remaining
;; completions: let's cycle.
(setq completed t exact t)
......@@ -715,27 +773,25 @@ scroll the window of possible completions."
(or completion-all-sorted-completions
(let* ((start (field-beginning))
(end (field-end))
(all (completion-all-completions (buffer-substring start end)
minibuffer-completion-table
minibuffer-completion-predicate
(- (point) start)))
(string (buffer-substring start end))
(all (completion-all-completions
string
minibuffer-completion-table
minibuffer-completion-predicate
(- (point) start)
(completion--field-metadata start)))
(last (last all))
(base-size (or (cdr last) 0)))
(base-size (or (cdr last) 0))
(all-md (completion-metadata (substring string 0 base-size)
minibuffer-completion-table
minibuffer-completion-predicate))
(sort-fun (completion-metadata-get all-md 'cycle-sort-function)))
(when last
(setcdr last nil)
;; Prefer shorter completions.
(setq all (sort all (lambda (c1 c2)
(let ((s1 (get-text-property
0 :completion-cycle-penalty c1))
(s2 (get-text-property
0 :completion-cycle-penalty c2)))
(if (eq s1 s2)
(< (length c1) (length c2))
(< (or s1 (length c1))
(or s2 (length c2))))))))
(setq all (if sort-fun (funcall sort-fun all)
;; Prefer shorter completions, by default.
(sort all (lambda (c1 c2) (< (length c1) (length c2))))))
;; Prefer recently used completions.
;; FIXME: Additional sorting ideas:
;; - for M-x, prefer commands that have no key binding.
(when (minibufferp)
(let ((hist (symbol-value minibuffer-history-variable)))
(setq all (sort all (lambda (c1 c2)
......@@ -758,6 +814,7 @@ Repeated uses step through the possible completions."
;; ~/src/emacs/trunk/ and throws away lisp/minibuffer.el.
(let* ((start (field-beginning))
(end (field-end))
;; (md (completion--field-metadata start))
(all (completion-all-sorted-completions))
(base (+ start (or (cdr (last all)) 0))))
(cond
......@@ -861,8 +918,8 @@ If `minibuffer-completion-confirm' is `confirm-after-completion',
nil))
(t nil))))))
(defun completion--try-word-completion (string table predicate point)
(let ((comp (completion-try-completion string table predicate point)))
(defun completion--try-word-completion (string table predicate point md)
(let ((comp (completion-try-completion string table predicate point md)))
(if (not (consp comp))
comp
......@@ -884,7 +941,7 @@ If `minibuffer-completion-confirm' is `confirm-after-completion',
(while (and exts (not (consp tem)))
(setq tem (completion-try-completion
(concat before (pop exts) after)
table predicate (1+ point))))
table predicate (1+ point) md)))
(if (consp tem) (setq comp tem))))
;; Completing a single word is actually more difficult than completing
......@@ -1219,7 +1276,8 @@ variables.")
string
minibuffer-completion-table
minibuffer-completion-predicate
(- (point) (field-beginning)))))
(- (point) (field-beginning))
(completion--field-metadata start))))
(message nil)
(if (or (null completions)
(and (not (consp (cdr completions)))
......@@ -1235,9 +1293,16 @@ variables.")
(let* ((last (last completions))
(base-size (cdr last))
(prefix (unless (zerop base-size) (substring string 0 base-size)))
(global-af (or (plist-get completion-extra-properties
:annotation-function)
completion-annotate-function))
;; FIXME: This function is for the output of all-completions,
;; not completion-all-completions. Often it's the same, but
;; not always.
(all-md (completion-metadata (substring string 0 base-size)
minibuffer-completion-table
minibuffer-completion-predicate))
(afun (or (completion-metadata-get all-md 'annotation-function)
(plist-get completion-extra-properties
:annotation-function)
completion-annotate-function))
;; If the *Completions* buffer is shown in a new
;; window, mark it as softly-dedicated, so bury-buffer in
;; minibuffer-hide-completions will know whether to
......@@ -1247,15 +1312,21 @@ variables.")
;; Remove the base-size tail because `sort' requires a properly
;; nil-terminated list.
(when last (setcdr last nil))
(setq completions (sort completions 'string-lessp))
(setq completions
(cond
(global-af
;; FIXME: This function is for the output of all-completions,
;; not completion-all-completions. Often it's the same, but
;; not always.
(let ((sort-fun (completion-metadata-get
all-md 'display-sort-function)))
(if sort-fun
(funcall sort-fun completions)
(sort completions 'string-lessp))))
(when afun
(setq completions
(mapcar (lambda (s)
(let ((ann (funcall global-af s)))
(let ((ann (funcall afun s)))
(if ann (list s ann) s)))
completions))
(t completions)))
completions)))
(with-current-buffer standard-output
(set (make-local-variable 'completion-base-position)
......@@ -1270,12 +1341,12 @@ variables.")
(cpred minibuffer-completion-predicate)
(cprops completion-extra-properties))
(lambda (start end choice)
(unless
(or (zerop (length prefix))
(equal prefix
(buffer-substring-no-properties
(max (point-min) (- start (length prefix)))
start)))
(unless (or (zerop (length prefix))
(equal prefix
(buffer-substring-no-properties
(max (point-min)
(- start (length prefix)))
start)))
(message "*Completions* out of date"))
;; FIXME: Use `md' to do quoting&terminator here.
(completion--replace start end choice)
......@@ -1632,6 +1703,7 @@ same as `substitute-in-file-name'."
"Completion table for file names."
(ignore-errors
(cond
((eq action 'metadata) '(metadata (category . file)))
((eq (car-safe action) 'boundaries)
(let ((start (length (file-name-directory string)))
(end (string-match-p "/" (cdr action))))
......@@ -1852,6 +1924,11 @@ and `read-file-name-function'."
(funcall (or read-file-name-function #'read-file-name-default)
prompt dir default-filename mustmatch initial predicate))
;; minibuffer-completing-file-name is a variable used internally in minibuf.c
;; to determine whether to use minibuffer-local-filename-completion-map or
;; minibuffer-local-completion-map. It shouldn't be exported to Elisp.
(make-obsolete-variable 'minibuffer-completing-file-name nil "24.1")
(defun read-file-name-default (prompt &optional dir default-filename mustmatch initial predicate)
"Default method for reading file names.
See `read-file-name' for the meaning of the arguments."
......
......@@ -1158,6 +1158,7 @@ in *Help* buffer. See also the command `describe-char'."
(defvar minibuffer-completing-symbol nil
"Non-nil means completing a Lisp symbol in the minibuffer.")
(make-obsolete-variable 'minibuffer-completing-symbol nil "24.1")
(defvar minibuffer-default nil
"The current default value or list of default values in the minibuffer.
......
2011-05-31 Stefan Monnier <monnier@iro.umontreal.ca>
* minibuf.c (Finternal_complete_buffer): Return `category' metadata.
(read_minibuf): Use get_minibuffer.
(syms_of_minibuf): Use DEFSYM.
(Qmetadata): New var.
* data.c (Qbuffer): Don't make it static.
(syms_of_data): Use DEFSYM.
2011-05-31 Paul Eggert <eggert@cs.ucla.edu>
* ccl.c (CCL_CODE_RANGE): Allow negative numbers. (Bug#8751)
......@@ -164,8 +173,8 @@
(symbol_to_x_atom): Remove gratuitous arg.
(x_handle_selection_request, lisp_data_to_selection_data)
(x_get_foreign_selection, Fx_register_dnd_atom): Callers changed.
(x_own_selection, x_get_local_selection, x_convert_selection): New
arg, specifying work frame. Use terminal-local Vselection_alist.
(x_own_selection, x_get_local_selection, x_convert_selection):
New arg, specifying work frame. Use terminal-local Vselection_alist.
(some_frame_on_display): Delete unused function.
(Fx_own_selection_internal, Fx_get_selection_internal)
(Fx_disown_selection_internal, Fx_selection_owner_p)
......@@ -186,8 +195,8 @@
(x_selection_request_lisp_error): Free the above.
(x_get_local_selection): Remove unnecessary code.
(x_reply_selection_request): Args changed; handle arbitrary array
of converted selections stored in converted_selections. Separate
the XChangeProperty and SelectionNotify steps.
of converted selections stored in converted_selections.
Separate the XChangeProperty and SelectionNotify steps.
(x_handle_selection_request): Rewrite to handle MULTIPLE target.
(x_convert_selection): New function.
(x_handle_selection_event): Simplify.
......@@ -351,8 +360,8 @@
Be more systematic about user-interface timestamps.
Before, the code sometimes used 'Time', sometimes 'unsigned long',
and sometimes 'EMACS_UINT', to represent these timestamps. This
change causes it to use 'Time' uniformly, as that's what X uses.
and sometimes 'EMACS_UINT', to represent these timestamps.
This change causes it to use 'Time' uniformly, as that's what X uses.
This makes the code easier to follow, and makes it easier to catch
integer overflow bugs such as Bug#8664.
* frame.c (Fmouse_position, Fmouse_pixel_position):
......
......@@ -32,14 +32,14 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include "keyboard.h"
#include "frame.h"
#include "syssignal.h"
#include "termhooks.h" /* For FRAME_KBOARD reference in y-or-n-p. */
#include "termhooks.h" /* For FRAME_KBOARD reference in y-or-n-p. */
#include "font.h"
#ifdef STDC_HEADERS
#include <float.h>
#endif
/* If IEEE_FLOATING_POINT isn't defined, default it from FLT_*. */
/* If IEEE_FLOATING_POINT isn't defined, default it from FLT_*. */
#ifndef IEEE_FLOATING_POINT
#if (FLT_RADIX == 2 && FLT_MANT_DIG == 24 \
&& FLT_MIN_EXP == -125 && FLT_MAX_EXP == 128)
......@@ -90,7 +90,7 @@ static Lisp_Object Qsymbol, Qstring, Qcons, Qmarker, Qoverlay;
Lisp_Object Qwindow;
static Lisp_Object Qfloat, Qwindow_configuration;
static Lisp_Object Qprocess;
static Lisp_Object Qcompiled_function, Qbuffer, Qframe, Qvector;
Lisp_Object Qcompiled_function, Qbuffer, Qframe, Qvector;
static Lisp_Object Qchar_table, Qbool_vector, Qhash_table;
static Lisp_Object Qsubrp, Qmany, Qunevalled;
Lisp_Object Qfont_spec, Qfont_entity, Qfont_object;
......@@ -2854,74 +2854,75 @@ syms_of_data (void)
{
Lisp_Object error_tail, arith_tail;
Qquote = intern_c_string ("quote");
Qlambda = intern_c_string ("lambda");
Qsubr = intern_c_string ("subr");
Qerror_conditions = intern_c_string ("error-conditions");
Qerror_message = intern_c_string ("error-message");
Qtop_level = intern_c_string ("top-level");
Qerror = intern_c_string ("error");
Qquit = intern_c_string ("quit");
Qwrong_type_argument = intern_c_string ("wrong-type-argument");
Qargs_out_of_range = intern_c_string ("args-out-of-range");
Qvoid_function = intern_c_string ("void-function");
Qcyclic_function_indirection = intern_c_string ("cyclic-function-indirection");
Qcyclic_variable_indirection = intern_c_string ("cyclic-variable-indirection");
Qvoid_variable = intern_c_string ("void-variable");
Qsetting_constant = intern_c_string ("setting-constant");
Qinvalid_read_syntax = intern_c_string ("invalid-read-syntax");
Qinvalid_function = intern_c_string ("invalid-function");
Qwrong_number_of_arguments = intern_c_string ("wrong-number-of-arguments");
Qno_catch = intern_c_string ("no-catch");
Qend_of_file = intern_c_string ("end-of-file");
Qarith_error = intern_c_string ("arith-error");
Qbeginning_of_buffer = intern_c_string ("beginning-of-buffer");
Qend_of_buffer = intern_c_string ("end-of-buffer");
Qbuffer_read_only = intern_c_string ("buffer-read-only");
Qtext_read_only = intern_c_string ("text-read-only");
Qmark_inactive = intern_c_string ("mark-inactive");
Qlistp = intern_c_string ("listp");
Qconsp = intern_c_string ("consp");
Qsymbolp = intern_c_string ("symbolp");
Qkeywordp = intern_c_string ("keywordp");
Qintegerp = intern_c_string ("integerp");
Qnatnump = intern_c_string ("natnump");
Qwholenump = intern_c_string ("wholenump");
Qstringp = intern_c_string ("stringp");
Qarrayp = intern_c_string ("arrayp");
Qsequencep = intern_c_string ("sequencep");
Qbufferp = intern_c_string ("bufferp");
Qvectorp = intern_c_string ("vectorp");
Qchar_or_string_p = intern_c_string ("char-or-string-p");
Qmarkerp = intern_c_string ("markerp");
Qbuffer_or_string_p = intern_c_string ("buffer-or-string-p");
Qinteger_or_marker_p = intern_c_string ("integer-or-marker-p");
Qboundp = intern_c_string ("boundp");
Qfboundp = intern_c_string ("fboundp");
Qfloatp = intern_c_string ("floatp");
Qnumberp = intern_c_string ("numberp");
Qnumber_or_marker_p = intern_c_string ("number-or-marker-p");
Qchar_table_p = intern_c_string ("char-table-p");
Qvector_or_char_table_p = intern_c_string ("vector-or-char-table-p");
Qsubrp = intern_c_string ("subrp");
Qunevalled = intern_c_string ("unevalled");
Qmany = intern_c_string ("many");
Qcdr = intern_c_string ("cdr");
/* Handle automatic advice activation */
Qad_advice_info = intern_c_string ("ad-advice-info");
Qad_activate_internal = intern_c_string ("ad-activate-internal");
DEFSYM (Qquote, "quote");
DEFSYM (Qlambda, "lambda");
DEFSYM (Qsubr, "subr");
DEFSYM (Qerror_conditions, "error-conditions");
DEFSYM (Qerror_message, "error-message");
DEFSYM (Qtop_level, "top-level");
DEFSYM (Qerror, "error");
DEFSYM (Qquit, "quit");
DEFSYM (Qwrong_type_argument, "wrong-type-argument");
DEFSYM (Qargs_out_of_range, "args-out-of-range");
DEFSYM (Qvoid_function, "void-function");
DEFSYM (Qcyclic_function_indirection, "cyclic-function-indirection");
DEFSYM (Qcyclic_variable_indirection, "cyclic-variable-indirection");
DEFSYM (Qvoid_variable, "void-variable");
DEFSYM (Qsetting_constant, "setting-constant");
DEFSYM (Qinvalid_read_syntax, "invalid-read-syntax");
DEFSYM (Qinvalid_function, "invalid-function");
DEFSYM (Qwrong_number_of_arguments, "wrong-number-of-arguments");
DEFSYM (Qno_catch, "no-catch");
DEFSYM (Qend_of_file, "end-of-file");
DEFSYM (Qarith_error, "arith-error");
DEFSYM (Qbeginning_of_buffer, "beginning-of-buffer");
DEFSYM (Qend_of_buffer, "end-of-buffer");
DEFSYM (Qbuffer_read_only, "buffer-read-only");
DEFSYM (Qtext_read_only, "text-read-only");
DEFSYM (Qmark_inactive, "mark-inactive");
DEFSYM (Qlistp, "listp");
DEFSYM (Qconsp, "consp");
DEFSYM (Qsymbolp, "symbolp");
DEFSYM (Qkeywordp, "keywordp");
DEFSYM (Qintegerp, "integerp");
DEFSYM (Qnatnump, "natnump");
DEFSYM (Qwholenump, "wholenump");
DEFSYM (Qstringp, "stringp");
DEFSYM (Qarrayp, "arrayp");
DEFSYM (Qsequencep, "sequencep");
DEFSYM (Qbufferp, "bufferp");
DEFSYM (Qvectorp, "vectorp");
DEFSYM (Qchar_or_string_p, "char-or-string-p");
DEFSYM (Qmarkerp, "markerp");
DEFSYM (Qbuffer_or_string_p, "buffer-or-string-p");
DEFSYM (Qinteger_or_marker_p, "integer-or-marker-p");
DEFSYM (Qboundp, "boundp");
DEFSYM (Qfboundp, "fboundp");
DEFSYM (Qfloatp, "floatp");
DEFSYM (Qnumberp, "numberp");
DEFSYM (Qnumber_or_marker_p, "number-or-marker-p");
DEFSYM (Qchar_table_p, "char-table-p");
DEFSYM (Qvector_or_char_table_p, "vector-or-char-table-p");
DEFSYM (Qsubrp, "subrp");
DEFSYM (Qunevalled, "unevalled");
DEFSYM (Qmany, "many");
DEFSYM (Qcdr, "cdr");
/* Handle automatic advice activation. */
DEFSYM (Qad_advice_info, "ad-advice-info");
DEFSYM (Qad_activate_internal, "ad-activate-internal");
error_tail = pure_cons (Qerror, Qnil);
/* ERROR is used as a signaler for random errors for which nothing else is right */
/* ERROR is used as a signaler for random errors for which nothing else is
right. */
Fput (Qerror, Qerror_conditions,
error_tail);
......@@ -2958,8 +2959,7 @@ syms_of_data (void)
Fput (Qcyclic_variable_indirection, Qerror_message,
make_pure_c_string ("Symbol's chain of variable indirections contains a loop"));