all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: Kelly Dean <kelly@prtime.org>
Cc: emacs-devel@gnu.org
Subject: Re: Why is Elisp's defvar weird? And is eval_sub broken?
Date: Thu, 19 Feb 2015 08:23:55 -0500	[thread overview]
Message-ID: <jwvmw4ahw9y.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <Oivy9gjikRJ47TnezL7kVtNLkLKiklzU4JQIw1izzjR@local> (Kelly Dean's message of "Thu, 19 Feb 2015 10:32:27 +0000")

> If they're locally special, then I have to declare them in my code too,
> before I let-bind them so I can call desktop-create-buffer (which barfs if
> I don't), even though I don't use them.

> For my code, see line 942 (and 97 for the macro that generates the declarations) of:
> http://prtime.org/emacs/usablizer.el

> That's no problem, but I wanted to make sure you really do want variables to
> have to be re-declared like that.

Your code is clearly meant to be inside desktop.el, so it's perfectly
normal to have to add various extra declarations to reproduce some
context before calling internal functions.

> This is where I was previously just doing setq (followed by makunbound after
> calling desktop-create-buffer), until I discovered that I can do defvar
> followed by «let».

A general rule is that if you need makunbound you're probably doing
something wrong.


        Stefan



  reply	other threads:[~2015-02-19 13:23 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-12 21:32 Why is Elisp's defvar weird? And is eval_sub broken? Kelly Dean
2015-02-13 19:03 ` Stefan Monnier
2015-02-14  7:35   ` Kelly Dean
2015-02-14 14:36     ` Stefan Monnier
2015-02-15 14:17       ` Daniel Colascione
2015-02-16  5:42       ` Kelly Dean
2015-02-16  7:40         ` Stefan Monnier
2015-02-17 23:39           ` Kelly Dean
2015-02-18 22:29             ` Stefan Monnier
2015-02-19 10:32               ` Kelly Dean
2015-02-19 13:23                 ` Stefan Monnier [this message]
2015-02-20  0:11                   ` Kelly Dean
2015-02-20  2:02                     ` Stefan Monnier
2015-02-22  4:11                       ` Proposal for a closed-buffer tracker Kelly Dean
2015-02-22 15:53                         ` Eli Zaretskii
2015-02-22 22:03                           ` Stefan Monnier
2015-02-22 22:23                             ` Dmitry Gutov
2015-02-23 13:53                               ` Artur Malabarba
2015-02-23 16:44                                 ` Eli Zaretskii
2015-02-22 21:59                         ` Stefan Monnier
2015-02-28 10:15                         ` Artur Malabarba

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=jwvmw4ahw9y.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=kelly@prtime.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 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.