comparison lisp/subr.el @ 5448:89331fa1c819

Merged with trunk.
author Mats Lidell <matsl@xemacs.org>
date Thu, 06 Jan 2011 00:35:22 +0100
parents 6506fcb40fcf d1b17a33450b
children a9094f28f9a9
comparison
equal deleted inserted replaced
5447:4b08f375e2fb 5448:89331fa1c819
222 (define-function 'send-string-to-terminal 'external-debugging-output) 222 (define-function 'send-string-to-terminal 'external-debugging-output)
223 (define-function 'special-form-p 'special-operator-p) 223 (define-function 'special-form-p 'special-operator-p)
224 224
225 ;; XEmacs; this is in Lisp, its bytecode now taken by subseq. 225 ;; XEmacs; this is in Lisp, its bytecode now taken by subseq.
226 (define-function 'substring 'subseq) 226 (define-function 'substring 'subseq)
227
228 (define-function 'sort 'sort*)
229 (define-function 'fillarray 'fill)
227 230
228 ;; XEmacs: 231 ;; XEmacs:
229 (defun local-variable-if-set-p (sym buffer) 232 (defun local-variable-if-set-p (sym buffer)
230 "Return t if SYM would be local to BUFFER after it is set. 233 "Return t if SYM would be local to BUFFER after it is set.
231 A nil value for BUFFER is *not* the same as (current-buffer), but 234 A nil value for BUFFER is *not* the same as (current-buffer), but
1100 ((macro 1103 ((macro
1101 . (lambda (map-plist-definition) 1104 . (lambda (map-plist-definition)
1102 "Replace the variable names in MAP-PLIST-DEFINITION with uninterned 1105 "Replace the variable names in MAP-PLIST-DEFINITION with uninterned
1103 symbols, avoiding the risk of interference with variables in other functions 1106 symbols, avoiding the risk of interference with variables in other functions
1104 introduced by dynamic scope." 1107 introduced by dynamic scope."
1105 (if-fboundp 'nsublis 1108 (nsublis '((mp-function . #:function)
1106 (nsublis 1109 (plist . #:plist)
1107 '((mp-function . #:function) 1110 (result . #:result))
1108 (plist . #:plist) 1111 ;; Need to specify #'eq as the test, otherwise we have a
1109 (result . #:result)) 1112 ;; bootstrap issue, since #'eql is in cl.el, loaded after
1110 map-plist-definition) 1113 ;; this file.
1111 map-plist-definition))) 1114 map-plist-definition :test #'eq)))
1112 (defun map-plist (mp-function plist) 1115 (defun map-plist (mp-function plist)
1113 "Map FUNCTION (a function of two args) over each key/value pair in PLIST. 1116 "Map FUNCTION (a function of two args) over each key/value pair in PLIST.
1114 Return a list of the results." 1117 Return a list of the results."
1115 (let (result) 1118 (let (result)
1116 (while plist 1119 (while plist