Mercurial > emacs
comparison lisp/progmodes/idlw-shell.el @ 77472:70d58d56b53b
(idlwave-shell-clear-all-bp): Don't re-query for each cleared BP.
(idlwave-shell-clear-bp): Optionally skip BP query.
(idlwave-shell-update-bp-overlays): Use set-window-margins instead of
set-window-buffer, which incorrectly moves displayed region.
author | J.D. Smith <jdsmith@as.arizona.edu> |
---|---|
date | Tue, 24 Apr 2007 00:22:52 +0000 |
parents | 1064d1d79d3e |
children | c1ec1c8a8d2e 41aaac7180d5 e6fdae9180d4 |
comparison
equal
deleted
inserted
replaced
77471:be6b2b081602 | 77472:70d58d56b53b |
---|---|
2584 (idlwave-shell-stop-line-pending) | 2584 (idlwave-shell-stop-line-pending) |
2585 (idlwave-shell-send-command ".skip" '(idlwave-shell-redisplay 'hide) | 2585 (idlwave-shell-send-command ".skip" '(idlwave-shell-redisplay 'hide) |
2586 (if (idlwave-shell-hide-p 'debug) 'mostly) | 2586 (if (idlwave-shell-hide-p 'debug) 'mostly) |
2587 nil t)) | 2587 nil t)) |
2588 | 2588 |
2589 (defun idlwave-shell-clear-bp (bp) | 2589 (defun idlwave-shell-clear-bp (bp &optional no-query) |
2590 "Clear breakpoint BP. | 2590 "Clear breakpoint BP. |
2591 Clears in IDL and in `idlwave-shell-bp-alist'." | 2591 Clears in IDL and in `idlwave-shell-bp-alist'." |
2592 (let ((index (idlwave-shell-bp-get bp))) | 2592 (let ((index (idlwave-shell-bp-get bp))) |
2593 (if index | 2593 (if index |
2594 (progn | 2594 (progn |
2595 (idlwave-shell-send-command | 2595 (idlwave-shell-send-command |
2596 (concat "breakpoint,/clear," (int-to-string index)) | 2596 (concat "breakpoint,/clear," (int-to-string index)) |
2597 nil (idlwave-shell-hide-p 'breakpoint) nil t) | 2597 nil (idlwave-shell-hide-p 'breakpoint) nil t) |
2598 (idlwave-shell-bp-query))))) | 2598 (unless no-query (idlwave-shell-bp-query)))))) |
2599 | 2599 |
2600 (defun idlwave-shell-current-frame () | 2600 (defun idlwave-shell-current-frame () |
2601 "Return a list containing the current file name and line point is in. | 2601 "Return a list containing the current file name and line point is in. |
2602 If in the IDL shell buffer, returns `idlwave-shell-pc-frame'." | 2602 If in the IDL shell buffer, returns `idlwave-shell-pc-frame'." |
2603 (if (eq (current-buffer) (get-buffer (idlwave-shell-buffer))) | 2603 (if (eq (current-buffer) (get-buffer (idlwave-shell-buffer))) |
3720 (when use-glyph | 3720 (when use-glyph |
3721 (if old-buffers | 3721 (if old-buffers |
3722 (setq old-buffers (delq (current-buffer) old-buffers))) | 3722 (setq old-buffers (delq (current-buffer) old-buffers))) |
3723 (if (fboundp 'set-specifier) ;; XEmacs | 3723 (if (fboundp 'set-specifier) ;; XEmacs |
3724 (set-specifier left-margin-width (cons (current-buffer) 2)) | 3724 (set-specifier left-margin-width (cons (current-buffer) 2)) |
3725 (setq left-margin-width 2)) | 3725 (if (< left-margin-width 2) |
3726 (if (setq win (get-buffer-window (current-buffer) t)) | 3726 (setq left-margin-width 2))) |
3727 (set-window-buffer win (current-buffer)))))) | 3727 (let ((window (get-buffer-window (current-buffer) 0))) |
3728 (if window | |
3729 (set-window-margins | |
3730 window left-margin-width right-margin-width)))))) | |
3728 (if use-glyph | 3731 (if use-glyph |
3729 (while (setq buf (pop old-buffers)) | 3732 (while (setq buf (pop old-buffers)) |
3730 (with-current-buffer buf | 3733 (with-current-buffer buf |
3731 (if (fboundp 'set-specifier) ;; XEmacs | 3734 (if (fboundp 'set-specifier) ;; XEmacs |
3732 (set-specifier left-margin-width (cons (current-buffer) 0)) | 3735 (set-specifier left-margin-width (cons (current-buffer) 0)) |
3733 (setq left-margin-width 0)) | 3736 (setq left-margin-width 0)) |
3734 (if (setq win (get-buffer-window buf t)) | 3737 (let ((window (get-buffer-window buf 0))) |
3735 (set-window-buffer win buf)))))))) | 3738 (if window |
3739 (set-window-margins | |
3740 window left-margin-width right-margin-width))))))))) | |
3736 | 3741 |
3737 (defun idlwave-shell-make-new-bp-overlay (&optional type disabled) | 3742 (defun idlwave-shell-make-new-bp-overlay (&optional type disabled) |
3738 "Make a new overlay for highlighting breakpoints. | 3743 "Make a new overlay for highlighting breakpoints. |
3739 | 3744 |
3740 This stuff is strongly dependant upon the version of Emacs. If TYPE | 3745 This stuff is strongly dependant upon the version of Emacs. If TYPE |
4053 (interactive) | 4058 (interactive) |
4054 (idlwave-shell-send-command | 4059 (idlwave-shell-send-command |
4055 idlwave-shell-bp-query | 4060 idlwave-shell-bp-query |
4056 '(progn | 4061 '(progn |
4057 (idlwave-shell-filter-bp) | 4062 (idlwave-shell-filter-bp) |
4058 (mapcar 'idlwave-shell-clear-bp idlwave-shell-bp-alist)) | 4063 (mapcar (lambda (x) (idlwave-shell-clear-bp x 'no-query)) |
4064 idlwave-shell-bp-alist) | |
4065 (idlwave-shell-bp-query)) | |
4059 'hide)) | 4066 'hide)) |
4060 | 4067 |
4061 (defun idlwave-shell-list-all-bp () | 4068 (defun idlwave-shell-list-all-bp () |
4062 "List all breakpoints in IDL." | 4069 "List all breakpoints in IDL." |
4063 (interactive) | 4070 (interactive) |