[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 10/36: symbol default value procedures
From: |
Christopher Allan Webber |
Subject: |
[Guile-commits] 10/36: symbol default value procedures |
Date: |
Tue, 19 Oct 2021 18:11:23 -0400 (EDT) |
cwebber pushed a commit to branch wip-elisp-rebased
in repository guile.
commit 534211afacddd9c1d2422c59df1bf2121107a4f2
Author: Robin Templeton <robin@terpri.org>
AuthorDate: Tue Jun 24 00:01:56 2014 -0400
symbol default value procedures
(Best-ability ChangeLog annotation added by Christine Lemmer-Webber.)
* module/language/elisp/runtime.scm:
(symbol-default-bound?, symbol-default-value, set-symbol-default-value!):
New procedure aliases. Export their symbols.
(emacs!): Update to accept new parameters dref, dset, dboundp.
---
module/language/elisp/runtime.scm | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/module/language/elisp/runtime.scm
b/module/language/elisp/runtime.scm
index bedb15a8..ff01520 100644
--- a/module/language/elisp/runtime.scm
+++ b/module/language/elisp/runtime.scm
@@ -37,6 +37,9 @@
set-symbol-plist!
symbol-bound?
symbol-fbound?
+ symbol-default-bound?
+ symbol-default-value
+ set-symbol-default-value!
bind-symbol
makunbound!
fmakunbound!
@@ -193,6 +196,12 @@
(dynamic-bound? (variable-ref var))
#t)))))
+(define symbol-default-bound? symbol-bound?)
+
+(define symbol-default-value symbol-value)
+
+(define set-symbol-default-value! set-symbol-value!)
+
(define (symbol-fbound? symbol)
(set! symbol (schemify symbol))
(and
@@ -225,10 +234,13 @@
(vector-set! (symbol-desc sym) 3 1)
#nil)
-(define (emacs! ref set boundp bind)
+(define (emacs! ref set boundp dref dset dboundp bind)
(set! symbol-value ref)
(set! set-symbol-value! set)
(set! symbol-bound? boundp)
+ (set! symbol-default-value dref)
+ (set! set-symbol-default-value! dset)
+ (set! symbol-default-bound? dboundp)
(set! bind-symbol bind)
(set! lexical-binding? (lambda () (symbol-value 'lexical-binding)))
(set! set-lexical-binding-mode (lambda (x) (set-symbol-value!
'lexical-binding x))))
- [Guile-commits] branch wip-elisp-rebased created (now 4b9b827), Christopher Allan Webber, 2021/10/19
- [Guile-commits] 01/36: Remove CFLAGS from snarfcppopts., Christopher Allan Webber, 2021/10/19
- [Guile-commits] 02/36: intern arbitrary constants, Christopher Allan Webber, 2021/10/19
- [Guile-commits] 05/36: guile-private-ref, Christopher Allan Webber, 2021/10/19
- [Guile-commits] 06/36: allow arbitrary constants in cps, Christopher Allan Webber, 2021/10/19
- [Guile-commits] 07/36: guile-snarf fix, Christopher Allan Webber, 2021/10/19
- [Guile-commits] 03/36: check symbols constants uninterned, Christopher Allan Webber, 2021/10/19
- [Guile-commits] 04/36: multiple obarrays, Christopher Allan Webber, 2021/10/19
- [Guile-commits] 09/36: read nil/t as #nil/#t, Christopher Allan Webber, 2021/10/19
- [Guile-commits] 10/36: symbol default value procedures,
Christopher Allan Webber <=
- [Guile-commits] 11/36: defvar affects default value, Christopher Allan Webber, 2021/10/19
- [Guile-commits] 12/36: constant-interning fix, Christopher Allan Webber, 2021/10/19
- [Guile-commits] 14/36: restore special operator handling, Christopher Allan Webber, 2021/10/19
- [Guile-commits] 08/36: elisp updates, Christopher Allan Webber, 2021/10/19
- [Guile-commits] 13/36: define-module for elisp special modules, Christopher Allan Webber, 2021/10/19
- [Guile-commits] 16/36: compile-elisp fn, Christopher Allan Webber, 2021/10/19
- [Guile-commits] 15/36: fix symbol-function, Christopher Allan Webber, 2021/10/19
- [Guile-commits] 18/36: defconst, defvar: proclaim special at compile-time, Christopher Allan Webber, 2021/10/19
- [Guile-commits] 19/36: compiler macros, Christopher Allan Webber, 2021/10/19
- [Guile-commits] 21/36: use defsubst, Christopher Allan Webber, 2021/10/19