]> code.delx.au - gnu-emacs/blobdiff - lisp/bindings.el
(set-register): Use push.
[gnu-emacs] / lisp / bindings.el
index ab606fa9cc4b7209eaf00ff47aefa3e037167cb3..a9da9333f010842d14b51620774ec048ccdb7064 100644 (file)
@@ -248,15 +248,17 @@ Keymap to display on major and minor modes.")
      'mode-line-frame-identification
      'mode-line-buffer-identification
      (propertize "   " 'help-echo help-echo)
-     'global-mode-string
+     'mode-line-position
+     '(vc-mode vc-mode)
+     (propertize "   " 'help-echo help-echo)
      'mode-line-modes
      `(which-func-mode ("" which-func-format ,dashes))
-     'mode-line-position
+     `(global-mode-string (,dashes global-mode-string))
      (propertize "-%-" 'help-echo help-echo)))
 
   (setq-default mode-line-modes
     (list
-     (propertize "   %[(" 'help-echo help-echo)
+     (propertize "%[(" 'help-echo help-echo)
      `(:propertize ("" mode-name mode-line-process minor-mode-alist)
                   help-echo "mouse-3: minor mode menu"
                   local-map ,mode-line-minor-mode-keymap)
@@ -266,9 +268,13 @@ Keymap to display on major and minor modes.")
      (propertize ")%]--" 'help-echo help-echo)))
 
   (setq-default mode-line-position
-    `((line-number-mode (,(propertize "L%l" 'help-echo help-echo) ,dashes))
-      (column-number-mode (,(propertize "C%c" 'help-echo help-echo) ,dashes))
-      (-3 . ,(propertize "%p" 'help-echo help-echo)))))
+    `((-3 . ,(propertize "%p" 'help-echo help-echo))
+      (line-number-mode 
+       ((column-number-mode
+        (10 ,(propertize " (%l,%c)" 'help-echo help-echo))
+        (6 ,(propertize " L%l" 'help-echo help-echo))))
+       ((column-number-mode
+        (5 ,(propertize " C%c" 'help-echo help-echo))))))))
 
 (defvar mode-line-buffer-identification-keymap nil "\
 Keymap for what is displayed by `mode-line-buffer-identification'.")
@@ -277,24 +283,24 @@ Keymap for what is displayed by `mode-line-buffer-identification'.")
 Return the last non-hidden buffer in the buffer list."
   ;; This logic is more or less copied from bury-buffer,
   ;; except that we reverse the buffer list.
-  (let ((fbl  (frame-parameter 'buffer-list))
-       (list (buffer-list))
+  (let ((list (nreverse (buffer-list (selected-frame))))
        (pred (frame-parameter nil 'buffer-predicate))
        found notsogood)
-    ;; Merge the frame buffer list with the whole buffer list,
-    ;; and reverse it.
-    (dolist (buffer fbl)
-      (setq list (delq buffer list)))
-    (setq list (nreverse (append fbl list)))
-    (while (not found)
+    (while (and list (not found))
       (unless (or (eq (aref (buffer-name (car list)) 0) ? )
                  ;; If the selected frame has a buffer_predicate,
                  ;; disregard buffers that don't fit the predicate.
                  (and pred (not (funcall pred (car list)))))
        (if (get-buffer-window (car list) 'visible)
-           (unless notsogood (setq notsogood (car list)))
-         (setq found (car list)))))
-    (or found notsogood)))
+           (or notsogood (eq (car list) (current-buffer)))
+         (setq found (car list))))
+      (pop list))
+    (or found notsogood
+       (get-buffer "*scratch*")
+       (progn
+         (set-buffer-major-mode
+          (get-buffer-create "*scratch*"))
+         (get-buffer "*scratch*")))))
 
 (defun unbury-buffer () "\
 Switch to the last buffer in the buffer list."
@@ -581,10 +587,6 @@ language you are using."
 
 (make-variable-buffer-local 'minor-mode-overriding-map-alist)
 
-;; From macros.c
-(define-key ctl-x-map "(" 'start-kbd-macro)
-(define-key ctl-x-map ")" 'end-kbd-macro)
-(define-key ctl-x-map "e" 'call-last-kbd-macro)
 ;; From frame.c
 (global-set-key [switch-frame] 'handle-switch-frame)
 (global-set-key [delete-frame] 'handle-delete-frame)