diff options
| author | Lars Ingebrigtsen | 2016-02-10 11:14:45 +1100 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2016-02-10 11:14:45 +1100 |
| commit | 6c54541fcc4cb4b57a476234f385aebdc3292a25 (patch) | |
| tree | f04111df14bdb064ab1cd1ea46e2d8c2ee177d55 | |
| parent | 4d18c953c1200418a4b3ca6e1ad4d25d8369483f (diff) | |
| download | emacs-6c54541fcc4cb4b57a476234f385aebdc3292a25.tar.gz emacs-6c54541fcc4cb4b57a476234f385aebdc3292a25.zip | |
Fix some folding issues in read-multiple-choice
* lisp/subr.el (read-multiple-choice): Fix folding when you
have many items.
| -rw-r--r-- | lisp/subr.el | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/lisp/subr.el b/lisp/subr.el index f70f3edd028..447c3eb1a4f 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -2340,9 +2340,10 @@ Usage example: | |||
| 2340 | ;; Add padding. | 2340 | ;; Add padding. |
| 2341 | (while (not (eobp)) | 2341 | (while (not (eobp)) |
| 2342 | (end-of-line) | 2342 | (end-of-line) |
| 2343 | (insert (make-string (- (* (mod times columns) | 2343 | (insert (make-string (max (- (* (mod times columns) |
| 2344 | (+ fill-column 4)) | 2344 | (+ fill-column 4)) |
| 2345 | (current-column)) | 2345 | (current-column)) |
| 2346 | 0) | ||
| 2346 | ?\s)) | 2347 | ?\s)) |
| 2347 | (forward-line 1)))) | 2348 | (forward-line 1)))) |
| 2348 | (setq times (1+ times)) | 2349 | (setq times (1+ times)) |
| @@ -2354,10 +2355,11 @@ Usage example: | |||
| 2354 | (cdr (assq (car elem) altered-names)))) | 2355 | (cdr (assq (car elem) altered-names)))) |
| 2355 | (fill-region (point-min) (point-max)) | 2356 | (fill-region (point-min) (point-max)) |
| 2356 | (when (nth 2 elem) | 2357 | (when (nth 2 elem) |
| 2357 | (insert (nth 2 elem)) | 2358 | (let ((start (point))) |
| 2358 | (unless (bolp) | 2359 | (insert (nth 2 elem)) |
| 2359 | (insert "\n")) | 2360 | (unless (bolp) |
| 2360 | (fill-region start (point-max))) | 2361 | (insert "\n")) |
| 2362 | (fill-region start (point-max)))) | ||
| 2361 | (buffer-string)))) | 2363 | (buffer-string)))) |
| 2362 | (goto-char start) | 2364 | (goto-char start) |
| 2363 | (dolist (line (split-string text "\n")) | 2365 | (dolist (line (split-string text "\n")) |