bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

-u command line option (was: dired-do-rename owner abuse)


From: Kevin Rodgers
Subject: -u command line option (was: dired-do-rename owner abuse)
Date: Thu, 16 Jun 2005 11:56:03 -0600
User-agent: Mozilla Thunderbird 0.9 (X11/20041105)

Dan Jacobson wrote:
> P.S., there is no error shown to the user when he executes
> # emacs -nw -u /var/spool/exim4/input/ ~
> (He meant
> # emacs -nw -q /var/spool/exim4/input/ ~)

That's because the user-init-file-1 value constructed from
init-file-user is intentionally load'ed with NOERROR, and the
init-file-user value is never checked.

Something simple like this should suffice:

*** emacs-21.3/lisp/startup.el~ Sun Mar 16 15:05:59 2003
--- emacs-21.3/lisp/startup.el  Thu Jun 16 11:49:38 2005
***************
*** 741,747 ****
                    argval (car args)))
          (setq init-file-user argval
                argval nil
!               args (cdr args)))
         ((string-equal argi "-no-site-file")
          (setq site-run-file nil
                args (cdr args)))
--- 741,750 ----
                    argval (car args)))
          (setq init-file-user argval
                argval nil
!               args (cdr args))
!         (or (file-directory-p (concat "~" init-file-user))
!             (error "Option `%s' user `%s' has no home directory"
!                    argi init-file-user)))
         ((string-equal argi "-no-site-file")
          (setq site-run-file nil
                args (cdr args)))

--
Kevin Rodgers





reply via email to

[Prev in Thread] Current Thread [Next in Thread]