Mercurial > emacs
comparison lisp/progmodes/cc-align.el @ 88123:375f2633d815
New directory
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Mon, 08 Sep 2003 11:56:09 +0000 |
parents | 695cf19ef79e |
children | 68c22ea6027c |
comparison
equal
deleted
inserted
replaced
52428:27bc8b966642 | 88123:375f2633d815 |
---|---|
706 ;; columns to left shift the current line to align it with the | 706 ;; columns to left shift the current line to align it with the |
707 ;; goal column. | 707 ;; goal column. |
708 (save-excursion | 708 (save-excursion |
709 (beginning-of-line) | 709 (beginning-of-line) |
710 (when (c-syntactic-re-search-forward | 710 (when (c-syntactic-re-search-forward |
711 c-assignment-op-regexp | 711 ;; This regexp avoids matches on ==. |
712 (c-point 'eol) t t t) | 712 "\\(\\=\\|[^=]\\)=\\([^=]\\|$\\)" |
713 (setq equalp (- (or (match-beginning 1) | 713 (c-point 'eol) t t) |
714 (match-end 0)) | 714 (setq equalp (- (match-beginning 2) (c-point 'boi)))))) |
715 (c-point 'boi)))))) | |
716 | 715 |
717 (save-excursion | 716 (save-excursion |
718 (goto-char startpos) | 717 (goto-char startpos) |
719 (if (or (if (c-syntactic-re-search-forward | 718 (if (or (if (c-syntactic-re-search-forward |
720 c-assignment-op-regexp | 719 "\\(\\=\\|[^=]\\)=\\([^=]\\|$\\)" |
721 (min endpos (c-point 'eol)) t t t) | 720 (min endpos (c-point 'eol)) t t) |
722 (progn | 721 (progn |
723 (goto-char (or (match-beginning 1) | 722 (goto-char (match-beginning 2)) |
724 (match-end 0))) | |
725 nil) | 723 nil) |
726 t) | 724 t) |
727 (save-excursion | 725 (save-excursion |
728 (c-forward-syntactic-ws (c-point 'eol)) | 726 (c-forward-syntactic-ws (c-point 'eol)) |
729 (eolp))) | 727 (eolp))) |
1206 nil))) | 1204 nil))) |
1207 | 1205 |
1208 | 1206 |
1209 (cc-provide 'cc-align) | 1207 (cc-provide 'cc-align) |
1210 | 1208 |
1211 ;;; arch-tag: 4d71ed28-bf51-4509-a148-f39669669a2e | |
1212 ;;; cc-align.el ends here | 1209 ;;; cc-align.el ends here |