unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
Subject: RE: Defaults for set-variable
Date: Mon, 31 Oct 2005 11:22:59 -0800	[thread overview]
Message-ID: <DNEMKBNJBGPAOPIJOOICEEDICOAA.drew.adams@oracle.com> (raw)
In-Reply-To: <87br1o5f6s.fsf@jurta.org>

    I want to fix a bug in `set-variable' related to its default values.
    It uses `read-variable' to read the name of a user variable
    (a variable for which `user-variable-p' returns non-nil).
    But there is one case where `set-variable' doesn't follow this
    requirement: when a non-user variable name happens to be under point,
    it picks it up from the buffer as a default value, and if the user
    types RET, it accepts a non-user variable as a variable name argument
    of `set-variable'.  The first hunk in the following patch fixes this
    by testing the name of the default variable by `user-variable-p'.

The behavior before the fix was inconsistent, but it was sometimes useful (a
"feature"?). The fix makes sense, but it's too bad to lose a command that
sets a non user-option variable. (One could even use completion to get the
variable name: `C-h v foo TAB RET'; `M-x set-variable RET RET'.)

It's convenient to have a command to do this, as a shortcut for M-: `(setq
...)' - with `C-u' local option and no eval of value.  Any chance of having
a separate command, which works for any variable?

What's a bit unfortunate is that the name `set-variable' is already taken
(it really means `set-user-option').  `set-any-variable'?

  parent reply	other threads:[~2005-10-31 19:22 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-17 15:35 Defaults for set-variable Juri Linkov
2005-10-17 21:58 ` Richard M. Stallman
2005-10-19 15:43   ` Juri Linkov
2005-10-20  4:54     ` Richard M. Stallman
2005-10-31 19:22 ` Drew Adams [this message]
2005-10-31 21:20   ` Miles Bader
2005-10-31 22:15     ` Drew Adams
2005-10-31 23:17       ` Miles Bader
2005-11-01  0:49         ` Drew Adams
2005-11-01  2:00           ` Miles Bader
2005-11-01 11:29         ` Kim F. Storm
2005-11-01  9:15   ` Juri Linkov
2005-11-01 13:35     ` David Kastrup
2005-11-01 14:05       ` Miles Bader
2005-11-02 10:27     ` Richard M. Stallman
2005-11-02 16:22       ` Drew Adams
2005-11-02 20:41         ` Sascha Wilde
2005-11-03  7:52           ` Juri Linkov
2005-11-03  8:53             ` Sascha Wilde
2005-11-03 16:08               ` Drew Adams
2005-11-04  1:46                 ` Miles Bader
2005-11-04 12:07                   ` Juri Linkov
2005-11-04 12:35                     ` David Kastrup
2005-11-05  9:44                       ` Juri Linkov
2005-11-08 19:45                         ` Kevin Rodgers
2005-11-08 22:05                           ` Drew Adams
2005-11-09  9:34                             ` Juri Linkov
2005-11-09 13:17                               ` Kim F. Storm
2005-11-09 17:54                                 ` Juri Linkov
2005-11-10  2:09                               ` Richard M. Stallman
2005-11-03 13:51         ` Richard M. 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=DNEMKBNJBGPAOPIJOOICEEDICOAA.drew.adams@oracle.com \
    --to=drew.adams@oracle.com \
    /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).