CVS update by aidan xemacs/lisp, map-ynp.el, select.el ...

xemacs-cvs at xemacs.org xemacs-cvs at xemacs.org
Sat Oct 13 10:08:33 EDT 2007


  User: aidan   
  Date: 07/10/13 16:08:33

  Modified:    xemacs/lisp ChangeLog cmdloop.el coding.el faces.el
                        map-ynp.el menubar.el minibuf.el obsolete.el
                        select.el simple.el unicode.el
Log:
Fix the nomule package build; eliminate some non-X compile time warnings.

Revision  Changes    Path
1.849     +44 -0     XEmacs/xemacs/lisp/ChangeLog

Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/ChangeLog,v
retrieving revision 1.848
retrieving revision 1.849
diff -u -p -r1.848 -r1.849
--- ChangeLog	2007/10/07 06:54:59	1.848
+++ ChangeLog	2007/10/13 14:08:26	1.849
@@ -1,3 +1,47 @@
+2007-10-13  Aidan Kehoe  <kehoea at parhasard.net>
+
+	* cmdloop.el (yes-or-no-p):
+	Only call #'yes-or-no-p-dialog-box if it's bound. Eliminates a
+	compile-time warning; should not actually avoid any run-time
+	errors.
+	* coding.el:
+	* coding.el ('automatic-conversion): Removed.
+	On non-Mule builds, alias 'iso-8859-1 to 'no-conversion, not
+	'undecided, since the latter does coding system autorecognition
+	that is useless and leads to stack overflows without Mule. Delete
+	'iso-8859-2 as an alias on non-Mule
+	* faces.el (face-font-instance):
+	Only call get-charset if it's bound. 
+	* faces.el (xpm-color-symbols):
+	Only modify xpm-color-symbols if it's bound. 
+	* map-ynp.el (map-y-or-n-p):
+	Check that #'get-dialog-box-response is bound before calling it. 
+	* menubar.el:
+	List #'menu-split-long-menu as an autoload, for those builds that
+	don't use it at runtime but nonetheless have to compile code that
+	uses it. 
+	* minibuf.el (mouse-read-file-name-1):
+	Only use scrollbar-width if it's bound. 
+	* obsolete.el:
+	Only provide #'add-meu-item, #'add-menu,
+	#'package-get-download-menu if the menubar feature is available at
+	runtime. 
+	* obsolete.el (find-non-ascii-charset-string):
+	Only call #'charset-in-string if it's bound; else give nil. 
+	* obsolete.el (find-non-ascii-charset-region):
+	Only call #'charset-in-region if it's bound; else give nil. 
+	* select.el (activate-region-as-selection):
+	Only call #'mouse-track-rectangle-p if it's bound. 
+	* select.el (select-make-extent-for-selection):
+	Ditto. 
+	* simple.el (zmacs-make-extent-for-region):
+	Only call #'default-mouse-track-next-move-rect if it's bound. 
+	* simple.el (zmacs-activate-region):
+	Use and-boundp rather than (and (boundp ...))) when checking for a
+	variable. 
+	* unicode.el (featurep):
+	Don't bind res, which is not used, in the loop. 
+
 2007-10-06  Stephen J. Turnbull  <stephen at xemacs.org>
 
 	* x-faces.el (x-color-list-internal): Should return a list of



1.24      +4 -1      XEmacs/xemacs/lisp/cmdloop.el

Index: cmdloop.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/cmdloop.el,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -p -r1.23 -r1.24
--- cmdloop.el	2006/11/24 13:45:38	1.23
+++ cmdloop.el	2007/10/13 14:08:28	1.24
@@ -488,7 +488,10 @@ It should end in a space; `yes-or-no-p' 
 The user must confirm the answer with RET,
 and can edit it until it as been confirmed."
   (if (should-use-dialog-box-p)
-      (yes-or-no-p-dialog-box prompt)
+      ;; and-fboundp is redundant, since yes-or-no-p-dialog-box is only
+      ;; bound if (featurep 'dialog). But it eliminates a compile-time
+      ;; warning.
+      (and-fboundp #'yes-or-no-p-dialog-box (yes-or-no-p-dialog-box prompt))
     (yes-or-no-p-minibuf prompt)))
 
 (defun y-or-n-p (prompt)



1.12      +4 -6      XEmacs/xemacs/lisp/coding.el

Index: coding.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/coding.el,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -p -r1.11 -r1.12
--- coding.el	2006/12/29 18:09:42	1.11
+++ coding.el	2007/10/13 14:08:28	1.12
@@ -266,13 +266,11 @@ Does not modify STR.  Returns the encode
 (when (not (featurep 'mule))
   (define-coding-system-alias 'escape-quoted 'binary)
   ;; these are so that gnus and friends work when not mule
-  (define-coding-system-alias 'iso-8859-1 'undecided)
-  (define-coding-system-alias 'iso-8859-2 'undecided)
+  (define-coding-system-alias 'iso-8859-1 'no-conversion)
+  ;; We're misrepresenting ourselves to the gnus code by saying we support
+  ;; both.
+  ; (define-coding-system-alias 'iso-8859-2 'no-conversion)
   (define-coding-system-alias 'ctext 'binary))
-
-
-;; compatibility for old XEmacsen (don't use it)
-(define-coding-system-alias 'automatic-conversion 'undecided)
 
 (make-compatible-variable 'enable-multibyte-characters "Unimplemented")
 



1.41      +28 -24    XEmacs/xemacs/lisp/faces.el

Index: faces.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/faces.el,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -p -r1.40 -r1.41
--- faces.el	2007/04/22 19:58:33	1.40
+++ faces.el	2007/10/13 14:08:29	1.41
@@ -472,7 +472,9 @@ See `face-property-instance' for more in
     (let (matchspec)
       ;; get-charset signals an error if its argument doesn't have an
       ;; associated charset.
-      (setq charset (get-charset charset)
+      (setq charset (if-fboundp #'get-charset
+                        (get-charset charset)
+                      (error 'unimplemented "Charset support not available"))
 	    matchspec (cons charset nil))
       (or (null (setcdr matchspec 'initial))
 	  (face-property-matching-instance 
@@ -2059,29 +2061,31 @@ in that frame; otherwise change each fra
 		     'global)
 
 ;; Define some logical color names to be used when reading the pixmap files.
-(if (featurep 'xpm)
-    (setq xpm-color-symbols
-	  (list
-	   '("foreground" (face-foreground 'default))
-	   '("background" (face-background 'default))
-	   '("backgroundToolBarColor"
-	     (or
-	      (and
-	       (featurep 'x)
-	       (x-get-resource "backgroundToolBarColor"
-			       "BackgroundToolBarColor" 'string
-			       nil nil 'warn))
-
-	      (face-background 'toolbar)))
-	   '("foregroundToolBarColor"
-	     (or
-	      (and
-	       (featurep 'x)
-	       (x-get-resource "foregroundToolBarColor"
-			       "ForegroundToolBarColor" 'string
-			       nil nil 'warn))
-	      (face-foreground 'toolbar)))
-	   )))
+(and-boundp 
+    'xpm-color-symbols
+  (featurep 'xpm)
+  (setq xpm-color-symbols
+        (list
+         '("foreground" (face-foreground 'default))
+         '("background" (face-background 'default))
+         '("backgroundToolBarColor"
+           (or
+            (and
+             (featurep 'x)
+             (x-get-resource "backgroundToolBarColor"
+                             "BackgroundToolBarColor" 'string
+                             nil nil 'warn))
+
+            (face-background 'toolbar)))
+         '("foregroundToolBarColor"
+           (or
+            (and
+            (featurep 'x)
+            (x-get-resource "foregroundToolBarColor"
+                            "ForegroundToolBarColor" 'string
+                            nil nil 'warn))
+            (face-foreground 'toolbar)))
+         )))
 
 (when (featurep 'tty)
   (set-face-highlight-p 'bold                    t 'global '(default tty))



1.6       +5 -3      XEmacs/xemacs/lisp/map-ynp.el

Index: map-ynp.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/map-ynp.el,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -p -r1.5 -r1.6
--- map-ynp.el	2005/05/05 17:10:32	1.5
+++ map-ynp.el	2007/10/13 14:08:29	1.6
@@ -162,9 +162,11 @@ Returns the number of actions taken."
 		   ;; Prompt the user about this object.
 		   (setq quit-flag nil)
 		   (if mouse-event ; XEmacs
-		       (setq def (or (get-dialog-box-response
-				      mouse-event
-				      (cons prompt map))
+		       (setq def (or (and-fboundp 
+                                         #'get-dialog-box-response
+                                         (get-dialog-box-response
+                                          mouse-event
+                                          (cons prompt map)))
 				     'quit))
 		     ;; Prompt in the echo area.
 		     (let ((cursor-in-echo-area (not no-cursor-in-echo-area)))



1.13      +1 -0      XEmacs/xemacs/lisp/menubar.el

Index: menubar.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/menubar.el,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -p -r1.12 -r1.13
--- menubar.el	2005/02/07 19:30:08	1.12
+++ menubar.el	2007/10/13 14:08:29	1.13
@@ -568,6 +568,7 @@ You can also call `submenu-generate-acce
 accelerator specs -- this works even if the specs have already been added."
   (menu-split-long-menu (menu-sort-menu menu)))
 
+;;;###autoload
 (defun menu-split-long-menu (menu)
   "Split MENU according to `menu-max-items' and add accelerator specs.
 If MENU already has accelerator specs, they will be removed and new ones



1.31      +1 -1      XEmacs/xemacs/lisp/minibuf.el

Index: minibuf.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/minibuf.el,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -p -r1.30 -r1.31
--- minibuf.el	2005/10/18 20:49:42	1.30
+++ minibuf.el	2007/10/13 14:08:29	1.31
@@ -2095,7 +2095,7 @@ whether it is a file(/result) or a direc
 		 ;; any more. --ben
 		 (lambda ()
 		   (mouse-rfn-setup-vars prompt)
-		   (when (featurep 'scrollbar)
+		   (when-boundp #'scrollbar-width
 		     (set-specifier scrollbar-width 0 (current-buffer)))
 		   (setq truncate-lines t))))
 	    



1.20      +19 -17    XEmacs/xemacs/lisp/obsolete.el

Index: obsolete.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/obsolete.el,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -p -r1.19 -r1.20
--- obsolete.el	2006/08/11 01:30:23	1.19
+++ obsolete.el	2007/10/13 14:08:29	1.20
@@ -222,22 +222,23 @@ set Info-directory-list.")
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; menu stuff
 
-(defun add-menu-item (menu-path item-name function enabled-p &optional before)
-  "Obsolete.  See the function `add-menu-button'."
-  (or item-name (error "must specify an item name"))
-  (add-menu-button menu-path (vector item-name function enabled-p) before))
-(make-obsolete 'add-menu-item 'add-menu-button)
-
-(defun add-menu (menu-path menu-name menu-items &optional before)
-  "See the function `add-submenu'."
-  (or menu-name (error "must specify a menu name"))
-  (or menu-items (error "must specify some menu items"))
-  (add-submenu menu-path (cons menu-name menu-items) before))
-;; Can't make this obsolete.  easymenu depends on it.
-(make-compatible 'add-menu 'add-submenu)
+(when (featurep 'menubar)
+  (defun add-menu-item (menu-path item-name function enabled-p &optional before)
+    "Obsolete.  See the function `add-menu-button'."
+    (or item-name (error "must specify an item name"))
+    (add-menu-button menu-path (vector item-name function enabled-p) before))
+  (make-obsolete 'add-menu-item 'add-menu-button)
+
+  (defun add-menu (menu-path menu-name menu-items &optional before)
+    "See the function `add-submenu'."
+    (or menu-name (error "must specify a menu name"))
+    (or menu-items (error "must specify some menu items"))
+    (add-submenu menu-path (cons menu-name menu-items) before))
+  ;; Can't make this obsolete.  easymenu depends on it.
+  (make-compatible 'add-menu 'add-submenu)
 
-(define-obsolete-function-alias 'package-get-download-menu 
-  'package-ui-download-menu)
+  (define-obsolete-function-alias 'package-get-download-menu 
+    'package-ui-download-menu))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; minibuffer
 
@@ -345,7 +346,7 @@ It always returns 1 in XEmacs, and in re
   "Return a list of charsets in the STRING except ascii.
 It might be available for compatibility with Mule 2.3,
 because its `find-charset-string' ignores ASCII charset."
-  (delq 'ascii (charsets-in-string string)))
+  (delq 'ascii (and-fboundp #'charsets-in-string (charsets-in-string string))))
 (make-obsolete 'find-non-ascii-charset-string
 	       "use (delq 'ascii (charsets-in-string STRING)) instead.")
 
@@ -353,7 +354,8 @@ because its `find-charset-string' ignore
   "Return a list of charsets except ascii in the region between START and END.
 It might be available for compatibility with Mule 2.3,
 because its `find-charset-string' ignores ASCII charset."
-  (delq 'ascii (charsets-in-region start end)))
+  (delq 'ascii (and-fboundp #'charsets-in-region
+                 (charsets-in-region start end))))
 (make-obsolete 'find-non-ascii-charset-region
 	       "use (delq 'ascii (charsets-in-region START END)) instead.")
 



1.18      +8 -5      XEmacs/xemacs/lisp/select.el

Index: select.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/select.el,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -p -r1.17 -r1.18
--- select.el	2007/06/21 13:39:11	1.17
+++ select.el	2007/10/13 14:08:30	1.18
@@ -276,7 +276,9 @@ primary selection."
 ;; application asserts the selection.  This is probably not a big deal.
 
 (defun activate-region-as-selection ()
-  (cond (mouse-track-rectangle-p (mouse-track-activate-rectangular-selection))
+  (cond ((and-fboundp #'mouse-track-rectangle-p
+           (mouse-track-rectangle-p
+            (mouse-track-activate-rectangular-selection))))
 	((marker-buffer (mark-marker t))
 	 (own-selection (cons (point-marker t) (mark-marker t))))))
 
@@ -346,10 +348,11 @@ primary selection."
 	(set-extent-property previous-extent 'end-open nil)
 
 	(cond
-	 (mouse-track-rectangle-p
-	  (setq previous-extent (list previous-extent))
-	  (default-mouse-track-next-move-rect start end previous-extent)
-	  ))
+	 ((and-fboundp #'mouse-track-rectangle-p 
+            (mouse-track-rectangle-p
+             (setq previous-extent (list previous-extent))
+             (default-mouse-track-next-move-rect start end previous-extent)
+             ))))
 	previous-extent))))
 
 (defun valid-simple-selection-p (data)



1.60      +4 -3      XEmacs/xemacs/lisp/simple.el

Index: simple.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/simple.el,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -p -r1.59 -r1.60
--- simple.el	2007/04/30 16:16:52	1.59
+++ simple.el	2007/10/13 14:08:30	1.60
@@ -3969,7 +3969,8 @@ See the variable `zmacs-regions'.")
       (cond
        (zmacs-region-rectangular-p
 	(setq zmacs-region-extent (list zmacs-region-extent))
-	(default-mouse-track-next-move-rect start end zmacs-region-extent)
+        (when-fboundp #'default-mouse-track-next-move-rect
+          (default-mouse-track-next-move-rect start end zmacs-region-extent))
 	))
 
       zmacs-region-extent)))
@@ -3995,8 +3996,8 @@ Returns t if the region was activated (i
       nil
     (setq zmacs-region-active-p t
 	  zmacs-region-stays t
-	  zmacs-region-rectangular-p (and (boundp 'mouse-track-rectangle-p)
-					  mouse-track-rectangle-p))
+	  zmacs-region-rectangular-p (and-boundp 'mouse-track-rectangle-p
+                                       mouse-track-rectangle-p))
     (if (marker-buffer (mark-marker t))
 	(zmacs-make-extent-for-region (cons (point-marker t) (mark-marker t))))
     (run-hooks 'zmacs-activate-region-hook)



1.26      +0 -1      XEmacs/xemacs/lisp/unicode.el

Index: unicode.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/unicode.el,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -p -r1.25 -r1.26
--- unicode.el	2007/10/03 16:53:39	1.25
+++ unicode.el	2007/10/13 14:08:30	1.26
@@ -538,7 +538,6 @@ invalid octet.  You can use this variabl
     (loop
       for i from ?\x00 to ?\xFF
       with to-check = (make-string 20 ?\x20) 
-      with res = t
       do 
       (delete-region (point-min) (point-max))
       (insert to-check)






More information about the XEmacs-CVS mailing list