Commits

Anonymous committed c0fd286

Applied Jan Vroonhof's patch from
<199912041725.SAA12267@urysohn.math.ethz.ch>
with subject "Correct patch for passwd.el".

  • Participants
  • Parent commits 6826e67
  • Tags sumo-1999-12-09, sumo-1999-12-11

Comments (0)

Files changed (2)

+1999-12-04  Jan Vroonhof  <vroonhof@math.ethz.ch>
+
+	* passwd.el (passwd-secure-display): Fix missing (lambda line. Don't
+	use single condition cond for clarity.
+	(passwd-insecure-display): ditto.
+
 1999-12-05  Andreas Jaeger  <aj@suse.de>
 
 	* debug.el (debug): Replace obsolete allocate-event with
 (defvar passwd-face-data nil)
 (defun passwd-secure-display ()
   ;; Inverts the screen - used to indicate secure input, like xterm.
-  (cond
-   (passwd-invert-frame-when-keyboard-grabbed
+  (when passwd-invert-frame-when-keyboard-grabbed
     (setq passwd-face-data
-	  (delq nil (mapcar (function
-			     (let ((fg (face-foreground-instance 
-					face (selected-frame) nil 
-					'no-fallback))
-				   (bg (face-background-instance
-					face (selected-frame) nil
-					'no-fallback)))
-			       (if (and fg bg)
-				   (list face fg bg)
-				 nil))))
-		(face-list)
-		)))
+	  (delq nil (mapcar
+		     (lambda (face)
+		       (let ((fg (face-foreground-instance 
+				  face (selected-frame) nil 
+				  'no-fallback))
+			     (bg (face-background-instance
+				  face (selected-frame) nil
+				  'no-fallback)))
+			 (if (and fg bg)
+			     (list face fg bg)
+			   nil)))
+		     (face-list))))
     (let ((rest passwd-face-data))
       (while rest
 	(set-face-foreground (nth 0 (car rest)) (nth 2 (car rest)) (selected-frame))
 	(set-face-background (nth 0 (car rest)) (nth 1 (car rest)) (selected-frame))
 	(setq rest (cdr rest))))))
-  nil)
 
 (defun passwd-insecure-display ()
   ;; Undoes the effect of `passwd-secure-display'.
-  (cond
-   (passwd-invert-frame-when-keyboard-grabbed
+  (when passwd-invert-frame-when-keyboard-grabbed
     (while passwd-face-data
       (set-face-foreground (nth 0 (car passwd-face-data))
 			   (nth 1 (car passwd-face-data)) (selected-frame))
       (set-face-background (nth 0 (car passwd-face-data))
 			   (nth 2 (car passwd-face-data)) (selected-frame))
-      (setq passwd-face-data (cdr passwd-face-data)))
-    nil)))
+      (setq passwd-face-data (cdr passwd-face-data)))))
 
 (defun passwd-grab-keyboard ()
   (cond ((not (and (fboundp 'x-grab-keyboard) ; lemacs 19.10+