emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Finding faces to customize


From: Juri Linkov
Subject: Re: Finding faces to customize
Date: Sat, 02 Jul 2005 03:05:59 +0300
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

> I fixed these bugs in crm.el.  Thanks.

There are still three more bugs.  Typing TAB with no more completions
moves point into the read-only area.  This happens, for example,
after evaluating

(completing-read-multiple "Prompt: " '(("hi") ("there")))

and typing `h TAB TAB'.

The second bug doesn't allow RET without input string to return an empty
string ("") when `require-match' arg is t, like `completing-read' does.

The third bug occurs when trying to exit the minibuffer with RET.
It signals an error " [An element did not match]" even for a valid
completion.

This patch should fix all three bugs:

Index: lisp/emacs-lisp/crm.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/emacs-lisp/crm.el,v
retrieving revision 1.6
diff -c -r1.6 crm.el
*** lisp/emacs-lisp/crm.el      1 Jul 2005 01:10:42 -0000       1.6
--- lisp/emacs-lisp/crm.el      2 Jul 2005 00:05:27 -0000
***************
*** 214,220 ****
        (progn
        ;;
        (setq crm-beginning-of-element (match-beginning 1))
!       (setq crm-end-of-element end-index)
        ;; string to the left of the current element
        (setq crm-left-of-element
              (substring target-string 0 (match-beginning 1)))
--- 214,220 ----
        (progn
        ;;
        (setq crm-beginning-of-element (match-beginning 1))
!       (setq crm-end-of-element (+ end-index prompt-end))
        ;; string to the left of the current element
        (setq crm-left-of-element
              (substring target-string 0 (match-beginning 1)))
***************
*** 482,488 ****
        (setq result
            (catch 'crm-exit
  
!             (if (eq (point-min) (point-max))
                  (throw 'crm-exit t))
  
              ;; TODO: this test is suspect?
--- 482,488 ----
        (setq result
            (catch 'crm-exit
  
!             (if (eq (minibuffer-prompt-end) (point-max))
                  (throw 'crm-exit t))
  
              ;; TODO: this test is suspect?
***************
*** 508,514 ****
          nil
        (if (equal result "check")
            (let ((check-strings
!                  (crm-strings-completed-p (buffer-string))))
              ;; check all of minibuffer
              (if (eq check-strings t)
                  (throw 'exit nil)
--- 508,515 ----
          nil
        (if (equal result "check")
            (let ((check-strings
!                  (crm-strings-completed-p
!                   (buffer-substring (minibuffer-prompt-end) (point-max)))))
              ;; check all of minibuffer
              (if (eq check-strings t)
                  (throw 'exit nil)

-- 
Juri Linkov
http://www.jurta.org/emacs/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]