diff options
| author | Glenn Morris | 2013-06-01 11:06:56 -0700 |
|---|---|---|
| committer | Glenn Morris | 2013-06-01 11:06:56 -0700 |
| commit | 31e7b090350955c8fc91e32ffb2bfaeaf30f87ce (patch) | |
| tree | 6234c7ec992012c4dc2929baa4d92f9534b85a71 /lisp/progmodes | |
| parent | 7225c83207c8f28eeb919c39337e1e44582dff2c (diff) | |
| download | emacs-31e7b090350955c8fc91e32ffb2bfaeaf30f87ce.tar.gz emacs-31e7b090350955c8fc91e32ffb2bfaeaf30f87ce.zip | |
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.
Diffstat (limited to 'lisp/progmodes')
| -rw-r--r-- | lisp/progmodes/cc-vars.el | 19 |
1 files changed, 12 insertions, 7 deletions
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 @@ | |||
| 51 | 51 | ||
| 52 | ;;; Helpers | 52 | ;;; Helpers |
| 53 | 53 | ||
| 54 | ;; This widget exists in newer versions of the Custom library | 54 | |
| 55 | (or (get 'other 'widget-type) | 55 | ;; Emacs has 'other since at least version 21.1. |
| 56 | (define-widget 'other 'sexp | 56 | ;; FIXME this is probably broken, since the widget is defined |
| 57 | "Matches everything, but doesn't let the user edit the value. | 57 | ;; in wid-edit, which this file does not load. So we will always |
| 58 | ;; define the widget, even when we don't need to. | ||
| 59 | (when (featurep 'xemacs) | ||
| 60 | (or (get 'other 'widget-type) | ||
| 61 | (define-widget 'other 'sexp | ||
| 62 | "Matches everything, but doesn't let the user edit the value. | ||
| 58 | Useful as last item in a `choice' widget." | 63 | Useful as last item in a `choice' widget." |
| 59 | :tag "Other" | 64 | :tag "Other" |
| 60 | :format "%t%n" | 65 | :format "%t%n" |
| 61 | :value 'other)) | 66 | :value 'other))) |
| 62 | 67 | ||
| 63 | ;; The next defun will supersede c-const-symbol. | 68 | ;; The next defun will supersede c-const-symbol. |
| 64 | (eval-and-compile | 69 | (eval-and-compile |