[Top][All Lists]

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

Re: [display-buffer] a way to make it behave as before?

From: Katsumi Yamaoka
Subject: Re: [display-buffer] a way to make it behave as before?
Date: Mon, 20 Jun 2011 15:21:09 +0900
User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (cygwin)

Katsumi Yamaoka wrote:
> I only want to see it in the other window of the current frame.

Maybe this one is the nearest to what I exactly want. :)

(when (boundp 'display-buffer-alist)
  ;; Specify the frame size used when creating a new frame.
  (unless (assq 'pop-up-frame-alist (car display-buffer-alist))
    (setcdr (car display-buffer-alist)
            (append (cdr (car display-buffer-alist))
                    '((pop-up-frame-alist (height . 35) (width . 80))))))
  (let ((spec (prin1-to-string display-buffer-alist))
        (start 0))
    ;; Delete `largest' and `lru' elements in every specifiers.
    (while (string-match "(\\(?:largest\\|lru\\)\\(?: [^)]+\\)?)" spec)
      (setq spec (concat (substring spec 0 (match-beginning 0))
                         (substring spec (match-end 0)))))
    ;; Make `same' elements void.
    (while (string-match " same\\([ )]\\)\\|\\(?:(same\\(?: [^)]+\\)?)\\)"
                         spec start)
      (setq start (+ (match-beginning 0) (if (match-beginning 1) 14 12))
            spec (concat (substring spec 0 (match-beginning 0))
                         (if (match-beginning 1)
                             (concat " (same . nil)" (match-string 1 spec))
                           "(same . nil)")
                         (substring spec (match-end 0)))))
    (setq display-buffer-alist (read spec))))

reply via email to

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