Merge from origin/emacs-26
7668717d6f
Merge from Gnulib9e4d523427
* lisp/epg.el (epg-start-sign): Replace obsolete functions.26c58f31a8
Small fix for erc-logging-enabled34b41e3bc6
Quieten semantic normal usagee25f961e37
Avoid irrelevant hyperlink in doc string of 'epa-pinentry-...ec2636513c
* doc/misc/tramp.texi (Remote processes): Mention gdb rest...918a052a42
Query background for gnome terminal version 3.22 (Bug#29716)1dfc27576a
Make pixel-wise scrolling less laggyf92264fc2a
Fix child frame placement issues (bug#29953)a5f718c4c5
; * doc/lispref/text.texi (Change Hooks): Fix last change.e876f5f9fb
Describe the precise interaction of complex primitives wit...3a22097cf6
Fix valgrind report in call-interactivelyd5f1c87bfe
* src/editfns.c (Fsave_excursion): Doc fix. (Bug#30001)b8d74c4578
Fix mark-defun when there's no spaces between successive d...a377c652b5
Fix Dired display and operations on file names with raw bytesd9d6e8a04c
; Comments related to src/termcap.cf8a07fa6b1
Improve documentation of 'gdb-many-windows'f82400798e
Fix failures in smerge-mode on MS-Windows
This commit is contained in:
commit
ddb26f79b2
31 changed files with 244 additions and 92 deletions
4
build-aux/config.guess
vendored
4
build-aux/config.guess
vendored
|
@ -2,7 +2,7 @@
|
|||
# Attempt to guess a canonical system name.
|
||||
# Copyright 1992-2017 Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2017-12-17'
|
||||
timestamp='2018-01-01'
|
||||
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
|
@ -50,7 +50,7 @@ version="\
|
|||
GNU config.guess ($timestamp)
|
||||
|
||||
Originally written by Per Bothner.
|
||||
Copyright 1992-2017 Free Software Foundation, Inc.
|
||||
Copyright 1992-2018 Free Software Foundation, Inc.
|
||||
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||
|
|
4
build-aux/config.sub
vendored
4
build-aux/config.sub
vendored
|
@ -2,7 +2,7 @@
|
|||
# Configuration validation subroutine script.
|
||||
# Copyright 1992-2017 Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2017-11-23'
|
||||
timestamp='2018-01-01'
|
||||
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
|
@ -67,7 +67,7 @@ Report bugs and patches to <config-patches@gnu.org>."
|
|||
version="\
|
||||
GNU config.sub ($timestamp)
|
||||
|
||||
Copyright 1992-2017 Free Software Foundation, Inc.
|
||||
Copyright 1992-2018 Free Software Foundation, Inc.
|
||||
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||
|
|
|
@ -3,7 +3,7 @@ eval '(exit $?0)' && eval 'exec perl -wS -0777 -pi "$0" "$@"'
|
|||
if 0;
|
||||
# Update an FSF copyright year list to include the current year.
|
||||
|
||||
my $VERSION = '2017-09-13.06:45'; # UTC
|
||||
my $VERSION = '2018-01-04.14:48'; # UTC
|
||||
|
||||
# Copyright (C) 2009-2018 Free Software Foundation, Inc.
|
||||
#
|
||||
|
@ -81,6 +81,7 @@ my $VERSION = '2017-09-13.06:45'; # UTC
|
|||
# B. (c)
|
||||
# C. @copyright{}
|
||||
# D. ©
|
||||
# E. ©
|
||||
#
|
||||
# 4. The "Copyright" appears at the beginning of a line, except that it
|
||||
# may be prefixed by any sequence (e.g., a comment) of no more than
|
||||
|
@ -124,7 +125,7 @@ use strict;
|
|||
use warnings;
|
||||
|
||||
my $copyright_re = 'Copyright';
|
||||
my $circle_c_re = '(?:\([cC]\)|@copyright\{}|\\\\\(co|©)';
|
||||
my $circle_c_re = '(?:\([cC]\)|@copyright\{}|\\\\\(co|©|©)';
|
||||
my $holder = $ENV{UPDATE_COPYRIGHT_HOLDER};
|
||||
$holder ||= 'Free Software Foundation, Inc.';
|
||||
my $prefix_max = 5;
|
||||
|
@ -263,7 +264,9 @@ else
|
|||
print STDERR "$ARGV: warning: copyright statement not found\n";
|
||||
}
|
||||
|
||||
# Hey Emacs!
|
||||
# Local variables:
|
||||
# coding: utf-8
|
||||
# mode: perl
|
||||
# indent-tabs-mode: nil
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
|
|
|
@ -916,6 +916,14 @@ layout by typing @kbd{M-x gdb-restore-windows}. To toggle
|
|||
between the many windows layout and a simple layout with just the GUD
|
||||
interaction buffer and a source file, type @kbd{M-x gdb-many-windows}.
|
||||
|
||||
If you have an elaborate window setup, and don't want
|
||||
@code{gdb-many-windows} to disrupt that, it is better to invoke
|
||||
@kbd{M-x gdb} in a separate frame to begin with, then the arrangement
|
||||
of windows on your original frame will not be affected. A separate
|
||||
frame for GDB sessions can come in especially handy if you work on a
|
||||
text-mode terminal, where the screen estate for windows could be at a
|
||||
premium.
|
||||
|
||||
You may also specify additional GDB-related buffers to display,
|
||||
either in the same frame or a different one. Select the buffers you
|
||||
want by typing @code{M-x gdb-display-@var{buffertype}-buffer} or
|
||||
|
|
|
@ -5123,14 +5123,21 @@ these functions, and neither do certain internal buffer changes, such
|
|||
as changes in buffers created by Emacs internally for certain jobs,
|
||||
that should not be visible to Lisp programs.
|
||||
|
||||
Do @emph{not} expect the before-change hooks and the after-change
|
||||
hooks be called in balanced pairs around each buffer change. Also
|
||||
don't expect the before-change hooks to be called for every chunk of
|
||||
text Emacs is about to delete. These hooks are provided on the
|
||||
assumption that Lisp programs will use either before- or the
|
||||
after-change hooks, but not both, and the boundaries of the region
|
||||
where the changes happen might include more than just the actual
|
||||
changed text, or even lump together several changes done piecemeal.
|
||||
The vast majority of buffer changing primitives will call
|
||||
@code{before-change-functions} and @code{after-change-functions} in
|
||||
balanced pairs, once for each change, where the arguments to these
|
||||
hooks exactly delimit the change being made. Yet, hook functions
|
||||
should not rely on this always being the case, because some complex
|
||||
primitives call @code{before-change-functions} once before making
|
||||
changes, and then call @code{after-change-functions} zero or more
|
||||
times, depending on how many individual changes the primitive is
|
||||
making. When that happens, the arguments to
|
||||
@code{before-change-functions} will enclose a region in which the
|
||||
individual changes are made, but won't necessarily be the minimal such
|
||||
region, and the arguments to each successive call of
|
||||
@code{after-change-functions} will then delimit the part of text being
|
||||
changed exactly. In general, we advise to use either before- or the
|
||||
after-change hooks, but not both.
|
||||
|
||||
@defmac combine-after-change-calls body@dots{}
|
||||
The macro executes @var{body} normally, but arranges to call the
|
||||
|
|
|
@ -2855,6 +2855,10 @@ warning, which can be ignored:
|
|||
&"warning: GDB: Failed to set controlling terminal: Operation not permitted\n"
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
As consequence, there will be restrictions in I/O of the process to be
|
||||
debugged.
|
||||
|
||||
Relative file names are based on the remote default directory. When
|
||||
@file{myprog.pl} exists in @file{@trampfn{ssh,host,/home/user}}, valid
|
||||
calls include:
|
||||
|
|
|
@ -469,3 +469,10 @@ md5_process_block (const void *buffer, size_t len, struct md5_ctx *ctx)
|
|||
ctx->D = D;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Hey Emacs!
|
||||
* Local Variables:
|
||||
* coding: utf-8
|
||||
* End:
|
||||
*/
|
||||
|
|
|
@ -133,3 +133,10 @@ extern int __md5_stream (FILE *stream, void *resblock) __THROW;
|
|||
# endif
|
||||
|
||||
#endif /* md5.h */
|
||||
|
||||
/*
|
||||
* Hey Emacs!
|
||||
* Local Variables:
|
||||
* coding: utf-8
|
||||
* End:
|
||||
*/
|
||||
|
|
|
@ -434,3 +434,10 @@ sha1_process_block (const void *buffer, size_t len, struct sha1_ctx *ctx)
|
|||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Hey Emacs!
|
||||
* Local Variables:
|
||||
* coding: utf-8
|
||||
* End:
|
||||
*/
|
||||
|
|
|
@ -98,3 +98,10 @@ extern int sha1_stream (FILE *stream, void *resblock);
|
|||
# endif
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Hey Emacs!
|
||||
* Local Variables:
|
||||
* coding: utf-8
|
||||
* End:
|
||||
*/
|
||||
|
|
|
@ -577,3 +577,10 @@ sha256_process_block (const void *buffer, size_t len, struct sha256_ctx *ctx)
|
|||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Hey Emacs!
|
||||
* Local Variables:
|
||||
* coding: utf-8
|
||||
* End:
|
||||
*/
|
||||
|
|
|
@ -101,3 +101,10 @@ extern int sha224_stream (FILE *stream, void *resblock);
|
|||
# endif
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Hey Emacs!
|
||||
* Local Variables:
|
||||
* coding: utf-8
|
||||
* End:
|
||||
*/
|
||||
|
|
|
@ -629,3 +629,10 @@ sha512_process_block (const void *buffer, size_t len, struct sha512_ctx *ctx)
|
|||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Hey Emacs!
|
||||
* Local Variables:
|
||||
* coding: utf-8
|
||||
* End:
|
||||
*/
|
||||
|
|
|
@ -104,3 +104,10 @@ extern int sha384_stream (FILE *stream, void *resblock);
|
|||
# endif
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Hey Emacs!
|
||||
* Local Variables:
|
||||
* coding: utf-8
|
||||
* End:
|
||||
*/
|
||||
|
|
|
@ -137,7 +137,7 @@ _GL_FUNCDECL_RPL (pthread_sigmask, int,
|
|||
_GL_CXXALIAS_RPL (pthread_sigmask, int,
|
||||
(int how, const sigset_t *new_mask, sigset_t *old_mask));
|
||||
# else
|
||||
# if !@HAVE_PTHREAD_SIGMASK@
|
||||
# if !(@HAVE_PTHREAD_SIGMASK@ || defined pthread_sigmask)
|
||||
_GL_FUNCDECL_SYS (pthread_sigmask, int,
|
||||
(int how, const sigset_t *new_mask, sigset_t *old_mask));
|
||||
# endif
|
||||
|
|
|
@ -102,15 +102,13 @@ get_stat_mtime_ns (struct stat const *st)
|
|||
|
||||
/* Return the nanosecond component of *ST's birth time. */
|
||||
_GL_STAT_TIME_INLINE long int _GL_ATTRIBUTE_PURE
|
||||
get_stat_birthtime_ns (struct stat const *st)
|
||||
get_stat_birthtime_ns (struct stat const *st _GL_UNUSED)
|
||||
{
|
||||
# if defined HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC
|
||||
return STAT_TIMESPEC (st, st_birthtim).tv_nsec;
|
||||
# elif defined HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC
|
||||
return STAT_TIMESPEC_NS (st, st_birthtim);
|
||||
# else
|
||||
/* Avoid a "parameter unused" warning. */
|
||||
(void) st;
|
||||
return 0;
|
||||
# endif
|
||||
}
|
||||
|
@ -160,7 +158,7 @@ get_stat_mtime (struct stat const *st)
|
|||
/* Return *ST's birth time, if available; otherwise return a value
|
||||
with tv_sec and tv_nsec both equal to -1. */
|
||||
_GL_STAT_TIME_INLINE struct timespec _GL_ATTRIBUTE_PURE
|
||||
get_stat_birthtime (struct stat const *st)
|
||||
get_stat_birthtime (struct stat const *st _GL_UNUSED)
|
||||
{
|
||||
struct timespec t;
|
||||
|
||||
|
@ -184,8 +182,6 @@ get_stat_birthtime (struct stat const *st)
|
|||
/* Birth time is not supported. */
|
||||
t.tv_sec = -1;
|
||||
t.tv_nsec = -1;
|
||||
/* Avoid a "parameter unused" warning. */
|
||||
(void) st;
|
||||
#endif
|
||||
|
||||
#if (defined HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC \
|
||||
|
@ -212,7 +208,7 @@ get_stat_birthtime (struct stat const *st)
|
|||
errno to EOVERFLOW if normalization overflowed. This function
|
||||
is intended to be private to this .h file. */
|
||||
_GL_STAT_TIME_INLINE int
|
||||
stat_time_normalize (int result, struct stat *st)
|
||||
stat_time_normalize (int result, struct stat *st _GL_UNUSED)
|
||||
{
|
||||
#if defined __sun && defined STAT_TIMESPEC
|
||||
if (result == 0)
|
||||
|
|
|
@ -471,6 +471,7 @@ PROPERTY set."
|
|||
;;; Lexical Analyzer framework settings
|
||||
;;
|
||||
|
||||
;; FIXME change to non-obsolete default.
|
||||
(defvar semantic-lex-analyzer 'semantic-flex
|
||||
"The lexical analyzer used for a given buffer.
|
||||
See `semantic-lex' for documentation.
|
||||
|
@ -1856,7 +1857,7 @@ end of the return token will be larger than END. To truly restrict
|
|||
scanning, use `narrow-to-region'.
|
||||
The last argument, LENGTH specifies that `semantic-flex' should only
|
||||
return LENGTH tokens."
|
||||
(message "`semantic-flex' is an obsolete function. Use `define-lex' to create lexers.")
|
||||
(declare (obsolete define-lex "23.2"))
|
||||
(if (not semantic-flex-keywords-obarray)
|
||||
(setq semantic-flex-keywords-obarray [ nil ]))
|
||||
(let ((ts nil)
|
||||
|
|
|
@ -411,12 +411,13 @@ whitespace."
|
|||
;; See https://lists.gnu.org/r/help-gnu-emacs/2016-08/msg00141.html
|
||||
(save-excursion
|
||||
(forward-line 0)
|
||||
(< (line-end-position)
|
||||
(let ((ppss (syntax-ppss)))
|
||||
(when (nth 4 ppss)
|
||||
(goto-char (nth 8 ppss)))
|
||||
(forward-comment (point-max))
|
||||
(point)))))
|
||||
(let ((ppss (syntax-ppss)))
|
||||
(and (null (nth 3 ppss))
|
||||
(< (line-end-position)
|
||||
(progn (when (nth 4 ppss)
|
||||
(goto-char (nth 8 ppss)))
|
||||
(forward-comment (point-max))
|
||||
(point)))))))
|
||||
|
||||
(defun beginning-of-defun-comments (&optional arg)
|
||||
"Move to the beginning of ARGth defun, including comments."
|
||||
|
@ -434,10 +435,7 @@ whitespace."
|
|||
(progn (skip-syntax-backward
|
||||
"-" (line-beginning-position))
|
||||
(not (bolp))) ; Check for blank line.
|
||||
(progn (parse-partial-sexp
|
||||
(line-beginning-position) (line-end-position)
|
||||
nil t (syntax-ppss (line-beginning-position)))
|
||||
(eolp))))) ; Check for non-comment text.
|
||||
(beginning-of-defun--in-emptyish-line-p)))) ; Check for non-comment text.
|
||||
(forward-line (if first-line-p 0 1))))
|
||||
|
||||
(defvar end-of-defun-function
|
||||
|
|
|
@ -56,12 +56,15 @@ If neither t nor nil, ask user for confirmation."
|
|||
:type 'integer
|
||||
:group 'epa)
|
||||
|
||||
;; In the doc string below, we say "symbol `error'" to avoid producing
|
||||
;; a hyperlink for `error' the function.
|
||||
(defcustom epa-pinentry-mode nil
|
||||
"The pinentry mode.
|
||||
|
||||
GnuPG 2.1 or later has an option to control the behavior of
|
||||
Pinentry invocation. Possible modes are: `ask', `cancel',
|
||||
`error', and `loopback'. See the GnuPG manual for the meanings.
|
||||
Pinentry invocation. The value should be the symbol `error',
|
||||
`ask', `cancel', or `loopback'. See the GnuPG manual for the
|
||||
meanings.
|
||||
|
||||
In epa commands, a particularly useful mode is `loopback', which
|
||||
redirects all Pinentry queries to the caller, so Emacs can query
|
||||
|
|
|
@ -1676,8 +1676,8 @@ If you are unsure, use synchronous version of this function
|
|||
(setf (epg-context-operation context) 'sign)
|
||||
(setf (epg-context-result context) nil)
|
||||
(unless (memq mode '(t detached nil normal)) ;i.e. cleartext
|
||||
(epg-context-set-armor context nil)
|
||||
(epg-context-set-textmode context nil))
|
||||
(setf (epg-context-armor context) nil)
|
||||
(setf (epg-context-textmode context) nil))
|
||||
(epg--start context
|
||||
(append (list (if (memq mode '(t detached))
|
||||
"--detach-sign"
|
||||
|
|
|
@ -321,12 +321,13 @@ If BUFFER is nil, the value of `current-buffer' is used.
|
|||
Logging is enabled if `erc-log-channels-directory' is non-nil, the directory
|
||||
is writable (it will be created as necessary) and
|
||||
`erc-enable-logging' returns a non-nil value."
|
||||
(or buffer (setq buffer (current-buffer)))
|
||||
(and erc-log-channels-directory
|
||||
(or (functionp erc-log-channels-directory)
|
||||
(erc-directory-writable-p erc-log-channels-directory))
|
||||
(if (functionp erc-enable-logging)
|
||||
(funcall erc-enable-logging (or buffer (current-buffer)))
|
||||
erc-enable-logging)))
|
||||
(funcall erc-enable-logging buffer)
|
||||
(buffer-local-value 'erc-enable-logging buffer))))
|
||||
|
||||
(defun erc-log-standardize-name (filename)
|
||||
"Make FILENAME safe to use as the name of an ERC log.
|
||||
|
|
|
@ -82,6 +82,27 @@ case you need scrolling resolution of a pixel, set to 1. After a
|
|||
pixel scroll, typing \\[next-line] or \\[previous-line] scrolls the window to make it
|
||||
fully visible, and undoes the effect of the pixel-level scroll.")
|
||||
|
||||
(defvar pixel-dead-time 0.1
|
||||
"Minimal interval in seconds before next smooth scrolling.
|
||||
If another scrolling request arrives within this period, scrolling
|
||||
will be carried out without pixel resolution. If zero, scrolling
|
||||
is always with pixel resolution.")
|
||||
|
||||
(defvar pixel-last-scroll-time 0
|
||||
"Time when the last scrolling was made, in second since the epoch.")
|
||||
|
||||
(defun pixel-scroll-in-rush-p ()
|
||||
"Return non-nil if next scroll should be non-smooth.
|
||||
When scrolling request is delivered soon after the previous one,
|
||||
user is in hurry. When the time since last scroll is larger than
|
||||
`pixel-dead-time', we are ready for another smooth scroll, and this
|
||||
function returns nil."
|
||||
(let* ((current-time (float-time))
|
||||
(scroll-in-rush-p (< (- current-time pixel-last-scroll-time)
|
||||
pixel-dead-time)))
|
||||
(setq pixel-last-scroll-time current-time)
|
||||
scroll-in-rush-p))
|
||||
|
||||
;;;###autoload
|
||||
(define-minor-mode pixel-scroll-mode
|
||||
"A minor mode to scroll text pixel-by-pixel.
|
||||
|
@ -104,35 +125,39 @@ if ARG is omitted or nil."
|
|||
This is an alternative of `scroll-up'. Scope moves downward."
|
||||
(interactive)
|
||||
(or arg (setq arg 1))
|
||||
(dotimes (ii arg) ; move scope downward
|
||||
(let ((amt (if pixel-resolution-fine-flag
|
||||
(if (integerp pixel-resolution-fine-flag)
|
||||
pixel-resolution-fine-flag
|
||||
(frame-char-height))
|
||||
(pixel-line-height))))
|
||||
(if (pixel-eob-at-top-p) ; when end-of-the-buffer is close
|
||||
(scroll-up 1) ; relay on robust method
|
||||
(while (pixel-point-at-top-p amt) ; prevent too late (multi tries)
|
||||
(vertical-motion 1)) ; move point downward
|
||||
(pixel-scroll-pixel-up amt))))) ; move scope downward
|
||||
(if (pixel-scroll-in-rush-p)
|
||||
(scroll-up arg)
|
||||
(dotimes (ii arg) ; move scope downward
|
||||
(let ((amt (if pixel-resolution-fine-flag
|
||||
(if (integerp pixel-resolution-fine-flag)
|
||||
pixel-resolution-fine-flag
|
||||
(frame-char-height))
|
||||
(pixel-line-height))))
|
||||
(if (pixel-eob-at-top-p) ; when end-of-the-buffer is close
|
||||
(scroll-up 1) ; relay on robust method
|
||||
(while (pixel-point-at-top-p amt) ; prevent too late (multi tries)
|
||||
(vertical-motion 1)) ; move point downward
|
||||
(pixel-scroll-pixel-up amt)))))) ; move scope downward
|
||||
|
||||
(defun pixel-scroll-down (&optional arg)
|
||||
"Scroll text of selected window down ARG lines.
|
||||
This is and alternative of `scroll-down'. Scope moves upward."
|
||||
(interactive)
|
||||
(or arg (setq arg 1))
|
||||
(dotimes (ii arg)
|
||||
(let ((amt (if pixel-resolution-fine-flag
|
||||
(if (integerp pixel-resolution-fine-flag)
|
||||
pixel-resolution-fine-flag
|
||||
(frame-char-height))
|
||||
(pixel-line-height -1))))
|
||||
(while (pixel-point-at-bottom-p amt) ; prevent too late (multi tries)
|
||||
(vertical-motion -1)) ; move point upward
|
||||
(if (or (pixel-bob-at-top-p amt) ; when beginning-of-the-buffer is seen
|
||||
(pixel-eob-at-top-p)) ; for file with a long line
|
||||
(scroll-down 1) ; relay on robust method
|
||||
(pixel-scroll-pixel-down amt)))))
|
||||
(if (pixel-scroll-in-rush-p)
|
||||
(scroll-down arg)
|
||||
(dotimes (ii arg)
|
||||
(let ((amt (if pixel-resolution-fine-flag
|
||||
(if (integerp pixel-resolution-fine-flag)
|
||||
pixel-resolution-fine-flag
|
||||
(frame-char-height))
|
||||
(pixel-line-height -1))))
|
||||
(while (pixel-point-at-bottom-p amt) ; prevent too late (multi tries)
|
||||
(vertical-motion -1)) ; move point upward
|
||||
(if (or (pixel-bob-at-top-p amt) ; when beginning-of-the-buffer is seen
|
||||
(pixel-eob-at-top-p)) ; for file with a long line
|
||||
(scroll-down 1) ; relay on robust method
|
||||
(pixel-scroll-pixel-down amt))))))
|
||||
|
||||
(defun pixel-bob-at-top-p (amt)
|
||||
"Return non-nil if window-start is at beginning of the current buffer.
|
||||
|
|
|
@ -675,8 +675,13 @@ Return the pasted text as a string."
|
|||
(when (and (> version 2000) (equal (match-string 1 str) "1"))
|
||||
;; Hack attack! bug#16988: gnome-terminal reports "1;NNNN;0"
|
||||
;; with a large NNNN but is based on a rather old xterm code.
|
||||
;; Gnome terminal 3.6.1 reports 1;3406;0
|
||||
;; Gnome terminal 2.32.1 reports 1;2802;0
|
||||
;; Gnome terminal 3.6.1 reports 1;3406;0
|
||||
;; Gnome terminal 3.22.2 reports 1;4601;0 and *does* support
|
||||
;; background color querying (Bug#29716).
|
||||
(when (> version 4000)
|
||||
(xterm--query "\e]11;?\e\\"
|
||||
'(("\e]11;" . xterm--report-background-handler))))
|
||||
(setq version 200))
|
||||
(when (equal (match-string 1 str) "83")
|
||||
;; `screen' (which returns 83;40003;0) seems to also lack support for
|
||||
|
|
|
@ -1019,7 +1019,7 @@ chars to try and eliminate some spurious differences."
|
|||
(setq s short)))
|
||||
(dotimes (_i (1- len)) (insert s)))))))
|
||||
(unless (bolp) (error "Smerge refine internal error"))
|
||||
(let ((coding-system-for-write 'emacs-internal))
|
||||
(let ((coding-system-for-write 'utf-8-emacs-unix))
|
||||
(write-region (point-min) (point-max) file nil 'nomessage))))
|
||||
|
||||
(defun smerge--refine-highlight-change (beg match-num1 match-num2 props)
|
||||
|
@ -1084,7 +1084,9 @@ used to replace chars to try and eliminate some spurious differences."
|
|||
;; Call diff on those files.
|
||||
(unwind-protect
|
||||
(with-temp-buffer
|
||||
(let ((coding-system-for-read 'emacs-internal))
|
||||
;; Allow decoding the EOL format, as on MS-Windows the Diff
|
||||
;; utility might produce CR-LF EOLs.
|
||||
(let ((coding-system-for-read 'utf-8-emacs))
|
||||
(call-process diff-command nil t nil
|
||||
(if (and smerge-refine-ignore-whitespace
|
||||
(not smerge-refine-weight-hack))
|
||||
|
|
|
@ -170,7 +170,7 @@ NOTIFY_LIBS = @NOTIFY_LIBS@
|
|||
|
||||
## -ltermcap, or -lncurses, or -lcurses, or "".
|
||||
LIBS_TERMCAP=@LIBS_TERMCAP@
|
||||
## terminfo.o if TERMINFO, else tparam.o.
|
||||
## terminfo.o if TERMINFO, else (on MS-DOS only: termcap.o +) tparam.o.
|
||||
TERMCAP_OBJ=@TERMCAP_OBJ@
|
||||
|
||||
LIBXMU=@LIBXMU@
|
||||
|
|
|
@ -778,10 +778,23 @@ invoke it. If KEYS is omitted or nil, the return value of
|
|||
if anyone tries to define one here. */
|
||||
case '+':
|
||||
default:
|
||||
error ("Invalid control letter `%c' (#o%03o, #x%04x) in interactive calling string",
|
||||
STRING_CHAR ((unsigned char *) tem),
|
||||
(unsigned) STRING_CHAR ((unsigned char *) tem),
|
||||
(unsigned) STRING_CHAR ((unsigned char *) tem));
|
||||
{
|
||||
/* How many bytes are left unprocessed in the specs string?
|
||||
(Note that this excludes the trailing null byte.) */
|
||||
ptrdiff_t bytes_left = SBYTES (specs) - (tem - string);
|
||||
unsigned letter;
|
||||
|
||||
/* If we have enough bytes left to treat the sequence as a
|
||||
character, show that character's codepoint; otherwise
|
||||
show only its first byte. */
|
||||
if (bytes_left >= BYTES_BY_CHAR_HEAD (*((unsigned char *) tem)))
|
||||
letter = STRING_CHAR ((unsigned char *) tem);
|
||||
else
|
||||
letter = *((unsigned char *) tem);
|
||||
|
||||
error ("Invalid control letter `%c' (#o%03o, #x%04x) in interactive calling string",
|
||||
(int) letter, letter, letter);
|
||||
}
|
||||
}
|
||||
|
||||
if (varies[i] == 0)
|
||||
|
|
19
src/coding.c
19
src/coding.c
|
@ -7437,10 +7437,23 @@ decode_coding (struct coding_system *coding)
|
|||
|
||||
while (nbytes-- > 0)
|
||||
{
|
||||
int c = *src++;
|
||||
int c;
|
||||
|
||||
if (c & 0x80)
|
||||
c = BYTE8_TO_CHAR (c);
|
||||
/* Copy raw bytes in their 2-byte forms from multibyte
|
||||
text as single characters. */
|
||||
if (coding->src_multibyte
|
||||
&& CHAR_BYTE8_HEAD_P (*src) && nbytes > 0)
|
||||
{
|
||||
c = STRING_CHAR_ADVANCE (src);
|
||||
nbytes--;
|
||||
}
|
||||
else
|
||||
{
|
||||
c = *src++;
|
||||
|
||||
if (c & 0x80)
|
||||
c = BYTE8_TO_CHAR (c);
|
||||
}
|
||||
coding->charbuf[coding->charbuf_used++] = c;
|
||||
}
|
||||
produce_chars (coding, Qnil, 1);
|
||||
|
|
|
@ -1037,7 +1037,7 @@ If you only want to save the current buffer but not point,
|
|||
then just use `save-current-buffer', or even `with-current-buffer'.
|
||||
|
||||
Before Emacs 25.1, `save-excursion' used to save the mark state.
|
||||
To save the marker state as well as the point and buffer, use
|
||||
To save the mark state as well as point and the current buffer, use
|
||||
`save-mark-and-excursion'.
|
||||
|
||||
usage: (save-excursion &rest BODY) */)
|
||||
|
|
|
@ -1077,11 +1077,11 @@ struct x_output
|
|||
window or, if there is no parent window, the screen. */
|
||||
#define NS_PARENT_WINDOW_LEFT_POS(f) \
|
||||
(FRAME_PARENT_FRAME (f) != NULL \
|
||||
? [[FRAME_NS_VIEW (f) window] parentWindow].frame.origin.x : 0)
|
||||
? [FRAME_NS_VIEW (FRAME_PARENT_FRAME (f)) window].frame.origin.x : 0)
|
||||
#define NS_PARENT_WINDOW_TOP_POS(f) \
|
||||
(FRAME_PARENT_FRAME (f) != NULL \
|
||||
? ([[FRAME_NS_VIEW (f) window] parentWindow].frame.origin.y \
|
||||
+ [[FRAME_NS_VIEW (f) window] parentWindow].frame.size.height \
|
||||
? ([FRAME_NS_VIEW (FRAME_PARENT_FRAME (f)) window].frame.origin.y \
|
||||
+ [FRAME_NS_VIEW (FRAME_PARENT_FRAME (f)) window].frame.size.height \
|
||||
- FRAME_NS_TITLEBAR_HEIGHT (FRAME_PARENT_FRAME (f))) \
|
||||
: [[[NSScreen screens] objectAtIndex: 0] frame].size.height)
|
||||
|
||||
|
|
44
src/nsterm.m
44
src/nsterm.m
|
@ -1736,7 +1736,6 @@ -(void)remove
|
|||
{
|
||||
NSView *view = FRAME_NS_VIEW (f);
|
||||
NSArray *screens = [NSScreen screens];
|
||||
NSScreen *fscreen = [screens objectAtIndex: 0];
|
||||
NSScreen *screen = [[view window] screen];
|
||||
|
||||
NSTRACE ("x_set_offset");
|
||||
|
@ -1746,26 +1745,41 @@ -(void)remove
|
|||
f->left_pos = xoff;
|
||||
f->top_pos = yoff;
|
||||
|
||||
if (view != nil && screen && fscreen)
|
||||
if (view != nil)
|
||||
{
|
||||
f->left_pos = f->size_hint_flags & XNegative
|
||||
? [screen visibleFrame].size.width + f->left_pos - FRAME_PIXEL_WIDTH (f)
|
||||
: f->left_pos;
|
||||
/* We use visibleFrame here to take menu bar into account.
|
||||
Ideally we should also adjust left/top with visibleFrame.origin. */
|
||||
if (FRAME_PARENT_FRAME (f) == NULL && screen)
|
||||
{
|
||||
f->left_pos = f->size_hint_flags & XNegative
|
||||
? [screen visibleFrame].size.width + f->left_pos - FRAME_PIXEL_WIDTH (f)
|
||||
: f->left_pos;
|
||||
/* We use visibleFrame here to take menu bar into account.
|
||||
Ideally we should also adjust left/top with visibleFrame.origin. */
|
||||
|
||||
f->top_pos = f->size_hint_flags & YNegative
|
||||
? ([screen visibleFrame].size.height + f->top_pos
|
||||
- FRAME_PIXEL_HEIGHT (f) - FRAME_NS_TITLEBAR_HEIGHT (f)
|
||||
- FRAME_TOOLBAR_HEIGHT (f))
|
||||
: f->top_pos;
|
||||
f->top_pos = f->size_hint_flags & YNegative
|
||||
? ([screen visibleFrame].size.height + f->top_pos
|
||||
- FRAME_PIXEL_HEIGHT (f) - FRAME_NS_TITLEBAR_HEIGHT (f)
|
||||
- FRAME_TOOLBAR_HEIGHT (f))
|
||||
: f->top_pos;
|
||||
#ifdef NS_IMPL_GNUSTEP
|
||||
if (FRAME_PARENT_FRAME (f) == NULL)
|
||||
{
|
||||
if (f->left_pos < 100)
|
||||
f->left_pos = 100; /* don't overlap menu */
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else if (FRAME_PARENT_FRAME (f) != NULL)
|
||||
{
|
||||
struct frame *parent = FRAME_PARENT_FRAME (f);
|
||||
|
||||
/* On X negative values for child frames always result in
|
||||
positioning relative to the bottom right corner of the
|
||||
parent frame. */
|
||||
if (f->left_pos < 0)
|
||||
f->left_pos = FRAME_PIXEL_WIDTH (parent) - FRAME_PIXEL_WIDTH (f) + f->left_pos;
|
||||
|
||||
if (f->top_pos < 0)
|
||||
f->top_pos = FRAME_PIXEL_HEIGHT (parent) + FRAME_TOOLBAR_HEIGHT (parent)
|
||||
- FRAME_PIXEL_HEIGHT (f) + f->top_pos;
|
||||
}
|
||||
|
||||
/* Constrain the setFrameTopLeftPoint so we don't move behind the
|
||||
menu bar. */
|
||||
NSPoint pt = NSMakePoint (SCREENMAXBOUND (f->left_pos
|
||||
|
|
|
@ -15,6 +15,9 @@ GNU General Public License for more details.
|
|||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Since 2010-03, 073589f4, Emacs 24.1, this file is only used
|
||||
by the MS-DOS port of Emacs. */
|
||||
|
||||
/* Emacs config.h may rename various library functions such as malloc. */
|
||||
#include <config.h>
|
||||
#include <sys/file.h>
|
||||
|
|
Loading…
Add table
Reference in a new issue