mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-04-27 16:51:06 -07:00
Rename 'register-yank-media-handler'
* lisp/textmodes/sgml-mode.el (html-mode): * lisp/gnus/message.el (message-mode): * doc/lispref/frames.texi (Yanking Media): Adjust. * lisp/yank-media.el (yank-media): Adjust doc string. (yank-media-handler): Rename from `register-' because that may cause confusion with register.el functions.
This commit is contained in:
parent
cdd7589330
commit
cddd927d36
4 changed files with 8 additions and 8 deletions
|
|
@ -3936,13 +3936,13 @@ it by default.
|
|||
So Emacs has a system to let modes register handlers for these
|
||||
``complicated'' selections.
|
||||
|
||||
@defun register-yank-media-handler types handler
|
||||
@defun yank-media-handler types handler
|
||||
@var{types} can be a @acronym{MIME} media type symbol, a regexp to
|
||||
match these, or a list of these symbols and regexps. For instance:
|
||||
|
||||
@example
|
||||
(register-yank-media-handler 'text/html #'my-html-handler)
|
||||
(register-yank-media-handler "image/.*" #'my-image-handler)
|
||||
(yank-media-handler 'text/html #'my-html-handler)
|
||||
(yank-media-handler "image/.*" #'my-image-handler)
|
||||
@end example
|
||||
|
||||
A mode can register as many handlers as required.
|
||||
|
|
|
|||
|
|
@ -3157,7 +3157,7 @@ Like `text-mode', but with these additional commands:
|
|||
(setq-local message-checksum nil)
|
||||
(setq-local message-mime-part 0)
|
||||
(message-setup-fill-variables)
|
||||
(register-yank-media-handler "image/.*" #'message--yank-media-image-handler)
|
||||
(yank-media-handler "image/.*" #'message--yank-media-image-handler)
|
||||
(when message-fill-column
|
||||
(setq fill-column message-fill-column)
|
||||
(turn-on-auto-fill))
|
||||
|
|
|
|||
|
|
@ -2415,8 +2415,8 @@ To work around that, do:
|
|||
(setq-local css-id-list-function #'html-current-buffer-ids))
|
||||
|
||||
(setq imenu-create-index-function 'html-imenu-index)
|
||||
(register-yank-media-handler 'text/html #'html-mode--html-yank-handler)
|
||||
(register-yank-media-handler "image/.*" #'html-mode--image-yank-handler)
|
||||
(yank-media-handler 'text/html #'html-mode--html-yank-handler)
|
||||
(yank-media-handler "image/.*" #'html-mode--image-yank-handler)
|
||||
|
||||
(setq-local sgml-empty-tags
|
||||
;; From HTML-4.01's loose.dtd, parsed with
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
"Yank media (images, HTML and the like) from the clipboard.
|
||||
This command depends on the current major mode having support for
|
||||
accepting the media type. The mode has to register itself using
|
||||
the `register-yank-media-handler' mechanism."
|
||||
the `yank-media-handler' mechanism."
|
||||
(interactive)
|
||||
(unless yank-media--registered-handlers
|
||||
(user-error "The `%s' mode hasn't registered any handlers" major-mode))
|
||||
|
|
@ -89,7 +89,7 @@ the `register-yank-media-handler' mechanism."
|
|||
data)))
|
||||
|
||||
;;;###autoload
|
||||
(defun register-yank-media-handler (types handler)
|
||||
(defun yank-media-handler (types handler)
|
||||
"Register HANDLER for dealing with `yank-media' actions for TYPES.
|
||||
TYPES should be a MIME media type symbol, a regexp, or a list
|
||||
that can contain both symbols and regexps.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue