comparison lisp/subr.el @ 5844:445de172c217

(make-syntax-table): Behave like copy-syntax-table if an argument is given, for backward compatibility.
author Karl Heuer <kwzh@gnu.org>
date Tue, 08 Feb 1994 05:06:07 +0000
parents 3bd42ee22d1f
children 909b94d547c4
comparison
equal deleted inserted replaced
5843:d01185037467 5844:445de172c217
655 result (concat result (substring argument start end) 655 result (concat result (substring argument start end)
656 "\\" (substring argument end (1+ end))) 656 "\\" (substring argument end (1+ end)))
657 start (1+ end))) 657 start (1+ end)))
658 (concat result (substring argument start)))) 658 (concat result (substring argument start))))
659 659
660 (defun make-syntax-table () 660 (defun make-syntax-table (&optional oldtable)
661 "Return a new syntax table. 661 "Return a new syntax table.
662 It inherits all letters and control characters from the standard 662 It inherits all letters and control characters from the standard
663 syntax table; other characters are copied from the standard syntax table." 663 syntax table; other characters are copied from the standard syntax table."
664 (let ((table (copy-syntax-table)) 664 (if oldtable
665 i) 665 (copy-syntax-table oldtable)
666 (setq i 0) 666 (let ((table (copy-syntax-table))
667 (while (<= i 31) 667 i)
668 (aset table i 13) 668 (setq i 0)
669 (setq i (1+ i))) 669 (while (<= i 31)
670 (setq i ?A) 670 (aset table i 13)
671 (while (<= i ?Z) 671 (setq i (1+ i)))
672 (aset table i 13) 672 (setq i ?A)
673 (setq i (1+ i))) 673 (while (<= i ?Z)
674 (setq i ?a) 674 (aset table i 13)
675 (while (<= i ?z) 675 (setq i (1+ i)))
676 (aset table i 13) 676 (setq i ?a)
677 (setq i (1+ i))) 677 (while (<= i ?z)
678 (setq i 128) 678 (aset table i 13)
679 (while (<= i 255) 679 (setq i (1+ i)))
680 (aset table i 13) 680 (setq i 128)
681 (setq i (1+ i))) 681 (while (<= i 255)
682 table)) 682 (aset table i 13)
683 (setq i (1+ i)))
684 table)))
683 685
684 ;; now in fns.c 686 ;; now in fns.c
685 ;(defun nth (n list) 687 ;(defun nth (n list)
686 ; "Returns the Nth element of LIST. 688 ; "Returns the Nth element of LIST.
687 ;N counts from zero. If LIST is not that long, nil is returned." 689 ;N counts from zero. If LIST is not that long, nil is returned."