diff options
| author | Lars Ingebrigtsen | 2021-07-19 17:31:17 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2021-07-19 17:31:17 +0200 |
| commit | 8f51194aa5f2e3300d60bca9c7b6630ee11d9a70 (patch) | |
| tree | 883808cb4c196ef357c7f8f0a08e82d2168984c4 | |
| parent | 4ffa928b93cbb53f16b475ccf3742144392d98d8 (diff) | |
| download | emacs-8f51194aa5f2e3300d60bca9c7b6630ee11d9a70.tar.gz emacs-8f51194aa5f2e3300d60bca9c7b6630ee11d9a70.zip | |
Fix infloop in woman-file-name
* lisp/woman.el (woman-file-name): Fix infloop for non-existent
manual page (bug#414).
| -rw-r--r-- | lisp/woman.el | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/woman.el b/lisp/woman.el index d9aa573d27b..0bc992d8f7f 100644 --- a/lisp/woman.el +++ b/lisp/woman.el | |||
| @@ -1274,9 +1274,11 @@ cache to be re-read." | |||
| 1274 | ;; Complete topic more carefully, i.e. use the completion | 1274 | ;; Complete topic more carefully, i.e. use the completion |
| 1275 | ;; rather than the string entered by the user: | 1275 | ;; rather than the string entered by the user: |
| 1276 | ((setq files (all-completions topic woman-topic-all-completions)) | 1276 | ((setq files (all-completions topic woman-topic-all-completions)) |
| 1277 | (while (/= (length topic) (length (car files))) | 1277 | (while (and files |
| 1278 | (/= (length topic) (length (car files)))) | ||
| 1278 | (setq files (cdr files))) | 1279 | (setq files (cdr files))) |
| 1279 | (setq files (woman-file-name-all-completions (car files))))) | 1280 | (when files |
| 1281 | (setq files (woman-file-name-all-completions (car files)))))) | ||
| 1280 | (cond | 1282 | (cond |
| 1281 | ((null files) nil) ; no file found for topic. | 1283 | ((null files) nil) ; no file found for topic. |
| 1282 | ((null (cdr files)) (car (car files))) ; only 1 file for topic. | 1284 | ((null (cdr files)) (car (car files))) ; only 1 file for topic. |