summaryrefslogtreecommitdiff
path: root/lisp/startup.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/startup.el')
-rw-r--r--lisp/startup.el13
1 files changed, 10 insertions, 3 deletions
diff --git a/lisp/startup.el b/lisp/startup.el
index 2855e7c31ca..91e7e36dd65 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -870,7 +870,7 @@ If STYLE is nil, display appropriately for the terminal."
(if repl
(aset (or standard-display-table
(setq standard-display-table (make-display-table)))
- char (vector (make-glyph-code repl 'escape-glyph)))
+ char (vector (make-glyph-code repl 'homoglyph)))
(when standard-display-table
(aset standard-display-table char nil)))))))
@@ -2360,7 +2360,14 @@ nil default-directory" name)
((member argi '("-eval" "-execute"))
(setq inhibit-startup-screen t)
- (eval (read (or argval (pop command-line-args-left)))))
+ (let* ((str-expr (or argval (pop command-line-args-left)))
+ (read-data (read-from-string str-expr))
+ (expr (car read-data))
+ (end (cdr read-data)))
+ (unless (= end (length str-expr))
+ (error "Trailing garbage following expression: %s"
+ (substring str-expr end)))
+ (eval expr)))
((member argi '("-L" "-directory"))
;; -L :/foo adds /foo to the _end_ of load-path.
@@ -2386,7 +2393,7 @@ nil default-directory" name)
;; Take file from default dir if it exists there;
;; otherwise let `load' search for it.
(file-ex (expand-file-name file)))
- (when (file-exists-p file-ex)
+ (when (file-regular-p file-ex)
(setq file file-ex))
(load file nil t)))