emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r105783: Make the user customizable d


From: Chong Yidong
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r105783: Make the user customizable display-buffer variable empty by default.
Date: Thu, 15 Sep 2011 11:12:15 -0400
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 105783
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Thu 2011-09-15 11:12:15 -0400
message:
  Make the user customizable display-buffer variable empty by default.
  
  * lisp/window.el (display-buffer-base-action): Rename from
  display-buffer-default-action.  Make default value empty.
  (display-buffer-overriding-action): Convert to defvar.
  (display-buffer-fallback-action): New var.
modified:
  lisp/ChangeLog
  lisp/window.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2011-09-15 02:05:17 +0000
+++ b/lisp/ChangeLog    2011-09-15 15:12:15 +0000
@@ -1,5 +1,12 @@
 2011-09-15  Chong Yidong  <address@hidden>
 
+       * window.el (display-buffer-base-action): Rename from
+       display-buffer-default-action.  Make default value empty.
+       (display-buffer-overriding-action): Convert to defvar.
+       (display-buffer-fallback-action): New var.
+
+2011-09-15  Chong Yidong  <address@hidden>
+
        * emacs-lisp/package.el (package-alist): Fix risky-local-variable
        declaration.
        (package--add-to-archive-contents): If there is a duplicate entry

=== modified file 'lisp/window.el'
--- a/lisp/window.el    2011-09-14 09:17:30 +0000
+++ b/lisp/window.el    2011-09-15 15:12:15 +0000
@@ -4465,6 +4465,14 @@
                :value-type (sexp :tag "Value")))
   "Custom type for `display-buffer' actions.")
 
+(defvar display-buffer-overriding-action '(nil . nil)
+  "Overriding action to perform to display a buffer.
+It should be a cons cell (FUNCTION . ALIST), where FUNCTION is a
+function or a list of functions.  Each function should accept 2
+arguments: a buffer to display and an alist similar to ALIST.
+See `display-buffer' for details.")
+(put 'display-buffer-overriding-action 'risky-local-variable t)
+
 (defcustom display-buffer-alist nil
   "Alist of conditional actions for `display-buffer'.
 This is a list of elements (CONDITION . ACTION), where:
@@ -4485,7 +4493,18 @@
   :version "24.1"
   :group 'windows)
 
-(defcustom display-buffer-default-action
+(defcustom display-buffer-base-action '(nil . nil)
+  "User-specified default action for `display-buffer'.
+It should be a cons cell (FUNCTION . ALIST), where FUNCTION is a
+function or a list of functions.  Each function should accept 2
+arguments: a buffer to display and an alist similar to ALIST.
+See `display-buffer' for details."
+  :type display-buffer--action-custom-type
+  :risky t
+  :version "24.1"
+  :group 'windows)
+
+(defconst display-buffer-fallback-action
   '((display-buffer--maybe-same-window
      display-buffer-reuse-window
      display-buffer--special
@@ -4493,26 +4512,11 @@
      display-buffer-use-some-window
      ;; If all else fails, pop up a new frame.
      display-buffer-pop-up-frame))
-  "List of default actions for `display-buffer'.
-It should be a cons cell (FUNCTION . ALIST), where FUNCTION is a
-function or a list of functions.  Each function should accept 2
-arguments: a buffer to display and an alist similar to ALIST.
-See `display-buffer' for details."
-  :type display-buffer--action-custom-type
-  :risky t
-  :version "24.1"
-  :group 'windows)
-
-(defcustom display-buffer-overriding-action '(nil . nil)
-  "Overriding action to perform to display a buffer.
-It should be a cons cell (FUNCTION . ALIST), where FUNCTION is a
-function or a list of functions.  Each function should accept 2
-arguments: a buffer to display and an alist similar to ALIST.
-See `display-buffer' for details."
-  :type display-buffer--action-custom-type
-  :risky t
-  :version "24.1"
-  :group 'windows)
+  "Default fallback action for `display-buffer'.
+This is the action used by `display-buffer' if no other actions
+specified, e.g. by the user options `display-buffer-alist' or
+`display-buffer-base-action'.  See `display-buffer'.")
+(put 'display-buffer-fallback-action 'risky-local-variable t)
 
 (defun display-buffer-assq-regexp (buffer-name alist)
   "Retrieve ALIST entry corresponding to BUFFER-NAME."
@@ -4553,12 +4557,13 @@
 alist.  It should either display the buffer and return the
 window, or return nil if unable to display the buffer.
 
-`display-buffer' builds a function list and an alist from
-`display-buffer-overriding-action', `display-buffer-alist',
-ACTION, and `display-buffer-default-action' (in that order).
-Then it calls each function in the combined function list in
-turn, passing the buffer as the first argument and the combined
-alist as the second argument, until a function returns non-nil.
+The `display-buffer' function builds a function list and an alist
+from `display-buffer-overriding-action', `display-buffer-alist',
+the ACTION argument, `display-buffer-base-action', and
+`display-buffer-fallback-action' (in that order).  Then it calls
+each function in the combined function list in turn, passing the
+buffer as the first argument and the combined alist as the second
+argument, until one of the functions returns non-nil.
 
 Available action functions include:
  `display-buffer-same-window'
@@ -4608,7 +4613,8 @@
             ;; Construct action function list and action alist.
             (actions (list display-buffer-overriding-action
                            user-action action extra-action
-                           display-buffer-default-action))
+                           display-buffer-base-action
+                           display-buffer-fallback-action))
             (functions (apply 'append
                               (mapcar (lambda (x)
                                         (setq x (car x))


reply via email to

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