Created
October 5, 2012 19:29
-
-
Save mgallego/3841846 to your computer and use it in GitHub Desktop.
Estado inicial de PHPDocumentor.el
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun phpdoc () | |
"print-the-php-documentor-block" | |
(interactive) | |
(search-backward " function") | |
(setq method-name (phpdoc-get-method-description)) | |
(phpdoc-block-position) | |
(setq init-block-point (point)) | |
(phpdoc-start-line) | |
(phpdoc-new-line method-name) | |
(phpdoc-new-line) | |
(phpdoc-end-line) | |
(indent-region inicio (point)) | |
(goto-char init-block-point) | |
(message "PHPDocumentor block created") | |
) | |
(defun phpdoc-block-position () | |
(previous-line)(beginning-of-line)(newline) | |
) | |
(defun phpdoc-new-line (&optional phpdoc-data) | |
(newline) | |
(insert (concat "* " phpdoc-data)) | |
) | |
(defun phpdoc-end-line () | |
(newline) | |
(insert "*/") | |
) | |
(defun phpdoc-start-line () | |
(insert "/**") | |
) | |
(defun phpdoc-get-method-description () | |
(search-forward " ") | |
(setq init-word (point)) | |
(right-word) | |
(buffer-substring-no-properties init-word (point)) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment