Function: facemenu-set-charset

facemenu-set-charset is an interactive and byte-compiled function defined in facemenu.el.gz.

Signature

(facemenu-set-charset CSET &optional START END)

Documentation

Apply CHARSET text property to the region or next character typed.

If the region is active (normally true except in Transient Mark mode) and nonempty, and there is no prefix argument, this command adds CHARSET property to the region. Otherwise, it sets the CHARSET property of the character at point.

Probably introduced at or before Emacs version 27.1.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/facemenu.el.gz
(defun facemenu-set-charset (cset &optional start end)
  "Apply CHARSET text property to the region or next character typed.

If the region is active (normally true except in Transient
Mark mode) and nonempty, and there is no prefix argument,
this command adds CHARSET property to the region.  Otherwise, it
sets the CHARSET property of the character at point."
  (interactive (list (progn
		       (barf-if-buffer-read-only)
		       (read-charset
                        (format-prompt "Use charset" (charset-after))
                        (charset-after)))
		     (if (and mark-active (not current-prefix-arg))
			 (region-beginning))
		     (if (and mark-active (not current-prefix-arg))
			 (region-end))))
  (or start
      (setq start (min (point) (1- (point-max)))
            end (1+ start)))
  (remove-text-properties start end '(charset nil))
  (put-text-property start end 'charset cset))