all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Francesco Potorti` <pot@gnu.org>
Cc: Emacs developers <emacs-devel@gnu.org>
Subject: Re: tags completion bug
Date: Wed, 25 Sep 2002 12:53:56 +0200	[thread overview]
Message-ID: <E17u9no-00038x-00@pot.cnuce.cnr.it> (raw)
In-Reply-To: <E17tzBe-0001yD-00@fencepost.gnu.org> (rms@gnu.org)

Hi Roland, hi Gerd,

I see that in etags-tags-completion-table you added the characters
"+*:?"  as legitimate in an identifier.  Stefan Monnier on emacs-devel
pointed out that the asterisk is used in Common Lisp.  What are the
other characters for?  I'd like to write this info in a comment inside
the function.

Also, would it be reasonable to use \(\sw\|\s_\), instead of the
bracketed lists of characters?


(defun etags-tags-completion-table ()
  (let ((table (make-vector 511 0)))
    (save-excursion
      (goto-char (point-min))
      ;; This monster regexp matches an etags tag line.
      ;;   \1 is the string to match;
      ;;   \2 is not interesting;
      ;;   \3 is the guessed tag name; XXX guess should be better eg DEFUN
      ;;   \4 is not interesting;
      ;;   \5 is the explicitly-specified tag name.
      ;;   \6 is the line to start searching at;
      ;;   \7 is the char to start searching at.
      (while (re-search-forward
	      "^\\(\\([^\177]+[^-a-zA-Z0-9_+*$:\177]+\\)?\
\\([-a-zA-Z0-9_+*$?:]+\\)[^-a-zA-Z0-9_+*$?:\177]*\\)\177\
\\(\\([^\n\001]+\\)\001\\)?\\([0-9]+\\)?,\\([0-9]+\\)?\n"
	      nil t)
	(intern	(if (match-beginning 5)
		    ;; There is an explicit tag name.
		    (buffer-substring (match-beginning 5) (match-end 5))
		  ;; No explicit tag name.  Best guess.
		  (buffer-substring (match-beginning 3) (match-end 3)))
		table)))
    table))

  parent reply	other threads:[~2002-09-25 10:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-24 14:36 tags completion bug Francesco Potorti`
2002-09-24 15:31 ` Stefan Monnier
2002-09-24 17:27   ` Francesco Potorti`
     [not found] ` <E17tzBe-0001yD-00@fencepost.gnu.org>
2002-09-25 10:53   ` Francesco Potorti` [this message]
2002-09-25 11:16     ` Gerd Moellmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E17u9no-00038x-00@pot.cnuce.cnr.it \
    --to=pot@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.