Function: image-dired-get-comment

image-dired-get-comment is a byte-compiled function defined in image-dired.el.gz.

Signature

(image-dired-get-comment FILE)

Documentation

Get comment for file FILE.

Source Code

;; Defined in /usr/src/emacs/lisp/image-dired.el.gz
(defun image-dired-get-comment (file)
  "Get comment for file FILE."
  (image-dired-sane-db-file)
  (image-dired--with-db-file
   (let (end comment-beg-pos comment-end-pos comment)
     (when (search-forward-regexp (format "^%s" file) nil t)
       (end-of-line)
       (setq end (point))
       (beginning-of-line)
       (when (search-forward ";comment:" end t)
	 (setq comment-beg-pos (point))
	 (if (search-forward ";" end t)
	     (setq comment-end-pos (- (point) 1))
	   (setq comment-end-pos end))
	 (setq comment (buffer-substring
			comment-beg-pos comment-end-pos))))
     comment)))