diff options
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/emacs-lisp/edebug.el | 27 |
2 files changed, 29 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 22069406451..0f4eaff5797 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2012-12-13 Juanma Barranquero <lekktu@gmail.com> | ||
| 2 | |||
| 3 | * emacs-lisp/edebug.el (edebug--require-cl-read): New function. | ||
| 4 | (edebug-setup-hook, cl-read-load-hooks): Use it. | ||
| 5 | (edebug-unload-function): New function. (Bug#13163) | ||
| 6 | |||
| 1 | 2012-12-13 Michael Albinus <michael.albinus@gmx.de> | 7 | 2012-12-13 Michael Albinus <michael.albinus@gmx.de> |
| 2 | 8 | ||
| 3 | * net/tramp-adb.el (tramp-adb-file-name-p): Make it a defsubst. | 9 | * net/tramp-adb.el (tramp-adb-file-name-p): Make it a defsubst. |
diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index 12311711fe0..c2ff81281a1 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el | |||
| @@ -4258,12 +4258,13 @@ With prefix argument, make it a temporary breakpoint." | |||
| 4258 | ;;; Autoloading of Edebug accessories | 4258 | ;;; Autoloading of Edebug accessories |
| 4259 | 4259 | ||
| 4260 | ;; edebug-cl-read and cl-read are available from liberte@cs.uiuc.edu | 4260 | ;; edebug-cl-read and cl-read are available from liberte@cs.uiuc.edu |
| 4261 | (defun edebug--require-cl-read () | ||
| 4262 | (require 'edebug-cl-read)) | ||
| 4263 | |||
| 4261 | (if (featurep 'cl-read) | 4264 | (if (featurep 'cl-read) |
| 4262 | (add-hook 'edebug-setup-hook | 4265 | (add-hook 'edebug-setup-hook #'edebug--require-cl-read) |
| 4263 | (function (lambda () (require 'edebug-cl-read)))) | ||
| 4264 | ;; The following causes edebug-cl-read to be loaded when you load cl-read.el. | 4266 | ;; The following causes edebug-cl-read to be loaded when you load cl-read.el. |
| 4265 | (add-hook 'cl-read-load-hooks | 4267 | (add-hook 'cl-read-load-hooks #'edebug--require-cl-read)) |
| 4266 | (function (lambda () (require 'edebug-cl-read))))) | ||
| 4267 | 4268 | ||
| 4268 | 4269 | ||
| 4269 | ;;; Finalize Loading | 4270 | ;;; Finalize Loading |
| @@ -4289,6 +4290,24 @@ With prefix argument, make it a temporary breakpoint." | |||
| 4289 | ;; Install edebug read and eval functions. | 4290 | ;; Install edebug read and eval functions. |
| 4290 | (edebug-install-read-eval-functions) | 4291 | (edebug-install-read-eval-functions) |
| 4291 | 4292 | ||
| 4293 | (defun edebug-unload-function () | ||
| 4294 | "Unload the Edebug source level debugger." | ||
| 4295 | (when edebug-active | ||
| 4296 | (unwind-protect | ||
| 4297 | (abort-recursive-edit) | ||
| 4298 | (setq edebug-active nil) | ||
| 4299 | (edebug-unload-function))) | ||
| 4300 | (save-current-buffer | ||
| 4301 | (dolist (buffer (buffer-list)) | ||
| 4302 | (set-buffer buffer) | ||
| 4303 | (when (eq major-mode 'edebug-mode) (emacs-lisp-mode)))) | ||
| 4304 | (remove-hook 'called-interactively-p-functions | ||
| 4305 | 'edebug--called-interactively-skip) | ||
| 4306 | (remove-hook 'cl-read-load-hooks 'edebug--require-cl-read) | ||
| 4307 | (edebug-uninstall-read-eval-functions) | ||
| 4308 | ;; continue standard unloading | ||
| 4309 | nil) | ||
| 4310 | |||
| 4292 | (provide 'edebug) | 4311 | (provide 'edebug) |
| 4293 | 4312 | ||
| 4294 | ;;; edebug.el ends here | 4313 | ;;; edebug.el ends here |