mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-11 02:10:35 -08:00
(insert-image-file): When visiting an image, suppress the cursor in the
image buffer.
This commit is contained in:
parent
1b66ab0e17
commit
33155ffbf6
2 changed files with 12 additions and 4 deletions
|
|
@ -1,3 +1,8 @@
|
|||
2001-02-02 Miles Bader <miles@gnu.org>
|
||||
|
||||
* image-file.el (insert-image-file): When visiting an image,
|
||||
suppress the cursor in the image buffer.
|
||||
|
||||
2001-02-01 Dave Love <fx@gnu.org>
|
||||
|
||||
* progmodes/f90.el (f90-mode): Remove startup message.
|
||||
|
|
|
|||
|
|
@ -110,6 +110,7 @@ the command `insert-file-contents'."
|
|||
(when (and (or (null beg) (zerop beg)) (null end))
|
||||
(let* ((ibeg (point))
|
||||
(iend (+ (point) (cadr rval)))
|
||||
(visitingp (and visit (= ibeg (point-min)) (= iend (point-max))))
|
||||
(data
|
||||
(string-make-unibyte
|
||||
(buffer-substring-no-properties ibeg iend)))
|
||||
|
|
@ -122,11 +123,13 @@ the command `insert-file-contents'."
|
|||
;; This a cheap attempt to make the whole buffer
|
||||
;; read-only when we're visiting the file (as
|
||||
;; opposed to just inserting it).
|
||||
,@(and visit
|
||||
(= ibeg (point-min))
|
||||
(= iend (point-max))
|
||||
,@(and visitingp
|
||||
'(read-only t front-sticky (read-only))))))
|
||||
(add-text-properties ibeg iend props)))
|
||||
(add-text-properties ibeg iend props)
|
||||
(when visitingp
|
||||
;; Inhibit the cursor when the buffer contains only an image,
|
||||
;; because cursors look very strange on top of images.
|
||||
(setq cursor-type nil))))
|
||||
rval))
|
||||
|
||||
(defun image-file-handler (operation &rest args)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue