Merge remote-tracking branch 'savannah/master' into HEAD
This commit is contained in:
commit
517c123fd4
21 changed files with 207 additions and 89 deletions
|
@ -141,6 +141,15 @@ default face. This can cause Emacs to scroll to somewhat wrong buffer
|
||||||
positions when the faces in use are not all the same size, even with
|
positions when the faces in use are not all the same size, even with
|
||||||
single (i.e., without auto-repeat) scrolling operations.
|
single (i.e., without auto-repeat) scrolling operations.
|
||||||
|
|
||||||
|
@vindex jit-lock-defer-time
|
||||||
|
As an alternative to setting @code{fast-but-imprecise-scrolling} you
|
||||||
|
might prefer to enable jit-lock deferred fontification (@pxref{Font
|
||||||
|
Lock}). To do this, customize @code{jit-lock-defer-time} to a small
|
||||||
|
positive number such as 0.25, or even 0.1 if you type quickly. This
|
||||||
|
gives you less jerky scrolling when you hold down @kbd{C-v}, but the
|
||||||
|
window contents after any action which scrolls into a fresh portion of
|
||||||
|
the buffer will be momentarily unfontified.
|
||||||
|
|
||||||
@vindex scroll-up
|
@vindex scroll-up
|
||||||
@vindex scroll-down
|
@vindex scroll-down
|
||||||
@findex scroll-up-line
|
@findex scroll-up-line
|
||||||
|
|
|
@ -712,6 +712,21 @@ is @code{t}, which means these keys produce @code{AltGr}; setting it
|
||||||
to @code{nil} causes @key{AltGr} or the equivalent key combination to
|
to @code{nil} causes @key{AltGr} or the equivalent key combination to
|
||||||
be interpreted as the combination of @key{Ctrl} and @key{Meta}
|
be interpreted as the combination of @key{Ctrl} and @key{Meta}
|
||||||
modifiers.
|
modifiers.
|
||||||
|
|
||||||
|
@cindex IME, MS-Windows
|
||||||
|
@findex w32-set-ime-open-status
|
||||||
|
Some versions of MS-Windows, typically East Asian localized Windows,
|
||||||
|
enable the Input Method Manager (@acronym{IMM}) that allows
|
||||||
|
applications to communicate with the Input Method Editor
|
||||||
|
(@acronym{IME}), the native Windows input method service. Emacs uses
|
||||||
|
the @acronym{IME} when available to allow users to input East Asian
|
||||||
|
non-@acronym{ASCII} characters, similarly to Emacs's built-in input
|
||||||
|
methods (@pxref{Input Methods}). However, in some situations the
|
||||||
|
@acronym{IME} can get in the way if it interprets simple
|
||||||
|
@acronym{ASCII} keys you input as part of a key sequence that
|
||||||
|
designates a non-@acronym{ASCII} character. The @acronym{IME} can be
|
||||||
|
temporarily turned off and then on again by using the
|
||||||
|
@code{w32-set-ime-open-status} function.
|
||||||
@end ifnottex
|
@end ifnottex
|
||||||
|
|
||||||
@node Windows Mouse
|
@node Windows Mouse
|
||||||
|
|
|
@ -32,13 +32,14 @@ In the mail buffer, send the message and bury the buffer
|
||||||
|
|
||||||
The mail buffer is an ordinary Emacs buffer, so you can switch to
|
The mail buffer is an ordinary Emacs buffer, so you can switch to
|
||||||
other buffers while composing the mail. If you want to send another
|
other buffers while composing the mail. If you want to send another
|
||||||
mail before finishing the current one, type @kbd{C-x m} again to open
|
message before finishing the current one, type @kbd{C-x m} again to
|
||||||
a new mail buffer whose name has a different numeric suffix
|
open a new mail buffer whose name has a different numeric suffix
|
||||||
(@pxref{Misc Buffer}). If you invoke the command with a prefix
|
(@pxref{Misc Buffer}). (This only works if you use the default
|
||||||
argument, @w{@kbd{C-u C-x m}}, Emacs switches back to the last mail
|
Message mode to compose email; see @ref{Mail Commands}.) If you know
|
||||||
buffer, and asks if you want to erase the message in that buffer; if
|
that you'd like to continue composing the unsent message you were
|
||||||
you answer no, this lets you pick up editing the message where you
|
editing, invoke this command with a prefix argument, @w{@kbd{C-u C-x
|
||||||
left off.
|
m}}, and Emacs will switch to the last mail buffer you used and let
|
||||||
|
you pick up editing the message where you left off.
|
||||||
|
|
||||||
@kindex C-x 4 m
|
@kindex C-x 4 m
|
||||||
@findex compose-mail-other-window
|
@findex compose-mail-other-window
|
||||||
|
@ -122,26 +123,6 @@ environment variables (@pxref{General Variables}). If this
|
||||||
information is unavailable or wrong, you should customize the
|
information is unavailable or wrong, you should customize the
|
||||||
variables yourself (@pxref{Easy Customization}).
|
variables yourself (@pxref{Easy Customization}).
|
||||||
|
|
||||||
@vindex mail-from-style
|
|
||||||
The value of the variable @code{mail-from-style} specifies how to
|
|
||||||
format the contents of the @samp{From} field:
|
|
||||||
|
|
||||||
@table @asis
|
|
||||||
@item @code{nil}
|
|
||||||
Use just the address, as in @samp{king@@grassland.com}.
|
|
||||||
@item @code{parens}
|
|
||||||
Use both address and full name, as in:@*
|
|
||||||
@samp{king@@grassland.com (Elvis Parsley)}.
|
|
||||||
@item @code{angles}
|
|
||||||
Use both address and full name, as in:@*
|
|
||||||
@samp{Elvis Parsley <king@@grassland.com>}.
|
|
||||||
@item any other value
|
|
||||||
Use @code{angles} normally. But if the address must be quoted to
|
|
||||||
remain syntactically valid under the @code{angles} format but not
|
|
||||||
under the @code{parens} format, use @code{parens} instead. This is
|
|
||||||
the default.
|
|
||||||
@end table
|
|
||||||
|
|
||||||
Apart from @samp{From}, here is a table of commonly-used fields:
|
Apart from @samp{From}, here is a table of commonly-used fields:
|
||||||
|
|
||||||
@table @samp
|
@table @samp
|
||||||
|
|
|
@ -3667,7 +3667,8 @@ automatically undone when the @code{let} is finished. The setting
|
||||||
only affects expressions that are inside the bounds of the @code{let}
|
only affects expressions that are inside the bounds of the @code{let}
|
||||||
expression. In computer science jargon, we would say the binding of
|
expression. In computer science jargon, we would say the binding of
|
||||||
a symbol is visible only in functions called in the @code{let} form;
|
a symbol is visible only in functions called in the @code{let} form;
|
||||||
in Emacs Lisp, scoping is dynamic, not lexical.
|
in Emacs Lisp, the default scoping is dynamic, not lexical. (The
|
||||||
|
non-default lexical binding is not discussed in this manual.)
|
||||||
|
|
||||||
@code{let} can create more than one variable at once. Also,
|
@code{let} can create more than one variable at once. Also,
|
||||||
@code{let} gives each variable it creates an initial value, either a
|
@code{let} gives each variable it creates an initial value, either a
|
||||||
|
|
|
@ -2466,7 +2466,7 @@ If non-@code{nil}, try to make an asynchronous connection.
|
||||||
@item :coding @var{coding}
|
@item :coding @var{coding}
|
||||||
Use this to set the coding systems used by the network process, in
|
Use this to set the coding systems used by the network process, in
|
||||||
preference to binding @code{coding-system-for-read} or
|
preference to binding @code{coding-system-for-read} or
|
||||||
@code{coding-system-for-write}. @xref{Network Processes} for
|
@code{coding-system-for-write}. @xref{Network Processes}, for
|
||||||
details.
|
details.
|
||||||
|
|
||||||
@item :type @var{type}
|
@item :type @var{type}
|
||||||
|
|
|
@ -5776,4 +5776,11 @@ code that is itself run from a modification hook, then rebind locally
|
||||||
may cause recursive calls to the modification hooks, so be sure to
|
may cause recursive calls to the modification hooks, so be sure to
|
||||||
prepare for that (for example, by binding some variable which tells
|
prepare for that (for example, by binding some variable which tells
|
||||||
your hook to do nothing).
|
your hook to do nothing).
|
||||||
|
|
||||||
|
We recommend that you only bind this variable for modifications that
|
||||||
|
do not result in lasting changes to buffer text contents (for example
|
||||||
|
face changes or temporary modifications). If you need to delay change
|
||||||
|
hooks during a series of changes (typically for performance reasons),
|
||||||
|
use @code{combine-change-calls} or @code{combine-after-change-calls}
|
||||||
|
instead.
|
||||||
@end defvar
|
@end defvar
|
||||||
|
|
7
etc/NEWS
7
etc/NEWS
|
@ -379,6 +379,13 @@ coding-system-for-{read,write} or call 'set-process-coding-system'.
|
||||||
'module-file-suffix' now has the value ".dylib" on macOS, but the
|
'module-file-suffix' now has the value ".dylib" on macOS, but the
|
||||||
".so" suffix is supported as well.
|
".so" suffix is supported as well.
|
||||||
|
|
||||||
|
+++
|
||||||
|
** On MS-Windows, Emacs can now toggle the IME.
|
||||||
|
A new function 'w32-set-ime-open-status' can now be used to disable
|
||||||
|
and enable the MS-Windows native Input Method Editor (IME) at run
|
||||||
|
time. A companion function 'w32-get-ime-open-status' returns the
|
||||||
|
current IME activation status.
|
||||||
|
|
||||||
|
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
This file is part of GNU Emacs.
|
This file is part of GNU Emacs.
|
||||||
|
|
|
@ -2239,6 +2239,10 @@ The option is useful for two reasons when verifying the signature:
|
||||||
2.2.17 to fully benefit from this feature. See gpg(1) man page for
|
2.2.17 to fully benefit from this feature. See gpg(1) man page for
|
||||||
"--auto-key-retrieve".
|
"--auto-key-retrieve".
|
||||||
|
|
||||||
|
+++
|
||||||
|
*** The 'mail-from-style' variable is now obsolete.
|
||||||
|
According to RFC 5322, only the 'angles' value is valid.
|
||||||
|
|
||||||
---
|
---
|
||||||
** EasyPG
|
** EasyPG
|
||||||
|
|
||||||
|
|
|
@ -3118,7 +3118,7 @@ slots skipped by :initial-offset may appear in the list."
|
||||||
descs)))
|
descs)))
|
||||||
(nreverse descs)))
|
(nreverse descs)))
|
||||||
|
|
||||||
(define-error 'cl-struct-unknown-slot "struct %S has no slot %S")
|
(define-error 'cl-struct-unknown-slot "struct has no slot")
|
||||||
|
|
||||||
(defun cl-struct-slot-offset (struct-type slot-name)
|
(defun cl-struct-slot-offset (struct-type slot-name)
|
||||||
"Return the offset of slot SLOT-NAME in STRUCT-TYPE.
|
"Return the offset of slot SLOT-NAME in STRUCT-TYPE.
|
||||||
|
|
|
@ -236,6 +236,15 @@ REGEXP defaults to \"[ \\t\\n\\r]+\"."
|
||||||
TRIM-LEFT and TRIM-RIGHT default to \"[ \\t\\n\\r]+\"."
|
TRIM-LEFT and TRIM-RIGHT default to \"[ \\t\\n\\r]+\"."
|
||||||
(string-trim-left (string-trim-right string trim-right) trim-left))
|
(string-trim-left (string-trim-right string trim-right) trim-left))
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(defun string-truncate-left (string length)
|
||||||
|
"Truncate STRING to LENGTH, replacing initial surplus with \"...\"."
|
||||||
|
(let ((strlen (length string)))
|
||||||
|
(if (<= strlen length)
|
||||||
|
string
|
||||||
|
(setq length (max 0 (- length 3)))
|
||||||
|
(concat "..." (substring string (max 0 (- strlen 1 length)))))))
|
||||||
|
|
||||||
(defsubst string-blank-p (string)
|
(defsubst string-blank-p (string)
|
||||||
"Check whether STRING is either empty or only whitespace.
|
"Check whether STRING is either empty or only whitespace.
|
||||||
The following characters count as whitespace here: space, tab, newline and
|
The following characters count as whitespace here: space, tab, newline and
|
||||||
|
|
|
@ -9494,15 +9494,15 @@ The 1st element is the button named by `gnus-collect-urls-primary-text'."
|
||||||
(delete-dups urls)))
|
(delete-dups urls)))
|
||||||
|
|
||||||
(defun gnus-shorten-url (url max)
|
(defun gnus-shorten-url (url max)
|
||||||
"Return an excerpt from URL."
|
"Return an excerpt from URL not exceeding MAX characters."
|
||||||
(if (<= (length url) max)
|
(if (<= (length url) max)
|
||||||
url
|
url
|
||||||
(let ((parsed (url-generic-parse-url url)))
|
(let* ((parsed (url-generic-parse-url url))
|
||||||
(concat (url-host parsed)
|
(host (url-host parsed))
|
||||||
"..."
|
(rest (concat (url-filename parsed)
|
||||||
(substring (url-filename parsed)
|
(when-let ((target (url-target parsed)))
|
||||||
(- (length (url-filename parsed))
|
(concat "#" target)))))
|
||||||
(max (- max (length (url-host parsed))) 0)))))))
|
(concat host (string-truncate-left rest (- max (length host)))))))
|
||||||
|
|
||||||
(defun gnus-summary-browse-url (&optional external)
|
(defun gnus-summary-browse-url (&optional external)
|
||||||
"Scan the current article body for links, and offer to browse them.
|
"Scan the current article body for links, and offer to browse them.
|
||||||
|
|
|
@ -73,7 +73,7 @@ Otherwise, most addresses look like `angles', but they look like
|
||||||
:version "27.1")
|
:version "27.1")
|
||||||
(make-obsolete-variable
|
(make-obsolete-variable
|
||||||
'mail-from-style
|
'mail-from-style
|
||||||
"only the `angles' value is valid according to RFC2822." "27.1" 'set)
|
"only the `angles' value is valid according to RFC5322." "27.1" 'set)
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defcustom mail-specify-envelope-from nil
|
(defcustom mail-specify-envelope-from nil
|
||||||
|
|
|
@ -291,9 +291,9 @@ Blank lines separate paragraphs. Semicolons start comments.
|
||||||
(unless
|
(unless
|
||||||
(let* ((bfname (buffer-file-name))
|
(let* ((bfname (buffer-file-name))
|
||||||
(fname (and (stringp bfname) (file-name-nondirectory bfname))))
|
(fname (and (stringp bfname) (file-name-nondirectory bfname))))
|
||||||
(or (not (stringp fname))
|
(and (stringp fname)
|
||||||
(string-match "\\`\\.#" fname)
|
(or (string-match "\\`\\.#" fname)
|
||||||
(string-equal dir-locals-file fname)))
|
(string-equal dir-locals-file fname))))
|
||||||
(add-hook 'flymake-diagnostic-functions #'elisp-flymake-checkdoc nil t)
|
(add-hook 'flymake-diagnostic-functions #'elisp-flymake-checkdoc nil t)
|
||||||
(add-hook 'flymake-diagnostic-functions
|
(add-hook 'flymake-diagnostic-functions
|
||||||
#'elisp-flymake-byte-compile nil t)))
|
#'elisp-flymake-byte-compile nil t)))
|
||||||
|
|
|
@ -1321,35 +1321,42 @@ POS can be a buffer position or a button"
|
||||||
(flymake-show-diagnostic (if (button-type pos) (button-start pos) pos))))
|
(flymake-show-diagnostic (if (button-type pos) (button-start pos) pos))))
|
||||||
|
|
||||||
(defun flymake--diagnostics-buffer-entries ()
|
(defun flymake--diagnostics-buffer-entries ()
|
||||||
(with-current-buffer flymake--diagnostics-buffer-source
|
;; Do nothing if 'flymake--diagnostics-buffer-source' has not yet
|
||||||
(cl-loop for diag in
|
;; been set to a valid buffer. This could happen when this function
|
||||||
(cl-sort (flymake-diagnostics) #'< :key #'flymake-diagnostic-beg)
|
;; is called too early. For example 'global-display-line-numbers-mode'
|
||||||
for (line . col) =
|
;; calls us from its mode hook, when the diagnostic buffer has just
|
||||||
(save-excursion
|
;; been created by 'flymake-show-diagnostics-buffer', but is not yet
|
||||||
(goto-char (flymake--diag-beg diag))
|
;; set up properly.
|
||||||
(cons (line-number-at-pos)
|
(when (bufferp flymake--diagnostics-buffer-source)
|
||||||
(- (point)
|
(with-current-buffer flymake--diagnostics-buffer-source
|
||||||
(line-beginning-position))))
|
(cl-loop for diag in
|
||||||
for type = (flymake--diag-type diag)
|
(cl-sort (flymake-diagnostics) #'< :key #'flymake-diagnostic-beg)
|
||||||
collect
|
for (line . col) =
|
||||||
(list (list :diagnostic diag
|
(save-excursion
|
||||||
:line line
|
(goto-char (flymake--diag-beg diag))
|
||||||
:severity (flymake--lookup-type-property
|
(cons (line-number-at-pos)
|
||||||
type
|
(- (point)
|
||||||
'severity (warning-numeric-level :error)))
|
(line-beginning-position))))
|
||||||
`[,(format "%s" line)
|
for type = (flymake--diag-type diag)
|
||||||
,(format "%s" col)
|
collect
|
||||||
,(propertize (format "%s"
|
(list (list :diagnostic diag
|
||||||
(flymake--lookup-type-property
|
:line line
|
||||||
type 'flymake-type-name type))
|
:severity (flymake--lookup-type-property
|
||||||
'face (flymake--lookup-type-property
|
type
|
||||||
type 'mode-line-face 'flymake-error))
|
'severity (warning-numeric-level :error)))
|
||||||
(,(format "%s" (flymake--diag-text diag))
|
`[,(format "%s" line)
|
||||||
mouse-face highlight
|
,(format "%s" col)
|
||||||
help-echo "mouse-2: visit this diagnostic"
|
,(propertize (format "%s"
|
||||||
face nil
|
(flymake--lookup-type-property
|
||||||
action flymake-goto-diagnostic
|
type 'flymake-type-name type))
|
||||||
mouse-action flymake-goto-diagnostic)]))))
|
'face (flymake--lookup-type-property
|
||||||
|
type 'mode-line-face 'flymake-error))
|
||||||
|
(,(format "%s" (flymake--diag-text diag))
|
||||||
|
mouse-face highlight
|
||||||
|
help-echo "mouse-2: visit this diagnostic"
|
||||||
|
face nil
|
||||||
|
action flymake-goto-diagnostic
|
||||||
|
mouse-action flymake-goto-diagnostic)])))))
|
||||||
|
|
||||||
(define-derived-mode flymake-diagnostics-buffer-mode tabulated-list-mode
|
(define-derived-mode flymake-diagnostics-buffer-mode tabulated-list-mode
|
||||||
"Flymake diagnostics"
|
"Flymake diagnostics"
|
||||||
|
|
|
@ -8057,8 +8057,12 @@ OTHER-HEADERS is an alist specifying additional
|
||||||
header fields. Elements look like (HEADER . VALUE) where both
|
header fields. Elements look like (HEADER . VALUE) where both
|
||||||
HEADER and VALUE are strings.
|
HEADER and VALUE are strings.
|
||||||
|
|
||||||
CONTINUE, if non-nil, says to continue editing a message already
|
By default, if an unsent message is already being composed, this
|
||||||
being composed. Interactively, CONTINUE is the prefix argument.
|
command will ask whether to erase the unsent message, and will not
|
||||||
|
start a new message if the user doesn't allow erasing. However, if
|
||||||
|
CONTINUE is non-nil, it means to continue editing a message already
|
||||||
|
being composed without asking. Interactively, CONTINUE is the prefix
|
||||||
|
argument.
|
||||||
|
|
||||||
SWITCH-FUNCTION, if non-nil, is a function to use to
|
SWITCH-FUNCTION, if non-nil, is a function to use to
|
||||||
switch to and display the buffer used for mail composition.
|
switch to and display the buffer used for mail composition.
|
||||||
|
|
|
@ -1510,16 +1510,6 @@ This default should work without changes."
|
||||||
(setq dir (substring dir 0 pos)))
|
(setq dir (substring dir 0 pos)))
|
||||||
(ediff-abbreviate-file-name (file-name-directory dir))))
|
(ediff-abbreviate-file-name (file-name-directory dir))))
|
||||||
|
|
||||||
(defun ediff-truncate-string-left (str newlen)
|
|
||||||
;; leave space for ... on the left
|
|
||||||
(let ((len (length str))
|
|
||||||
substr)
|
|
||||||
(if (<= len newlen)
|
|
||||||
str
|
|
||||||
(setq newlen (max 0 (- newlen 3)))
|
|
||||||
(setq substr (substring str (max 0 (- len 1 newlen))))
|
|
||||||
(concat "..." substr))))
|
|
||||||
|
|
||||||
(defsubst ediff-nonempty-string-p (string)
|
(defsubst ediff-nonempty-string-p (string)
|
||||||
(and (stringp string) (not (string= string ""))))
|
(and (stringp string) (not (string= string ""))))
|
||||||
|
|
||||||
|
|
|
@ -113,7 +113,6 @@
|
||||||
(require 'ediff-wind)
|
(require 'ediff-wind)
|
||||||
(require 'ediff-util)
|
(require 'ediff-util)
|
||||||
|
|
||||||
|
|
||||||
;; meta-buffer
|
;; meta-buffer
|
||||||
(ediff-defvar-local ediff-meta-buffer nil "")
|
(ediff-defvar-local ediff-meta-buffer nil "")
|
||||||
(ediff-defvar-local ediff-parent-meta-buffer nil "")
|
(ediff-defvar-local ediff-parent-meta-buffer nil "")
|
||||||
|
@ -1172,7 +1171,7 @@ behavior."
|
||||||
;; abbreviate the file name, if file exists
|
;; abbreviate the file name, if file exists
|
||||||
(if (and (not (stringp fname)) (< file-size -1))
|
(if (and (not (stringp fname)) (< file-size -1))
|
||||||
"-------" ; file doesn't exist
|
"-------" ; file doesn't exist
|
||||||
(ediff-truncate-string-left
|
(string-truncate-left
|
||||||
(ediff-abbreviate-file-name fname)
|
(ediff-abbreviate-file-name fname)
|
||||||
max-filename-width)))))))
|
max-filename-width)))))))
|
||||||
|
|
||||||
|
@ -1266,7 +1265,7 @@ Useful commands:
|
||||||
(if (= (mod membership-code ediff-membership-code1) 0) ; dir1
|
(if (= (mod membership-code ediff-membership-code1) 0) ; dir1
|
||||||
(let ((beg (point)))
|
(let ((beg (point)))
|
||||||
(insert (format "%-27s"
|
(insert (format "%-27s"
|
||||||
(ediff-truncate-string-left
|
(string-truncate-left
|
||||||
(ediff-abbreviate-file-name
|
(ediff-abbreviate-file-name
|
||||||
(if (file-directory-p (concat dir1 file))
|
(if (file-directory-p (concat dir1 file))
|
||||||
(file-name-as-directory file)
|
(file-name-as-directory file)
|
||||||
|
@ -1281,7 +1280,7 @@ Useful commands:
|
||||||
(if (= (mod membership-code ediff-membership-code2) 0) ; dir2
|
(if (= (mod membership-code ediff-membership-code2) 0) ; dir2
|
||||||
(let ((beg (point)))
|
(let ((beg (point)))
|
||||||
(insert (format "%-26s"
|
(insert (format "%-26s"
|
||||||
(ediff-truncate-string-left
|
(string-truncate-left
|
||||||
(ediff-abbreviate-file-name
|
(ediff-abbreviate-file-name
|
||||||
(if (file-directory-p (concat dir2 file))
|
(if (file-directory-p (concat dir2 file))
|
||||||
(file-name-as-directory file)
|
(file-name-as-directory file)
|
||||||
|
@ -1295,7 +1294,7 @@ Useful commands:
|
||||||
(if (= (mod membership-code ediff-membership-code3) 0) ; dir3
|
(if (= (mod membership-code ediff-membership-code3) 0) ; dir3
|
||||||
(let ((beg (point)))
|
(let ((beg (point)))
|
||||||
(insert (format " %-25s"
|
(insert (format " %-25s"
|
||||||
(ediff-truncate-string-left
|
(string-truncate-left
|
||||||
(ediff-abbreviate-file-name
|
(ediff-abbreviate-file-name
|
||||||
(if (file-directory-p (concat dir3 file))
|
(if (file-directory-p (concat dir3 file))
|
||||||
(file-name-as-directory file)
|
(file-name-as-directory file)
|
||||||
|
|
|
@ -2397,7 +2397,13 @@ This affects `before-change-functions' and `after-change-functions',
|
||||||
as well as hooks attached to text properties and overlays.
|
as well as hooks attached to text properties and overlays.
|
||||||
Setting this variable non-nil also inhibits file locks and checks
|
Setting this variable non-nil also inhibits file locks and checks
|
||||||
whether files are locked by another Emacs session, as well as
|
whether files are locked by another Emacs session, as well as
|
||||||
handling of the active region per `select-active-regions'. */);
|
handling of the active region per `select-active-regions'.
|
||||||
|
|
||||||
|
To delay change hooks during a series of changes, use
|
||||||
|
`combine-change-calls' or `combine-after-change-calls' instead of
|
||||||
|
binding this variable.
|
||||||
|
|
||||||
|
See also the info node `(elisp) Change Hooks'. */);
|
||||||
inhibit_modification_hooks = 0;
|
inhibit_modification_hooks = 0;
|
||||||
DEFSYM (Qinhibit_modification_hooks, "inhibit-modification-hooks");
|
DEFSYM (Qinhibit_modification_hooks, "inhibit-modification-hooks");
|
||||||
|
|
||||||
|
|
74
src/w32fns.c
74
src/w32fns.c
|
@ -166,6 +166,10 @@ typedef HIMC (WINAPI * ImmGetContext_Proc) (IN HWND window);
|
||||||
typedef BOOL (WINAPI * ImmReleaseContext_Proc) (IN HWND wnd, IN HIMC context);
|
typedef BOOL (WINAPI * ImmReleaseContext_Proc) (IN HWND wnd, IN HIMC context);
|
||||||
typedef BOOL (WINAPI * ImmSetCompositionWindow_Proc) (IN HIMC context,
|
typedef BOOL (WINAPI * ImmSetCompositionWindow_Proc) (IN HIMC context,
|
||||||
IN COMPOSITIONFORM *form);
|
IN COMPOSITIONFORM *form);
|
||||||
|
/* For toggling IME status. */
|
||||||
|
typedef BOOL (WINAPI * ImmGetOpenStatus_Proc) (IN HIMC);
|
||||||
|
typedef BOOL (WINAPI * ImmSetOpenStatus_Proc) (IN HIMC, IN BOOL);
|
||||||
|
|
||||||
typedef HMONITOR (WINAPI * MonitorFromPoint_Proc) (IN POINT pt, IN DWORD flags);
|
typedef HMONITOR (WINAPI * MonitorFromPoint_Proc) (IN POINT pt, IN DWORD flags);
|
||||||
typedef BOOL (WINAPI * GetMonitorInfo_Proc)
|
typedef BOOL (WINAPI * GetMonitorInfo_Proc)
|
||||||
(IN HMONITOR monitor, OUT struct MONITOR_INFO* info);
|
(IN HMONITOR monitor, OUT struct MONITOR_INFO* info);
|
||||||
|
@ -185,6 +189,8 @@ typedef HRESULT (WINAPI *SetThreadDescription_Proc)
|
||||||
TrackMouseEvent_Proc track_mouse_event_fn = NULL;
|
TrackMouseEvent_Proc track_mouse_event_fn = NULL;
|
||||||
ImmGetCompositionString_Proc get_composition_string_fn = NULL;
|
ImmGetCompositionString_Proc get_composition_string_fn = NULL;
|
||||||
ImmGetContext_Proc get_ime_context_fn = NULL;
|
ImmGetContext_Proc get_ime_context_fn = NULL;
|
||||||
|
ImmGetOpenStatus_Proc get_ime_open_status_fn = NULL;
|
||||||
|
ImmSetOpenStatus_Proc set_ime_open_status_fn = NULL;
|
||||||
ImmReleaseContext_Proc release_ime_context_fn = NULL;
|
ImmReleaseContext_Proc release_ime_context_fn = NULL;
|
||||||
ImmSetCompositionWindow_Proc set_ime_composition_window_fn = NULL;
|
ImmSetCompositionWindow_Proc set_ime_composition_window_fn = NULL;
|
||||||
MonitorFromPoint_Proc monitor_from_point_fn = NULL;
|
MonitorFromPoint_Proc monitor_from_point_fn = NULL;
|
||||||
|
@ -3305,6 +3311,7 @@ w32_name_of_message (UINT msg)
|
||||||
M (WM_EMACS_SETCURSOR),
|
M (WM_EMACS_SETCURSOR),
|
||||||
M (WM_EMACS_SHOWCURSOR),
|
M (WM_EMACS_SHOWCURSOR),
|
||||||
M (WM_EMACS_PAINT),
|
M (WM_EMACS_PAINT),
|
||||||
|
M (WM_EMACS_IME_STATUS),
|
||||||
M (WM_CHAR),
|
M (WM_CHAR),
|
||||||
#undef M
|
#undef M
|
||||||
{ 0, 0 }
|
{ 0, 0 }
|
||||||
|
@ -3442,6 +3449,21 @@ w32_msg_pump (deferred_msg * msg_buf)
|
||||||
emacs_abort ();
|
emacs_abort ();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case WM_EMACS_IME_STATUS:
|
||||||
|
{
|
||||||
|
focus_window = GetFocus ();
|
||||||
|
if (!set_ime_open_status_fn || !focus_window)
|
||||||
|
break;
|
||||||
|
|
||||||
|
HIMC context = get_ime_context_fn (focus_window);
|
||||||
|
if (!context)
|
||||||
|
break;
|
||||||
|
|
||||||
|
set_ime_open_status_fn (context, msg.wParam != 0);
|
||||||
|
release_ime_context_fn (focus_window, context);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef MSG_DEBUG
|
#ifdef MSG_DEBUG
|
||||||
/* Broadcast messages make it here, so you need to be looking
|
/* Broadcast messages make it here, so you need to be looking
|
||||||
for something in particular for this to be useful. */
|
for something in particular for this to be useful. */
|
||||||
|
@ -10218,6 +10240,51 @@ DEFUN ("w32-notification-close",
|
||||||
|
|
||||||
#endif /* WINDOWSNT && !HAVE_DBUS */
|
#endif /* WINDOWSNT && !HAVE_DBUS */
|
||||||
|
|
||||||
|
DEFUN ("w32-get-ime-open-status",
|
||||||
|
Fw32_get_ime_open_status, Sw32_get_ime_open_status,
|
||||||
|
0, 0, 0,
|
||||||
|
doc: /* Return non-nil if IME is active, otherwise return nil.
|
||||||
|
|
||||||
|
IME, the MS-Windows Input Method Editor, can be active or inactive.
|
||||||
|
This function returns non-nil if the IME is active, otherwise nil. */)
|
||||||
|
(void)
|
||||||
|
{
|
||||||
|
struct frame *sf =
|
||||||
|
FRAMEP (selected_frame) && FRAME_LIVE_P (XFRAME (selected_frame))
|
||||||
|
? XFRAME (selected_frame)
|
||||||
|
: NULL;
|
||||||
|
|
||||||
|
if (sf)
|
||||||
|
{
|
||||||
|
HWND current_window = FRAME_W32_WINDOW (sf);
|
||||||
|
HIMC context = get_ime_context_fn (current_window);
|
||||||
|
if (context)
|
||||||
|
{
|
||||||
|
BOOL retval = get_ime_open_status_fn (context);
|
||||||
|
release_ime_context_fn (current_window, context);
|
||||||
|
|
||||||
|
return retval ? Qt : Qnil;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return Qnil;
|
||||||
|
}
|
||||||
|
|
||||||
|
DEFUN ("w32-set-ime-open-status",
|
||||||
|
Fw32_set_ime_open_status, Sw32_set_ime_open_status,
|
||||||
|
1, 1, 0,
|
||||||
|
doc: /* Open or close the IME according to STATUS.
|
||||||
|
|
||||||
|
This function activates the IME, the MS-Windows Input Method Editor,
|
||||||
|
if STATUS is non-nil, otherwise it deactivates the IME. */)
|
||||||
|
(Lisp_Object status)
|
||||||
|
{
|
||||||
|
unsigned ime_status = NILP (status) ? 0 : 1;
|
||||||
|
|
||||||
|
PostThreadMessage (dwWindowsThreadId, WM_EMACS_IME_STATUS, ime_status, 0);
|
||||||
|
return Qnil;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef WINDOWSNT
|
#ifdef WINDOWSNT
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
|
@ -10744,6 +10811,8 @@ tip frame. */);
|
||||||
defsubr (&Sw32_notification_notify);
|
defsubr (&Sw32_notification_notify);
|
||||||
defsubr (&Sw32_notification_close);
|
defsubr (&Sw32_notification_close);
|
||||||
#endif
|
#endif
|
||||||
|
defsubr (&Sw32_get_ime_open_status);
|
||||||
|
defsubr (&Sw32_set_ime_open_status);
|
||||||
|
|
||||||
#ifdef WINDOWSNT
|
#ifdef WINDOWSNT
|
||||||
defsubr (&Sw32_read_registry);
|
defsubr (&Sw32_read_registry);
|
||||||
|
@ -11032,6 +11101,11 @@ globals_of_w32fns (void)
|
||||||
get_proc_addr (imm32_lib, "ImmReleaseContext");
|
get_proc_addr (imm32_lib, "ImmReleaseContext");
|
||||||
set_ime_composition_window_fn = (ImmSetCompositionWindow_Proc)
|
set_ime_composition_window_fn = (ImmSetCompositionWindow_Proc)
|
||||||
get_proc_addr (imm32_lib, "ImmSetCompositionWindow");
|
get_proc_addr (imm32_lib, "ImmSetCompositionWindow");
|
||||||
|
|
||||||
|
get_ime_open_status_fn = (ImmGetOpenStatus_Proc)
|
||||||
|
get_proc_addr (imm32_lib, "ImmGetOpenStatus");
|
||||||
|
set_ime_open_status_fn = (ImmSetOpenStatus_Proc)
|
||||||
|
get_proc_addr (imm32_lib, "ImmSetOpenStatus");
|
||||||
}
|
}
|
||||||
|
|
||||||
HMODULE hm_kernel32 = GetModuleHandle ("kernel32.dll");
|
HMODULE hm_kernel32 = GetModuleHandle ("kernel32.dll");
|
||||||
|
|
|
@ -670,7 +670,8 @@ do { \
|
||||||
#define WM_EMACS_BRINGTOTOP (WM_EMACS_START + 23)
|
#define WM_EMACS_BRINGTOTOP (WM_EMACS_START + 23)
|
||||||
#define WM_EMACS_INPUT_READY (WM_EMACS_START + 24)
|
#define WM_EMACS_INPUT_READY (WM_EMACS_START + 24)
|
||||||
#define WM_EMACS_FILENOTIFY (WM_EMACS_START + 25)
|
#define WM_EMACS_FILENOTIFY (WM_EMACS_START + 25)
|
||||||
#define WM_EMACS_END (WM_EMACS_START + 26)
|
#define WM_EMACS_IME_STATUS (WM_EMACS_START + 26)
|
||||||
|
#define WM_EMACS_END (WM_EMACS_START + 27)
|
||||||
|
|
||||||
#define WND_FONTWIDTH_INDEX (0)
|
#define WND_FONTWIDTH_INDEX (0)
|
||||||
#define WND_LINEHEIGHT_INDEX (4)
|
#define WND_LINEHEIGHT_INDEX (4)
|
||||||
|
|
|
@ -7747,6 +7747,7 @@ Note: Text drawn with the `x' font backend is shown with hollow boxes. */)
|
||||||
|
|
||||||
#ifdef USE_GTK
|
#ifdef USE_GTK
|
||||||
#ifdef HAVE_GTK3
|
#ifdef HAVE_GTK3
|
||||||
|
#if GTK_CHECK_VERSION (3, 14, 0)
|
||||||
DEFUN ("x-gtk-debug", Fx_gtk_debug, Sx_gtk_debug, 1, 1, 0,
|
DEFUN ("x-gtk-debug", Fx_gtk_debug, Sx_gtk_debug, 1, 1, 0,
|
||||||
doc: /* Toggle interactive GTK debugging. */)
|
doc: /* Toggle interactive GTK debugging. */)
|
||||||
(Lisp_Object enable)
|
(Lisp_Object enable)
|
||||||
|
@ -7759,6 +7760,7 @@ DEFUN ("x-gtk-debug", Fx_gtk_debug, Sx_gtk_debug, 1, 1, 0,
|
||||||
|
|
||||||
return NILP (enable) ? Qnil : Qt;
|
return NILP (enable) ? Qnil : Qt;
|
||||||
}
|
}
|
||||||
|
#endif /* GTK_CHECK_VERSION (3, 14, 0) */
|
||||||
#endif /* HAVE_GTK3 */
|
#endif /* HAVE_GTK3 */
|
||||||
#endif /* USE_GTK */
|
#endif /* USE_GTK */
|
||||||
|
|
||||||
|
@ -8146,7 +8148,9 @@ eliminated in future versions of Emacs. */);
|
||||||
#endif
|
#endif
|
||||||
#ifdef USE_GTK
|
#ifdef USE_GTK
|
||||||
#ifdef HAVE_GTK3
|
#ifdef HAVE_GTK3
|
||||||
|
#if GTK_CHECK_VERSION (3, 14, 0)
|
||||||
defsubr (&Sx_gtk_debug);
|
defsubr (&Sx_gtk_debug);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue