1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-01 08:17:38 +00:00
Commit Graph

130232 Commits

Author SHA1 Message Date
Mats Lidell
44b06ac657 * etc/tutorials/TUTORIAL.sv: synced with TUTORIAL 2017-08-19 00:34:08 +02:00
Ted Zlatanov
3565437bf2
Add auth-source tests and codify its API better
The auth-source behavior was unclear in some API use cases, so these
extra tests codify and test it. For details see
https://github.com/DamienCassou/auth-password-store/issues/29

* lisp/files.el (make-temp-file): Add new initial TEXT parameter.
* test/lisp/auth-source-tests.el (auth-source-test-searches): Add
  auth-source tests and simplify them with the new `make-temp-file'.
2017-08-18 18:31:00 -04:00
Eli Zaretskii
e962ca57e0 Don't call the same hook twice due to obsolete aliases
* lisp/international/robin.el (robin-activate):
* lisp/international/quail.el (quail-activate):
* lisp/international/mule-cmds.el (deactivate-input-method):
* lisp/emulation/viper-init.el (viper-deactivate-input-method):
Don't call the same hook twice, when the obsolete and the
advertised symbols are aliased.  (Bug#28118)
2017-08-18 12:33:08 +03:00
Felipe Ochoa
fb1a489757 A new face for show-paren in expression mode
* lisp/faces.el (show-paren-match-expression): Define the new face.
* lisp/paren.el (show-paren-function): Apply the different face
when in expression mode.  (Bug#28047)

Copyright-paperwork-exempt: yes
2017-08-18 12:05:12 +03:00
Eli Zaretskii
99b3250d04 Non-ASCII support for man page section and header names
* lisp/man.el (Man-name-regexp, Man-page-header-regexp)
(Man-heading-regexp): Replace ASCII character classes by
equivalent classes that allow non-ASCII characters.  Suggested by
Grégory Mounié <Gregory.Mounie@imag.fr>.  (Bug#27978)
2017-08-18 11:47:29 +03:00
Eli Zaretskii
a1ed97e510 Implement HiDPI support for underwave on MS-Windows
* src/w32term.c (x_get_scale_factor): New function.
(w32_draw_underwave): Use it.
* src/xterm.c (x_draw_underwave): Offset the wave starting point
to make it identical with original code.
2017-08-18 11:32:10 +03:00
Stephen Pegoraro
efb508bbb4 Support HiDPI displays for wave style underlines
* src/xterm.c (x_draw_underwave): Compute height, length and thickness
based on scale factor.
(x_get_scale_factor): New function.

Copyright-paperwork-exempt: yes
2017-08-18 11:02:40 +03:00
Bastien
65d3c27fe1 Delete library-of-babel.org
* etc/org/library-of-babel.org: Delete file.
2017-08-18 09:39:54 +02:00
Eli Zaretskii
bc5fba7aae ; Minor copyedits in manuals.
* doc/lispref/variables.texi (Lexical Binding): The future is here.

* doc/emacs/files.texi (Copying and Naming): Use @w{..} around
constructs that could be split between lines, but shouldn't.
2017-08-18 09:33:11 +03:00
Glenn Morris
7ab95461f7 * doc/emacs/files.texi (Copying and Naming): Avoid confusing texi2pdf. 2017-08-17 21:49:27 -04:00
Noam Postavsky
cb7aa6c4a3 Remove custom version parsing from epg-config.el (Bug#27963)
* lisp/epg-config.el (epg-config--compare-version)
(epg-config--parse-version): Remove.
(epg-check-configuration): Use `version<=' instead.
2017-08-17 20:51:39 -04:00
Mark Oteiza
87645443b5 Treat control characters in JSON strings as invalid
* lisp/json.el (json-peek): Reduce to following-char.
(json-pop, json-read): Zero (null char) means end of file.
(json-read-escaped-char): Delimit URL properly.
(json-read-string): Signal error for ASCII control characters.
* test/lisp/json-tests.el (test-json-peek): Check for zero instead of
:json-eof symbol.
(test-json-read-string): New test for control characters in JSON
strings.
2017-08-17 20:00:52 -04:00
Eli Zaretskii
61631476d7 Support Posix semantics of 'rename' on MS-Windows
* src/w32.c (sys_rename_replace): Support Posix semantics of
'rename': return an error if OLD is a directory while NEW is not,
or vice versa.
2017-08-17 19:48:49 +03:00
Eli Zaretskii
7791bca1c5 * src/w32.c (sys_rename_replace): Support renaming a directory. 2017-08-17 17:58:08 +03:00
Eli Zaretskii
5a5aa6ed27 Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2017-08-17 17:44:22 +03:00
Eli Zaretskii
2cfb32bf4c Fix the MS-Windows build
* nt/gnulib-cfg.mk (OMIT_GNULIB_MODULE_open): Omit Gnulib module
'open'.

* lib-src/etags.c (O_CLOEXEC) [WINDOWSNT]: Restore definition.
2017-08-17 17:43:19 +03:00
João Távora
13993c46a2 Add flymake-backends defcustom
* lisp/progmodes/flymake-proc.el (flymake-proc-can-syntax-check-buffer):
Rename from flymake-can-syntax-check-file.  Suitable for adding to
flymake-backends.
(flymake-proc-start-syntax-check): Rename from
flymake-start-syntax-check.  Don't check again if buffer can be
checked.
(add-to-list flymake-backends): Hook only flymake-ui.el

* lisp/progmodes/flymake-ui.el (flymake-backends): New
defcustom.
(flymake-on-timer-event, flymake-after-change-function)
(flymake-after-save-hook, flymake-find-file-hook): Call new
flymake--start-syntax-check-buffer and
flymake--can-syntax-check-buffer.
(flymake-mode): Call flymake--can-syntax-check-buffer and set
flymake-backend.
(flymake--backend): New buffer-local variable.
2017-08-17 14:18:00 +01:00
João Távora
eb34f7f5a2 Split flymake.el into flymake-proc.el and flymake-ui.el
flymake.el is now a stub that requires both files.

* lisp/progmodes/flymake-proc.el: New file.

* lisp/progmodes/flymake-ui.el: New file.

* lisp/progmodes/flymake.el: Split into flymake-ui.el and
  flymake-proc.el.  Require both files.
2017-08-17 13:37:35 +01:00
Michael Albinus
ddda5ae547 Set `default-directory' for watchdog in tramp-test.el
* test/lisp/net/tramp-tests.el (tramp-test36-asynchronous-requests):
Set `default-directory' for watchdog.
2017-08-17 11:35:41 +02:00
Andreas Schwab
10a5a52f1d * lisp/term/konsole.el: New file. 2017-08-17 11:14:07 +02:00
Noam Postavsky
3f938e1aea * lisp/woman.el (woman-push, woman-pop): Remove. (Bug#27962)
(woman2-RS): Use plain `push' instead of `woman-push'.
(woman2-RE): Conditionally `pop' instead of `woman-pop'.
2017-08-16 20:25:18 -04:00
Paul Eggert
794c3cd3a2 Merge from Gnulib; use ‘open’ for O_CLOEXEC
This incorporates:
2017-08-15 renameat: ensure declaration in <stdio.h> on NetBSD
2017-08-15 extensions: enable NetBSD specific extensions
2017-08-14 open: support O_CLOEXEC
2017-08-13 reallocarray: new module
* admin/merge-gnulib (AVOIDED_MODULES): Remove ‘open’, since
it now supports O_CLOEXEC and this simplifies Emacs.
* build-aux/config.guess, lib/fcntl.in.h, lib/stdio.in.h:
* lib/stdlib.in.h, m4/extensions.m4, m4/stdlib_h.m4:
Copy from Gnulib.
* lib/cloexec.c, lib/cloexec.h, lib/open.c:
* m4/mode_t.m4, m4/open-cloexec.m4, m4/open.m4:
New files, copied from Gnulib.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* lib-src/etags.c (O_CLOEXEC) [WINDOWSNT]:
Remove, as Gnulib does this for us.
* src/filelock.c (create_lock_file):
* src/sysdep.c (emacs_open, emacs_pipe):
Don’t worry about O_CLOEXEC == 0, as Gnulib no longer sets it to 0.
2017-08-16 14:04:33 -07:00
Alan Third
69f2b755f4 Allow use of run-time OS version checks on macOS (bug#27810)
* src/nsterm.h (NSWindowTabbingMode): Define in pre-Sierra macOS.
(MAC_OS_X_VERSION_10_6, MAC_OS_X_VERSION_10_7, MAC_OS_X_VERSION_10_8,
MAC_OS_X_VERSION_10_9, MAC_OS_X_VERSION_10_12, HAVE_NATIVE_FS): Remove
defines.
(NSWindowStyleMaskFullScreen,
NSWindowCollectionBehaviorFullScreenPrimary,
NSApplicationPresentationFullScreen,
NSApplicationPresentationAutoHideToolbar): Define in macOS 10.6.
* src/nsterm.m (colorForEmacsRed, colorUsingDefaultColorSpace,
check_native_fs, ns_read_socket, ns_select, runAlertPanel,
initFrameFromEmacs, windowDidMiniaturize, windowDidEnterFullScreen,
windowDidExitFullScreen, isFullscreen, updateCollectionBehavior,
toggleFullScreen, constrainFrameRect, scrollerWidth, syms_of_nsterm):
Allow use of run-time checks and replace version check macros.
* src/nsfns.m (ns_screen_name): Use run-time OS version checks.
* src/macfont.m (macfont_draw): Use run-time OS version checks.
* src/nsmenu.m (menuWillOpen): Use run-time OS version checks.

Co-authored-by: Charles A. Roelli <charles@aurox.ch>
2017-08-16 20:56:55 +01:00
Alan Third
3505b77ad7 Add multiframe image support to NS port (bug#21714)
* src/nsimage.m (ns_load_image): Handle multiple frames.
(EmacsImage::getMetadata, EmacsImage::setFrame): New functions.
* src/nsterm.h (EmacsImage::getMetadata, EmacsImage::setFrame): New
function prototypes.
2017-08-16 20:56:55 +01:00
Tino Calancha
400934b694 files-tests.el: Remove unused lexical variable
* test/lisp/files-tests.el (file-test--do-local-variables-test);
Remove unused var 'files-test-queried'.
2017-08-16 20:14:52 +09:00
Michael Albinus
3b8446439b * doc/emacs/files.texi (Copying and Naming): Mention
restrictions to add-name-to-file and make-symbolic-link on
remote systems.
2017-08-16 12:11:37 +02:00
Michael Albinus
142397e3a7 * lisp/net/ange-ftp.el (ange-ftp-skip-msgs): Further support ftp-ssl. 2017-08-16 11:52:12 +02:00
Noam Postavsky
3305dec538 Add tests for previous commit
* test/lisp/progmodes/elisp-mode-tests.el
(elisp-mode-tests--face-propertized-string): New function.
(elisp--highlight-function-argument-indexed)
(elisp--highlight-function-argument-keyed-1)
(elisp--highlight-function-argument-keyed-2): New tests.
2017-08-15 21:22:41 -04:00
Thierry Volpiatto
55c9238189 Fix eldoc highlighting for &key args (Bug#27272)
* lisp/progmodes/elisp-mode.el (elisp--highlight-function-argument):
Only switch to keyword-based searching if INDEX point beyond `&key' in
the argument list.  All arguments prior to the `&key' are position
based.  Additionally, be more strict about what is a keyword when
searching for the current keyword.
2017-08-15 21:22:41 -04:00
Paul Eggert
e97aebd8fe Do not assume regular Git .git/hooks dir
Apparently Gitlab doesn’t create .git/hooks, like regular Git does.
Problem reported by Ted Zlatanov in:
http://lists.gnu.org/archive/html/emacs-devel/2017-08/msg00380.html
* autogen.sh (git_sample_hook_src): New function.  Use it to work
even if .git/hooks or its samples do not exist.
2017-08-15 13:31:26 -07:00
Paul Eggert
5c3d0ce3e0 New manual section "Copying and Naming"
* doc/emacs/files.texi (Copying and Naming):
New section, split off from Misc File Ops and containing the
operations that copy, name or rename files.  This fixes some
confusion caused by the incorrect phrase "The same rule applies
to all the remaining commands in this section" in the old manual.
This change does not affect the confusion about directories (see
Bug#27986 for ongoing discussion).
2017-08-15 10:16:33 -07:00
Eli Zaretskii
63daecda01 Fix the MS-Windows build
* src/fileio.c (Frename_file): Don't use ENOTSUP if it is equal to
ENOSYS.  (Bug#28097)  (Bug#27986)
2017-08-15 19:17:41 +03:00
Ted Zlatanov
7f8e50fb2a
* .gitlab-ci.yml: run "autogen.sh autoconf" to avoid Git. 2017-08-15 10:07:46 -04:00
Ted Zlatanov
b95efd359c
* .gitlab-ci.yml: add Git to the installed packages. 2017-08-15 10:01:04 -04:00
Simen Heggestøyl
141cc78aa4 Support indentation of detached Less CSS rulesets
* lisp/textmodes/css-mode.el (css-smie-rules): Provide better support
for indentation of detached rulesets passed to Less mixins.

* test/manual/indent/less-css-mode.less: New file.
2017-08-15 14:38:15 +02:00
Simen Heggestøyl
85a9f42b6c Fixes and tweaks for the new Less CSS mode
* etc/NEWS: Add an entry for the new mode.

* lisp/textmodes/less-css-mode.el (less-css): Tweak docstring.
(less-css-lessc-command): Tweak docstring. Don't mark it as
safe. Don't autoload.
(less-css-compile-at-save, less-css-lessc-options)
(less-css-output-directory): Tweak docstrings. Don't autoload.
(less-css-output-file-name): Tweak docstring. Don't mark it as safe.
(less-css-input-file-name): Tweak docstring. Don't autoload.
(less-css-compile-maybe): Use `when' for one-armed `if'.
(less-css--output-path): Tweak docstring.
(less-css--maybe-shell-quote-command): Remove function.
(less-css-compile): Don't autoload. Tweak docstring and message. Fix
compiler warning. Use `string-join' instead of `mapconcat'.
(less-css-font-lock-keywords): Use `font-lock-variable-name-face' for
variables.
(less-css-mode-syntax-table, less-css-mode-map): New variables.
(less-css-mode): Change status line mode name from "LESS" to
"Less". Tweak docstring. Move syntax table definitions to
`less-css-mode-syntax-table'.
(less-css-indent-line): Remove function.
2017-08-15 12:29:10 +02:00
Steve Purcell
3f887812e7 New major mode: Less CSS mode
* lisp/textmodes/less-css-mode.el: New file.
2017-08-15 12:28:53 +02:00
Tino Calancha
66b75d3f20 archive-int-to-mode: Fix order of testing S_ISUID, S_ISGID bits
* lisp/arc-mode.el (archive-int-to-mode):
Swap order of 2048 and 1024 tests (Bug#28092).
* test/lisp/arc-mode-tests.el (arc-mode-test-archive-int-to-mode):
Update test.
2017-08-15 15:43:31 +09:00
Paul Eggert
97460582e2 Improve rename-file port to macOS
* src/fileio.c (Frename_file): On macOS, renameat_noreplace can
fail with errno == ENOTSUP on file systems where it is not
supported, according to the Apple documentation.
2017-08-14 18:16:23 -07:00
Noam Postavsky
e88bbd22c5 Speed up ./configure with more caching (Bug#27960)
* configure.ac: Cache the 'GTK compiles', 'GSettings is in gio',
'LN_S', '-znocombreloc', 'sysinfo', 'gcc autodepends', '-b link',
'Xkb', 'Xpm preprocessor', 'tputs library' 'GLib', 'signals via
characters', and 'Windows API header' checks.  Remove pause after
warning about GTK bug.
2017-08-14 20:19:12 -04:00
Paul Eggert
13a846823a Improve rename-file behavior on macOS
Problem reported by Philipp Stephani (Bug#27986).
* src/fileio.c (Frename_file):
Worry about file name case sensitivity only if CYGWIN or DOS_NT.
* src/sysdep.c (renameat_noreplace): Use renameatx_np on macOS,
since this provides the necessary atomicity guarantees.
2017-08-14 15:53:28 -07:00
Glenn Morris
4fe9a9efcf Clean up temp files after some tests
* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp-tests--with-temp-file): Also delete .elc file if present.
* test/lisp/progmodes/etags-tests.el
(etags-buffer-local-tags-table-list): Delete temp file at end.
2017-08-14 17:23:18 -04:00
Eli Zaretskii
5ba4c7d16b Implement renameat_noreplace for MS-Windows
* src/sysdep.c (renameat_noreplace) [WINDOWSNT]: Implement minimal
emulation for MS-Windows.  (Bug#27986)
2017-08-14 19:31:12 +03:00
Eli Zaretskii
16f11be4b9 Fix 'rename' on MS-Windows
* src/w32.c (sys_rename_replace): Use the FORCE argument only if
the primitive rename errors out with EEXIST.
2017-08-14 19:17:22 +03:00
Michael Albinus
65899e5b01 * lisp/net/ange-ftp.el (ange-ftp-skip-msgs): Support ftp-ssl. 2017-08-14 18:05:58 +02:00
Mark Oteiza
ab2da681b9 Tiny JSON performance improvement
Get rid of some needless uses of apply.  Measuring with
  (benchmark-run 10 (json-read-file "test.json"))
showed 1.5-2.5% reduction of execution time.
* lisp/json.el (json-peek): Nix let-binding.
(json-read-string): Use concat for making a string from chars.
(json-read-array): Use cond and more appropriate conversion instead
of blindly applying.
2017-08-14 01:54:11 -04:00
Paul Eggert
5bdc97d55d Be consistent in spelling 'ok-if-already-exists'. 2017-08-13 11:55:12 -07:00
Eli Zaretskii
8de2edd9ef Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2017-08-13 18:58:24 +03:00
Alexander Gramiak
e2e3856141 Use 'header-line-highlight' face in proced and erc
* lisp/erc/erc-list.el (erc-list-button):
* lisp/proced.el (proced-format): Use the 'header-line-highlight
face.  (Bug#28033)
2017-08-13 17:56:31 +03:00
Ulf Jasper
abab4b091f Remove feeds with dead uris from newsticker--raw-url-list-defaults
* lisp/net/newst-backend.el (newsticker--raw-url-list-defaults):
  Remove feeds with dead uris.
2017-08-13 16:55:03 +02:00