;;This warning should not apply any longer, sk 2-Sep-1991 14:10.
`(prog1
(let ((inhibit-read-only t) case-fold-search found results)
- (if (and ,arg (not (eq ,arg 'marked)))
- (if (integerp ,arg)
- (progn ;; no save-excursion, want to move point.
- (dired-repeat-over-lines
- ,arg
- (lambda ()
- ,@(when show-progress
- `((if ,show-progress (sit-for 0))))
- (setq results (cons ,body results))))
- (when (< ,arg 0)
- (setq results (nreverse results)))
- results)
- ;; non-nil, non-integer, non-marked ARG means use current file:
- (list ,body))
- (let ((regexp (dired-marker-regexp)) next-position)
- (save-excursion
- (goto-char (point-min))
- ;; remember position of next marked file before BODY
- ;; can insert lines before the just found file,
- ;; confusing us by finding the same marked file again
- ;; and again and...
- (setq next-position (and (re-search-forward regexp nil t)
- (point-marker))
- found (not (null next-position)))
- (while next-position
- (goto-char next-position)
- ,@(when show-progress
- `((if ,show-progress (sit-for 0))))
- (setq results (cons ,body results))
- ;; move after last match
- (goto-char next-position)
- (forward-line 1)
- (set-marker next-position nil)
- (setq next-position (and (re-search-forward regexp nil t)
- (point-marker)))))
- ,@(when distinguish-one-marked
- `((if (and ,distinguish-one-marked (= (length results) 1))
- (setq results (cons t results)))))
- (if found
- results
- (unless (eq ,arg 'marked)
- (list ,body))))))
+ ,(let ((else `(let ((regexp (dired-marker-regexp)) next-position)
+ (save-excursion
+ (goto-char (point-min))
+ ;; remember position of next marked file before BODY
+ ;; can insert lines before the just found file,
+ ;; confusing us by finding the same marked file again
+ ;; and again and...
+ (setq next-position (and (re-search-forward regexp nil t)
+ (point-marker))
+ found (not (null next-position)))
+ (while next-position
+ (goto-char next-position)
+ ,@(when show-progress
+ `((if ,show-progress (sit-for 0))))
+ (setq results (cons ,body results))
+ ;; move after last match
+ (goto-char next-position)
+ (forward-line 1)
+ (set-marker next-position nil)
+ (setq next-position (and (re-search-forward regexp nil t)
+ (point-marker)))))
+ ,@(when distinguish-one-marked
+ `((if (and ,distinguish-one-marked (= (length results) 1))
+ (setq results (cons t results)))))
+ (if found
+ results
+ (unless (eq ,arg 'marked)
+ (list ,body))))))
+ (if (byte-compile-nilconstp arg) else
+ `(if (and ,arg (not (eq ,arg 'marked)))
+ (if (integerp ,arg)
+ (progn ;; no save-excursion, want to move point.
+ (dired-repeat-over-lines
+ ,arg
+ (lambda ()
+ ,@(when show-progress
+ `((if ,show-progress (sit-for 0))))
+ (setq results (cons ,body results))))
+ (when (< ,arg 0)
+ (setq results (nreverse results)))
+ results)
+ ;; non-nil, non-integer, non-marked ARG means use current file:
+ (list ,body))
+ ,else))))
;; save-excursion loses, again
(dired-move-to-filename)))
", "))
,@(svg--arguments svg args)))))
-(defun svg-embed (svg image image-type datap &rest args)
+(defun svg-embed (svg image img-type datap &rest args)
"Insert IMAGE into the SVG structure.
IMAGE should be a file name if DATAP is nil, and a binary string
-otherwise. IMAGE-TYPE should be a MIME image type, like
+otherwise. IMG-TYPE should be a MIME image type, like
\"image/jpeg\" or the like."
(svg--append
svg
(dom-node
'image
- `((xlink:href . ,(svg--image-data image image-type datap))
+ `((xlink:href . ,(svg--image-data image img-type datap))
,@(svg--arguments svg args)))))
(defun svg-embed-base-uri-image (svg relative-filename &rest args)
(dom-append-child svg node)))
(svg-possibly-update-image svg))
-(defun svg--image-data (image image-type datap)
+(defun svg--image-data (image img-type datap)
(with-temp-buffer
(set-buffer-multibyte nil)
(if datap
(insert-file-contents image))
(base64-encode-region (point-min) (point-max) t)
(goto-char (point-min))
- (insert "data:" image-type ";base64,")
+ (insert "data:" img-type ";base64,")
(buffer-string)))
(defun svg--arguments (svg args)