Function: hui-select-initialize
hui-select-initialize is an autoloaded, interactive and byte-compiled
function defined in hui-select.el.
Signature
(hui-select-initialize)
Documentation
Initialize the hui-select mode on a double click of the left mouse key.
Also, add language-specific syntax setups to aid in thing selection.
Key Bindings
Source Code
;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hui-select.el
;;;###autoload
(defun hui-select-initialize ()
"Initialize the hui-select mode on a double click of the left mouse key.
Also, add language-specific syntax setups to aid in thing selection."
(interactive)
(unless (boundp 'hyperbole-loading)
(require 'hyperbole))
(when hkey-init
(transient-mark-mode 1)
(hkey-set-key [double-down-mouse-1] nil)
(hkey-set-key [double-mouse-1] 'hui-select-thing-with-mouse)
(hkey-set-key [triple-down-mouse-1] nil)
(hkey-set-key [triple-mouse-1] 'hui-select-thing-with-mouse))
;;
;; These hooks let you select C++ and Java methods and classes by
;; double-clicking on the first character of a definition or on its
;; opening or closing brace. This is all necessary since some
;; 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 hui-c++-defun-prompt-regexp)))
;;
;; 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)))
;;
;; Allow for marking and moving brace delimited groups.
(var:add-and-run-hook 'lisp-mode-hook
(lambda ()
(modify-syntax-entry ?\{ "(}" lisp-mode-syntax-table)
(modify-syntax-entry ?\} "){" lisp-mode-syntax-table)))
;;
;; This hook makes tags, comments, sentences and text blocks
;; selectable in SGML-related modes.
;;
;; Make tag begin and end delimiters act like grouping characters,
;; for easy syntactical selection of tags.
(let (hook-sym
mode-str
syntax-table-sym
keymap-sym)
(mapc (lambda (mode)
(setq mode-str (symbol-name mode)
hook-sym (intern (concat mode-str "-hook"))
syntax-table-sym (intern (concat mode-str "-syntax-table"))
keymap-sym (intern (concat mode-str "-map")))
(var:add-and-run-hook hook-sym
`(lambda ()
(let ((syntax-table (symbol-value ',syntax-table-sym))
(keymap (symbol-value ',keymap-sym)))
;; (modify-syntax-entry ?\< "(>" syntax-table)
;; (modify-syntax-entry ?\> ")<" syntax-table)
(modify-syntax-entry ?\{ "(}" syntax-table)
(modify-syntax-entry ?\} "){" syntax-table)
(modify-syntax-entry ?\" "\"" syntax-table)
(modify-syntax-entry ?= "." syntax-table)
(modify-syntax-entry ?. "_" syntax-table)
(setq sentence-end "\\([^ \t\n\r>]<\\|>\\(<[^>]*>\\)*\\|[.?!][]\"')}]*\\($\\| $\\|\t\\| \\)\\)[ \t\n]*")
(define-key keymap "\C-c." 'hui-select-goto-matching-tag))))
(unless (eq mode 'web-mode)
(var:add-and-run-hook
hook-sym (lambda ()
(make-local-variable 'comment-start)
(make-local-variable 'comment-end)
(setq comment-start "<!--" comment-end "-->")
(make-local-variable 'sentence-end)))))
hui-select-markup-modes)))