* thumbs library nits
@ 2004-04-28 10:40 John Paul Wallington
0 siblings, 0 replies; only message in thread
From: John Paul Wallington @ 2004-04-28 10:40 UTC (permalink / raw)
Cc: emacs-devel
Compiling thumbs.el gave these warnings:
In thumbs-delete-images:
thumbs.el:507:10:Warning: yes-or-no-p called with 2 arguments, but accepts
only 1
In thumbs-show-image-num:
thumbs.el:535:11:Warning: reference to free variable i
In end of data:
thumbs.el:730:1:Warning: the following functions are not known to be defined: caddar, cadar,
ignore-errors, evenp
Is it okay to install the following fix in Emacs CVS ?
2004-04-28 John Paul Wallington <jpw@gnu.org>
* thumbs.el (toplevel): Require cl at compile time.
(thumbs-delete-images): Fix formatting of prompt.
(thumbs-show-image-num): Move assignment of
`thumbs-current-image-filename' within dynamic scope of `i'.
(thumbs-emboss-image): Don't use `evenp'.
--- thumbs.el 28 Apr 2004 10:47:13 +0100 1.3
+++ thumbs.el 28 Apr 2004 11:30:28 +0100
@@ -56,6 +56,8 @@
;;; Code:
+(eval-when-compile
+ (require 'cl))
(require 'dired)
;; Abort if in-line imaging isn't supported (i.e. Emacs-20.7)
@@ -504,7 +506,7 @@
"Delete the image at point (and it's thumbnail) (or marked files if any)."
(interactive)
(let ((f (or thumbs-markedL (list (cdr (assoc (point) thumbs-fileL))))))
- (if (yes-or-no-p "Really delete %d files?" (length f))
+ (if (yes-or-no-p (format "Really delete %d files? " (length f)))
(progn
(mapcar (lambda (x)
(setq thumbs-fileL (delete (rassoc x thumbs-fileL) thumbs-fileL))
@@ -529,9 +531,9 @@
(rename-buffer (concat "*Image: "
(file-name-nondirectory i)
" - "
- (number-to-string num) "*")))
- (setq thumbs-image-num num
- thumbs-current-image-filename i)))
+ (number-to-string num) "*"))
+ (setq thumbs-image-num num
+ thumbs-current-image-filename i))))
(defun thumbs-next-image ()
"Show next image."
@@ -597,7 +599,7 @@
(defun thumbs-emboss-image (emboss)
"Emboss the image with value EMBOSS."
(interactive "nEmboss value: ")
- (if (or (< emboss 3)(> emboss 31)(evenp emboss))
+ (if (or (< emboss 3) (> emboss 31) (zerop (logand emboss 1)))
(error "Arg must be a odd number between 3 and 31"))
(thumbs-modify-image "emboss" (number-to-string emboss)))
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-04-28 10:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-28 10:40 thumbs library nits John Paul Wallington
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).