diff etc/sample.emacs @ 373:6240c7796c7a r21-2b2

Import from CVS: tag r21-2b2
author cvs
date Mon, 13 Aug 2007 11:04:06 +0200
parents cc15677e0335
children bbff43aa5eb7
line wrap: on
line diff
--- a/etc/sample.emacs	Mon Aug 13 11:03:09 2007 +0200
+++ b/etc/sample.emacs	Mon Aug 13 11:04:06 2007 +0200
@@ -97,13 +97,14 @@
        (setq ispell-extra-args '("-W" "3"))
 
        (cond ((or (not (fboundp 'device-type))
-		  (equal (device-type) 'x))
-	      ;; Code which applies only when running emacs under X goes here.
-	      ;; (We check whether the function `device-type' exists
-	      ;; before using it.  In versions before 19.12, there
-	      ;; was no such function.  If it doesn't exist, we
-	      ;; simply assume we're running under X -- versions before
-	      ;; 19.12 only supported X.)
+		  (equal (device-type) 'x)
+		  (equal (device-type) 'mswindows))
+	      ;; Code which applies only when running emacs under X or
+	      ;; MicroSoft Windows goes here.  (We check whether the
+	      ;; function `device-type' exists before using it.  In
+	      ;; versions before 19.12, there was no such function.
+	      ;; If it doesn't exist, we simply assume we're running
+	      ;; under X -- versions before 19.12 only supported X.)
 
 	      ;; Remove the binding of C-x C-c, which normally exits emacs.
 	      ;; It's easy to hit this by mistake, and that can be annoying.
@@ -153,7 +154,10 @@
 	      ;; standard beep only works with some X servers; many servers
 	      ;; completely ignore those parameters.)
 	      ;;
-	      (cond ((string-match ":0" (getenv "DISPLAY"))
+	      (cond ((or (and (getenv "DISPLAY") 
+			      (string-match ":0" (getenv "DISPLAY")))
+			 (and (eq (console-type) 'mswindows)
+			      (device-sound-enabled-p)))
 		     (load-default-sounds))
 		    (t
 		     (setq bell-volume 40)