diff options
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 39 | ||||
| -rw-r--r-- | lisp/calc/calc-units.el | 14 | ||||
| -rw-r--r-- | lisp/emacs-lisp/debug.el | 8 | ||||
| -rw-r--r-- | lisp/frame.el | 2 | ||||
| -rw-r--r-- | lisp/loadup.el | 3 | ||||
| -rw-r--r-- | lisp/minibuffer.el | 19 | ||||
| -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 |
9 files changed, 122 insertions, 56 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 86b425b41e4..41b0135a708 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,42 @@ | |||
| 1 | 2012-10-20 Arne Jørgensen <arne@arnested.dk> | ||
| 2 | |||
| 3 | * progmodes/flymake.el (flymake-create-temp-inplace): Use | ||
| 4 | file-truename. | ||
| 5 | |||
| 6 | 2012-10-20 Eli Zaretskii <eliz@gnu.org> | ||
| 7 | |||
| 8 | * loadup.el: Update comment about uncompiled Lisp files. (Bug#12395) | ||
| 9 | |||
| 10 | 2012-10-20 Jay Belanger <jay.p.belanger@gmail.com> | ||
| 11 | |||
| 12 | * calc/calc-units.el (math-extract-units): Properly extract powers | ||
| 13 | of units. | ||
| 14 | |||
| 15 | 2012-10-20 Daniel Colascione <dancol@dancol.org> | ||
| 16 | |||
| 17 | * frame.el (make-frame): Set x-display-name as we used to in order | ||
| 18 | to unbreak creating an X11 frame from an Emacs daemon started | ||
| 19 | without a display. | ||
| 20 | |||
| 21 | 2012-10-19 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 22 | |||
| 23 | * minibuffer.el (minibuffer-force-complete): Make the next completion use | ||
| 24 | the same completion-field (bug@12221). | ||
| 25 | |||
| 26 | 2012-10-19 Martin Rudalics <rudalics@gmx.at> | ||
| 27 | |||
| 28 | * emacs-lisp/debug.el (debug): Record height of debugger window | ||
| 29 | also when debugger will be back (Bug#8789). | ||
| 30 | |||
| 31 | 2012-10-18 Chong Yidong <cyd@gnu.org> | ||
| 32 | |||
| 33 | * progmodes/gdb-mi.el (gdb-display-buffer-other-frame-action): | ||
| 34 | Convert to defcustom. | ||
| 35 | (gdb-get-source-file): Don't bind pop-up-windows. | ||
| 36 | |||
| 37 | * progmodes/gud.el (gud-display-line): Don't specially re-use | ||
| 38 | other frames for the gdb-mi case (Bug#12648). | ||
| 39 | |||
| 1 | 2012-10-18 Stefan Monnier <monnier@iro.umontreal.ca> | 40 | 2012-10-18 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 41 | ||
| 3 | * emacs-lisp/advice.el: Clean up commentary a bit. | 42 | * emacs-lisp/advice.el: Clean up commentary a bit. |
diff --git a/lisp/calc/calc-units.el b/lisp/calc/calc-units.el index 39f710f8322..58646ea114c 100644 --- a/lisp/calc/calc-units.el +++ b/lisp/calc/calc-units.el | |||
| @@ -1481,10 +1481,16 @@ If COMP or STD is non-nil, put that in the units table instead." | |||
| 1481 | (mapcar 'math-remove-units (cdr expr)))))) | 1481 | (mapcar 'math-remove-units (cdr expr)))))) |
| 1482 | 1482 | ||
| 1483 | (defun math-extract-units (expr) | 1483 | (defun math-extract-units (expr) |
| 1484 | (if (memq (car-safe expr) '(* /)) | 1484 | (cond |
| 1485 | (cons (car expr) | 1485 | ((memq (car-safe expr) '(* /)) |
| 1486 | (mapcar 'math-extract-units (cdr expr))) | 1486 | (cons (car expr) |
| 1487 | (if (math-check-unit-name expr) expr 1))) | 1487 | (mapcar 'math-extract-units (cdr expr)))) |
| 1488 | ((and | ||
| 1489 | (eq (car-safe expr) '^) | ||
| 1490 | (math-check-unit-name (nth 1 expr))) | ||
| 1491 | expr) | ||
| 1492 | ((math-check-unit-name expr) expr) | ||
| 1493 | (t 1))) | ||
| 1488 | 1494 | ||
| 1489 | (defun math-build-units-table-buffer (enter-buffer) | 1495 | (defun math-build-units-table-buffer (enter-buffer) |
| 1490 | (if (not (and math-units-table math-units-table-buffer-valid | 1496 | (if (not (and math-units-table math-units-table-buffer-valid |
diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el index c30ccf3315e..c04e68c0cfa 100644 --- a/lisp/emacs-lisp/debug.el +++ b/lisp/emacs-lisp/debug.el | |||
| @@ -267,15 +267,17 @@ first will be printed into the backtrace buffer." | |||
| 267 | ;; Make sure we unbind buffer-read-only in the right buffer. | 267 | ;; Make sure we unbind buffer-read-only in the right buffer. |
| 268 | (save-excursion | 268 | (save-excursion |
| 269 | (recursive-edit)))) | 269 | (recursive-edit)))) |
| 270 | (when (and (window-live-p debugger-window) | ||
| 271 | (eq (window-buffer debugger-window) debugger-buffer)) | ||
| 272 | ;; Record height of debugger window. | ||
| 273 | (setq debugger-previous-window-height | ||
| 274 | (window-total-size debugger-window))) | ||
| 270 | (if debugger-will-be-back | 275 | (if debugger-will-be-back |
| 271 | ;; Restore previous window configuration (Bug#12623). | 276 | ;; Restore previous window configuration (Bug#12623). |
| 272 | (set-window-configuration window-configuration) | 277 | (set-window-configuration window-configuration) |
| 273 | (when (and (window-live-p debugger-window) | 278 | (when (and (window-live-p debugger-window) |
| 274 | (eq (window-buffer debugger-window) debugger-buffer)) | 279 | (eq (window-buffer debugger-window) debugger-buffer)) |
| 275 | (progn | 280 | (progn |
| 276 | ;; Record height of debugger window. | ||
| 277 | (setq debugger-previous-window-height | ||
| 278 | (window-total-size debugger-window)) | ||
| 279 | ;; Unshow debugger-buffer. | 281 | ;; Unshow debugger-buffer. |
| 280 | (quit-restore-window debugger-window debugger-bury-or-kill) | 282 | (quit-restore-window debugger-window debugger-bury-or-kill) |
| 281 | ;; Restore current buffer (Bug#12502). | 283 | ;; Restore current buffer (Bug#12502). |
diff --git a/lisp/frame.el b/lisp/frame.el index b7b61bcc576..7a54efc23e7 100644 --- a/lisp/frame.el +++ b/lisp/frame.el | |||
| @@ -655,6 +655,8 @@ the new frame according to its own rules." | |||
| 655 | (error "Don't know how to create a frame on window system %s" w)) | 655 | (error "Don't know how to create a frame on window system %s" w)) |
| 656 | 656 | ||
| 657 | (unless (get w 'window-system-initialized) | 657 | (unless (get w 'window-system-initialized) |
| 658 | (unless x-display-name | ||
| 659 | (setq x-display-name display)) | ||
| 658 | (funcall (cdr (assq w window-system-initialization-alist))) | 660 | (funcall (cdr (assq w window-system-initialization-alist))) |
| 659 | (put w 'window-system-initialized t)) | 661 | (put w 'window-system-initialized t)) |
| 660 | 662 | ||
diff --git a/lisp/loadup.el b/lisp/loadup.el index e0f5c6265b9..e5f2cb014d3 100644 --- a/lisp/loadup.el +++ b/lisp/loadup.el | |||
| @@ -38,7 +38,8 @@ | |||
| 38 | ;; doc strings in the dumped Emacs.) Because of this: | 38 | ;; doc strings in the dumped Emacs.) Because of this: |
| 39 | 39 | ||
| 40 | ;; ii) If the file is loaded uncompiled, it should (where possible) | 40 | ;; ii) If the file is loaded uncompiled, it should (where possible) |
| 41 | ;; obey the doc-string conventions expected by make-docfile. | 41 | ;; obey the doc-string conventions expected by make-docfile. It |
| 42 | ;; should also be added to the uncompiled[] list in make-docfile.c. | ||
| 42 | 43 | ||
| 43 | ;;; Code: | 44 | ;;; Code: |
| 44 | 45 | ||
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index f464b42182d..f865a0269d4 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el | |||
| @@ -1134,7 +1134,23 @@ Repeated uses step through the possible completions." | |||
| 1134 | ;; through the previous possible completions. | 1134 | ;; through the previous possible completions. |
| 1135 | (let ((last (last all))) | 1135 | (let ((last (last all))) |
| 1136 | (setcdr last (cons (car all) (cdr last))) | 1136 | (setcdr last (cons (car all) (cdr last))) |
| 1137 | (completion--cache-all-sorted-completions (cdr all))))))) | 1137 | (completion--cache-all-sorted-completions (cdr all))) |
| 1138 | ;; Make sure repeated uses cycle, even though completion--done might | ||
| 1139 | ;; have added a space or something that moved us outside of the field. | ||
| 1140 | ;; (bug#12221). | ||
| 1141 | (let* ((table minibuffer-completion-table) | ||
| 1142 | (pred minibuffer-completion-predicate) | ||
| 1143 | (extra-prop completion-extra-properties) | ||
| 1144 | (cmd | ||
| 1145 | (lambda () "Cycle through the possible completions." | ||
| 1146 | (interactive) | ||
| 1147 | (let ((completion-extra-properties extra-prop)) | ||
| 1148 | (completion-in-region start (point) table pred))))) | ||
| 1149 | (set-temporary-overlay-map | ||
| 1150 | (let ((map (make-sparse-keymap))) | ||
| 1151 | (define-key map [remap completion-at-point] cmd) | ||
| 1152 | (define-key map (vector last-command-event) cmd) | ||
| 1153 | map))))))) | ||
| 1138 | 1154 | ||
| 1139 | (defvar minibuffer-confirm-exit-commands | 1155 | (defvar minibuffer-confirm-exit-commands |
| 1140 | '(completion-at-point minibuffer-complete | 1156 | '(completion-at-point minibuffer-complete |
| @@ -1557,7 +1573,6 @@ variables.") | |||
| 1557 | (let* ((exit-fun (plist-get completion-extra-properties :exit-function)) | 1573 | (let* ((exit-fun (plist-get completion-extra-properties :exit-function)) |
| 1558 | (pre-msg (and exit-fun (current-message)))) | 1574 | (pre-msg (and exit-fun (current-message)))) |
| 1559 | (cl-assert (memq finished '(exact sole finished unknown))) | 1575 | (cl-assert (memq finished '(exact sole finished unknown))) |
| 1560 | ;; FIXME: exit-fun should receive `finished' as a parameter. | ||
| 1561 | (when exit-fun | 1576 | (when exit-fun |
| 1562 | (when (eq finished 'unknown) | 1577 | (when (eq finished 'unknown) |
| 1563 | (setq finished | 1578 | (setq finished |
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) |