(other :tag "Query" other))
:group 'find-file)
-;; Avoid losing in versions where CLASH_DETECTION is disabled.
-(or (fboundp 'lock-buffer)
- (defalias 'lock-buffer 'ignore))
-(or (fboundp 'unlock-buffer)
- (defalias 'unlock-buffer 'ignore))
-(or (fboundp 'file-locked-p)
- (defalias 'file-locked-p 'ignore))
-
(defcustom view-read-only nil
"Non-nil means buffers visiting files read-only do so in view mode.
In fact, this means that all read-only buffers normally have
This function is meant for the user to run interactively.
Don't call it from programs! Use `insert-file-contents-literally' instead.
\(Its calling sequence is different; see its documentation)."
+ (declare (interactive-only insert-file-contents-literally))
(interactive "*fInsert file literally: ")
(insert-file-1 filename #'insert-file-contents-literally))
-(put 'insert-file-literally 'interactive-only 'insert-file-contents-literally)
(defvar find-file-literally nil
"Non-nil if this buffer was made by `find-file-literally' or equivalent.
It is not a good idea to use this function in Lisp programs, because it
prints a message in the minibuffer. Instead, use `set-buffer-modified-p'."
+ (declare (interactive-only set-buffer-modified-p))
(interactive "P")
(message (if arg "Modification-flag set"
"Modification-flag cleared"))
This function is meant for the user to run interactively.
Don't call it from programs! Use `insert-file-contents' instead.
\(Its calling sequence is different; see its documentation)."
+ (declare (interactive-only insert-file-contents))
(interactive "*fInsert file: ")
(insert-file-1 filename #'insert-file-contents))
-(put 'insert-file 'interactive-only 'insert-file-contents)
(defun append-to-file (start end filename)
"Append the contents of the region to the end of file FILENAME.
(file-expand-wildcards (directory-file-name dirpart)))
(list dirpart)))
contents)
- (while dirs
- (when (or (null (car dirs)) ; Possible if DIRPART is not wild.
- (and (file-directory-p (directory-file-name (car dirs)))
- (file-readable-p (car dirs))))
+ (dolist (dir dirs)
+ (when (or (null dir) ; Possible if DIRPART is not wild.
+ (file-accessible-directory-p dir))
(let ((this-dir-contents
;; Filter out "." and ".."
(delq nil
(unless (string-match "\\`\\.\\.?\\'"
(file-name-nondirectory name))
name))
- (directory-files (or (car dirs) ".") full
+ (directory-files (or dir ".") full
(wildcard-to-regexp nondir))))))
(setq contents
(nconc
- (if (and (car dirs) (not full))
- (mapcar (function (lambda (name) (concat (car dirs) name)))
+ (if (and dir (not full))
+ (mapcar #'(lambda (name) (concat dir name))
this-dir-contents)
this-dir-contents)
- contents))))
- (setq dirs (cdr dirs)))
+ contents)))))
contents)))
;; Let Tramp know that `file-expand-wildcards' does not need an advice.