# HG changeset patch # User Richard M. Stallman # Date 1173030536 0 # Node ID d84c0ae58cc7572856fe418274fb660b05dd2ce1 # Parent 24e13e715a20d114e5ed2b181e845dd053fee36f (beginning-of-buffer, end-of-buffer): Avoid treating plain C-u like numeric arg. (completion-setup-function): Don't set default-directory to nil. diff -r 24e13e715a20 -r d84c0ae58cc7 lisp/simple.el --- a/lisp/simple.el Sun Mar 04 17:47:19 2007 +0000 +++ b/lisp/simple.el Sun Mar 04 17:48:56 2007 +0000 @@ -758,7 +758,7 @@ (/ 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 @@ (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 @@ ;; 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)