From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.help Subject: Re: Customize: Space char in `character' specification Date: Sun, 21 May 2006 12:23:01 +0200 Message-ID: <44703F85.7020400@gmx.at> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------000603040708020003090805" X-Trace: sea.gmane.org 1148225039 1079 80.91.229.2 (21 May 2006 15:23:59 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 21 May 2006 15:23:59 +0000 (UTC) Cc: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun May 21 17:23:54 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Fhpma-0003MM-SK for geh-help-gnu-emacs@m.gmane.org; Sun, 21 May 2006 17:23:53 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fhpma-0007Zy-AT for geh-help-gnu-emacs@m.gmane.org; Sun, 21 May 2006 11:23:52 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fhl5u-0007yU-Aq for help-gnu-emacs@gnu.org; Sun, 21 May 2006 06:23:30 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fhl5s-0007yI-Tr for help-gnu-emacs@gnu.org; Sun, 21 May 2006 06:23:30 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fhl5s-0007yF-Nr for help-gnu-emacs@gnu.org; Sun, 21 May 2006 06:23:28 -0400 Original-Received: from [213.165.64.20] (helo=mail.gmx.net) by monty-python.gnu.org with smtp (Exim 4.52) id 1Fhl9c-0007n1-ID for help-gnu-emacs@gnu.org; Sun, 21 May 2006 06:27:20 -0400 Original-Received: (qmail invoked by alias); 21 May 2006 10:23:27 -0000 Original-Received: from N705P008.adsl.highway.telekom.at (EHLO [62.47.32.8]) [62.47.32.8] by mail.gmx.net (mp010) with SMTP; 21 May 2006 12:23:27 +0200 X-Authenticated: #14592706 User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: de-DE, de, en-us, en Original-To: reinersteib+gmane@imap.cc X-Y-GMX-Trusted: 0 X-Mailman-Approved-At: Sun, 21 May 2006 11:23:14 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:35188 Archived-At: This is a multi-part message in MIME format. --------------000603040708020003090805 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Try the attached patch. martin --------------000603040708020003090805 Content-Type: text/plain; name="wid-edit.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="wid-edit.patch" *** wid-edit.el Tue Apr 11 16:23:54 2006 --- wid-edit.el Sun May 21 12:18:38 2006 *************** *** 3380,3385 **** --- 3380,3386 ---- :value 0 :size 1 :format "%{%t%}: %v\n" + :value-get 'widget-character-value-get :valid-regexp "\\`.\\'" :error "This field should contain a single character" :value-to-internal (lambda (widget value) *************** *** 3393,3398 **** --- 3394,3395 ---- :match (lambda (widget value) (char-valid-p value))) + (defun widget-character-value-get (widget) + "Return character value." + (let ((from (widget-field-start widget)) + (to (widget-field-end widget)) + (buffer (widget-field-buffer widget)) + (secret (widget-get widget :secret)) + (old (current-buffer))) + (if (and from to) + (progn + (set-buffer buffer) + (let ((result (buffer-substring-no-properties from to))) + (when secret + (let ((index 0)) + (while (< (+ from index) to) + (aset result index + (get-char-property (+ from index) 'secret)) + (setq index (1+ index))))) + (set-buffer old) + result)) + (widget-get widget :value)))) + (define-widget 'list 'group "A Lisp list." :tag "List" --------------000603040708020003090805 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ help-gnu-emacs mailing list help-gnu-emacs@gnu.org http://lists.gnu.org/mailman/listinfo/help-gnu-emacs --------------000603040708020003090805--