emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Patch to remove minor modes in tutorial


From: Richard Stallman
Subject: Re: Patch to remove minor modes in tutorial
Date: Sat, 08 Jul 2006 16:57:40 -0400

               ((eq (car value) 'cua-mode)
                (insert "You are using `cua-mode'."

"You have enabled CUA mode" would be clearer.

                        "  If the region is not active then C-c will"
                        " work as it normally does in Emacs."))

Please stick to present tense except when present tense is incorrect.

     Please understand that it is ok to change key bindings, but the
     tutorial may not work correctly. (See also "  )

Change that to

     It is legitimate to change key bindings, but changed bindings 
     do not correspond to what the tutorial says.  (See also "  )


This code

      (let (initial-bad-keys)
        (with-temp-buffer
          (insert-file (locate-library "bindings.el"))
          (let (expr
                key
                def-fun
                def-fun-txt
                rem-fun
                key-fun
                where
                remark
                )
            (while (condition-case err
                       (setq expr (read (current-buffer)))
                     (error nil))
              (cond ((and (eq (nth 0 expr) 'define-key)
                          (eq (nth 1 expr) 'global-map))
                     (setq key (nth 2 expr))
                     (setq def-fun (nth 3 expr)))
                    ((eq (nth 0 expr) 'global-set-key)
                     (setq key (nth 1 expr))
                     (setq def-fun (nth 2 expr)))
                    (t
                     (setq key nil)))
              (when key
                (assert (eq (nth 0 def-fun) 'quote))
                (setq def-fun (nth 1 def-fun))
                (setq def-fun-txt (format "%s" def-fun))
                (setq rem-fun (command-remapping def-fun))
                (setq key-fun (key-binding key))
                (setq where (where-is-internal (if rem-fun rem-fun 
def-fun)))
                (if where
                    (setq where (key-description (car where)))
                  (setq where ""))
                (setq remark nil)
                (unless
                    (cond ( (eq key-fun def-fun)
                ...

is awfully complex, and most of the job it does is irrelevant.  The
tutorial describes a small set of keys, perhaps 40.  I think this code
should not concern itself with keys that the tutorial does not teach.

It should simply have a list of those keys and their standard
bindings.  That way it would not need to read bindings.el.

(Not all the default bindings are in bindings.el, so this code won't
get them all.)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]