diff options
| author | Eli Zaretskii | 2017-12-28 19:23:34 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2017-12-28 19:23:34 +0200 |
| commit | 81b1028b63b7d56a9483606fc7c656dd5cee28af (patch) | |
| tree | b1cd716c6fbfd6a748d0f10be8cc50439663dc6f /src | |
| parent | 7175496d7a0e88c938898757f20c6882173eda9c (diff) | |
| download | emacs-81b1028b63b7d56a9483606fc7c656dd5cee28af.tar.gz emacs-81b1028b63b7d56a9483606fc7c656dd5cee28af.zip | |
Improve documentation of 'inhibit-modification-hooks' and friends
* src/buffer.c (Fset_buffer_modified_p)
(Frestore_buffer_modified_p): Doc fixes.
* src/insdel.c (syms_of_insdel) <inhibit-modification-hooks>:
Document in the doc string that this variable also inhibits file
locks and active region handling. (Bug#29846)
Diffstat (limited to 'src')
| -rw-r--r-- | src/buffer.c | 12 | ||||
| -rw-r--r-- | src/insdel.c | 5 |
2 files changed, 14 insertions, 3 deletions
diff --git a/src/buffer.c b/src/buffer.c index 7ae889decf7..bcde2c80989 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -1320,7 +1320,12 @@ menu bar menus and the frame title. */) | |||
| 1320 | DEFUN ("set-buffer-modified-p", Fset_buffer_modified_p, Sset_buffer_modified_p, | 1320 | DEFUN ("set-buffer-modified-p", Fset_buffer_modified_p, Sset_buffer_modified_p, |
| 1321 | 1, 1, 0, | 1321 | 1, 1, 0, |
| 1322 | doc: /* Mark current buffer as modified or unmodified according to FLAG. | 1322 | doc: /* Mark current buffer as modified or unmodified according to FLAG. |
| 1323 | A non-nil FLAG means mark the buffer modified. */) | 1323 | A non-nil FLAG means mark the buffer modified. |
| 1324 | In addition, this function unconditionally forces redisplay of the | ||
| 1325 | mode lines of the windows that display the current buffer, and also | ||
| 1326 | locks or unlocks the file visited by the buffer, depending on whether | ||
| 1327 | the function's argument is non-nil, but only if both `buffer-file-name' | ||
| 1328 | and `buffer-file-truename' are non-nil. */) | ||
| 1324 | (Lisp_Object flag) | 1329 | (Lisp_Object flag) |
| 1325 | { | 1330 | { |
| 1326 | Frestore_buffer_modified_p (flag); | 1331 | Frestore_buffer_modified_p (flag); |
| @@ -1341,7 +1346,10 @@ A non-nil FLAG means mark the buffer modified. */) | |||
| 1341 | 1346 | ||
| 1342 | DEFUN ("restore-buffer-modified-p", Frestore_buffer_modified_p, | 1347 | DEFUN ("restore-buffer-modified-p", Frestore_buffer_modified_p, |
| 1343 | Srestore_buffer_modified_p, 1, 1, 0, | 1348 | Srestore_buffer_modified_p, 1, 1, 0, |
| 1344 | doc: /* Like `set-buffer-modified-p', with a difference concerning redisplay. | 1349 | doc: /* Like `set-buffer-modified-p', but doesn't redisplay buffer's mode line. |
| 1350 | This function also locks and unlocks the file visited by the buffer, | ||
| 1351 | if both `buffer-file-truename' and `buffer-file-name' are non-nil. | ||
| 1352 | |||
| 1345 | It is not ensured that mode lines will be updated to show the modified | 1353 | It is not ensured that mode lines will be updated to show the modified |
| 1346 | state of the current buffer. Use with care. */) | 1354 | state of the current buffer. Use with care. */) |
| 1347 | (Lisp_Object flag) | 1355 | (Lisp_Object flag) |
diff --git a/src/insdel.c b/src/insdel.c index 5dfc62843a7..078f455eaaa 100644 --- a/src/insdel.c +++ b/src/insdel.c | |||
| @@ -2342,7 +2342,10 @@ syms_of_insdel (void) | |||
| 2342 | DEFVAR_BOOL ("inhibit-modification-hooks", inhibit_modification_hooks, | 2342 | DEFVAR_BOOL ("inhibit-modification-hooks", inhibit_modification_hooks, |
| 2343 | doc: /* Non-nil means don't run any of the hooks that respond to buffer changes. | 2343 | doc: /* Non-nil means don't run any of the hooks that respond to buffer changes. |
| 2344 | This affects `before-change-functions' and `after-change-functions', | 2344 | This affects `before-change-functions' and `after-change-functions', |
| 2345 | as well as hooks attached to text properties and overlays. */); | 2345 | as well as hooks attached to text properties and overlays. |
| 2346 | Setting this variable non-nil also inhibits file locks and checks | ||
| 2347 | whether files are locked by another Emacs session, as well as | ||
| 2348 | handling of the active region per `select-active-regions'. */); | ||
| 2346 | inhibit_modification_hooks = 0; | 2349 | inhibit_modification_hooks = 0; |
| 2347 | DEFSYM (Qinhibit_modification_hooks, "inhibit-modification-hooks"); | 2350 | DEFSYM (Qinhibit_modification_hooks, "inhibit-modification-hooks"); |
| 2348 | 2351 | ||