all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Some vc-dispatcher nitpicks
@ 2008-05-16 18:25 Glenn Morris
  2008-05-16 19:55 ` Eric S. Raymond
  0 siblings, 1 reply; 5+ messages in thread
From: Glenn Morris @ 2008-05-16 18:25 UTC (permalink / raw
  To: emacs-devel; +Cc: esr


In toplevel form:
vc-dispatcher.el:768:1:Warning: !! The file uses old-style backquotes !!
This functionality has been obsolete for more than 10 years already
and will be removed soon.  See (elisp)Backquote in the manual.

In vc-at-event:
vc-dispatcher.el:812:16:Warning: Function `gensym' from cl package
called at runtime




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

* Re: Some vc-dispatcher nitpicks
  2008-05-16 18:25 Some vc-dispatcher nitpicks Glenn Morris
@ 2008-05-16 19:55 ` Eric S. Raymond
  2008-05-16 21:11   ` John Paul Wallington
  0 siblings, 1 reply; 5+ messages in thread
From: Eric S. Raymond @ 2008-05-16 19:55 UTC (permalink / raw
  To: Glenn Morris; +Cc: esr, emacs-devel

Glenn Morris <rgm@gnu.org>:
> In toplevel form:
> vc-dispatcher.el:768:1:Warning: !! The file uses old-style backquotes !!
> This functionality has been obsolete for more than 10 years already
> and will be removed soon.  See (elisp)Backquote in the manual.

I think this may be a false positive.  I did look into it; it seems the line
construct triggering the warning is the prefix comma on line 804, which looks
like new-style to me.  Correct me if I'm wrong.
 
> In vc-at-event:
> vc-dispatcher.el:812:16:Warning: Function `gensym' from cl package
> called at runtime

Yeah, that's a real warning that I inherited.  Not sure why it's a problem, though.
-- 
		<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>




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

* Re: Some vc-dispatcher nitpicks
  2008-05-16 19:55 ` Eric S. Raymond
@ 2008-05-16 21:11   ` John Paul Wallington
  2008-05-16 22:08     ` Eric S. Raymond
  0 siblings, 1 reply; 5+ messages in thread
From: John Paul Wallington @ 2008-05-16 21:11 UTC (permalink / raw
  To: esr; +Cc: Glenn Morris, emacs-devel, esr

On 16 May 2008, at 20:55, Eric S. Raymond wrote:

> Glenn Morris <rgm@gnu.org>:
>> In toplevel form:
>> vc-dispatcher.el:768:1:Warning: !! The file uses old-style  
>> backquotes !!
>> This functionality has been obsolete for more than 10 years already
>> and will be removed soon.  See (elisp)Backquote in the manual.
>
> I think this may be a false positive.  I did look into it; it seems  
> the line
> construct triggering the warning is the prefix comma on line 804,  
> which looks
> like new-style to me.  Correct me if I'm wrong.

Yup.  But there's no actual backquote for it to apply to though.

>> In vc-at-event:
>> vc-dispatcher.el:812:16:Warning: Function `gensym' from cl package
>> called at runtime
>
> Yeah, that's a real warning that I inherited.  Not sure why it's a  
> problem, though.

`gensym' is a function rather than a macro and it apparently doesn't  
have a corresponding compiler macro.  Use or loading of cl at runtime  
by packages that are installed in the Emacs sources is verboten.

Is it okay to install the following patch?

2008-05-16  John Paul Wallington  <jpw@pobox.com>

         * vc-dispatcher.el (vc-dir-mode-map): Fix backquote.
         (vc-at-event): Use `make-symbol' instead of `gensym'.

--- vc-dispatcher.el.~1.48.~    2008-05-15 18:00:35.000000000 +0100
+++ vc-dispatcher.el    2008-05-16 21:52:45.000000000 +0100
@@ -798,7 +798,7 @@

      ;; Hook up the menu.
      (define-key map [menu-bar vc-dir-mode]
-      '(menu-item
+      `(menu-item
         ;; This is used so that client modes can add mode-specific
         ;; menu items to vc-dir-menu-map.
         "*vc-dispatcher*" ,vc-dir-menu-map :filter vc-dir-menu-map- 
filter))
@@ -809,7 +809,7 @@
    "Evaluate `body' wich point located at event-start of `event'.
  If `body' uses `event', it should be a variable,
   otherwise it will be evaluated twice."
-  (let ((posn (gensym "vc-at-event-posn")))
+  (let ((posn (make-symbol "vc-at-event-posn")))
      `(let ((,posn (event-start ,event)))
         (save-excursion
           (set-buffer (window-buffer (posn-window ,posn)))





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

* Re: Some vc-dispatcher nitpicks
  2008-05-16 21:11   ` John Paul Wallington
@ 2008-05-16 22:08     ` Eric S. Raymond
  2008-05-17 10:42       ` John Paul Wallington
  0 siblings, 1 reply; 5+ messages in thread
From: Eric S. Raymond @ 2008-05-16 22:08 UTC (permalink / raw
  To: John Paul Wallington; +Cc: Glenn Morris, emacs-devel, esr

John Paul Wallington <jpw@pobox.com>:
> `gensym' is a function rather than a macro and it apparently doesn't  
> have a corresponding compiler macro.  Use or loading of cl at runtime by 
> packages that are installed in the Emacs sources is verboten.

Hmmm...can anyone explain why that is?  It should be docunted somewhere.

> Is it okay to install the following patch?

Yes, that looks good.  Thanks.  It might be possible to remove the eval-compile 
of cl, as well, once you've done this; you'd be doing me a favor if you checked.
-- 
		<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>




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

* Re: Some vc-dispatcher nitpicks
  2008-05-16 22:08     ` Eric S. Raymond
@ 2008-05-17 10:42       ` John Paul Wallington
  0 siblings, 0 replies; 5+ messages in thread
From: John Paul Wallington @ 2008-05-17 10:42 UTC (permalink / raw
  To: esr; +Cc: Glenn Morris, emacs-devel, esr

On 16 May 2008, at 23:08, Eric S. Raymond wrote:

> John Paul Wallington <jpw@pobox.com>:
>> `gensym' is a function rather than a macro and it apparently doesn't
>> have a corresponding compiler macro.  Use or loading of cl at  
>> runtime by
>> packages that are installed in the Emacs sources is verboten.
>
> Hmmm...can anyone explain why that is?  It should be docunted  
> somewhere.

It's policy.  It is documented in the elisp manual; see (elisp) Coding  
Conventions:

    * Please don't require the `cl' package of Common Lisp extensions at
      run time.  Use of this package is optional, and it is not part of
      the standard Emacs namespace.  If your package loads `cl' at run
      time, that could cause name clashes for users who don't use that
      package.

      However, there is no problem with using the `cl' package at
      compile time, with `(eval-when-compile (require 'cl))'.  That's
      sufficient for using the macros in the `cl' package, because the
      compiler expands them before generating the byte-code.

>> Is it okay to install the following patch?
>
> Yes, that looks good.  Thanks.  It might be possible to remove the  
> eval-compile
> of cl, as well, once you've done this; you'd be doing me a favor if  
> you checked.

Checked it.  Doesn't work, though I mistakenly thought it did.  O_o





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

end of thread, other threads:[~2008-05-17 10:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-16 18:25 Some vc-dispatcher nitpicks Glenn Morris
2008-05-16 19:55 ` Eric S. Raymond
2008-05-16 21:11   ` John Paul Wallington
2008-05-16 22:08     ` Eric S. Raymond
2008-05-17 10:42       ` John Paul Wallington

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.