summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2005-03-14 05:27:53 +0000
committerMiles Bader <miles@gnu.org>2005-03-14 05:27:53 +0000
commit40fb2103c2986cbb91add4afed635886c4f87ae5 (patch)
tree6fd14d0436bc3049314dad9751e74e3816a34265 /lisp/emacs-lisp
parent4a670293279d61e9bdf88d9a86caefc6de4e60e3 (diff)
parentb70d9316bbf3e2482c1345d8135ddd1ee7e25ba7 (diff)
downloademacs-40fb2103c2986cbb91add4afed635886c4f87ae5.tar.gz
emacs-40fb2103c2986cbb91add4afed635886c4f87ae5.tar.bz2
emacs-40fb2103c2986cbb91add4afed635886c4f87ae5.zip
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-25
Merge from emacs--cvs-trunk--0 Patches applied: * emacs--cvs-trunk--0 (patch 173-179) - Update from CVS
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/byte-run.el13
-rw-r--r--lisp/emacs-lisp/debug.el28
2 files changed, 20 insertions, 21 deletions
diff --git a/lisp/emacs-lisp/byte-run.el b/lisp/emacs-lisp/byte-run.el
index 2cd0896c835..ef426494b68 100644
--- a/lisp/emacs-lisp/byte-run.el
+++ b/lisp/emacs-lisp/byte-run.el
@@ -1,6 +1,6 @@
;;; byte-run.el --- byte-compiler support for inlining
-;; Copyright (C) 1992, 2004 Free Software Foundation, Inc.
+;; Copyright (C) 1992, 2004, 2005 Free Software Foundation, Inc.
;; Author: Jamie Zawinski <jwz@lucid.com>
;; Hallvard Furuseth <hbf@ulrik.uio.no>
@@ -34,7 +34,7 @@
;; Redefined in byte-optimize.el.
;; This is not documented--it's not clear that we should promote it.
(fset 'inline 'progn)
-(put 'inline 'lisp-indent-hook 0)
+(put 'inline 'lisp-indent-function 0)
;;; Interface to inline functions.
@@ -105,7 +105,7 @@ was first made obsolete, for example a date or a release number."
(put variable 'byte-obsolete-variable (cons new when))
variable)
-(put 'dont-compile 'lisp-indent-hook 0)
+(put 'dont-compile 'lisp-indent-function 0)
(defmacro dont-compile (&rest body)
"Like `progn', but the body always runs interpreted (not compiled).
If you think you need this, you're probably making a mistake somewhere."
@@ -118,7 +118,7 @@ If you think you need this, you're probably making a mistake somewhere."
;;; definition in the file overrides the magic definitions on the
;;; byte-compile-macro-environment.
-(put 'eval-when-compile 'lisp-indent-hook 0)
+(put 'eval-when-compile 'lisp-indent-function 0)
(defmacro eval-when-compile (&rest body)
"Like `progn', but evaluates the body at compile time.
The result of the body appears to the compiler as a quoted constant."
@@ -127,13 +127,14 @@ The result of the body appears to the compiler as a quoted constant."
;; (list 'quote (eval (cons 'progn body)))
(cons 'progn body))
-(put 'eval-and-compile 'lisp-indent-hook 0)
+(put 'eval-and-compile 'lisp-indent-function 0)
(defmacro eval-and-compile (&rest body)
"Like `progn', but evaluates the body at compile time and at load time."
(declare (debug t))
;; Remember, it's magic.
(cons 'progn body))
+(put 'with-no-warnings 'lisp-indent-function 0)
(defun with-no-warnings (&rest body)
"Like `progn', but prevents compiler warnings in the body."
;; The implementation for the interpreter is basically trivial.
@@ -147,7 +148,7 @@ The result of the body appears to the compiler as a quoted constant."
;;; There is hardly any reason to change these parameters, anyway.
;;; --rms.
-;; (put 'byte-compiler-options 'lisp-indent-hook 0)
+;; (put 'byte-compiler-options 'lisp-indent-function 0)
;; (defmacro byte-compiler-options (&rest args)
;; "Set some compilation-parameters for this file. This will affect only the
;; file in which it appears; this does nothing when evaluated, and when loaded
diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el
index 668157fc52a..2be217a41c6 100644
--- a/lisp/emacs-lisp/debug.el
+++ b/lisp/emacs-lisp/debug.el
@@ -170,7 +170,14 @@ first will be printed into the backtrace buffer."
(save-excursion
(save-window-excursion
(with-no-warnings
- (setq unread-command-char -1))
+ (setq unread-command-char -1))
+ (when (eq (car debugger-args) 'debug)
+ ;; Skip the frames for backtrace-debug, byte-code,
+ ;; and implement-debug-on-entry.
+ (backtrace-debug 4 t)
+ ;; Place an extra debug-on-exit for macro's.
+ (when (eq 'lambda (car-safe (cadr (backtrace-frame 4))))
+ (backtrace-debug 5 t)))
(pop-to-buffer debugger-buffer)
(debugger-mode)
(debugger-setup-buffer debugger-args)
@@ -190,10 +197,6 @@ first will be printed into the backtrace buffer."
(goto-char (point-min))
(message "%s" (buffer-string))
(kill-emacs))
- (if (eq (car debugger-args) 'debug)
- ;; Skip the frames for backtrace-debug, byte-code,
- ;; and implement-debug-on-entry.
- (backtrace-debug 4 t))
(message "")
(let ((standard-output nil)
(buffer-read-only t))
@@ -225,7 +228,7 @@ first will be printed into the backtrace buffer."
(setq last-command debugger-outer-last-command)
(setq this-command debugger-outer-this-command)
(with-no-warnings
- (setq unread-command-char debugger-outer-unread-command-char))
+ (setq unread-command-char debugger-outer-unread-command-char))
(setq unread-command-events debugger-outer-unread-command-events)
(setq unread-post-input-method-events
debugger-outer-unread-post-input-method-events)
@@ -263,12 +266,7 @@ That buffer should be current already."
;; lambda is for debug-on-call when a function call is next.
;; debug is for debug-on-entry function called.
(cond ((memq (car debugger-args) '(lambda debug))
- (insert "--entering a function:\n")
- (if (eq (car debugger-args) 'debug)
- (progn
- (delete-char 1)
- (insert ?*)
- (beginning-of-line))))
+ (insert "--entering a function:\n"))
;; Exiting a function.
((eq (car debugger-args) 'exit)
(insert "--returning value: ")
@@ -508,12 +506,12 @@ Applies to the frame whose line point is on in the backtrace."
(unwind-protect
(progn
(with-no-warnings
- (setq unread-command-char debugger-outer-unread-command-char))
+ (setq unread-command-char debugger-outer-unread-command-char))
(prog1 (progn ,@body)
(with-no-warnings
- (setq debugger-outer-unread-command-char unread-command-char))))
+ (setq debugger-outer-unread-command-char unread-command-char))))
(with-no-warnings
- (setq unread-command-char save-ucc))))
+ (setq unread-command-char save-ucc))))
(setq debugger-outer-match-data (match-data))
(setq debugger-outer-load-read-function load-read-function)
(setq debugger-outer-overriding-terminal-local-map