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: Drew Adams
Subject: RE: [External] : Set the default-directory dynamically according to the buffer-file-name.
Date: Wed, 29 Sep 2021 15:47:07 +0000

>     (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)

reply via email to

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