]> git.eshelyaron.com Git - emacs.git/commitdiff
(set-keymap-parent): Fix bug in case of empty keymap.
authorRichard M. Stallman <rms@gnu.org>
Thu, 17 Nov 1994 16:01:49 +0000 (16:01 +0000)
committerRichard M. Stallman <rms@gnu.org>
Thu, 17 Nov 1994 16:01:49 +0000 (16:01 +0000)
(switch-to-other-buffer): Fix one-off error.

lisp/emacs-lisp/lucid.el

index 3e49309cb4ac1bbeb0adbc41c6fb56bb1b36fe1e..c248348d954f0adc0d81ad88e31b290b4391a98c 100644 (file)
@@ -46,7 +46,7 @@
     tail))
 
 (defun set-keymap-parent (keymap new-parent)
-  (let ((tail (cdr keymap)))
+  (let ((tail keymap))
     (while (and tail (cdr tail) (not (eq (car (cdr tail)) 'keymap)))
       (setq tail (cdr tail)))
     (if tail
@@ -118,7 +118,7 @@ bottom of the buffer stack."
       (bury-buffer (current-buffer)))
   (switch-to-buffer
    (if (<= arg 1) (other-buffer (current-buffer))
-     (nth (1+ arg)
+     (nth arg
          (apply 'nconc
                 (mapcar
                  (lambda (buf)