comparison lisp/obsolete.el @ 883:1e9272790fe0

[xemacs-hg @ 2002-06-26 00:11:15 by youngs] 2002-06-24 John Paul Wallington <jpw@shootybangbang.com> * obsolete.el (frame-parameter): New compatibility function. (makehash): Ditto. (buffer-local-value): Ditto. (line-beginning-position): New compatibility alias for `point-at-bol'. (line-end-position): New compatibility alias for `point-at-eol'. * subr.el (with-temp-message): New function; sync with GNU Emacs 21. (bound-and-true-p): Ditto. (propertize): New function. (delete-and-extract-region): Ditto. 2002-06-24 Jerry James <james@xemacs.org> * code-files.el (load): Look for a binary module if no Lisp file with the correct name is found.
author youngs
date Wed, 26 Jun 2002 00:11:16 +0000
parents 42375619fa45
children ccaf90c5a53a
comparison
equal deleted inserted replaced
882:f503f1607e8b 883:1e9272790fe0
145 ;; efficient but this function less efficient, as we couldn't be 145 ;; efficient but this function less efficient, as we couldn't be
146 ;; destructive. Since most callers now use `frame-parameters', we'll 146 ;; destructive. Since most callers now use `frame-parameters', we'll
147 ;; do it this way. Should probably change this at some point in the 147 ;; do it this way. Should probably change this at some point in the
148 ;; future. 148 ;; future.
149 (destructive-plist-to-alist (frame-properties frame))) 149 (destructive-plist-to-alist (frame-properties frame)))
150
151 (make-compatible 'frame-parameter 'frame-property)
152 (defun frame-parameter (frame parameter)
153 "Return FRAME's value for parameter PARAMETER.
154 If FRAME is nil, describe the currently selected frame."
155 (cdr (assq parameter (frame-parameters frame))))
150 156
151 (make-compatible 'modify-frame-parameters 'set-frame-properties) 157 (make-compatible 'modify-frame-parameters 'set-frame-properties)
152 (defun modify-frame-parameters (frame alist) 158 (defun modify-frame-parameters (frame alist)
153 "Modify the properties of frame FRAME according to ALIST. 159 "Modify the properties of frame FRAME according to ALIST.
154 ALIST is an alist of properties to change and their new values. 160 ALIST is an alist of properties to change and their new values.
260 266
261 (define-compatible-function-alias 'interactive-form 267 (define-compatible-function-alias 'interactive-form
262 'function-interactive) ;GNU 21.1 268 'function-interactive) ;GNU 21.1
263 (define-compatible-function-alias 'assq-delete-all 269 (define-compatible-function-alias 'assq-delete-all
264 'remassq) ;GNU 21.1 270 'remassq) ;GNU 21.1
271
272 (defun makehash (&optional test)
273 "Create a new hash table.
274 Optional first argument TEST specifies how to compare keys in the table.
275 Predefined tests are `eq', `eql', and `equal'. Default is `eql'."
276 (make-hash-table :test test))
277 (make-compatible 'makehash 'make-hash-table)
278
279 (defun buffer-local-value (variable buffer)
280 "Return the value of VARIABLE in BUFFER.
281 If VARIABLE does not have a buffer-local binding in BUFFER, the value
282 is the default binding of variable."
283 (symbol-value-in-buffer variable buffer))
284 (make-compatible 'buffer-local-value 'symbol-value-in-buffer)
285
286 (define-compatible-function-alias 'line-beginning-position 'point-at-bol)
287 (define-compatible-function-alias 'line-end-position 'point-at-eol)
265 288
266 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; modeline 289 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; modeline
267 290
268 (define-compatible-function-alias 'redraw-mode-line 'redraw-modeline) 291 (define-compatible-function-alias 'redraw-mode-line 'redraw-modeline)
269 (define-compatible-function-alias 'force-mode-line-update 292 (define-compatible-function-alias 'force-mode-line-update