mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-26 19:18:50 +00:00
Allow trailing whitespace in --eval argument (Bug#36219)
* lisp/startup.el (command-line-1): Don't complain about trailing garbage if it's only space, tab, or newline characters.
This commit is contained in:
parent
f8b9765463
commit
a1b230b58a
@ -2413,7 +2413,9 @@ nil default-directory" name)
|
||||
(read-data (read-from-string str-expr))
|
||||
(expr (car read-data))
|
||||
(end (cdr read-data)))
|
||||
(unless (= end (length str-expr))
|
||||
;; Allow same trailing chars as minibuf.c's
|
||||
;; `string_to_object'.
|
||||
(unless (string-match-p "[\s\t\n]*\\'" str-expr end)
|
||||
(error "Trailing garbage following expression: %s"
|
||||
(substring str-expr end)))
|
||||
(eval expr t)))
|
||||
|
Loading…
Reference in New Issue
Block a user