emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: Warnings during compilation


From: Stefan Monnier
Subject: Re: Warnings during compilation
Date: Wed, 16 Nov 2005 17:44:44 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

>     Wouldn't the patch below be preferable?
>           Stefan


>     --- printing.el   24 sep 2005 13:32:37 -0400      1.34
>     +++ printing.el   15 nov 2005 23:35:32 -0500      
>     @@ -1027,6 +1027,7 @@

>      (require 'lpr)
>      (require 'ps-print)
>     +(eval-when-compile (require 'easymenu)) ;For easy-menu-intern's inlining.

> Maybe, but I am not sure.  It has the effect of forcing loading
> of easymenu.

> Does execution of printing.el require loading of easymenu, now?
> I suspect it does--since why else call easy-menu-intern.
> If so, your change is fine.

I've installed the patch below instead.  It just felt like TRT.


        Stefan


Index: lisp/printing.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/printing.el,v
retrieving revision 1.34
diff -u -r1.34 printing.el
--- lisp/printing.el    24 Sep 2005 13:44:01 -0000      1.34
+++ lisp/printing.el    16 Nov 2005 22:43:21 -0000
@@ -1042,12 +1042,6 @@
 ;; To avoid compilation gripes
 
 
-(or (fboundp 'easy-menu-intern)                ; hacked from easymenu.el
-    (defsubst easy-menu-intern (s)
-      (if (stringp s) (intern s) s)))
-
-
-
 (or (fboundp 'subst-char-in-string)    ; hacked from subr.el
     (defun subst-char-in-string (fromchar tochar string &optional inplace)
       "Replace FROMCHAR with TOCHAR in STRING each time it occurs.
@@ -2803,8 +2797,10 @@
   (and pr-print-using-ghostscript (not pr-spool-p)))
 
 
-(defun pr-get-symbol (name)
-  (easy-menu-intern name))
+(defalias 'pr-get-symbol
+  (if (fboundp 'easy-menu-intern)
+      'easy-menu-intern
+    (lambda (s) (if (stringp s) (intern s) s))))
 
 (cond
  ((featurep 'xemacs)                   ; XEmacs




reply via email to

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