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 | |
| 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.
| -rw-r--r-- | lisp/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/progmodes/cc-vars.el | 19 |
2 files changed, 15 insertions, 7 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 85430128e9f..02182474b5f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2013-06-01 Glenn Morris <rgm@gnu.org> | 1 | 2013-06-01 Glenn Morris <rgm@gnu.org> |
| 2 | 2 | ||
| 3 | * progmodes/cc-vars.el (other): Emacs has this widget since | ||
| 4 | at least 21.1, so don't (re)define it. | ||
| 5 | |||
| 3 | * eshell/em-cmpl.el (eshell-cmpl-initialize): | 6 | * eshell/em-cmpl.el (eshell-cmpl-initialize): |
| 4 | Replace the obsolete alias pcomplete-arg-quote-list. | 7 | Replace the obsolete alias pcomplete-arg-quote-list. |
| 5 | 8 | ||
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 |