Skip to content
Browse files

+Added new flag `sr-traditional-other-window' to control how `other-w…

…indow' works in SC.
  • Loading branch information...
1 parent 45bc8cb commit 7a44ca7abd9fe79f87934c78d00dc2a91419a4f1 @escherdragon committed Aug 28, 2012
Showing with 11 additions and 2 deletions.
  1. +11 −2 sunrise-commander.el
View
13 sunrise-commander.el
@@ -7,7 +7,7 @@
;; Maintainer: José Alfredo Romero L. <escherdragon@gmail.com>
;; Created: 24 Sep 2007
;; Version: 6
-;; RCS Version: $Rev: 434 $
+;; RCS Version: $Rev: 435 $
;; Keywords: files, dired, midnight commander, norton, orthodox
;; URL: http://www.emacswiki.org/emacs/sunrise-commander.el
;; Compatibility: GNU Emacs 22+
@@ -356,6 +356,14 @@ run-time."
(string :tag "Literal text")
(sexp :tag "Symbolic expression")))
+(defcustom sr-traditional-other-window nil
+ "Sunrise modifies the behavior of the `other-window' command,
+so that focus is always given to the currently selected pane when
+switching from external windows. If you'd prefer the original
+Emacs behavior instead, then set this flag to t."
+ :group 'sunrise
+ :type 'boolean)
+
(defcustom sr-fuzzy-negation-character ?!
"Character to use for negating patterns when fuzzy-narrowing a pane."
:group 'sunrise
@@ -978,7 +986,8 @@ immediately loaded, but only if `sr-autoload-extensions' is not nil."
ad-do-it
(let ((from (selected-window)))
ad-do-it
- (unless (memq from (list sr-left-window sr-right-window))
+ (unless (or sr-traditional-other-window
+ (memq from (list sr-left-window sr-right-window)))
;; switching from outside
(sr-select-window sr-selected-window))
(with-no-warnings

0 comments on commit 7a44ca7

Please sign in to comment.
Something went wrong with that request. Please try again.