[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Excessive documentation for C-h k a
From: |
Richard Stallman |
Subject: |
Re: Excessive documentation for C-h k a |
Date: |
Sun, 14 Mar 2004 23:56:07 -0500 |
Do these patches give correct results in general?
*** subr.el.~1.379.~ Mon Feb 16 16:25:06 2004
--- subr.el Sun Mar 14 12:05:13 2004
***************
*** 645,657 ****
(if (symbolp type)
(cdr (get type 'event-symbol-elements))
(let ((list nil))
! (or (zerop (logand type ?\M-\^@))
(setq list (cons 'meta list)))
! (or (and (zerop (logand type ?\C-\^@))
! (>= (logand type 127) 32))
(setq list (cons 'control list)))
! (or (and (zerop (logand type ?\S-\^@))
! (= (logand type 255) (downcase (logand type 255))))
(setq list (cons 'shift list)))
(or (zerop (logand type ?\H-\^@))
(setq list (cons 'hyper list)))
--- 645,658 ----
(if (symbolp type)
(cdr (get type 'event-symbol-elements))
(let ((list nil))
! (if (not (zerop (logand type ?\M-\^@)))
(setq list (cons 'meta list)))
! (if (or (not (zerop (logand type ?\C-\^@)))
! (and (< type 256)
! (< (logand type 127) 32)))
(setq list (cons 'control list)))
! (if (or (not (zerop (logand type ?\S-\^@)))
! (/= (logand type 255) (downcase (logand type 255))))
(setq list (cons 'shift list)))
(or (zerop (logand type ?\H-\^@))
(setq list (cons 'hyper list)))
*** help-fns.el.~1.36.~ Sat Feb 28 12:39:17 2004
--- help-fns.el Sun Mar 14 12:05:40 2004
***************
*** 297,312 ****
(when (commandp function)
(let* ((remapped (command-remapping function))
(keys (where-is-internal
! (or remapped function) overriding-local-map nil nil)))
(when remapped
(princ "It is remapped to `")
(princ (symbol-name remapped))
(princ "'"))
(when keys
(princ (if remapped " which is bound to " "It is bound to "))
;; FIXME: This list can be very long (f.ex. for self-insert-command).
! (princ (mapconcat 'key-description keys ", ")))
! (when (or remapped keys)
(princ ".")
(terpri))))
(let* ((arglist (help-function-arglist def))
--- 297,327 ----
(when (commandp function)
(let* ((remapped (command-remapping function))
(keys (where-is-internal
! (or remapped function) overriding-local-map nil nil))
! non-modified-keys)
! ;; Which non-control-meta keys run this command?
! (dolist (key keys)
! (if (member (event-modifiers (aref key 0)) '(nil (shift)))
! (push key non-modified-keys)))
(when remapped
(princ "It is remapped to `")
(princ (symbol-name remapped))
(princ "'"))
+
(when keys
(princ (if remapped " which is bound to " "It is bound to "))
;; FIXME: This list can be very long (f.ex. for self-insert-command).
! ;; If there are many, remove them from KEYS.
! (if (< (length non-modified-keys) 10)
! (princ (mapconcat 'key-description keys ", "))
! (dolist (key non-modified-keys)
! (setq keys (delq key keys)))
! (if keys
! (progn
! (princ (mapconcat 'key-description keys ", "))
! (princ ", and many ordinary text characters"))
! (princ "many ordinary text characters"))))
! (when (or remapped keys non-modified-keys)
(princ ".")
(terpri))))
(let* ((arglist (help-function-arglist def))