[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#31107: 26.0.91; insert-file-contents-literally's doc indicates inser
From: |
Xu Chunyang |
Subject: |
bug#31107: 26.0.91; insert-file-contents-literally's doc indicates insert-file-contents runs find-file-hook, but it seems untrue |
Date: |
Mon, 09 Apr 2018 16:23:11 +0800 |
'C-h S insert-file-contents-literally' indicates 'insert-file-contents'
runs 'find-file-hook'
-- Function: insert-file-contents-literally filename &optional visit
beg end replace
This function works like ‘insert-file-contents’ except that it does
not run ‘find-file-hook’,
However, 'insert-file-contents' doesn't run 'find-file-hook'. I test
using the following
(add-hook 'find-file-hook
(defun foo ()
(message-box "Visiting %s" buffer-file-truename)))
(insert-file-contents "/etc/shells")
'foo' is not called by 'insert-file-contents', though 'find-file' runs
the hook as expected.
(find-file "/etc/shells")
- bug#31107: 26.0.91; insert-file-contents-literally's doc indicates insert-file-contents runs find-file-hook, but it seems untrue,
Xu Chunyang <=