1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-16 09:50:25 +00:00
Commit Graph

69635 Commits

Author SHA1 Message Date
Tim Landscheidt
289fe6c0d1 Reset bidi-paragraph-direction on article rendering
* lisp/gnus/gnus-art.el (gnus-request-article-this-buffer): Reset
bidi-paragraph-direction on article rendering.  (Bug#28454)

Copyright-paperwork-exempt: yes
2017-09-30 16:39:36 +03:00
Eli Zaretskii
a4f7518817 Fix url-http use of url-current-object
* lisp/url/url-http.el (url-http): Bind url-current-object before
calling url-http-find-free-connection.  (Bug#28515)
2017-09-30 16:33:30 +03:00
Andy Moreton
4a755ed421 Avoid assertions in vc-hg.el on MS-Windows
* lisp/vc/vc-hg.el (vc-hg--pcre-to-elisp-re)
(vc-hg--slurp-hgignore, vc-hg--read-repo-requirements)
(vc-hg-state-fast): Use file-name-absolute-p and directory-name-p
instead of relying on Unix file-name syntax.  This avoids
assertion violations on MS-Windows.
2017-09-30 16:21:39 +03:00
Eli Zaretskii
63a45e8837 Merge branch 'emacs-26' of git.savannah.gnu.org:/srv/git/emacs into emacs-26 2017-09-30 09:57:58 +03:00
Paul Eggert
cbc8324488 Prefer HTTPS to HTTP for gnu.org
This catches some URLs I missed in my previous scan,
or perhaps were added after the scan.
2017-09-29 17:48:22 -07:00
Paul Eggert
bbda601d1d ; Spelling fixes 2017-09-29 16:41:50 -07:00
Eli Zaretskii
f428757cdb Merge branch 'emacs-26' of git.savannah.gnu.org:/srv/git/emacs into emacs-26 2017-09-29 22:03:30 +03:00
Glenn Morris
26d58f0c58 ; Standardize license notices 2017-09-29 12:49:19 -04:00
Eli Zaretskii
73dba0f466 Fix last doc string change in simple.el
* lisp/simple.el (shell-command-saved-pos)
(region-extract-function, region-bounds): Doc fixes.  (Bug#28609)
2017-09-29 15:59:17 +03:00
Eli Zaretskii
61225964ed Revert "bug#28609: simple.el"
This reverts commit a75ab3b3fb.
2017-09-29 15:53:27 +03:00
Devon Sean McCullough
a75ab3b3fb bug#28609: simple.el
Correct grammar; also, call a pair a pair.

(cherry picked from commit 25ef543a97)
2017-09-29 15:50:51 +03:00
Eli Zaretskii
33401b26b1 Merge branch 'emacs-26' of git.savannah.gnu.org:/srv/git/emacs into emacs-26 2017-09-29 13:24:05 +03:00
Rasmus
d4b2bbdc73 Merge branch 'emacs-26' into scratch/org-mode-merge 2017-09-29 10:41:51 +02:00
Eli Zaretskii
c1ac8c170f Merge branch 'emacs-26' of git.savannah.gnu.org:/srv/git/emacs into emacs-26 2017-09-29 10:02:33 +03:00
Noam Postavsky
af130f900f Fix ert backtrace saving for non-`signal'ed errors (Bug#28333)
* lisp/emacs-lisp/ert.el (ert--run-test-debugger): Take the frames
above the `debugger' frame, rather than assuming there will be a
`signal' frame.
2017-09-28 19:57:24 -04:00
João Távora
ce540f8a68 Revert "Split flymake.el into flymake-proc.el and flymake-ui.el"
In other words, re-coalesce the two files,
lisp/progmodes/flymake-proc.el and lisp/progmodes/flymake-ui.el, back
into a single one, lisp/progmodes/flymake.el.

The changesets "Prefer HTTPS to FTP and HTTP in documentation" and
"allow nil init in flymake-allowed-file-name-masks to disable flymake"
are kept in place in the new lisp/progmodes/flymake.el.

This reverts Git commit eb34f7f5a2.

Don't merge this back to master as development happening there builds
upon this work. See also
https://lists.gnu.org/archive/html/emacs-devel/2017-09/msg00932.html.
2017-09-28 08:09:49 +01:00
João Távora
7cf59c6635 Revert "Add flymake-backends defcustom"
This reverts Git commit 13993c46a2.

Don't merge this back to master as development happening there builds
upon this work. See also
https://lists.gnu.org/archive/html/emacs-devel/2017-09/msg00932.html
2017-09-28 08:09:01 +01:00
John Wiegley
98a37e6014
lisp/simple.el: Indicate when a list of pairs is meant in a docstring 2017-09-26 12:37:13 -07:00
Devon Sean McCullough
e7c8da4d05
bug#28609: simple.el
Correct grammar; also, call a pair a pair.
2017-09-26 09:32:36 -07:00
Dmitry Gutov
827db6b559 Use a separate syntax-ppss cache for narrowed buffers
* lisp/emacs-lisp/syntax.el (syntax-ppss-wide):
New variable, to contain the data from `syntax-ppss-last' and
`syntax-ppss-cache'.
(syntax-ppss-cache, syntax-ppss-last): Remove.
(syntax-ppss-narrow, syntax-ppss-narrow-start): New variables.
(syntax-ppss-flush-cache): Flush both caches.
(syntax-ppss--data): Return the appropriate last result and
buffer cache for the current restriction.
(syntax-ppss, syntax-ppss-debug): Use it (bug#22983).
2017-09-26 02:52:23 +03:00
Joerg Behrmann
a2244f417a Improve python3-compatibility of fallback completion (Bug#28499)
* lisp/progmodes/python.el (python-eldoc-setup-code): Use
inspect.getfullargspec instead of inspect.getargspec to avoid a
deprecation warning on every usage of eldoc in python-mode.

Copyright-paperwork-exempt: yes
2017-09-25 19:39:19 -04:00
Noam Postavsky
66d35ae49d * lisp/eshell/esh-util.el (eshell-condition-case): Add debug declaration. 2017-09-25 19:39:19 -04:00
Noam Postavsky
f5e72b04d9 Make sh-indentation into an alias for sh-basic-offset (Bug#21751)
* lisp/progmodes/sh-script.el (sh-indentation): Redefine as obsolete
variable alias for `sh-basic-offset'.
(sh-mode, sh-smie--indent-continuation)
(sh-smie-rc-rules, sh-basic-indent-line): Replace `sh-indentation'
with `sh-basic-offset'.
2017-09-25 19:39:19 -04:00
Noam Postavsky
a58d0c590a Fix loading of smie-config rules (Bug#24848)
* lisp/emacs-lisp/smie.el (smie-config--setter): Use `set-default'
instead of `setq-default'.
(smie-config): Use `custom-initialize-set' instead of
`custom-initialize-default' as the :initialize argument.

* lisp/progmodes/sh-script.el (sh-learn-buffer-indent): Mention that
we call `smie-config-guess' so that the user will have a chance to
find the correct docstring to consult.  Remove hedging comments
regarding use of abnormal hooks.
2017-09-25 19:39:19 -04:00
Dmitry Gutov
5a41dd0a1f Reset default-directory inside *xref-grep* buffer
* lisp/progmodes/xref.el (xref-collect-matches):
Reset default-directory, too. (Bug#28575)
2017-09-26 01:47:23 +03:00
Michael Albinus
49cd561dc6 * test/lisp/tramp-tests.el (tramp-test21-file-links): Special code for smb. 2017-09-25 17:52:24 +02:00
Mark Oteiza
b719f6b20b Loosen strict parsing requirement for desktop files
There are other desktop-looking files, for instance those having to do
with MIME typess, that would benefit from being able to be read by this
function.  It helps to have some flexibility.
* lisp/xdg.el (xdg-desktop-read-file): Remove an error condition.
* test/lisp/xdg-tests.el: Remove a test.
2017-09-25 08:45:08 -04:00
Mark Oteiza
c7a0c13777 * lisp/xdg.el (xdg-thumb-uri): Fix doc string. 2017-09-25 08:44:23 -04:00
Martin Rudalics
dc6b3560e5 Fix documentation of `make-frame' and related variables and hooks
* lisp/frame.el (before-make-frame-hook)
(after-make-frame-functions, frame-inherited-parameters)
(make-frame): Fix doc-strings.
* doc/lispref/frames.texi (Creating Frames): Fix description
of `make-frame' and related variables and hooks.
2017-09-25 10:09:32 +02:00
Eric Abrahamsen
3d3778d82a Accept new always' value for option buffer-offer-save'
Also revert ee512e9a82

* lisp/files.el (buffer-offer-save): In addition to nil and t, now
  allows a third symbol value, `always'. A buffer where this option is
  set to `always' will always be offered for save by
  `save-some-buffers'.
  (save-some-buffers): Check the exact value of this buffer-local
  variable. No longer check the buffer name, or the value of
  `write-contents-functions'.
* doc/lispref/buffers.texi (Killing Buffers): Note change in manual.
* doc/lispref/files.texi (Saving Buffers): Remove note about buffer
  names.
* etc/NEWS: Mention in NEWS.
2017-09-24 14:57:40 -07:00
Eli Zaretskii
1eef11b7be Fix doc string of 'dired-listing-switches'
* lisp/dired.el (dired-listing-switches): Fix the quoting
example.  (Bug#28569)
2017-09-23 17:23:35 +03:00
Paul Eggert
f2b2201594 ; Spelling and URL fixes 2017-09-23 00:36:56 -07:00
Mark Oteiza
f656ccdb43 ; Fix typo
* lisp/emacs-lisp/subr-x.el: Nix extra parenthesis.
2017-09-22 16:34:31 -04:00
Eli Zaretskii
d64da52d57 Fix last change in bat-mode.el
* lisp/progmodes/bat-mode.el (bat-font-lock-keywords): Fix last
change.  (Bug#28311)
2017-09-22 20:41:10 +03:00
Eli Zaretskii
908af46abd Fix restoring in GUI sessions desktop saved in TTY sessions
* lisp/frameset.el (frameset-filter-font-param): New function.
(frameset-persistent-filter-alist): Use it for processing the
'font' frame parameter.  (Bug#17352)
2017-09-22 17:52:47 +03:00
Eli Zaretskii
51cbd85454 Improve syntax highlighting in bat-mode
* lisp/progmodes/bat-mode.el (bat-font-lock-keywords): Improve
font-locking of environment variables.  Suggested by Achim Gratz
<Stromeko@nexgo.de>.  (Bug#28311)  (Bug#18405)
2017-09-22 16:40:59 +03:00
Gemini Lasswell
68baca3ee1 Catch more messages in ert-with-message-capture
* lisp/emacs-lisp/ert-x.el (ert-with-message-capture): Capture
messages from prin1, princ and print.
(ert--make-message-advice): New function.
(ert--make-print-advice): New function.
2017-09-21 13:35:45 -07:00
Eli Zaretskii
28e0c410c9 ; * lisp/mouse.el (secondary-selection-exist-p): Doc fix. 2017-09-21 11:29:11 +03:00
Tak Kunihiro
31e1d9ef2f Support setting region from secondary selection and vice versa
* lisp/mouse.el (secondary-selection-exist-p): New function to
allow callers to tell existence of the secondary selection
in current buffer.
(secondary-selection-to-region): New function to set
beginning and end of the region from those of the secondary
selection.
(secondary-selection-from-region): New function to set
beginning and end of the secondary selection from those of
the region.  (Bug#27530)

* etc/NEWS: Mention the new functions.
2017-09-21 11:26:00 +03:00
Paul Eggert
047f02f00f Fix new copy-directory bug with empty dirs
Problem reported by Afdam Plaice (Bug#28520) and by Eli Zaretskii
(Bug#28483#34).  This is another bug that I introduced in my
recent copy-directory changes.
* lisp/files.el (copy-directory): Work with empty subdirectories, too.
* test/lisp/files-tests.el (files-tests--copy-directory):
Test for this bug.
2017-09-20 11:50:35 -07:00
Mark Oteiza
965cffd89c Rename timer-list to list-timers
* doc/emacs/anti.texi (Antinews):
* doc/lispref/os.texi (Timers):
* etc/NEWS:
* lisp/emacs-lisp/timer-list.el:
(timer-list-mode): Rename timer-list to list-timers.
2017-09-19 22:24:23 -04:00
Alan Third
a5fec62b51 Provide native touchpad scrolling on macOS
* etc/NEWS: Describe changes.
* lisp/term/ns-win.el (mouse-wheel-scroll-amount,
mouse-wheel-progressive-speed): Set to smarter values for macOS
touchpads.
* src/nsterm.m (emacsView::mouseDown): Use precise scrolling deltas to
calculate scrolling for touchpads and mouse wheels.
(syms_of_nsterm): Add variables 'ns-use-system-mwheel-acceleration',
'ns-touchpad-scroll-line-height' and 'ns-touchpad-use-momentum'.
* src/keyboard.c (make_lispy_event): Pass on .arg when relevant.
* src/termhooks.h (event_kind): Update comments re. WHEEL_EVENT.
* lisp/mwheel.el (mwheel-scroll): Use line count.
* lisp/subr.el (event-line-count): New function.
2017-09-19 20:08:51 +01:00
Eli Zaretskii
74d7bb9498 Fix errors in flyspell-post-command-hook
* lisp/textmodes/ispell.el (ispell-get-decoded-string): Handle the
case of a nil Nth element of the language dictionary slot.  This
avoids errors in 'flyspell-post-command-hook' when switching
dictionaries with some spell-checkers.  (Bug#28501)
2017-09-19 19:32:09 +03:00
Michael Albinus
40fdbb01d0 Work on Tramp's file-truename
* lisp/net/tramp-sh.el (tramp-perl-file-truename):
Check also for symlinks.
(tramp-sh-handle-file-truename): Move check for a symlink
cycle to the end.  Do not blame symlinks which look like a
remote file name.

* lisp/net/tramp.el (tramp-handle-file-truename): Expand result.
2017-09-19 18:12:35 +02:00
Paul Eggert
1a01423b3c Fix bug with make-directory on MS-Windows root
* lisp/files.el (files--ensure-directory): Treat any error, not
just file-already-exists, as an opportunity to check whether DIR
is already a directory (Bug#28508).
2017-09-19 01:48:04 -07:00
Rasmus
eaefbc26d5 ; Add files missing in ab351d442d 2017-09-19 09:00:00 +02:00
Tom Tromey
066efb8666 Fix log-view-diff-common when point is after last entry
Bug#28466
* lisp/vc/log-view.el (log-view-diff-common): If point is after last
entry, look at the previous revision.
2017-09-18 20:02:01 -06:00
Eric Abrahamsen
ee512e9a82 Ignore buffers whose name begins with a space in save-some-buffers
* lisp/files.el (save-some-buffers): Consider these buffers
  "internal", and don't prompt the user to save them.
* doc/lispref/files.texi: Document.
2017-09-18 13:29:44 -07:00
Michael Albinus
9e1b5bd92c Improve tramp-interrupt-process robustness
* lisp/net/tramp.el (tramp-interrupt-process): Wait, until the
process has disappeared.
2017-09-18 18:00:27 +02:00
Mark Oteiza
331d0e520f Fix gensym
* lisp/subr.el (gensym): Actually implement the default prefix.
* test/lisp/subr-tests.el (subr-tests--gensym): New test.
2017-09-18 09:00:45 -04:00
Rasmus
ab351d442d Update Org to v9.1.1
Please see etc/ORG-NEWS for major changes.
2017-09-18 12:01:12 +02:00
Paul Eggert
6359fe630a Remove old cl-assert calls in 'newline'
* lisp/simple.el (newline): Remove cl-assert calls
that didn't seem to be helping us debug Bug#18913,
and that caused problems as reported in Bug#28280.
Suggested by Glenn Morris (Bug#28280#8).
2017-09-17 22:32:55 -07:00
Paul Eggert
679e05eeb9 message-citation-line-format %Z is now tz name
* etc/NEWS:
* lisp/gnus/message.el (message-citation-line-format):
Fix doc to match new behavior (Bug#28476).
2017-09-17 17:46:58 -07:00
Mark Oteiza
4e8888d438 Use doc-view or pdf-tools on any window-system
* lisp/net/mailcap.el (mailcap-mime-data): Simply check for
window-system.
2017-09-17 19:39:35 -04:00
Paul Eggert
37b5e661d2 Fix recently-introduced copy-directory bug
Problem reported by Andrew Christianson (Bug#28451):
* lisp/files.el (copy-directory): If COPY-CONTENTS, make the
destination directory if it does not exist, even if it is a
directory name.  Simplify, and omit unnecessary test for an
already-existing non-directory target, since make-directory
diagnoses that for us now.
* test/lisp/files-tests.el (files-tests--copy-directory):
Test for this bug.
2017-09-17 13:06:54 -07:00
Michael Albinus
57249fb297 Fix compatibility problem in Tramp
* lisp/net/tramp.el (tramp-interrupt-process): Better error handling.

* lisp/net/tramp-compat.el (default-toplevel-value): Move up.
(top): Do not call `tramp-change-syntax' anymore.
(tramp-compat-directory-name-p): New defalias.

* lisp/net/tramp-adb.el (tramp-adb-handle-copy-file):
* lisp/net/tramp-sh.el (tramp-sh-handle-copy-directory):
* lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory)
(tramp-smb-handle-copy-file): Use it.

* test/lisp/net/tramp-tests.el (tramp-test28-interrupt-process):
Modify test.
2017-09-17 19:16:59 +02:00
Mark Oteiza
34a6774daa ; Partially revert c3445aed51
The pdf-view-mode entry had been added recently and should not have been
removed.
* lisp/net/mailcap.el: Restore pdf-view-mode entry from the pdf-tools
package.
2017-09-17 08:27:57 -04:00
Michael Albinus
3003ac0469 Adapt Tramp version. Do not merge
* doc/misc/trampver.texi:
* lisp/net/trampver.el: Change version to "2.3.3.26.1".
(customize-package-emacs-version-alist): Add Tramp version
integrated in Emacs 26.1.
2017-09-17 10:03:18 +02:00
Tom Tromey
48d39c39e8 Search for Syntax section when viewing MDN
* lisp/textmodes/css-mode.el (css--mdn-after-render): Also search for
"Syntax" section.
2017-09-16 21:55:05 -06:00
Tom Tromey
9d101376b4 Allow smerge-keep-current to work for empty hunks
Bug#25555
* lisp/vc/smerge-mode.el (smerge-get-current): Allow point to be at
match-end.
* test/lisp/vc/smerge-mode-tests.el: New file.
2017-09-16 21:55:05 -06:00
Tom Tromey
13aba24add Call vc-setup-buffer in vc-git-log-{in,out}going
Bug#28427:
* lisp/vc/vc-git.el (vc-git-log-incoming, vc-git-log-outgoing): Call
vc-setup-buffer.
2017-09-16 21:55:05 -06:00
Stefan Monnier
1d599df5e0 Fix last change to textmodes/page-ext.el
* lisp/textmodes/page-ext.el (pages-directory): Make buffer writable
while we build it (bug#28431).
2017-09-16 20:10:31 -04:00
Gemini Lasswell
dee96f4a17 * lisp/emacs-lisp/cl-macs.el (cl-letf): Fix Edebug spec (bug#24765) 2017-09-16 07:36:18 -07:00
Eli Zaretskii
625cee5316 Start emacs-26 release branch
* configure.ac:
* nt/README.W32:
* README:
* msdos/sed2v2.inp: Increment Emacs version to 26.0.60.

* lisp/cus-edit.el (customize-changed-options-previous-release):
Update value to "25.3".
2017-09-16 15:34:15 +03:00
Alan Mackenzie
4ea37c2b8b Cope better with C++ and Objective-C protection keywords in class declarations
This fix fixes the fontification of a method inside a class at the time it is
typed, when there is a protection keyword clause preceding it.

* lisp/progmodes/cc-engine.el (c-forward-keyword-clause): Handle protection
keywords.
(c-looking-at-decl-block): Avoid scanning forward over protection keyword
clauses too eagerly.

* lisp/progmodes/cc-langs.el (c-protection-key c-post-protection-token): New
lang defconsts and defvars.

* lisp/progmodes/cc-mode.el (c-fl-decl-start): When we encounter a protection
keyword following a semicolon or brace, move forward over it before attempting
to parse a type.
2017-09-16 11:31:38 +00:00
Eli Zaretskii
a103dbe360 Disable execution of unsafe Lisp by Enriched Text mode
* src/xdisp.c (handle_display_spec): If the display property is
wrapped in 'disable-eval' form, disable Lisp evaluation while
processing this property.
(handle_single_display_spec): Accept new argument ENABLE_EVAL_P.
If that argument is false, don't evaluate Lisp while processing
display properties.

* lisp/textmodes/enriched.el
(enriched-allow-eval-in-display-props): New defcustom.
(enriched-decode-display-prop): If
enriched-allow-eval-in-display-props is nil, wrap the display
property with 'disable-eval' to disable Lisp evaluation when the
display property is processed for display.  (Bug#28350)
* lisp/gnus/mm-view.el (mm-inline-text): Re-enable processing of
enriched text.

* doc/lispref/display.texi (Display Property): Document the
'disable-eval' wrapping of 'display' properties.
* doc/emacs/text.texi (Enriched Properties): Document
'enriched-allow-eval-in-display-props'.

* etc/NEWS: Describe the security issues with Enriched Text mode
and their solution.
2017-09-16 12:45:24 +03:00
Mark Oteiza
30c955b172 Use cl-print in timer list
* lisp/emacs-lisp/timer-list.el (timer-list): Use cl-print
for handling functions.
(timer-list-mode): Capitalize major mode name.  Set bidi direction
as in tabulated-list-mode.
2017-09-15 23:18:54 -04:00
Vincent Belaïche
767b3a7429 Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs 2017-09-15 23:52:24 +02:00
Vincent Belaïche
d1458d0f40 Make landscape layout with geometry package rather than a PostScript special.
* lisp/calendar/cal-tex.el (cal-tex-preamble): Make 12pt the
default class option.
(cal-tex-year, cal-tex-cursor-month-landscape): Pass landscape
request to `cal-tex-insert-preamble' function call within the
class option string.
(cal-tex-cursor-month): Don't pass any longer "12pt" argument
to `cal-tex-insert-preamble' function, as it is default.
(cal-tex-insert-preamble): Suppress landscape and size
argument, and replace them by a class-options string
argument. Do not insert any longer "\special{landscape}" in
case of landscape layout, as the job is made by the geometry
package.
2017-09-15 23:51:05 +02:00
Mark Oteiza
9785d35137 * lisp/json.el (json-read-keyword): Revert previous change to catch EOL. 2017-09-15 15:38:44 -04:00
Michael Albinus
7911ebc610 Improve Tramp behaviour according to bug#27986
* lisp/net/tramp-adb.el (tramp-adb-handle-copy-file):
* lisp/net/tramp-sh.el (tramp-sh-handle-copy-directory):
* lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory)
(tramp-smb-handle-copy-file): Check, that NEWNAME is a
directory name when existing.  Use `file-name-as-directory'
where appropriate.
2017-09-15 18:29:00 +02:00
Mark Oteiza
1c70054750 ; Partially revert previous commit
The reduction in was because I broke it.
* lisp/json.el (json-pop): Do not bind at compile time something needed
at run time.
2017-09-15 10:06:56 -04:00
Mark Oteiza
3b783a75ad More JSON optimization
Last I checked, inlining json-skip-whitespace didn't make much
difference.  However, changing defsubsts to define-inline results
in roughly 15% reduction in read time on a 200K file.
* lisp/json.el (json-advance, json-peek, json-pop):
(json-skip-whitespace): Inline with define-inline.
(json-read-keyword): Don't use whitespace syntax.
(json-add-to-object): Simpler condition.
2017-09-15 09:49:27 -04:00
Mark Oteiza
117f28430a Bind n,p in timer-list
* lisp/emacs-lisp/timer-list.el (timer-list-mode-map): Bind n and p
to next- and previous-line, respectively.
2017-09-14 19:52:09 -04:00
Glenn Morris
ce0aa05864 * lisp/net/tls.el (tls-program): Fix :version.
; Ref: http://lists.gnu.org/archive/html/emacs-devel/2017-09/msg00401.html
2017-09-14 16:35:43 -04:00
Eli Zaretskii
56ab0c4a4c Support lcms2 in MS-Windows builds
* lisp/term/w32-win.el (dynamic-library-alist): Include
association for the lcms2 library.

* src/lcms.c [WINDOWSNT]: Include windows.h and w32.h.  Use
DEF_DLL_FN to define pointers to dynamically loaded lcms2
functions.
(cmsCIE2000DeltaE, cmsCIECAM02Init, cmsCIECAM02Forward)
(cmsCIECAM02Done): New macros.
(init_lcms_functions, Flcms2_available_p): New functions.
(Flcms_cie_de2000, Flcms_cam02_ucs) [WINDOWSNT]: Call
init_lcms_functions.
(syms_of_lcms2): Defsubr lcms2-available-p.
* src/w32fns.c (syms_of_w32fns): DEFSYM Qlcms2.

* configure.ac: Include lcms2 in the final report and in
emacs_config_features.

* nt/INSTALL:
* nt/INSTALL.W64: Update with the information about lcms2 library.
2017-09-14 19:37:35 +03:00
Paul Eggert
bc511a64f6 Prefer HTTPS to FTP and HTTP in documentation
Most of this change is to boilerplate commentary such as license URLs.
This change was prompted by ftp://ftp.gnu.org's going-away party,
planned for November.  Change these FTP URLs to https://ftp.gnu.org
instead.  Make similar changes for URLs to other organizations moving
away from FTP.  Also, change HTTP to HTTPS for URLs to gnu.org and
fsf.org when this works, as this will further help defend against
man-in-the-middle attacks (for this part I omitted the MS-DOS and
MS-Windows sources and the test tarballs to keep the workload down).
HTTPS is not fully working to lists.gnu.org so I left those URLs alone
for now.
2017-09-13 15:54:37 -07:00
Paul Eggert
5da53a0191 Prefer HTTPS to HTTP for gnu.org
This patch just changes code files; a followup companion patch
(much larger) will affect the commentary.  This part is
separated out to make it easier to review.
* .dir-locals.el (change-log-mode):
* lisp/org/org-info.el (org-info-other-documents)
(org-info-map-html-url):
* lisp/org/ox-html.el (org-html-creator-string):
* lisp/startup.el (fancy-startup-text, fancy-about-text)
(fancy-splash-head):
* test/lisp/ffap-tests.el (ffap-other-window--bug-25352):
* test/lisp/thingatpt-tests.el (thing-at-point-test-data):
Use HTTPS instead of HTTP.
2017-09-13 15:54:25 -07:00
Simen Heggestøyl
e7d6c62209 Add tests for color.el
* lisp/color.el (color-name-to-rgb, color-complement): Clarify in
docstrings that RGB triplets should use four digits per component.
(color-rgb-to-hsl): Break line to avoid "Hidden behind deeper element"
warning.

* test/lisp/color-tests.el: New file.
2017-09-13 20:23:44 +02:00
Lars Ingebrigtsen
6339807147 Make gnutls-verify-error work again with url-retrieve-synchronously
* lisp/url/url-gw.el (url-open-stream): Only use :nowait if
we're doing async connections (bug#26835).

* lisp/url/url-parse.el (url): Add an asynchronous slot.

* lisp/url/url.el (url-asynchronous): New variable.
(url-retrieve-internal): Store the value.
(url-retrieve-synchronously): Bind the variable.
2017-09-13 20:11:02 +02:00
Michael Albinus
516481156c * lisp/net/trampver.el (customize-package-emacs-version-alist):
Add Tramp version integrated in Emacs 25.3.
2017-09-13 20:10:10 +02:00
Mark Oteiza
bdb71dea4a Add clarification to if-let* docstring
Also make its behaviour consistent with and-let* in that empty bindings
results in success, not failure.
* lisp/emacs-lisp/subr-x.el: Edit docstring, change else to then.
2017-09-13 13:27:49 -04:00
Lars Ingebrigtsen
6519df8f5a Make fully qualified domain names more fully qualified
* lisp/gnus/message.el (message-make-fqdn): Don't try to use a
system-name without any periods as a fully qualified domain name.
2017-09-13 18:08:51 +02:00
Mark Oteiza
912826a829 Remove "baroque" use of prefix argument from gensym
'cl-gensym' was simply moved here, but let us take an opportunity to
shed some historical baggage.
* lisp/subr.el (gensym): Remove special treatment of PREFIX as a
number.  Use "g" as prefix to differentiate from cl-gensym defaults.
* doc/lispref/symbols.texi (Creating Symbols): Update accordingly.
* lisp/emacs-lisp/cl-macs.el (cl--gensym-counter, cl-gensym): Restore.
2017-09-13 10:38:05 -04:00
Mark Oteiza
9a8bbb9d5d ; Fix previous commit
Removing extraneous code, thanks to Michael Heerdegen.
* lisp/emacs-lisp/subr-x.el (internal--listify): Remove latter
condition which always evaluates to t.
(internal--build-binding-value-form): Remove dead code.
2017-09-13 10:19:59 -04:00
Mark Oteiza
d532caaeee Add other D series white points and some simple conversions
* lisp/color.el (color-d75-xyz, color-d55-xyz, color-d50-xyz): New
constants.
(color-xyz-to-xyy, color-xyy-to-xyz, color-lab-to-lch):
(color-lch-to-lab): New functions.
2017-09-13 10:00:39 -04:00
Mark Oteiza
8d433d9b22 Permit non-integral color gradients
* lisp/color.el (color-gradient): Float the step-number.
2017-09-13 09:59:37 -04:00
Katsumi Yamaoka
61b8f9c490 Protect against malformed MIME messages that cause inf-loop (bugfix)
* lisp/gnus/gnus-art.el (gnus-article-mime-handles):
Protect against malformed MIME messages that cause inf-loop.
2017-09-13 10:04:14 +00:00
Dmitry Gutov
4bef92e9e0 Call vc-resynch-buffer in vc-git-resolve-when-done
* lisp/vc/vc-git.el (vc-git-resolve-when-done):
Call vc-resynch-buffer on the current file (bug#28121).
Move its autoload to before this function.
2017-09-13 02:31:19 +03:00
Eric Abrahamsen
9b980e2691 Allow write-contents-functions to short-circuit buffer save
Bug#28412

* lisp/files.el (basic-save-buffer): Re-arrange function so that
  write-contents-functions are run earlier. If they return non-nil,
  consider the buffer saved without requiring the buffer to be
  visiting a file.
  (save-some-buffers): This function should consider any buffer with a
  buffer-local value for write-contents-functions eligible for
  saving.
* test/lisp/files-tests.el (files-test-no-file-write-contents): New
  test.
* doc/lispref/files.texi (Saving Buffers): Mention in docs.
* etc/NEWS: And in NEWS.
2017-09-12 16:06:12 -07:00
Mark Oteiza
370d0e7aa7 Update uses of if-let and when-let
* lisp/dom.el (dom-previous-sibling):
* lisp/emacs-lisp/package.el (package--with-work-buffer):
(package--sort-deps-in-alist, package--sort-by-dependence):
(package-install-from-archive, package-install):
(package-menu-execute, package-menu--populate-new-package-list):
* lisp/filenotify.el (file-notify--rm-descriptor):
(file-notify--event-watched-file, file-notify--event-file-name):
(file-notify--event-file1-name, file-notify-rm-watch):
(file-notify-valid-p):
* lisp/gnus/message.el (message-toggle-image-thumbnails):
* lisp/gnus/nnimap.el (nnimap-request-move-article):
* lisp/ibuf-ext.el (ibuffer-repair-saved-filters):
* lisp/mpc.el (mpc-format):
* lisp/net/eww.el (eww-tag-meta, eww-process-text-input):
(eww-save-history):
* lisp/net/shr.el (shr-tag-base, shr-tag-object, shr-make-table-1):
* lisp/progmodes/prog-mode.el (prettify-symbols--post-command-hook):
* lisp/svg.el (svg-remove):
* lisp/textmodes/css-mode.el (css--named-color):
(css--colon-inside-funcall):
* lisp/textmodes/sgml-mode.el (html-current-buffer-classes):
(html-current-buffer-ids): Use if-let* and when-let* instead.
2017-09-12 13:18:10 -04:00
Mark Oteiza
4612b2a2b3 Implement and-let*
This also includes changes to if-let and when-let.  The single tuple
special case is ambiguous, and binding a symbol to nil is not as
useful as binding it to its value outside the lexical scope of the
binding.  (Bug#28254)
* etc/NEWS: Mention.
* lisp/emacs-lisp/subr-x.el (internal--listify):
(internal--build-binding-value-form): Extend to account for
solitary symbols and (EXPR) items in binding varlist.
(if-let*, when-let*): Nix single tuple case and incumbent
bind-symbol-to-nil behavior.
(and-let*): New macro.
(if-let, when-let): Mark obsolete.  Redefine in terms of if-let*, so
they implicitly gain the new features without breaking existing code.
* test/lisp/emacs-lisp/subr-x-tests.el: Adjust tests for: lack of
single-tuple special case, lack of binding solitary symbols to nil,
and the introduction of uninterned symbols for (EXPR) bindings.  Add
SRFI-2 test suite adapted to Elisp.
2017-09-12 13:18:06 -04:00
Alan Mackenzie
f4859757b6 Don't match C++ template delims starting within a token. FIxes bug #28418.
* lisp/progmodes/cc-engine.el (c-restore-<>-properties): After failing an
attempted match from the start of a token (in particular, "<<"), move to the
next token rather than the nex character before searching for the next "<".
2017-09-12 16:23:10 +00:00
Paul Eggert
b3fd6831dc Merge Emacs 25.3 fixes
The security patches released for Emacs 25.3 were less drastic
than what we had immediately put into master.  Adjust master to
match 25.3 (Bug#28350).
* lisp/textmodes/enriched.el (enriched-translations):
Re-enable FUNCTION and display translations that are safe.
(enriched-handle-display-prop): Bring back.
(enriched-decode-display-prop): Bring back, but disable
the unsafe part.
2017-09-12 09:26:37 -07:00
Mark Oteiza
35c893ddaf Move gensym to core Elisp
* doc/lispref/symbols.texi (Creating Symbols): Mention gensym right
after make-symbol.
* etc/NEWS: Mention.
* lisp/emacs-lisp/cl-macs.el (cl--gensym-counter): Alias to
gensym-counter.
(cl-gensym): Alias to gensym.
* lisp/emacs-lisp/cl.el: Remove gensym from list of aliases.
* lisp/emacs-lisp/edebug.el (edebug-make-enter-wrapper):
* lisp/emacs-lisp/ert-x.el (ert-with-message-capture):
(ert--expand-should-1, ert--expand-should):
(ert--should-error-handle-error):
* lisp/emacs-lisp/generator.el (cps--gensym):
* lisp/emacs-lisp/gv.el (setf):
* lisp/emacs-lisp/inline.el (inline--do-letlisteval):
* lisp/emacs-lisp/pcase.el (pcase--make-docstring, pcase-dolist):
(pcase--funcall, pcase--u1): Use gensym.
* lisp/subr.el (gensym-counter): New variable.
(gensym): New function, assimilated from cl-lib.
2017-09-12 11:08:00 -04:00
Mark Oteiza
2ae46b4c0d Fix cl-gentemp
* lisp/emacs-lisp/cl-macs.el (cl--gentemp-counter): New variable.
(cl-gentemp): Use it.  Change prefix to "T".
2017-09-12 11:00:58 -04:00
Sam Steingold
fcf5d894c0 gnus-score-file-name: Do not append empty suffix. 2017-09-12 10:31:26 -04:00
Mark Oteiza
370e04fbb2 Add cl-print method for hash tables
* lisp/emacs-lisp/cl-print.el (cl-print-object): New method.
2017-09-11 22:20:41 -04:00
Mark Oteiza
8130186cfb Add docstrings to cl-print entry points
* lisp/emacs-lisp/cl-print.el (cl-print-compiled): Fix docstring.
(cl-prin1, cl-prin1-to-string): Add docstrings.
2017-09-11 22:16:14 -04:00
Mark Oteiza
f6474b4808 ; Fix previous commit
The printer otherwise includes the 0x prefix.
* lisp/emacs-lisp/cl-print.el: Add 0x to format.
2017-09-11 21:23:38 -04:00
Glenn Morris
23252d4ccf Improve reproducibility of generated leim-list.el
* lisp/international/quail.el (quail-update-leim-list-file):
Sort the quail directory listing, for more stable output.
2017-09-11 18:11:37 -04:00
Philipp Stephani
123d52f69c ; * lisp/files.el (basic-save-buffer-2): Fix typo. 2017-09-11 22:13:04 +02:00
Mark Oteiza
a66155555b Include sxhash of object with printed bytecode
This printing, while succint, is rather opaque.  At least give an
immediate clue of whether different byte code printouts are for the
same or different byte code objects.
* lisp/emacs-lisp/cl-print.el (cl-print-object): Add object sxhash to
printed token "#<bytecode>".
2017-09-11 16:06:06 -04:00
Michael Albinus
7004545244 Further optimization in Tramp's file name decomposition
* lisp/net/tramp.el (tramp-syntax): Recompute all file name
components.  Call `custom-set-variables' after loading.
(tramp-build-prefix-format, tramp-build-prefix-regexp)
(tramp-build-method-regexp)
(tramp-build-postfix-method-format)
(tramp-build-postfix-method-regexp)
(tramp-build-prefix-ipv6-format)
(tramp-build-prefix-ipv6-regexp)
(tramp-build-postfix-ipv6-format)
(tramp-build-postfix-ipv6-regexp)
(tramp-build-postfix-host-format)
(tramp-build-postfix-host-regexp)
(tramp-build-file-name-regexp)
(tramp-build-completion-file-name-regexp): New defuns.
(tramp-prefix-format, tramp-prefix-regexp)
(tramp-method-regexp, tramp-postfix-method-format)
(tramp-postfix-method-regexp, tramp-prefix-ipv6-format)
(tramp-prefix-ipv6-regexp, tramp-postfix-ipv6-format)
(tramp-postfix-ipv6-regexp, tramp-postfix-host-format)
(tramp-postfix-host-regexp)
(tramp-remote-file-name-spec-regexp)
(tramp-file-name-structure, tramp-file-name-regexp)
(tramp-completion-file-name-regexp): Convert defuns into defvars.
(tramp-prefix-regexp-alist)
(tramp-postfix-method-regexp-alist)
(tramp-prefix-ipv6-regexp-alist)
(tramp-postfix-ipv6-regexp-alist)
(tramp-postfix-host-regexp-alist)
(tramp-remote-file-name-spec-regexp-alist): Remove.
(tramp-build-remote-file-name-spec-regexp)
(tramp-build-file-name-structure): Simplify.
(tramp-completion-file-name-regexp-alist): New defconst.
(tramp-tramp-file-p, tramp-dissect-file-name)
(tramp-make-tramp-file-name)
(tramp-completion-make-tramp-file-name)
(tramp-rfn-eshadow-update-overlay-regexp)
(tramp-register-file-name-handlers)
(tramp-completion-handle-file-name-all-completions)
(tramp-completion-dissect-file-name, tramp-clear-passwd):
* lisp/net/tramp-ftp.el (tramp-ftp-file-name-handler):
* lisp/net/tramp-sh.el (tramp-sh-handle-vc-registered)
(tramp-compute-multi-hops): Use variables but functions for
file name components.

* test/lisp/net/tramp-tests.el (tramp-test24-file-name-completion):
Use variables but functions for file name components.
2017-09-11 17:12:32 +02:00
Paul Eggert
2aa0288259 Adjust thumbs to new rename-file behavior
* etc/NEWS: Mention this.
* lisp/thumbs.el (thumbs-rename-images): Treat the destination
as special only if it is a directory name.  When there is
a marked list, turn the destination into a directory name
if it is not already.
2017-09-10 22:31:23 -07:00
Paul Eggert
74b8615fcc Adjust ob-tangle to new copy-file behavior
* lisp/org/ob-tangle.el (org-babel-tangle-publish):
Port to new copy-file behavior.
2017-09-10 22:31:23 -07:00
Paul Eggert
739593d687 Make gnus-copy-file act like copy-file etc.
* etc/NEWS: Mention this.
* lisp/gnus/gnus-util.el (gnus-copy-file): Treat the destination
as special only if it is a directory name.
2017-09-10 22:31:23 -07:00
Paul Eggert
61946d991b Make write-file act like copy-file etc.
Change write-file to be consistent with the new behavior
of copy-file, etc.
* etc/NEWS: Mention this.
* lisp/files.el (write-file): Treat the destination as special
only if it is a directory name.
2017-09-10 22:31:23 -07:00
Paul Eggert
e22794867d Make copy-directory act like copy-file etc.
Do the special dance with the destination only if it is a
directory name, for consistency with copy-file etc. (Bug#27986).
* doc/emacs/files.texi (Copying and Naming):
* doc/lispref/files.texi (Create/Delete Dirs):
* etc/NEWS: Document this.
* lisp/files.el (copy-directory): Treat NEWNAME as special
only if it is a directory name.
2017-09-10 22:31:23 -07:00
Paul Eggert
cf9891e14e Fix some make-directory bugs
* lisp/files.el (files--ensure-directory): New function.
(make-directory): Use it to avoid bugs when (make-directory FOO t)
is invoked on a non-directory, or on a directory hierarchy that
is being built by some other process while Emacs is running.
* test/lisp/files-tests.el (files-tests--make-directory): New test.
2017-09-10 20:38:19 -07:00
Paul Eggert
cdef84fb68 Spelling fixes
* lisp/progmodes/cc-langs.el:
(c-ambiguous-overloadable-or-identifier-prefixes): Rename from
c-ambiguous-overloadable-or-identifier-prefices.  Caller changed.
2017-09-10 09:24:37 -07:00
Mark Oteiza
4973788c6a ; Add to last commit
* lisp/xdg.el (xdg-desktop-entry-regexp): Add a commented capture group
for future reference.
2017-09-10 12:20:06 -04:00
Mark Oteiza
e716538911 Avoid looking at localized strings
* lisp/xdg.el (xdg-desktop-read-group): Add condition to catch
localized strings.
* test/lisp/xdg-tests.el (xdg-desktop-parsing): Add test to ensure
parsing l10n strings doesn't error but is essentially a no-op.
2017-09-09 23:14:07 -04:00
Lars Ingebrigtsen
19584f13b1 Remove unsafe enriched mode translations
* lisp/gnus/mm-view.el (mm-inline-text):
Do not worry about enriched or richtext type.
* lisp/textmodes/enriched.el (enriched-translations):
Remove translations for FUNCTION, display (Bug#28350).
(enriched-handle-display-prop, enriched-decode-display-prop): Remove.
2017-09-09 15:30:07 -07:00
Eli Zaretskii
715f0835b5 Fix font-lock in Compilation mode
* lisp/progmodes/compile.el (compilation-face): Restore function
lost during recent changes.  (Bug#28349)
2017-09-09 21:04:31 +03:00
Mark Oteiza
4131f9785e Add function to read all entries in a group
Use that to extend xdg-desktop-read-file.  Also fix a bug where all
entries in all groups were read and returned by xdg-desktop-read-file.
* lisp/xdg.el (xdg-desktop-read-group): New function.
(xdg-desktop-read-file): Use it.
* test/data/xdg/malformed.desktop: New file.
* test/data/xdg/test.desktop: Add another section.
* test/lisp/xdg-tests.el (xdg-desktop-parsing): Test presence of a key
in another group.  Test reading a prescribed group.  Test detecting a
malformed key=value.
2017-09-09 12:26:50 -04:00
Gemini Lasswell
68b7ecbac1 Reduce Tramp's memory usage
Construct Tramp syntax strings and regular expressions once instead
of every time they are used, and store them in alists keyed by Tramp
syntax.
* tramp.el (tramp-build-remote-file-name-spec-regexp)
(tramp-build-file-name-structure): New functions.
(tramp-prefix-format-alist, tramp-prefix-regexp-alist)
(tramp-method-regexp-alist)
(tramp-postfix-method-format-alist)
(tramp-postfix-method-regexp-alist)
(tramp-prefix-ipv6-format-alist, tramp-prefix-ipv6-regexp-alist)
(tramp-postfix-ipv6-format-alist)
(tramp-postfix-ipv6-regexp-alist)
(tramp-postfix-host-format-alist)
(tramp-postfix-host-regexp-alist)
(tramp-remote-file-name-spec-regexp-alist)
(tramp-file-name-structure-alist): New constants.
(tramp-lookup-syntax): New function.
(tramp-prefix-format, tramp-prefix-regexp, tramp-method-regexp)
(tramp-postfix-method-format, tramp-postfix-method-regexp)
(tramp-prefix-ipv6-format, tramp-prefix-ipv6-regexp)
(tramp-postfix-ipv6-format, tramp-postfix-ipv6-regexp)
(tramp-postfix-host-format, tramp-postfix-host-regexp)
(tramp-remote-file-name-spec-regexp, tramp-file-name-structure):
Use it.
2017-09-09 09:06:00 -07:00
Miles Bader
e91da7f8f2 ; Add a comment for make-text-button in rcirc-markup-urls 2017-09-09 23:28:08 +09:00
Mark Oteiza
be9bc8e67d ; Fix previous commit
See https://lists.gnu.org/archive/html/emacs-devel/2017-09/msg00101.html
* test/lisp/xdg.el: Remove match data tests.
* lisp/xdg.el (xdg-user-dir): Fix docstring. Remove save-match-data.
(xdg-desktop-read-file, xdg-desktop-strings): Remove save-match-data.
2017-09-09 00:46:41 -04:00
Miles Bader
b464dab2af Use text-property buttons in rcirc-markup-urls
* lisp/net/rcirc.el (rcirc-markup-urls): Use `make-text-button'
instead of `make-button'; the former is much more efficient in large
buffers, and for the purposes of rcirc, changes no functionality.
2017-09-09 12:30:33 +09:00
Alex Branham
5f31879e16 New variable 'dired-confirm-killing-deleted-buffers'
* lisp/dired-x.el (dired-clean-confirm-killing-deleted-buffers):
New variable.
* lisp/dired.el (dired-clean-up-after-deletion): Kill buffers
visiting deleted files without confirming if
dired-clean-confirm-killing-deleted-buffers is nil.  (Bug#28373)
* etc/NEWS: Document the change.

Copyright-paperwork-exempt: yes
2017-09-08 12:36:59 +03:00
Alfred M. Szmidt
9b9c93053a Support SVN files with svn:externals property
* lisp/vc/vc-svn.el (vc-svn-parse-status): Don't ignore files
marked with the svn:externals property.

Copyright-paperwork-exempt: yes
2017-09-08 12:19:24 +03:00
Alfred M. Szmidt
e3476d2937 List locally removed files in vc-dir with SVN back-end
* lisp/vc/vc-svn.el (vc-svn-after-dir-status): List files marked
with ?! as needs-update.

Copyright-paperwork-exempt: yes
2017-09-08 12:14:58 +03:00
Ken Olum
f82d9323af Fix Rmail editing with reapplying encoding to message body
* lisp/mail/rmailedit.el (rmail-cease-edit):  If no
content-type in edited headers, look for one in original
headers and add it to edited headers.  (Bug #26918)
Use a marker to track start of new body, so that
content-transfer-encoding gets applied only to body.  (Bug #27353).
Ensure blank line at end of message after encoding, not
before.
2017-09-08 12:08:49 +03:00
Tak Kunihiro
41eb4c518a Make mouse clicks in Dired more customizable
* lisp/dired.el (dired-mouse-find-file): Allow callers to
specify functions to visit file/directory.
(dired-mouse-find-file-other-window)
(dired-mouse-find-file-other-frame): New functions to visit
files in another window/frame.  (Bug#27435)
2017-09-08 11:52:47 +03:00
Wilson Snyder
442fe11143 Fix various verilog-mode.el issues.
* lisp/progmodes/verilog-mode.el (verilog-expand-dirnames): Fix expanding
"*/*", msg2284. Reported by Jonathan Ferguson.
(ignore-errors): Fix ignore-errors error on Emacs 22.3, bug1177. Reported
by Victor Lau.
(verilog-getopt, verilog-getopt-file) (verilog-library-flags,
verilog-substitute-file-name-path): Support -F in verilog getopt files,
bug1171. Reported by George Cuan.
(verilog-do-indent): Fix misindenting symbols starting with t,
bug1169. Reported by Hoai Tran.
(verilog-read-auto-template-middle): Fix slow template matching on
AUTOINST. Reported by Jeffrey Huynh.
(verilog-pretty-expr): The extra whitespace addition before "=" operators
is now done only if the whole assignment block contains the 2-character
"<=" operator.  Remove the unused argument _myre.  Use `unless',
`save-excursion' and `when' functions where possible.  Internal variables
refactored for clarity.  Follow elisp convention for closing parentheses.
By Kaushal Modi.
(verilog-get-lineup-indent-2): Update docstring.  Internal variables
refactored for clarity.  Earlier EDPOS argument was expected to be a
marker; it is now renamed to END and is now expected to be a position.
Use `when' instead of `if'.  By Kaushal Modi.
(electric-verilog-terminate-line): Remove the unused second argument from
`verilog-pretty-expr' call.  By Kaushal Modi.
(verilog-calc-1): Fix indentation of a virtual class definition after a
typedef class, bug1080.  By Kaushal Modi.
2017-09-07 23:24:28 -04:00
Katsumi Yamaoka
9546e1eba5 Don't use summary window to visit group buffer (bugfix)
* lisp/gnus/gnus-sum.el (gnus-summary-jump-to-group): Make sure that
the window to open the group buffer doesn't visit the summary buffer.
This fixes a bug: `gnus-summary-next-article' sometimes causes an error
by trying to select nonexistent summary window.
2017-09-08 02:16:19 +00:00
Mark Oteiza
9604f9cd33 Add XDG desktop file parsing and tests
* lisp/xdg.el: Add support for Desktop Entry Specification.
(xdg--user-dirs-parse-line): Check if file is readable.
(xdg-desktop-group-regexp, xdg-desktop-entry-regexp): New variables.
(xdg--desktop-parse-line, xdg-desktop-read-file, xdg-desktop-strings):
New functions.
* test/lisp/xdg-tests.el:
* test/data/xdg/test.desktop:
* test/data/xdg/wrong.desktop: New files.
2017-09-06 13:17:05 -04:00
Mark Oteiza
da3e101634 ; Try not to affect match data
* lisp/xdg.el (xdg-user-dir): Use save-match-data.
2017-09-06 11:20:21 -04:00
Glenn Morris
01a82957d2 ; * lisp/emacs-lisp/ert.el (ert-batch-backtrace-right-margin): Fix tag. 2017-09-05 20:53:57 -04:00
Glenn Morris
52c9c6b9d8 Allow customizing line length of ert backtraces in batch mode
* lisp/emacs-lisp/ert.el (ert-batch-backtrace-right-margin):
Make it a user option.
(ert-run-tests-batch): Handle ert-batch-backtrace-right-margin nil.
2017-09-05 20:40:10 -04:00
Mark Oteiza
964d672a7f Refactor some loops in mailcap.el
* lisp/net/mailcap.el (mailcap-mime-types):
(mailcap-file-default-commands): Convert nested maps to loops.
2017-09-05 16:45:13 -04:00
Simen Heggestøyl
fca6238453 Handle non-zero exit status from psql more gracefully
* lisp/progmodes/sql.el (sql-postgres-list-databases): Handle non-zero
exit statuses from `psql -ltX' more gracefully by returning nil.

* test/lisp/progmodes/sql-tests.el
(sql-tests-postgres-list-databases-error): New test.
2017-09-05 20:31:21 +02:00
Mark Oteiza
485e25312d Move soundex.el test to a proper test
* test/lisp/soundex-tests.el: New file.
* lisp/soundex.el: Use lexical-binding.  Remove commented test.
2017-09-05 12:03:10 -04:00
Michael Albinus
8a65d7a731 Work on Tramp's (symbolic) links
* doc/misc/tramp.texi (Traces and Profiles): Mention the
backtrace when tramp-verbose is greater than or equal to 10.

* lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist):
Use `tramp-handle-add-name-to-file'.

* lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist): Use
`tramp-handle-add-name-to-file' and `tramp-handle-file-truename'.

* lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link): Improve.

* lisp/net/tramp-smb.el (tramp-smb-errors):
Add "NT_STATUS_CONNECTION_DISCONNECTED" and
"NT_STATUS_OBJECT_PATH_SYNTAX_BAD".
(tramp-smb-file-name-handler-alist): Use `tramp-handle-file-truename'.
(tramp-smb-do-file-attributes-with-stat): Return non-nil only
if one of the attributes is non-nil.
(tramp-smb-handle-file-local-copy): Use `file-truename'.
(tramp-smb-handle-file-truename): Move to tramp.el.
(tramp-smb-handle-insert-directory): Show symlinks.
(tramp-smb-handle-make-symbolic-link): Improve.
(tramp-smb-read-file-entry): Handle extended file modes in Samba.

* lisp/net/tramp.el (tramp-handle-add-name-to-file)
(tramp-handle-file-truename): New defuns.

* test/lisp/net/tramp-tests.el (tramp-test21-file-links): Extend test.
(tramp--test-check-files): Make check for "smb".
2017-09-04 13:10:52 +02:00
Mark Oteiza
9314e6c56e Embed JSON readtable into json-read
Also unroll dispatch into a cond.
* lisp/json.el (json-readtable): Remove.
(json-readtable-dispatch): New macro.  Assimilate json-readtable.
(json-read): Use the macro.
2017-09-04 03:40:30 -04:00
Mark Oteiza
132f4472f5 Hexify strings in EWW search queries
Previously, inputting "cats & dogs" would lose dogs because the
ampersand signifies a query parameter.  Instead, hexify each word while
preserving quotes with split-string.
* lisp/net/eww.el (eww--dwim-expand-url): Join hexified words together
with + separators, instead of replacing whitespace with +.
2017-09-03 20:42:01 -04:00
Eli Zaretskii
673e6d35ac * lisp/simple.el (visual-line-mode): Doc fix. (Bug#28337) 2017-09-03 18:20:31 +03:00
Alan Mackenzie
c8439abe22 Correct the fontification of quote marks after buffer changes in CC Mode.
* lisp/progmodes/cc-defs.el
(c-search-forward-char-property-with-value-on-char): New macro.

* lisp/progmodes/cc-mode.el (c-parse-quotes-before-change)
(c-parse-quotes-after-change): Rewrite the functions, simplifying
considerably, and removing unnecessary optimisations.  Invalidate two caches
after manipulating text properties.
2017-09-03 11:01:21 +00:00
Alan Mackenzie
b733a91009 Fix fontification of "operator~" in C++ Mode.
* lisp/progmodes/cc-langs.el (c-ambiguous-overloadable-or-identifier-prefices)
(c-ambiguous-overloadable-or-identifier-prefix-re): New c-lang-defconsts/vars.

* lisp/progmodes/cc-engine.el (c-forward-name): Do not try to parse "~" (and
two other symbols) as a cast without good evidence.  Prefer an overloaded
operator in ambiguous cases.
2017-09-03 09:40:31 +00:00
Eli Zaretskii
dbe1e55dc4 Fix decrypting in plstore.el on MS-Windows
* lisp/plstore.el (plstore-open): Bind coding-system-for-read to
raw-text, instead of using insert-file-contents-literally.
(Bug#28114)
2017-09-02 13:02:10 +03:00
Mark Oteiza
55ac7505a0 Turn off checkdoc complaint about default argument order
* etc/NEWS: Mention change.
* lisp/emacs-lisp/checkdoc.el (checkdoc-arguments-in-order-flag):
Disable by default, note version.
2017-09-01 17:31:45 -04:00
Stefan Monnier
c4ccafb1a5 * lisp/obsolete/html2text.el: Don't require CL
(html2text-clean-anchor): Mark unused arg.
2017-09-01 14:29:57 -04:00
Glenn Morris
2d420fb6b1 ; Auto-commit of loaddefs files. 2017-09-01 06:26:57 -04:00
Katsumi Yamaoka
356413bbf8 Don't remove undisplayers from inlined MIME parts (bugfix)
* lisp/gnus/gnus-art.el (gnus-mime-buttonize-attachments-in-header):
Don't remove undisplayers from inlined MIME parts (bugfix);
Simplify criterion that finds attachments.
2017-09-01 07:25:38 +00:00
Mark Oteiza
c5c9f5d718 ; Escape some character literals
* lisp/leim/quail/latin-ltx.el: Escape some fancy brackets.
2017-08-31 17:32:10 -04:00
Mark Oteiza
96c2c098ae Make ucs-names a hash table (Bug#28302)
* etc/NEWS: Mention the type change.
* lisp/descr-text.el (describe-char): Use gethash to access ucs-names.
Hardcode BEL's name into the function instead of needlessly mapping
over the hash table in the spirit of rassoc.
* lisp/international/mule-cmds.el (ucs-names): Fix variable and
function docstrings.  Initialize a hash table for ucs-names--the
number of entries is 42845 here.  Switch to hash-table
getters/setters.
(mule--ucs-names-annotation): Use hash-table getter.
(char-from-name): Upcase the string if ignore-case is truthy.
* lisp/leim/quail/latin-ltx.el: Use maphash instead of dolist.
2017-08-31 17:22:39 -04:00
Alan Mackenzie
5fe41a23d8 Fix a glitch in CC Mode's syntactic whitespace cache.
* lisp/progmodes/cc-engine.el (c-forward-sws): Deal correctly with a block
comment close at the end of a macro.
2017-08-31 19:06:16 +00:00
Alan Mackenzie
201f950e66 Correct the fontification of C++ Mode enclosed declarations.
* lisp/progmodes/cc-fonts.el (c-font-lock-enclosing-decls): abolish the
spurious check that the character before the start of an enclosed declaration
must be ; or }.  It might also be {.
2017-08-31 18:08:21 +00:00
Katsumi Yamaoka
a4f6b1097f Respect directory a user enters (bug#28299)
* lisp/gnus/mm-decode.el (mm-save-part):
Respect directory a user enters (bug#28299).
2017-08-31 00:45:54 +00:00