forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
elscreen-1.4.6-emacs-24.patch
154 lines (142 loc) · 5.79 KB
/
elscreen-1.4.6-emacs-24.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
--- elscreen-1.4.6-orig/elscreen.el 2013-05-23 21:31:14.011823000 +1000
+++ elscreen-1.4.6/elscreen.el 2013-10-03 20:55:35.497650931 +1000
@@ -29,9 +29,9 @@
(eval-when-compile
(require 'static))
-(static-defconst elscreen-on-xemacs (featurep 'xemacs))
-(static-defconst elscreen-on-emacs (and (not elscreen-on-xemacs)
- (>= emacs-major-version 21)))
+(static-defconst elscreen-on-xemacs (featurep 'xemacs)
+ (static-defconst elscreen-on-emacs (and (not elscreen-on-xemacs)
+ (>= emacs-major-version 21))))
;;; User Customizable Variables:
@@ -148,7 +148,8 @@
(static-when elscreen-on-emacs ;; GNU Emacs 21
(make-obsolete-variable 'elscreen-tab-display-create-screen
- 'elscreen-tab-display-control)
+ 'elscreen-tab-display-control
+ "1.4.6")
(defcustom elscreen-tab-display-control t
"*Non-nil to display control tab at the most left side."
:tag "Show/Hide the Control Tab"
@@ -201,13 +202,13 @@
(((class color))
(:background "blue" :foreground "black" :underline t)))
"Face for tabs other than current screen one."
- :group 'elscreen))
+ :group 'elscreen)
;;; Key & Menu bindings:
-(defvar elscreen-map (make-sparse-keymap)
- "Keymap for ElScreen.")
+ (defvar elscreen-map (make-sparse-keymap)
+ "Keymap for ElScreen."))
(define-key elscreen-map "\C-c" 'elscreen-create)
(define-key elscreen-map "c" 'elscreen-create)
(define-key elscreen-map "C" 'elscreen-clone)
@@ -899,13 +900,13 @@
screen-list-string)
(cond
((not (elscreen-screen-live-p screen)) ;; XXX
- (when (interactive-p)
+ (when (called-interactively-p 'any)
(elscreen-message "There is no such screen")))
((null screen-list)
- (when (interactive-p)
+ (when (called-interactively-p 'any)
(elscreen-message "There is only one screen, cannot kill")))
((or
- (not (interactive-p))
+ (not (called-interactively-p 'any))
(yes-or-no-p (format "Really kill screens other than %d? " screen)))
(setq screen-list-string (mapconcat
(lambda (screen)
@@ -914,7 +915,7 @@
screen-list ","))
(elscreen-goto-internal screen)
(elscreen-notify-screen-modification 'force-immediately)
- (when (interactive-p)
+ (when (called-interactively-p 'any)
(elscreen-message (format "screen %s killed" screen-list-string)))))
screen-list))
@@ -984,7 +985,7 @@
(defun elscreen-jump ()
"Switch to specified screen."
(interactive)
- (let ((next-screen (string-to-number (string last-command-char))))
+ (let ((next-screen (string-to-number (string last-command-event))))
(if (and (<= 0 next-screen) (<= next-screen 9))
(elscreen-goto next-screen))))
(defalias 'elscreen-jump-0 'elscreen-jump)
@@ -1046,7 +1047,7 @@
(princ (substitute-command-keys
(mapconcat 'symbol-value
elscreen-help-symbol-list "\n\n")))
- (print-help-return-message)))
+ (help-print-return-message)))
;;; Utility Functions
@@ -1180,7 +1181,7 @@
creating one if none already exists."
(interactive)
(let* ((prompt "Go to the screen with specified buffer: ")
- (create (or create (interactive-p)))
+ (create (or create (called-interactively-p 'any)))
(buffer-name (or (and (bufferp buffer) (buffer-name buffer))
(and (stringp buffer) buffer)
(and (featurep 'iswitchb)
@@ -1207,7 +1208,7 @@
Use \\[toggle-read-only] to permit editing."
(interactive "FFind file read-only in new screen: ")
(elscreen-find-file filename)
- (toggle-read-only 1))
+ (read-only-mode 1))
(defun elscreen-dired (dirname &optional switches)
(interactive (progn
@@ -1373,27 +1374,28 @@
(defvar elscreen-e21-tab-format nil)
(make-variable-buffer-local 'elscreen-e21-tab-format)
- (defsubst elscreen-e21-tab-create-keymap (&rest definitions)
- (let ((keymap (make-sparse-keymap))
- (key-function-pairs
- (eval-when-compile
- (mapcar
- (lambda (key)
- (cons key 'ignore))
- (list 'mouse-1 'mouse-2 'mouse-3
- 'down-mouse-1 'down-mouse-2 'down-mouse-3
- 'drag-mouse-1 'drag-mouse-2 'drag-mouse-3)))))
- (while definitions
- (set-alist 'key-function-pairs (car definitions) (cadr definitions))
- (setq definitions (cddr definitions)))
- (mapc
- (lambda (key-function-pair)
- (let ((key (car key-function-pair))
- (function (cdr key-function-pair)))
- (define-key keymap (vector 'header-line key) function)))
- key-function-pairs)
- keymap))
-
+ (eval-when-compile
+ (defsubst elscreen-e21-tab-create-keymap (&rest definitions)
+ (let ((keymap (make-sparse-keymap))
+ (key-function-pairs
+ (eval-when-compile
+ (mapcar
+ (lambda (key)
+ (cons key 'ignore))
+ (list 'mouse-1 'mouse-2 'mouse-3
+ 'down-mouse-1 'down-mouse-2 'down-mouse-3
+ 'drag-mouse-1 'drag-mouse-2 'drag-mouse-3)))))
+ (while definitions
+ (set-alist 'key-function-pairs (car definitions) (cadr definitions))
+ (setq definitions (cddr definitions)))
+ (mapc
+ (lambda (key-function-pair)
+ (let ((key (car key-function-pair))
+ (function (cdr key-function-pair)))
+ (define-key keymap (vector 'header-line key) function)))
+ key-function-pairs)
+ keymap)))
+
(defsubst elscreen-e21-tab-width ()
(if (numberp elscreen-display-tab)
elscreen-display-tab