Omit buffer_slot_type_mismatch and use generic predicates to enforce
authorDmitry Antipov <dmantipov@yandex.ru>
Thu, 10 Jan 2013 10:30:16 +0000 (14:30 +0400)
committerDmitry Antipov <dmantipov@yandex.ru>
Thu, 10 Jan 2013 10:30:16 +0000 (14:30 +0400)
commit58cc0a010b7e16dfcf03d7e858ea27eba5dece65
treec7df6a362013ac141d0cff69529052977b45e4b8
parent997d5f2d1d86acc55fa9b659ab69399c2968bbdc
Omit buffer_slot_type_mismatch and use generic predicates to enforce
the type of per-buffer values where appropriate.
* src/lisp.h (struct Lisp_Buffer_Objfwd): Rename slottype member to
predicate, which is how it's really used now.  Adjust comment.
* src/buffer.h (buffer_slot_type_mismatch): Remove prototype.
* src/buffer.c (buffer_slot_type_mismatch): Remove.
(DEFVAR_PER_BUFFER, defvar_per_buffer): Rename type argument to
predicate.  Adjust comment.
(syms_of_buffer): Use Qsymbolp for major-mode.  Use Qintegerp for
fill-column, left-margin, tab-width, buffer-saved-size,
left-margin-width, right-margin-width, left-fringe-width,
right-fringe-width, scroll-bar-width and buffer-display-count.
Use Qstringp for default-directory, buffer-file-name,
buffer-file-truename and buffer-auto-save-file-name.  Use Qfloatp for
scroll-up-aggressively and scroll-down-aggressively.  Use Qnumberp for
line-spacing.
* src/data.c (store_symval_forwarding): Adjust to call the predicate.
* lisp/cus-start.el (toplevel): Only allow float values for
scroll-up-aggressively and scroll-down-aggressively.
Allow any number for line-spacing.
lisp/ChangeLog
lisp/cus-start.el
src/ChangeLog
src/buffer.c
src/buffer.h
src/data.c
src/lisp.h