diff lisp/modes/xpm-mode.el @ 2:ac2d302a0011 r19-15b2

Import from CVS: tag r19-15b2
author cvs
date Mon, 13 Aug 2007 08:46:35 +0200
parents 376386a54a3c
children b82b59fe008d
line wrap: on
line diff
--- a/lisp/modes/xpm-mode.el	Mon Aug 13 08:45:53 2007 +0200
+++ b/lisp/modes/xpm-mode.el	Mon Aug 13 08:46:35 2007 +0200
@@ -118,8 +118,10 @@
 	  (beginning-of-line)))))
   (if (not (eq major-mode 'picture-mode))
       (picture-mode))
-  (set-specifier left-toolbar-width (cons (selected-frame) 16))
-  (set-specifier left-toolbar (cons (current-buffer) xpm-palette))
+  (if (featurep 'toolbar)
+      (progn
+	(set-specifier left-toolbar-width (cons (selected-frame) 16))
+	(set-specifier left-toolbar (cons (current-buffer) xpm-palette))))
   (message "Parsing body...")
   (xpm-color-data)
   (message "Parsing body...done")
@@ -194,17 +196,18 @@
 		  (> (elt ccc 2) 32767))
 	      (set-face-foreground new-face "black")
 	    (set-face-foreground new-face "white"))))
-    (setq xpm-pixel-values (cons (cons str new-face) xpm-pixel-values)
-	  xpm-palette
-	  (cons (vector 
-		 (list (xpm-make-solid-pixmap color 12 12))
-		 ;; Major cool things with quotes.....
-		 (` 
-		  (lambda (event)
-		    (interactive "e")
-		    (xpm-toolbar-select-colour event (, str))))
-		 t
-		 color) xpm-palette))
+    (setq xpm-pixel-values (cons (cons str new-face) xpm-pixel-values))
+    (if (featurep 'toolbar)
+	(setq xpm-palette
+	      (cons (vector 
+		     (list (xpm-make-solid-pixmap color 12 12))
+		     ;; Major cool things with quotes.....
+		     (` 
+		      (lambda (event)
+			(interactive "e")
+			(xpm-toolbar-select-colour event (, str))))
+		     t
+		     color) xpm-palette)))
     ))
 
 (defun xpm-parse-color ()