[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/other-frame-window a5ef264 13/16: Minor improvements in
From: |
Stefan Monnier |
Subject: |
[elpa] externals/other-frame-window a5ef264 13/16: Minor improvements in other-frame-window |
Date: |
Tue, 1 Dec 2020 16:38:35 -0500 (EST) |
branch: externals/other-frame-window
commit a5ef264deebd8f81a6a6d136f5f14d2c978ca113
Author: Stephen Leake <stephen_leake@stephe-leake.org>
Commit: Stephen Leake <stephen_leake@stephe-leake.org>
Minor improvements in other-frame-window
* packages/other-frame-window/other-frame-window.el: Bump version.
(ofw--echo-keystrokes): Check structure of
'display-buffer-overriding-action' before accessing.
(other-frame-window-mode): Doc setting display-buffer-overriding-action
in init file.
---
other-frame-window.el | 31 +++++++++++++++++++++++++------
1 file changed, 25 insertions(+), 6 deletions(-)
diff --git a/other-frame-window.el b/other-frame-window.el
index 47729da..dfa40e6 100644
--- a/other-frame-window.el
+++ b/other-frame-window.el
@@ -1,11 +1,11 @@
;;; other-frame-window.el --- Minor mode to enable global prefix keys for
other frame/window buffer placement -*- lexical-binding: t -*-
;;
-;; Copyright (C) 2015, 2017 Free Software Foundation, Inc.
+;; Copyright (C) 2015, 2017, 2018 Free Software Foundation, Inc.
;;
;; Author: Stephen Leake <stephen_leake@member.fsf.org>
;; Maintainer: Stephen Leake <stephen_leake@member.fsf.org>
;; Keywords: frame window
-;; Version: 1.0.4
+;; Version: 1.0.5
;; Package-Requires: ((emacs "24.4"))
;;
;; This file is part of GNU Emacs.
@@ -61,6 +61,14 @@
;; r - find-file-read-only in another window/frame.
;;
;; To extend this list, add key bindings to ‘ofw-transient-map’.
+;;
+;; Some code in Emacs uses an explicit list of actions in a call to
+;; display-buffer, which can defeat the purpose of
+;; other-frame-window. To override that, add:
+;;
+;; (setq display-buffer-overriding-action (cons (list
'display-buffer-same-window) nil))
+;;
+;; to your Emacs init file.
;;;; Usage:
;;
@@ -137,10 +145,14 @@
(set-transient-map ofw-transient-map)))
(defun ofw--echo-keystrokes ()
- (let ((funs (car display-buffer-overriding-action)))
- (cond
- ((memq #'ofw-display-buffer-other-frame funs) "[other-frame]")
- ((memq #'ofw-display-buffer-other-window funs) "[other-window]"))))
+ ;; Sometimes people abuse ‘display-buffer-overriding-action’, and
+ ;; that crashes emacs, so be careful.
+ (when (and (consp display-buffer-overriding-action)
+ (listp (car display-buffer-overriding-action)))
+ (let ((funs (car display-buffer-overriding-action)))
+ (cond
+ ((memq #'ofw-display-buffer-other-frame funs) "[other-frame]")
+ ((memq #'ofw-display-buffer-other-window funs) "[other-window]")))))
(when (boundp 'prefix-command-echo-keystrokes-functions)
(add-hook 'prefix-command-echo-keystrokes-functions
@@ -298,6 +310,13 @@ o - select another window/frame.
r - find-file-read-only in another window/frame.
To extend this list, add key bindings to ‘ofw-transient-map’.
+
+To override default Emacs behavior in the absence of a prefix, do:
+
+\(setq display-buffer-overriding-action
+ (cons (list 'display-buffer-same-window) nil))
+
+in your init file.
"
:global t
- [elpa] externals/other-frame-window 034d510 11/16: * packages/other-frame-window: add text for list-packages long description, (continued)
- [elpa] externals/other-frame-window 034d510 11/16: * packages/other-frame-window: add text for list-packages long description, Stefan Monnier, 2020/12/01
- [elpa] externals/other-frame-window 7939a1b 08/16: Fix some quoting problems in doc strings, Stefan Monnier, 2020/12/01
- [elpa] externals/other-frame-window 9228aab 06/16: * other-frame-window.el: Use new prefix-command features, Stefan Monnier, 2020/12/01
- [elpa] externals/other-frame-window 97e41af 05/16: Bump version of other-frame-window.el, Stefan Monnier, 2020/12/01
- [elpa] externals/other-frame-window 88820e3 07/16: Bump version of other-frame-window.el, Stefan Monnier, 2020/12/01
- [elpa] externals/other-frame-window e4aa050 10/16: * packages/other-frame-window: bump version; improve minor mode doc string, Stefan Monnier, 2020/12/01
- [elpa] externals/other-frame-window 061ffe1 09/16: Clear executable bit for Emacs Lisp files., Stefan Monnier, 2020/12/01
- [elpa] externals/other-frame-window c706e22 12/16: * packages/other-frame-window/other-frame-window.el: improve description, Stefan Monnier, 2020/12/01
- [elpa] externals/other-frame-window 7477b00 15/16: Other-frame-window: bump version to publish changes, Stefan Monnier, 2020/12/01
- [elpa] externals/other-frame-window 6a6de0e 14/16: Package other-frame-window; improve description, Stefan Monnier, 2020/12/01
- [elpa] externals/other-frame-window a5ef264 13/16: Minor improvements in other-frame-window,
Stefan Monnier <=
- [elpa] externals/other-frame-window df437ff 16/16: * .gitignore: New file, Stefan Monnier, 2020/12/01