emacs-devel
[Top][All Lists]
Advanced

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

Re: Shell commands in deleted directories


From: Eli Zaretskii
Subject: Re: Shell commands in deleted directories
Date: Sun, 13 Feb 2011 23:13:11 +0200

> From: Antoine Levitt <address@hidden>
> Date: Sun, 13 Feb 2011 22:02:34 +0100
> 
>      if (NILP (Ffile_accessible_directory_p (current_dir)))
> -      report_file_error ("Setting current directory",
> -                      Fcons (current_buffer->directory, Qnil));
> +      {
> +     /* If current_dir is unreachable (typically, does not exist), use
> +        ~/ as default */
> +     current_dir = build_string ("~/");
> +     current_dir = expand_and_dir_to_file (current_dir, Qnil);
> +     current_dir = Ffile_name_as_directory (current_dir);
> +     if (NILP (Ffile_accessible_directory_p (current_dir)))
> +       {
> +         report_file_error ("Setting current directory to ~/", Qnil);
> +       }
> +      }

And "who is watching the watchdog"?  That is, what if "~" does not
exist, either?



reply via email to

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