From: Glenn Morris Date: Sat, 1 Jun 2013 18:06:56 +0000 (-0700) Subject: Don't (re)define a basic custom widget in cc-vars X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~2026^2~99 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=31e7b090350955c8fc91e32ffb2bfaeaf30f87ce;p=emacs.git 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. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 85430128e9f..02182474b5f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2013-06-01 Glenn Morris + * 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. diff --git a/lisp/progmodes/cc-vars.el b/lisp/progmodes/cc-vars.el index f97e8d1483b..7a9181db716 100644 --- a/lisp/progmodes/cc-vars.el +++ b/lisp/progmodes/cc-vars.el @@ -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