branch: externals/scanner commit e265498ee5da23adb5287cc29b28e88e0a442a23 Author: Raffael Stocker <r.stoc...@mnet-mail.de> Commit: Raffael Stocker <r.stoc...@mnet-mail.de>
allow program switches without arguments --- scanner.el | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/scanner.el b/scanner.el index 46f6c6c99b..b35e42acf0 100644 --- a/scanner.el +++ b/scanner.el @@ -626,6 +626,7 @@ ARGSPEC is expected to be a list of the form: (\"--switch1\" 'argument1 \"--switch2=\" (lambda (args) \"bar\")) \"--never-used\" nil + \"--switch-without-argument\" t 'symbol \"--always-there\" 'other-symbol (\"baz\" \"quux\")) @@ -639,9 +640,11 @@ translated into the arguments list: (number-to-string val) val))) (if (stringp sw) - (if (string-match ".=\\'" sw) - (list (concat sw sval)) - (list sw sval)) + (if (stringp sval) + (if (string-match ".=\\'" sw) + (list (concat sw sval)) + (list sw sval)) + (list sw)) (list sval))))) (process-option (switch value) (cond ((functionp value)