@@ -61,7 +61,7 @@ Updated: 2023-10-20"
61
61
(tags-filename (if (string-equal tags-format " etags" )
62
62
(if (string-equal tag-relative " y" ) " TAGS" " TAGS_ABS" )
63
63
(if (string-equal tag-relative " y" ) " tags" " tags_abs" ))))
64
- (list (read-directory-name " Enter the directory for creating tags file: " )
64
+ (list (expand-file-name ( read-directory-name " Enter the directory for creating tags file: " ) )
65
65
tags-format
66
66
tag-relative
67
67
(read-string " Enter the desired tags filename: " tags-filename)
@@ -75,15 +75,15 @@ Updated: 2023-10-20"
75
75
)
76
76
(if (boundp 'process-name ) process-name " create tags" ))))
77
77
78
- ( let* ((target-dir-value ( if ( string= " " dir-name)
79
- default-directory
80
- ( if ( eq system-type 'windows-nt )
81
- ; ; if the dir-name already start with "/d", just use it
82
- ( if ( string-prefix -p " /d " dir-name)
83
- dir-name
84
- ; ; fix changing dir across different drives issue on Windows
85
- (concat " /d " dir-name))
86
- ( expand-file-name dir-name) )))
78
+ ; ; debug,
79
+ ; ; (message "dir-name: %s" dir-name)
80
+
81
+ ( let* ((target- dir-value ( cond
82
+ (( string-empty -p dir-name) default-directory )
83
+ (( and ( eq system-type 'windows-nt ) ( not ( string-prefix-p " /d " dir-name)))
84
+ ; ; On Windows, add "/d " if switching across drives
85
+ (concat " /d " dir-name))
86
+ ( t dir-name)))
87
87
88
88
(tags-format-value (if (string-equal tags-format 'ctags ) " " " -e" ))
89
89
@@ -97,7 +97,7 @@ Updated: 2023-10-20"
97
97
98
98
(tags-path-value
99
99
(if (string= tag-relative 'y )
100
- (expand-file-name tags-filename target- dir-value )
100
+ (expand-file-name tags-filename dir-name )
101
101
(or tags-path
102
102
(expand-file-name tags-filename
103
103
(read-directory-name
0 commit comments