all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#5519: command-switch-alist
@ 2010-02-03 23:07 Arni Magnusson
  2010-02-05  4:50 ` Chong Yidong
  0 siblings, 1 reply; 2+ messages in thread
From: Arni Magnusson @ 2010-02-03 23:07 UTC (permalink / raw)
  To: 5519

The GNU Emacs Lisp Reference Manual (section 39.1.4) describes the 
variable `command-switch-alist', saying specifically that the CAR should 
be a string, _not_ including the initial hyphen.

My experiments indicate that the CAR string should indeed include the 
initialy hyphen. I can create a custom option using "-c",

   (setq command-switch-alist '(("-c" . (lambda (arg)(c-mode)))))
   $ emacs -c  # starts successfully in c-mode

but not using "c":

   (setq command-switch-alist '(("c" . (lambda (arg)(c-mode)))))
   $ emacs -c  # Emacs says: Unknown option `-c'

Therefore, it appears that there is a bug either in Emacs or the Lisp 
manual, since they disagree on whether the CAR string should include the 
initial hyphen or not.

Best regards,

Arni






^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#5519: command-switch-alist
  2010-02-03 23:07 bug#5519: command-switch-alist Arni Magnusson
@ 2010-02-05  4:50 ` Chong Yidong
  0 siblings, 0 replies; 2+ messages in thread
From: Chong Yidong @ 2010-02-05  4:50 UTC (permalink / raw)
  To: Arni Magnusson; +Cc: 5519

> The GNU Emacs Lisp Reference Manual (section 39.1.4) describes the
> variable `command-switch-alist', saying specifically that the CAR should
> be a string, _not_ including the initial hyphen.
>
> My experiments indicate that the CAR string should indeed include the
> initialy hyphen. I can create a custom option using "-c",
>
>   (setq command-switch-alist '(("-c" . (lambda (arg)(c-mode)))))
>   $ emacs -c  # starts successfully in c-mode
>
> but not using "c":
>
>   (setq command-switch-alist '(("c" . (lambda (arg)(c-mode)))))
>   $ emacs -c  # Emacs says: Unknown option `-c'
>
> Therefore, it appears that there is a bug either in Emacs or the Lisp
> manual, since they disagree on whether the CAR string should include the
> initial hyphen or not.

Thanks for the bug report.  This was a bug in Emacs 23 (Emacs 22 worked
according to the description in the Elisp manual).  I've checked in a
fix.






^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-02-05  4:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-03 23:07 bug#5519: command-switch-alist Arni Magnusson
2010-02-05  4:50 ` Chong Yidong

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.