emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r105404: Turn some defsubsts into def


From: martin rudalics
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r105404: Turn some defsubsts into defuns and revert part of last switch-to-buffer fix.
Date: Fri, 05 Aug 2011 08:23:23 +0200
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 105404
committer: martin rudalics <address@hidden>
branch nick: trunk
timestamp: Fri 2011-08-05 08:23:23 +0200
message:
  Turn some defsubsts into defuns and revert part of last switch-to-buffer fix.
  
  * window.el (display-buffer-same-window)
  (display-buffer-same-frame, display-buffer-other-window)
  (pop-to-buffer-same-window, pop-to-buffer-same-frame)
  (pop-to-buffer-other-window)
  (pop-to-buffer-same-frame-other-window)
  (pop-to-buffer-other-frame): Make them defuns.
  (switch-to-buffer): Don't set LABEL argument of pop-to-buffer.
modified:
  lisp/ChangeLog
  lisp/window.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2011-08-03 21:40:06 +0000
+++ b/lisp/ChangeLog    2011-08-05 06:23:23 +0000
@@ -1,3 +1,13 @@
+2011-08-05  Martin Rudalics  <address@hidden>
+
+       * window.el (display-buffer-same-window)
+       (display-buffer-same-frame, display-buffer-other-window)
+       (pop-to-buffer-same-window, pop-to-buffer-same-frame)
+       (pop-to-buffer-other-window)
+       (pop-to-buffer-same-frame-other-window)
+       (pop-to-buffer-other-frame): Make them defuns.
+       (switch-to-buffer): Don't set LABEL argument of pop-to-buffer.
+
 2011-08-03  Stefan Monnier  <address@hidden>
 
        * subr.el (make-composed-keymap): Move from C.  Change calling

=== modified file 'lisp/window.el'
--- a/lisp/window.el    2011-08-01 18:10:58 +0000
+++ b/lisp/window.el    2011-08-05 06:23:23 +0000
@@ -5796,7 +5796,7 @@
          ;; regardless of graphic-only restrictions.
          (display-buffer-pop-up-frame buffer)))))
 
-(defsubst display-buffer-same-window (&optional buffer-or-name label)
+(defun display-buffer-same-window (&optional buffer-or-name label)
   "Display buffer specified by BUFFER-OR-NAME in the selected window.
 Another window will be used only if the buffer can't be shown in
 the selected window, usually because it is dedicated to another
@@ -5805,7 +5805,7 @@
   (interactive "BDisplay buffer in same window:\nP")
   (display-buffer buffer-or-name 'same-window label))
 
-(defsubst display-buffer-same-frame (&optional buffer-or-name label)
+(defun display-buffer-same-frame (&optional buffer-or-name label)
   "Display buffer specified by BUFFER-OR-NAME in a window on the same frame.
 Another frame will be used only if there is no other choice.
 Optional argument BUFFER-OR-NAME and LABEL are as for
@@ -5813,7 +5813,7 @@
   (interactive "BDisplay buffer on same frame:\nP")
   (display-buffer buffer-or-name 'same-frame label))
 
-(defsubst display-buffer-other-window (&optional buffer-or-name label)
+(defun display-buffer-other-window (&optional buffer-or-name label)
   "Display buffer specified by BUFFER-OR-NAME in another window.
 The selected window will be used only if there is no other
 choice.  Windows on the selected frame are preferred to windows
@@ -5887,7 +5887,7 @@
       (select-frame-set-input-focus new-frame norecord))
     buffer))
 
-(defsubst pop-to-buffer-same-window (&optional buffer-or-name norecord label)
+(defun pop-to-buffer-same-window (&optional buffer-or-name norecord label)
   "Pop to buffer specified by BUFFER-OR-NAME in the selected window.
 Another window will be used only if the buffer can't be shown in
 the selected window, usually because it is dedicated to another
@@ -5896,7 +5896,7 @@
   (interactive "BPop to buffer in selected window:\nP")
   (pop-to-buffer buffer-or-name 'same-window norecord label))
 
-(defsubst pop-to-buffer-same-frame (&optional buffer-or-name norecord label)
+(defun pop-to-buffer-same-frame (&optional buffer-or-name norecord label)
   "Pop to buffer specified by BUFFER-OR-NAME in a window on the selected frame.
 Another frame will be used only if there is no other choice.
 Optional arguments BUFFER-OR-NAME, NORECORD and LABEL are as for
@@ -5904,7 +5904,7 @@
   (interactive "BPop to buffer on same frame:\nP")
   (pop-to-buffer buffer-or-name 'same-frame norecord label))
 
-(defsubst pop-to-buffer-other-window (&optional buffer-or-name norecord label)
+(defun pop-to-buffer-other-window (&optional buffer-or-name norecord label)
   "Pop to buffer specified by BUFFER-OR-NAME in another window.
 The selected window will be used only if there is no other
 choice.  Windows on the selected frame are preferred to windows
@@ -5913,7 +5913,7 @@
   (interactive "BPop to buffer in another window:\nP")
   (pop-to-buffer buffer-or-name 'other-window norecord))
 
-(defsubst pop-to-buffer-same-frame-other-window (&optional buffer-or-name 
norecord label)
+(defun pop-to-buffer-same-frame-other-window (&optional buffer-or-name 
norecord label)
   "Pop to buffer specified by BUFFER-OR-NAME in another window on the selected 
frame.
 The selected window or another frame will be used only if there
 is no other choice.  Optional arguments BUFFER-OR-NAME, NORECORD
@@ -5921,7 +5921,7 @@
   (interactive "BPop to buffer in another window on same frame:\nP")
   (pop-to-buffer buffer-or-name 'same-frame-other-window norecord label))
 
-(defsubst pop-to-buffer-other-frame (&optional buffer-or-name norecord label)
+(defun pop-to-buffer-other-frame (&optional buffer-or-name norecord label)
   "Pop to buffer specified by BUFFER-OR-NAME on another frame.
 The selected frame will be used only if there's no other choice.
 Optional arguments BUFFER-OR-NAME, NORECORD and LABEL are as for
@@ -5994,8 +5994,7 @@
   (let ((buffer (window-normalize-buffer-to-switch-to buffer-or-name)))
     (if (null force-same-window)
        (pop-to-buffer
-        buffer '(same-window (reuse-window-dedicated . weak))
-        norecord 'switch-to-buffer)
+        buffer '(same-window (reuse-window-dedicated . weak)) norecord)
       (cond
        ;; Don't call set-window-buffer if it's not needed since it
        ;; might signal an error (e.g. if the window is dedicated).
@@ -6005,6 +6004,7 @@
        ((eq (window-dedicated-p) t)
        (error "Cannot switch buffers in a dedicated window"))
        (t (set-window-buffer nil buffer)))
+
       (unless norecord
        (select-window (selected-window)))
       (set-buffer buffer))))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]