Skip to content

Commit e062ac7

Browse files
author
Bozhidar Batsov
committed
Make clojure-find-ns play with narrowing
1 parent 367c4eb commit e062ac7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

clojure-mode.el

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1023,8 +1023,9 @@ Useful if a file has been renamed."
10231023
(defun clojure-find-ns ()
10241024
"Find the namespace of the current Clojure buffer."
10251025
(let ((regexp clojure-namespace-name-regex))
1026-
(save-restriction
1027-
(save-excursion
1026+
(save-excursion
1027+
(save-restriction
1028+
(widen)
10281029
(goto-char (point-min))
10291030
(when (re-search-forward regexp nil t)
10301031
(match-string-no-properties 4))))))

0 commit comments

Comments
 (0)