Gnus development mailing list
 help / color / mirror / Atom feed
* gnus-bookmark-mouse-available-p
@ 2007-10-28 15:49 Reiner Steib
  2008-01-08  2:11 ` gnus-bookmark-mouse-available-p Katsumi Yamaoka
  0 siblings, 1 reply; 2+ messages in thread
From: Reiner Steib @ 2007-10-28 15:49 UTC (permalink / raw)
  To: Bastien Guerry; +Cc: ding

Hi,

in `gnus-bookmark.el':

(defmacro gnus-bookmark-mouse-available-p ()
  "Return non-nil if a mouse is available."
  (if (featurep 'xemacs)
      '(and (eq (device-class) 'color) (device-on-window-system-p))
    '(and (display-color-p) (display-mouse-p))))

Why do you test for display-color-p?
What's the purpose of the quotes before "and".

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: gnus-bookmark-mouse-available-p
  2007-10-28 15:49 gnus-bookmark-mouse-available-p Reiner Steib
@ 2008-01-08  2:11 ` Katsumi Yamaoka
  0 siblings, 0 replies; 2+ messages in thread
From: Katsumi Yamaoka @ 2008-01-08  2:11 UTC (permalink / raw)
  To: Bastien Guerry; +Cc: ding

> P.S.: I didn't receive any reply to ...
>       <http://thread.gmane.org/v93avv5jec.fsf%40marauder.physik.uni-ulm.de>

I noticed right now that the macro you pointed to is what I
introduced.  Sorry for my laziness.

>>>>> Reiner Steib wrote:

> in `gnus-bookmark.el':

> (defmacro gnus-bookmark-mouse-available-p ()
>   "Return non-nil if a mouse is available."
>   (if (featurep 'xemacs)
>       '(and (eq (device-class) 'color) (device-on-window-system-p))
>     '(and (display-color-p) (display-mouse-p))))

> Why do you test for display-color-p?

I don't recall why I used it but now I believe it is useless.
So, I removed it in CVS.

> What's the purpose of the quotes before "and".

Because it is a macro.  In other words, it will be expanded into
the constant nil if the form is not quoted since the byte
compilation is normally done in the batch mode.

emacs -batch -Q -eval '(progn (defmacro x nil (display-mouse-p)) (message "%s" (macroexpand (quote (x)))))'
 => nil

emacs -batch -Q -eval '(progn (defmacro x () (quote (display-mouse-p))) (message "%s" (macroexpand (quote (x)))))'
 => (display-mouse-p)



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-01-08  2:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-28 15:49 gnus-bookmark-mouse-available-p Reiner Steib
2008-01-08  2:11 ` gnus-bookmark-mouse-available-p Katsumi Yamaoka

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 NNTP newsgroup(s).