(- (nth 3 edges) (nth 1 edges)))))))
image))
b)
- (insert "\n\n")
+ (insert "\n")
(mm-handle-set-undisplayer
handle
`(lambda ()
(let ((b ,b)
(inhibit-read-only t))
(remove-images b b)
- (delete-region b (+ b 2)))))))
+ (delete-region b (1+ b)))))))
(defun mm-inline-image-xemacs (handle)
(when (featurep 'xemacs)
- (insert "\n\n")
- (forward-char -2)
+ (insert "\n")
+ (forward-char -1)
(let ((annot (make-annotation (mm-get-image handle) nil 'text))
(inhibit-read-only t))
(mm-handle-set-undisplayer
(let ((b ,(point-marker))
(inhibit-read-only t))
(delete-annotation ,annot)
- (delete-region (- b 2) b))))
+ (delete-region (1- b) b))))
(set-extent-property annot 'mm t)
(set-extent-property annot 'duplicable t))))
handle
`(lambda ()
(let ((inhibit-read-only t))
- (delete-region ,(point-min-marker)
+ (delete-region ,(copy-marker (point-min) t)
,(point-max-marker)))))))))
(defvar mm-w3m-standalone-supports-m17n-p (if (featurep 'mule) 'undecided)
handle
`(lambda ()
(let ((inhibit-read-only t))
- (delete-region ,(point-min-marker)
+ (delete-region ,(copy-marker (point-min) t)
,(point-max-marker))))))))
(defun mm-insert-inline (handle text)
handle
`(lambda ()
(let ((inhibit-read-only t))
- (delete-region ,(copy-marker b)
- ,(copy-marker (point))))))))
+ (delete-region ,(copy-marker b t)
+ ,(point-marker)))))))
(defun mm-inline-audio (handle)
(message "Not implemented"))
(set (make-local-variable 'enable-local-variables) nil)
(with-demoted-errors
(if mode
- (funcall mode)
+ (save-window-excursion
+ (switch-to-buffer (current-buffer))
+ (funcall mode))
(let ((auto-mode-alist
(delq (rassq 'doc-view-mode-maybe auto-mode-alist)
(copy-sequence auto-mode-alist))))
(set-auto-mode)))
;; The mode function might have already turned on font-lock.
;; Do not fontify if the guess mode is fundamental.
- (unless (or (symbol-value 'font-lock-mode)
+ (unless (or font-lock-mode
(eq major-mode 'fundamental-mode))
- (font-lock-fontify-buffer))))
+ (if (fboundp 'font-lock-ensure)
+ (font-lock-ensure)
+ (font-lock-fontify-buffer)))))
;; By default, XEmacs font-lock uses non-duplicable text
;; properties. This code forces all the text properties
;; to be copied along with the text.