Skip to content

Commit 19ca32f

Browse files
committed
Add debugging macro
1 parent 3cba09f commit 19ca32f

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

relfiles.el

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@
1212
;; default-directory variable.
1313
(c++-mode . ("../test/" "../include/" "../src/"))))
1414

15+
(defmacro log-and-return (x)
16+
`(progn
17+
(let ((return-value ,x))
18+
(message "nealsid: %s" return-value)
19+
return-value)))
20+
1521
(defun relfiles-parallel-java-tree (x)
1622
(cond ((string-match "/java/" x) (file-name-directory (string-replace "/java/" "/javatests/" x)))
1723
((string-match "/javatests/" x) (file-name-directory (string-replace "/javatests/" "/java/" x)))
@@ -68,13 +74,14 @@
6874
;; 4. Expand the file name (i.e. canonicalizing filenames to remove .., for instance)
6975
(mapcar 'expand-file-name
7076
;; 3. Append extensions to each list item from 2
71-
(append-extensions
72-
;; 2. Remove any nil entries (signifying directories that don't exist) and then append suffixes to each item from 1.
73-
(append-suffixes (cl-remove-if-not 'identity
74-
;; 1. Append the filename base to the search directories
75-
(append-filename-base-to-directories search-directories filename-base))
76-
(append suffixes '("")))
77-
extensions)))))))
77+
(log-and-return
78+
(append-extensions
79+
;; 2. Remove any nil entries (signifying directories that don't exist) and then append suffixes to each item from 1.
80+
(append-suffixes (cl-remove-if-not 'identity
81+
;; 1. Append the filename base to the search directories
82+
(append-filename-base-to-directories search-directories filename-base))
83+
(append suffixes '("")))
84+
extensions))))))))
7885

7986
(defun append-extensions (filenames-with-suffixes extensions)
8087
(flatten-tree (mapcar (lambda (filename-no-extension)

0 commit comments

Comments
 (0)