all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kevin Rodgers <ihs_4664@yahoo.com>
Subject: Re: defvars at compile time
Date: Thu, 16 Mar 2006 11:31:29 -0700	[thread overview]
Message-ID: <dvcavc$vdd$1@sea.gmane.org> (raw)
In-Reply-To: <b4mhd5zqq13.fsf@jpl.org>

Katsumi Yamaoka wrote:
>>>>>>In <7035.1142372131@olgas.newt.com> Bill Wohler wrote:
> 
> 
>>Reiner Steib <reinersteib+gmane@imap.cc> wrote:
> 
> 
>>>(let* ((load-path (image-load-path-for-library "mh-e" "mh-logo.xpm"))
>>>       (image-load-path (cons (car load-path)
>>>			      (when (boundp 'image-load-path)
>>>				image-load-path))))
>>>  (mh-tool-bar-folder-buttons-init))
> 
> 
>>How would you fix this, then?
> 
> 
>>    While compiling mh-folder-mode in file
>>    /usr/local/src/mh-e/src/emacs/lisp/mh-e/mh-folder.el:
>>      ** reference to free variable image-load-path
> 
> 
> I usually do this:
> 
>   (when (boundp 'image-load-path)
>     (symbol-value 'image-load-path))

Would using this also quiet the compiler?

(defmacro symbol-value-safe (symbol)
   "Return SYMBOL's value, but avoid signaling an error if it is void.
If SYMBOL is void, return nil."
   (let ((temp-symbol (make-symbol "temp-symbol")))
     `(let ((,temp-symbol ,symbol))
        (if (boundp ,temp-symbol)
            (symbol-value ,temp-symbol)))))

(macroexpand '(symbol-value-safe 'image-load-path))
=>
(let ((temp-symbol (quote image-load-path)))
   (if (boundp temp-symbol) (symbol-value temp-symbol)))

-- 
Kevin Rodgers

  reply	other threads:[~2006-03-16 18:31 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-07  0:18 New GNOME icons Bill Wohler
2006-03-10 23:15 ` Bill Wohler
2006-03-10 23:56 ` Reiner Steib
2006-03-11  1:23   ` Bill Wohler
2006-03-11  1:29   ` Miles Bader
2006-03-11 12:48     ` Reiner Steib
2006-03-11 23:47       ` Miles Bader
2006-03-12  0:38         ` Bill Wohler
2006-03-13 11:52   ` Katsumi Yamaoka
     [not found]     ` <3861.1142268982@olgas.newt.com>
     [not found]       ` <b4mr755zj4i.fsf@jpl.org>
     [not found]         ` <22907.1142318606@olgas.newt.com>
     [not found]           ` <stewtext5sn.fsf@marauder.physik.uni-ulm.de>
     [not found]             ` <3669.1142364565@olgas.newt.com>
     [not found]               ` <v9y7zcrbc1.fsf@marauder.physik.uni-ulm.de>
     [not found]                 ` <7035.1142372131@olgas.newt.com>
     [not found]                   ` <v93bhjrjrd.fsf@marauder.physik.uni-ulm.de>
     [not found]                     ` <28215.1142437339@olgas.newt.com>
     [not found]                       ` <v9irqf1x1t.fsf_-_@marauder.physik.uni-ulm.de>
2006-03-15 22:52                         ` defvars at compile time Katsumi Yamaoka
2006-03-16 18:31                           ` Kevin Rodgers [this message]
2006-03-16 22:27                             ` Johan Bockgård
2006-03-16 22:51                               ` Bill Wohler
2006-03-17  2:44                                 ` Miles Bader
2006-03-17 16:32                                   ` Richard Stallman
2006-03-20  6:31                           ` Stefan Monnier
2006-03-22  1:59                             ` Katsumi Yamaoka
2006-03-22  2:20                               ` Stefan Monnier
2006-03-28  1:41                                 ` Bill Wohler
2006-03-28 19:20                                   ` Stefan Monnier
2006-03-29 23:01                                     ` Richard Stallman
2006-03-28 19:33                                 ` Richard Stallman
  -- strict thread matches above, loose matches on Subject: below --
2005-09-16 10:48 Juanma Barranquero
2005-09-16 11:18 ` David Kastrup
2005-09-16 13:25   ` Juanma Barranquero
2005-09-16 14:59     ` David Kastrup
2005-09-16 15:48     ` Stefan Monnier
2005-09-16 15:51       ` Juanma Barranquero
2005-09-17  4:57 ` 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

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

  git send-email \
    --in-reply-to='dvcavc$vdd$1@sea.gmane.org' \
    --to=ihs_4664@yahoo.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.