Commits

Fabrice Gabolde committed b0dd81a

Fix woman being required for normal operation.

Comments (0)

Files changed (1)

 
 (defun perlbrew-set-current-woman-path ()
   "Set the path to the current brew's /man directory."
-  (setq woman-path
-        (remove-if (lambda (path) (string-match (concat "^" perlbrew-perls-dir) path)) woman-path))
-  (if perlbrew-current-brew
-      (add-to-list 'woman-path
-                   (concat (file-name-directory perlbrew-perls-dir) perlbrew-current-brew
-                           "/man/.*")))
-  (perlbrew--rebuild-woman-cache))
+  (if (featurep 'woman)
+      (progn
+        (setq woman-path
+              (remove-if (lambda (path) (string-match (concat "^" perlbrew-perls-dir) path)) woman-path))
+        (if perlbrew-current-brew
+            (add-to-list 'woman-path
+                         (concat (file-name-directory perlbrew-perls-dir) perlbrew-current-brew
+                                 "/man/.*")))
+        (perlbrew--rebuild-woman-cache))))
 
 (defun perlbrew-set-current-brew (brew)
   (if (perlbrew-brew-exists brew)
 
 (defun perlbrew--rebuild-woman-cache ()
   "Lifted straight from woman.el code."
-  (if (featurep 'woman)
-      (message "Building list of manual directory expansions...")
-    (setq woman-expanded-directory-path
-          (woman-expand-directory-path woman-manpath woman-path))
-    (message "Building completion list of all manual topics...")
-    (setq woman-topic-all-completions
-          (woman-topic-all-completions woman-expanded-directory-path))
-    (woman-write-directory-cache)))
+  (message "Building list of manual directory expansions...")
+  (setq woman-expanded-directory-path
+        (woman-expand-directory-path woman-manpath woman-path))
+  (message "Building completion list of all manual topics...")
+  (setq woman-topic-all-completions
+        (woman-topic-all-completions woman-expanded-directory-path))
+  (woman-write-directory-cache))
 
 (provide 'perlbrew)
 ;;; perlbrew.el ends here
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.