unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Richard Stallman <rms@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Patch to remove minor modes in tutorial
Date: Sat, 08 Jul 2006 16:57:40 -0400	[thread overview]
Message-ID: <E1FzJrw-0001nc-7w@fencepost.gnu.org> (raw)
In-Reply-To: <44ADA45D.8080406@student.lu.se> (message from Lennart Borgman on Fri, 07 Jul 2006 02:01:33 +0200)

	       ((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.)

  parent reply	other threads:[~2006-07-08 20:57 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-24 14:09 Patch to remove minor modes in tutorial Lennart Borgman
2006-06-25 15:34 ` Richard Stallman
2006-06-25 21:27   ` Lennart Borgman
2006-06-26 11:33     ` Richard Stallman
2006-06-26 13:48       ` Lennart Borgman
2006-06-26 16:31         ` Kevin Rodgers
2006-06-26 16:45           ` Lennart Borgman
2006-06-27 15:44             ` Kevin Rodgers
2006-06-27 16:41               ` Lennart Borgman
2006-06-28 17:25               ` Richard Stallman
2006-06-29  8:41                 ` Kim F. Storm
2006-06-29 12:07                   ` Mathias Dahl
2006-06-29 12:27                     ` David Kastrup
2006-06-30 11:06                       ` Richard Stallman
2006-06-29 17:57                   ` Richard Stallman
2006-07-01  0:38                     ` Lennart Borgman
2006-07-01 23:55                       ` Richard Stallman
2006-07-02  8:54                         ` Lennart Borgman
2006-07-02 22:30                           ` Richard Stallman
2006-07-07  0:01                             ` Lennart Borgman
2006-07-07 19:31                               ` Richard Stallman
2006-07-08  3:14                               ` Giorgos Keramidas
2006-07-08 20:57                               ` Richard Stallman [this message]
2006-07-09  8:44                                 ` Lennart Borgman
2006-07-17 16:12                                 ` Lennart Borgman
2006-07-17 17:32                                   ` Lennart Borgman
2006-07-24 14:42                                     ` Richard Stallman
2006-07-30 20:38                                       ` Lennart Borgman
2006-06-27 16:14         ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1FzJrw-0001nc-7w@fencepost.gnu.org \
    --to=rms@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).