mirror of
https://github.com/python/cpython.git
synced 2025-11-02 03:01:58 +00:00
(match-string): Added a definition for older Emacsen.
This commit is contained in:
parent
abcb38250b
commit
3622e0d090
1 changed files with 9 additions and 0 deletions
|
|
@ -2361,6 +2361,15 @@ local bindings to py-newline-and-indent."))
|
||||||
(set-buffer cbuf))
|
(set-buffer cbuf))
|
||||||
(sit-for 0))
|
(sit-for 0))
|
||||||
|
|
||||||
|
;; older Emacsen don't have this function
|
||||||
|
(if (not (fboundp 'match-string))
|
||||||
|
(defun match-string (n)
|
||||||
|
(let ((beg (match-beginning n))
|
||||||
|
(end (match-end n)))
|
||||||
|
(if (and beg end)
|
||||||
|
(buffer-substring beg end)
|
||||||
|
nil))))
|
||||||
|
|
||||||
(defun py-current-defun ()
|
(defun py-current-defun ()
|
||||||
;; tell add-log.el how to find the current function/method/variable
|
;; tell add-log.el how to find the current function/method/variable
|
||||||
(save-excursion
|
(save-excursion
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue