summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorKarl Heuer <kwzh@gnu.org>1994-02-08 05:06:07 +0000
committerKarl Heuer <kwzh@gnu.org>1994-02-08 05:06:07 +0000
commit297d863be54ff2b6aa0c86c890f8add2118ae878 (patch)
tree42868a3ccd4df574fe0822ab070ad48bac544b0c /lisp
parente15068c4db3cc50036c03cfbf1b56113b399265a (diff)
downloademacs-297d863be54ff2b6aa0c86c890f8add2118ae878.tar.gz
(make-syntax-table): Behave like copy-syntax-table if an argument is given,
for backward compatibility.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/subr.el42
1 files changed, 22 insertions, 20 deletions
diff --git a/lisp/subr.el b/lisp/subr.el
index d47949ce419..2817d9237de 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -657,29 +657,31 @@ Wildcards and redirection are handled as usual in the shell."
start (1+ end)))
(concat result (substring argument start))))
-(defun make-syntax-table ()
+(defun make-syntax-table (&optional oldtable)
"Return a new syntax table.
It inherits all letters and control characters from the standard
syntax table; other characters are copied from the standard syntax table."
- (let ((table (copy-syntax-table))
- i)
- (setq i 0)
- (while (<= i 31)
- (aset table i 13)
- (setq i (1+ i)))
- (setq i ?A)
- (while (<= i ?Z)
- (aset table i 13)
- (setq i (1+ i)))
- (setq i ?a)
- (while (<= i ?z)
- (aset table i 13)
- (setq i (1+ i)))
- (setq i 128)
- (while (<= i 255)
- (aset table i 13)
- (setq i (1+ i)))
- table))
+ (if oldtable
+ (copy-syntax-table oldtable)
+ (let ((table (copy-syntax-table))
+ i)
+ (setq i 0)
+ (while (<= i 31)
+ (aset table i 13)
+ (setq i (1+ i)))
+ (setq i ?A)
+ (while (<= i ?Z)
+ (aset table i 13)
+ (setq i (1+ i)))
+ (setq i ?a)
+ (while (<= i ?z)
+ (aset table i 13)
+ (setq i (1+ i)))
+ (setq i 128)
+ (while (<= i 255)
+ (aset table i 13)
+ (setq i (1+ i)))
+ table)))
;; now in fns.c
;(defun nth (n list)