]> git.eshelyaron.com Git - emacs.git/log
emacs.git
8 years agoFix Bug#24980
Michael Albinus [Mon, 19 Dec 2016 08:32:30 +0000 (09:32 +0100)]
Fix Bug#24980

* lisp/ido.el (ido-add-virtual-buffers-to-list):
Suppress Tramp invocation.  (Bug#24980)

8 years agoAdd a new compile error regexp for Clang includes
Philipp Stephani [Sat, 10 Dec 2016 20:39:55 +0000 (21:39 +0100)]
Add a new compile error regexp for Clang includes

Clang uses a slight variation of GCC's include format, causing includes
to be treated as warnings instead of informational messages.  Use a new
regular expression instead.

* lisp/progmodes/compile.el
(compilation-error-regexp-alist-alist): New element
`clang-include' for Clang-style "included from" lines.
* test/lisp/progmodes/compile-tests.el
(compile-tests--test-regexps-data): Add unit test.

8 years agoReinstate ispell character offset (bug#25219)
Alan Third [Sun, 18 Dec 2016 15:54:48 +0000 (15:54 +0000)]
Reinstate ispell character offset (bug#25219)

* lisp/textmodes/ispell.el (ispell-process-line): insert -1 where
ispell-offset used to be.

8 years agoBind new image-mode scroll commands in image-dired
Mark Oteiza [Sun, 18 Dec 2016 14:41:31 +0000 (09:41 -0500)]
Bind new image-mode scroll commands in image-dired

* lisp/image-dired.el (image-dired-display-image-mode-map): Add bindings
to new image-mode commands.

8 years agoFix rx-any with range with ?\] and ?-
Noam Postavsky [Thu, 8 Dec 2016 04:17:37 +0000 (23:17 -0500)]
Fix rx-any with range with ?\] and ?-

* lisp/emacs-lisp/rx.el: Make sure not to produce a circular
list (Bug#25123).
* test/lisp/emacs-lisp/rx-tests.el (rx-char-any): New test.

8 years agoUse floor of mtime instead of rounding for thumb property
Mark Oteiza [Sun, 18 Dec 2016 12:28:03 +0000 (07:28 -0500)]
Use floor of mtime instead of rounding for thumb property

This seems to be the correct thing to do, at least more in line with
what at least one other implementation does.  Anything using
gnome-desktop [0] effectively does the same, as
gnome_desktop_thumbnail_is_valid applies atol(3) to mtime for
comparison and time_t on GNU/Linux is a signed int.
[0] https://git.gnome.org/browse/gnome-desktop/
* lisp/image-dired.el (image-dired-create-thumb): Use floor here.

8 years agoFix spelling mistake in private defun name (Bug#25218)
Reuben Thomas [Sat, 17 Dec 2016 19:09:41 +0000 (19:09 +0000)]
Fix spelling mistake in private defun name (Bug#25218)

lisp/textmodes/flyspell.el (flyspell-ajust-cursor-point): Rename to
`flyspell-adjust-cursor-point'.

8 years agoRemove XEmacs support from flyspell.el (Bug#25218)
Reuben Thomas [Sat, 17 Dec 2016 19:06:34 +0000 (19:06 +0000)]
Remove XEmacs support from flyspell.el (Bug#25218)

lisp/textmodes/flyspell.el (flyspell-prog-mode, flyspell-mode-on):
(flyspell-word, flyspell-delete-region-overlays):
(flyspell-correct-word-before-point): Remove XEmacs support.
(flyspell-xemacs-popup): Remove XEmacs-specific defun.

8 years agoMore tests for Tramp
Michael Albinus [Sat, 17 Dec 2016 18:52:38 +0000 (19:52 +0100)]
More tests for Tramp

* lisp/net/tramp.el (tramp-drop-volume-letter): Handle quoted
file names.

* lisp/net/tramp-sh.el (tramp-make-copy-program-file-name): Quote file
name properly.

* test/lisp/net/tramp-tests.el (tramp-test05-expand-file-name):
Mark quoted file name as absolute.  (Bug#25183)
(tramp--test-windows-nt-and-batch)
(tramp--test-windows-nt-and-pscp-psftp-p): New defuns.
(tramp--test-windows-nt-or-smb-p): Rename from
`tramp--test-smb-windows-nt-p'.  Adapt callees.
(tramp--test-check-files): Improve checks for environment variables.
(tramp-test33-special-characters)
(tramp-test33-special-characters-with-stat)
(tramp-test33-special-characters-with-perl)
(tramp-test33-special-characters-with-ls, tramp-test34-utf8)
(tramp-test34-utf8-with-stat, tramp-test34-utf8-with-perl)
(tramp-test34-utf8-with-ls): Add more checks for skip.

8 years agoFix comments
Eli Zaretskii [Sat, 17 Dec 2016 17:38:36 +0000 (19:38 +0200)]
Fix comments

* src/thread.h (struct thread_state): Fix comments.
* src/process.c (wait_reading_process_output): Fix a typo in
commentary.

8 years agoFix crashes on MS-Windows during dumping
Eli Zaretskii [Sat, 17 Dec 2016 11:08:52 +0000 (13:08 +0200)]
Fix crashes on MS-Windows during dumping

* src/unexw32.c (get_section_info): Make extra_bss_size be the
maximum of extra_bss_size and extra_bss_size_static.  This avoids
computing the size of the output file smaller than it actually
needs to be, which then causes copy_executable_and_dump_data to
write beyond the requested size of the file mapping, thus relying
on the OS roundup to page boundary to save us from ourselves.  See
http://lists.gnu.org/archive/html/emacs-devel/2016-12/msg00642.html
for the details.

* lib/stdio-impl.h: Revert the workaround fix of not including
errno.h for MinGW.

8 years agoBe more selective clearing the image cache
Mark Oteiza [Fri, 16 Dec 2016 15:14:01 +0000 (10:14 -0500)]
Be more selective clearing the image cache

* lisp/image-dired.el (image-dired-create-thumbs):
(image-dired-rotate-thumbnail, image-dired-refresh-thumb): Only clear
the current thumbnail file from the image cache.

8 years agoUnbreak the MinGW build
Eli Zaretskii [Fri, 16 Dec 2016 10:50:06 +0000 (12:50 +0200)]
Unbreak the MinGW build

* lib/stdio-impl.h [__MINGW32__]: Don't include errno.h.  Without
this, temacs crashes while dumping.

8 years agoMake seq-into return the sequence when no conversion needed
Nicolas Petton [Fri, 16 Dec 2016 10:18:04 +0000 (11:18 +0100)]
Make seq-into return the sequence when no conversion needed

* lisp/emacs-lisp/seq.el (seq-into): Do not convert the sequence when
  no conversion is needed.
* test/lisp/emacs-lisp/seq-tests.el (test-seq-into-and-identity): Add
  a regression test checking for identity.

8 years agoNew commands image-scroll-left and image-scroll-right
Mark Oteiza [Fri, 16 Dec 2016 02:59:15 +0000 (21:59 -0500)]
New commands image-scroll-left and image-scroll-right

* etc/NEWS: Mention them.
* lisp/image-mode.el (image-scroll-left, image-scroll-right): New
functions.

8 years agoMore image-dired refactoring
Mark Oteiza [Fri, 16 Dec 2016 01:36:24 +0000 (20:36 -0500)]
More image-dired refactoring

* lisp/image-dired.el (image-dired-thumbnail-mode):
(image-dired-display-image-mode): Add :group 'image-dired so
customize-mode works.
(image-dired-display-image): Rearrange.
(image-dired-copy-with-exif-file-name): This map is for side effect.
(image-dired-dired-edit-comment-and-tags): Just use #'identity.

8 years ago* lisp/image-dired.el: Turn on lexical-binding.
Mark Oteiza [Fri, 16 Dec 2016 00:58:33 +0000 (19:58 -0500)]
* lisp/image-dired.el: Turn on lexical-binding.

8 years agoTeach image-dired to also generate large thumbs
Mark Oteiza [Fri, 16 Dec 2016 00:55:47 +0000 (19:55 -0500)]
Teach image-dired to also generate large thumbs

* lisp/image-dired.el (image-dired-thumbnail-storage): Add
standard-large option.
(image-dired-thumb-size): Add condition for standard-large storage.
(image-dired-insert-thumbnail): Check for new option.  Change
thumbnail path conditionally.
(image-dired-thumb-size): New function.
(image-dired-create-thumb, image-dired-line-up-dynamic): Use it.

8 years agoMerge from gnulib
Paul Eggert [Thu, 15 Dec 2016 20:18:28 +0000 (12:18 -0800)]
Merge from gnulib

This incorporates:
2016-12-14 xalloc-oversized: check for PTRDIFF_MAX too
2016-12-12 fpending: port to native Windows with MSVC
* .gitignore: Do not ignore lib/stdio-impl.h.
* lib/fpending.c, lib/xalloc-oversized.h, m4/fpending.m4:
Copy from gnulib.
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
* lib/stdio-impl.h:
New file, copied from gnulib.
* nt/gnulib.mk (EXTRA_DIST): Add stdio-impl.h.

8 years ago* emacs-document.svg: Append newline.
Paul Eggert [Thu, 15 Dec 2016 20:06:01 +0000 (12:06 -0800)]
* emacs-document.svg: Append newline.

8 years agoDon't abuse princ and spam messages
Mark Oteiza [Thu, 15 Dec 2016 19:40:32 +0000 (14:40 -0500)]
Don't abuse princ and spam messages

* lisp/image-dired.el (image-dired-format-properties-string): Nix princ.
(image-dired-display-thumb-properties):
(image-dired-dired-display-properties): Nix princ.  Bind
message-log-max to nil.

8 years agoInherit things from special-mode and image-mode
Mark Oteiza [Thu, 15 Dec 2016 18:49:38 +0000 (13:49 -0500)]
Inherit things from special-mode and image-mode

* lisp/image-dired.el: Require image-mode library.
(image-dired-thumbnail-mode-map): Remove superfluous binding.
(image-dired-display-image-mode-map): Remove superfluous binding.
Add movement remaps from image-mode-map.
(image-dired-thumbnail-mode): Derive from special-mode.
(image-dired-display-image-mode): Derive from special-mode. Call
image-mode-setup-winprops.

8 years agoFix some image-dired customization types
Mark Oteiza [Thu, 15 Dec 2016 18:25:08 +0000 (13:25 -0500)]
Fix some image-dired customization types

* lisp/image-dired.el (image-dired): Add info link to defgroup.
(image-dired-dir, image-dired-gallery-dir): Set type to directory.
(image-dired-db-file, image-dired-temp-image-file):
(image-dired-cmd-create-thumbnail-program):
(image-dired-cmd-create-temp-image-program):
(image-dired-cmd-rotate-thumbnail-program):
(image-dired-cmd-rotate-original-program):
(image-dired-temp-rotate-image-file):
(image-dired-cmd-write-exif-data-program):
(image-dired-cmd-read-exif-data-program): Set type to file.
(image-dired-create-thumb, image-dired-line-up-dynamic): Check storage
type at runtime, since setting image-dired-thumb-size does not
automatically set image-dired-thumb-width and image-dired-thumb-height.

8 years agoPrevent crashes in xg_select due to concurrency
Eli Zaretskii [Thu, 15 Dec 2016 16:18:59 +0000 (18:18 +0200)]
Prevent crashes in xg_select due to concurrency

* src/xgselect.c (xg_select): Don't call Glib functions that use
'context' if we failed to acquire it.  This means some other
thread owns the context, in which case both using the context and
calling block_input/unblock_input will step on that thread's toes
and eventually lead to crashes.  (Bug#25172)

8 years agoFix circular list handling in seq-mapn
Nicolas Petton [Thu, 15 Dec 2016 09:24:57 +0000 (10:24 +0100)]
Fix circular list handling in seq-mapn

* lisp/emacs-lisp/seq.el (seq-mapn): Do not copy list arguments.
* test/lisp/emacs-lisp/seq-tests.el (test-seq-mapn-circular-lists):
  Add a regression test.

8 years agoCheck in tramp-tests.el, that environment variables are set correctly
Michael Albinus [Thu, 15 Dec 2016 08:37:35 +0000 (09:37 +0100)]
Check in tramp-tests.el, that environment variables are set correctly

* test/lisp/net/tramp-tests.el (tramp--test-check-files):
Check also, that environment variables are set correctly.

8 years agoProtect environment variables with double quotes in Tramp
Dominique Quatravaux [Thu, 15 Dec 2016 08:37:00 +0000 (09:37 +0100)]
Protect environment variables with double quotes in Tramp

* lisp/net/tramp-sh.el (tramp-open-connection-setup-interactive-shell):
Protect environment variables with double quotes.

Copyright-paperwork-exempt: yes

8 years ago* lisp/ibuf-macs.el (define-ibuffer-filter): Wrap ,@body in a progn.
Tino Calancha [Thu, 15 Dec 2016 06:02:32 +0000 (15:02 +0900)]
* lisp/ibuf-macs.el (define-ibuffer-filter): Wrap ,@body in a progn.

8 years ago* lisp/image-dired.el (image-dired-create-thumb): Create parent directories.
Mark Oteiza [Thu, 15 Dec 2016 01:36:06 +0000 (20:36 -0500)]
* lisp/image-dired.el (image-dired-create-thumb): Create parent directories.

8 years ago* lisp/image-mode.el (image-mode-winprops-alist): Add docstring.
Mark Oteiza [Wed, 14 Dec 2016 21:36:31 +0000 (16:36 -0500)]
* lisp/image-mode.el (image-mode-winprops-alist): Add docstring.

8 years agoRecognize pngnq or pngnq-s9
Mark Oteiza [Wed, 14 Dec 2016 21:34:12 +0000 (16:34 -0500)]
Recognize pngnq or pngnq-s9

* lisp/image-dired.el (image-dired-cmd-pngnq-program): Also consider
pngnq-s9 as a possible executable.

8 years agoUpdate standard image-dired thumbnail location
Mark Oteiza [Wed, 14 Dec 2016 19:34:21 +0000 (14:34 -0500)]
Update standard image-dired thumbnail location

* lisp/image-dired.el (image-dired-thumb-name): Conform to the latest
standard: consider XDG_CACHE_HOME, falling back on ~/.cache.

8 years agoReset window scroll when displaying an image
Mark Oteiza [Wed, 14 Dec 2016 17:25:04 +0000 (12:25 -0500)]
Reset window scroll when displaying an image

When viewing a large image full size and scrolling, for instance, to
the lower right corner, then selecting a much smaller image in the
thumbnail buffer, the window stays scrolled so the new image is out of
the window.  One must scroll back to the "origin" to view the new
displayed image, or just kill the image-dired-display-image buffer and
try again.  This fixes the issue.
* lisp/image-dired.el (image-dired-display-window-width):
(image-dired-display-window-height): Operate on a window as argument.
(image-dired-display-image): Bind (image-dired-display-window) and use
it. Set window vscroll and hscroll to zero when refreshing the
buffer's contents.

8 years agoMore image-dired polish
Mark Oteiza [Wed, 14 Dec 2016 03:56:42 +0000 (22:56 -0500)]
More image-dired polish

* lisp/image-dired.el (image-dired-file-name-at-point): New function.
(image-dired-thumbnail-mode, image-dired-display-image-mode): Disable
undo list. Add image-dired-file-name-at-point to
file-name-at-point-functions to facilitate find-file and friends.
(image-dired-thumbnail-display-external):
(image-dired-dired-display-external): Use start-process instead, to
avoid needlessly blocking and using a shell.

8 years agoReplace ldefs-boot with a much smaller file
Phillip Lord [Thu, 27 Oct 2016 07:07:05 +0000 (08:07 +0100)]
Replace ldefs-boot with a much smaller file

 * Makefile.in (bootstrap-build,generate-ldefs-boot): New targets.
   (bootstrap): Depend on bootstrap-build.
 * admin/ldefs-clean.el: New file.
 * lisp/Makefile.in (compile-first): Depend on loaddefs.el
 * lisp/ldefs-boot.el: Remove.
 * lisp/ldefs-boot-auto.el: New file.
 * lisp/ldefs-boot-manual.el: New file.
 * lisp/loadup.el: Load ldefs-boot-manual.el.
 * src/emacs.c (generating_ldefs_boot): New variable.
   (main): Check whether we are generating ldefs.
 * src/eval.c (autoload-do-load): Dump autoload forms to stderr when
   requested.
 * src/lisp.h (generating_ldefs_boot): New variable.
 * admin/gitmerge.el, admin/make-tarball.txt, admin/notes/copyright,
   lisp/Makefile.in, lisp/cus-dep.el, lisp/emacs-lisp/elint.el,
   lisp/finder.el, lisp/loadup.el, msdos/mainmake.v2: Update reference to
   ldefs-boot.
 * admin/update_autogen: Alter mechanism for ldefs-boot generation.

8 years agoRemove support for aspell < 0.60 (from 2004)
Reuben Thomas [Tue, 13 Dec 2016 00:43:21 +0000 (00:43 +0000)]
Remove support for aspell < 0.60 (from 2004)

lisp/textmodes/ispell.el (ispell-check-version): Require Aspell 0.60.
(ispell-aspell-dictionary-alist): Remove check that we have Aspell 0.60.

8 years agoMinor docstring and comment fixes to ispell.el
Reuben Thomas [Tue, 13 Dec 2016 00:30:51 +0000 (00:30 +0000)]
Minor docstring and comment fixes to ispell.el

lisp/textmodes/ispell.el (ispell-aspell-dictionary-alist): Mention
ispell-aspell-dictionary-alist, not ispell-dictionary-alist.
(ispell-set-spellchecker-params): Change double-single quotes to
single single quotes in comment.

8 years agoRemove unused variable
Reuben Thomas [Mon, 5 Dec 2016 21:11:52 +0000 (21:11 +0000)]
Remove unused variable

* lisp/textmodes/ispell.el (current-ispell-directory): Remove.

8 years agoRemove XEmacs-specific ispell-with-no-warnings
Reuben Thomas [Sun, 4 Dec 2016 22:01:56 +0000 (22:01 +0000)]
Remove XEmacs-specific ispell-with-no-warnings

* lisp/textmodes/ispell.el (ispell-with-no-warnings): Remove this
defmacro, needed only for XEmacs.
(ispell-command-loop, ispell-message): Use with-no-warnings directly.

8 years agoRemove meaningless defconst ispell-version
Reuben Thomas [Sun, 4 Dec 2016 21:58:00 +0000 (21:58 +0000)]
Remove meaningless defconst ispell-version

* lisp/textmodes/ispell.el (ispell-version): Since ispell.el is now
firmly part of Emacs, and the version hasn’t changed since 2003, and
isn’t used anywhere, remove it.  3rd-party code can better use the
Emacs version, or feature or function checks.
(ispell-check-version): No longer report ispell.el version.

8 years agoRemove boundp test for always-bound symbol
Reuben Thomas [Sun, 4 Dec 2016 21:55:19 +0000 (21:55 +0000)]
Remove boundp test for always-bound symbol

* lisp/textmodes/ispell.el (ispell-message): mail-yank-prefix is
defvar’d at the top of the file, so remove a test to see if it is
bound.

8 years agoRemove support for ispell < 3.1.12
Reuben Thomas [Sun, 4 Dec 2016 21:50:18 +0000 (21:50 +0000)]
Remove support for ispell < 3.1.12

* lisp/textmodes/ispell.el (ispell-offset): Remove.
(ispell-check-version): Require ispell >= 3.1.12, released in 1994.
(ispell-process-line): No longer use ispell-offset.

8 years agoRemove unused constant
Reuben Thomas [Sun, 4 Dec 2016 21:47:02 +0000 (21:47 +0000)]
Remove unused constant

* lisp/textmodes/ispell.el (ispell-required-version): Remove.

8 years agoRemove support for old versions of supercite and GNUS from ispell.el
Reuben Thomas [Sun, 4 Dec 2016 19:20:19 +0000 (19:20 +0000)]
Remove support for old versions of supercite and GNUS from ispell.el

* lisp/textmodes/ispell.el (ispell-message): Require supercite >= 3.0
and GNUS >= 5.  Not exactly the bleeding edge!

8 years agoRemove remaining mentions of XEmacs from ispell.el
Reuben Thomas [Sun, 4 Dec 2016 14:39:42 +0000 (14:39 +0000)]
Remove remaining mentions of XEmacs from ispell.el

* lisp/textmodes/ispell.el (ispell-valid-dictionary-list):
(ispell-add-per-file-word-list): Remove mentions of XEmacs from
comments.

8 years agoRemove XEmacs-specific minibuffer handling code from ispell.el
Reuben Thomas [Sun, 4 Dec 2016 14:38:51 +0000 (14:38 +0000)]
Remove XEmacs-specific minibuffer handling code from ispell.el

* lisp/textmodes/ispell.el (ispell-init-process): Assume we are not in
XEmacs.

8 years agoRemove XEmacs-specific horizontal scrollbar handling in ispell.el
Reuben Thomas [Sun, 4 Dec 2016 14:37:37 +0000 (14:37 +0000)]
Remove XEmacs-specific horizontal scrollbar handling in ispell.el

* lisp/textmodes/ispell.el (ispell-command-loop): Remove
XEmacs-specific code.

8 years agoRemove XEmacs-specific code dealing with enable-multibyte-characters
Reuben Thomas [Sun, 4 Dec 2016 14:35:42 +0000 (14:35 +0000)]
Remove XEmacs-specific code dealing with enable-multibyte-characters

* lisp/textmodes/ispell.el (ispell-decode-string):
(ispell-init-process):  Remove XEmacs-specific guard.

8 years agoRemove XEmacs-specific code from ispell.el
Reuben Thomas [Sun, 4 Dec 2016 14:19:26 +0000 (14:19 +0000)]
Remove XEmacs-specific code from ispell.el

* lisp/textmodes/ispell.el (ispell-menu-xemacs): Remove
(ispell-menu-map-needed): Remove XEmacs-specific check.
(ispell-word): Remove XEmacs-specific extent code.
(ispell-init-process): Remove XEmacs workaround for local add-hook.
Assume we have set-process-query-on-exit-flag.
(ispell-kill-ispell, ispell-change-dictionary): Remove XEmacs
workaround for called-interactively-p.

8 years agoRemove some commented-out code
Reuben Thomas [Sun, 4 Dec 2016 14:15:50 +0000 (14:15 +0000)]
Remove some commented-out code

lisp/textmodes/ispell.el (ispell-process)
ispell-valid-dictionary-list): Remove commented-out code.

8 years agoRemove XEmacs and old Emacs highlighting code
Reuben Thomas [Sun, 4 Dec 2016 14:05:07 +0000 (14:05 +0000)]
Remove XEmacs and old Emacs highlighting code

* lisp/textmodes/ispell.el
(ispell-highlight-spelling-error-xemacs): Remove.
(ispell-highlight-spelling-error): Assume display-color-p exists.

8 years agoAssume Emacs supports [:alpha:] in regexps
Reuben Thomas [Sun, 4 Dec 2016 14:02:48 +0000 (14:02 +0000)]
Assume Emacs supports [:alpha:] in regexps

* lisp/textmodes/ispell.el (ispell-emacs-alpha-regexp): Remove.
(ispell-set-spellchecker-params): Remove tests of
ispell-emacs-alpha-regexp.

8 years agoRemove some XEmacs-specific code from ispell.el
Reuben Thomas [Sun, 4 Dec 2016 13:59:59 +0000 (13:59 +0000)]
Remove some XEmacs-specific code from ispell.el

* lisp/textmodes/ispell.el: Remove XEmacs menubar setup.
(ispell-int-char): Remove.

8 years agoGeneralise over-specific documentation
Reuben Thomas [Sun, 4 Dec 2016 13:55:31 +0000 (13:55 +0000)]
Generalise over-specific documentation

* lisp/textmodes/ispell.el (ispell-personal-dictionary): Rather than
document precise personal wordlist filenames for only two supported
spelling checkers, simply say that the default personal dictionary
depends on the chosen spelling checker.  The user can check the
spelling checker’s documentation if necessary.  This is simpler, and
works for other supported (and future, or unknown) spelling checkers.

8 years agoRemove tests for built-in functions
Reuben Thomas [Sun, 4 Dec 2016 13:52:04 +0000 (13:52 +0000)]
Remove tests for built-in functions

* lisp/textmodes/ispell.el (buffer-substring-no-properties): Remove
back-up definition.
(ispell-add-per-file-word-list): Remove tests for comment-padright and
comment-normalize-vars.

8 years agoRemove unused ispell-looking-back
Reuben Thomas [Sun, 4 Dec 2016 01:06:26 +0000 (01:06 +0000)]
Remove unused ispell-looking-back

* lisp/textmodes/ispell.el (ispell-looking-back): Remove unused alias.

8 years agoAssume we have version<= for checking ispell version
Reuben Thomas [Sun, 4 Dec 2016 00:54:04 +0000 (00:54 +0000)]
Assume we have version<= for checking ispell version

* lisp/textmodes/ispell.el (ispell-check-minver): Remove.
(ispell-check-version): Use version<= directly.

8 years agoRemove ispell.el pre-GNU Emacs comments
Reuben Thomas [Sun, 4 Dec 2016 00:49:35 +0000 (00:49 +0000)]
Remove ispell.el pre-GNU Emacs comments

* lisp/textmodes/ispell.el (Commentary): Remove original maintainer
  details, as Emacs version, bug report address and so forth should be
  used instead for this version.  Remove in-line change history; use
  git instead.

8 years agoMore small fixes for image-dired
Mark Oteiza [Tue, 13 Dec 2016 16:47:21 +0000 (11:47 -0500)]
More small fixes for image-dired

* lisp/image-dired.el: Fix commentary to refer to correct Emacs manual
node.
(image-dired--with-db-file): Add declare forms.
(image-dired-hidden-p): Rewrite with cl-loop.  It's not necessary to
run through the whole list.

8 years agoRemove image-dired-kill-buffer-and-window
Mark Oteiza [Tue, 13 Dec 2016 16:41:45 +0000 (11:41 -0500)]
Remove image-dired-kill-buffer-and-window

This breaks window layout, especially when quitting a
image-dired-display-image-mode buffer.
* lisp/image-dired.el (image-dired-thumbnail-mode-map):
(image-dired-display-image-mode-map): Replace in keymap and menu items
bindings to image-dired-kill-buffer-and-window with quit-window.
(image-dired-kill-buffer-and-window): Remove.

8 years agoReplace image-dired-setup-dired-keybindings with a minor mode
Mark Oteiza [Tue, 13 Dec 2016 16:32:04 +0000 (11:32 -0500)]
Replace image-dired-setup-dired-keybindings with a minor mode

* lisp/image-dired.el (image-dired-thumbnail-mode): Fix docstring to
remove mention of nonexistent image-dired-dired and to refer to the
new minor mode.
(image-dired-minor-mode-map): New keymap assimilated from
image-dired-setup-dired-keybindings.  In the future, the keymap parent
should be removed, and perhaps also the duplicate bindings that
already exist in dired-mode-map.
(image-dired-setup-dired-keybindings): Remove.  Replace with an
obsolete function alias.
(image-dired-minor-mode): New minor mode, assuming the role of
image-dired-setup-dired-keybindings.

8 years ago* test/src/regex-resources/PTESTS: Convert to UTF-8.
Paul Eggert [Tue, 13 Dec 2016 07:16:42 +0000 (23:16 -0800)]
* test/src/regex-resources/PTESTS: Convert to UTF-8.

8 years agoClarify thread-signal semantics
Noam Postavsky [Tue, 13 Dec 2016 02:21:14 +0000 (21:21 -0500)]
Clarify thread-signal semantics

* doc/lispref/threads.texi (Basic Thread Functions): Explain that the
thread will be signaled as soon as possible.

8 years agoClean up var watcher disabling on thread switching
Noam Postavsky [Sun, 11 Dec 2016 18:08:15 +0000 (13:08 -0500)]
Clean up var watcher disabling on thread switching

* src/data.c (Fset_default): Move code into new C level function,
`set_default_internal'.
(set_default_internal): New function, like `Fset_default' but also takes
additional bindflag parameter.
(set_internal): Only call `notify_variable_watchers' if bindflag is not
SET_INTERNAL_THREAD_SWITCH.
* src/eval.c (do_specbind, do_one_unbind): Add bindflag parameter,
passed on to set_internal and set_default_internal.  Adjust callers.
(rebind_for_thread_switch, unbind_for_thread_switch): Pass
SET_INTERNAL_THREAD_SWITCH to do_specbind, do_one_unbind instead of
temporarily adjusting symbol's trapped_write field.

8 years agoMinor fix for define-derived-mode
Glenn Morris [Tue, 13 Dec 2016 01:03:20 +0000 (20:03 -0500)]
Minor fix for define-derived-mode

* lisp/emacs-lisp/derived.el (define-derived-mode):
Do not let eg eval-defun reset the values of syntax or abbrev tables,
since they might have been defined externally.  (Bug#16160)

8 years ago* build-aux/git-hooks/pre-commit: Add whitespace comment.
Paul Eggert [Mon, 12 Dec 2016 22:54:30 +0000 (14:54 -0800)]
* build-aux/git-hooks/pre-commit: Add whitespace comment.

8 years agoMove backtrace to ELisp using a new mapbacktrace primitive
Clément Pit--Claudel [Mon, 5 Dec 2016 05:52:14 +0000 (00:52 -0500)]
Move backtrace to ELisp using a new mapbacktrace primitive

* src/eval.c (get_backtrace_starting_at, backtrace_frame_apply)
(Fmapbacktrace, Fbacktrace_frame_internal): New functions.
(get_backtrace_frame, Fbacktrace_debug): Use `get_backtrace_starting_at'.

* lisp/subr.el (backtrace--print-frame): New function.
(backtrace): Reimplement using `backtrace--print-frame' and `mapbacktrace'.
(backtrace-frame): Reimplement using `backtrace-frame--internal'.

* lisp/emacs-lisp/debug.el (debugger-setup-buffer): Pass a base to
`mapbacktrace' instead of searching for "(debug" in the output of
`backtrace'.

* test/lisp/subr-tests.el (subr-test-backtrace-simple-tests)
(subr-test-backtrace-integration-test): New tests.

* doc/lispref/debugging.texi (Internals of Debugger): Document
`mapbacktrace' and missing argument BASE of `backtrace-frame'.

8 years agoUse C99 syntax for font drivers
Paul Eggert [Mon, 12 Dec 2016 22:27:35 +0000 (14:27 -0800)]
Use C99 syntax for font drivers

Problem reported by Daniel Colascione in:
http://lists.gnu.org/archive/html/emacs-devel/2016-12/msg00515.html
* src/ftcrfont.c (ftcrfont_driver):
* src/ftfont.c (ftfont_driver):
* src/ftxfont.c (ftxfont_driver):
* src/macfont.m (macfont_driver):
* src/nsfont.m (nsfont_driver):
* src/xfont.c (xfont_driver):
* src/xftfont.c (xftfont_driver):
Use C99 syntax, not the old GNU C syntax.

8 years agoObsolete gs.el
Glenn Morris [Mon, 12 Dec 2016 22:17:34 +0000 (17:17 -0500)]
Obsolete gs.el

* lisp/gs.el: Move to lisp/obsolete.  (Bug#1524)
* doc/lispref/display.texi (Image Formats): Remove postscript.
(PostScript Images): Remove section.
* doc/lispref/elisp.texi: Update menu.

8 years agoUn-revert recent Ffset change
Glenn Morris [Mon, 12 Dec 2016 20:21:48 +0000 (15:21 -0500)]
Un-revert recent Ffset change

* src/data.c (Ffset): Reinstate the check for "nil".

8 years agoMinor advice.el fix
Glenn Morris [Mon, 12 Dec 2016 20:20:39 +0000 (15:20 -0500)]
Minor advice.el fix

* lisp/emacs-lisp/advice.el (ad-preactivate-advice):
Avoid setting the function definition of nil.
This was happening during bootstrap of org-compat.el,
apparently due to eager macro expansion of code behind
a (featurep 'xemacs) test.

8 years agoMake etags-tests work in out-of-tree builds
Eli Zaretskii [Mon, 12 Dec 2016 17:56:03 +0000 (19:56 +0200)]
Make etags-tests work in out-of-tree builds

* test/lisp/progmodes/etags-tests.el (etags-bug-158)
(etags-bug-23164): Make them work in an out-of-tree build.
Reported by Ken Brown <kbrown@cornell.edu>.

8 years agoAvoid crashing if a new thread is signaled right away
Eli Zaretskii [Mon, 12 Dec 2016 17:08:21 +0000 (19:08 +0200)]
Avoid crashing if a new thread is signaled right away

* src/thread.c (post_acquire_global_lock): Don't raise the pending
signal if the thread's handlers were not yet set up, as that will
cause Emacs to exit with a fatal error.  This can happen if a
thread is signaled as soon as make-thread returns, before the new
thread had an opportunity to acquire the global lock, set up the
handlers, and call the thread function.

* test/src/thread-tests.el (thread-signal-early): New test.

8 years agoFix point motion in cloned buffers
Eli Zaretskii [Mon, 12 Dec 2016 16:03:40 +0000 (18:03 +0200)]
Fix point motion in cloned buffers

* src/thread.c (post_acquire_global_lock): Call
set_buffer_internal_2 instead of tricking set_buffer_internal_1
into resetting the current buffer even if it didn't change.  This
avoids bug#25165, caused by failing to record the modified values
of point and mark, because current_buffer was set to NULL.  Also,
don't bother re-setting the buffer if there was no thread switch,
as that just wastes cycles.
* src/buffer.c (set_buffer_internal_2): New function, with most of
the body of set_buffer_internal_1, but without the test for B
being identical to the current buffer.
(set_buffer_internal_1): Call set_buffer_internal_2 if B is not
identical to the current buffer.
* src/buffer.h (set_buffer_internal_2): Add prototype.

* test/src/thread-tests.el (thread-sticky-point): New test.

8 years agoFurther improvements in Tramp's file name unquoting
Michael Albinus [Mon, 12 Dec 2016 10:12:34 +0000 (11:12 +0100)]
Further improvements in Tramp's file name unquoting

* lisp/net/tramp-adb.el (tramp-adb-handle-file-local-copy)
(tramp-adb-handle-write-region): Unquote localname.
(tramp-adb-handle-copy-file): Implement direct copy on remote device.
(tramp-adb-handle-rename-file): Quote arguments, add "-f" to force.

* lisp/net/tramp.el (tramp-file-name-unquote-localname): New defun.
(tramp-handle-file-name-case-insensitive-p):
* lisp/net/tramp-gvfs.el (tramp-gvfs-get-file-attributes)
(tramp-gvfs-connection-mounted-p, tramp-gvfs-mount-spec)
(tramp-gvfs-maybe-open-connection):
* lisp/net/tramp-sh.el (tramp-make-copy-program-file-name):
* lisp/net/tramp-smb.el (tramp-smb-get-share)
(tramp-smb-get-localname): Use it.

* test/lisp/net/tramp-tests.el (tramp--test-docker-p): New defun.
(tramp--test-special-characters, tramp-test34-utf8)
(tramp-test34-utf8-with-stat, tramp-test34-utf8-with-perl)
(tramp-test34-utf8-with-ls): Use it.

8 years agoStrengthen conditions for resizing sibling windows (Bug#25169)
Martin Rudalics [Mon, 12 Dec 2016 09:16:23 +0000 (10:16 +0100)]
Strengthen conditions for resizing sibling windows (Bug#25169)

* lisp/window.el (window-resize, delete-window): Resize other siblings
only if `window-combination-resize' equals t (Bug#25169).

8 years agoQuote filenames containing '~' in prompts
Noam Postavsky [Fri, 28 Oct 2016 02:17:11 +0000 (22:17 -0400)]
Quote filenames containing '~' in prompts

When in a directory named '~', the default value given by
`read-file-name' should be quoted by prepending '/:', in order to
prevent it from being interpreted as referring to the $HOME
directory (Bug#16984).

* lisp/minibuffer.el (minibuffer-maybe-quote-filename): New function.
(completion--sifn-requote, read-file-name-default): Use it instead of
`minibuffer--double-dollars'.
* test/lisp/files-tests.el (files-test-read-file-in-~): Test it.

8 years agoUndo part of last change
Eli Zaretskii [Sun, 11 Dec 2016 17:19:10 +0000 (19:19 +0200)]
Undo part of last change

* src/thread.h:
* src/keyboard.c:
* src/keyboard.h: Undo part of last change:
input_available_clear_time is again a global variable.

8 years agoAvoid aborts when a thread signals an error
Eli Zaretskii [Sun, 11 Dec 2016 15:59:55 +0000 (17:59 +0200)]
Avoid aborts when a thread signals an error

* src/thread.h (struct thread_state): Add members
m_waiting_for_input and m_input_available_clear_time.
(waiting_for_input, input_available_clear_time): New macros.
* src/keyboard.c (waiting_for_input, input_available_clear_time):
Remove; they are now macros that reference the current thread.
(Bug#25171)
* src/w32select.c: Don't include keyboard.h.

* test/src/thread-tests.el (thread-errors): New test.

8 years agoClean up compile-tests.el
Philipp Stephani [Sat, 10 Dec 2016 20:36:15 +0000 (21:36 +0100)]
Clean up compile-tests.el

Switch to lexical binding.  Make checkdoc happy.

* test/lisp/progmodes/compile-tests.el (compile--test-error-line)
(compile-test-error-regexps): Instead of checking a single Boolean
value, use `should' for each attribute of the message to be compared.
(compile-tests--test-regexps-data): Document sixth list element
TYPE.

8 years ago; Change maintainer comment
Glenn Morris [Sun, 11 Dec 2016 03:40:34 +0000 (19:40 -0800)]
; Change maintainer comment
Ref http://debbugs.gnu.org/10934#23

8 years agoImprove previous cperl-mode change
Glenn Morris [Sun, 11 Dec 2016 03:37:59 +0000 (19:37 -0800)]
Improve previous cperl-mode change

* lisp/progmodes/cperl-mode.el (cperl-mode-abbrev-table):
Improve previous change.

8 years agoMark default cperl abbrevs as system ones
Glenn Morris [Sun, 11 Dec 2016 03:26:25 +0000 (19:26 -0800)]
Mark default cperl abbrevs as system ones

* lisp/progmodes/cperl-mode.el (cperl-mode):
Mark our abbrevs as system ones.  (Bug#10934)

8 years agoRevert earlier Ffset change
Glenn Morris [Sun, 11 Dec 2016 03:18:24 +0000 (19:18 -0800)]
Revert earlier Ffset change

* src/data.c (Ffset): Allow nil again, since it caused
eager macro-expansion failures.

8 years agoTweaks for message bogus address detection
Glenn Morris [Sun, 11 Dec 2016 03:03:28 +0000 (19:03 -0800)]
Tweaks for message bogus address detection

* lisp/gnus/message.el (message-bogus-recipient-p):
Do not require "@", since some mailers deliver to local addresses
without one.  (Bug#23054)
Move "@.*@" from here...
(message-bogus-addresses): ...to here, so it can be customized.

8 years agoDo not allow nil to be defined as a function
Glenn Morris [Sun, 11 Dec 2016 02:58:24 +0000 (18:58 -0800)]
Do not allow nil to be defined as a function

* lisp/emacs-lisp/byte-run.el (defun):
* src/data.c (Ffset): Do not allow "nil".  (Bug#25110)

8 years agoAdd some sanity checking of defun arglist
Nicolas Richard [Sun, 11 Dec 2016 01:48:10 +0000 (17:48 -0800)]
Add some sanity checking of defun arglist

* lisp/emacs-lisp/byte-run.el (defun):
Check for malformed argument lists.  (Bug#15715)

8 years agoMinor shell-mode fix for zsh
Matt Armstrong [Sun, 11 Dec 2016 01:29:51 +0000 (17:29 -0800)]
Minor shell-mode fix for zsh

* lisp/shell.el (shell-mode): Prevent shell-dirstack-query
becoming confused by zsh abbreviations.  (Bug#24632)

Copyright-paperwork-exempt: yes

8 years ago* Makefile.in (install-etc): Don't prepend $(DESTDIR) to commands in
Andreas Schwab [Sat, 10 Dec 2016 20:13:06 +0000 (21:13 +0100)]
* Makefile.in (install-etc): Don't prepend $(DESTDIR) to commands in
system unit file.

8 years ago; Fix copyright years in new files
Glenn Morris [Sat, 10 Dec 2016 18:19:06 +0000 (10:19 -0800)]
; Fix copyright years in new files

8 years ago; Update file name in comment
Philipp Stephani [Sat, 10 Dec 2016 17:23:15 +0000 (18:23 +0100)]
; Update file name in comment

8 years agoSupport concurrency in Emacs Lisp
Eli Zaretskii [Sat, 10 Dec 2016 16:54:43 +0000 (18:54 +0200)]
Support concurrency in Emacs Lisp

Merge branch 'test-concurrency'

* src/thread.c:
* src/thread.h:
* src/systhread.c:
* src/systhread.h: New files.
* src/xgselect.c (xg_select): Avoid using SAFE_NALLOCA and use
xnmalloc unconditionally.
* src/window.c (struct save_window_data): Rename current_buffer to
f_current_buffer.
* src/w32proc.c (sys_select): Change the function signature to
closer fit 'pselect' on Posix hosts.
* src/search.c:
* src/regex.h: Convert some globals to macros that reference
thread-specific values.
* src/process.c (pset_thread, add_non_keyboard_read_fd)
(add_process_read_fd, add_non_blocking_write_fd)
(recompute_input_desc, compute_input_wait_mask)
(compute_non_process_wait_mask, compute_non_keyboard_wait_mask)
(compute_write_mask, clear_waiting_thread_info)
(update_processes_for_thread_death, Fset_process_thread)
(Fprocess_thread): New functions.
(enum fd_bits): New enumeration.
(fd_callback_data): Add 'thread' and 'waiting_thread', rename
'condition' to 'flags'.
(set_process_filter_masks, create_process, create_pty)
(Fmake_serial_process, finish_after_tls_connection)
(connect_network_socket, deactivate_process)
(server_accept_connection, wait_reading_process_output)
(Fcontinue_process, Fstop_process, keyboard_bit_set)
(add_timer_wait_descriptor, add_keyboard_wait_descriptor)
(delete_keyboard_wait_descriptor): Use the new functions instead
of manipulating fd flags and masks directly.
(syms_of_process): Defsubr the new primitives.
* src/print.c (print_object): Print threads, mutexes, and
conditional variables.
* src/lisp.h (enum pvec_type): New values PVEC_THREAD, PVEC_MUTEX,
and PVEC_CONDVAR.
(XTHREAD, XMUTEX, XCONDVAR, THREADP, MUTEXP, CONDVARP)
(CHECK_THREAD, CHECK_MUTEX, CHECK_CONDVAR): New inline functions.
(XSETTHREAD, XSETMUTEX, XSETCONDVAR): New macros.
(struct handler): Add back byte_stack.  Rename lisp_eval_depth to
f_lisp_eval_depth.
* src/eval.c (specpdl_kind, specpdl_arg, do_specbind)
(rebind_for_thread_switch, do_one_unbind)
(unbind_for_thread_switch): New functions.
(init_eval): 'handlerlist' is not malloc'ed.
(specbind): Call do_specbind.
(unbind_to): Call do_one_unbind.
(mark_specpdl): Accept 2 arguments.
(mark_specpdl): Mark the saved value in a let-binding.
* src/emacs.c (main): Call init_threads_once, init_threads, and
syms_of_threads.
* src/data.c (Ftype_of): Support thread, mutex, and condvar
objects.
(Fthreadp, Fmutexp, Fcondition_variable_p): New functions.
(syms_of_data): DEFSYM and defsubr new symbols and primitives.
* src/bytecode.c (struct byte_stack, FETCH, CHECK_RANGE)
(BYTE_CODE_QUIT): Add back.
(exec_byte_code): Add back byte stack manipulation.
* src/alloc.c (cleanup_vector): Handle threads, mutexes, and
conditional variables.
(mark_stack): Now extern; accept additional argument 'bottom'.
(flush_stack_call_func): New function.
(garbage_collect_1): Call mark_threads and unmark_threads.  Don't
mark handlers.
* src/.gdbinit (xbytecode): Add back.

* test/src/thread-tests.el: New tests.
* test/src/data-tests.el (binding-test-manual)
(binding-test-setq-default, binding-test-makunbound)
(binding-test-defvar-bool, binding-test-defvar-int)
(binding-test-set-constant-t, binding-test-set-constant-nil)
(binding-test-set-constant-keyword)
(binding-test-set-constant-nil): New tests.

* doc/lispref/processes.texi (Processes and Threads): New
subsection.
* doc/lispref/threads.texi: New file
* doc/lispref/elisp.texi (Top): Include it.
* doc/lispref/objects.texi (Thread Type, Mutex Type)
(Condition Variable Type): New subsections.
(Type Predicates): Add thread-related predicates.
* doc/lispref/objects.texi (Editing Types):
* doc/lispref/elisp.texi (Top): Update higher-level menus.

* etc/NEWS: Mention concurrency features.

8 years agoFix error messages in thread.c
Eli Zaretskii [Sat, 10 Dec 2016 09:42:48 +0000 (11:42 +0200)]
Fix error messages in thread.c

* src/thread.c (lisp_mutex_unlock, Fcondition_wait)
(Fcondition_notify, Fthread_join): Fix error messages.

8 years agoImprove doc strings in thread.c
Eli Zaretskii [Sat, 10 Dec 2016 09:31:11 +0000 (11:31 +0200)]
Improve doc strings in thread.c

* src/thread.c (Fmake_condition_variable, Fcondition_wait)
(Fcondition_notify, Fcondition_mutex, Fcondition_name, Fmake_thread)
(Fthread_join, Fall_threads): Doc fixes.

8 years agoFix building with check-lisp-object-type
Eli Zaretskii [Sat, 10 Dec 2016 09:06:23 +0000 (11:06 +0200)]
Fix building with check-lisp-object-type

* src/thread.c (mark_one_thread): Use NILP to compare with
m_saved_last_thing_searched, which is a Lisp object.  Reported by
Andreas Politz <politza@hochschule-trier.de>.

8 years agoDocumentation and commentary improvements
Eli Zaretskii [Sat, 10 Dec 2016 08:49:39 +0000 (10:49 +0200)]
Documentation and commentary improvements

* src/lisp.h:
* src/regex.c:
* src/xgselect.c (xg_select): Improve commentary and formatting.

* doc/lispref/objects.texi (Thread Type, Mutex Type)
(Condition Variable Type): New subsections.
(Type Predicates): Add thread-related predicates.
* doc/lispref/objects.texi (Editing Types):
* doc/lispref/elisp.texi (Top): Update higher-level menus.

8 years agoFix further problems with quoted file names in Tramp
Michael Albinus [Fri, 9 Dec 2016 18:54:20 +0000 (19:54 +0100)]
Fix further problems with quoted file names in Tramp

* lisp/net/tramp.el (tramp-quoted-name-p, tramp-quote-name)
(tramp-unquote-name): Move defsubst ...
* lisp/net/tramp-compat.el (tramp-compat-file-name-quoted-p)
(tramp-compat-file-name-quote)
(tramp-compat-file-name-unquote): ... here. Adapt callees.

* lisp/net/tramp-cache.el (tramp-flush-file-property)
(tramp-flush-directory-property):
* lisp/net/tramp-gvfs.el (tramp-gvfs-url-file-name):
* lisp/net/tramp-sh.el (tramp-make-copy-program-file-name):
* lisp/net/tramp-smb.el (tramp-smb-handle-copy-file)
(tramp-smb-handle-substitute-in-file-name)
(tramp-smb-get-share, tramp-smb-get-localname): Handle quoted files.

8 years ago*src/sysdep.c: Fix a comment.
Eli Zaretskii [Fri, 9 Dec 2016 17:04:36 +0000 (19:04 +0200)]
*src/sysdep.c: Fix a comment.

8 years agoFix compilation error on Fedora 24
Eli Zaretskii [Fri, 9 Dec 2016 16:51:59 +0000 (18:51 +0200)]
Fix compilation error on Fedora 24

* src/sysdep.c [HAVE_H_ERRNO]: Remove declaration of h_errno.
Reported by Paul Eggert <eggert@cs.ucla.edu>.

8 years agoFix compilation warnings due to prototype of thread_select
Eli Zaretskii [Fri, 9 Dec 2016 16:23:04 +0000 (18:23 +0200)]
Fix compilation warnings due to prototype of thread_select

* src/thread.h <int select_func>: Make the 5th and 6th arguments
be 'const'.
* src/process.c [WINDOWSNT]:
* src/w32proc.c: Make the 5th and 6th argument to sys_select be
'const'.