1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-13 09:32:47 +00:00
Commit Graph

128009 Commits

Author SHA1 Message Date
Paul Eggert
65b729bfb4 * src/lisp.h: Update comment to kick -Og down the road. 2016-12-04 18:19:22 -08:00
Mark Oteiza
d3405f8c49 More image-dired refactoring
* lisp/image-dired.el: Remove TODO comment. This appears to have been
implemented in 5d7433a "image-dired: Signal an error before calling a
missing executable".
(image-dired-cmd-create-standard-thumbnail-command): Use %p specifier.
Add :version.
(image-dired-display-thumbs, image-dired-create-thumbs): Use dolist and
when. Remove superfluous call to image-dired-thumb-name. Move single nil
binding and setq into dolist form.
2016-12-04 13:43:03 -05:00
Eli Zaretskii
de4624c99e Merge branch 'concurrency'
Conflicts (resolved):
	configure.ac
	src/Makefile.in
	src/alloc.c
	src/bytecode.c
	src/emacs.c
	src/eval.c
	src/lisp.h
	src/process.c
	src/regex.c
	src/regex.h
2016-12-04 19:59:17 +02:00
Michael Albinus
35a86f0b6f Implement quoting the local part of a remote file name
* doc/emacs/files.texi (Quoted File Names):
* etc/NEWS: Mention quoting the local part of a remote file name.

* lisp/net/tramp.el (tramp-dissect-file-name): Check with
`tramp-tramp-file-p'.
(tramp-quoted-name-p, tramp-quote-name, tramp-unquote-name):
New defsubst.
(tramp-handle-substitute-in-file-name)
(tramp-handle-make-auto-save-file-name): Handle quoted files.
(tramp-shell-quote-argument): Unquote argument.

* lisp/net/tramp-sh.el (tramp-sh-handle-file-truename):
Handle quoted files.

* test/lisp/net/tramp-tests.el (tramp--test-expensive-test): New defvar.
(tramp--test-make-temp-name): New argument QUOTED.
(tramp-test01-file-name-syntax)
(tramp-test02-file-name-dissect)
(tramp-test04-substitute-in-file-name)
(tramp-test05-expand-file-name, tramp-test07-file-exists-p)
(tramp-test08-file-local-copy)
(tramp-test09-insert-file-contents)
(tramp-test10-write-region, tramp-test11-copy-file)
(tramp-test12-rename-file, tramp-test13-make-directory)
(tramp-test14-delete-directory, tramp-test15-copy-directory)
(tramp-test16-directory-files)
(tramp-test17-insert-directory)
(tramp-test18-file-attributes)
(tramp-test19-directory-files-and-attributes)
(tramp-test20-file-modes, tramp-test21-file-links)
(tramp-test22-file-times, tramp-test23-visited-file-modtime)
(tramp-test24-file-name-completion, tramp-test25-load)
(tramp-test26-process-file, tramp-test27-start-file-process)
(tramp-test28-shell-command, tramp-test30-vc-registered)
(tramp-test31-make-auto-save-file-name)
(tramp--test-check-files)
(tramp-test35-asynchronous-requests): Test also quoted file names.
(tramp--test-shell-command-to-string-asynchronously): Rename.
(tramp-test29-environment-variables): Use it.
2016-12-04 12:12:06 +01:00
Tino Calancha
35d5470962 Fix typo in dired-omit-case-fold-p
* lisp/dired-x.el (dired-omit-case-fold-p):
Write 'file-name-case-insensitive-p' instead of
'file-name-case-sensitive-p'.
Add declaration of 'file-name-case-insensitive-p'.
2016-12-04 18:12:59 +09:00
Simen Heggestøyl
d993aaf9cd Add HTML5 attributes for the input element
* lisp/textmodes/sgml-mode.el (html-tag-alist): Add HTML5 attributes
for the input element.
2016-12-04 09:51:12 +01:00
Glenn Morris
dd210a63df Obsolete sc-load-hook in favor of eval-after-load
* lisp/mail/supercite.el (sc-load-hook): Make obsolete.
* doc/misc/sc.texi (Getting Connected, Filling Cited Text):
No longer mention sc-load-hook.
2016-12-03 19:27:41 -08:00
Glenn Morris
041e90962b Obsolete calendar-load-hook in favor of eval-after-load
* lisp/calendar/calendar.el (calendar-load-hook): Make obsolete.
(calendar): Doc fix - no longer mention calendar-load-hook.
* doc/emacs/cal-xtra.texi (Calendar Customizing):
No longer mention calendar-load-hook.
* doc/lispintro/emacs-lisp-intro.texi (X11 Colors):
Replace calendar-load-hook in example with with-eval-after-load.
2016-12-03 19:22:37 -08:00
Glenn Morris
c387127fee Fix markup in read-multiple-choice doc (Bug#25102)
* lisp/emacs-lisp/subr-x.el (read-multiple-choice): Doc fix.
2016-12-03 18:14:53 -08:00
Glenn Morris
041afb2d37 Stop flymake using dialog boxes for errors (Bug#16622)
* lisp/progmodes/flymake.el (flymake-gui-warnings-enabled):
Mark as obsolete.
(flymake-display-warning): Turn into an obsolete alias.
(flymake-report-fatal-status): Just use message for a warning that
was formerly displayed by default.
2016-12-03 17:59:36 -08:00
Mark Oteiza
b905454680 Clean up keymap and menu code in image-dired
A function to populate these maps is not necessary, just define the maps
once and for all.
* lisp/image-dired.el (image-dired-show-all-from-dir): Make prompt
clearer and in the spirit of dired's.
(image-dired-define-display-image-mode-keymap):
(image-dired-define-thumbnail-mode-keymap): Remove.
(image-dired-thumbnail-mode-map):
(image-dired-thumbnail-mode-line-up-map):
(image-dired-thumbnail-mode-tag-map): Assimilate all define-key and mode
menu code from the aforementioned removed functions.  Reorder so that
the definitions are inherited properly.
(image-dired-display-current-image-sized): Fix erroneous message.
(image-dired-thumbnail-mode):
(image-dired-display-image-mode): Remove defunct call.
2016-12-03 16:18:48 -05:00
Michael Albinus
e72b24fb4a Mention `file-name-case-insensitive-p' as magic file name
* doc/lispref/files.texi (Magic File Names):
Mention `file-name-case-insensitive-p'.

* doc/lispref/variables.texi (Connection Local Variables):
Fix typo.
2016-12-03 19:54:24 +01:00
Mark Oteiza
ac83325b1d Clean up uses of cl-foo in image-dired
Both instances here are just emulating cl-find-if.
* lisp/image-dired.el: Use cl-lib at compile time.
(image-dired-dired-toggle-marked-thumbs): Don't need let* at the top.
Replace the cl-foo instances with equivalent cl-loops.
2016-12-03 13:05:39 -05:00
Eli Zaretskii
a486fabb41 Avoid compilation warnings in nt/*.c files
* nt/cmdproxy.c (fail, vfprintf, fprintf, printf, warn)
(console_event_handler): Add prototypes.
(canon_filename, skip_space, skip_nonspace, get_next_token)
(batch_file_p, search_dir, make_absolute, try_dequote_cmdline)
(spawn, get_env_size): Now static.
* nt/ddeclient.c (DdeCallback): Provide prototype.
* nt/addpm.c (DdeCallback): Provide prototype.
(add_registry): Now static.
2016-12-03 11:54:24 +02:00
Mark Oteiza
143a430675 Display window before calculating width
* lisp/image-dired.el (image-dired-display-thumbs): Display the buffer
before calling image-dired-line-up and friends, which in turn calculate
the window width. Otherwise, the thumbnail layout will be wrong in
a side-by-side split.
2016-12-03 00:58:26 -05:00
Mark Oteiza
5e915691ff Use pop-to-buffer-same-window
* lisp/image-dired.el (image-dired-dired-with-window-configuration):
(image-dired-dired-edit-comment-and-tags): Instead of switch-to-buffer,
use pop-to-buffer-same-window cf. Bug#22244.
(image-dired-forward-image, image-dired-backward-image): Ignore unused.
2016-12-03 00:58:18 -05:00
Noam Postavsky
88fefc3291 ; Merge: Lisp watchpoints (Bug#24923) 2016-12-02 20:44:47 -05:00
Noam Postavsky
56c817837b Document watchpoints
* doc/lispref/debugging.texi (Variable Debugging):
* doc/lispref/variables.texi (Watching Variables): New section.
* etc/NEWS: Add entry for watchpoints
2016-12-02 20:25:15 -05:00
Noam Postavsky
e7cd98b86f Add tests for watchpoints
* test/src/data-tests.el (data-tests-variable-watchers):
(data-tests-local-variable-watchers): New tests.
2016-12-02 20:25:15 -05:00
Noam Postavsky
d3faef9bae Ensure redisplay using variable watcher
This replaces looking up the variable name in redisplay--variables when
setting it.

* lisp/frame.el: Replace redisplay--variables with add-variable-watcher
calls.
* src/xdisp.c (Fset_buffer_redisplay): Rename from maybe_set_redisplay,
set the redisplay flag unconditionally.
(Vredisplay__variables): Remove it.
* src/data.c (set_internal): Remove maybe_set_redisplay call.
2016-12-02 20:25:15 -05:00
Noam Postavsky
cfd2b9eae1 Add function to trigger debugger on variable write
* lisp/emacs-lisp/debug.el (debug-on-variable-change):
(debug--variable-list):
(cancel-debug-on-variable-change): New functions.
(debugger-setup-buffer): Add watchpoint clause.
2016-12-02 20:25:14 -05:00
Noam Postavsky
459a23444e Show watchpoints when describing variables
* src/data.c (Fget_variable_watchers): New function.
* lisp/help-fns.el (describe-variable): Use it to detect watching
functions.
2016-12-02 20:25:14 -05:00
Noam Postavsky
227213164e Add lisp watchpoints
This allows calling a function whenever a symbol-value is changed.

* src/lisp.h (lisp_h_SYMBOL_TRAPPED_WRITE_P):
(SYMBOL_TRAPPED_WRITE_P): New function/macro.
(lisp_h_SYMBOL_CONSTANT_P): Check for SYMBOL_NOWRITE specifically.
(enum symbol_trapped_write): New enumeration.
(struct Lisp_Symbol): Rename field constant to trapped_write.
(make_symbol_constant): New function.

* src/data.c (Fadd_variable_watcher, Fremove_variable_watcher):
(set_symbol_trapped_write, restore_symbol_trapped_write):
(harmonize_variable_watchers, notify_variable_watchers): New functions.

* src/data.c (Fset_default): Call `notify_variable_watchers' for trapped
symbols.
(set_internal): Change bool argument BIND to 3-value enum and call
`notify_variable_watchers' for trapped symbols.

* src/data.c (syms_of_data):
* src/data.c (syms_of_data):
* src/font.c (syms_of_font):
* src/lread.c (intern_sym, init_obarray):
* src/buffer.c (syms_of_buffer): Use make_symbol_constant.

* src/alloc.c (init_symbol):
* src/bytecode.c (exec_byte_code): Use SYMBOL_TRAPPED_WRITE_P.
* src/data.c (Fmake_variable_buffer_local, Fmake_local_variable):
(Fmake_variable_frame_local):
* src/eval.c (Fdefvaralias, specbind): Refer to Lisp_Symbol's
trapped_write instead of constant.
(Ffuncall): Move subr calling code into separate function.
(funcall_subr): New function.
2016-12-02 20:25:14 -05:00
Eli Zaretskii
0fc4761ca8 ; * lisp/dired-x.el (dired-omit-case-fold): Fix last change. 2016-12-02 20:37:44 +02:00
Glenn Morris
30dc85c63b Starting doc of user options with "*" is long obsolete
* lisp/battery.el (battery-upower-device): Doc fix.
2016-12-02 13:11:53 -05:00
Nicolas Petton
a3487a8121 Fix bug#25087
* etc/themes/manoj-dark-theme.el: Fix two typos.

(cherry picked from commit 66d6e7e9ec)
2016-12-02 13:08:49 -05:00
Reuben Thomas
5315275f84 Fix docstrings to have a complete sentence in first line
* lisp/dired-x.el (dired-omit-case-fold, dired-omit-case-fold-p): Fix
docstrings.
2016-12-02 16:38:05 +00:00
Reuben Thomas
9effa4bfeb Remove obsolete comments and commented code from dired-x.el
* lisp/dired-x.el (dired-mark-sexp): Remove a query from 1993 and its
1997 answer about whether dired-mark-sexp is used.
* lisp/dired-x.el (dired-buffers-for-dir-exact): Remove this function
commented out since before dired-x.el was added to RCS in 1994.
2016-12-02 16:04:42 +00:00
Reuben Thomas
e22cca7d23 Remove pre-customize dired-x.el documentation
* lisp/dired-x.el (Commentary): Remove USAGE section explaining how to
use dired-x from .emacs.  It is now fully customizable.
* lisp/dired-x.el (dired-guess-shell-alist-user): Remove explanation of
how to set this custom variable in .emacs.  It should be customized.
2016-12-02 16:04:42 +00:00
Reuben Thomas
50b9ddfc13 Allow files to be matched case-sensitively in dired-x
* lisp/dired-x.el (dired-mark-unmarked-files): Add an argument which
controls case folding for matching the regex (Bug#18716).
(dired-omit-case-fold): New variable.  Defaults to `t' on case-sensitive
systems, `nil' otherwise.
(dired-mark-omitted, dired-omit-expunge): Use dired-omit-case-fold.
* doc/misc/dired-x.texi, etc/NEWS: Document dired-omit-case-fold.
2016-12-02 16:04:42 +00:00
Reuben Thomas
b6a8025eed Add support for curly quotation marks to electric-pair-mode
* lisp/elec-pair.el (electric-pair-pairs, electric-pair-text-pairs): Add
entries for left/right single/double quotation marks, from
electric-quote-chars. Note that this is safe for single quotation marks,
unlike with the ASCII apostrophe, since, although the right quotation
mark can be used as an apostrophe, it is the left quotation mark that is
typed to get a pair (Bug#24901).
2016-12-02 14:43:58 +00:00
Eli Zaretskii
ba2847f5a5 ; * lisp/vc/ediff-util.el (ediff-janitor): Fix last change. (Bug#25046) 2016-12-02 16:35:16 +02:00
Nicolas Petton
66d6e7e9ec Fix bug#25087
* etc/themes/manoj-dark-theme.el: Fix two typos.
2016-12-02 14:08:59 +01:00
Michael Albinus
e9ac4b4c82 Handle quoted file names in Tramp
* lisp/net/tramp.el (tramp-file-name-handler): Handle also the
case the file name is quoted.  This is not trapped by the
reassigned `tramp-file-name-regexp' anymore.
2016-12-02 11:38:19 +01:00
Evgeny Zajcev
05a969265c * lisp/battery.el: Add 'battery-upower' -- very fast battery status. 2016-12-02 12:17:38 +02:00
Evgeny Zajcev
0b3f8ca863 Support for rawrgb images using imagemagick
* src/image.c (imagemagick_load_image): Set wand size before loading
blob when ':width' and ':height' are provided.

* lisp/image.el (image-format-suffixes): Add 'image/x-rgb'.
2016-12-02 12:09:31 +02:00
Nikolay Kudryavtsev
b3ff982a99 Fix 'sql-connect' on first invocation
* lisp/progmodes/sql.el (sql-connect): Reorder code which sets
param-var.  (Bug#19452)
2016-12-02 11:53:33 +02:00
Eli Zaretskii
8b43f97e2c * lisp/vc/ediff-util.el (ediff-janitor): Doc fix. (Bug#25046) 2016-12-02 11:29:10 +02:00
Eli Zaretskii
c20035cd2b ; * doc/emacs/programs.texi (Man Page): Fix last change. 2016-12-02 11:14:11 +02:00
Eli Zaretskii
93d8346288 Improve indexing of 'man'
* doc/emacs/programs.texi (Man Page): Index 'man', not
'manual-entry', as the latter is an alias for the former.
Suggested by Hong Xu <hong@topbug.net>.  (Bug#25033)
2016-12-02 11:10:04 +02:00
Paul Eggert
c49198967a Port to Sun C 5.14
Backport from master.  Sun C 5.14 supports C11 but not GCC
extensions, and so refuses to compile Emacs without this patch.
* src/alloc.c (lmalloc, lrealloc): Don't use INT_ADD_WRAPV on
size_t, as in general this macro is restricted to signed types.
2016-12-01 23:17:26 -08:00
Paul Eggert
c662e2d4fc Fix type typo on Solaris
* src/sysdep.c (system_process_attributes) [SOLARIS2 && HAVE_PROCFS]:
Fix type mismatch, caught by --enable-check-lisp-object-type.
2016-12-01 22:45:38 -08:00
Paul Eggert
f3fa5d7e22 Merge from gnulib
This incorporates:
2016-11-27 md4,md5,sha*: tune for recent glibc _STRING_INLINE_unaligned
2016-11-21 snippet/c++defs: Simplify _GL_CXXALIAS_* macros.
* build-aux/snippet/c++defs.h:
* lib/md5.c, lib/sha1.c, lib/sha256.c, lib/sha512.c:
Copy from gnulib.
2016-12-01 21:57:15 -08:00
Paul Eggert
ebb96114d8 Make struct font_drivers read-only
This simplifies the code a bit, and makes the structs more
shareable and less likely to become corrupt.
* src/alloc.c (cleanup_vector):
* src/font.c (valid_font_driver, font_prepare_cache)
(font_finish_cache, font_get_cache, font_clear_cache)
(register_font_driver, font_update_drivers):
* src/font.h (struct font, struct font_driver_list)
(valid_font_driver):
struct font_drivers are now const.
* src/font.c, src/ftcrfont.c, src/ftfont.c, src/nsfont.m, src/xfont.c:
Omit no-longer-necessary decls.
* src/ftcrfont.c (syms_of_ftcrfont):
* src/ftxfont.c (syms_of_ftxfont):
* src/xftfont.c (syms_of_xftfont):
Omit no-longer-necessary initialization code.
* 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-style initializer for ease of maintenance, and make it const.
* src/ftcrfont.c, src/ftxfont.c, src/xftfont.c:
Refer to functions like ftfont_text_extents directly.
* src/ftfont.c (ftfont_get_cache, ftfont_list, ftfont_list_family)
(ftfont_has_char, ftfont_encode_char, ftfont_text_extents)
(ftfont_get_bitmap, ftfont_anchor_point, ftfont_otf_capability)
(ftfont_variation_glyphs, ftfont_filter_properties)
(ftfont_combining_capability):
* src/xfont.c (xfont_get_cache):
Now extern, so that other modules’ struct font_drivers can use
them directly.
* src/macfont.m (macfont_descriptor_entity):
* src/nsfont.m (nsfont_open):
Use constant directly; this is clearer.
2016-12-01 21:48:30 -08:00
Richard Stallman
95eb641404 Fix mail-combine-fields
* lisp/mail/sendmail.el (mail-combine-fields): Call `save-excursion' to
avoid losing our place in the search loop.

(cherry picked from commit 5fbba6ccea)
2016-12-01 19:56:14 -05:00
Eli Zaretskii
dd4b913153 ; * test/lisp/progmodes/compile-tests.el: Fix a typo in a comment. 2016-12-01 20:26:54 +02:00
Helmut Eller
bb8e38273e Forth related improvements for etags
Generate correct tags names for things like "(foo)".
Previously "(foo" created.

Fix a bug where a tag for "-bar" was created when encountering things
like "create-bar".

Recognize more words from the Forth-2012 Standard.

* lib-src/etags.c (Forth_words): Check for whitespace after defining
words.  Create tag with make_tag instead of get_tag to avoid notiname
which isn't appropriate for Forth.

* test/manual/etags/forth-src/test-forth.fth: Add some test cases.
* test/manual/etags/ETAGS.good_1:
* test/manual/etags/ETAGS.good_2:
* test/manual/etags/ETAGS.good_3:
* test/manual/etags/ETAGS.good_4:
* test/manual/etags/ETAGS.good_5:
* test/manual/etags/ETAGS.good_6:
* test/manual/etags/CTAGS.good: Adapt to the changes in etags.c and
new test cases.
2016-12-01 18:58:08 +02:00
Eli Zaretskii
2f68cb3e05 Fix bugs with buffer-local tags tables
* lisp/progmodes/etags.el (visit-tags-table): After
'visit-tags-table-buffer' returns, retrieve the value of
'tags-file-name' from the buffer we started in.  Force
recomputation of 'tags-completion-table' next time it is used,
since the list of tags table has changed.
(visit-tags-table-buffer): Accept an additional optional argument
CBUF, the buffer in which to start processing, and switch to that
buffer if CBUF is non-nil.  All callers changed to supply a
non-nil CBUF when they call 'visit-tags-table-buffer' in a loop.
Doc fix.
(tags-completion-table): Accept an optional argument, the buffer
for which to build 'tags-completion-table', and build that
buffer's completion table.
(tags-lazy-completion-table): Pass the current buffer to
'tags-completion-table'.
(tags-file-name): Don't say in the doc string that setting this
variable directly is enough; say that 'visit-tags-table' should be
used for that.  (Bug#158)  (Bug#17326)  (Bug#23164)

* doc/emacs/maintaining.texi (Select Tags Table): Delete the
advice to set 'tags-file-name' directly.

* test/lisp/progmodes/etags-tests.el: New tests.
2016-12-01 18:49:51 +02:00
Glenn Morris
7d35b3d33d ; Auto-commit of loaddefs files. 2016-12-01 06:20:43 -05:00
Martin Rudalics
d31298d8af Fix documentation of `window-combination-resize'
* src/window.c (Vwindow_combination_resize): Fix doc-string.
* doc/lispref/windows.texi (Recombining Windows): Fix
documentation of `window-combination-resize'.
2016-12-01 10:51:11 +01:00