Merge remote-tracking branch 'origin/master' into feature/android
This commit is contained in:
commit
ce63f592f5
5 changed files with 20 additions and 10 deletions
|
@ -706,7 +706,7 @@ produced by typing those commands.
|
|||
for the detailed raw data. Reporting the facts is straightforward,
|
||||
but many people strain to posit explanations and report them instead
|
||||
of the facts. If the explanations are based on guesses about how
|
||||
Emacs is implemented, they night not be useful; meanwhile, lacking the
|
||||
Emacs is implemented, they might not be useful; meanwhile, lacking the
|
||||
facts, we will have no real information about the bug. If you want to
|
||||
actually @emph{debug} the problem, and report explanations that are
|
||||
more than guesses, that is useful---but please include the raw facts
|
||||
|
|
|
@ -136,7 +136,10 @@ Intended to be used in the `interactive' spec of
|
|||
(eq new-value not-value)
|
||||
(not (equal old-value new-value)))
|
||||
(message "%s" (substitute-command-keys
|
||||
"For this change to take effect revisit file using \\[revert-buffer]")))))
|
||||
(if (and (stringp buffer-file-name)
|
||||
(file-exists-p buffer-file-name))
|
||||
"For this change to take effect revisit file using \\[revert-buffer]"
|
||||
"For this change to take effect use \\[normal-mode]"))))))
|
||||
|
||||
(defun modify-file-local-variable (variable value op &optional interactive)
|
||||
"Modify file-local VARIABLE in Local Variables depending on operation OP.
|
||||
|
|
|
@ -110,10 +110,11 @@ You can <\\`q'>uit; don't modify this file."))
|
|||
|
||||
(defun userlock--check-content-unchanged (filename)
|
||||
(with-demoted-errors "Unchanged content check: %S"
|
||||
;; Even tho we receive `filename', we know that `filename' refers to the current
|
||||
;; buffer's file.
|
||||
(cl-assert (equal (expand-file-name filename)
|
||||
(expand-file-name buffer-file-truename)))
|
||||
;; Even tho we receive `filename', we know that `filename' refers
|
||||
;; to the current buffer's file.
|
||||
(cl-assert (or (null buffer-file-truename) ; temporary buffer
|
||||
(equal (expand-file-name filename)
|
||||
(expand-file-name buffer-file-truename))))
|
||||
;; Note: rather than read the file and compare to the buffer, we could save
|
||||
;; the buffer and compare to the file, but for encrypted data this
|
||||
;; wouldn't work well (and would risk exposing the data).
|
||||
|
@ -135,7 +136,13 @@ You can <\\`q'>uit; don't modify this file."))
|
|||
(compare-buffer-substrings
|
||||
buf start end
|
||||
(current-buffer) (point-min) (point-max))))))
|
||||
(set-visited-file-modtime)
|
||||
;; We know that some buffer visits FILENAME, because our
|
||||
;; caller (see lock_file) verified that. Thus, we set the
|
||||
;; modtime in that buffer, to cater to use case where the
|
||||
;; file is about to be written to from some buffer that
|
||||
;; doesn't visit any file, like a temporary buffer.
|
||||
(with-current-buffer (get-file-buffer (file-truename filename))
|
||||
(set-visited-file-modtime))
|
||||
'unchanged)))))
|
||||
|
||||
;;;###autoload
|
||||
|
|
|
@ -470,7 +470,7 @@ used for non-Latin and other unusual characters (such as emoji) is
|
|||
ignored as well, as are display properties and invisible text.
|
||||
For these reasons, the results are not generally reliable;
|
||||
for accurate dimensions of text as it will be displayed,
|
||||
use `window-text-pixel-size' instead.
|
||||
use `string-pixel-width' or `window-text-pixel-size' instead.
|
||||
usage: (string-width STRING &optional FROM TO) */)
|
||||
(Lisp_Object str, Lisp_Object from, Lisp_Object to)
|
||||
{
|
||||
|
|
|
@ -11659,8 +11659,8 @@ the command loop or by `read-key-sequence'.
|
|||
The value is always a vector. */)
|
||||
(void)
|
||||
{
|
||||
return Fvector (this_command_key_count
|
||||
- this_single_command_key_start,
|
||||
ptrdiff_t nkeys = this_command_key_count - this_single_command_key_start;
|
||||
return Fvector (nkeys < 0 ? 0 : nkeys,
|
||||
(XVECTOR (this_command_keys)->contents
|
||||
+ this_single_command_key_start));
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue