aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorMathias Dahl <[email protected]>2006-07-24 16:22:44 +0000
committerMathias Dahl <[email protected]>2006-07-24 16:22:44 +0000
commitdca90550b93437560a6c989ab3c2bed0a7333fd4 (patch)
tree1a408ddb59b057cef38e86e79decd3c418ca2b19 /lisp
parent3098323a4ddd061862fcd8c5aefc8bdb8c4b67d5 (diff)
(tumme-write-tags): Add.
(tumme-write-comments): Add. (tumme-tag-files): Change to use `tumme-write-tags'. (tumme-tag-thumbnail): Change to use `tumme-write-tags'. (tumme-dired-comment-files): Change to use `tumme-write-comments'. (tumme-save-information-from-widgets): Change to use `tumme-write-comments' and `tumme-write-tags'. (tumme-comment-thumbnail): Change to use `tumme-write-comments'. (tumme-write-tag): Remove. (tumme-write-comment): Remove. (tumme-display-previous-thumbnail-original): Remove empty line.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog3
-rw-r--r--lisp/tumme.el62
2 files changed, 3 insertions, 62 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index ed3f0ea482..2a957b289d 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -8,6 +8,9 @@
(tumme-save-information-from-widgets): Change to use
`tumme-write-comments' and `tumme-write-tags'.
(tumme-comment-thumbnail): Change to use `tumme-write-comments'.
+ (tumme-write-tag): Remove.
+ (tumme-write-comment): Remove.
+ (tumme-display-previous-thumbnail-original): Remove empty line.
2006-07-24 mathias <[email protected]>
diff --git a/lisp/tumme.el b/lisp/tumme.el
index 667d466e0a..d7fae222aa 100644
--- a/lisp/tumme.el
+++ b/lisp/tumme.el
@@ -868,33 +868,6 @@ displayed."
;;;###autoload
(defalias 'tumme 'tumme-show-all-from-dir)
-(defun tumme-write-tag (files tag)
- "For all FILES, writes TAG to the image database."
- (save-excursion
- (let (end buf)
- (setq buf (find-file tumme-db-file))
- (if (not (listp files))
- (if (stringp files)
- (setq files (list files))
- (error "Files must be a string or a list of strings!")))
- (mapcar
- (lambda (file)
- (goto-char (point-min))
- (if (search-forward-regexp
- (format "^%s" file) nil t)
- (progn
- (end-of-line)
- (setq end (point))
- (beginning-of-line)
- (when (not (search-forward (format ";%s" tag) end t))
- (end-of-line)
- (insert (format ";%s" tag))))
- (goto-char (point-max))
- (insert (format "\n%s;%s" file tag))))
- files)
- (save-buffer)
- (kill-buffer buf))))
-
(defun tumme-write-tags (file-tags)
"Write file tags to database.
Write each file and tag in FILE-TAGS to the database. FILE-TAGS
@@ -2039,45 +2012,10 @@ function. The result is a couple of new files in
(defun tumme-display-previous-thumbnail-original ()
"Move to previous thumbnail and display image."
-
(interactive)
(tumme-backward-char)
(tumme-display-thumbnail-original-image))
-(defun tumme-write-comment (file comment)
- "For FILE, write comment COMMENT in database."
- (save-excursion
- (let (end buf comment-beg)
- (setq buf (find-file tumme-db-file))
- (goto-char (point-min))
- (if (search-forward-regexp
- (format "^%s" file) nil t)
- (progn
- (end-of-line)
- (setq end (point))
- (beginning-of-line)
- ;; Delete old comment, if any
- (cond ((search-forward ";comment:" end t)
- (setq comment-beg (match-beginning 0))
- ;; Any tags after the comment?
- (if (search-forward ";" end t)
- (setq comment-end (- (point) 1))
- (setq comment-end end))
- ;; Delete comment tag and comment
- (delete-region comment-beg comment-end)))
- ;; Insert new comment
- (beginning-of-line)
- (if (not (search-forward ";" end t))
- (progn
- (end-of-line)
- (insert ";")))
- (insert (format "comment:%s;" comment)))
- ;; File does not exist in databse - add it.
- (goto-char (point-max))
- (insert (format "\n%s;comment:%s" file comment)))
- (save-buffer)
- (kill-buffer buf))))
-
(defun tumme-write-comments (file-comments)
"Write file comments to database.
Write file comments to one or more files. FILE-COMMENTS is an alist on