Mercurial > emacs
comparison src/lread.c @ 85011:1d35aa875508
* buffer.c (syms_of_buffer) <local-abbrev-table>: Move from abbrev.c.
(DEFVAR_PER_BUFFER, defvar_per_buffer): Move from lisp.h and lread.c.
* lisp.h (defvar_per_buffer, DEFVAR_PER_BUFFER):
* lread.c (defvar_per_buffer):
* abbrev.c (syms_of_abbrev) <local-abbrev-tabl>: Move to buffer.c.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Tue, 02 Oct 2007 20:51:02 +0000 |
parents | 2c723350c8ec |
children | 695c195058e7 |
comparison
equal
deleted
inserted
replaced
85010:a3defcbdb064 | 85011:1d35aa875508 |
---|---|
3744 { | 3744 { |
3745 defvar_lisp_nopro (namestring, address); | 3745 defvar_lisp_nopro (namestring, address); |
3746 staticpro (address); | 3746 staticpro (address); |
3747 } | 3747 } |
3748 | 3748 |
3749 /* Similar but define a variable whose value is the Lisp Object stored in | |
3750 the current buffer. address is the address of the slot in the buffer | |
3751 that is current now. */ | |
3752 | |
3753 void | |
3754 defvar_per_buffer (namestring, address, type, doc) | |
3755 char *namestring; | |
3756 Lisp_Object *address; | |
3757 Lisp_Object type; | |
3758 char *doc; | |
3759 { | |
3760 Lisp_Object sym, val; | |
3761 int offset; | |
3762 | |
3763 sym = intern (namestring); | |
3764 val = allocate_misc (); | |
3765 offset = (char *)address - (char *)current_buffer; | |
3766 | |
3767 XMISCTYPE (val) = Lisp_Misc_Buffer_Objfwd; | |
3768 XBUFFER_OBJFWD (val)->offset = offset; | |
3769 SET_SYMBOL_VALUE (sym, val); | |
3770 PER_BUFFER_SYMBOL (offset) = sym; | |
3771 PER_BUFFER_TYPE (offset) = type; | |
3772 | |
3773 if (PER_BUFFER_IDX (offset) == 0) | |
3774 /* Did a DEFVAR_PER_BUFFER without initializing the corresponding | |
3775 slot of buffer_local_flags */ | |
3776 abort (); | |
3777 } | |
3778 | |
3779 | |
3780 /* Similar but define a variable whose value is the Lisp Object stored | 3749 /* Similar but define a variable whose value is the Lisp Object stored |
3781 at a particular offset in the current kboard object. */ | 3750 at a particular offset in the current kboard object. */ |
3782 | 3751 |
3783 void | 3752 void |
3784 defvar_kboard (namestring, offset) | 3753 defvar_kboard (namestring, offset) |