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

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

Re: [External] : Set the default-directory dynamically according to the


From: Hongyi Zhao
Subject: Re: [External] : Set the default-directory dynamically according to the buffer-file-name.
Date: Fri, 1 Oct 2021 12:41:52 +0800

On Wed, Sep 29, 2021 at 11:47 PM Drew Adams <drew.adams@oracle.com> wrote:
>
> >     (if (not file)
> >         (message "no file name here.")
> >       (setq default-directory (file-name-directory
> >                                 (buffer-file-name))))))
>
> (if (not WHATEVER)
>     (message "PROBLEM NOTIFICATION")
>   (DO-STUFF))
>
> If you want to stop everything and be sure the
> message is seen, you might want to raise an error:
>
> (unless WHATEVER (error "PROBLEM")) ; End it all
> (DO-STUFF)

Do you mean this is a good practice for usage scenarios in production
environments?

HZ



reply via email to

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