Function: dired--filename-with-newline-p

dired--filename-with-newline-p is a byte-compiled function defined in dired.el.gz.

Signature

(dired--filename-with-newline-p)

Documentation

Check if a file name in this directory has a newline.

Return non-nil if at least one file name in this directory contains either a literal newline or the string "\\n").

Source Code

;; Defined in /usr/src/emacs/lisp/dired.el.gz
(defun dired--filename-with-newline-p ()
  "Check if a file name in this directory has a newline.
Return non-nil if at least one file name in this directory contains
either a literal newline or the string \"\\n\")."
  (save-excursion
    (goto-char (point-min))
    (catch 'found
      (while (not (eobp))
        (when (dired-move-to-filename)
          (let ((fn (buffer-substring-no-properties
                     (point) (dired-move-to-end-of-filename))))
            (when (or (memq 10 (seq-into fn 'list))
                      (string-search "\\n" fn))
              (throw 'found t))))
        (forward-line)))))