emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r112814: Don't (re)define a basic cus


From: Glenn Morris
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r112814: Don't (re)define a basic custom widget in cc-vars
Date: Sat, 01 Jun 2013 11:06:56 -0700
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 112814
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Sat 2013-06-01 11:06:56 -0700
message:
  Don't (re)define a basic custom widget in cc-vars
  
  * lisp/progmodes/cc-vars.el (other): Emacs has this widget since at
  least 21.1, so don't (re)define it.
modified:
  lisp/ChangeLog
  lisp/progmodes/cc-vars.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-06-01 18:00:14 +0000
+++ b/lisp/ChangeLog    2013-06-01 18:06:56 +0000
@@ -1,5 +1,8 @@
 2013-06-01  Glenn Morris  <address@hidden>
 
+       * progmodes/cc-vars.el (other): Emacs has this widget since
+       at least 21.1, so don't (re)define it.
+
        * eshell/em-cmpl.el (eshell-cmpl-initialize):
        Replace the obsolete alias pcomplete-arg-quote-list.
 

=== modified file 'lisp/progmodes/cc-vars.el'
--- a/lisp/progmodes/cc-vars.el 2013-05-31 07:05:55 +0000
+++ b/lisp/progmodes/cc-vars.el 2013-06-01 18:06:56 +0000
@@ -51,14 +51,19 @@
 
 ;;; Helpers
 
-;; This widget exists in newer versions of the Custom library
-(or (get 'other 'widget-type)
-    (define-widget 'other 'sexp
-      "Matches everything, but doesn't let the user edit the value.
+
+;; Emacs has 'other since at least version 21.1.
+;; FIXME this is probably broken, since the widget is defined
+;; in wid-edit, which this file does not load.  So we will always
+;; define the widget, even when we don't need to.
+(when (featurep 'xemacs)
+  (or (get 'other 'widget-type)
+      (define-widget 'other 'sexp
+       "Matches everything, but doesn't let the user edit the value.
 Useful as last item in a `choice' widget."
-      :tag "Other"
-      :format "%t%n"
-      :value 'other))
+       :tag "Other"
+       :format "%t%n"
+       :value 'other)))
 
 ;; The next defun will supersede c-const-symbol.
 (eval-and-compile


reply via email to

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