Commit graph

67825 commits

Author SHA1 Message Date
Katsumi Yamaoka
99e7b99e43 * lisp/net/shr.el (shr-tag-table): Avoid duplication of images.
(shr-collect-extra-strings-in-table): Render images as well.
2016-11-14 06:48:06 +00:00
Ken Brown
cbed42838e Use the new 'file-name-case-insensitive-p' function
* lisp/international/mule.el (auto-coding-alist-lookup):
* lisp/files.el (file-truename):
(abbreviate-file-name, set-auto-mode, file-relative-name):
* package.el (package-untar-buffer): Use
'file-name-case-insensitive-p' instead of 'system-type' to test
case-insensitivity.
2016-11-13 22:01:59 -05:00
Ken Brown
a611d7d7b4 Silence tramp warning
* lisp/net/tramp.el (tramp-file-name-for-operation): Add
'file-name-case-insensitive-p' as a known file primitive.
(Bug#24936)
2016-11-13 11:34:02 -05:00
Ken Brown
2809012c8f Check case-sensitivity when renaming files
* src/fileio.c (file_name_case_insensitive_p)
(Ffile_name_case_insensitive_p):  New functions.
(Frename_file): Allow renames that simply change case when the
FILE argument is on a case-insensitive filesystem.  (Bug#24441)

* lisp/dired-aux.el (dired-do-create-files): Use
'file-name-case-insensitive-p' instead of 'system-type' to check
for case-insensitivity.  (Bug#24441)

* doc/lispref/files.texi (Truenames): Document
'file-name-case-insensitive-p'.
2016-11-12 21:54:45 -05:00
Mark Oteiza
3958002f6f ; Fix thinko
* lisp/auth-source.el (auth-source-backend-parse-parameters): Contain
cl-return within cl-dolist.
2016-11-12 19:04:36 -05:00
Mark Oteiza
0588164418 Update chart.el
* lisp/emacs-lisp/chart.el (chart-mode): Derive from special-mode.
(chart-draw): Wrap in with-silent-modifications.  Instead of inserting a
fixed number of newlines, use window-height.
(chart-bar):
(chart-trim): Use dolist.
(chart-file-count): The previous implementation was buggy and missed
extensions.  Use file-name-extension instead to detect file extensions.
Also use dolist and cl-incf to reduce verbosity.
2016-11-11 19:05:23 -05:00
Katsumi Yamaoka
06b7e73b3e * lisp/net/shr.el (shr--preferred-image): Add CR to whitespace regexps.
(shr-collect-extra-strings-in-table):
Render extra tables in an invalid html as well.
2016-11-11 08:17:41 +00:00
Katsumi Yamaoka
dd91362565 * lisp/net/shr.el (shr--preferred-image): Ignore whitespace (bug#24893). 2016-11-11 00:27:48 +00:00
Mark Oteiza
86cbd942bc Update quickurl.el
* lisp/net/quickurl.el (quickurl-format-function):
(quickurl-sort-function): Use named function.
(quickurl-list-mode-map): Remove lines that are extraneous now that the
parent mode is special-mode.
(quickurl-format-url, quickurl-sort-urls): New functions.
(quickurl-read, quickurl): Use defun, as no cl-defun feature appears to
be used.
(quickurl-list-mode): Derive from special-mode.  Nix setting
buffer-read-only: special-mode does that.
(quickurl-list-populate-buffer): Use dolist instead.
(quickurl-list-quit): Use quit-window.  It looks like this was written
before the quit-window rewrite.  quit-window is very useful now.
2016-11-09 12:54:36 -05:00
Michael Albinus
dba9bc9752 Refine multi-hop specs in Tramp
* lisp/net/tramp.el (tramp-tramp-file-p): Suppress "/:" and "/c:".

* test/lisp/net/tramp-tests.el
(tramp-test01-file-name-syntax): Multi-hop specs don't need a
method.  "/h:" is allowed on non MS Windows.
2016-11-09 15:34:40 +01:00
Daniel Colascione
112111c4e4 Avoid infloop in python
Fix bug#24905

* lisp/progmodes/python.el (python-info-docstring-p): Improve
infloop avoidance: replace (bobp) with generic test for
forward progress.
* test/lisp/progmodes/python-tests.el (python-bob-infloop-avoid): Add
test for bug#24905
2016-11-08 15:26:43 -08:00
Daniel Colascione
06cfaa3dfa Make gnus/message.el work correctly under lexical binding
* lisp/gnus/message.el (message-send-mail): Rename `arg' to
`_' to shut up the byte compiler.
(sha1-maximum-internal-length, smtpmail-smtp-server)
(smtpmail-smtp-service): add missing defvars
2016-11-08 12:37:54 -08:00
Michael Albinus
39c0b8b6b1 Fix Bug#24889
* lisp/net/tramp.el (tramp-file-name-regexp): Make it a
defvar.  Fix docstring.
(tramp-completion-file-name-handler-alist): Fix docstring.
(tramp-register-file-name-handlers): Reassign
`tramp-file-name-regexp' to the car of
`tramp-file-name-structure'.  (Bug#24889)
2016-11-08 20:45:59 +01:00
Mark Oteiza
d3e22a1210 Prescribe history for read-regexp in query-replace
In the fix for bug#24580, the history argument for read-regexp was
removed erroneously; read-regexp's history argument defaults to
regexp-history, not minibuffer-history.
* lisp/replace.el (query-replace-read-from): Tell read-regexp to use
minibuffer-history.  Fixes bug#24873.
2016-11-07 22:11:39 -05:00
Mark Oteiza
73d47d2219 Remove obsolete default-FOO variables
* etc/NEWS: Indicate the removed variables.
* lisp/emacs-lisp/edebug.el (edebug-outside-mark): Fix comment.
* lisp/subr.el (default-mode-line-format, default-header-line-format):
(default-line-spacing, default-abbrev-mode, default-ctl-arrow):
(default-truncate-lines, default-left-margin, default-tab-width):
(default-case-fold-search, default-left-margin-width):
(default-right-margin-width, default-left-fringe-width):
(default-right-fringe-width, default-fringes-outside-margins):
(default-scroll-bar-width, default-vertical-scroll-bar):
(default-indicate-empty-lines, default-indicate-buffer-boundaries):
(default-fringe-indicator-alist, default-fringe-cursor-alist):
(default-scroll-up-aggressively, default-scroll-down-aggressively):
(default-fill-column, default-cursor-type):
(default-cursor-in-non-selected-windows):
(default-buffer-file-coding-system, default-major-mode):
(default-enable-multibyte-characters): Remove obsolete declarations.
* src/buffer.c (default-mode-line-format, default-header-line-format):
(default-line-spacing, default-abbrev-mode, default-ctl-arrow):
(default-truncate-lines, default-left-margin, default-tab-width):
(default-case-fold-search, default-left-margin-width):
(default-right-margin-width, default-left-fringe-width):
(default-right-fringe-width, default-fringes-outside-margins):
(default-scroll-bar-width, default-vertical-scroll-bar):
(default-indicate-empty-lines, default-indicate-buffer-boundaries):
(default-fringe-indicator-alist, default-fringe-cursor-alist):
(default-scroll-up-aggressively, default-scroll-down-aggressively):
(default-fill-column, default-cursor-type):
(default-cursor-in-non-selected-windows):
(default-buffer-file-coding-system, default-major-mode):
(default-enable-multibyte-characters): Remove.
* src/fileio.c (choose_write_coding_system): Fix comment.
* src/lisp.h (DEFVAR_BUFFER_DEFAULTS): Remove.
2016-11-07 21:40:05 -05:00
Mark Oteiza
949144c279 Remove some subr.el functions obsoleted in 22.1
* etc/NEWS: Document removed functions.  Also mention the "face"
variables that have been removed recently.
* lisp/subr.el (window-dot, set-window-dot, read-input, show-buffer):
(eval-current-buffer, string-to-int, insert-string, makehash): Remove.
2016-11-06 11:53:47 -05:00
Johan Bockgård
de75a1154e * lisp/subr.el (copy-tree): Handle vector in cdr. (Bug#24876) 2016-11-05 16:36:12 +01:00
Nick Terrell
f95bf3cd1f Support zstd compressed files
* lisp/jka-cmpr-hook.el (jka-compr-compression-info-list): Add
zstd compression info: <http://facebook.github.io/zstd/>.
(jka-compr-mode-alist-additions): Handle .tzst suffix for zstd
compressed tar archives.  (Bug#24853)

Copyright-paperwork-exempt: yes
2016-11-05 11:42:15 +02:00
Paul Eggert
a59f4bb5b8 ; Spelling fixes 2016-11-04 15:07:13 -07:00
Paul Eggert
ae0a1a890e Merge from origin/emacs-25
acae275 ; Spelling fixes
d8fac73 Update README for precompiled windows Emacs.
23570fd Clarify documentation of 'vc-responsible-backend' wrt symlinks
f708cb2 Clarify doc string of 'transpose-sexps'
cd05b1d Fix docstring of 'browse-url-firefox-new-window-is-tab'
bdc89eb Improve documentation of 'font-lock-remove-keywords'
4a0c590 Fix documentation of the command summary key
0221b7a Mark relocation workarounds with REL_ALLOC
2016-11-04 15:02:03 -07:00
Paul Eggert
6a20bd3579 Merge from origin/emacs-25
dbb3410 python.el: Fix detection of native completion in Python 3 (bu...
91c97b6 * Makefile.in (install-arch-indep): Skip etc/refcards/emacsve...
9c1cb8d * lisp/subr.el (set-transient-map): Exit for unbound events (...
9c247d2 Update category-table for Chinese characters
43986d1 Inhibit buffer relocation during regex searches
fee4cef Revert fixes to allocation of regex matching
2016-11-04 15:01:17 -07:00
Paul Eggert
acae275b27 ; Spelling fixes 2016-11-04 14:50:59 -07:00
Mark Oteiza
29559361f5 ; Restore nixed comments 2016-11-04 14:22:05 -04:00
Mark Oteiza
2c6920a365 Fix references to long obsoleted functions/aliases
* doc/lispintro/emacs-list-intro.texi (Miscellaneous):
* doc/misc/cl.texi (Conditionals):
* doc/misc/speedbar.texi (Major Display Modes): Use string-to-number,
not string-to-int.
* lisp/emulation/viper.el (viper-go-away): Use major-mode, not
default-major-mode.
* lisp/textmodes/reftex-toc.el (reftex-toc-visit-location): show-window
here is not a function call, but shorten the binding names anyways.
Also, use pop-to-buffer-same-window instead of switch-to-buffer cf
Bug#22244.
* lisp/textmodes/sgml-mode.el (html-tag-alist): Use read-string, not
read-input.
2016-11-04 12:51:04 -04:00
Mark Oteiza
abe594c099 * lisp/emacs-lisp/pcase.el (pcase-dolist): Add a docstring. 2016-11-04 10:23:46 -04:00
Mark Oteiza
6a4158022e ; Fix warnings 2016-11-04 10:14:01 -04:00
Katsumi Yamaoka
6ccb5f19f6 * lisp/net/shr.el (shr-collect-extra-strings-in-table) New function
that gathers extra strings in an invalid html.  (bug#24831)
(shr-tag-table): Use it.
2016-11-04 10:33:26 +00:00
Hong Xu
23570fd995 Clarify documentation of 'vc-responsible-backend' wrt symlinks
* lisp/vc/vc.el (vc-responsible-backend): Clarify that symlinks
are not resolved when the VC backend is reported.

* doc/lispref/files.texi (Truenames): Document
'vc-responsible-backend'.  (Bug#23436)
* doc/emacs/maintaining.texi (Version Control Systems): Fix a
typo.
2016-11-04 12:06:00 +02:00
Eli Zaretskii
f708cb22a1 Clarify doc string of 'transpose-sexps'
* lisp/simple.el (transpose-sexps): Clarify the conditions for
transposing sexps that are lists or strings.  Mention the effect
of the prefix argument.  (Bug#24860)
2016-11-04 11:50:48 +02:00
Tibor Csögör
cd05b1db33 Fix docstring of 'browse-url-firefox-new-window-is-tab'
* lisp/net/browse-url.el (browse-url-firefox-new-window-is-tab):
Remove obsolete note from docstring (obsoleted by previous commits).
(Bug#24843)

Copyright-paperwork-exempt: yes
2016-11-04 11:24:21 +02:00
Reuben Thomas
86bec41906 Stop force parameter of whitespace-report-region having global effect
* lisp/whitespace.el (whitespace-report-region): Force parameter
previously changed whitespace-style globally.  Fix this, and use
whitespace-active-style, to take account of any changes the user may
have made.  Simplify the documentation: the force parameter simply
forces all classes of whitespace problem to be considered.
(Bug#24745)
2016-11-03 12:16:56 +00:00
Reuben Thomas
50bba7f47e Document use of `tab-width'
* lisp/whitespace.el: When talking about `8 or more spaces', mention
`tab-width' instead of 8.  (Bug#24745)
2016-11-03 12:16:56 +00:00
Reuben Thomas
2350bb9531 Make whitespace-report-region respect current settings
* lisp/whitespace.el (whitespace-report-region): Make it respect
whitespace-style, including any additions made by the force parameter.
This means that the function does not return t unless a whitespace
problem that the user cares about is reported.  (Bug#24745)
2016-11-03 12:16:56 +00:00
Reuben Thomas
a55c582fdb Fix whitespace-space-after-tab-regexp
* lisp/whitespace.el (whitespace-space-after-tab-regexp)
(whitespace-regexp): Match all the spaces after tabs for highlighting,
not just the first tab-width.  Fix whitespace-space-after-tab::space
version so that it requires at least tab-width spaces, not just 1.
(Bug#24745)
2016-11-03 12:16:56 +00:00
Reuben Thomas
96f3ae900f Remove duplicate documentation
* lisp/whitespace.el: Remove duplicate documentation from the Commentary
  section which duplicate and in some places contradict (due to being
  out of date) the docstrings (Bug#24745).
2016-11-03 12:16:56 +00:00
Reuben Thomas
0a5ab4dd09 Fix bob/eob checks
* lisp/whitespace.el (whitespace-empty-at-bob-regexp)
(whitespace-empty-at-eob-regexp, whitespace-cleanup): Make `empty' checks
work at beginning & end of buffer in whitespace-report-region, and only
there (i.e. they will never match in regions that don't include the
start or end of the buffer).  (Bug#24745)
2016-11-03 12:16:56 +00:00
Tino Calancha
76e297c15f (thing-at-point 'list) return nil if no list at point
* lisp/thingatpt.el (thing-at-point-bounds-of-list-at-point):
Check first if we are at the beginning of a top-level sexp (Bug#24627).
If point is inside a comment or string, look for a list out of the
comment/string.
Escape '[' in doc string.
* test/lisp/thingatpt-tests.el (thing-at-point-bug24627): Update
expected test result as pass.
2016-11-03 20:33:19 +09:00
Mark Oteiza
76735c116d Remove antlr face aliases obsoleted in 22.1
* lisp/progmodes/antlr-mode.el: Remove obsolete aliases
(antlr-default-face, antlr-keyword-face, antlr-syntax-face):
(antlr-ruledef-face, antlr-tokendef-face, antlr-ruleref-face):
(antlr-tokenref-face, antlr-literal-face):
(antlr-literal-face): Remove.
(antlr-font-lock-additional-keywords): Use face symbols instead.
2016-11-03 01:15:30 -04:00
Daniel Colascione
e5cdb5ce7d Revert "Disable bracketed paste in a terminal in char mode"
This change causes regressions, and besides, disabling BPM frame-wide
for the sake of one buffer is the wrong solution.

This reverts commit cf566b46a6.
2016-11-02 21:17:48 -07:00
Mark Oteiza
722e7989fa ; Require eieio at run time 2016-11-02 16:23:48 -04:00
Mark Oteiza
62a6e28e0c Revert change to eww-suggest-uris
The introduced append is ugly and can yield '(nil); doing delq on it
would be hacks on hacks.
* lisp/net/eww.el: Require cl-lib at run time.
(eww-suggest-uris): Restore eww-current-url, reverting previous change.
(eww): Remove erroneous append.
(eww-open-in-new-buffer): Check if the return from eww-suggested-uris is
equal to eww-current-url, which is nil anyways if we are not in an EWW
buffer.
2016-11-02 16:18:49 -04:00
Mark Oteiza
bbc218b9b0 Add eww-open-in-new-buffer to EWW
* doc/misc/eww.texi (Basic): Document new command and key.
* etc/NEWS: Mention new key and its purpose.
* lisp/net/eww.el (eww-suggest-uris): Remove eww-current-url.
(eww): Append (eww-current-url) to the prompt defaults.
(eww-open-in-new-buffer): New command.
(eww-mode-map): Bind it and add a menu item.
2016-11-02 15:58:28 -04:00
Mark Oteiza
3f06795181 Migrate auth-source to cl-lib
* lisp/auth-source.el: Use cl-lib.
(auth-source-read-char-choice, auth-source-backend-parse-parameters):
(auth-source-search): Replace cl calls with cl-lib ones.
(auth-source-netrc-cache):
(auth-source-forget+): Use cl-do-symbols instead.
(auth-source-specmatchp, auth-source-netrc-parse):
(auth-source-netrc-search, auth-source-netrc-create):
(auth-source-netrc-saver, auth-source-secrets-listify-pattern):
(auth-source-secrets-search, auth-source-secrets-create):
(auth-source-macos-keychain-search, auth-source--decode-octal-string):
(auth-source-macos-keychain-search-items, auth-source-plstore-search):
(auth-source-plstore-create): Replace cl calls with cl-lib ones.
2016-11-02 14:56:40 -04:00
Eli Zaretskii
c3640fcc96 Support 'TARGETS' in clipboard selections on MS-Windows
* src/w32select.c (Fw32_selection_targets): New function.

* lisp/term/w32-win.el (w32--get-selection): Call
'w32-selection-targets' to obtain the list of data formats
available in the clipboard.
2016-11-01 18:04:07 +02:00
Glenn Morris
2664eb5394 ; Auto-commit of loaddefs files. 2016-11-01 06:18:02 -04:00
Mark Oteiza
7a87f82987 Turn on lexical-binding in some more libs
* lisp/calendar/icalendar.el:
* lisp/emacs-lisp/regexp-opt.el:
* lisp/emacs-lisp/timer.el:
* lisp/gnus/message.el:
* lisp/hex-util.el: Turn on lexical-binding.
2016-10-31 20:31:22 -04:00
Mark Oteiza
d3c2d3ca45 Turn on lexical-binding in some net libs
* lisp/net/dbus.el: Turn on lexical-binding.
(dbus-list-hash-table, dbus-list-known-names):
(dbus-introspect-get-node-names, dbus-introspect-get-interface-names):
(dbus-introspect-get-method-names, dbus-introspect-get-signal-names):
(dbus-introspect-get-property-names):
(dbus-introspect-get-argument-names, dbus-get-all-properties):
(dbus-property-handler, dbus-get-all-managed-objects):
(dbus-managed-object-handler): Replace add-to-list with push. Add
nreverse in some places where the APPEND argument of add-to-list was
used.
* lisp/net/network-stream.el: Turn on lexical-binding.
* lisp/net/newsticker.el: Turn on lexical-binding.
* lisp/net/shr.el: Turn on lexical-binding.
(shr-make-placeholder-image): Remove unused variable binding.
(shr-inspect-table): Replace ignored bindings with underscore.
2016-10-31 20:19:21 -04:00
Mark Oteiza
05729e5ac2 Turn on lexical-binding in some url libs
* lisp/url/url-auth.el:
* lisp/url/url-expand.el:
* lisp/url/url-future.el:
* lisp/url/url-parse.el:
* lisp/url/url-util.el: Turn on lexical-binding.
2016-10-31 19:55:17 -04:00
Johan Bockgård
dec329aefc * lisp/emacs-lisp/cl-macs.el (cl-symbol-macrolet): Fix debug spec
(Bug#24733)
2016-10-31 21:22:34 +01:00
Clément Pit--Claudel
dbb3410228 python.el: Fix detection of native completion in Python 3 (bug #24401)
With Python 3.5, (python-shell-completion-native-get-completions ... "")
would return an empty list, causing python.el to think that native
completion was unavailable (the difference between Python 2 and Python 3
is due to https://bugs.python.org/issue25660).

* lisp/progmodes/python.el (python-shell-completion-native-try): Use "_"
  to check whether native completion is available instead of "".
2016-10-31 08:35:33 -04:00