Mercurial > emacs
comparison lisp/cedet/semantic/util-modes.el @ 106895:181539c8b6a4
Fix typos in docstrings, error messages, etc.
author | Juanma Barranquero <lekktu@gmail.com> |
---|---|
date | Mon, 18 Jan 2010 05:39:40 +0100 |
parents | 1d1d5d9bd884 |
children | 5143700578d0 a5ad4f188e19 |
comparison
equal
deleted
inserted
replaced
106894:b3b9ebd930e1 | 106895:181539c8b6a4 |
---|---|
335 '((((class color) (background dark)) | 335 '((((class color) (background dark)) |
336 (:underline "red")) | 336 (:underline "red")) |
337 (((class color) (background light)) | 337 (((class color) (background light)) |
338 (:underline "red"))) | 338 (:underline "red"))) |
339 "Face used to show unmatched syntax in. | 339 "Face used to show unmatched syntax in. |
340 The face is used in `semantic-show-unmatched-syntax-mode'." | 340 The face is used in `semantic-show-unmatched-syntax-mode'." |
341 :group 'semantic-faces) | 341 :group 'semantic-faces) |
342 | 342 |
343 (defsubst semantic-unmatched-syntax-overlay-p (overlay) | 343 (defsubst semantic-unmatched-syntax-overlay-p (overlay) |
344 "Return non-nil if OVERLAY is an unmatched syntax one." | 344 "Return non-nil if OVERLAY is an unmatched syntax one." |
345 (eq (semantic-overlay-get overlay 'semantic) 'unmatched)) | 345 (eq (semantic-overlay-get overlay 'semantic) 'unmatched)) |
765 :active (semantic-current-tag) | 765 :active (semantic-current-tag) |
766 :help "Copy the current tag to a register" | 766 :help "Copy the current tag to a register" |
767 ] | 767 ] |
768 [ "Narrow To Headerline Tag" senator-narrow-to-defun | 768 [ "Narrow To Headerline Tag" senator-narrow-to-defun |
769 :active (semantic-current-tag) | 769 :active (semantic-current-tag) |
770 :help "Narrow to the bounds of the current tag."] | 770 :help "Narrow to the bounds of the current tag"] |
771 [ "Fold Headerline Tag" senator-fold-tag-toggle | 771 [ "Fold Headerline Tag" senator-fold-tag-toggle |
772 :active (semantic-current-tag) | 772 :active (semantic-current-tag) |
773 :style toggle | 773 :style toggle |
774 :selected (let ((tag (semantic-current-tag))) | 774 :selected (let ((tag (semantic-current-tag))) |
775 (and tag (semantic-tag-folded-p tag))) | 775 (and tag (semantic-tag-folded-p tag))) |
852 when it lands in the sticky line." | 852 when it lands in the sticky line." |
853 :group 'semantic | 853 :group 'semantic |
854 :type 'string) | 854 :type 'string) |
855 | 855 |
856 (defvar semantic-stickyfunc-old-hlf nil | 856 (defvar semantic-stickyfunc-old-hlf nil |
857 "Value of the header line when entering sticky func mode.") | 857 "Value of the header line when entering stickyfunc mode.") |
858 | 858 |
859 (defconst semantic-stickyfunc-header-line-format | 859 (defconst semantic-stickyfunc-header-line-format |
860 (cond ((featurep 'xemacs) | 860 (cond ((featurep 'xemacs) |
861 nil) | 861 nil) |
862 ((>= emacs-major-version 22) | 862 ((>= emacs-major-version 22) |
866 (semantic-stickyfunc-fetch-stickyline)))) | 866 (semantic-stickyfunc-fetch-stickyline)))) |
867 ((= emacs-major-version 21) | 867 ((= emacs-major-version 21) |
868 '(:eval (list semantic-stickyfunc-indent-string | 868 '(:eval (list semantic-stickyfunc-indent-string |
869 (semantic-stickyfunc-fetch-stickyline)))) | 869 (semantic-stickyfunc-fetch-stickyline)))) |
870 (t nil)) | 870 (t nil)) |
871 "The header line format used by sticky func mode.") | 871 "The header line format used by stickyfunc mode.") |
872 | 872 |
873 (defun semantic-stickyfunc-mode-setup () | 873 (defun semantic-stickyfunc-mode-setup () |
874 "Setup option `semantic-stickyfunc-mode'. | 874 "Setup option `semantic-stickyfunc-mode'. |
875 For semantic enabled buffers, make the function declaration for the top most | 875 For semantic enabled buffers, make the function declaration for the top most |
876 function \"sticky\". This is accomplished by putting the first line of | 876 function \"sticky\". This is accomplished by putting the first line of |
934 (semantic-mode-line-update) | 934 (semantic-mode-line-update) |
935 semantic-stickyfunc-mode) | 935 semantic-stickyfunc-mode) |
936 | 936 |
937 (defvar semantic-stickyfunc-sticky-classes | 937 (defvar semantic-stickyfunc-sticky-classes |
938 '(function type) | 938 '(function type) |
939 "List of tag classes which sticky func will display in the header line.") | 939 "List of tag classes which stickyfunc will display in the header line.") |
940 (make-variable-buffer-local 'semantic-stickyfunc-sticky-classes) | 940 (make-variable-buffer-local 'semantic-stickyfunc-sticky-classes) |
941 | 941 |
942 (defun semantic-stickyfunc-tag-to-stick () | 942 (defun semantic-stickyfunc-tag-to-stick () |
943 "Return the tag to stick at the current point." | 943 "Return the tag to stick at the current point." |
944 (let ((tags (nreverse (semantic-find-tag-by-overlay (point))))) | 944 (let ((tags (nreverse (semantic-find-tag-by-overlay (point))))) |
951 (setq tags (cdr tags))) | 951 (setq tags (cdr tags))) |
952 (car tags))) | 952 (car tags))) |
953 | 953 |
954 (defun semantic-stickyfunc-fetch-stickyline () | 954 (defun semantic-stickyfunc-fetch-stickyline () |
955 "Make the function at the top of the current window sticky. | 955 "Make the function at the top of the current window sticky. |
956 Capture it's function declaration, and place it in the header line. | 956 Capture its function declaration, and place it in the header line. |
957 If there is no function, disable the header line." | 957 If there is no function, disable the header line." |
958 (let ((str | 958 (let ((str |
959 (save-excursion | 959 (save-excursion |
960 (goto-char (window-start (selected-window))) | 960 (goto-char (window-start (selected-window))) |
961 (forward-line -1) | 961 (forward-line -1) |
962 (end-of-line) | 962 (end-of-line) |
963 ;; Capture this function | 963 ;; Capture this function |
964 (let* ((tag (semantic-stickyfunc-tag-to-stick))) | 964 (let* ((tag (semantic-stickyfunc-tag-to-stick))) |
965 ;; TAG is nil if there was nothing of the apropriate type there. | 965 ;; TAG is nil if there was nothing of the appropriate type there. |
966 (if (not tag) | 966 (if (not tag) |
967 ;; Set it to be the text under the header line | 967 ;; Set it to be the text under the header line |
968 (buffer-substring (point-at-bol) (point-at-eol)) | 968 (buffer-substring (point-at-bol) (point-at-eol)) |
969 ;; Get it | 969 ;; Get it |
970 (goto-char (semantic-tag-start tag)) | 970 (goto-char (semantic-tag-start tag)) |
1078 :active (semantic-current-tag) | 1078 :active (semantic-current-tag) |
1079 :help "Copy the current tag to a register" | 1079 :help "Copy the current tag to a register" |
1080 ] | 1080 ] |
1081 [ "Narrow To Tag" senator-narrow-to-defun | 1081 [ "Narrow To Tag" senator-narrow-to-defun |
1082 :active (semantic-current-tag) | 1082 :active (semantic-current-tag) |
1083 :help "Narrow to the bounds of the current tag."] | 1083 :help "Narrow to the bounds of the current tag"] |
1084 [ "Fold Tag" senator-fold-tag-toggle | 1084 [ "Fold Tag" senator-fold-tag-toggle |
1085 :active (semantic-current-tag) | 1085 :active (semantic-current-tag) |
1086 :style toggle | 1086 :style toggle |
1087 :selected (let ((tag (semantic-stickyfunc-tag-to-stick))) | 1087 :selected (let ((tag (semantic-stickyfunc-tag-to-stick))) |
1088 (and tag (semantic-tag-folded-p tag))) | 1088 (and tag (semantic-tag-folded-p tag))) |
1127 :group 'semantic-faces) | 1127 :group 'semantic-faces) |
1128 | 1128 |
1129 | 1129 |
1130 (defun semantic-highlight-func-mode-setup () | 1130 (defun semantic-highlight-func-mode-setup () |
1131 "Setup option `semantic-highlight-func-mode'. | 1131 "Setup option `semantic-highlight-func-mode'. |
1132 For semantic enabled buffers, highlight the first line of the | 1132 For Semantic enabled buffers, highlight the first line of the |
1133 current tag declaration." | 1133 current tag declaration." |
1134 (if semantic-highlight-func-mode | 1134 (if semantic-highlight-func-mode |
1135 (progn | 1135 (progn |
1136 (unless (and (featurep 'semantic) (semantic-active-p)) | 1136 (unless (and (featurep 'semantic) (semantic-active-p)) |
1137 ;; Disable minor mode if semantic stuff not available | 1137 ;; Disable minor mode if semantic stuff not available |
1200 (semantic-overlay-put ol 'help-echo | 1200 (semantic-overlay-put ol 'help-echo |
1201 "Current Function : mouse-3 - Context menu") | 1201 "Current Function : mouse-3 - Context menu") |
1202 (setq semantic-highlight-func-ct-overlay ol) | 1202 (setq semantic-highlight-func-ct-overlay ol) |
1203 ) | 1203 ) |
1204 | 1204 |
1205 ;; TAG is nil if there was nothing of the apropriate type there. | 1205 ;; TAG is nil if there was nothing of the appropriate type there. |
1206 (if (or (not tag) disable) | 1206 (if (or (not tag) disable) |
1207 ;; No tag, make the overlay go away. | 1207 ;; No tag, make the overlay go away. |
1208 (progn | 1208 (progn |
1209 (semantic-overlay-put ol 'tag nil) | 1209 (semantic-overlay-put ol 'tag nil) |
1210 (semantic-overlay-move ol (point-min) (point-min) (current-buffer)) | 1210 (semantic-overlay-move ol (point-min) (point-min) (current-buffer)) |