Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
f014d22e
Commit
f014d22e
authored
Feb 17, 1998
by
Richard M. Stallman
Browse files
(c-copy-tree): New function.
(c-initialize-builtin-style): Use c-copy-tree.
parent
87f235fb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
15 deletions
+11
-15
lisp/progmodes/cc-styles.el
lisp/progmodes/cc-styles.el
+11
-15
No files found.
lisp/progmodes/cc-styles.el
View file @
f014d22e
...
...
@@ -584,26 +584,13 @@ offset for that syntactic element. Optional ADD says to add SYMBOL to
(
c-initialize-cc-mode
t
)
(
or
(
assoc
"cc-mode"
c-style-alist
)
(
assoc
"user"
c-style-alist
)
(
let
(
copyfunc
)
;; use built-in copy-tree if its there.
(
if
(
and
(
fboundp
'copy-tree
)
(
functionp
(
symbol-function
'copy-tree
)))
(
setq
copyfunc
(
symbol-function
'copy-tree
))
(
setq
copyfunc
(
lambda
(
tree
)
(
if
(
consp
tree
)
(
cons
(
funcall
copyfunc
(
car
tree
))
(
funcall
copyfunc
(
cdr
tree
)))
tree
))))
(
progn
(
c-add-style
"user"
(
mapcar
(
function
(
lambda
(
var
)
(
let
((
val
(
symbol-value
var
)))
(
cons
var
(
if
(
atom
val
)
val
(
funcall
copyfunc
val
)
))
)))
(
cons
var
(
c-copy-tree
val
)))))
'
(
c-backslash-column
c-basic-offset
c-cleanup-list
...
...
@@ -622,6 +609,15 @@ offset for that syntactic element. Optional ADD says to add SYMBOL to
(
if
c-style-variables-are-local-p
(
c-make-styles-buffer-local
)))
(
defun
c-copy-tree
(
tree
)
(
if
(
consp
tree
)
(
if
(
consp
(
cdr
tree
))
(
cons
(
c-copy-tree
(
car
tree
))
(
cons
(
c-copy-tree
(
cadr
tree
))
(
c-copy-tree
(
cddr
tree
))))
(
cons
(
c-copy-tree
(
car
tree
))
(
c-copy-tree
(
cdr
tree
))))
tree
))
(
defun
c-make-styles-buffer-local
(
&optional
this-buf-only-p
)
"Make all CC Mode style variables buffer local.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment