* bug#12367: 24.2.50; cl-defun: unused key args are picked up as unused variables
@ 2012-09-06 12:10 Christopher Schmidt
2012-09-06 14:18 ` Stefan Monnier
2012-09-06 15:35 ` Stefan Monnier
0 siblings, 2 replies; 3+ messages in thread
From: Christopher Schmidt @ 2012-09-06 12:10 UTC (permalink / raw)
To: 12367
severity: minor
;; -*- lexical-binding: t -*-
(require 'cl-lib)
(cl-defun rms (&key foo))
Byte compile this piece of code.
Warning: Unused lexical variable `foo'
GNU Emacs 24.2.50.2 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.10) of
2012-09-06.
Christopher
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#12367: 24.2.50; cl-defun: unused key args are picked up as unused variables
2012-09-06 12:10 bug#12367: 24.2.50; cl-defun: unused key args are picked up as unused variables Christopher Schmidt
@ 2012-09-06 14:18 ` Stefan Monnier
2012-09-06 15:35 ` Stefan Monnier
1 sibling, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2012-09-06 14:18 UTC (permalink / raw)
To: 12367
> ;; -*- lexical-binding: t -*-
> (require 'cl-lib)
> (cl-defun rms (&key foo))
> Byte compile this piece of code.
> Warning: Unused lexical variable `foo'
The warning is fine. But I guess the problem is that the normal fix
(which is to rename `foo' to `_foo') won't work because it forces
callers to use :_foo which is wrong.
Stefan
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#12367: 24.2.50; cl-defun: unused key args are picked up as unused variables
2012-09-06 12:10 bug#12367: 24.2.50; cl-defun: unused key args are picked up as unused variables Christopher Schmidt
2012-09-06 14:18 ` Stefan Monnier
@ 2012-09-06 15:35 ` Stefan Monnier
1 sibling, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2012-09-06 15:35 UTC (permalink / raw)
To: 12367
> ;; -*- lexical-binding: t -*-
> (require 'cl-lib)
> (cl-defun rms (&key foo))
I've installed a patch on trunk so that you can use
(cl-defun rms (&key _foo))
instead.
Stefan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-09-06 15:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-06 12:10 bug#12367: 24.2.50; cl-defun: unused key args are picked up as unused variables Christopher Schmidt
2012-09-06 14:18 ` Stefan Monnier
2012-09-06 15:35 ` Stefan Monnier
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.