all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#9661: 24.0.90; language-info-custom-alist defcustom
@ 2011-10-03 11:23 Stephen Berman
  2011-10-03 14:22 ` Stefan Monnier
  0 siblings, 1 reply; 5+ messages in thread
From: Stephen Berman @ 2011-10-03 11:23 UTC (permalink / raw)
  To: 9661

In GNU Emacs 24.0.90.2 (i686-suse-linux-gnu, GTK+ Version 2.22.1) of
 2011-10-03 on escher 
Windowing system distributor `The X.Org Foundation', version 11.0.10903000
configured using `configure  '--without-toolkit-scroll-bars' 'CFLAGS=-g''

1. emacs -Q
2. M-x customize-option RET language-info-custom-alist RET.
3. Click or hit RET on the INS button to open up the customization
widgets. 
4. Move the cursor to the first editable field, labelled "Language
environment".
5. Type ESC TAB, which should pop up a list of completions; instead:
=> An error is signalled: "completion--some: Invalid function:
(apply-partially (function completion-table-case-fold)
language-info-alist)"

The same error occurs on typing ESC TAB in the editable field associated
with the key "input-method".  In the other editable fields, however,
completion works.

I believe the errors are due to the use of the :completions keyword on
the string widget in the defcustom code of language-info-custom-alist.
If I understand the source in the wid-edit library, the string widget
does not support this keyword.  One way to fix this is to define new
widgets in the string class that have suitable values for :completions;
the patch below does this.  Since these widgets are specific to the mule
API the patch puts them into mule-cmds.el (like e.g. the definition of
the charset widget).  It would probably be better to have a more general
and modular solution, but I leave that to the widget gurus.


*** /data/steve/bzr/emacs/trunk/lisp/international/mule-cmds.el	2011-09-17 14:20:08.000000000 +0200
--- /data/steve/bzr/emacs/quickfixes/lisp/international/mule-cmds.el	2011-10-03 13:15:21.000000000 +0200
***************
*** 1891,1896 ****
--- 1891,1906 ----
  		widget))
    :prompt-history 'charset-history)
  
+ (define-widget 'language-environment-string 'string
+   "String widget with completion for language environment."
+   :completions (apply-partially #'completion-table-case-fold
+ 				language-info-alist))
+ 
+ (define-widget 'input-method-string 'string
+   "String widget with completion for input method."
+   :completions (apply-partially #'completion-table-case-fold
+ 				input-method-alist))
+ 
  (defcustom language-info-custom-alist nil
    "Customizations of language environment parameters.
  Value is an alist with elements like those of `language-info-alist'.
***************
*** 1915,1924 ****
  	   ;; re-set the environment in case its parameters changed
  	   (set-language-environment current-language-environment)))
    :type `(alist
! 	  :key-type (string :tag "Language environment"
! 			    :completions
!                             (apply-partially #'completion-table-case-fold
!                                              language-info-alist))
  	  :value-type
  	  (alist :key-type symbol
  		 :options ((documentation string)
--- 1925,1932 ----
  	   ;; re-set the environment in case its parameters changed
  	   (set-language-environment current-language-environment)))
    :type `(alist
! 	  :key-type (language-environment-string
! 		     :tag "Language environment")
  	  :value-type
  	  (alist :key-type symbol
  		 :options ((documentation string)
***************
*** 1930,1939 ****
  			   (coding-priority (repeat coding-system))
  			   (nonascii-translation charset)
  			   (input-method
! 			    (string
! 			     :completions
!                              (apply-partially #'completion-table-case-fold
!                                               input-method-alist)
  			     :prompt-history input-method-history))
  			   (features (repeat symbol))
  			   (unibyte-display coding-system)))))
--- 1938,1944 ----
  			   (coding-priority (repeat coding-system))
  			   (nonascii-translation charset)
  			   (input-method
! 			    (input-method-string
  			     :prompt-history input-method-history))
  			   (features (repeat symbol))
  			   (unibyte-display coding-system)))))





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-10-04 13:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-03 11:23 bug#9661: 24.0.90; language-info-custom-alist defcustom Stephen Berman
2011-10-03 14:22 ` Stefan Monnier
2011-10-04  7:37   ` Stephen Berman
2011-10-04 13:01     ` Stefan Monnier
2011-10-04 13:06       ` Stephen Berman

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.