[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/subr.el [emacs-unicode-2]
From: |
Miles Bader |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/subr.el [emacs-unicode-2] |
Date: |
Sat, 04 Sep 2004 05:37:22 -0400 |
Index: emacs/lisp/subr.el
diff -c emacs/lisp/subr.el:1.360.2.7 emacs/lisp/subr.el:1.360.2.8
*** emacs/lisp/subr.el:1.360.2.7 Fri Aug 27 07:00:26 2004
--- emacs/lisp/subr.el Sat Sep 4 09:14:25 2004
***************
*** 1969,1974 ****
--- 1969,1995 ----
(setq parent (get parent 'derived-mode-parent))))
parent))
+ (defun find-tag-default ()
+ "Determine default tag to search for, based on text at point.
+ If there is no plausible default, return nil."
+ (save-excursion
+ (while (looking-at "\\sw\\|\\s_")
+ (forward-char 1))
+ (if (or (re-search-backward "\\sw\\|\\s_"
+ (save-excursion (beginning-of-line) (point))
+ t)
+ (re-search-forward "\\(\\sw\\|\\s_\\)+"
+ (save-excursion (end-of-line) (point))
+ t))
+ (progn (goto-char (match-end 0))
+ (buffer-substring-no-properties
+ (point)
+ (progn (forward-sexp -1)
+ (while (looking-at "\\s'")
+ (forward-char 1))
+ (point))))
+ nil)))
+
(defmacro with-syntax-table (table &rest body)
"Evaluate BODY with syntax table of current buffer set to TABLE.
The syntax table of the current buffer is saved, BODY is evaluated, and the
- [Emacs-diffs] Changes to emacs/lisp/subr.el [emacs-unicode-2],
Miles Bader <=