[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/simple.el [lexbind]
From: |
Miles Bader |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/simple.el [lexbind] |
Date: |
Tue, 06 Jul 2004 07:10:58 -0400 |
Index: emacs/lisp/simple.el
diff -c emacs/lisp/simple.el:1.551.2.14 emacs/lisp/simple.el:1.551.2.15
*** emacs/lisp/simple.el:1.551.2.14 Tue May 11 02:29:45 2004
--- emacs/lisp/simple.el Tue Jul 6 09:23:43 2004
***************
*** 3392,3406 ****
;; (Actually some major modes use a different auto-fill function,
;; but this one is the default one.)
(defun do-auto-fill ()
! (let (fc justify bol give-up
(fill-prefix fill-prefix))
(if (or (not (setq justify (current-justification)))
(null (setq fc (current-fill-column)))
(and (eq justify 'left)
(<= (current-column) fc))
! (save-excursion (beginning-of-line)
! (setq bol (point))
! (and auto-fill-inhibit-regexp
(looking-at auto-fill-inhibit-regexp))))
nil ;; Auto-filling not required
(if (memq justify '(full center right))
--- 3392,3405 ----
;; (Actually some major modes use a different auto-fill function,
;; but this one is the default one.)
(defun do-auto-fill ()
! (let (fc justify give-up
(fill-prefix fill-prefix))
(if (or (not (setq justify (current-justification)))
(null (setq fc (current-fill-column)))
(and (eq justify 'left)
(<= (current-column) fc))
! (and auto-fill-inhibit-regexp
! (save-excursion (beginning-of-line)
(looking-at auto-fill-inhibit-regexp))))
nil ;; Auto-filling not required
(if (memq justify '(full center right))
***************
*** 3423,3438 ****
;; Determine where to split the line.
(let* (after-prefix
(fill-point
! (let ((opoint (point)))
! (save-excursion
! (beginning-of-line)
! (setq after-prefix (point))
! (and fill-prefix
! (looking-at (regexp-quote fill-prefix))
! (setq after-prefix (match-end 0)))
! (move-to-column (1+ fc))
! (fill-move-to-break-point after-prefix)
! (point)))))
;; See whether the place we found is any good.
(if (save-excursion
--- 3422,3436 ----
;; Determine where to split the line.
(let* (after-prefix
(fill-point
! (save-excursion
! (beginning-of-line)
! (setq after-prefix (point))
! (and fill-prefix
! (looking-at (regexp-quote fill-prefix))
! (setq after-prefix (match-end 0)))
! (move-to-column (1+ fc))
! (fill-move-to-break-point after-prefix)
! (point))))
;; See whether the place we found is any good.
(if (save-excursion
***************
*** 4265,4280 ****
:group 'completion)
(defun completion-setup-function ()
! (save-excursion
! (let ((mainbuf (current-buffer))
! (mbuf-contents (minibuffer-contents)))
! ;; When reading a file name in the minibuffer,
! ;; set default-directory in the minibuffer
! ;; 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))))
! (set-buffer standard-output)
(completion-list-mode)
(make-local-variable 'completion-reference-buffer)
(setq completion-reference-buffer mainbuf)
--- 4263,4277 ----
:group 'completion)
(defun completion-setup-function ()
! (let ((mainbuf (current-buffer))
! (mbuf-contents (minibuffer-contents)))
! ;; When reading a file name in the minibuffer,
! ;; set default-directory in the minibuffer
! ;; 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))))
! (with-current-buffer standard-output
(completion-list-mode)
(make-local-variable 'completion-reference-buffer)
(setq completion-reference-buffer mainbuf)
***************
*** 4283,4306 ****
;; use the number of chars before the start of the
;; last file name component.
(setq completion-base-size
! (save-excursion
! (set-buffer mainbuf)
! (goto-char (point-max))
! (skip-chars-backward "^/")
! (- (point) (minibuffer-prompt-end))))
;; Otherwise, in minibuffer, the whole input is being completed.
! (save-match-data
! (if (minibufferp mainbuf)
! (setq completion-base-size 0))))
! ;; Put faces on first uncommon characters and common parts.
(when completion-base-size
! (let* ((common-string-length (length
! (substring mbuf-contents
! completion-base-size)))
(element-start (next-single-property-change
(point-min)
'mouse-face))
! (element-common-end (+ element-start common-string-length))
(maxp (point-max)))
(while (and element-start (< element-common-end maxp))
(when (and (get-char-property element-start 'mouse-face)
--- 4280,4302 ----
;; use the number of chars before the start of the
;; last file name component.
(setq completion-base-size
! (with-current-buffer mainbuf
! (save-excursion
! (goto-char (point-max))
! (skip-chars-backward "^/")
! (- (point) (minibuffer-prompt-end)))))
;; Otherwise, in minibuffer, the whole input is being completed.
! (if (minibufferp mainbuf)
! (setq completion-base-size 0)))
! ;; Put faces on first uncommon characters and common parts.
(when completion-base-size
! (let* ((common-string-length
! (- (length mbuf-contents) completion-base-size))
(element-start (next-single-property-change
(point-min)
'mouse-face))
! (element-common-end
! (+ (or element-start nil) common-string-length))
(maxp (point-max)))
(while (and element-start (< element-common-end maxp))
(when (and (get-char-property element-start 'mouse-face)
***************
*** 4764,4768 ****
(provide 'simple)
! ;;; arch-tag: 24af67c0-2a49-44f6-b3b1-312d8b570dfd
;;; simple.el ends here
--- 4760,4764 ----
(provide 'simple)
! ;; arch-tag: 24af67c0-2a49-44f6-b3b1-312d8b570dfd
;;; simple.el ends here
- [Emacs-diffs] Changes to emacs/lisp/simple.el [lexbind], Miles Bader, 2004/07/06
- [Emacs-diffs] Changes to emacs/lisp/simple.el [lexbind], Miles Bader, 2004/07/06
- [Emacs-diffs] Changes to emacs/lisp/simple.el [lexbind], Miles Bader, 2004/07/06
- [Emacs-diffs] Changes to emacs/lisp/simple.el [lexbind], Miles Bader, 2004/07/06
- [Emacs-diffs] Changes to emacs/lisp/simple.el [lexbind],
Miles Bader <=
- [Emacs-diffs] Changes to emacs/lisp/simple.el [lexbind], Miles Bader, 2004/07/16
- [Emacs-diffs] Changes to emacs/lisp/simple.el [lexbind], Miles Bader, 2004/07/23