all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'Štepán Nemec'" <stepnem@gmail.com>
Cc: emacs-devel@gnu.org
Subject: RE: why does `variable-at-point' return 0?
Date: Thu, 19 Apr 2012 14:28:01 -0700	[thread overview]
Message-ID: <05A4BDB1D4424F9E943751F169635919@us.oracle.com> (raw)
In-Reply-To: <87wr5blcwn.fsf@gmail.com>

> >> What am I missing?
> 
> Dunno if you're missing anything, but you're certainly not 
> the only one wondering. FWIW, for my purposes I've been
> using the function below ever since I discovered `variable-at-point':
> ...
>   (let ((v (variable-at-point)))
>     (unless (eq v 0) v)))

Thanks for confirming that I might not be missing anything.

Maybe Emacs Dev would consider putting this in line with other at-point
functions.

How about deprecating `variable-at-point' and defining a new function
`var-at-point' that DTRT?

(I'm still curious how `variable-at-point' ever got to be defined that way. I
still do wonder if there wasn't perhaps a good reason at the time. I cannot
imagine one, but I've been surprised before.)






  reply	other threads:[~2012-04-19 21:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-07  0:23 why does `variable-at-point' return 0? Drew Adams
2012-04-16 18:07 ` Drew Adams
2012-04-19 19:50   ` Štěpán Němec
2012-04-19 21:28     ` Drew Adams [this message]
2012-04-19 21:52   ` Stefan Monnier
2012-04-19 22:56     ` Juanma Barranquero
2012-04-20 18:14     ` Štěpán Němec
2012-04-20 22:57       ` Juanma Barranquero
2012-04-21  2:24       ` Stefan Monnier

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

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

  git send-email \
    --in-reply-to=05A4BDB1D4424F9E943751F169635919@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    --cc=stepnem@gmail.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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.