🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.vm.bug
Article #551

Re: vm-add-message-labels

#551
From: newsspam5REMOVETHIS
Date: Sun, 08 Apr 2007 23:39
43 lines
2508 bytes
Robert Marshall <spam@chezmarshall.freeserve.co.uk> writes:

> vm-add-message-labels doesn't check that there is anything in
> vm-label-obarray before asking the user to select from it. A check
> against nil and an error message would be IMHO more helpful than the
> current behaviour of producing a prompt to which any reply gives:
>
>                  Wrong type argument: char-or-string-p, nil

The following patch should fix it.

Robert

=== modified file 'lisp/vm-minibuf.el'
--- lisp/vm-minibuf.el	2007-03-13 23:02:32 +0000
+++ lisp/vm-minibuf.el	2007-04-08 23:37:12 +0000
@@ -18,6 +18,7 @@
 ;; 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
 ;;; Code:
+
 ;;;###autoload
 (defun vm-minibuffer-complete-word (&optional exiting)
   (interactive)
@@ -90,14 +91,16 @@
       (setq diff (- (length completion) (length word)))
       (cond
        ;; We have some completion chars.  Insert them.
-       ((or (> diff 0)
-	    (and (zerop diff) (not (string-equal completion word))))
+       ((or (> diff 0) 
+	    (and completion (zerop diff) (not (string-equal completion word))))
 	(goto-char end)
 	(delete-char (- (length word)))
 	(insert completion)
 	(if (and vm-completion-auto-space
 		 (null (cdr trimmed-c-list)))
 	    (insert " ")))
+       ((null completion)
+        (vm-minibuffer-completion-message "[No completion available]"))
        ;; The word prefixed more than one string, but we can't complete
        ;; any further.  Either give help or say "Ambiguous".
        ((zerop diff)
Technical Details
Message-ID: <85mz1iv3ke.fsf@robf.de>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.germany.com!news.space.net!news.m-online.net!not-for-mail
References: <m18xd463ra.fsf@chezmarshall.freeserve.co.uk>

Show Full Headers
Complete Article Headers
X-Google-Thread: f6829,7c0d520b7465f34b
X-Google-Attributes: gidf6829,public
X-Google-Language: ENGLISH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.germany.com!news.space.net!news.m-online.net!not-for-mail
From: newsspam5REMOVETHIS@robf.de
Newsgroups: gnu.emacs.vm.bug
Subject: Re: vm-add-message-labels
Date: Mon, 09 Apr 2007 01:39:29 +0200
Organization: (posted via) M-net Telekommunikations GmbH
Lines: 45
Message-ID: <85mz1iv3ke.fsf@robf.de>
References: <m18xd463ra.fsf@chezmarshall.freeserve.co.uk>
NNTP-Posting-Host: ppp-82-135-66-164.dynamic.mnet-online.de
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: svr7.m-online.net 1176075572 17243 82.135.66.164 (8 Apr 2007 23:39:32 GMT)
X-Complaints-To: abuse@m-online.net
NNTP-Posting-Date: Sun, 8 Apr 2007 23:39:32 +0000 (UTC)
User-Agent: Gnus/5.1007 (Gnus v5.10.7) XEmacs/21.4.19 (linux)
Cancel-Lock: sha1:4kqfrZZwT7wk90k9zHfC3EPLJXg=