[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/dicom 977a04d9cf 14/15: Generalize dicom-open-at-point
From: |
ELPA Syncer |
Subject: |
[elpa] externals/dicom 977a04d9cf 14/15: Generalize dicom-open-at-point |
Date: |
Sat, 21 Dec 2024 09:57:57 -0500 (EST) |
branch: externals/dicom
commit 977a04d9cf064fd9d4a36cc4a292d411c7f10308
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Generalize dicom-open-at-point
Can be used in Dired for example.
---
dicom.el | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/dicom.el b/dicom.el
index 09b3bd9bb6..96c69ff768 100644
--- a/dicom.el
+++ b/dicom.el
@@ -259,17 +259,19 @@ progress:${percent-pos}%'"
(push (sort alist (lambda (x y) (string< (car x) (car y)))) items))))
(nreverse items)))
+;;;###autoload
(defun dicom-open-at-point ()
- "Open image at point."
- (declare (completion ignore))
+ "Open DICOM at point."
(interactive)
(if-let ((file
(if (mouse-event-p last-input-event)
- (mouse-posn-property (event-start last-input-event)
- 'dicom--file)
- (get-text-property (point) 'dicom--file))))
+ (or (mouse-posn-property (event-start last-input-event)
+ 'dicom--file)
+ (thing-at-mouse last-input-event 'filename))
+ (or (get-text-property (point) 'dicom--file)
+ (thing-at-point 'filename)))))
(dicom-open file (and (not last-prefix-arg) "*dicom image*"))
- (user-error "DICOM: No image at point")))
+ (user-error "DICOM: No DICOM file at point")))
(defun dicom--image-buffer ()
"Return image buffer or throw an error."
@@ -279,7 +281,7 @@ progress:${percent-pos}%'"
(current-buffer)))
(defun dicom-rotate ()
- "Rotate image."
+ "Rotate image by 90°."
(interactive nil dicom-mode)
(dicom--modify-image
(lambda (image)
- [elpa] externals/dicom updated (f8702c7605 -> 0a5e3d9d84), ELPA Syncer, 2024/12/21
- [elpa] externals/dicom 066d68babe 04/15: Change menu title, ELPA Syncer, 2024/12/21
- [elpa] externals/dicom f34a4fc88a 13/15: Take advantage of image APIs, ELPA Syncer, 2024/12/21
- [elpa] externals/dicom 0a5e3d9d84 15/15: Update menu, ELPA Syncer, 2024/12/21
- [elpa] externals/dicom fc5c425364 02/15: Unified dicom-mode, ELPA Syncer, 2024/12/21
- [elpa] externals/dicom da915ac8db 07/15: Improve error handling, ELPA Syncer, 2024/12/21
- [elpa] externals/dicom 1f420aa3f2 11/15: README: Update title, ELPA Syncer, 2024/12/21
- [elpa] externals/dicom 7cdec39355 03/15: Move maps and mode, ELPA Syncer, 2024/12/21
- [elpa] externals/dicom 977a04d9cf 14/15: Generalize dicom-open-at-point,
ELPA Syncer <=
- [elpa] externals/dicom 6248cc7bd6 01/15: Better job queue, ELPA Syncer, 2024/12/21
- [elpa] externals/dicom 441d34e679 10/15: Expand commentary, ELPA Syncer, 2024/12/21
- [elpa] externals/dicom b9d186567d 05/15: Update README, ELPA Syncer, 2024/12/21
- [elpa] externals/dicom 08f8dfdccb 09/15: Expand README, ELPA Syncer, 2024/12/21
- [elpa] externals/dicom e07edaa3ce 08/15: Cleanup dicom--setup, ELPA Syncer, 2024/12/21
- [elpa] externals/dicom 407d8ecb99 06/15: Update README, ELPA Syncer, 2024/12/21
- [elpa] externals/dicom ef5bdc3335 12/15: Update README, ELPA Syncer, 2024/12/21