branch: externals/hyperbole commit 34008d80d057bea491fcc89cb8c83b2c2123bbd3 Author: Bob Weiner <r...@gnu.org> Commit: Bob Weiner <r...@gnu.org>
hui-select-initialize - Disable C++ defun-prompt-regexp definition Until it is re-written to prevent an Emacs hang. --- ChangeLog | 4 ++++ hui-select.el | 12 ++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 78e07d7d54..c2002a36ac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +* hui-select.el (hui-select-initialize): Disable C++ defun selection regexp until + regexp is rewritten to prevent Emacs hangs. See Emacs bug#61436 from 2023 + and; gh#rswgnu/hyperbole/issue-518 from 2024. + 2024-04-14 Mats Lidell <ma...@gnu.org> * test/hbut-tests.el (hypb--gbut-act-with-web-link): Test for gbut:act diff --git a/hui-select.el b/hui-select.el index 4bd62edaa1..8c4cc4bf57 100644 --- a/hui-select.el +++ b/hui-select.el @@ -3,7 +3,7 @@ ;; Author: Bob Weiner ;; ;; Orig-Date: 19-Oct-96 at 02:25:27 -;; Last-Mod: 19-Jan-24 at 18:17:28 by Mats Lidell +;; Last-Mod: 16-Apr-24 at 22:21:45 by Bob Weiner ;; ;; SPDX-License-Identifier: GPL-3.0-or-later ;; @@ -401,9 +401,13 @@ Also, add language-specific syntax setups to aid in thing selection." ;; programmers don't put their function braces in the first column. (var:add-and-run-hook 'java-mode-hook (lambda () (setq defun-prompt-regexp hui-java-defun-prompt-regexp))) - (var:add-and-run-hook 'c++-mode-hook (lambda () - (setq defun-prompt-regexp - "^[ \t]*\\(template\\s-*<[^>;.{}]+>\\s-*\\)?\\(\\(\\(auto\\|const\\|explicit\\|extern\\s-+\"[^\"]+\"\\|extern\\|friend\\|inline\\|mutable\\|overload\\|register\\|static\\|typedef\\|virtual\\)\\s-+\\)*\\(\\([[<a-zA-Z][]_a-zA-Z0-9]*\\(::[]_a-zA-Z0-9]+\\)?\\s-*<[_<>a-zA-Z0-9 ,]+>\\s-*[*&]*\\|[[<a-zA-Z][]_<>a-zA-Z0-9]*\\(::[[<a-zA-Z][]_<>a-zA-Z0-9]+\\)?\\s-*[*&]*\\)[*& \t\n\r]+\\)\\)?\\(\\(::\\|[[<a-zA-Z][]_a-zA-Z0-9]*\\s-*<[^>;{}]+>\\s-*[*&]*::\\|[[<a-zA-Z][]_~<>a-zA-Z0-9]*\\s-* [...] + + ;; !! TODO: defun selection regexp is disabled in C++ until regexp is + ;; rewritten as it can hang Emacs; reported in Emacs bug#61436 in + ;; 2023 and gh#rswgnu/hyperbole/issue-518 in 2024. + ;; (var:add-and-run-hook 'c++-mode-hook (lambda () + ;; (setq defun-prompt-regexp + ;; "^[ \t]*\\(template\\s-*<[^>;.{}]+>\\s-*\\)?\\(\\(\\(auto\\|const\\|explicit\\|extern\\s-+\"[^\"]+\"\\|extern\\|friend\\|inline\\|mutable\\|overload\\|register\\|static\\|typedef\\|virtual\\)\\s-+\\)*\\(\\([[<a-zA-Z][]_a-zA-Z0-9]*\\(::[]_a-zA-Z0-9]+\\)?\\s-*<[_<>a-zA-Z0-9 ,]+>\\s-*[*&]*\\|[[<a-zA-Z][]_<>a-zA-Z0-9]*\\(::[[<a-zA-Z][]_<>a-zA-Z0-9]+\\)?\\s-*[*&]*\\)[*& \t\n\r]+\\)\\)?\\(\\(::\\|[[<a-zA-Z][]_a-zA-Z0-9]*\\s-*<[^>;{}]+>\\s-*[*&]*::\\|[[<a-zA-Z][]_~<>a-zA-Z0-9]*\ [...] ;; ;; Match to Lisp symbols with : in their names, often included in help buffers. (var:add-and-run-hook 'help-mode-hook (lambda () (modify-syntax-entry ?: "_" help-mode-syntax-table)))