Lines Matching defs:of

90 (defalias 'cython-beginning-of-statement
93 ((fboundp 'py-beginning-of-statement)
94 'py-beginning-of-statement)
96 ((fboundp 'python-beginning-of-statement)
97 'python-beginning-of-statement)
99 ((fboundp 'python-nav-beginning-of-statement)
100 'python-nav-beginning-of-statement)
101 (t (error "Couldn't find implementation for `cython-beginning-of-statement'"))))
103 (defalias 'cython-beginning-of-block
106 ((fboundp 'py-beginning-of-block)
107 'py-beginning-of-block)
109 ((fboundp 'python-beginning-of-block)
110 'python-beginning-of-block)
112 ((fboundp 'python-nav-beginning-of-block)
113 'python-nav-beginning-of-block)
114 (t (error "Couldn't find implementation for `cython-beginning-of-block'"))))
116 (defalias 'cython-end-of-statement
119 ((fboundp 'py-end-of-statement)
120 'py-end-of-statement)
122 ((fboundp 'python-end-of-statement)
123 'python-end-of-statement)
125 ((fboundp 'python-nav-end-of-statement)
126 'python-nav-end-of-statement)
127 (t (error "Couldn't find implementation for `cython-end-of-statement'"))))
131 BOS non-nil means point is known to be at beginning of statement."
133 (unless bos (cython-beginning-of-statement))
139 (defun cython-beginning-of-defun ()
140 "`beginning-of-defun-function' for Cython.
141 Finds beginning of innermost nested class or method definition.
142 Returns the name of the definition found at the end, or nil if
143 reached start of buffer."
151 ;; Treat bol at beginning of function as outside function so
154 (unless (bolp) (end-of-line))
162 ;; Not sure why it was like this -- fails in case of
164 ;; non-def statement of the main body.
171 (defun cython-end-of-defun ()
172 "`end-of-defun-function' for Cython.
173 Finds end of innermost nested class or method definition."
176 ;; Go to start of current block and check whether it's at top
180 (end-of-line)
183 (cython-beginning-of-block))
189 (beginning-of-line)))
191 (end-of-line)
192 (beginning-of-defun))
193 ;; If we got to the start of buffer, look forward for
199 ;; We're at a definition statement (or end-of-buffer).
200 ;; This is where we should have started when called from end-of-defun
203 (python-nav-end-of-statement)
207 (or (cython-end-of-statement) t))
214 (beginning-of-line)))
215 ;; Catch pathological cases like this, where the beginning-of-defun
229 ;; Move up the tree of nested `class' and `def' blocks until we
235 (cython-beginning-of-block)
236 (end-of-line)
237 (beginning-of-defun)
254 (set (make-local-variable 'beginning-of-defun-function)
255 #'cython-beginning-of-defun)
256 (set (make-local-variable 'end-of-defun-function)
257 #'cython-end-of-defun)