]> git.eshelyaron.com Git - emacs.git/commitdiff
(tpu-map-key): Use unless rather than cond.
authorGlenn Morris <rgm@gnu.org>
Wed, 7 Nov 2007 03:46:22 +0000 (03:46 +0000)
committerGlenn Morris <rgm@gnu.org>
Wed, 7 Nov 2007 03:46:22 +0000 (03:46 +0000)
Remove superfluous concats.  Move final set-buffer to non-emacs-specific code.

lisp/ChangeLog
lisp/emulation/tpu-mapper.el

index e74b56f7b414a2df75078bd5deede409c725ff7c..7622873361d6a05c51f229aa6ce6fc0ed34d5a5c 100644 (file)
@@ -1,3 +1,9 @@
+2007-11-07  Glenn Morris  <rgm@gnu.org>
+
+       * emulation/tpu-mapper.el (tpu-map-key): Use unless rather than cond.
+       Remove superfluous concats.  Move final set-buffer to
+       non-emacs-specific code.
+
 2007-11-07  Rob Riepel  <riepel@networking.stanford.edu>
 
        * emulation/tpu-mapper.el (tpu-map-key): Remove un-needed cond branch.
index 8edf963c8dd3479ba9d80700299d1716e89d0fd6..b3ad67ec4df097b0497571762c5f6e5aa3ea9a5a 100644 (file)
   (interactive)
   (if (featurep 'xemacs)
       (progn
-       (setq tpu-key-seq (read-key-sequence (format "Press %s%s: " ident descrip)))
-       (setq tpu-key (concat "[" (format "%s" (event-key (aref tpu-key-seq 0))) "]"))
-       (cond ((not (equal tpu-key tpu-return))
-              (set-buffer "Keys")
-              (insert (format"(global-set-key %s %s)\n" tpu-key func))
-              (set-buffer "Gold-Keys")
-              (insert (format "(define-key GOLD-map %s %s)\n" tpu-key gold-func))
-              (set-buffer "Directions"))))
+       (setq tpu-key-seq (read-key-sequence
+                           (format "Press %s%s: " ident descrip))
+              tpu-key (format "[%s]" (event-key (aref tpu-key-seq 0))))
+       (unless (equal tpu-key tpu-return)
+          (set-buffer "Keys")
+          (insert (format"(global-set-key %s %s)\n" tpu-key func))
+          (set-buffer "Gold-Keys")
+          (insert (format "(define-key GOLD-map %s %s)\n" tpu-key gold-func))))
     (message "Press %s%s: " ident descrip)
-    (setq tpu-key-seq (read-event))
-    (setq tpu-key (concat "[" (format "%s" tpu-key-seq) "]"))
-    (cond ((not (equal tpu-key tpu-return))
-          (set-buffer "Keys")
-          (insert (format"(define-key tpu-global-map %s %s)\n" tpu-key func))
-          (set-buffer "Gold-Keys")
-          (insert (format "(define-key tpu-gold-map %s %s)\n" tpu-key gold-func))
-          (set-buffer "Directions"))))
-    tpu-key)
+    (setq tpu-key-seq (read-event)
+          tpu-key (format "[%s]" tpu-key-seq))
+    (unless (equal tpu-key tpu-return)
+      (set-buffer "Keys")
+      (insert (format"(define-key tpu-global-map %s %s)\n" tpu-key func))
+      (set-buffer "Gold-Keys")
+      (insert (format "(define-key tpu-gold-map %s %s)\n" tpu-key gold-func))))
+  (set-buffer "Directions")
+  tpu-key)
 
 (set-buffer "Keys")
 (insert "