mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-05-07 05:41:52 -07:00
Implement 'sgml-name-8bit-mode' as a proper minor mode
* lisp/textmodes/sgml-mode.el (sgml-name-8bit-mode): Merge 'defcustom' and 'defun' into a 'define-minor-mode'.
This commit is contained in:
parent
dbc2e073c0
commit
c704ae0ffc
1 changed files with 1 additions and 9 deletions
|
|
@ -220,7 +220,7 @@ current line when you manually close a tag."
|
|||
table)
|
||||
"Syntax table used to parse SGML tags.")
|
||||
|
||||
(defcustom sgml-name-8bit-mode nil
|
||||
(define-minor-mode sgml-name-8bit-mode
|
||||
"When non-nil, insert non-ASCII characters as named entities."
|
||||
:type 'boolean)
|
||||
|
||||
|
|
@ -783,14 +783,6 @@ Uses `sgml-char-names'."
|
|||
(sgml-name-char last-command-event)
|
||||
(self-insert-command 1)))
|
||||
|
||||
(defun sgml-name-8bit-mode ()
|
||||
"Toggle whether to insert named entities instead of non-ASCII characters.
|
||||
This only works for Latin-1 input."
|
||||
(interactive)
|
||||
(setq sgml-name-8bit-mode (not sgml-name-8bit-mode))
|
||||
(message "sgml name entity mode is now %s"
|
||||
(if sgml-name-8bit-mode "ON" "OFF")))
|
||||
|
||||
;; When an element of a skeleton is a string "str", it is passed
|
||||
;; through `skeleton-transformation-function' and inserted.
|
||||
;; If "str" is to be inserted literally, one should obtain it as
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue