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
b68581e2
Commit
b68581e2
authored
Jun 23, 2012
by
Stefan Monnier
Browse files
* lisp/emacs-lisp/cl-macs.el (cl--make-usage-args): Handle improper lists.
Fixes: debbugs:11719
parent
e33c6771
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
24 deletions
+35
-24
lisp/ChangeLog
lisp/ChangeLog
+3
-0
lisp/emacs-lisp/cl-loaddefs.el
lisp/emacs-lisp/cl-loaddefs.el
+2
-2
lisp/emacs-lisp/cl-macs.el
lisp/emacs-lisp/cl-macs.el
+30
-22
No files found.
lisp/ChangeLog
View file @
b68581e2
2012-06-23 Stefan Monnier <monnier@iro.umontreal.ca>
* emacs-lisp/cl-macs.el (cl--make-usage-args): Handle improper lists
(bug#11719).
* minibuffer.el (completion--twq-try): Try to fail more gracefully when
the requote function doesn't work properly (bug#11714).
...
...
lisp/emacs-lisp/cl-loaddefs.el
View file @
b68581e2
...
...
@@ -11,7 +11,7 @@
;;;;;; cl--set-frame-visible-p cl--map-overlays cl--map-intervals
;;;;;; cl--map-keymap-recursively cl-notevery cl-notany cl-every
;;;;;; cl-some cl-mapcon cl-mapcan cl-mapl cl-maplist cl-map cl--mapcar-many
;;;;;; cl-equalp cl-coerce) "cl-extra" "cl-extra.el" "
25963dec757a527e3be3ba7f7abc49ee
")
;;;;;; cl-equalp cl-coerce) "cl-extra" "cl-extra.el" "
3656b89f2196d70e50ba9d7bb9519416
")
;;; Generated autoloads from cl-extra.el
(
autoload
'cl-coerce
"cl-extra"
"\
...
...
@@ -265,7 +265,7 @@ Remove from SYMBOL's plist the property PROPNAME and its value.
;;;;;; cl-return cl-block cl-etypecase cl-typecase cl-ecase cl-case
;;;;;; cl-load-time-value cl-eval-when cl-destructuring-bind cl-function
;;;;;; cl-defmacro cl-defun cl-gentemp cl-gensym) "
cl-macs
" "
cl-macs.el
"
;;;;;; "
66d8d151a97f91a79ebe3d1a9d699483
")
;;;;;; "
41a15289eda7e6ae03ac9edd86bbb1a6
")
;;; Generated autoloads from cl-macs.el
(autoload 'cl-gensym "
cl-macs
" "
\
...
...
lisp/emacs-lisp/cl-macs.el
View file @
b68581e2
...
...
@@ -350,28 +350,36 @@ its argument list allows full Common Lisp conventions."
(
t
x
)))
(
defun
cl--make-usage-args
(
arglist
)
;; `orig-args' can contain &cl-defs (an internal
;; CL thingy I don't understand), so remove it.
(
let
((
x
(
memq
'&cl-defs
arglist
)))
(
when
x
(
setq
arglist
(
delq
(
car
x
)
(
remq
(
cadr
x
)
arglist
)))))
(
let
((
state
nil
))
(
mapcar
(
lambda
(
x
)
(
cond
((
symbolp
x
)
(
if
(
eq
?\&
(
aref
(
symbol-name
x
)
0
))
(
setq
state
x
)
(
make-symbol
(
upcase
(
symbol-name
x
)))))
((
not
(
consp
x
))
x
)
((
memq
state
'
(
nil
&rest
))
(
cl--make-usage-args
x
))
(
t
;(VAR INITFORM SVAR) or ((KEYWORD VAR) INITFORM SVAR).
(
cl-list*
(
if
(
and
(
consp
(
car
x
))
(
eq
state
'&key
))
(
list
(
caar
x
)
(
cl--make-usage-var
(
nth
1
(
car
x
))))
(
cl--make-usage-var
(
car
x
)))
(
nth
1
x
)
;INITFORM.
(
cl--make-usage-args
(
nthcdr
2
x
))
;SVAR.
))))
arglist
)))
(
if
(
cdr-safe
(
last
arglist
))
;Not a proper list.
(
let*
((
last
(
last
arglist
))
(
tail
(
cdr
last
)))
(
unwind-protect
(
progn
(
setcdr
last
nil
)
(
nconc
(
cl--make-usage-args
arglist
)
(
cl--make-usage-var
tail
)))
(
setcdr
last
tail
)))
;; `orig-args' can contain &cl-defs (an internal
;; CL thingy I don't understand), so remove it.
(
let
((
x
(
memq
'&cl-defs
arglist
)))
(
when
x
(
setq
arglist
(
delq
(
car
x
)
(
remq
(
cadr
x
)
arglist
)))))
(
let
((
state
nil
))
(
mapcar
(
lambda
(
x
)
(
cond
((
symbolp
x
)
(
if
(
eq
?\&
(
aref
(
symbol-name
x
)
0
))
(
setq
state
x
)
(
make-symbol
(
upcase
(
symbol-name
x
)))))
((
not
(
consp
x
))
x
)
((
memq
state
'
(
nil
&rest
))
(
cl--make-usage-args
x
))
(
t
;(VAR INITFORM SVAR) or ((KEYWORD VAR) INITFORM SVAR).
(
cl-list*
(
if
(
and
(
consp
(
car
x
))
(
eq
state
'&key
))
(
list
(
caar
x
)
(
cl--make-usage-var
(
nth
1
(
car
x
))))
(
cl--make-usage-var
(
car
x
)))
(
nth
1
x
)
;INITFORM.
(
cl--make-usage-args
(
nthcdr
2
x
))
;SVAR.
))))
arglist
))))
(
defun
cl--do-arglist
(
args
expr
&optional
num
)
; uses bind-*
(
if
(
nlistp
args
)
...
...
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