diff options
| author | Dmitry Antipov | 2012-08-17 18:24:43 +0400 |
|---|---|---|
| committer | Dmitry Antipov | 2012-08-17 18:24:43 +0400 |
| commit | a04e2c62ec8ce903310b7c7635c43f42ccab5e2f (patch) | |
| tree | 79da6e7e7455731a813eb601a158057c66bdcee6 /src/lisp.h | |
| parent | 8223e9280fa69afeeae1a8b51735cbb8393f2e8d (diff) | |
| download | emacs-a04e2c62ec8ce903310b7c7635c43f42ccab5e2f.tar.gz emacs-a04e2c62ec8ce903310b7c7635c43f42ccab5e2f.zip | |
Functions to get and set Lisp_Object fields of buffer-local variables.
* lisp.h (blv_found, set_blv_found, blv_value, set_blv_value)
(set_blv_where, set_blv_defcell, set_blv_valcell): New functions.
(BLV_FOUND, SET_BLV_FOUND, BLV_VALUE, SET_BLV_VALUE): Remove.
* data.c, eval.c, frame.c: Adjust users.
Diffstat (limited to 'src/lisp.h')
| -rw-r--r-- | src/lisp.h | 54 |
1 files changed, 46 insertions, 8 deletions
diff --git a/src/lisp.h b/src/lisp.h index 8ac01211a1f..827f2be06d0 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -1472,14 +1472,6 @@ struct Lisp_Buffer_Local_Value | |||
| 1472 | Lisp_Object valcell; | 1472 | Lisp_Object valcell; |
| 1473 | }; | 1473 | }; |
| 1474 | 1474 | ||
| 1475 | #define BLV_FOUND(blv) \ | ||
| 1476 | (eassert ((blv)->found == !EQ ((blv)->defcell, (blv)->valcell)), (blv)->found) | ||
| 1477 | #define SET_BLV_FOUND(blv, v) \ | ||
| 1478 | (eassert ((v) == !EQ ((blv)->defcell, (blv)->valcell)), (blv)->found = (v)) | ||
| 1479 | |||
| 1480 | #define BLV_VALUE(blv) (XCDR ((blv)->valcell)) | ||
| 1481 | #define SET_BLV_VALUE(blv, v) (XSETCDR ((blv)->valcell, v)) | ||
| 1482 | |||
| 1483 | /* Like Lisp_Objfwd except that value lives in a slot in the | 1475 | /* Like Lisp_Objfwd except that value lives in a slot in the |
| 1484 | current kboard. */ | 1476 | current kboard. */ |
| 1485 | struct Lisp_Kboard_Objfwd | 1477 | struct Lisp_Kboard_Objfwd |
| @@ -2415,6 +2407,52 @@ set_symbol_next (Lisp_Object sym, struct Lisp_Symbol *next) | |||
| 2415 | XSYMBOL (sym)->next = next; | 2407 | XSYMBOL (sym)->next = next; |
| 2416 | } | 2408 | } |
| 2417 | 2409 | ||
| 2410 | /* Buffer-local (also frame-local) variable access functions. */ | ||
| 2411 | |||
| 2412 | LISP_INLINE int | ||
| 2413 | blv_found (struct Lisp_Buffer_Local_Value *blv) | ||
| 2414 | { | ||
| 2415 | eassert (blv->found == !EQ (blv->defcell, blv->valcell)); | ||
| 2416 | return blv->found; | ||
| 2417 | } | ||
| 2418 | |||
| 2419 | LISP_INLINE void | ||
| 2420 | set_blv_found (struct Lisp_Buffer_Local_Value *blv, int found) | ||
| 2421 | { | ||
| 2422 | eassert (found == !EQ (blv->defcell, blv->valcell)); | ||
| 2423 | blv->found = found; | ||
| 2424 | } | ||
| 2425 | |||
| 2426 | LISP_INLINE Lisp_Object | ||
| 2427 | blv_value (struct Lisp_Buffer_Local_Value *blv) | ||
| 2428 | { | ||
| 2429 | return XCDR (blv->valcell); | ||
| 2430 | } | ||
| 2431 | |||
| 2432 | LISP_INLINE void | ||
| 2433 | set_blv_value (struct Lisp_Buffer_Local_Value *blv, Lisp_Object val) | ||
| 2434 | { | ||
| 2435 | XSETCDR (blv->valcell, val); | ||
| 2436 | } | ||
| 2437 | |||
| 2438 | LISP_INLINE void | ||
| 2439 | set_blv_where (struct Lisp_Buffer_Local_Value *blv, Lisp_Object val) | ||
| 2440 | { | ||
| 2441 | blv->where = val; | ||
| 2442 | } | ||
| 2443 | |||
| 2444 | LISP_INLINE void | ||
| 2445 | set_blv_defcell (struct Lisp_Buffer_Local_Value *blv, Lisp_Object val) | ||
| 2446 | { | ||
| 2447 | blv->defcell = val; | ||
| 2448 | } | ||
| 2449 | |||
| 2450 | LISP_INLINE void | ||
| 2451 | set_blv_valcell (struct Lisp_Buffer_Local_Value *blv, Lisp_Object val) | ||
| 2452 | { | ||
| 2453 | blv->valcell = val; | ||
| 2454 | } | ||
| 2455 | |||
| 2418 | /* Set overlay's property list. */ | 2456 | /* Set overlay's property list. */ |
| 2419 | 2457 | ||
| 2420 | LISP_INLINE void | 2458 | LISP_INLINE void |