[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/progmodes/cc-vars.el, v [EMACS_22_BA
From: |
Alan Mackenzie |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/progmodes/cc-vars.el, v [EMACS_22_BASE] |
Date: |
Mon, 14 Jan 2008 22:31:08 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Branch: EMACS_22_BASE
Changes by: Alan Mackenzie <acmacm> 08/01/14 22:31:08
Index: cc-vars.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/progmodes/cc-vars.el,v
retrieving revision 1.54.2.7
retrieving revision 1.54.2.8
diff -u -b -r1.54.2.7 -r1.54.2.8
--- cc-vars.el 7 Jan 2008 02:10:56 -0000 1.54.2.7
+++ cc-vars.el 14 Jan 2008 22:31:07 -0000 1.54.2.8
@@ -73,8 +73,27 @@
:format "%t%n"
:value 'other))
+;; The next defun will supersede c-const-symbol.
+(defun c-constant-symbol (sym len)
+ "Create an uneditable symbol for customization buffers.
+SYM is the name of the symbol, LEN the length of the field (in
+characters) the symbol will be displayed in. LEN must be big
+enough.
+
+This returns a (const ....) structure, suitable for embedding
+within a customization type."
+ (or (symbolp sym) (error "c-constant-symbol: %s is not a symbol" sym))
+ (let* ((name (symbol-name sym))
+ (l (length name))
+ (disp (concat name ":" (make-string (- len l 1) ?\ ))))
+ `(const
+ :size ,len
+ :format ,disp
+ :value ,sym)))
+
(define-widget 'c-const-symbol 'item
- "An uneditable lisp symbol."
+ "An uneditable lisp symbol. This is obsolete -
+use c-constant-symbol instead."
:value nil
:tag "Symbol"
:format "%t: %v\n%d"
@@ -395,9 +414,7 @@
`(set ,@(mapcar
(lambda (elt)
`(cons :format "%v"
- (c-const-symbol :format "%v: "
- :size 20
- :value ,elt)
+ ,(c-constant-symbol elt 20)
(choice
:format "%[Choice%] %v"
:value (column . nil)
@@ -732,18 +749,15 @@
`(set ,@(mapcar
(lambda (elt)
`(cons :format "%v"
- (c-const-symbol :format "%v: "
- :size 20
- :value ,elt)
+ ,(c-constant-symbol elt 24)
(choice :format "%[Choice%] %v"
:value (before after)
(set :menu-tag "Before/after"
:format "Newline %v brace\n"
(const :format "%v, " before)
- (const :format "%v" after))
+ (const :format "%v " after))
(function :menu-tag "Function"
- :format "Run function: %v"
- :value c-))))
+ :format "Run function: %v"))))
'(defun-open defun-close
class-open class-close
inline-open inline-close
@@ -779,10 +793,8 @@
`(set ,@(mapcar
(lambda (elt)
`(cons :format "%v"
- (c-const-symbol :format "%v: "
- :size 20
- :value ,elt)
- (set :format "Newline %v brace\n"
+ ,(c-constant-symbol elt 20)
+ (set :format "Newline %v colon\n"
(const :format "%v, " before)
(const :format "%v" after))))
'(case-label label access-label member-init-intro inher-intro)))
@@ -1296,8 +1308,7 @@
(lambda (elt)
`(cons :format "%v"
:value ,elt
- (c-const-symbol :format "%v: "
- :size 25)
+ ,(c-constant-symbol (car elt) 25)
(sexp :format "%v"
:validate
(lambda (widget)
- [Emacs-diffs] Changes to emacs/lisp/progmodes/cc-vars.el, v [EMACS_22_BASE], Glenn Morris, 2008/01/06
- [Emacs-diffs] Changes to emacs/lisp/progmodes/cc-vars.el, v [EMACS_22_BASE],
Alan Mackenzie <=
- [Emacs-diffs] Changes to emacs/lisp/progmodes/cc-vars.el, v [EMACS_22_BASE], Alan Mackenzie, 2008/01/16
- [Emacs-diffs] Changes to emacs/lisp/progmodes/cc-vars.el, v [EMACS_22_BASE], Dan Nicolaescu, 2008/01/19
- [Emacs-diffs] Changes to emacs/lisp/progmodes/cc-vars.el, v [EMACS_22_BASE], Alan Mackenzie, 2008/01/26