Mercurial > emacs
view doc/lispref/spellfile @ 107984:bef5d1738c0b
Make variable forwarding explicit rather the using special values.
Basically, this makes the structure of buffer-local values and object
forwarding explicit in the type of Lisp_Symbols rather than use
special Lisp_Objects for that. This tends to lead to slightly more
verbose code, but is more C-like, simpler, and makes it easier to make
sure we handled all cases, among other things by letting the compiler
help us check it.
* lisp.h (enum Lisp_Misc_Type, union Lisp_Misc):
Removing forwarding objects.
(enum Lisp_Fwd_Type, enum symbol_redirect, union Lisp_Fwd): New types.
(struct Lisp_Symbol): Make the various forms of variable-forwarding
explicit rather than hiding them inside Lisp_Object "values".
(XFWDTYPE): New macro.
(XINTFWD, XBOOLFWD, XOBJFWD, XKBOARD_OBJFWD): Redefine.
(XBUFFER_LOCAL_VALUE): Remove.
(SYMBOL_VAL, SYMBOL_ALIAS, SYMBOL_BLV, SYMBOL_FWD, SET_SYMBOL_VAL)
(SET_SYMBOL_ALIAS, SET_SYMBOL_BLV, SET_SYMBOL_FWD): New macros.
(SYMBOL_VALUE, SET_SYMBOL_VALUE): Remove.
(struct Lisp_Intfwd, struct Lisp_Boolfwd, struct Lisp_Objfwd)
(struct Lisp_Buffer_Objfwd, struct Lisp_Kboard_Objfwd):
Remove the Lisp_Misc_* header.
(struct Lisp_Buffer_Local_Value): Redefine.
(BLV_FOUND, SET_BLV_FOUND, BLV_VALUE, SET_BLV_VALUE): New macros.
(struct Lisp_Misc_Any): Add filler to get the right size.
(struct Lisp_Free): Use struct Lisp_Misc_Any rather than struct
Lisp_Intfwd.
(DEFVAR_LISP, DEFVAR_LISP_NOPRO, DEFVAR_BOOL, DEFVAR_INT)
(DEFVAR_KBOARD): Allocate a forwarding object.
* data.c (do_blv_forwarding, store_blv_forwarding): New macros.
(let_shadows_global_binding_p): New function.
(union Lisp_Val_Fwd): New type.
(make_blv): New function.
(swap_in_symval_forwarding, indirect_variable, do_symval_forwarding)
(store_symval_forwarding, swap_in_global_binding, Fboundp)
(swap_in_symval_forwarding, find_symbol_value, Fset)
(let_shadows_buffer_binding_p, set_internal, default_value)
(Fset_default, Fmake_variable_buffer_local, Fmake_local_variable)
(Fkill_local_variable, Fmake_variable_frame_local)
(Flocal_variable_p, Flocal_variable_if_set_p)
(Fvariable_binding_locus):
* xdisp.c (select_frame_for_redisplay):
* lread.c (Fintern, Funintern, init_obarray, defvar_int)
(defvar_bool, defvar_lisp_nopro, defvar_lisp, defvar_kboard):
* frame.c (store_frame_param):
* eval.c (Fdefvaralias, Fuser_variable_p, specbind, unbind_to):
* bytecode.c (Fbyte_code) <varref, varset>: Adapt to the new symbol
value structure.
* buffer.c (PER_BUFFER_SYMBOL): Move from buffer.h.
(clone_per_buffer_values): Only adjust markers into the current buffer.
(reset_buffer_local_variables): PER_BUFFER_IDX is never -2.
(Fbuffer_local_value, set_buffer_internal_1)
(swap_out_buffer_local_variables):
Adapt to the new symbol value structure.
(DEFVAR_PER_BUFFER): Allocate a Lisp_Buffer_Objfwd object.
(defvar_per_buffer): Take a new arg for the fwd object.
(buffer_lisp_local_variables): Return a proper alist (different fix
for bug#4138).
* alloc.c (Fmake_symbol): Use SET_SYMBOL_VAL.
(Fgarbage_collect): Don't handle buffer_defaults specially.
(mark_object): Handle new symbol value structure rather than the old
special Lisp_Misc_* objects.
(gc_sweep) <symbols>: Free also the buffer-local-value objects.
* term.c (set_tty_color_mode):
* bidi.c (bidi_initialize): Don't access the ->value field directly.
* buffer.h (PER_BUFFER_VAR_OFFSET): Don't bother with
a buffer_local_flags.
* print.c (print_object): Get rid of impossible forwarding objects.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Mon, 19 Apr 2010 21:50:52 -0400 |
parents | b0c9c168daaa |
children |
line wrap: on
line source
ARPA Abbrev Acknowledgements Alan Arnold Autoloading BAppend Backquote Beeping Beverly Boyes Brian CL CSWKg Carl Carroll Chris Cleanups DEC DStandard Dan Dired's Disassembly Duff EMAC EMACSLOADPATH Eckelkamp Edward Eirik Emacses Eric Erlebacher Fcar Fcdr Fcons Fcoordinates Feval Frazzle Frederick Fri Gardiner Gentlemen HAL HATTED HS HU Hanchrow Hartzell Hess Hewlett IBM ISBN Impl Interning Ithought J's Jacobson Jak Joe Jones Jr Jul Keymaps Kimmo Kirman Knighten Korz Krawitz LTsHm LaLiberte LaTeX Lammens Local' MAC MONIES MSS Maclisp Magill Marick Matthew Minibuf Misc Miscellany Mocklisp Montanaro Myers NFS Nathan Nope OS OSITIONS Oct Ovwrt PURESIZE Packard Qlistp Qnil RMAIL Raul Resizing Robbins Rockwell SCO SIGCONT SIGHUP SIGINT SIGKILL SIGQUIT SIGTSTP SLOAD Scoordinates Set' Setcar Setcdr Shinichirou Snarf Sor SourceFile Stops' Subprocess Sugou Sunview Suominen T's TCP ThXs Tharp Thu Trost UCB UNEVALLED UNGCPRO UniPlus UniSoft's VMS Vip Void' Warren Welty Wethought Wilding Worley Wright XDVI XFASTINT XINT XWINDOW Xs Yo Zuhn aB aa aaa abbrevname abbrevs abc abcdefg abcxyz abd above' abracadabra address' after' alist alists anchored' and' ar aref arg'th argdecl arith arrayp arrow' asa asdZasfd asdf asdfasfd aset assoc assq at' aug autoload automatic' automatically' avector bBuffer bFrobnicate ba back' bananana barfoo barx bballs before' beforep bfoo bil binding's bish bobp bolp bottommost boundp brief' buf buffer' bufferp buttercup ca caaaar caaar caddaar cadr callable cbreak ce cell' cells' cf chaprm character' childp chistory ck column' commandp concat cond conses consing consp constant' contains' continuable convert' copyleft correct' counterintuitive cr creatable customie deactivate deactivated deassigns decrement' deffnx definition' defmacro defsubr deletable deletion' delq depiction descendents deselecting destructive' destructively' diffs ding directory' dired dirname disassembler dland docfile docstring doesnt dont down' downcasing downloadable dribble dup ef efg electric' elided elt enablement endkeyfun endrecfun environment' eobp eof eol eolp eq eqlsign erminal erste etags eval evalled evals evaluate' excess' exec exitcode expression' extendible extra' fails' fascist fboundp featurep ff fg fi file' filespec filesystems fillarray firstchar firstonly fixedcase fixit fixup floatp fmakunbound fns fo fol folded' following' fooba foobaz foox for' formfeed forms' forw forwa found' frob from' front' fset fstab ftp fu funtions garbles gc gcpro gd getenv getprv gid gnuemacs gp grep gtr halves' hand' hashes' hd hexadecimal hf hfil hookvar horsechestnut hostname hpux hscroll ibmapa ick id idiom ii indrm inode input' inputinput inserting' integerp intermixed ints inturned irreversibly jum keymapp kill' killed' killp kludge kolstad language' lastchar lcl ledit leif lessp level' lewis library' link' lisplib listexp loadable loadst loadup logand logior lognot logxor long' loop's lru lrwxrwxrwx ls lsh m's macroexpand makunbound malloc mapatoms mapconcat mapvar mark' marker's markerp mathsurround medit memq mh mim mini minibuffer's minibuffers misalignment misnamed mode's modename modes' mods modtime mqueue msg multicharacter myfile nCount nXExpression na name's natnump nb nbBuffer nconc newdef newelt newname nextrecfun nfsusr ninett nlines nlinks nlistp noconfirm nodigits noerror noforce nomessage nominees nomsg nonblank nonconstant nondestructive nondirectory nonidentical noninteractive noninteractively nonletter nonletters nonlocally nonoverlapping nonprinting nonselected nonsequentially nonvoid nonwarranty nonwritable noop noprint norecord normal' noselect nosuffix nots noundo nr nreverse ns nsRename nth nthcdr num number' numberp nums obarray obarrays object' oldbuf olddef oldname oo oops op or' otl out' over' overful overfullrule overstrike overstriking overstruck p' paren part' passwd pe ped perverse pid plist pnt pointer' pointm pos preallocate predicale preload prepend prepended prepends pretty' prin princ print' printenv printer' proc process' processp programmer' prolog protect' ps psf psychotherapy pty purecopy qu quux rassq reader' readin rebind rec rechecking recursively' recycler' redo redrawing redraws redump reenabled reexposed reg region' reindent reindents reinitialization reinitialize reinitialized reinstall reinstalled resize resized resizes reversibly reworded rhetorical right' ring' risky rmailedit rms rplaca rplacd rtu runnable rw rwxrwxrwx sDescribe sans se searching' section' seed' sequence' sequencep setp setplist setprv settable setuid sexp sexps shape' shell's sideline special' specpdl st stanford startkeyfun str stringp stty subcategories subcommands subexp subform subforms subjob submap subprocesses subr subr' subroutine' subrp subrs subwindows sugar' suid supersession suspension' symbolp symlink syms syntatic tabname temacs temporarily' tempvar tenths termcap termcaps terminfo termscript termtype terpri text' textrm textsl texttt than' the' tildes time's to' towars transportable txt types' uid unbind unbinding unbinds unchanged' unclutters undefine undefines underfull undo's undodata unevaluated' unexec unexpand unhesitatingly uninterned unisoft unpaired unread unreadable unreading unsaved untyped ununderline up' uptime usecount used' user' userlock usg val varbind varname varref vars varset vb vconcat vectorp vfil vi vn voidness vrs vt window' windowing windowp wrapped' xSpecify xcoord xcssun xemacs xenix xf xfirst xoff xon xx xxxxx xxxxxxxxx xy xyz ycoord yes' zA zap zerop