mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
(comment-region-internal): Box more tightly in the
common case where there's no TAB in the boxed text.
This commit is contained in:
parent
20b69789f3
commit
45f6a663d7
2 changed files with 57 additions and 53 deletions
|
|
@ -943,9 +943,13 @@ the region rather than at left margin."
|
|||
(setq max-indent (max max-indent (current-column)))
|
||||
(not (or (eobp) (progn (forward-line) nil)))))
|
||||
|
||||
;; Inserting ccs can change max-indent by (1- tab-width).
|
||||
(setq max-indent
|
||||
(+ max-indent (max (length cs) (length ccs)) tab-width -1))
|
||||
(+ max-indent (max (length cs) (length ccs))
|
||||
;; Inserting ccs can change max-indent by (1- tab-width)
|
||||
;; but only if there are TABs in the boxed text, of course.
|
||||
(if (save-excursion (goto-char beg)
|
||||
(search-forward "\t" end t))
|
||||
(1- tab-width) 0)))
|
||||
(unless indent (setq min-indent 0))
|
||||
|
||||
;; make the leading and trailing lines if requested
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue