[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Ada-mode-users] [patch] ada-goto-declaration when point is on an op
From: |
Stephen Leake |
Subject: |
Re: [Ada-mode-users] [patch] ada-goto-declaration when point is on an operator |
Date: |
Thu, 13 Apr 2017 13:56:21 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1.91 (windows-nt) |
Ludovic Brenta <address@hidden> writes:
> As it turned out there is a better solution: emacs regular expressions
> have word delimiters \< and \> but also separate symbol delimiters
> \_< and \_>. Replacing word delimiters with symbol delimiters in the
> regular expression solves the problem completely:
Thanks, applied
>
>
> --- ada-mode.el 2017-04-11 11:50:02.953881000 +0200
> +++ ada-mode.el 2017-04-12 16:44:25.000000000 +0200
> @@ -2137,9 +2137,9 @@
> )
>
> (defvar ada-operator-re
> -
> "\\+\\|-\\|/\\|\\*\\*\\|\\*\\|=\\|&\\|\\<\\(abs\\|mod\\|rem\\|and\\|not\\|or\\|xor\\)\\>\\|<=\\|<\\|>=\\|>"
> - ;; This can match 'or' in This_Or_That if '_' does not have word
> syntax (the default).
> - "Regexp matching Ada operator_symbol.")
> +
> "\\+\\|-\\|/\\|\\*\\*\\|\\*\\|=\\|&\\|\\_<\\(abs\\|mod\\|rem\\|and\\|not\\|or\\|xor\\)\\_>\\|<=\\|<\\|>=\\|>"
> + "Regexp matching Ada operator_symbol. Word operators like 'abs'
> must be delimited by whitespace, others consisting of
> +punctuation need not.")
>
> (defun ada-identifier-at-point ()
> "Return the identifier around point, move point to start of
--
-- Stephe