lisp/desktop.el: More fixes to frame restoration.
(desktop-restore-frames): Rename from desktop-save-windows.
(desktop-restore-in-current-display): New customization option.
(desktop--excluded-frame-parameters): Add `font'.
(desktop--save-frames): Rename from desktop--save-windows.
(desktop--restore-in-this-display-p): New function.
(desktop--make-full-frame): Remove unwanted width/height from
full(width|height) frames.
(desktop--restore-frames): Rename from desktop--restore-windows.
Obey desktop-restore-current-display. Do not delete old frames or
select a new frame unless we were able to restore at least one frame.
Add `remember-notes' function to store random notes across Emacs
restarts.
* remember.el (remember-data-file): Add :set callback to affect
notes buffer (if any).
(remember-notes): New command.
(remember-notes-buffer-name, bury-remember-notes-on-kill):
New defcustoms for the `remember-notes' function.
(remember-notes-save-and-bury-buffer): New command.
(remember-notes-mode-map): New variable.
(remember-mode): New minor mode.
(remember-notes--kill-buffer-query): New function.
* lisp/startup.el (initial-buffer-choice): Add notes to custom type.
* src/buffer.c (FKill_buffer): Run `kill-buffer-query-functions'
before checking whether buffer is modified. This lets
`kill-buffer-query-functions' cancel killing of the buffer or save
its content before `kill-buffer' asks user the "Buffer %s
modified; kill anyway?" question.
* remember.el (remember-append-to-file):
Don't mix `find-buffer-visiting' and `get-file-buffer'.
Paul Eggert [Sun, 30 Jun 2013 15:24:14 +0000 (08:24 -0700)]
Do not use GTK 3 if it exists but cannot be compiled.
* configure.ac: Leave GTK_OBJ and term_header alone if GTK 3
exists but cannot be compiled.
* src/xmenu.c (x_menu_wait_for_event) [!USE_GTK]:
* src/xterm.c (x_error_handler) [!USE_GTK]:
Do not use GTK 3.
Eli Zaretskii [Sun, 30 Jun 2013 14:49:33 +0000 (17:49 +0300)]
Don't call sit-for in right-char and left-char for visual cursor motion.
src/xdisp.c (Fmove_point_visually): Invalidate the cursor position
when moving point by using the current glyph matrix. This avoids
the need to force redisplay when this function is called in a
loop.
lisp/bindings.el (right-char, left-char): Don't call sit-for, this is
no longer needed. Use arithmetic comparison only for numerical
arguments.
* net/shr.el (shr-make-table-1): Add a sanity check that allows
progression on degenerate tables.
(shr-rescale-image): ImageMagick animated images currently doesn't
work.
Some fixes and improvements for desktop frame restoration.
It is still experimental and disabled by default.
* lisp/desktop.el (desktop--save-windows): Put the selected frame at
the head of the list.
(desktop--make-full-frame): New function.
(desktop--restore-windows): Try to re-select the frame that was
selected upon saving. Do not abort if some frames fail to restore,
just show an error message and contnue. Set up maximized frames so
they have default non-maximized dimensions.
Eli Zaretskii [Sat, 29 Jun 2013 13:36:19 +0000 (16:36 +0300)]
Implement visual-order cursor motion.
src/xdisp.c (Fmove_point_visually): New function.
lisp/bindings.el (visual-order-cursor-movement): New defcustom.
(right-char, left-char): Provide visual-order cursor motion by
calling move-point-visually. Update the doc strings.
doc/emacs/basic.texi (Moving Point): Document visual-order-cursor-movement
and its effect on right-char and left-char.
Glenn Morris [Sat, 29 Jun 2013 01:51:32 +0000 (18:51 -0700)]
* admin/admin.el (make-manuals): Don't bother with txt or dvi any more.
(manual-txt): Remove.
(manual-pdf): Doc fix.
(manual-ps): Rename from manual-dvi.
Kenichi Handa [Fri, 28 Jun 2013 14:59:50 +0000 (23:59 +0900)]
coding.h (define_coding_undecided_arg_index): New enum.
(coding_attr_index): New members
coding_attr_undecided_inhibit_null_byte_detection,
coding_attr_undecided_inhibit_iso_escape_detection,
coding_attr_undecided_prefer_utf_8.
(undecided_spec): New struct.
(struct coding_system): New member `undecied' of the member
`spec'.
Kenichi Handa [Fri, 28 Jun 2013 14:54:18 +0000 (23:54 +0900)]
mule.el (define-coding-system): New coding system
properties :inhibit-null-byte-detection,
:inhibit-iso-escape-detection, and :prefer-utf-8.
(set-buffer-file-coding-system): If :charset-list property of
CODING-SYSTEM is `emacs', do not check if CODING-SYSTEM is
appropriate for setting.
Kenichi Handa [Fri, 28 Jun 2013 14:42:55 +0000 (23:42 +0900)]
mule-cmds.el (select-safe-coding-system): If
DEFAULT-CODING-SYSTEM is prefer-utf-8 and the buffer contains
multibyte characters, return utf-8 (or one of it's siblings).
Kenichi Handa [Fri, 28 Jun 2013 14:39:40 +0000 (23:39 +0900)]
decoder-tests.el (decoder-tests-gen-file): New arg FILE.
(decoder-tests-ao-gen-file): Renamed from decoder-tests-filename.
Callers changed.
(decoder-tests-filename): New function.
(decoder-tests-prefer-utf-8-read)
(decoder-tests-prefer-utf-8-write): New function.
(ert-test-decoder-prefer-utf-8): New test.
Paul Eggert [Thu, 27 Jun 2013 14:47:52 +0000 (07:47 -0700)]
Do not tickle glib SIGCHLD handling if Cygwin.
This mostly consists of undoing recent changes.
* callproc.c (Fcall_process):
* process.c (create_process):
Do not worry about catching SIGCHLD here, undoing previous change.
* nsterm.m (ns_term_init): Re-catch SIGCHLD, undoing previous change.
* process.c, process.h (catch_child_signal):
No longer extern if !NS_IMPL_GNUSTEP, undoing 06-22 change.
* process.c (catch_child_handler): Don't worry about being called
lazily and do not assume caller has blocked SIGCHLD, undoing
previous change. Move first-time stuff back to
init_process_emacs, undoing 06-22 change. If CYGWIN, do not
tickle glib, as that causes Cygwin bootstrap to fail. Do not
set lib_child_handler if it's already initialized, which may
help avoid problems on GNUStep.
Dmitry Gutov [Thu, 27 Jun 2013 09:51:55 +0000 (13:51 +0400)]
* test/automated/package-x-test.el: Change the commentary.
(package-x-test--single-archive-entry-1-3)
(package-x-test--single-archive-entry-1-4): Fix the tests, by
using the appropriate data structure.
Dmitry Gutov [Thu, 27 Jun 2013 09:26:54 +0000 (13:26 +0400)]
* automated/Makefile.in (setwins): Include the 'data' subdirectory.
* automated/package-x-test.el: New file.
* automated/package-test.el: New file.
* automated/data/package: New directory, with test examples.
* lisp/emacs-lisp/package-x.el (package-upload-buffer-internal): Adapt
to `package-desc-version' being a list. Use
`package--ac-desc-version' to retrieve version from a package
archive element.
New experimental feature to save&restore window and frame setup.
* etc/NEWS: Document new Desktop option `desktop-save-windows'.
* lisp/desktop.el (desktop-save-windows): New defcustom.
(desktop--saved-states): New var.
(desktop--excluded-frame-parameters): New defconst.
(desktop--filter-frame-parms, desktop--find-frame-in-display)
(desktop--restore-windows, desktop--save-windows): New functions.
(desktop-save): Call `desktop--save-windows'.
(desktop-read): Call `desktop--restore-windows'.
Stefan Monnier [Wed, 26 Jun 2013 22:31:19 +0000 (18:31 -0400)]
* lisp/emacs-lisp/nadvice.el (advice--defalias-fset): Move advice back to
advice--pending if newdef is nil or an autoload.
(advice-mapc): New function.
* net/eww.el (eww-mode): Undo isn't necessary in eww buffers,
probably.
(eww-mode-map): Add a menu bar.
(eww-add-bookmark): New command.
(eww-bookmark-mode): New mode and commands.
Stefan Monnier [Tue, 25 Jun 2013 16:13:49 +0000 (12:13 -0400)]
* lisp/emacs-lisp/package.el: Include obsolete packages from archives.
Use lexical-binding.
(package-archive-contents): Change format; include obsolete packages.
(package-desc): Use `dir' to mark builtin packages.
(package--from-builtin): Set the `dir' field to `builtin'.
(generated-autoload-file, version-control): Declare.
(package-compute-transaction): Change first arg and return value to be
lists of package-descs. Adjust to new package-archive-contents format.
(package--add-to-archive-contents): Adjust to new
package-archive-contents format.
(package-download-transaction): Arg is now a list of package-descs.
(package-install): If `pkg' is a package name, pass it as
a requirement, so it is subject to the usual (e.g. disabled) checks.
(describe-package): Accept package-desc as well.
(describe-package-1): Describe a specific package-desc. Add links to
other package-descs for the same package name.
(package-menu-describe-package): Pass the actual package-desc.
(package-menu-mode): Add to tabulated-list-revert-hook so revert-buffer
works correctly.
(package-desc-status): New function.
(package-menu--refresh): New function, extracted
from package-menu--generate.
(package-menu--generate): Use it.
(package-delete): Update package-alist.
(package-menu-execute): Don't call package-initialize.
Stefan Monnier [Tue, 25 Jun 2013 13:07:04 +0000 (09:07 -0400)]
* lisp/files-x.el (read-file-local-variable-value): Use read-from-minibuffer
for values and use read--expression for expressions.
(read-file-local-variable): Avoid setq.
(read-file-local-variable-mode): Use minor-mode-list.
Glenn Morris [Tue, 25 Jun 2013 02:24:32 +0000 (19:24 -0700)]
* test/automated/occur-tests.el (occur-test-create): New function.
Use it to create separate tests for each element, so we run them
all rather than stopping at the first error.
Daiki Ueno [Mon, 24 Jun 2013 07:07:08 +0000 (16:07 +0900)]
epg.el: Add context option `home-directory' and `program'.
* epg.el (epg-make-context): Check if PROTOCOL is valid; embed the
file name of gpg executable.
(epg-context-program): New function.
(epg-context-home-directory): New function.
(epg-context-set-program): New function.
(epg-context-set-home-directory): New function.
(epg--start): Use `epg-context-program' instead of
'epg-gpg-program'.
(epg--list-keys-1): Likewise.