Merge from origin/emacs-27
bcd92b5708
(origin/emacs-27) Improve documentation of Hexl modec233f4eccd
; * etc/NEWS: Fix decoded-time-set-defaults typo.4c3abb3dd1
Fix compilation errors with latest w32 API headers127f1f330b
Improve doc strings in log-edit.ele36183ff46
; * etc/TODO (etc/DOC): Update the todo entries. # Conflicts: # etc/NEWS
This commit is contained in:
commit
3061409de2
15 changed files with 124 additions and 90 deletions
|
@ -2576,6 +2576,17 @@ Other Hexl commands let you insert strings (sequences) of binary
|
|||
bytes, move by @code{short}s or @code{int}s, etc.; type @kbd{C-h a
|
||||
hexl-@key{RET}} for details.
|
||||
|
||||
Hexl mode can also be used for editing text files. This could come
|
||||
in handy if the text file includes unusual characters or uses unusual
|
||||
encoding (@pxref{Coding Systems}). For this purpose, Hexl commands
|
||||
that insert bytes can also insert @acronym{ASCII} and
|
||||
non-@acronym{ASCII} characters, including multibyte characters. To
|
||||
edit a text file with Hexl, visit the file as usual, and then type
|
||||
@w{@kbd{M-x hexl-mode @key{RET}}} to switch to Hexl mode. You can now
|
||||
insert text characters by typing them. However, inserting multibyte
|
||||
characters requires special care, to avoid the danger of creating
|
||||
invalid multibyte sequences: you should start typing such characters
|
||||
when point is on the first byte of a multibyte sequence in the file.
|
||||
|
||||
@node Saving Emacs Sessions
|
||||
@section Saving Emacs Sessions
|
||||
|
|
|
@ -2701,7 +2701,7 @@ days there are in a month in a specific year), 'date-ordinal-to-time'
|
|||
(that computes the date of an ordinal day), 'decoded-time-add' (for
|
||||
doing computations on a decoded time structure), 'make-decoded-time'
|
||||
(for making a decoded time structure with only the given keywords
|
||||
filled out), and 'encoded-time-set-defaults' (which fills in nil
|
||||
filled out), and 'decoded-time-set-defaults' (which fills in nil
|
||||
elements as if it's midnight January 1st, 1970) have been added.
|
||||
|
||||
*** In the DST slot, 'encode-time' and 'parse-time-string' now return -1
|
||||
|
|
11
etc/TODO
11
etc/TODO
|
@ -1763,8 +1763,17 @@ apparently loses under Solaris, at least. [fx has mostly done this.]
|
|||
(Obsolete, since gmalloc.c is nowadays only used on MS-DOS.)
|
||||
|
||||
** Rewrite make-docfile to be clean and maintainable
|
||||
It might be better to replace it with Lisp, using the byte compiler.
|
||||
It might be better to replace with Lisp the part of make-docfile that
|
||||
produces the etc/DOC file by scanning *.el files, for example by
|
||||
reusing the code in the byte compiler or in autoload.el that already
|
||||
scans *.el files.
|
||||
https://lists.gnu.org/r/emacs-devel/2012-06/msg00037.html
|
||||
https://lists.gnu.org/r/emacs-devel/2021-05/msg00235.html
|
||||
|
||||
** Eliminate the etc/DOC file altogether
|
||||
As an alternative to the previous item, we could try and eliminate the
|
||||
DOC file altogether. See
|
||||
https://lists.gnu.org/r/emacs-devel/2021-05/msg00237.html
|
||||
|
||||
** Add an inferior-comint-minor-mode
|
||||
The purpose is to have a mode to capture the common set of operations
|
||||
|
|
|
@ -203,13 +203,15 @@ when this variable is set to nil.")
|
|||
;;; Originally taken from VC-Log mode
|
||||
|
||||
(defconst log-edit-maximum-comment-ring-size 32
|
||||
"Maximum number of saved comments in the comment ring.")
|
||||
"Maximum number of saved commit comments in `log-edit-comment-ring'.")
|
||||
(defvar log-edit-comment-ring (make-ring log-edit-maximum-comment-ring-size))
|
||||
(defvar log-edit-comment-ring-index nil)
|
||||
(defvar log-edit-last-comment-match "")
|
||||
|
||||
(defun log-edit-new-comment-index (stride len)
|
||||
"Return the comment index STRIDE elements from the current one.
|
||||
"Return the comment whose index is STRIDE elements away from the current one.
|
||||
This accesses `log-edit-comment-ring', which stores commit log comments,
|
||||
i.e. descriptions of changes done by commits.
|
||||
LEN is the length of `log-edit-comment-ring'."
|
||||
(mod (cond
|
||||
(log-edit-comment-ring-index (+ log-edit-comment-ring-index stride))
|
||||
|
@ -221,7 +223,7 @@ LEN is the length of `log-edit-comment-ring'."
|
|||
len))
|
||||
|
||||
(defun log-edit-previous-comment (arg)
|
||||
"Cycle backwards through comment history.
|
||||
"Cycle backwards through VC commit comment history.
|
||||
With a numeric prefix ARG, go back ARG comments."
|
||||
(interactive "*p")
|
||||
(let ((len (ring-length log-edit-comment-ring)))
|
||||
|
@ -234,15 +236,15 @@ With a numeric prefix ARG, go back ARG comments."
|
|||
(insert (ring-ref log-edit-comment-ring log-edit-comment-ring-index)))))
|
||||
|
||||
(defun log-edit-next-comment (arg)
|
||||
"Cycle forwards through comment history.
|
||||
"Cycle forwards through VC commit comment history.
|
||||
With a numeric prefix ARG, go forward ARG comments."
|
||||
(interactive "*p")
|
||||
(log-edit-previous-comment (- arg)))
|
||||
|
||||
(defun log-edit-comment-search-backward (str &optional stride)
|
||||
"Search backwards through comment history for substring match of STR.
|
||||
"Search backwards through VC commit comment history for a match of STR.
|
||||
If the optional argument STRIDE is present, that is a step-width to use
|
||||
when going through the comment ring."
|
||||
when going through the comment ring, `log-edit-comment-ring'."
|
||||
;; Why substring rather than regexp ? -sm
|
||||
(interactive
|
||||
(list (read-string (format-prompt "Comment substring"
|
||||
|
@ -262,7 +264,7 @@ when going through the comment ring."
|
|||
(log-edit-previous-comment 0)))
|
||||
|
||||
(defun log-edit-comment-search-forward (str)
|
||||
"Search forwards through comment history for a substring match of STR."
|
||||
"Search forwards through VC commit comment history for a match of STR."
|
||||
(interactive
|
||||
(list (read-string (format-prompt "Comment substring"
|
||||
log-edit-last-comment-match)
|
||||
|
@ -270,10 +272,15 @@ when going through the comment ring."
|
|||
(log-edit-comment-search-backward str -1))
|
||||
|
||||
(defun log-edit-comment-to-change-log (&optional whoami file-name)
|
||||
"Enter last VC comment into the change log for the current file.
|
||||
WHOAMI (interactive prefix) non-nil means prompt for user name
|
||||
and site. FILE-NAME is the name of the change log; if nil, use
|
||||
`change-log-default-name'.
|
||||
"Insert the last VC commit comment into the change log for the current file.
|
||||
This reuses the text of the last VC commit comment in `log-edit-comment-ring'
|
||||
for the change-log entry of the current file, which is handy when several
|
||||
related changes have the same commit comment.
|
||||
WHOAMI (interactively, prefix argument) non-nil means prompt for user name
|
||||
and email address of the person to whom to attribute the change.
|
||||
FILE-NAME is the name of the change log; if nil, use `change-log-default-name'
|
||||
Interactively, with prefix argument, prompt for both the name and address of
|
||||
the person who did the change and for FILE-NAME.
|
||||
|
||||
This may be useful as a `vc-checkin-hook' to update change logs
|
||||
automatically."
|
||||
|
@ -332,7 +339,7 @@ automatically."
|
|||
|
||||
(defconst log-edit-header-contents-regexp
|
||||
"[ \t]*\\(.*\\(\n[ \t].*\\)*\\)\n?"
|
||||
"Regular expression matching a header field.
|
||||
"Regular expression matching the header field in `log-edit-mode'.
|
||||
The first subexpression is the actual text of the field.")
|
||||
|
||||
(defun log-edit-match-to-eoh (_limit)
|
||||
|
@ -393,7 +400,9 @@ The first subexpression is the actual text of the field.")
|
|||
(log-edit--match-first-line (0 'log-edit-summary))))
|
||||
|
||||
(defvar log-edit-font-lock-gnu-style nil
|
||||
"If non-nil, highlight common failures to follow the GNU coding standards.")
|
||||
"If non-nil, highlight common failures to follow VC commit log conventions.
|
||||
The conventions checked are those described in the GNU coding standards
|
||||
document.")
|
||||
(put 'log-edit-font-lock-gnu-style 'safe-local-variable 'booleanp)
|
||||
|
||||
(defconst log-edit-font-lock-gnu-keywords
|
||||
|
@ -436,28 +445,28 @@ The first subexpression is the actual text of the field.")
|
|||
|
||||
;;;###autoload
|
||||
(defun log-edit (callback &optional setup params buffer mode &rest _ignore)
|
||||
"Setup a buffer to enter a log message.
|
||||
The buffer is put in mode MODE or `log-edit-mode' if MODE is nil.
|
||||
"Setup a buffer to enter a VC commit log message.
|
||||
The buffer is put in mode MODE, or `log-edit-mode' if MODE is nil.
|
||||
\\<log-edit-mode-map>
|
||||
If SETUP is non-nil, erase the buffer and run `log-edit-hook'.
|
||||
Set mark and point around the entire contents of the buffer, so
|
||||
that it is easy to kill the contents of the buffer with
|
||||
\\[kill-region]. Once the user is done editing the message,
|
||||
invoking the command \\[log-edit-done] (`log-edit-done') will
|
||||
call CALLBACK to do the actual commit.
|
||||
\\[kill-region]. Once the user is done editing the message, he
|
||||
or she is expected to invoke the command \\[log-edit-done] (`log-edit-done'),
|
||||
which will call CALLBACK, a function to do the actual commit.
|
||||
|
||||
PARAMS if non-nil is an alist of variables and buffer-local
|
||||
values to give them in the Log Edit buffer. Possible keys and
|
||||
associated values:
|
||||
PARAMS, if non-nil, is an alist of variables and buffer-local
|
||||
values to give to those variables in the Log Edit buffer. Possible
|
||||
keys and associated values are:
|
||||
`log-edit-listfun' -- function taking no arguments that returns the list of
|
||||
files that are concerned by the current operation (using relative names);
|
||||
files that are concerned by the current operation (using relative names);
|
||||
`log-edit-diff-function' -- function taking no arguments that
|
||||
displays a diff of the files concerned by the current operation.
|
||||
displays a diff of the files concerned by the current operation.
|
||||
`vc-log-fileset' -- the VC fileset to be committed (if any).
|
||||
|
||||
If BUFFER is non-nil `log-edit' will jump to that buffer, use it
|
||||
If BUFFER is non-nil, `log-edit' will switch to that buffer, use it
|
||||
to edit the log message and go back to the current buffer when
|
||||
done. Otherwise, it uses the current buffer."
|
||||
done. Otherwise, this function will use the current buffer."
|
||||
(let ((parent (current-buffer)))
|
||||
(if buffer (pop-to-buffer buffer))
|
||||
(when (and log-edit-setup-invert (not (eq setup 'force)))
|
||||
|
@ -483,12 +492,12 @@ done. Otherwise, it uses the current buffer."
|
|||
"Press \\[log-edit-done] when you are done editing."))))
|
||||
|
||||
(define-derived-mode log-edit-mode text-mode "Log-Edit"
|
||||
"Major mode for editing version-control log messages.
|
||||
When done editing the log entry, just type \\[log-edit-done] which
|
||||
will trigger the actual commit of the file(s).
|
||||
Several other handy support commands are provided of course and
|
||||
the package from which this is used might also provide additional
|
||||
commands (under C-x v for VC, for example).
|
||||
"Major mode for editing version-control (VC) commit log messages.
|
||||
When done editing the log entry, type \\[log-edit-done], which will
|
||||
trigger the actual commit of the file(s).
|
||||
Several other handy support commands are provided, and the package
|
||||
from which this is used might also provide additional commands (under
|
||||
the \"C-x v\" prefix for VC commands, for example).
|
||||
|
||||
\\{log-edit-mode-map}"
|
||||
(setq-local font-lock-defaults '(log-edit-font-lock-keywords t))
|
||||
|
@ -520,7 +529,7 @@ commands (under C-x v for VC, for example).
|
|||
(insert "):")))
|
||||
|
||||
(defun log-edit-fill-entry (&optional justify)
|
||||
"Like \\[fill-paragraph], but handle ChangeLog entries.
|
||||
"Like \\[fill-paragraph], but for filling ChangeLog-formatted entries.
|
||||
Consecutive function entries without prose (i.e., lines of the
|
||||
form \"(FUNCTION):\") will be combined into \"(FUNC1, FUNC2):\"
|
||||
according to `fill-column'."
|
||||
|
@ -570,7 +579,7 @@ according to `fill-column'."
|
|||
(ring-insert log-edit-comment-ring comment)))
|
||||
|
||||
(defun log-edit-done ()
|
||||
"Finish editing the log message and commit the files.
|
||||
"Finish editing the VC commit log message, and commit the files.
|
||||
If you want to abort the commit, simply delete the buffer."
|
||||
(interactive)
|
||||
;; Clean up empty headers.
|
||||
|
@ -617,9 +626,9 @@ If you want to abort the commit, simply delete the buffer."
|
|||
(call-interactively log-edit-callback))))
|
||||
|
||||
(defun log-edit-kill-buffer ()
|
||||
"Kill the current buffer.
|
||||
Also saves its contents in the comment history and hides
|
||||
`log-edit-files-buf'."
|
||||
"Kill the current VC commit log buffer.
|
||||
This command saves the contents of the log buffer in the VC commit
|
||||
comment history, see `log-edit-comment-ring', and hides `log-edit-files-buf'."
|
||||
(interactive)
|
||||
(log-edit-hide-buf)
|
||||
(let ((buf (current-buffer)))
|
||||
|
@ -699,7 +708,7 @@ different header separator appropriate for `log-edit-mode'."
|
|||
(eobp))))
|
||||
|
||||
(defun log-edit-insert-message-template ()
|
||||
"Insert the default template with Summary and Author."
|
||||
"Insert the default VC commit log template with Summary and Author."
|
||||
(interactive)
|
||||
(when (or (called-interactively-p 'interactive)
|
||||
(log-edit-empty-buffer-p))
|
||||
|
@ -710,7 +719,7 @@ different header separator appropriate for `log-edit-mode'."
|
|||
(message-position-point)))
|
||||
|
||||
(defun log-edit-insert-cvs-template ()
|
||||
"Insert the template specified by the CVS administrator, if any.
|
||||
"Insert the commit log template specified by the CVS administrator, if any.
|
||||
This simply uses the local CVS/Template file."
|
||||
(interactive)
|
||||
(when (or (called-interactively-p 'interactive)
|
||||
|
@ -722,7 +731,7 @@ This simply uses the local CVS/Template file."
|
|||
(insert-file-contents "CVS/Template"))))
|
||||
|
||||
(defun log-edit-insert-cvs-rcstemplate ()
|
||||
"Insert the rcstemplate from the CVS repository.
|
||||
"Insert the RCS commit log template from the CVS repository.
|
||||
This contacts the repository to get the rcstemplate file and
|
||||
can thus take some time."
|
||||
(interactive)
|
||||
|
@ -756,7 +765,7 @@ can thus take some time."
|
|||
(insert (mapconcat 'identity files ", ") ": "))))
|
||||
|
||||
(defun log-edit-add-to-changelog ()
|
||||
"Insert this log message into the appropriate ChangeLog file."
|
||||
"Insert this VC commit log message into the appropriate ChangeLog file."
|
||||
(interactive)
|
||||
(log-edit-remember-comment)
|
||||
(dolist (f (log-edit-files))
|
||||
|
@ -770,7 +779,7 @@ can thus take some time."
|
|||
"Non-nil means rewrite (tiny change).")
|
||||
|
||||
(defvar log-edit-rewrite-fixes nil
|
||||
"Rule to rewrite bug numbers into Fixes: headers.
|
||||
"Rule to rewrite bug numbers into Fixes: headers in commit log messages.
|
||||
The value should be of the form (REGEXP . REPLACEMENT)
|
||||
where REGEXP should match the expression referring to a bug number
|
||||
in the text, and REPLACEMENT is an expression to pass to `replace-match'
|
||||
|
@ -788,10 +797,11 @@ to build the Fixes: header.")
|
|||
(declare-function diff-add-log-current-defuns "diff-mode" ())
|
||||
|
||||
(defun log-edit-generate-changelog-from-diff ()
|
||||
"Insert a log message by looking at the current diff.
|
||||
"Insert a VC commit log message by looking at the current diff.
|
||||
This command is intended to be uses on the \"*vc-log*\" buffer.
|
||||
This command will generate a ChangeLog entries listing the
|
||||
functions. You can then add a description where needed, and use
|
||||
\\[fill-paragraph] to join consecutive function names."
|
||||
changed functions. You can then add a description where needed,
|
||||
and use \\[fill-paragraph] to join consecutive function names."
|
||||
(interactive)
|
||||
(change-log-insert-entries
|
||||
(with-current-buffer
|
||||
|
@ -809,21 +819,21 @@ functions. You can then add a description where needed, and use
|
|||
(diff-add-log-current-defuns))))
|
||||
|
||||
(defun log-edit-insert-changelog (&optional use-first)
|
||||
"Insert a log message by looking at the ChangeLog.
|
||||
"Insert a VC commit log message by looking at the ChangeLog.
|
||||
The idea is to write your ChangeLog entries first, and then use this
|
||||
command to commit your changes.
|
||||
command to commit your changes with that log.
|
||||
|
||||
To select default log text, we:
|
||||
- find the ChangeLog entries for the files to be checked in,
|
||||
- verify that the top entry in the ChangeLog is on the current date
|
||||
and by the current user; if not, we don't provide any default text,
|
||||
- search the ChangeLog entry for paragraphs containing the names of
|
||||
the files we're checking in, and finally
|
||||
- use those paragraphs as the log text.
|
||||
To select default log text, this command:
|
||||
- finds the ChangeLog entries for the files to be checked in;
|
||||
- verifies that the top entry in the ChangeLog is on the current date
|
||||
and by the current user; if not, it doesn't provide any default text;
|
||||
- searches the ChangeLog entry for paragraphs containing the names of
|
||||
the files to be checked in; and finally
|
||||
- uses those paragraphs as the log text.
|
||||
|
||||
If the optional prefix arg USE-FIRST is given (via \\[universal-argument]),
|
||||
or if the command is repeated a second time in a row, use the first log entry
|
||||
regardless of user name or time."
|
||||
or if the command is repeated, use the first log entry regardless of user
|
||||
name or time."
|
||||
(interactive "P")
|
||||
(save-excursion
|
||||
(let ((eoh (save-excursion (rfc822-goto-eoh) (point))))
|
||||
|
@ -873,7 +883,7 @@ regardless of user name or time."
|
|||
;;;;
|
||||
|
||||
(defun log-edit-narrow-changelog ()
|
||||
"Narrow to the top page of the current buffer, a ChangeLog file.
|
||||
"Narrow to the top page of the current buffer, which visits a ChangeLog file.
|
||||
Actually, the narrowed region doesn't include the date line.
|
||||
A \"page\" in a ChangeLog file is the area between two dates."
|
||||
(or (eq major-mode 'change-log-mode)
|
||||
|
@ -921,7 +931,7 @@ If we are between sub-paragraphs, return the previous subparagraph."
|
|||
|
||||
(defun log-edit-changelog-entry ()
|
||||
"Return the bounds of the ChangeLog entry containing point.
|
||||
The variable `log-edit-changelog-full-paragraphs' decides whether an
|
||||
The variable `log-edit-changelog-full-paragraphs' determines whether an
|
||||
\"entry\" is a paragraph or a subparagraph; see its documentation string
|
||||
for more details."
|
||||
(save-excursion
|
||||
|
@ -1047,8 +1057,12 @@ where LOGBUFFER is the name of the ChangeLog buffer, and each
|
|||
"\\($\\|[^[:alnum:]]\\)")))))
|
||||
|
||||
(defun log-edit-changelog-insert-entries (buffer beg end &rest files)
|
||||
"Insert the text from BUFFER between BEG and END.
|
||||
Rename relative filenames in the ChangeLog entry as FILES."
|
||||
"Insert the text from ChangeLog BUFFER between BEG and END.
|
||||
Rename relative filenames in the ChangeLog entry with FILES.
|
||||
FILES are supposed to name the same files whose relative filenames
|
||||
are to be replaced, and their names relative to the directory of
|
||||
BUFFER are expected to match the relative file names in the ChangeLog
|
||||
entry."
|
||||
(let ((opoint (point))
|
||||
(log-name (buffer-file-name buffer))
|
||||
(case-fold-search nil)
|
||||
|
@ -1130,7 +1144,7 @@ Return t if toggled on (or TOGGLE is nil), otherwise nil."
|
|||
val))
|
||||
|
||||
(defun log-edit-extract-headers (headers comment)
|
||||
"Extract headers from COMMENT to form command line arguments.
|
||||
"Extract headers from VC commit COMMENT to form command line arguments.
|
||||
HEADERS should be an alist with elements (HEADER . CMDARG)
|
||||
or (HEADER . FUNCTION) associating headers to command line
|
||||
options and the result is then a list of the form (MSG ARGUMENTS...)
|
||||
|
|
|
@ -135,7 +135,7 @@ dynlib_addr (void (*funcptr) (void), const char **fname, const char **symname)
|
|||
void *addr = (void *) funcptr;
|
||||
|
||||
/* Step 1: Find the handle of the module where ADDR lives. */
|
||||
if (os_subtype == OS_9X
|
||||
if (os_subtype == OS_SUBTYPE_9X
|
||||
/* Windows NT family version before XP (v5.1). */
|
||||
|| ((w32_major_version + (w32_minor_version > 0)) < 6))
|
||||
{
|
||||
|
|
|
@ -4747,7 +4747,7 @@ sys_rename_replace (const char *oldname, const char *newname, BOOL force)
|
|||
/* volume_info is set indirectly by map_w32_filename. */
|
||||
oldname_dev = volume_info.serialnum;
|
||||
|
||||
if (os_subtype == OS_9X)
|
||||
if (os_subtype == OS_SUBTYPE_9X)
|
||||
{
|
||||
char * o;
|
||||
char * p;
|
||||
|
@ -10468,7 +10468,7 @@ shutdown_handler (DWORD type)
|
|||
HANDLE
|
||||
maybe_load_unicows_dll (void)
|
||||
{
|
||||
if (os_subtype == OS_9X)
|
||||
if (os_subtype == OS_SUBTYPE_9X)
|
||||
{
|
||||
HANDLE ret = LoadLibrary ("Unicows.dll");
|
||||
if (ret)
|
||||
|
|
|
@ -41,8 +41,8 @@ extern int w32_minor_version;
|
|||
extern int w32_build_number;
|
||||
|
||||
enum {
|
||||
OS_9X = 1,
|
||||
OS_NT
|
||||
OS_SUBTYPE_9X = 1,
|
||||
OS_SUBTYPE_NT
|
||||
};
|
||||
|
||||
extern int os_subtype;
|
||||
|
|
|
@ -803,7 +803,7 @@ initialize_w32_display (struct terminal *term, int *width, int *height)
|
|||
ceol_initialized = FALSE;
|
||||
}
|
||||
|
||||
if (os_subtype == OS_NT)
|
||||
if (os_subtype == OS_SUBTYPE_NT)
|
||||
w32_console_unicode_input = 1;
|
||||
else
|
||||
w32_console_unicode_input = 0;
|
||||
|
|
18
src/w32fns.c
18
src/w32fns.c
|
@ -7993,7 +7993,7 @@ DEFUN ("system-move-file-to-trash", Fsystem_move_file_to_trash,
|
|||
|
||||
/* The Unicode version of SHFileOperation is not supported on
|
||||
Windows 9X. */
|
||||
if (w32_unicode_filenames && os_subtype != OS_9X)
|
||||
if (w32_unicode_filenames && os_subtype != OS_SUBTYPE_9X)
|
||||
{
|
||||
SHFILEOPSTRUCTW file_op_w;
|
||||
/* We need one more element beyond MAX_PATH because this is
|
||||
|
@ -9122,7 +9122,7 @@ The coordinates X and Y are interpreted in pixels relative to a position
|
|||
/* When "mouse trails" are in effect, moving the mouse cursor
|
||||
sometimes leaves behind an annoying "ghost" of the pointer.
|
||||
Avoid that by momentarily switching off mouse trails. */
|
||||
if (os_subtype == OS_NT
|
||||
if (os_subtype == OS_SUBTYPE_NT
|
||||
&& w32_major_version + w32_minor_version >= 6)
|
||||
ret = SystemParametersInfo (SPI_GETMOUSETRAILS, 0, &trail_num, 0);
|
||||
SetCursorPos (xval, yval);
|
||||
|
@ -9297,7 +9297,7 @@ DEFUN ("default-printer-name", Fdefault_printer_name, Sdefault_printer_name,
|
|||
if (!OpenPrinter (pname_buf, &hPrn, NULL))
|
||||
return Qnil;
|
||||
/* GetPrinterW is not supported by unicows.dll. */
|
||||
if (w32_unicode_filenames && os_subtype != OS_9X)
|
||||
if (w32_unicode_filenames && os_subtype != OS_SUBTYPE_9X)
|
||||
GetPrinterW (hPrn, 2, NULL, 0, &dwNeeded);
|
||||
else
|
||||
GetPrinterA (hPrn, 2, NULL, 0, &dwNeeded);
|
||||
|
@ -9307,7 +9307,7 @@ DEFUN ("default-printer-name", Fdefault_printer_name, Sdefault_printer_name,
|
|||
return Qnil;
|
||||
}
|
||||
/* Call GetPrinter again with big enough memory block. */
|
||||
if (w32_unicode_filenames && os_subtype != OS_9X)
|
||||
if (w32_unicode_filenames && os_subtype != OS_SUBTYPE_9X)
|
||||
{
|
||||
/* Allocate memory for the PRINTER_INFO_2 struct. */
|
||||
ppi2w = xmalloc (dwNeeded);
|
||||
|
@ -9443,9 +9443,9 @@ cache_system_info (void)
|
|||
w32_minor_version = version.info.minor;
|
||||
|
||||
if (version.info.platform & 0x8000)
|
||||
os_subtype = OS_9X;
|
||||
os_subtype = OS_SUBTYPE_9X;
|
||||
else
|
||||
os_subtype = OS_NT;
|
||||
os_subtype = OS_SUBTYPE_NT;
|
||||
|
||||
/* Cache page size, allocation unit, processor type, etc. */
|
||||
GetSystemInfo (&sysinfo_cache);
|
||||
|
@ -9456,7 +9456,7 @@ cache_system_info (void)
|
|||
GetVersionEx (&osinfo_cache);
|
||||
|
||||
w32_build_number = osinfo_cache.dwBuildNumber;
|
||||
if (os_subtype == OS_9X)
|
||||
if (os_subtype == OS_SUBTYPE_9X)
|
||||
w32_build_number &= 0xffff;
|
||||
|
||||
w32_num_mouse_buttons = GetSystemMetrics (SM_CMOUSEBUTTONS);
|
||||
|
@ -9635,7 +9635,7 @@ w32_kbd_patch_key (KEY_EVENT_RECORD *event, int cpId)
|
|||
|
||||
/* On NT, call ToUnicode instead and then convert to the current
|
||||
console input codepage. */
|
||||
if (os_subtype == OS_NT)
|
||||
if (os_subtype == OS_SUBTYPE_NT)
|
||||
{
|
||||
WCHAR buf[128];
|
||||
|
||||
|
@ -11049,7 +11049,7 @@ see `w32-ansi-code-page'. */);
|
|||
w32_multibyte_code_page = _getmbcp ();
|
||||
#endif
|
||||
|
||||
if (os_subtype == OS_NT)
|
||||
if (os_subtype == OS_SUBTYPE_NT)
|
||||
w32_unicode_gui = 1;
|
||||
else
|
||||
w32_unicode_gui = 0;
|
||||
|
|
|
@ -269,7 +269,7 @@ init_heap (bool use_dynamic_heap)
|
|||
}
|
||||
#endif
|
||||
|
||||
if (os_subtype == OS_9X)
|
||||
if (os_subtype == OS_SUBTYPE_9X)
|
||||
{
|
||||
the_malloc_fn = malloc_after_dump_9x;
|
||||
the_realloc_fn = realloc_after_dump_9x;
|
||||
|
@ -312,7 +312,7 @@ init_heap (bool use_dynamic_heap)
|
|||
}
|
||||
heap = s_pfn_Rtl_Create_Heap (0, data_region_base, 0, 0, NULL, ¶ms);
|
||||
|
||||
if (os_subtype == OS_9X)
|
||||
if (os_subtype == OS_SUBTYPE_9X)
|
||||
{
|
||||
fprintf (stderr, "Cannot dump Emacs on Windows 9X; exiting.\n");
|
||||
exit (-1);
|
||||
|
|
|
@ -566,7 +566,7 @@ generate notifications correctly, though. */)
|
|||
CHECK_LIST (filter);
|
||||
|
||||
/* The underlying features are available only since XP. */
|
||||
if (os_subtype == OS_9X
|
||||
if (os_subtype == OS_SUBTYPE_9X
|
||||
|| (w32_major_version == 5 && w32_minor_version < 1))
|
||||
{
|
||||
errno = ENOSYS;
|
||||
|
|
|
@ -623,7 +623,7 @@ init_timers (void)
|
|||
need to probe for its availability dynamically, and call it
|
||||
through a pointer. */
|
||||
s_pfn_Get_Thread_Times = NULL; /* in case dumped Emacs comes with a value */
|
||||
if (os_subtype != OS_9X)
|
||||
if (os_subtype != OS_SUBTYPE_9X)
|
||||
s_pfn_Get_Thread_Times = (GetThreadTimes_Proc)
|
||||
get_proc_addr (GetModuleHandle ("kernel32.dll"), "GetThreadTimes");
|
||||
|
||||
|
@ -2654,7 +2654,7 @@ find_child_console (HWND hwnd, LPARAM arg)
|
|||
|
||||
GetClassName (hwnd, window_class, sizeof (window_class));
|
||||
if (strcmp (window_class,
|
||||
(os_subtype == OS_9X)
|
||||
(os_subtype == OS_SUBTYPE_9X)
|
||||
? "tty"
|
||||
: "ConsoleWindowClass") == 0)
|
||||
{
|
||||
|
@ -2878,7 +2878,7 @@ sys_kill (pid_t pid, int sig)
|
|||
if (NILP (Vw32_start_process_share_console) && cp && cp->hwnd)
|
||||
{
|
||||
#if 1
|
||||
if (os_subtype == OS_9X)
|
||||
if (os_subtype == OS_SUBTYPE_9X)
|
||||
{
|
||||
/*
|
||||
Another possibility is to try terminating the VDM out-right by
|
||||
|
@ -3793,7 +3793,7 @@ w32_compare_strings (const char *s1, const char *s2, char *locname,
|
|||
|
||||
if (!g_b_init_compare_string_w)
|
||||
{
|
||||
if (os_subtype == OS_9X)
|
||||
if (os_subtype == OS_SUBTYPE_9X)
|
||||
{
|
||||
pCompareStringW = (CompareStringW_Proc)
|
||||
get_proc_addr (LoadLibrary ("Unicows.dll"),
|
||||
|
|
|
@ -1207,7 +1207,7 @@ globals_of_w32select (void)
|
|||
QANSICP = coding_from_cp (ANSICP);
|
||||
QOEMCP = coding_from_cp (OEMCP);
|
||||
|
||||
if (os_subtype == OS_NT)
|
||||
if (os_subtype == OS_SUBTYPE_NT)
|
||||
Vselection_coding_system = Qutf_16le_dos;
|
||||
else if (inhibit_window_system)
|
||||
Vselection_coding_system = QOEMCP;
|
||||
|
|
|
@ -1916,7 +1916,7 @@ w32_draw_image_foreground (struct glyph_string *s)
|
|||
/* HALFTONE produces better results, especially when
|
||||
scaling to a larger size, but Windows 9X doesn't
|
||||
support HALFTONE. */
|
||||
if (os_subtype == OS_NT
|
||||
if (os_subtype == OS_SUBTYPE_NT
|
||||
&& (pmode = SetStretchBltMode (s->hdc, HALFTONE)) != 0)
|
||||
SetBrushOrgEx (s->hdc, 0, 0, NULL);
|
||||
StretchBlt (s->hdc, x, y, s->slice.width, s->slice.height,
|
||||
|
@ -1952,7 +1952,7 @@ w32_draw_image_foreground (struct glyph_string *s)
|
|||
{
|
||||
int pmode = 0;
|
||||
/* Windows 9X doesn't support HALFTONE. */
|
||||
if (os_subtype == OS_NT
|
||||
if (os_subtype == OS_SUBTYPE_NT
|
||||
&& (pmode = SetStretchBltMode (s->hdc, HALFTONE)) != 0)
|
||||
SetBrushOrgEx (s->hdc, 0, 0, NULL);
|
||||
StretchBlt (s->hdc, x, y, s->slice.width, s->slice.height,
|
||||
|
@ -6644,7 +6644,7 @@ frame_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y)
|
|||
/* When "mouse trails" are in effect, moving the mouse cursor
|
||||
sometimes leaves behind an annoying "ghost" of the pointer.
|
||||
Avoid that by momentarily switching off mouse trails. */
|
||||
if (os_subtype == OS_NT
|
||||
if (os_subtype == OS_SUBTYPE_NT
|
||||
&& w32_major_version + w32_minor_version >= 6)
|
||||
ret = SystemParametersInfo (SPI_GETMOUSETRAILS, 0, &trail_num, 0);
|
||||
SetCursorPos (pt.x, pt.y);
|
||||
|
@ -7638,7 +7638,7 @@ specified by `file-name-coding-system'.
|
|||
This variable is set to non-nil by default when Emacs runs on Windows
|
||||
systems of the NT family, including W2K, XP, Vista, Windows 7 and
|
||||
Windows 8. It is set to nil on Windows 9X. */);
|
||||
if (os_subtype == OS_9X)
|
||||
if (os_subtype == OS_SUBTYPE_9X)
|
||||
w32_unicode_filenames = 0;
|
||||
else
|
||||
w32_unicode_filenames = 1;
|
||||
|
|
|
@ -761,7 +761,7 @@ extern bool w32_image_rotations_p (void);
|
|||
extern void setup_w32_kbdhook (void);
|
||||
extern void remove_w32_kbdhook (void);
|
||||
extern int check_w32_winkey_state (int);
|
||||
#define w32_kbdhook_active (os_subtype != OS_9X)
|
||||
#define w32_kbdhook_active (os_subtype != OS_SUBTYPE_9X)
|
||||
#else
|
||||
#define w32_kbdhook_active 0
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue