[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Error occur in completion-setup-function()
From: |
Hideyuki SHIRAI |
Subject: |
Error occur in completion-setup-function() |
Date: |
Fri, 04 Feb 2005 20:35:57 +0900 (JST) |
Hello,
I think that found a bug at completion-setup-function() in
simple.el. Please try this code and type 'tab'.
(let ()
(setq test-map (make-sparse-keymap))
(define-key test-map "\t" 'test-completion)
(define-key test-map "\C-m" 'exit-minibuffer)
(defun test-completion ()
(interactive)
(with-output-to-temp-buffer
"*tmp*"
(display-completion-list nil)))
(read-from-minibuffer "Type TAB: " nil test-map))
Such an error occurs,
Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
+(nil 0)
(let* ((common-string-length ...) (element-start ...) (element-common-end
...) (maxp ...)) (while (and element-start ...) (when ... ... ...) (setq
element-start ...) (if element-start ...)))
(progn (let* (... ... ... ...) (while ... ... ... ...)))
(if completion-base-size (progn (let* ... ...)))
(when completion-base-size (let* (... ... ... ...) (while ... ... ... ...)))
(save-current-buffer (set-buffer standard-output) <<snip>>
(with-current-buffer standard-output (completion-list-mode) <<snip>>
(let ((mainbuf ...) (mbuf-contents ...)) <<snip>>
completion-setup-function()
run-hooks(completion-setup-hook)
display-completion-list(nil)
(with-output-to-temp-buffer "*tmp*" (display-completion-list nil))
test-completion()
By the way, emacs-21.3 worked. To my thinking,
(defun completion-setup-function ()
<<snip>>
(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))
~~~
that 0, point-min() or minibuffer-prompt-end() is correct of
this `nil'.
--
Hideyuki SHIRAI
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Error occur in completion-setup-function(),
Hideyuki SHIRAI <=