diff options
Diffstat (limited to 'lisp/progmodes')
| -rw-r--r-- | lisp/progmodes/flymake.el | 9 | ||||
| -rw-r--r-- | lisp/progmodes/gdb-mi.el | 19 | ||||
| -rw-r--r-- | lisp/progmodes/gud.el | 65 |
3 files changed, 47 insertions, 46 deletions
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el index 26d4a399c2d..2614af9ffa4 100644 --- a/lisp/progmodes/flymake.el +++ b/lisp/progmodes/flymake.el | |||
| @@ -1535,10 +1535,11 @@ if ARG is omitted or nil." | |||
| 1535 | (error "Invalid file-name")) | 1535 | (error "Invalid file-name")) |
| 1536 | (or prefix | 1536 | (or prefix |
| 1537 | (setq prefix "flymake")) | 1537 | (setq prefix "flymake")) |
| 1538 | (let* ((temp-name (concat (file-name-sans-extension file-name) | 1538 | (let* ((ext (file-name-extension file-name)) |
| 1539 | "_" prefix | 1539 | (temp-name (file-truename |
| 1540 | (and (file-name-extension file-name) | 1540 | (concat (file-name-sans-extension file-name) |
| 1541 | (concat "." (file-name-extension file-name)))))) | 1541 | "_" prefix |
| 1542 | (and ext (concat "." ext)))))) | ||
| 1542 | (flymake-log 3 "create-temp-inplace: file=%s temp=%s" file-name temp-name) | 1543 | (flymake-log 3 "create-temp-inplace: file=%s temp=%s" file-name temp-name) |
| 1543 | temp-name)) | 1544 | temp-name)) |
| 1544 | 1545 | ||
diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el index 59c419abfc3..805ffa36e4e 100644 --- a/lisp/progmodes/gdb-mi.el +++ b/lisp/progmodes/gdb-mi.el | |||
| @@ -1516,9 +1516,9 @@ this trigger is subscribed to `gdb-buf-publisher' and called with | |||
| 1516 | (comint-exec io-buffer "gdb-inferior" nil nil nil) | 1516 | (comint-exec io-buffer "gdb-inferior" nil nil nil) |
| 1517 | (gdb-inferior-io--init-proc (get-buffer-process io-buffer)))))) | 1517 | (gdb-inferior-io--init-proc (get-buffer-process io-buffer)))))) |
| 1518 | 1518 | ||
| 1519 | (defvar gdb-display-buffer-other-frame-action | 1519 | (defcustom gdb-display-buffer-other-frame-action |
| 1520 | `((display-buffer-reuse-window display-buffer-pop-up-frame) | 1520 | '((display-buffer-reuse-window display-buffer-pop-up-frame) |
| 1521 | (reusable-frames . 0) | 1521 | (reusable-frames . visible) |
| 1522 | (inhibit-same-window . t) | 1522 | (inhibit-same-window . t) |
| 1523 | (pop-up-frame-parameters (height . 14) | 1523 | (pop-up-frame-parameters (height . 14) |
| 1524 | (width . 80) | 1524 | (width . 80) |
| @@ -1526,8 +1526,11 @@ this trigger is subscribed to `gdb-buf-publisher' and called with | |||
| 1526 | (tool-bar-lines . nil) | 1526 | (tool-bar-lines . nil) |
| 1527 | (menu-bar-lines . nil) | 1527 | (menu-bar-lines . nil) |
| 1528 | (minibuffer . nil))) | 1528 | (minibuffer . nil))) |
| 1529 | "A `display-buffer' action for displaying GDB utility frames.") | 1529 | "`display-buffer' action for displaying GDB utility frames." |
| 1530 | (put 'gdb-display-buffer-other-frame-action 'risky-local-variable t) | 1530 | :group 'gdb |
| 1531 | :type display-buffer--action-custom-type | ||
| 1532 | :risky t | ||
| 1533 | :version "24.3") | ||
| 1531 | 1534 | ||
| 1532 | (defun gdb-frame-io-buffer () | 1535 | (defun gdb-frame-io-buffer () |
| 1533 | "Display IO of debugged program in another frame." | 1536 | "Display IO of debugged program in another frame." |
| @@ -4175,9 +4178,9 @@ buffers, if required." | |||
| 4175 | (if gdb-many-windows | 4178 | (if gdb-many-windows |
| 4176 | (gdb-setup-windows) | 4179 | (gdb-setup-windows) |
| 4177 | (gdb-get-buffer-create 'gdb-breakpoints-buffer) | 4180 | (gdb-get-buffer-create 'gdb-breakpoints-buffer) |
| 4178 | (if (and gdb-show-main gdb-main-file) | 4181 | (and gdb-show-main |
| 4179 | (let ((pop-up-windows t)) | 4182 | gdb-main-file |
| 4180 | (display-buffer (gud-find-file gdb-main-file))))) | 4183 | (display-buffer (gud-find-file gdb-main-file)))) |
| 4181 | (gdb-force-mode-line-update | 4184 | (gdb-force-mode-line-update |
| 4182 | (propertize "ready" 'face font-lock-variable-name-face))) | 4185 | (propertize "ready" 'face font-lock-variable-name-face))) |
| 4183 | 4186 | ||
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 2e3858b2cc5..719471278a8 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el | |||
| @@ -2700,42 +2700,39 @@ Obeying it means displaying in another window the specified file and line." | |||
| 2700 | (gud-find-file true-file))) | 2700 | (gud-find-file true-file))) |
| 2701 | (window (and buffer | 2701 | (window (and buffer |
| 2702 | (or (get-buffer-window buffer) | 2702 | (or (get-buffer-window buffer) |
| 2703 | (if (eq gud-minor-mode 'gdbmi) | ||
| 2704 | (display-buffer buffer nil 'visible)) | ||
| 2705 | (display-buffer buffer)))) | 2703 | (display-buffer buffer)))) |
| 2706 | (pos)) | 2704 | (pos)) |
| 2707 | (if buffer | 2705 | (when buffer |
| 2708 | (progn | 2706 | (with-current-buffer buffer |
| 2709 | (with-current-buffer buffer | 2707 | (unless (or (verify-visited-file-modtime buffer) gud-keep-buffer) |
| 2710 | (unless (or (verify-visited-file-modtime buffer) gud-keep-buffer) | 2708 | (if (yes-or-no-p |
| 2711 | (if (yes-or-no-p | 2709 | (format "File %s changed on disk. Reread from disk? " |
| 2712 | (format "File %s changed on disk. Reread from disk? " | 2710 | (buffer-name))) |
| 2713 | (buffer-name))) | 2711 | (revert-buffer t t) |
| 2714 | (revert-buffer t t) | 2712 | (setq gud-keep-buffer t))) |
| 2715 | (setq gud-keep-buffer t))) | 2713 | (save-restriction |
| 2716 | (save-restriction | 2714 | (widen) |
| 2717 | (widen) | 2715 | (goto-char (point-min)) |
| 2718 | (goto-char (point-min)) | 2716 | (forward-line (1- line)) |
| 2719 | (forward-line (1- line)) | 2717 | (setq pos (point)) |
| 2720 | (setq pos (point)) | 2718 | (or gud-overlay-arrow-position |
| 2721 | (or gud-overlay-arrow-position | 2719 | (setq gud-overlay-arrow-position (make-marker))) |
| 2722 | (setq gud-overlay-arrow-position (make-marker))) | 2720 | (set-marker gud-overlay-arrow-position (point) (current-buffer)) |
| 2723 | (set-marker gud-overlay-arrow-position (point) (current-buffer)) | 2721 | ;; If they turned on hl-line, move the hl-line highlight to |
| 2724 | ;; If they turned on hl-line, move the hl-line highlight to | 2722 | ;; the arrow's line. |
| 2725 | ;; the arrow's line. | 2723 | (when (featurep 'hl-line) |
| 2726 | (when (featurep 'hl-line) | 2724 | (cond |
| 2727 | (cond | 2725 | (global-hl-line-mode |
| 2728 | (global-hl-line-mode | 2726 | (global-hl-line-highlight)) |
| 2729 | (global-hl-line-highlight)) | 2727 | ((and hl-line-mode hl-line-sticky-flag) |
| 2730 | ((and hl-line-mode hl-line-sticky-flag) | 2728 | (hl-line-highlight))))) |
| 2731 | (hl-line-highlight))))) | 2729 | (cond ((or (< pos (point-min)) (> pos (point-max))) |
| 2732 | (cond ((or (< pos (point-min)) (> pos (point-max))) | 2730 | (widen) |
| 2733 | (widen) | 2731 | (goto-char pos)))) |
| 2734 | (goto-char pos)))) | 2732 | (when window |
| 2735 | (when window | 2733 | (set-window-point window gud-overlay-arrow-position) |
| 2736 | (set-window-point window gud-overlay-arrow-position) | 2734 | (if (eq gud-minor-mode 'gdbmi) |
| 2737 | (if (eq gud-minor-mode 'gdbmi) | 2735 | (setq gdb-source-window window)))))) |
| 2738 | (setq gdb-source-window window))))))) | ||
| 2739 | 2736 | ||
| 2740 | ;; The gud-call function must do the right thing whether its invoking | 2737 | ;; The gud-call function must do the right thing whether its invoking |
| 2741 | ;; keystroke is from the GUD buffer itself (via major-mode binding) | 2738 | ;; keystroke is from the GUD buffer itself (via major-mode binding) |