comparison lisp/subr.el @ 62524:b54077faa74a

(event-basic-type): Don't get an error. (left-fringe-p): Function deleted.
author Richard M. Stallman <rms@gnu.org>
date Thu, 19 May 2005 15:43:48 +0000
parents 50ba01c61e5c
children 3f80c5cf6771
comparison
equal deleted inserted replaced
62523:a463c8c59947 62524:b54077faa74a
601 in the current Emacs session, then this function may return nil." 601 in the current Emacs session, then this function may return nil."
602 (if (consp event) 602 (if (consp event)
603 (setq event (car event))) 603 (setq event (car event)))
604 (if (symbolp event) 604 (if (symbolp event)
605 (car (get event 'event-symbol-elements)) 605 (car (get event 'event-symbol-elements))
606 (let ((base (logand event (1- ?\A-\^@)))) 606 (let* ((base (logand event (1- ?\A-\^@)))
607 (downcase (if (< base 32) (logior base 64) base))))) 607 (uncontrolled (if (< base 32) (logior base 64) base)))
608 ;; There are some numbers that are invalid characters and
609 ;; cause `downcase' to get an error.
610 (condition-case ()
611 (downcase uncontrolled)
612 (error uncontrolled)))))
608 613
609 (defsubst mouse-movement-p (object) 614 (defsubst mouse-movement-p (object)
610 "Return non-nil if OBJECT is a mouse movement event." 615 "Return non-nil if OBJECT is a mouse movement event."
611 (eq (car-safe object) 'mouse-movement)) 616 (eq (car-safe object) 'mouse-movement))
612 617
2287 Any list whose car is `frame-configuration' is assumed to be a frame 2292 Any list whose car is `frame-configuration' is assumed to be a frame
2288 configuration." 2293 configuration."
2289 (and (consp object) 2294 (and (consp object)
2290 (eq (car object) 'frame-configuration))) 2295 (eq (car object) 'frame-configuration)))
2291 2296
2292 (defsubst left-fringe-p ()
2293 (equal (car (window-fringes)) 0))
2294
2295 (defun functionp (object) 2297 (defun functionp (object)
2296 "Non-nil if OBJECT is any kind of function or a special form. 2298 "Non-nil if OBJECT is any kind of function or a special form.
2297 Also non-nil if OBJECT is a symbol and its function definition is 2299 Also non-nil if OBJECT is a symbol and its function definition is
2298 \(recursively) a function or special form. This does not include 2300 \(recursively) a function or special form. This does not include
2299 macros." 2301 macros."