When called with a prefix argument, insert the current default
directory at point.
+++
** Function `write-region' no longer outputs "Wrote FILE" in batch mode.
+** If `pwd' is called with a prefix argument, insert the current default
+directory at point.
+
---
** New utilities in subr-x.el:
*** New macros `if-let' and `when-let' allow defining bindings and to
'file-directory-p))
\f
-(defun pwd ()
- "Show the current default directory."
- (interactive nil)
- (message "Directory %s" default-directory))
+(defun pwd (&optional insert)
+ "Show the current default directory.
+With prefix argument INSERT, insert the current default directory
+at point instead."
+ (interactive "P")
+ (if insert
+ (insert default-directory)
+ (message "Directory %s" default-directory)))
(defvar cd-path nil
"Value of the CDPATH environment variable, as a list.