diff options
| author | Glenn Morris | 2007-11-07 03:46:22 +0000 |
|---|---|---|
| committer | Glenn Morris | 2007-11-07 03:46:22 +0000 |
| commit | c74e901d7f21678f300a1f47be091ff34760a3e2 (patch) | |
| tree | 4cc192aa998bc40e867113d6cb2ba1c842be4e80 | |
| parent | 6ffadbb8c39f7260d5e7e79220b571eda293620f (diff) | |
| download | emacs-c74e901d7f21678f300a1f47be091ff34760a3e2.tar.gz emacs-c74e901d7f21678f300a1f47be091ff34760a3e2.zip | |
(tpu-map-key): Use unless rather than cond.
Remove superfluous concats. Move final set-buffer to non-emacs-specific code.
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/emulation/tpu-mapper.el | 34 |
2 files changed, 23 insertions, 17 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e74b56f7b41..7622873361d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2007-11-07 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * emulation/tpu-mapper.el (tpu-map-key): Use unless rather than cond. | ||
| 4 | Remove superfluous concats. Move final set-buffer to | ||
| 5 | non-emacs-specific code. | ||
| 6 | |||
| 1 | 2007-11-07 Rob Riepel <riepel@networking.stanford.edu> | 7 | 2007-11-07 Rob Riepel <riepel@networking.stanford.edu> |
| 2 | 8 | ||
| 3 | * emulation/tpu-mapper.el (tpu-map-key): Remove un-needed cond branch. | 9 | * emulation/tpu-mapper.el (tpu-map-key): Remove un-needed cond branch. |
diff --git a/lisp/emulation/tpu-mapper.el b/lisp/emulation/tpu-mapper.el index 8edf963c8dd..b3ad67ec4df 100644 --- a/lisp/emulation/tpu-mapper.el +++ b/lisp/emulation/tpu-mapper.el | |||
| @@ -176,24 +176,24 @@ | |||
| 176 | (interactive) | 176 | (interactive) |
| 177 | (if (featurep 'xemacs) | 177 | (if (featurep 'xemacs) |
| 178 | (progn | 178 | (progn |
| 179 | (setq tpu-key-seq (read-key-sequence (format "Press %s%s: " ident descrip))) | 179 | (setq tpu-key-seq (read-key-sequence |
| 180 | (setq tpu-key (concat "[" (format "%s" (event-key (aref tpu-key-seq 0))) "]")) | 180 | (format "Press %s%s: " ident descrip)) |
| 181 | (cond ((not (equal tpu-key tpu-return)) | 181 | tpu-key (format "[%s]" (event-key (aref tpu-key-seq 0)))) |
| 182 | (set-buffer "Keys") | 182 | (unless (equal tpu-key tpu-return) |
| 183 | (insert (format"(global-set-key %s %s)\n" tpu-key func)) | 183 | (set-buffer "Keys") |
| 184 | (set-buffer "Gold-Keys") | 184 | (insert (format"(global-set-key %s %s)\n" tpu-key func)) |
| 185 | (insert (format "(define-key GOLD-map %s %s)\n" tpu-key gold-func)) | 185 | (set-buffer "Gold-Keys") |
| 186 | (set-buffer "Directions")))) | 186 | (insert (format "(define-key GOLD-map %s %s)\n" tpu-key gold-func)))) |
| 187 | (message "Press %s%s: " ident descrip) | 187 | (message "Press %s%s: " ident descrip) |
| 188 | (setq tpu-key-seq (read-event)) | 188 | (setq tpu-key-seq (read-event) |
| 189 | (setq tpu-key (concat "[" (format "%s" tpu-key-seq) "]")) | 189 | tpu-key (format "[%s]" tpu-key-seq)) |
| 190 | (cond ((not (equal tpu-key tpu-return)) | 190 | (unless (equal tpu-key tpu-return) |
| 191 | (set-buffer "Keys") | 191 | (set-buffer "Keys") |
| 192 | (insert (format"(define-key tpu-global-map %s %s)\n" tpu-key func)) | 192 | (insert (format"(define-key tpu-global-map %s %s)\n" tpu-key func)) |
| 193 | (set-buffer "Gold-Keys") | 193 | (set-buffer "Gold-Keys") |
| 194 | (insert (format "(define-key tpu-gold-map %s %s)\n" tpu-key gold-func)) | 194 | (insert (format "(define-key tpu-gold-map %s %s)\n" tpu-key gold-func)))) |
| 195 | (set-buffer "Directions")))) | 195 | (set-buffer "Directions") |
| 196 | tpu-key) | 196 | tpu-key) |
| 197 | 197 | ||
| 198 | (set-buffer "Keys") | 198 | (set-buffer "Keys") |
| 199 | (insert " | 199 | (insert " |