1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-26 10:49:33 +00:00

Fix some misleading quoting in cl-case

* lisp/progmodes/compile.el (compilation-auto-jump):
* lisp/image/image-crop.el (image-crop--crop-image-1):
(image-crop--crop-image-1):
* lisp/image/exif.el (exif--process-value):
* lisp/image-mode.el (image-mode--next-file):
* lisp/dnd.el (dnd-begin-text-drag):
(dnd-begin-file-drag):
(dnd-begin-drag-files): Fix misleading quoting in cl-case (bug#51368).
This commit is contained in:
Lars Ingebrigtsen 2022-09-13 18:19:26 +02:00
parent 35d597348c
commit ef0c2e9940
5 changed files with 26 additions and 26 deletions

View File

@ -370,8 +370,8 @@ currently being held down. It should only be called upon a
;; the standard (i.e. Qt programs).
"text/plain" "text/plain;charset=utf-8")
(cl-ecase action
('copy 'XdndActionCopy)
('move 'XdndActionMove))
(copy 'XdndActionCopy)
(move 'XdndActionMove))
frame nil allow-same-frame)))
(cond
((eq return-value 'XdndActionCopy) 'copy)
@ -457,9 +457,9 @@ currently being held down. It should only be called upon a
;; programs.
"_DT_NETFILE")
(cl-ecase action
('copy 'XdndActionCopy)
('move 'XdndActionMove)
('link 'XdndActionLink))
(copy 'XdndActionCopy)
(move 'XdndActionMove)
(link 'XdndActionLink))
frame nil allow-same-frame)))
(cond
((eq return-value 'XdndActionCopy) 'copy)
@ -527,9 +527,9 @@ FILES will be dragged."
;; and Haiku.
"FILE_NAME" "HOST_NAME")
(cl-ecase action
('copy 'XdndActionCopy)
('move 'XdndActionMove)
('link 'XdndActionLink))
(copy 'XdndActionCopy)
(move 'XdndActionMove)
(link 'XdndActionLink))
frame nil allow-same-frame)))
(cond
((eq return-value 'XdndActionCopy) 'copy)

View File

@ -1262,7 +1262,7 @@ If N is negative, go to the previous file."
(save-window-excursion
(switch-to-buffer (cdr buffer) t t)
(cl-case (car buffer)
('dired
(dired
(dired-goto-file file)
(let (found)
(while (and (not found)
@ -1280,9 +1280,9 @@ If N is negative, go to the previous file."
;; If we didn't find a next/prev file, then restore
;; point.
(dired-goto-file file))))
('archive
(archive
(setq next (archive-next-file-displayer file regexp n)))
('tar
(tar
(setq next (tar-next-file-displayer file regexp n))))))
next))

View File

@ -271,13 +271,13 @@ VALUE is an integer representing BYTES characters."
"Do type-based post-processing of the value."
(cl-case type
;; Chop off trailing zero byte.
('ascii (substring value 0 (1- (length value))))
('rational (with-temp-buffer
(set-buffer-multibyte nil)
(insert value)
(goto-char (point-min))
(cons (exif--read-number 4 le)
(exif--read-number 4 le))))
(ascii (substring value 0 (1- (length value))))
(rational (with-temp-buffer
(set-buffer-multibyte nil)
(insert value)
(goto-char (point-min))
(cons (exif--read-number 4 le)
(exif--read-number 4 le))))
(otherwise value)))
(defun exif--read-chunk (bytes)

View File

@ -208,7 +208,7 @@ After cropping an image, it can be saved by `M-x image-save' or
()
(let ((pos (nth 8 (cadr event))))
(cl-case state
('begin
(begin
(cond
((eq (car event) 'down-mouse-1)
(setq state 'stretch
@ -217,7 +217,7 @@ After cropping an image, it can be saved by `M-x image-save' or
(cl-getf area :top) (cdr pos)
(cl-getf area :right) (car pos)
(cl-getf area :bottom) (cdr pos)))))
('stretch
(stretch
(cond
((eq (car event) 'mouse-movement)
(setf (cl-getf area :right) (car pos)
@ -225,7 +225,7 @@ After cropping an image, it can be saved by `M-x image-save' or
((memq (car event) '(mouse-1 drag-mouse-1))
(setq state 'corner
prompt "Choose corner to adjust (RET to crop)"))))
('corner
(corner
(cond
((eq (car event) 'down-mouse-1)
;; Find out what corner we're close to.
@ -238,7 +238,7 @@ After cropping an image, it can be saved by `M-x image-save' or
(when corner
(setq state 'adjust
prompt "Adjust crop")))))
('adjust
(adjust
(cond
((memq (car event) '(mouse drag-mouse-1))
(setq state 'corner
@ -246,12 +246,12 @@ After cropping an image, it can be saved by `M-x image-save' or
((eq (car event) 'mouse-movement)
(setf (cl-getf area (car corner)) (car pos)
(cl-getf area (cadr corner)) (cdr pos)))))
('move-unclick
(move-unclick
(cond
((eq (car event) 'down-mouse-1)
(setq state 'move-click
prompt "Move"))))
('move-click
(move-click
(cond
((eq (car event) 'mouse-movement)
(setf (cl-getf area :left) (car pos)

View File

@ -1235,10 +1235,10 @@ POS and RES.")
(if win (set-window-point win pos)))
(when compilation-auto-jump-to-first-error
(cl-case compilation-auto-jump-to-first-error
('if-location-known
(if-location-known
(when (compilation--file-known-p)
(compile-goto-error)))
('first-known
(first-known
(let (match)
(while (and (not (compilation--file-known-p))
(setq match (text-property-search-forward