anchor.diff:    (:accessor-name-transformer (hu.dwim.defclass-star:make-name-transformer name))
     (:documentation "Prompt source for file(s) on the disk."))
   
  +(define-class open-file-source (file-source) ())
  +
   ;; FIXME: Configuring this in init.lisp requires nyxt:: prefix.
   ;; How do we export it? :export-class-name-p doesn't work, it seems.
   (define-user-class file-source)
  +(define-user-class open-file-source)
   
   (defun supported-media-or-directory (filename
                                        &optional (file-source (make-instance 'user-file-source)))
  
positive.code: 
  (define-class file-source (prompter:source)
    ((prompter:name "Files")
     (prompter:actions nil :documentation "Actions will be calculated/populated in
     initialize-instance :after.")
     (prompter:filter-preprocessor (make-file-source-preprocessor))
     (prompter:multi-selection-p t)
     (open-file-in-new-buffer-p t :documentation "If nil, don't open files and directories in a new buffer.")
  
negative.code:                       (extensions (supported-media-types file-source)))
          (find extension extensions :test #'string-equal))))
  
  (defmethod initialize-instance :after ((source open-file-source) &key)
    (setf (slot-value source 'prompter:actions)
          (append
           (list (make-command open-file* (files)
                   (let* ((new-buffer-p (open-file-in-new-buffer-p source)))
                     ;; Open first file according to `open-file-in-new-buffer-p'
                     (funcall (open-file-function source) (first files)
                              :new-buffer-p new-buffer-p
                              :supported-p (supported-media-or-directory (first files) source))
                     ;; Open the rest of the files in new buffers unconditionally.
                     (dolist (file (rest files))
                       (funcall (open-file-function source) file
                                :new-buffer-p t
                                :supported-p (supported-media-or-directory file source))))))
           (slot-value source 'prompter:actions))))
  
  #+linux
  (defvar *xdg-open-program* "xdg-open")
  