]> git.eshelyaron.com Git - emacs.git/log
emacs.git
7 years agoMake `todo-toggle-item-highlighting' work on multiline items (bug#27133)
Stephen Berman [Mon, 29 May 2017 18:26:49 +0000 (20:26 +0200)]
Make `todo-toggle-item-highlighting' work on multiline items (bug#27133)

* lisp/calendar/todo-mode.el (todo-hl-line-range): New named function,
replacing an anonymous function for the sake of `describe-variable'.
(todo-modes-set-2): Use it as buffer-local value of hl-line-range-function
and remove boundp test of this variable, so its value is available on
invoking `todo-toggle-item-highlighting'.

7 years agoFix build error on macOS 10.6
Alan Third [Mon, 29 May 2017 16:01:44 +0000 (17:01 +0100)]
Fix build error on macOS 10.6

* src/nsfns.m (compute_tip_xy): Cast NSRect to CGRect and NSPoint to
CGPoint.

7 years ago; Fix backslashes in python-tests
Noam Postavsky [Mon, 22 May 2017 16:36:20 +0000 (12:36 -0400)]
; Fix backslashes in python-tests

* test/lisp/progmodes/python-tests.el (python-indent-after-backslash-1)
(python-indent-after-backslash-2)
(python-indent-after-backslash-3)
(python-indent-after-backslash-4)
(python-indent-after-backslash-5)
(python-nav-beginning-of-statement-1)
(python-nav-end-of-statement-1)
(python-nav-forward-statement-1)
(python-nav-backward-statement-1)
(python-nav-backward-statement-2)
(python-info-statement-starts-block-p-2)
(python-info-statement-ends-block-p-2)
(python-info-beginning-of-statement-p-2)
(python-info-end-of-statement-p-2)
(python-info-beginning-of-block-p-2)
(python-info-end-of-block-p-2)
(python-info-line-ends-backslash-p-1)
(python-info-beginning-of-backslash-1)
(python-info-continuation-line-p-1)
(python-info-block-continuation-line-p-1)
(python-info-assignment-statement-p-1)
(python-info-assignment-continuation-line-p-1): Backslashes in
literals should be doubled only once to produce one backslash in the
buffer.  If there backslashes inside a Python string literal in a Lisp
literal, that would need to be doubled twice, but there are no such
cases.  Note that `python-tests-looking-at' takes a plain string, not
a regexp.

7 years ago; Update test for previous change
Noam Postavsky [Mon, 22 May 2017 16:32:04 +0000 (12:32 -0400)]
; Update test for previous change

* test/lisp/progmodes/python-tests.el
(python-indent-after-backslash-4): Indent after backslash is now
python-indent-offset.

7 years agoComply with pep 8 style guide for backslash in assignment (Bug#24809)
Jules Tamagnan [Thu, 27 Oct 2016 22:03:31 +0000 (15:03 -0700)]
Comply with pep 8 style guide for backslash in assignment (Bug#24809)

* lisp/progmodes/python.el (python-indent--calculate-indentation):
Increase indent by `python-indent-offset' after
`:after-backslash-assignment-continuation'.

Copyright-paperwork-exempt: yes

7 years agoAdd suggestion to docstring
Wilfred Hughes [Mon, 29 May 2017 00:04:41 +0000 (01:04 +0100)]
Add suggestion to docstring

* lisp/subr.el (interactive-p): Mention commandp, as this is often
  what users are actually looking for.

7 years agoEnsure button-get works in any buffer
Wilfred Hughes [Mon, 29 May 2017 00:00:05 +0000 (01:00 +0100)]
Ensure button-get works in any buffer

* lisp/button.el (button-get): Previously we assumed that button-get
  was called in the buffer containing the button.  In other buffers,
  button-get always returned nil.  Fix this by passing the relevant
  buffer from the marker.

7 years agoSignal error if find-grep returns a nonzero status
Dmitry Gutov [Sun, 28 May 2017 23:55:42 +0000 (02:55 +0300)]
Signal error if find-grep returns a nonzero status

* lisp/progmodes/xref.el (xref-collect-matches): Signal error
if find-grep returns a nonzero status (bug#23451).  Remove the
comment: even if some output is present, a non-zero status
means something went wrong and it can't be relied upon.

7 years agoMake sure exiting todo-mode buffer buries it (bug#27121)
Stephen Berman [Sun, 28 May 2017 20:52:05 +0000 (22:52 +0200)]
Make sure exiting todo-mode buffer buries it (bug#27121)

This failed due to commit ea3ae33b from 2013-05-16, which prevented
quitting todo-mode buffer after visiting todo-archive buffer from
making the archive buffer current again.  Avoid this now by simply
killing the archive buffer, since there's no need to keep it a live
buffer.  Consequently, quitting a todo-mode buffer can now use
bury-buffer without an argument, which ensures that is will not
becomes current on quitting the buffer that replaced it in the window.

* lisp/calendar/todo-mode.el (todo-quit): Kill todo-archive-mode
buffer instead of burying it.  This now allows exiting the
todo-mode buffer by bury-buffer without an argument, so do that.

7 years agoSome tweaks, almost all for Tramp adb method
Michael Albinus [Sun, 28 May 2017 21:44:10 +0000 (23:44 +0200)]
Some tweaks, almost all for Tramp adb method

* lisp/net/tramp-adb.el (tramp-adb-parse-device-names):
Use `make-tramp-file-name'.
(tramp-adb-get-device): Use `tramp-file-name-port-or-default'.
(tramp-adb-maybe-open-connection): Set "prompt" property.
(tramp-adb-wait-for-output): Use it.

* lisp/net/tramp-cache.el (tramp-cache-print): Use `elt'.
(tramp-dump-connection-properties): Check also that there are
properties to be saved.  Don't save "started" property of
"ftp" method.

* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name):
Use `make-tramp-file-name'.

* lisp/net/tramp.el (tramp-remote-file-name-spec-regexp):
Host could be empty.
(tramp-file-name-port-or-default): New defun.
(tramp-dissect-file-name): Simplify `make-tramp-file-name' call.
(tramp-handle-file-name-case-insensitive-p): Use a progress reporter.
(tramp-call-process, tramp-call-process-region):
Use `make-tramp-file-name'.

* test/lisp/net/tramp-tests.el (tramp-test03-file-name-defaults):
Revert change from 2017-05-24.
(tramp-test05-expand-file-name-relative): Let it also pass for
"adb" method.

7 years agoFix Tramp for Android 7
Jürgen Hötzel [Sun, 28 May 2017 11:06:53 +0000 (13:06 +0200)]
Fix Tramp for Android 7

* tramp-adb.el (tramp-adb-ls-toolbox-regexp):
Username part of prompt is empty on Android 7.
(tramp-adb-ls-toolbox-regexp):
Ignore addition links column on Android 7.
(tramp-adb-get-ls-command):
Dont use --color=none when using toybox (Android 7).  It's not
possible to disable coloring explicitly for toybox ls.

7 years agoFix cl-indent for `loop' with :keywords (Bug#15543)
Svante Carl v. Erichsen [Sun, 6 Oct 2013 18:33:24 +0000 (20:33 +0200)]
Fix cl-indent for `loop' with :keywords (Bug#15543)

* lisp/emacs-lisp/cl-indent.el (lisp-extended-loop-p): Allow for
":keywords".

Copyright-paperwork-exempt: yes

7 years agoDepromiscuify inotify with IN_MASK_ADD
Paul Eggert [Sat, 27 May 2017 17:54:25 +0000 (10:54 -0700)]
Depromiscuify inotify with IN_MASK_ADD

Use IN_MASK_ADD instead of using a no-longer-promiscuous-enough
mask.  This simplifies the code and restores the ability to
use IN_ACCESS, IN_CLOSE_WRITE, IN_CLOSE_NOWRITE, and IN_OPEN
in some cases (Bug#26973).
* src/inotify.c (INOTIFY_DEFAULT_MASK): Remove.
(Finotify_add_watch): Use IN_MASK_ADD instead.

7 years agoRestore inotify onlydir support
Paul Eggert [Sat, 27 May 2017 17:54:25 +0000 (10:54 -0700)]
Restore inotify onlydir support

There was no need to remove it in the 2017-03-26 inotify change,
as it is like IN_DONT_FOLLOW and does not affect other watchers
for the same file.
* src/inotify.c (symbol_to_inotifymask, Finotify_add_watch)
(syms_of_inotify): Bring back onlydir.

7 years agoSimplify computation of inotify mask
Paul Eggert [Sat, 27 May 2017 17:54:25 +0000 (10:54 -0700)]
Simplify computation of inotify mask

* src/inotify.c (add_watch): Accept uint32_t imask instead
of Lisp_Object aspect.  Caller changed.
(Finotify_add_watch): Use aspect_to_inotifymask earlier, to
simplify the code.

7 years agoDon't attempt to recover from undefined behavior in some cases
Philipp Stephani [Sat, 27 May 2017 12:39:01 +0000 (14:39 +0200)]
Don't attempt to recover from undefined behavior in some cases

These functions can only be run in batch mode and exit Emacs on
return, so nothing can be recovered.  Disable unsafe recover
mechanisms so that we get real failures and good stack traces on
fatal signals.

* lisp/emacs-lisp/bytecomp.el (batch-byte-compile)
(batch-byte-recompile-directory):
* lisp/emacs-lisp/ert.el (ert-run-tests-batch-and-exit)
(ert-summarize-tests-batch-and-exit): Don't attempt to recover
from undefined behavior.

7 years agoAvoid another compiler warning on macOS
Philipp Stephani [Sat, 27 May 2017 13:26:49 +0000 (15:26 +0200)]
Avoid another compiler warning on macOS

When configured with --without-ns, HAVE_NS is not defined on macOS,
thus 'memory-limit' calls the deprecated sbrk(2) function.  Avoid that
by using the pre-defined __APPLE__ preprocessor macro.

* src/alloc.c (Fmemory_limit): Never use sbrk(2) on macOS.

7 years agoFix ruler-mode text-scaling issues
Luke Yen-Xun Lee [Sat, 27 May 2017 13:25:02 +0000 (16:25 +0300)]
Fix ruler-mode text-scaling issues

* lisp/ruler-mode.el (ruler-mode-text-scaled-width): New function
for computing scaled text width.
(ruler-mode-text-scaled-window-hscroll)
(ruler-mode-text-scaled-window-width): Compute text scaled
`window-width' value.
(ruler-mode-mouse-grab-any-column, ruler-mode-mouse-add-tab-stop)
(ruler-mode-ruler): Change `window-hscroll' into
`ruler-mode-text-scaled-window-hscroll', and change `window-width'
into `ruler-mode-text-scaled-window-width'.

7 years agoMinor doc and doc-string fixes (Bug#27091)
Martin Rudalics [Sat, 27 May 2017 13:14:52 +0000 (15:14 +0200)]
Minor doc and doc-string fixes (Bug#27091)

* src/window.c (Fset_window_scroll_bars): Fix doc-string.

* doc/lispref/display.texi (Fringe Size/Pos, Scroll Bars)
(Display Margins): Mention that `set-window-buffer' may override
settings made by `set-window-fringes', `set-window-scroll-bars'
and `set-window-margins'.
* doc/lispref/windows.texi (Buffers and Windows): Fix doc of
`set-window-buffer'.

7 years agoAvoid args-out-of-range errors on fringe clicks after "C-h k"
Eli Zaretskii [Sat, 27 May 2017 12:57:38 +0000 (15:57 +0300)]
Avoid args-out-of-range errors on fringe clicks after "C-h k"

* src/keyboard.c (echo_truncate): Don't call Ftruncate if the echo
message is already shorter than NCHARS.  (Bug#27040)

7 years agoFix GUD "Stop" display when running pdb
Eli Zaretskii [Sat, 27 May 2017 12:15:18 +0000 (15:15 +0300)]
Fix GUD "Stop" display when running pdb

* lisp/progmodes/gud.el (gud-menu-map): Don't call gdb-show-stop-p
when GUD mode is 'pdb'.  (Bug#27024)

7 years agoSupport drag and drop of region by mouse (Bug#26725)
Tak Kunihiro [Sat, 27 May 2017 11:57:11 +0000 (14:57 +0300)]
Support drag and drop of region by mouse (Bug#26725)

* doc/emacs/frames.texi (Drag and Drop): Document support of drag
and drop region by mouse.
* lisp/mouse.el (mouse-drag-region): Call mouse-drag-and-drop-region
when start-event is on region.
(mouse-drag-and-drop-region): New function, moves the region by
(mouse-drag-and-drop-region): New defcustom.
* etc/NEWS: Mention mouse-drag-and-drop-region.

7 years ago* lisp/emacs-lisp/eieio.el (defclass): Fix quote in warning message.
Noam Postavsky [Sat, 27 May 2017 03:26:27 +0000 (23:26 -0400)]
* lisp/emacs-lisp/eieio.el (defclass): Fix quote in warning message.

7 years agoCheck if instancetype supported in ObjC
Alan Third [Thu, 25 May 2017 18:23:39 +0000 (19:23 +0100)]
Check if instancetype supported in ObjC

* configure.ac: Add check for instancetype.
* src/nsterm.h [!NATIVE_OBJC_INSTANCETYPE]: Define instancetype.

7 years agoMark keywordp as a safe, error-free function
Wilfred Hughes [Fri, 26 May 2017 21:45:58 +0000 (22:45 +0100)]
Mark keywordp as a safe, error-free function

* lisp/emacs-lisp/byte-opt.el: Add keywordp to
  side-effect-and-error-free-fns.

7 years ago* src/inotify.c: Add FIXME comments.
Paul Eggert [Fri, 26 May 2017 16:07:50 +0000 (09:07 -0700)]
* src/inotify.c: Add FIXME comments.

7 years agoFix Bug#26973
Andreas Politz [Fri, 26 May 2017 14:42:43 +0000 (16:42 +0200)]
Fix Bug#26973

* src/inotify.c (INOTIFY_DEFAULT_MASK): Removing ACCESS, OPEN
and CLOSE events on order do let other processes also reading
from their descriptors.  (Bug#26973).

7 years agoRemove Emacs 23 compat code from Tramp
Michael Albinus [Fri, 26 May 2017 14:25:18 +0000 (16:25 +0200)]
Remove Emacs 23 compat code from Tramp

* doc/misc/tramp.texi (Remote processes): Don't mention
Emacs 24 explicitely.
(Frequently Asked Questions): Remove Emacs 23 from
compatibility list.

* lisp/net/tramp.el:
* lisp/net/tramp-adb.el:
* lisp/net/tramp-cache.el:
* lisp/net/tramp-gvfs.el:
* lisp/net/tramp-sh.el:
* lisp/net/tramp-smb.el: Replace compat function calls.

* lisp/net/tramp-compat.el (remote-file-name-inhibit-cache)
(tramp-compat-condition-case-unless-debug)
(tramp-compat-copy-file, tramp-compat-copy-directory)
(tramp-compat-delete-file, tramp-compat-delete-directory)
(tramp-compat-process-live-p): Remove them.

* lisp/net/trampver.el: Make version check fit for Emacs 24.

7 years agoWork for application/x-tar-gz and image/svg+xml
Katsumi Yamaoka [Fri, 26 May 2017 08:07:58 +0000 (08:07 +0000)]
Work for application/x-tar-gz and image/svg+xml

;; Try inlining the attachment in the article <87wp94dzj6.fsf@gmail.com>
;; of bug#27078 in the Emacs bug list using Gnus.

* lisp/gnus/mm-archive.el (mm-archive-decoders):
Add a decoder for application/x-tar-gz.
(mm-dissect-archive): Error out if a decoder is not found.

* lisp/gnus/mm-decode.el (mm-get-image): Allow image/svg+xml.

7 years agotest-calc-23889: Skip test on 32-bit platforms
Tino Calancha [Fri, 26 May 2017 01:59:19 +0000 (10:59 +0900)]
test-calc-23889: Skip test on 32-bit platforms

This test fails on some 32-bit platforms as mentioned in
https://lists.gnu.org/archive/html/emacs-devel/2017-05/msg00737.html
* test/lisp/calc/calc-tests.el (test-calc-23889): Skip when
the Lisp integer is not big enough.

7 years agoFix NS tooltips showing in the wrong place (bug#27053)
Alan Third [Thu, 25 May 2017 19:13:21 +0000 (20:13 +0100)]
Fix NS tooltips showing in the wrong place (bug#27053)

* src/nsfns.m (compute_tip_xy): Get current mouse position instead of
last recorded position.

7 years agolisp/net/soap-client.el: Bump version to 3.1.2
Thomas Fitzsimmons [Wed, 24 May 2017 18:34:13 +0000 (14:34 -0400)]
lisp/net/soap-client.el: Bump version to 3.1.2

* lisp/net/soap-client.el: Bump version to 3.1.2.

7 years agoFix soap-inspect.el doc strings
Thomas Fitzsimmons [Wed, 24 May 2017 19:01:01 +0000 (15:01 -0400)]
Fix soap-inspect.el doc strings

* lisp/net/soap-inspect.el (soap-inspect-xs-attribute): Fix doc
string.
(soap-inspect-xs-attribute-group): Likewise.

7 years agoFix two soap-client.el byte compilation warnings
Thomas Fitzsimmons [Wed, 24 May 2017 18:58:47 +0000 (14:58 -0400)]
Fix two soap-client.el byte compilation warnings

* lisp/net/soap-client.el (url-http-response-status): Add defvar.
(soap-fetch-xml-from-url): Remove special declaration of
url-http-response-status.
(soap-invoke-internal): Likewise.

7 years agolisp/net/soap-client.el: Require cl-lib version 0.6.1
Thomas Fitzsimmons [Wed, 24 May 2017 18:32:00 +0000 (14:32 -0400)]
lisp/net/soap-client.el: Require cl-lib version 0.6.1

* lisp/net/soap-client.el: Require cl-lib version 0.6.1.

7 years agolisp/net/soap-client.el: Shorten some long lines
Thomas Fitzsimmons [Wed, 24 May 2017 18:28:32 +0000 (14:28 -0400)]
lisp/net/soap-client.el: Shorten some long lines

* lisp/net/soap-client.el (soap-encode-xs-element): Remove
unnecessary progn.
(soap-xs-add-union): Wrap long line.

Co-authored-by: Stefan Monnier <monnier@iro.umontreal.ca>
7 years agoRemove cl dependency in soap-client.el and soap-inspect.el
Alex Harsanyi [Wed, 24 May 2017 18:18:39 +0000 (14:18 -0400)]
Remove cl dependency in soap-client.el and soap-inspect.el

* lisp/net/soap-inspect.el: Replace cl library with cl-lib, case
with cl-case, destructuring-bind with cl-destructuring-bind and
loop with cl-loop.

* lisp/net/soap-client.el: Replace cl library with cl-lib,
defstruct with cl-defstruct, assert with cl-assert, case with
cl-case, ecase with cl-ecase, loop with cl-loop and
destructuring-bind with cl-destructuring-bind.

Co-authored-by: Stefan Monnier <monnier@iro.umontreal.ca>
7 years agoSwitch Tramp to cl-lib
Michael Albinus [Thu, 25 May 2017 08:04:12 +0000 (10:04 +0200)]
Switch Tramp to cl-lib

* lisp/net/tramp-compat.el (cl-lib): Require it rather than cl.

* lisp/net/tramp-ftp.el: Don't require cl.

* lisp/net/tramp-gvfs.el: Don't require cl.
(tramp-gvfs-handler-mounted-unmounted)
(tramp-gvfs-connection-mounted-p): Use `cl-*' macros.

* lisp/net/tramp-sh.el: Don't require cl.
(tramp-set-file-uid-gid): Use `shell-quote-argument'.
(tramp-sh-gvfs-monitor-dir-process-filter)
(tramp-sh-inotifywait-process-filter): Use `cl-*' macros.

* lisp/net/tramp-smb.el: Don't require cl.
(tramp-smb-read-file-entry): Use `cl-*' macros.

* lisp/net/tramp.el (cl-lib): Require it rather than cl.
(tramp-parse-file, tramp-parse-shostkeys-sknownhosts)
(tramp-parse-passwd, tramp-parse-etc-group)
(tramp-parse-putty): Use `cl-*' macros.

7 years ago* CONTRIBUTE: Suggest autogen.sh's 'all' operand.
Paul Eggert [Thu, 25 May 2017 07:43:13 +0000 (00:43 -0700)]
* CONTRIBUTE: Suggest autogen.sh's 'all' operand.

7 years agoPort ATTRIBUTE_MAY_ALIAS to recent icc
Paul Eggert [Thu, 25 May 2017 07:24:51 +0000 (00:24 -0700)]
Port ATTRIBUTE_MAY_ALIAS to recent icc

* src/conf_post.h (ATTRIBUTE_MAY_ALIAS) [__ICC]:
Define to empty.  Otherwise, icc (ICC) 17.0.4 20170411 says
“warning #2621: attribute "__may_alias__" does not apply here”
for constructs like ‘struct sockaddr *sa = (whatever);
struct sockaddr_in __attribute__ ((__may_alias__)) *sin
= (struct sockaddr_in *) sa;’.

7 years agoMerge from gnulib
Paul Eggert [Thu, 25 May 2017 07:13:14 +0000 (00:13 -0700)]
Merge from gnulib

This incorporates:
2017-05-25 port to recent icc
* lib/intprops.h: Copy from gnulib.

7 years agoFix Tramp for python.el
Michael Albinus [Wed, 24 May 2017 20:26:20 +0000 (22:26 +0200)]
Fix Tramp for python.el

* lisp/net/tramp.el (tramp-get-connection-process): Check,
that VEC is a `tramp-file-name' structure.

7 years agoRaise version of macOS we define instancetype for (bug#27059)
Alan Third [Wed, 24 May 2017 19:18:52 +0000 (20:18 +0100)]
Raise version of macOS we define instancetype for (bug#27059)

* src/nsterm.m: Increase supported version number.

7 years agoDefine new types on macOS 10.6 (bug#27041)
Alan Third [Wed, 24 May 2017 18:40:19 +0000 (19:40 +0100)]
Define new types on macOS 10.6 (bug#27041)

* src/nsterm.h: Enable instancetype typedef for older macOS, and use
correct NSUInteger instead of int.

7 years agoDon't autoload new dns-mode command
Glenn Morris [Wed, 24 May 2017 17:11:32 +0000 (13:11 -0400)]
Don't autoload new dns-mode command

* lisp/textmodes/dns-mode.el (dns-mode-ipv6-to-nibbles):
Remove autoload cookie.

7 years ago* src/fns.c (sxhash): Fix records hashing (bug#27057, bug#26639)
Stefan Monnier [Wed, 24 May 2017 15:55:13 +0000 (11:55 -0400)]
* src/fns.c (sxhash): Fix records hashing (bug#27057, bug#26639)

(sxhash_vector): Make it work on pseudo vectors as well.
(sxhash): Treat records like vectors.

7 years agoAdapt tramp-tests.el according to new defstruct
Michael Albinus [Wed, 24 May 2017 14:17:59 +0000 (16:17 +0200)]
Adapt tramp-tests.el according to new defstruct

* test/lisp/net/tramp-tests.el (tramp-test03-file-name-defaults):
Fix test according to new defstruct.
(tramp-test29-environment-variables-and-port-numbers):
Expect it now as passed.  Cleanup at the end.

7 years agoIntroduce a defstruct `tramp-file-name' as central data structure.
Michael Albinus [Wed, 24 May 2017 14:16:53 +0000 (16:16 +0200)]
Introduce a defstruct `tramp-file-name' as central data structure.

This solves also Bug#27009.

* lisp/net/tramp.el (tramp-current-domain)
(tramp-current-port): New defvars.
(tramp-file-name): New defstruct.
(tramp-file-name-user-domain, tramp-file-name-host-port)
(tramp-file-name-equal-p): New defuns.
(tramp-file-name-p, tramp-file-name-method)
(tramp-file-name-user, tramp-file-name-host)
(tramp-file-name-localname, tramp-file-name-hop)
(tramp-file-name-real-user, tramp-file-name-domain)
(tramp-file-name-real-host, tramp-file-name-port):
Remove defuns.  They are provided by the defstruct, or not
needed anymore.
(tramp-dissect-file-name, tramp-buffer-name)
(tramp-make-tramp-file-name, tramp-get-buffer)
(tramp-set-connection-local-variables)
(tramp-debug-buffer-name, tramp-message)
(tramp-error-with-buffer, with-parsed-tramp-file-name)
(tramp-completion-dissect-file-name1)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-remote-p, tramp-handle-file-symlink-p)
(tramp-handle-find-backup-file-name)
(tramp-handle-insert-file-contents, tramp-process-actions)
(tramp-check-cached-permissions, tramp-local-host-p)
(tramp-get-remote-tmpdir, tramp-call-process)
(tramp-call-process-region, tramp-read-passwd)
(tramp-clear-passwd):
* lisp/net/tramp-adb.el (tramp-adb-parse-device-names)
(tramp-adb-handle-expand-file-name)
(tramp-adb-handle-file-truename, tramp-adb-handle-copy-file)
(tramp-adb-handle-process-file)
(tramp-adb-maybe-open-connection):
* lisp/net/tramp-cache.el (tramp-get-hash-table)
(tramp-get-file-property, tramp-set-file-property)
(tramp-flush-file-property, tramp-flush-directory-property)
(tramp-get-connection-property)
(tramp-set-connection-property, tramp-connection-property-p)
(tramp-flush-connection-property, tramp-cache-print)
(tramp-list-connections, tramp-dump-connection-properties)
(tramp-parse-connection-properties):
* lisp/net/tramp-cmds.el (tramp-cleanup-connection):
* lisp/net/tramp-ftp.el (tramp-ftp-file-name-handler):
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name)
(tramp-gvfs-url-file-name, tramp-gvfs-handler-askpassword)
(tramp-gvfs-handler-mounted-unmounted)
(tramp-gvfs-mount-spec, tramp-gvfs-get-remote-uid)
(tramp-gvfs-get-remote-gid)
(tramp-gvfs-maybe-open-connection):
* lisp/net/tramp-sh.el (tramp-sh-handle-file-truename)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-sh-handle-expand-file-name)
(tramp-sh-handle-start-file-process)
(tramp-sh-handle-process-file, tramp-compute-multi-hops)
(tramp-maybe-open-connection)
(tramp-make-copy-program-file-name, tramp-get-remote-path)
(tramp-get-inline-coding):
* lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory)
(tramp-smb-handle-expand-file-name)
(tramp-smb-handle-file-acl, tramp-smb-handle-process-file)
(tramp-smb-handle-set-file-acl)
(tramp-smb-maybe-open-connection): Adapt according to defstruct.

7 years agoFix and improve UI of scroll bar menu (bug#27047)
Stephen Berman [Wed, 24 May 2017 11:33:27 +0000 (13:33 +0200)]
Fix and improve UI of scroll bar menu (bug#27047)

In addition, since the Emacs manual writes "scroll bar", "tool
bar" and "menu bar", use this convention in the Show/Hide menues
and tooltips as well.

* lisp/menu-bar.el (menu-bar-showhide-scroll-bar-menu): Make
pressing a radio button in the menu actually show that it was
pressed.  Replace the two radio buttons to turn the horizontal
scroll bar on and off with a single check-box toggle and add a
separator between this and the vertical scroll bar radio
buttons.  Use conventional spelling.
(menu-bar-horizontal-scroll-bar)
(menu-bar-no-horizontal-scroll-bar): Remove, since now unused.
(menu-bar-showhide-tool-bar-menu, menu-bar-showhide-menu)
(menu-bar-mode): Use conventional spelling.

7 years agoRemove string-as-unibyte
Katsumi Yamaoka [Wed, 24 May 2017 08:18:52 +0000 (08:18 +0000)]
Remove string-as-unibyte

* lisp/gnus/canlock.el (canlock-sha1): Remove useless variable.
(canlock-make-cancel-key): No need to use string-as-unibyte.

7 years agoFix concatenation of "^" with diff-file-junk-re
Tino Calancha [Wed, 24 May 2017 01:54:48 +0000 (10:54 +0900)]
Fix concatenation of "^" with diff-file-junk-re

This regexp contains "\\|", thus a concatenation
of "^" with it just matches the beginning of line for the
first alternative in diff-file-junk-re.
* lisp/vc/ediff-ptch.el (ediff-map-patch-buffer): Concat "^" with
diff-file-junk-re wrapped in a shy group.

7 years agoSuppress intermittent test failure on hydra
Glenn Morris [Wed, 24 May 2017 00:44:52 +0000 (20:44 -0400)]
Suppress intermittent test failure on hydra

* test/lisp/emacs-lisp/eieio-tests/eieio-tests.el
(eieio-test-37-obsolete-name-in-constructor): Skip on hydra.

7 years ago; Move recent test file to correct directory (my mistake)
Glenn Morris [Wed, 24 May 2017 00:42:28 +0000 (20:42 -0400)]
; Move recent test file to correct directory (my mistake)

7 years agoNew dns-mode command for IPv6 address conversion
Peder O. Klingenberg [Wed, 24 May 2017 00:34:08 +0000 (20:34 -0400)]
New dns-mode command for IPv6 address conversion

This converts IPv6 addresses to a format suitable for
reverse lookup zone files.  (Bug#26820)
* lisp/textmodes/dns-mode.el (dns-mode-map, dns-mode-menu):
Add dns-mode-ipv6-to-nibbles.
(dns-mode-ipv6-to-nibbles, dns-mode-reverse-and-expand-ipv6):
New functions.
* test/lisp/dns-mode-tests.el: New file.
; * etc/NEWS: Mention this.

7 years agoProtect *Backtrace* from being killed (Bug#26650)
Noam Postavsky [Tue, 25 Apr 2017 12:39:17 +0000 (08:39 -0400)]
Protect *Backtrace* from being killed (Bug#26650)

* lisp/emacs-lisp/debug.el (debugger-mode): Call `top-level' in
`kill-buffer-hook'.

7 years agoGive a name to lisp-mode's adaptive-fill-function (Bug#22730)
Noam Postavsky [Fri, 21 Apr 2017 04:00:26 +0000 (00:00 -0400)]
Give a name to lisp-mode's adaptive-fill-function (Bug#22730)

* lisp/emacs-lisp/lisp-mode.el (lisp-adaptive-fill): New function.
(lisp-mode-variables): Use it.

7 years agovc-hg.el: Silence byte compiler warning
Philipp Stephani [Tue, 23 May 2017 19:23:55 +0000 (21:23 +0200)]
vc-hg.el: Silence byte compiler warning

* lisp/vc/vc-hg.el (compilation-arguments): Forward-declare.

7 years agoDon't warn about missing brances on macOS
Paul Eggert [Tue, 23 May 2017 19:18:35 +0000 (21:18 +0200)]
Don't warn about missing brances on macOS

On macOS, removing -Wmissing-braces is not enough; the warning has to
be disabled explicitly.

7 years agoDon't treat ' as a string delimiter in RPM spec files
Wilfred Hughes [Tue, 23 May 2017 17:48:19 +0000 (18:48 +0100)]
Don't treat ' as a string delimiter in RPM spec files

' is commonly used as an apostrophe in the prose sections of spec
files, which was erroneously highlighted as strings. See for example
http://kmymoney2.sourceforge.net/phb/rpm-example.html

* lisp/progmodes/sh-script.el (sh-mode-syntax-table): Treat ' as
  punctuation in RPM spec files.

7 years ago* lisp/emacs-lisp/cl-indent.el: Don't require CL. Use lexical-binding.
Stefan Monnier [Tue, 23 May 2017 13:23:54 +0000 (09:23 -0400)]
* lisp/emacs-lisp/cl-indent.el: Don't require CL.  Use lexical-binding.

(common-lisp-indent-function-1): Remove unused var `last-point`.
(lisp-indent-error-function): Move defvar before first use.

7 years ago* lisp/international/rfc1843.el: Don't require CL. Use lexical-binding.
Stefan Monnier [Tue, 23 May 2017 13:18:26 +0000 (09:18 -0400)]
* lisp/international/rfc1843.el: Don't require CL.  Use lexical-binding.

7 years ago* lisp/international/utf7.el: Don't require CL. Use lexical-binding.
Stefan Monnier [Tue, 23 May 2017 13:12:06 +0000 (09:12 -0400)]
* lisp/international/utf7.el: Don't require CL.  Use lexical-binding.

7 years ago* lisp/net/shr.el: Use cl-lib instead of cl.
Stefan Monnier [Tue, 23 May 2017 13:09:28 +0000 (09:09 -0400)]
* lisp/net/shr.el: Use cl-lib instead of cl.

7 years ago* test/src/fns-tests.el, test/src/data-tests.el: Don't use `cl`
Stefan Monnier [Tue, 23 May 2017 12:39:20 +0000 (08:39 -0400)]
* test/src/fns-tests.el, test/src/data-tests.el: Don't use `cl`

* test/src/data-tests.el (binding-test-manual, binding-test-setq-default)
(binding-test-makunbound, data-tests-varalias-watchers)
(data-tests-local-variable-watchers): Silence compiler warnings.

7 years ago* lisp/vc/vc-hg.el (compilation-directory): Silence byte-compiler.
Stefan Monnier [Tue, 23 May 2017 12:16:59 +0000 (08:16 -0400)]
* lisp/vc/vc-hg.el (compilation-directory): Silence byte-compiler.

7 years agoFix GNUstep build
Alan Third [Tue, 23 May 2017 09:42:20 +0000 (02:42 -0700)]
Fix GNUstep build

* src/nsterm.h [NS_IMPL_GNUSTEP]: Add typedefs for Cocoa-only types.
(NSWindowStyleMaskUtilityWindow): #define to NSUtilityWindowMask in
GNUstep and old versions of macOS.
* src/nsfns.m (ns-set-mouse-absolute-pixel-position): Function only
works in cocoa, not GNUstep.

7 years agoAdd test for Bug#27009 in tramp-tests.el
Michael Albinus [Tue, 23 May 2017 07:25:03 +0000 (09:25 +0200)]
Add test for Bug#27009 in tramp-tests.el

* lisp/net/tramp-sh.el (tramp-compute-multi-hops):
Check `tramp-file-name-real-host' for being a local host.

* lisp/net/tramp.el (tramp-postfix-host-regexp): Fix docstring.

* test/lisp/net/tramp-tests.el (tramp-test-temporary-file-directory):
Declare default host for mock method.
(tramp-test29-environment-variables-and-port-numbers): New test.

7 years ago; * lisp/net/tls.el (tls-program): Tweak :version.
Glenn Morris [Mon, 22 May 2017 23:08:10 +0000 (19:08 -0400)]
; * lisp/net/tls.el (tls-program): Tweak :version.

; To be reset if no 25.3 happens.

7 years ago* lisp/mail/rfc2047.el (rfc2047-decode-encoded-words): Set `words` to nil.
Stefan Monnier [Mon, 22 May 2017 20:53:18 +0000 (16:53 -0400)]
* lisp/mail/rfc2047.el (rfc2047-decode-encoded-words): Set `words` to nil.

7 years agoFix "g" in hg&git push&pull buffers
Sam Steingold [Mon, 22 May 2017 19:48:21 +0000 (15:48 -0400)]
Fix "g" in hg&git push&pull buffers

lisp/vc/vc-git.el (vc-git--pushpull): Set locally
`compilation-directory' and `compilation-arguments'.
lisp/vc/vc-hg.el (vc-hg--pushpull): Likewise.

7 years agoFix current-line hscrolling in buffers with header-line
Eli Zaretskii [Mon, 22 May 2017 18:15:17 +0000 (21:15 +0300)]
Fix current-line hscrolling in buffers with header-line

* src/xdisp.c (display_line): When testing the glyph row's
vertical position against the cursor position, account for header
line, if any.  (Bug#27014)

7 years ago* lisp/mail/rfc2047.el: Use cl-lib & lexical-binding, silence warning
Stefan Monnier [Mon, 22 May 2017 03:18:58 +0000 (23:18 -0400)]
* lisp/mail/rfc2047.el: Use cl-lib & lexical-binding, silence warning

(rfc2047-decode-encoded-words): Use dolist.
(rfc2047-decode-string): Avoid string-to-multibyte.
(rfc2047-pad-base64): Use pcase.

7 years agoMake ff-find-other-file symmetric for C++ (Bug#20192)
Dima Kogan [Tue, 24 Mar 2015 19:53:08 +0000 (12:53 -0700)]
Make ff-find-other-file symmetric for C++ (Bug#20192)

`cc-other-file-alist' has a mapping of file extensions to switch
between headers and sources, but the mappings weren't completely
symmetric.  In particular .cpp would map to .hh, but .hh would NOT map
to .cpp.

* lisp/find-file.el (cc-other-file-alist): Map ".hh" and ".h" to all
C++ extensions to make them symmetric with the C++ extensions that map
to them.  This lets repeated invocations of `ff-find-other-file'
toggle between all pairs of sources/headers.

7 years agoFix definition of whitespace in JSON
Philipp Stephani [Sat, 20 May 2017 15:49:06 +0000 (17:49 +0200)]
Fix definition of whitespace in JSON

See
https://lists.gnu.org/archive/html/emacs-devel/2017-05/msg00115.html.

* lisp/json.el (json-skip-whitespace): Fix definition.
* test/lisp/json-tests.el (test-json-skip-whitespace): Adapt unit
test.

7 years ago; Spelling fix
Paul Eggert [Sun, 21 May 2017 20:41:43 +0000 (13:41 -0700)]
; Spelling fix

7 years agoImprove module function terminology
Philipp Stephani [Sun, 21 May 2017 20:33:50 +0000 (22:33 +0200)]
Improve module function terminology

Module functions were previously called "function environments" when
the functions created by module_make_functions were lambdas.  Now we
can adapt the terminology and rename "function environments" to
"module functions" everywhere.  This also removes the name clash
between "function environments" and "module environments."

* src/emacs-module.c (module_make_function): Adapt comment to reality;
stop using "function environment" terminology.
(funcall_module): Stop using "function environment" terminology.

7 years agoAvoid uninitialized read
Philipp Stephani [Sat, 20 May 2017 14:57:58 +0000 (16:57 +0200)]
Avoid uninitialized read

* src/nsterm.m (ns_read_socket): Don't read uninitialized variable 'nevents'.

7 years agoFix call of registerServicesMenuSendTypes
Philipp Stephani [Sat, 20 May 2017 14:56:38 +0000 (16:56 +0200)]
Fix call of registerServicesMenuSendTypes

* src/nsterm.m (initFrameFromEmacs:): nil is not allowed for
returnTypes; pass an empty array instead.

7 years agoClean up code around 'ns-list-services'
Philipp Stephani [Sat, 20 May 2017 14:55:00 +0000 (16:55 +0200)]
Clean up code around 'ns-list-services'

* src/nsfns.m (Fns_list_services): Remove unreachable code.  In this
branch NS_IMPL_COCOA cannot be defined.
(interpret_services_menu): Define only if called to avoid compiler
warnings about unused static functions.

7 years agoRemove unused automatic variables
Philipp Stephani [Sat, 20 May 2017 14:52:10 +0000 (16:52 +0200)]
Remove unused automatic variables

* nsterm.m (ns_read_socket):
* macfont.m (macfont_open): Remove unused automatic variables.

7 years agoNextstep: Replace deprecated enumerators
Philipp Stephani [Sat, 20 May 2017 14:50:40 +0000 (16:50 +0200)]
Nextstep: Replace deprecated enumerators

* src/nsmenu.m (initWithContentRect:styleMask:backing:defer:): Replace
deprecated enumerator.

7 years agoNextstep: remove some deprecated method calls
Philipp Stephani [Sat, 20 May 2017 14:49:16 +0000 (16:49 +0200)]
Nextstep: remove some deprecated method calls

* src/nsterm.m (mouseDown:):
* src/nsmenu.m (runMenuAt:forFrame:keymaps:): Remove call to
deprecated method.  The return value is always nil.
* src/macfont.m (mac_font_shape_1): Replace call to deprecated method.

7 years agoRemove trailing semicolons in method definitions
Philipp Stephani [Sat, 20 May 2017 14:47:11 +0000 (16:47 +0200)]
Remove trailing semicolons in method definitions

These semicolons are ignored and cause compiler warnings.

* src/nsimage.m (setPixelAtX:Y:toRed:green:blue:alpha:):
* src/nsterm.m (init, updateFrameSize:):
(setFrame:): Remove trailing semicolon.

7 years agoRemove calls to deprecated setUsesScreenFonts
Philipp Stephani [Sat, 20 May 2017 14:44:40 +0000 (16:44 +0200)]
Remove calls to deprecated setUsesScreenFonts

* src/macfont.m (mac_screen_font_get_metrics): Don't call setUsesScreenFonts.
(mac_font_shape_1): Remove screen_font_p parameter.
(mac_screen_font_shape): Remove screen_font_p argument.

7 years agoMake a function static that isn't used outside this file
Philipp Stephani [Sat, 20 May 2017 14:42:33 +0000 (16:42 +0200)]
Make a function static that isn't used outside this file

* src/kqueue.c (kqueue_directory_listing): Make static.

7 years agoUse NSCharacterCollection instead of CTCharacterCollection
Philipp Stephani [Sat, 20 May 2017 14:39:53 +0000 (16:39 +0200)]
Use NSCharacterCollection instead of CTCharacterCollection

This should not cause behavior changes, but fixes a compiler warning
due to implicit conversions between the enums.

* src/macfont.m (macfont_cache, macfont_lookup_cache)
(macfont_get_glyph_for_cid, macfont_get_uvs_table)
(macfont_variation_glyphs): Use NSCharacterCollection.

7 years agoRemove unused function print_regions
Philipp Stephani [Sat, 20 May 2017 14:38:22 +0000 (16:38 +0200)]
Remove unused function print_regions

7 years agoDeclare Nextstep unexec functions in lisp.h
Philipp Stephani [Sat, 20 May 2017 14:37:42 +0000 (16:37 +0200)]
Declare Nextstep unexec functions in lisp.h

This removes compiler warnings about missing prototypes on macOS.

7 years agoNextstep: Use instancetype explicit return type
Philipp Stephani [Sat, 20 May 2017 14:36:24 +0000 (16:36 +0200)]
Nextstep: Use instancetype explicit return type

This removes compiler warnings on macOS and improves type safety.

* nsterm.m (initFrameFromEmacs:):
(menuDown:):
(toolbarClicked:):
(toggleToolbar:):
(setMiniwindowImage:):
(initFrame:window:):
(condemn, reprieve, setPosition:portion:whole:):
(repeatScroll:):
* nsmenu.m (initWithTitle:):
(initWithTitle:frame:):
(initForView:withIdentifier:):
(init, initWithContentRect:styleMask:backing:defer:):
(initFromContents:isQuestion:):
* nsimage.m (allocInitFromFile:):
(initFromXBM:width:height:fg:bg:):
(setXBMColor:):
(initForXPMWithDepth:width:height:): Use instancetype as return
type instead of implicit id.

7 years ago* lisp/emacs-lisp/package.el (package-delete): Delete readme file as well.
Tino Calancha [Sun, 21 May 2017 13:20:19 +0000 (22:20 +0900)]
* lisp/emacs-lisp/package.el (package-delete): Delete readme file as well.

7 years agoEnhance mode-line percentage offset facility, with "%o" and "%q"
Alan Mackenzie [Sun, 21 May 2017 10:16:09 +0000 (10:16 +0000)]
Enhance mode-line percentage offset facility, with "%o" and "%q"

"%o" will display the percentage "travel" of the window through the buffer.
"%q" will display a combination of the percentage offsets of the top and
bottom of the window.  The new user option mode-line-percent-position will
facilitate selecting a setting for this part of the mode line.

* lisp/bindings.el (mode-line-percent-position): New customizable user option.
(mode-line-position): Use mode-line-percent-position in place of "%p", etc.

* src/xdisp.c (decode_mode_spec): Add handlers for "%o" and "%q".

* doc/lispref/modes.texi (Mode Line Variables): Document
mode-line-percent-position.
(%-Constructs): Document %o and %q.

* etc/NEWS: Add an entry for these new facilities.

7 years agoWork around macOS bug in create_process, too
Paul Eggert [Sun, 21 May 2017 09:00:02 +0000 (02:00 -0700)]
Work around macOS bug in create_process, too

* src/process.c (create_process) [DARWIN_OS]:
Reset SIGCHLD after vfork here, too.

7 years agoWork around macOS bug with vforked child
Paul Eggert [Sun, 21 May 2017 08:46:44 +0000 (01:46 -0700)]
Work around macOS bug with vforked child

* src/callproc.c (call_process) [DARWIN_OS]:
Include workaround for apparent macOS bug.

7 years agoPacify --enable-gcc-warnings without modules
Paul Eggert [Sun, 21 May 2017 08:45:34 +0000 (01:45 -0700)]
Pacify --enable-gcc-warnings without modules

* src/print.c (print_vectorlike): New function, taken from
part of print_object.  This one is indented properly, and
pacifies --enable-gcc-warnings by using a default case
instead of listing all the enum values, sometimes
incompletely.
(print_object): Use it.

7 years agoRemove DARWIN_OS_CASE_SENSITIVE_FIXME code
Paul Eggert [Sun, 21 May 2017 05:55:17 +0000 (22:55 -0700)]
Remove DARWIN_OS_CASE_SENSITIVE_FIXME code

It does not appear to be needed (Bug#24441).
* etc/PROBLEMS: Remove DARWIN_OS_CASE_SENSITIVE_FIXME stuff.
* src/fileio.c (file_name_case_insensitive_p):
Remove DARWIN_OS_CASE_SENSITIVE_FIXME code.

7 years agoNarrow DARWIN_OS_CASE_SENSITIVE_FIXME to 1 choice
Paul Eggert [Sun, 21 May 2017 05:51:32 +0000 (22:51 -0700)]
Narrow DARWIN_OS_CASE_SENSITIVE_FIXME to 1 choice

* etc/PROBLEMS: Document this (Bug#24441).
* src/fileio.c (file_name_case_insensitive_p): Prefer pathconf
with _PC_CASE_SENSITIVE, if it works, to
DARWIN_OS_CASE_SENSITIVE_FIXME code.
Support just one method for DARWIN_OS_CASE_SENSITIVE_FIXME,
which matches the Apple documentation more precisely.

7 years agoFix mhtml-mode fontification bug
Tom Tromey [Sun, 21 May 2017 04:01:15 +0000 (22:01 -0600)]
Fix mhtml-mode fontification bug

Bug#26922
* lisp/textmodes/mhtml-mode.el (mhtml-syntax-propertize): Call
sgml-syntax-propertize-inside if not in a submode.
* test/manual/indent/html-multi-4.html: New file.

7 years agoFix ido-enable-dot-prefix for empty choice (Bug#26997)
Ryan [Fri, 19 May 2017 15:07:57 +0000 (11:07 -0400)]
Fix ido-enable-dot-prefix for empty choice (Bug#26997)

* lisp/ido.el (ido-set-matches-1): Only check first character of
item if it's non-empty.

Copyright-paperwork-exempt: yes

7 years ago* lisp/svg.el (svg-line): Fix x/y typo. (Bug#26953)
Ari Roponen [Sun, 21 May 2017 00:14:36 +0000 (17:14 -0700)]
* lisp/svg.el (svg-line): Fix x/y typo.  (Bug#26953)

7 years agoPrevent loading vc-bzr writing to ~/.bzr.log
Glenn Morris [Sun, 21 May 2017 00:05:18 +0000 (17:05 -0700)]
Prevent loading vc-bzr writing to ~/.bzr.log

* lisp/vc/vc-bzr.el (vc-bzr-status-switches): Disable bzr logging.