remove `declare' macro
[bpt/emacs.git] / lisp / term.el
index 87898ba..95660ea 100644 (file)
@@ -975,9 +975,8 @@ is buffer-local."
           (display-graphic-p)
           overflow-newline-into-fringe
           (/= (frame-parameter nil 'right-fringe) 0))
-      ;; Call window-text-width instead of window-width (Bug#16470).
-      (window-text-width)
-    (1- (window-text-width))))
+      (window-body-width)
+    (1- (window-body-width))))
 
 \f
 (put 'term-mode 'mode-class 'special)
@@ -3633,7 +3632,7 @@ all pending output has been dealt with."))
            (if (< down 0) term-scroll-start term-scroll-end))))
     (when (or (and (< down 0) (< scroll-needed 0))
              (and (> down 0) (> scroll-needed 0)))
-      (let ((save-point (copy-marker (point))) (save-top))
+      (let ((save-point (point-marker)) (save-top))
        (goto-char term-home-marker)
        (cond (term-scroll-with-delete
               (if (< down 0)
@@ -4138,8 +4137,9 @@ Typing SPC flushes the help buffer."
            (and (consp first)
                 (eq (window-buffer (posn-window (event-start first)))
                     (get-buffer "*Completions*"))
-                (eq (key-binding key) 'mouse-choose-completion)))
-         ;; If the user does mouse-choose-completion with the mouse,
+                (memq (key-binding key)
+                       '(mouse-choose-completion choose-completion))))
+         ;; If the user does choose-completion with the mouse,
          ;; execute the command, then delete the completion window.
          (progn
            (choose-completion first)