mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-11 02:10:35 -08:00
progmodes/cc-cmds.el (c-mask-paragraph): Fix an off-by-1 error. Fixes
bug #7185.
This commit is contained in:
parent
938c0d1089
commit
e6ef5dd9ce
2 changed files with 18 additions and 11 deletions
|
|
@ -1,3 +1,8 @@
|
|||
2010-10-31 Alan Mackenzie <acm@muc.de>
|
||||
|
||||
* progmodes/cc-cmds.el (c-mask-paragraph): Fix an off-by-1 error.
|
||||
This fixes bug #7185.
|
||||
|
||||
2010-10-30 Chong Yidong <cyd@stupidchicken.com>
|
||||
|
||||
* startup.el (command-line): Search for package directories, and
|
||||
|
|
|
|||
|
|
@ -3974,17 +3974,19 @@ command to conveniently insert and align the necessary backslashes."
|
|||
;; "Invalid search bound (wrong side of point)"
|
||||
;; error in the subsequent re-search. Maybe
|
||||
;; another fix would be needed (2007-12-08).
|
||||
(or (<= (- (cdr c-lit-limits) 2) (point))
|
||||
(and
|
||||
(search-forward-regexp
|
||||
(concat "\\=[ \t]*\\(" c-current-comment-prefix "\\)")
|
||||
(- (cdr c-lit-limits) 2) t)
|
||||
(not (search-forward-regexp
|
||||
"\\(\\s \\|\\sw\\)"
|
||||
(- (cdr c-lit-limits) 2) 'limit))
|
||||
;; The comment ender IS on its own line. Exclude
|
||||
;; this line from the filling.
|
||||
(set-marker end (c-point 'bol)))))
|
||||
; (or (<= (- (cdr c-lit-limits) 2) (point))
|
||||
; 2010-10-17 Construct removed.
|
||||
; (or (< (- (cdr c-lit-limits) 2) (point))
|
||||
(and
|
||||
(search-forward-regexp
|
||||
(concat "\\=[ \t]*\\(" c-current-comment-prefix "\\)")
|
||||
(- (cdr c-lit-limits) 2) t)
|
||||
(not (search-forward-regexp
|
||||
"\\(\\s \\|\\sw\\)"
|
||||
(- (cdr c-lit-limits) 2) 'limit))
|
||||
;; The comment ender IS on its own line. Exclude this
|
||||
;; line from the filling.
|
||||
(set-marker end (c-point 'bol))));)
|
||||
|
||||
;; The comment ender is hanging. Replace all space between it
|
||||
;; and the last word either by one or two 'x's (when
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue