summaryrefslogtreecommitdiff
path: root/lisp/simple.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>2007-03-04 17:48:56 +0000
committerRichard M. Stallman <rms@gnu.org>2007-03-04 17:48:56 +0000
commitd7e7ecd748c0de17e5d8923a51e7c53d6dce18af (patch)
tree6c29b618f3f3f5d1e1a7a3ce3d1957366bebdd96 /lisp/simple.el
parent4dea1735d4fd173dd8b7a160229093e2588a1a9a (diff)
downloademacs-d7e7ecd748c0de17e5d8923a51e7c53d6dce18af.tar.gz
(beginning-of-buffer, end-of-buffer):
Avoid treating plain C-u like numeric arg. (completion-setup-function): Don't set default-directory to nil.
Diffstat (limited to 'lisp/simple.el')
-rw-r--r--lisp/simple.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index 44408c4f427..4b3ebecb12c 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -758,7 +758,7 @@ Don't use this command in Lisp programs!
(/ size 10))
(/ (+ 10 (* size (prefix-numeric-value arg))) 10)))
(point-min))))
- (if arg (forward-line 1)))
+ (if (and arg (not (consp arg))) (forward-line 1)))
(defun end-of-buffer (&optional arg)
"Move point to the end of the buffer; leave mark at previous position.
@@ -785,7 +785,7 @@ Don't use this command in Lisp programs!
(point-max))))
;; If we went to a place in the middle of the buffer,
;; adjust it to the beginning of a line.
- (cond (arg (forward-line 1))
+ (cond ((and arg (not (consp arg))) (forward-line 1))
((> (point) (window-end nil t))
;; If the end of the buffer is not already on the screen,
;; then scroll specially to put it near, but not at, the bottom.
@@ -5088,7 +5088,8 @@ of the minibuffer before point is always the common substring.)")
;; so it will get copied into the completion list buffer.
(if minibuffer-completing-file-name
(with-current-buffer mainbuf
- (setq default-directory (file-name-directory mbuf-contents))))
+ (setq default-directory (or (file-name-directory mbuf-contents)
+ default-directory))))
(with-current-buffer standard-output
(completion-list-mode)
(set (make-local-variable 'completion-reference-buffer) mainbuf)