(debugger-outer-cursor-in-echo-area cursor-in-echo-area))
;; Set this instead of binding it, so that `q'
;; will not restore it.
- (setq overriding-terminal-local-map nil)
+ (setq overriding-terminal-local-map nil)
;; Don't let these magic variables affect the debugger itself.
(let ((last-command nil) this-command track-mouse
(unread-command-char -1) unread-command-events
(put 'debugger-env-macro 'lisp-indent-function 0)
(defmacro debugger-env-macro (&rest body)
"Run BODY in original environment."
- (`
- (save-excursion
- (if (null (buffer-name debugger-old-buffer))
- ;; old buffer deleted
- (setq debugger-old-buffer (current-buffer)))
- (set-buffer debugger-old-buffer)
- (let ((load-read-function debugger-outer-load-read-function)
- (overriding-terminal-local-map
- debugger-outer-overriding-terminal-local-map)
- (overriding-local-map debugger-outer-overriding-local-map)
- (track-mouse debugger-outer-track-mouse)
- (last-command debugger-outer-last-command)
- (this-command debugger-outer-this-command)
- (unread-command-char debugger-outer-unread-command-char)
- (unread-command-events debugger-outer-unread-command-events)
- (unread-post-input-method-events
- debugger-outer-unread-post-input-method-events)
- (last-input-event debugger-outer-last-input-event)
- (last-command-event debugger-outer-last-command-event)
- (last-nonmenu-event debugger-outer-last-nonmenu-event)
- (last-event-frame debugger-outer-last-event-frame)
- (standard-input debugger-outer-standard-input)
- (standard-output debugger-outer-standard-output)
- (inhibit-redisplay debugger-outer-inhibit-redisplay)
- (cursor-in-echo-area debugger-outer-cursor-in-echo-area))
- (set-match-data debugger-outer-match-data)
- (prog1 (progn (,@ body))
- (setq debugger-outer-match-data (match-data))
- (setq debugger-outer-load-read-function load-read-function)
- (setq debugger-outer-overriding-terminal-local-map
- overriding-terminal-local-map)
- (setq debugger-outer-overriding-local-map overriding-local-map)
- (setq debugger-outer-track-mouse track-mouse)
- (setq debugger-outer-last-command last-command)
- (setq debugger-outer-this-command this-command)
- (setq debugger-outer-unread-command-char unread-command-char)
- (setq debugger-outer-unread-command-events unread-command-events)
- (setq debugger-outer-unread-post-input-method-events
- unread-post-input-method-events)
- (setq debugger-outer-last-input-event last-input-event)
- (setq debugger-outer-last-command-event last-command-event)
- (setq debugger-outer-last-nonmenu-event last-nonmenu-event)
- (setq debugger-outer-last-event-frame last-event-frame)
- (setq debugger-outer-standard-input standard-input)
- (setq debugger-outer-standard-output standard-output)
- (setq debugger-outer-inhibit-redisplay inhibit-redisplay)
- (setq debugger-outer-cursor-in-echo-area cursor-in-echo-area)
- )))))
+ `(save-excursion
+ (if (null (buffer-name debugger-old-buffer))
+ ;; old buffer deleted
+ (setq debugger-old-buffer (current-buffer)))
+ (set-buffer debugger-old-buffer)
+ (let ((load-read-function debugger-outer-load-read-function)
+ (overriding-terminal-local-map
+ debugger-outer-overriding-terminal-local-map)
+ (overriding-local-map debugger-outer-overriding-local-map)
+ (track-mouse debugger-outer-track-mouse)
+ (last-command debugger-outer-last-command)
+ (this-command debugger-outer-this-command)
+ (unread-command-char debugger-outer-unread-command-char)
+ (unread-command-events debugger-outer-unread-command-events)
+ (unread-post-input-method-events
+ debugger-outer-unread-post-input-method-events)
+ (last-input-event debugger-outer-last-input-event)
+ (last-command-event debugger-outer-last-command-event)
+ (last-nonmenu-event debugger-outer-last-nonmenu-event)
+ (last-event-frame debugger-outer-last-event-frame)
+ (standard-input debugger-outer-standard-input)
+ (standard-output debugger-outer-standard-output)
+ (inhibit-redisplay debugger-outer-inhibit-redisplay)
+ (cursor-in-echo-area debugger-outer-cursor-in-echo-area))
+ (set-match-data debugger-outer-match-data)
+ (prog1 (progn ,@body)
+ (setq debugger-outer-match-data (match-data))
+ (setq debugger-outer-load-read-function load-read-function)
+ (setq debugger-outer-overriding-terminal-local-map
+ overriding-terminal-local-map)
+ (setq debugger-outer-overriding-local-map overriding-local-map)
+ (setq debugger-outer-track-mouse track-mouse)
+ (setq debugger-outer-last-command last-command)
+ (setq debugger-outer-this-command this-command)
+ (setq debugger-outer-unread-command-char unread-command-char)
+ (setq debugger-outer-unread-command-events unread-command-events)
+ (setq debugger-outer-unread-post-input-method-events
+ unread-post-input-method-events)
+ (setq debugger-outer-last-input-event last-input-event)
+ (setq debugger-outer-last-command-event last-command-event)
+ (setq debugger-outer-last-nonmenu-event last-nonmenu-event)
+ (setq debugger-outer-last-event-frame last-event-frame)
+ (setq debugger-outer-standard-input standard-input)
+ (setq debugger-outer-standard-output standard-output)
+ (setq debugger-outer-inhibit-redisplay inhibit-redisplay)
+ (setq debugger-outer-cursor-in-echo-area cursor-in-echo-area)
+ ))))
(defun debugger-eval-expression (exp)
"Eval an expression, in an environment like that outside the debugger."
ENABLE is an expression; the item is enabled for selection
whenever this expression's value is non-nil.
-Alternatively, a menu item may have the form:
+Alternatively, a menu item may have the form:
[ NAME CALLBACK [ KEYWORD ARG ] ... ]
NAME is a string; the name of an argument to CALLBACK.
:style STYLE
-
+
STYLE is a symbol describing the type of menu item. The following are
-defined:
+defined:
toggle: A checkbox.
Prepend the name with `(*) ' or `( ) ' depending on if selected or not.
;; We can't do anything that might differ between Emacs dialects in
;; `easy-menu-define' in order to make byte compiled files
;; compatible. Therefore everything interesting is done in this
- ;; function.
+ ;; function.
(set symbol (easy-menu-create-menu (car menu) (cdr menu)))
- (fset symbol (` (lambda (event) (, doc) (interactive "@e")
- (x-popup-menu event (, symbol)))))
- (mapcar (function (lambda (map)
+ (fset symbol `(lambda (event) ,doc (interactive "@e")
+ (x-popup-menu event ,symbol)))
+ (mapcar (function (lambda (map)
(define-key map (vector 'menu-bar (intern (car menu)))
(cons (car menu) (symbol-value symbol)))))
(if (keymapp maps) (list maps) maps)))
(setq inserted t)
(setq menu (cdr menu))))
(t (setq menu (cdr menu)))))))
-
+
(defun easy-menu-always-true (x)
;; Return true if X never evaluates to nil.
(if (consp x) (and (eq (car x) 'quote) (cadr x))