;; do end up using a superficially different directory.
(setq dir (expand-file-name dir))
(if (not (file-directory-p dir))
- (if (file-exists-p dir)
- (error "%s is not a directory" dir)
- (error "%s: no such directory" dir))
+ (error (if (file-exists-p dir)
+ "%s is not a directory"
+ "%s: no such directory")
+ dir)
(unless (file-accessible-directory-p dir)
(error "Cannot cd to %s: Permission denied" dir))
(setq default-directory dir)
if you want to permanently change your home directory after having
started Emacs, set `abbreviated-home-dir' to nil so it will be recalculated)."
;; Get rid of the prefixes added by the automounter.
- (save-match-data
+ (save-match-data ;FIXME: Why?
(if (and automount-dir-prefix
(string-match automount-dir-prefix filename)
(file-exists-p (file-name-directory
(let* ((key (intern (match-string 1)))
(val (save-restriction
(narrow-to-region (point) end)
+ ;; As a defensive measure, we do not allow
+ ;; circular data in the file-local data.
(let ((read-circle nil))
(read (current-buffer)))))
;; It is traditional to ignore
;; Read the variable value.
(skip-chars-forward "^:")
(forward-char 1)
+ ;; As a defensive measure, we do not allow
+ ;; circular data in the file-local data.
(let ((read-circle nil))
(setq val (read (current-buffer))))
(if (eq handle-mode t)
(insert-file-contents file)
(let ((newvars
(condition-case-unless-debug nil
+ ;; As a defensive measure, we do not allow
+ ;; circular data in the file/dir-local data.
(let ((read-circle nil))
(read (current-buffer)))
(end-of-file nil))))
(if (symbolp (car file-arg-indices))
(setq method (pop file-arg-indices)))
;; Strip off the /: from the file names that have it.
- (save-match-data
+ (save-match-data ;FIXME: Why?
(while (consp file-arg-indices)
(let ((pair (nthcdr (car file-arg-indices) arguments)))
(when (car pair)