diff lisp/startup.el @ 110914:ccdc694ce7bd

More cleanups and minor fixes for Customize. * cus-edit.el (custom-face-edit-fix-value): Use custom-fix-face-spec. * custom.el (custom-push-theme): Cleanup (use cond). (disable-theme): Recompute the saved-face property. (custom-theme-recalc-face): Follow face alias before setting prop. * custom.el (custom-fix-face-spec): New function; code moved from custom-face-edit-fix-value. (custom-push-theme): Use it when checking if a face has been changed outside customize. (custom-available-themes): New function. (load-theme): Use it. * image.el (image-checkbox-checked, image-checkbox-unchecked): New variables, containing checkbox images. * startup.el (fancy-startup-tail): * wid-edit.el (checkbox): Use them.
author Chong Yidong <cyd@stupidchicken.com>
date Mon, 11 Oct 2010 00:49:59 -0400
parents 280c8ae2476d
children 3b987881726e
line wrap: on
line diff
--- a/lisp/startup.el	Sun Oct 10 18:57:48 2010 -0700
+++ b/lisp/startup.el	Mon Oct 11 00:49:59 2010 -0400
@@ -1563,23 +1563,21 @@
 		 (kill-buffer "*GNU Emacs*")))
        "  ")
       (when (or user-init-file custom-file)
-	(let ((checked (create-image "\300\300\141\143\067\076\034\030"
-				     'xbm t :width 8 :height 8 :background "grey75"
-				     :foreground "black" :relief -2 :ascent 'center))
-	      (unchecked (create-image (make-string 8 0)
-				       'xbm t :width 8 :height 8 :background "grey75"
-				       :foreground "black" :relief -2 :ascent 'center)))
-	  (insert-button
-	   " " :on-glyph checked :off-glyph unchecked 'checked nil
-	   'display unchecked 'follow-link t
-	   'action (lambda (button)
-		     (if (overlay-get button 'checked)
-			 (progn (overlay-put button 'checked nil)
-				(overlay-put button 'display (overlay-get button :off-glyph))
-				(setq startup-screen-inhibit-startup-screen nil))
-		       (overlay-put button 'checked t)
-		       (overlay-put button 'display (overlay-get button :on-glyph))
-		       (setq startup-screen-inhibit-startup-screen t)))))
+	(insert-button
+	 " "
+	 :on-glyph image-checkbox-checked
+	 :off-glyph image-checkbox-unchecked
+	 'checked nil 'display image-checkbox-unchecked 'follow-link t
+	 'action (lambda (button)
+		   (if (overlay-get button 'checked)
+		       (progn (overlay-put button 'checked nil)
+			      (overlay-put button 'display
+					   (overlay-get button :off-glyph))
+			      (setq startup-screen-inhibit-startup-screen nil))
+		     (overlay-put button 'checked t)
+		     (overlay-put button 'display
+				  (overlay-get button :on-glyph))
+		     (setq startup-screen-inhibit-startup-screen t))))
 	(fancy-splash-insert :face '(variable-pitch (:height 0.9))
 			     " Never show it again.")))))