                     delim)
                 (setq ns (and beg (outre-parse-namespace beg)))
                 (setq delim (and ns (outre--get-ns-delimiter-pos ns)))
-                ;; if between delimiters, choose current
-                ;; if outside (before) delimiters, search for previous
-                ;; this seems to work intuitively; but relies on point
+                ;; If between delimiters, choose current.
+                ;; If outside (before) delimiters, search for previous.
+                ;; This seems to work intuitively; but relies on point
                 ;; being before the beginning delimiter when a namespace
-                ;; is selected
+                ;; is selected.
                 (when delim
                   (unless (< (car delim) pt)
                     (setq beg (outre--find-ns-previous))

      ;; change any comment with old name at ns end
      ;; (only look on same line as last delimiter)
      (goto-char (cadr (outre--get-ns-delimiter-pos ns)))
      (when (search-forward old (line-end-position) t)
        (if (string-blank-p new)
            (replace-match "anonymous")
          (replace-match new))))

                (outre--get-distance-from-begin pos ns))
              lst))

(defun outre--sort-namespaces-by-distance (pos lst)
  "Sort a list of namespaces in LST by the distance to POS."
  (sort lst
        (lambda (lhs rhs)
          (< (outre--get-distance-from-begin pos lhs)
             (outre--get-distance-from-begin pos rhs))
          )))

(defun outre--find-enclosing-ns-manual ()
  "Return the namespace around point, if any.
This scans the buffer ad-hoc, not using the results already
stored in `outre-list', if any."
  (save-excursion
    (catch 'found
      (let* ((pt (point))
