1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-07 14:50:21 +00:00

Merge from origin/emacs-24

a5f90a3 * .gitattributes: New file.
5a9710f Make sure tool-bar changes are reflected on display.
93796ba * autogen.sh: Port better to non-GNU 'cp'.
9758516 Fix a typo in a comment in the previous commit.
aa472a3 Fix the pixel coordinates returned by pos-visible-in-window-p.  (Bug#19473)
d261229 * automated/tramp-tests.el (tramp--test-smb-or-windows-nt-p): New defun. (tramp-test30-special-characters): Use it. (tramp--test-check-files): Filter nil file names out.
9278f05 Omit trailing white space
1c93fd3 Sync with Tramp 2.2.11.
96ebe18 Sync with Tramp 2.2.11.
e792450 Sync with Tramp 2.2.11.
2d17e12 Fix ChangeLog entry.
6444482 Fix auto-revert-tail-mode for remote files
b5c9c13 Spelling fixes
c5504d1 src/w32proc.c (Fw32_get_codepage_charset): Doc fix.  (Bug#19458)

Conflicts:
	ChangeLog
	doc/misc/ChangeLog
	lisp/ChangeLog
	src/ChangeLog
	test/ChangeLog
This commit is contained in:
Paul Eggert 2015-01-01 10:47:17 -08:00
commit 6ddd819467
21 changed files with 180 additions and 45 deletions

40
.gitattributes vendored Normal file
View File

@ -0,0 +1,40 @@
# Attributes of Emacs files in the Git repository.
# Copyright 2015 Free Software Foundation, Inc.
# This file is part of GNU Emacs.
# GNU Emacs is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# GNU Emacs is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
# A few files use CRLF endings, even on non-Microsoft platforms.
# Do not warn about trailing whitespace with these files.
*.bat -whitespace
admin/charsets/mapfiles/PTCP154 -whitespace
leim/MISC-DIC/cangjie-table.b5 -whitespace
leim/MISC-DIC/cangjie-table.cns -whitespace
leim/MISC-DIC/pinyin.map -whitespace
lib-src/update-game-score.exe.manifest -whitespace
nt/nmake.defs -whitespace
# Some files should not be treated as text when diffing or merging.
*.gpg binary
*.gz binary
*.icns binary
*.ico binary
*.pbm binary
*.pdf binary
*.png binary
*.sig binary
*.tiff binary
test/automated/data/decompress/foo-gzipped binary

View File

@ -1,3 +1,12 @@
2015-01-01 Paul Eggert <eggert@cs.ucla.edu>
* .gitattributes: New file.
2015-01-01 Paul Eggert <eggert@cs.ucla.edu>
* autogen.sh: Port better to non-GNU 'cp'.
Problem reported by Han Boetes.
2014-12-31 Paul Eggert <eggert@cs.ucla.edu>
Less 'make' chatter at top level

View File

@ -237,7 +237,7 @@ if test -d .git/hooks; then
*--backup*--verbose*)
cp_options='--backup=numbered --verbose';;
*)
cp_options='';;
cp_options='-f';;
esac
if test -n "$tailored_hooks"; then

View File

@ -192,4 +192,3 @@
You should have received a copy of the GNU General Public License
along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.

View File

@ -1,3 +1,8 @@
2015-01-01 Michael Albinus <michael.albinus@gmx.de>
Sync with Tramp 2.2.11.
* trampver.texi: Update release number.
2014-12-31 Paul Eggert <eggert@cs.ucla.edu>
Less 'make' chatter for Emacs doc

View File

@ -8,7 +8,7 @@
@c In the Tramp GIT, the version number is auto-frobbed from
@c configure.ac, so you should edit that file and run
@c "autoconf && ./configure" to change the version number.
@set trampver 2.2.11-pre
@set trampver 2.2.11
@c Other flags from configuration
@set instprefix /usr/local

View File

@ -1,3 +1,26 @@
2015-01-01 Eli Zaretskii <eliz@gnu.org>
* tool-bar.el (tool-bar-local-item)
(tool-bar-local-item-from-menu): Call force-mode-line-update to
make sure the tool-bar changes show on display.
2015-01-01 Michael Albinus <michael.albinus@gmx.de>
Sync with Tramp 2.2.11.
* net/tramp-compat.el (top): Require cl-macs for Emacs 22.
Make an alias for `default-toplevel-value' if it doesn't exist.
* net/tramp-smb.el (tramp-smb-handle-copy-directory):
Use `tramp-compat-delete-directory'.
* net/trampver.el: Update release number.
2015-01-01 Filipp Gunbin <fgunbin@fastmail.fm>
* autorevert.el (auto-revert-handler): Fix auto-revert-tail-mode
for remote files. (Bug#19449)
2015-01-01 Simen Heggestøyl <simenheg@gmail.com> (tiny change)
* textmodes/css-mode.el (scss-mode): Fix typo (bug#19446).

View File

@ -589,8 +589,8 @@ This is an internal function used by Auto-Revert Mode."
;; the values.
(remote-file-name-inhibit-cache t)
(revert
(or (and buffer-file-name
(or auto-revert-remote-files
(if buffer-file-name
(and (or auto-revert-remote-files
(not (file-remote-p buffer-file-name)))
(or (not auto-revert-use-notify)
auto-revert-notify-modified-p)
@ -603,11 +603,11 @@ This is an internal function used by Auto-Revert Mode."
(funcall (or buffer-stale-function
#'buffer-stale--default-function)
t)))
(and (or auto-revert-mode
global-auto-revert-non-file-buffers)
(funcall (or buffer-stale-function
#'buffer-stale--default-function)
t))))
(and (or auto-revert-mode
global-auto-revert-non-file-buffers)
(funcall (or buffer-stale-function
#'buffer-stale--default-function)
t))))
eob eoblist)
(setq auto-revert-notify-modified-p nil)
(when revert
@ -690,8 +690,7 @@ the timer when no buffers need to be checked."
(let ((bufs (if global-auto-revert-mode
(buffer-list)
auto-revert-buffer-list))
(remaining ())
(new ()))
remaining new)
;; Partition `bufs' into two halves depending on whether or not
;; the buffers are in `auto-revert-remaining-buffers'. The two
;; halves are then re-joined with the "remaining" buffers at the

View File

@ -35,6 +35,11 @@
(eval-and-compile
;; GNU Emacs 22.
(unless (fboundp 'ignore-errors)
(load "cl" 'noerror)
(load "cl-macs" 'noerror))
;; Some packages must be required for XEmacs, because we compile
;; with -no-autoloads.
(when (featurep 'xemacs)
@ -586,6 +591,10 @@ and replace a sub-expression, e.g.
(setq matches (cons (substring string start l) matches)) ; leftover
(apply #'concat (nreverse matches))))))
;; `default-toplevel-value' has been declared in Emacs 24.
(unless (fboundp 'default-toplevel-value)
(defalias 'default-toplevel-value 'symbol-value))
(add-hook 'tramp-unload-hook
(lambda ()
(unload-feature 'tramp-loaddefs 'force)

View File

@ -513,7 +513,7 @@ pass to the OPERATION."
;; Reset the transfer process properties.
(tramp-set-connection-property v "process-name" nil)
(tramp-set-connection-property v "process-buffer" nil)
(when t1 (delete-directory tmpdir 'recurse))))
(when t1 (tramp-compat-delete-directory tmpdir 'recurse))))
;; Handle KEEP-DATE argument.
(when keep-date

View File

@ -31,7 +31,7 @@
;; should be changed only there.
;;;###tramp-autoload
(defconst tramp-version "2.2.11-pre"
(defconst tramp-version "2.2.11-24.5"
"This version of Tramp.")
;;;###tramp-autoload
@ -44,7 +44,7 @@
(= emacs-major-version 21)
(>= emacs-minor-version 4)))
"ok"
(format "Tramp 2.2.11-pre is not fit for %s"
(format "Tramp 2.2.11-24.5 is not fit for %s"
(when (string-match "^.*$" (emacs-version))
(match-string 0 (emacs-version)))))))
(unless (string-match "\\`ok\\'" x) (error "%s" x)))

View File

@ -2767,7 +2767,7 @@ the python shell:
(concat
(format "# -*- coding: %s -*-\n" encoding)
(make-string
;; Substract 2 because of the coding cookie.
;; Subtract 2 because of the coding cookie.
(- (line-number-at-pos start) 2) ?\n))))
(toplevel-block-p (save-excursion
(goto-char start)
@ -4406,7 +4406,7 @@ operator."
(defun python-info-encoding-from-cookie ()
"Detect current buffer's encoding from its coding cookie.
Returns the enconding as a symbol."
Returns the encoding as a symbol."
(let ((first-two-lines
(save-excursion
(save-restriction
@ -4423,9 +4423,9 @@ Returns the enconding as a symbol."
"Return encoding for file.
Try `python-info-encoding-from-cookie', if none is found then
default to utf-8."
;; If no enconding is defined, then it's safe to use UTF-8: Python 2
;; If no encoding is defined, then it's safe to use UTF-8: Python 2
;; uses ASCII as default while Python 3 uses UTF-8. This means that
;; in the worst case escenario python.el will make things work for
;; in the worst case scenario python.el will make things work for
;; Python 2 files with unicode data and no encoding defined.
(or (python-info-encoding-from-cookie)
'utf-8))

View File

@ -174,7 +174,8 @@ is less or equal to 256, then ICON.xpm, then ICON.pbm, and finally
ICON.xbm, using `find-image'."
(let* ((image-exp (tool-bar--image-expression icon)))
(define-key-after map (vector key)
`(menu-item ,(symbol-name key) ,def :image ,image-exp ,@props))))
`(menu-item ,(symbol-name key) ,def :image ,image-exp ,@props))
(force-mode-line-update)))
;;;###autoload
(defun tool-bar-add-item-from-menu (command icon &optional map &rest props)
@ -239,7 +240,8 @@ holds a keymap."
(if (and (consp rest) (consp (car rest)))
(setq rest (cdr rest)))
(append `(menu-item ,(car defn) ,rest)
(list :image image-exp) props)))))))
(list :image image-exp) props))))
(force-mode-line-update))))
;;; Set up some global items. Additions/deletions up for grabs.

View File

@ -815,7 +815,7 @@
2012-10-01 Eli Zaretskii <eliz@gnu.org>
* preprep.c (RVA_TO_PTR): Use 'unsigned char *' instead of
'void *', for pointer arithmetics.
'void *', for pointer arithmetic.
(OFFSET_TO_RVA, RVA_TO_OFFSET, RVA_TO_SECTION_OFFSET): Enclose all
macro arguments in parentheses.

View File

@ -1,3 +1,12 @@
2015-01-01 Eli Zaretskii <eliz@gnu.org>
* xdisp.c (pos_visible_p): Fix up the X coordinate for
right-to-left screen lines. (Bug#19473)
2015-01-01 Eli Zaretskii <eliz@gnu.org>
* w32proc.c (Fw32_get_codepage_charset): Doc fix. (Bug#19458)
2014-12-31 Paul Eggert <eggert@cs.ucla.edu>
Simplify setfattr use by assuming GNU make

View File

@ -2826,7 +2826,7 @@
2006-07-21 Eli Zaretskii <eliz@gnu.org>
* w32.c (convert_time): Use explicit long double constants to
ensure long double arithmetics is used throughout.
ensure long double arithmetic is used throughout.
2006-07-20 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>

View File

@ -2327,7 +2327,7 @@
2012-12-08 Fabrice Popineau <fabrice.popineau@gmail.com>
* w32fns.c (emacs_abort): Don't do arithmetics on void pointers.
* w32fns.c (emacs_abort): Don't do arithmetic on void pointers.
2012-12-08 Eli Zaretskii <eliz@gnu.org>
@ -4716,7 +4716,7 @@
defining an XRectangle structure.
* w32proc.c (RVA_TO_PTR, w32_executable_type): Fix pointer
arithmetics for compatibility with x64.
arithmetic for compatibility with x64.
* w32menu.c (add_menu_item): Use UINT_PTR instead of UINT, for
compatibility with x64.

View File

@ -3070,7 +3070,12 @@ If successful, the new CP is returned, otherwise nil. */)
DEFUN ("w32-get-codepage-charset", Fw32_get_codepage_charset,
Sw32_get_codepage_charset, 1, 1, 0,
doc: /* Return charset ID corresponding to codepage CP.
Returns nil if the codepage is not valid. */)
Returns nil if the codepage is not valid or its charset ID could
not be determined.
Note that this function is only guaranteed to work with ANSI
codepages; most console codepages are not supported and will
yield nil. */)
(Lisp_Object cp)
{
CHARSETINFO info;

View File

@ -1406,6 +1406,7 @@ pos_visible_p (struct window *w, ptrdiff_t charpos, int *x, int *y,
struct text_pos top;
int visible_p = 0;
struct buffer *old_buffer = NULL;
bool r2l = false;
if (FRAME_INITIAL_P (XFRAME (WINDOW_FRAME (w))))
return visible_p;
@ -1691,6 +1692,8 @@ pos_visible_p (struct window *w, ptrdiff_t charpos, int *x, int *y,
*rowh = max (0, (min (bottom_y, it.last_visible_y)
- max (top_y, window_top_y)));
*vpos = it.vpos;
if (it.bidi_it.paragraph_dir == R2L)
r2l = true;
}
}
else
@ -1720,6 +1723,8 @@ pos_visible_p (struct window *w, ptrdiff_t charpos, int *x, int *y,
- max (it2.current_y,
WINDOW_HEADER_LINE_HEIGHT (w))));
*vpos = it2.vpos;
if (it2.bidi_it.paragraph_dir == R2L)
r2l = true;
}
else
bidi_unshelve_cache (it2data, 1);
@ -1729,10 +1734,20 @@ pos_visible_p (struct window *w, ptrdiff_t charpos, int *x, int *y,
if (old_buffer)
set_buffer_internal_1 (old_buffer);
if (visible_p && w->hscroll > 0)
*x -=
window_hscroll_limited (w, WINDOW_XFRAME (w))
* WINDOW_FRAME_COLUMN_WIDTH (w);
if (visible_p)
{
if (w->hscroll > 0)
*x -=
window_hscroll_limited (w, WINDOW_XFRAME (w))
* WINDOW_FRAME_COLUMN_WIDTH (w);
/* For lines in an R2L paragraph, we need to mirror the X pixel
coordinate wrt the text area. For the reasons, see the
commentary in buffer_posn_from_coords and the explanation of
the geometry used by the move_it_* functions at the end of
the large commentary near the beginning of this file. */
if (r2l)
*x = window_box_width (w, TEXT_AREA) - *x - 1;
}
#if 0
/* Debugging code. */

View File

@ -1,3 +1,17 @@
2015-01-01 Michael Albinus <michael.albinus@gmx.de>
* automated/tramp-tests.el (tramp--test-smb-or-windows-nt-p):
New defun.
(tramp-test30-special-characters): Use it. (Bug#19463)
(tramp--test-check-files): Filter nil file names out.
2015-01-01 Michael Albinus <michael.albinus@gmx.de>
Sync with Tramp 2.2.11.
* automated/tramp-tests.el (tramp-test30-special-characters):
Skip test on MS-Windows.
2014-12-27 Glenn Morris <rgm@gnu.org>
* automated/let-alist.el: Load dependency.
@ -16,7 +30,7 @@
2014-12-27 Fabián Ezequiel Gallina <fgallina@gnu.org>
(python-shell-buffer-substring-9): New test.
* automated/python-tests.el (python-shell-buffer-substring-9): New test.
2014-12-27 Fabián Ezequiel Gallina <fgallina@gnu.org>

View File

@ -1487,6 +1487,14 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
(ignore-errors (delete-directory tmp-name1 'recursive)))))
(defun tramp--test-smb-or-windows-nt-p ()
"Check, whether the locale or remote host runs MS Windows.
This requires restrictions of file name syntax."
(or (eq system-type 'windows-nt)
(eq (tramp-find-foreign-file-name-handler
tramp-test-temporary-file-directory)
'tramp-smb-file-name-handler)))
(defun tramp--test-check-files (&rest files)
"Runs a simple but comprehensive test over every file in FILES."
(let ((tmp-name1 (tramp--test-make-temp-name))
@ -1495,7 +1503,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
(progn
(make-directory tmp-name1)
(make-directory tmp-name2)
(dolist (elt files)
(dolist (elt (delq nil files))
(let ((file1 (expand-file-name elt tmp-name1))
(file2 (expand-file-name elt tmp-name2)))
(write-region elt nil file1)
@ -1551,24 +1559,23 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
(memq
(tramp-find-foreign-file-name-handler tramp-test-temporary-file-directory)
'(tramp-adb-file-name-handler
tramp-gvfs-file-name-handler
tramp-smb-file-name-handler))))
tramp-gvfs-file-name-handler))))
;; Newlines, slashes and backslashes in file names are not supported.
;; So we don't test.
(tramp--test-check-files
" foo\tbar baz\t"
(if (tramp--test-smb-or-windows-nt-p) "foo bar baz" " foo\tbar baz\t")
"$foo$bar$$baz$"
"-foo-bar-baz-"
"%foo%bar%baz%"
"&foo&bar&baz&"
"?foo?bar?baz?"
"*foo*bar*baz*"
"'foo\"bar'baz\""
(unless (tramp--test-smb-or-windows-nt-p) "?foo?bar?baz?")
(unless (tramp--test-smb-or-windows-nt-p) "*foo*bar*baz*")
(if (tramp--test-smb-or-windows-nt-p) "'foo'bar'baz'" "'foo\"bar'baz\"")
"#foo~bar#baz~"
"!foo|bar!baz|"
":foo;bar:baz;"
"<foo>bar<baz>"
(if (tramp--test-smb-or-windows-nt-p) "!foo!bar!baz!" "!foo|bar!baz|")
(if (tramp--test-smb-or-windows-nt-p) ";foo;bar;baz;" ":foo;bar:baz;")
(unless (tramp--test-smb-or-windows-nt-p) "<foo>bar<baz>")
"(foo)bar(baz)"
"[foo]bar[baz]"
"{foo}bar{baz}"))
@ -1748,10 +1755,9 @@ Since it unloads Tramp, it shall be the last test to run."
;; doesn't work well when an interactive password must be provided.
;; * Fix `tramp-test27-start-file-process' for `nc' and on MS
;; Windows (`process-send-eof'?).
;; * Fix `tramp-test28-shell-command' on MS Windows (nasty plink message).
;; * Fix `tramp-test30-special-characters' for `adb', `nc' and `smb'.
;; * Fix `tramp-test31-utf8' for MS Windows and `nc'/`telnet' (when
;; target is a dumb busybox). Seems to be in `directory-files'.
;; * Fix `tramp-test30-special-characters' for `adb' and `nc'.
;; * Fix `tramp-test31-utf8' for `nc'/`telnet' (when target is a dumb
;; busybox). Seems to be in `directory-files'.
;; * Fix Bug#16928. Set expected error of `tramp-test32-asynchronous-requests'.
;; * Fix `tramp-test34-unload' (Not all symbols are unbound). Set
;; expected error.