emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Some vc-dispatcher nitpicks


From: John Paul Wallington
Subject: Re: Some vc-dispatcher nitpicks
Date: Fri, 16 May 2008 22:11:26 +0100

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

Glenn Morris <address@hidden>:
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  <address@hidden>

        * 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)))





reply via email to

[Prev in Thread] Current Thread [Next in Thread]