comparison lisp/progmodes/delphi.el @ 64041:e28ab96f1223

(delphi): Finish `defgroup' description with period. (delphi-indent-line, delphi-fill-comment, delphi-new-comment-line): "?\ " -> "?\s".
author Juanma Barranquero <lekktu@gmail.com>
date Mon, 04 Jul 2005 02:58:48 +0000
parents bb8a71ee1f10
children 18a818a2ee7c efa9e4606e7e
comparison
equal deleted inserted replaced
64040:44cf3ecee23f 64041:e28ab96f1223
86 (defmacro with-current-buffer (buf &rest forms) 86 (defmacro with-current-buffer (buf &rest forms)
87 `(save-excursion (set-buffer ,buf) ,@forms))) 87 `(save-excursion (set-buffer ,buf) ,@forms)))
88 ) 88 )
89 89
90 (defgroup delphi nil 90 (defgroup delphi nil
91 "Major mode for editing Delphi source in Emacs" 91 "Major mode for editing Delphi source in Emacs."
92 :version "21.1" 92 :version "21.1"
93 :group 'languages) 93 :group 'languages)
94 94
95 (defconst delphi-debug nil 95 (defconst delphi-debug nil
96 "True if in debug mode.") 96 "True if in debug mode.")
1508 (set-marker marked-point (point))) 1508 (set-marker marked-point (point)))
1509 ;; Advance our marked point after inserted spaces. 1509 ;; Advance our marked point after inserted spaces.
1510 (set-marker-insertion-type marked-point t) 1510 (set-marker-insertion-type marked-point t)
1511 (when (/= old-indent new-indent) 1511 (when (/= old-indent new-indent)
1512 (delete-region line-start (point)) 1512 (delete-region line-start (point))
1513 (insert (make-string new-indent ?\ ))) 1513 (insert (make-string new-indent ?\s)))
1514 (goto-char marked-point) 1514 (goto-char marked-point)
1515 (set-marker marked-point nil)))) 1515 (set-marker marked-point nil))))
1516 1516
1517 (defvar delphi-mode-abbrev-table nil 1517 (defvar delphi-mode-abbrev-table nil
1518 "Abbrev table in use in delphi-mode buffers.") 1518 "Abbrev table in use in delphi-mode buffers.")
1773 (end-comment (delphi-comment-block-end comment)) 1773 (end-comment (delphi-comment-block-end comment))
1774 (comment-start (delphi-token-start start-comment)) 1774 (comment-start (delphi-token-start start-comment))
1775 (comment-end (delphi-token-end end-comment)) 1775 (comment-end (delphi-token-end end-comment))
1776 (content-start (delphi-comment-content-start start-comment)) 1776 (content-start (delphi-comment-content-start start-comment))
1777 (content-indent (delphi-column-of content-start)) 1777 (content-indent (delphi-column-of content-start))
1778 (content-prefix (make-string content-indent ?\ )) 1778 (content-prefix (make-string content-indent ?\s))
1779 (content-prefix-re delphi-leading-spaces-re) 1779 (content-prefix-re delphi-leading-spaces-re)
1780 (p nil) 1780 (p nil)
1781 (marked-point (point-marker))) ; Maintain our position reliably. 1781 (marked-point (point-marker))) ; Maintain our position reliably.
1782 (when (eq 'comment-single-line comment-kind) 1782 (when (eq 'comment-single-line comment-kind)
1783 ;; // style comments need more work. 1783 ;; // style comments need more work.
1784 (setq content-prefix 1784 (setq content-prefix
1785 (let ((comment-indent (delphi-column-of comment-start))) 1785 (let ((comment-indent (delphi-column-of comment-start)))
1786 (concat (make-string comment-indent ?\ ) "//" 1786 (concat (make-string comment-indent ?\s) "//"
1787 (make-string (- content-indent comment-indent 2) 1787 (make-string (- content-indent comment-indent 2)
1788 ?\ ))) 1788 ?\s)))
1789 content-prefix-re (concat delphi-leading-spaces-re 1789 content-prefix-re (concat delphi-leading-spaces-re
1790 "//" 1790 "//"
1791 delphi-spaces-re) 1791 delphi-spaces-re)
1792 comment-end (if (delphi-is-literal-end comment-end) 1792 comment-end (if (delphi-is-literal-end comment-end)
1793 ;; Don't include the trailing newline. 1793 ;; Don't include the trailing newline.
1855 (delphi-newline) 1855 (delphi-newline)
1856 (let* ((start-comment (delphi-comment-block-start comment)) 1856 (let* ((start-comment (delphi-comment-block-start comment))
1857 (comment-start (delphi-token-start start-comment)) 1857 (comment-start (delphi-token-start start-comment))
1858 (content-start (delphi-comment-content-start start-comment)) 1858 (content-start (delphi-comment-content-start start-comment))
1859 (prefix 1859 (prefix
1860 (concat (make-string (delphi-column-of comment-start) ?\ ) "//" 1860 (concat (make-string (delphi-column-of comment-start) ?\s) "//"
1861 (make-string (- content-start comment-start 2) ?\ )))) 1861 (make-string (- content-start comment-start 2) ?\s))))
1862 (delete-horizontal-space) 1862 (delete-horizontal-space)
1863 (newline) 1863 (newline)
1864 (insert prefix))))) 1864 (insert prefix)))))
1865 1865
1866 (defun delphi-match-token (token limit) 1866 (defun delphi-match-token (token limit)