* mml-smime.el (mml-smime-encrypt-to-self): New user option analogous
to mml2015-encrypt-to-self.
(mml-smime-epg-encrypt): Respect mml-smime-encrypt-to-self.
Paul Eggert [Fri, 11 Jan 2013 02:40:58 +0000 (18:40 -0800)]
emacsclient -t should not suspend Emacs server
* lisp.h, sysdep.c (block_tty_out_signal, unblock_tty_out_signal):
New functions.
* term.c (init_tty): Use them instead of rolling our own code.
* sysdep.c (tcsetpgrp_without_stopping): Likewise. Here, this
switches from 'signal' to 'pthread_sigmask', which is safer in
multithreaded applications.
* term.c (Fresume_tty): Don't bother dissociating if O_IGNORE_CTTY,
which has already arranged for that.
(dissociate_if_controlling_tty): If setsid fails, fall back on TIOCNOTTY.
This is the main part of the bug fix.
Elias Pipping [Thu, 10 Jan 2013 15:50:04 +0000 (10:50 -0500)]
* lisp/files.el (auto-mode-alist): Use doc-view for djvu files.
* lisp/doc-view.el (doc-view-document->bitmap):
Use doc-view-single-page-converter-function instead of
single-page-converter arg; adjust callers.
Wolfgang Jenkner [Thu, 10 Jan 2013 15:01:35 +0000 (10:01 -0500)]
* lisp/man.el: Handle different "man -k" behaviors. Use utf-8.
(Man-man-k-use-anchor): New var.
(Man-parse-man-k): New function.
(Man-completion-table): Use it.
(man): Flush the completion cache between uses.
* test/automated/man-tests.el: New file.
Michael Albinus [Thu, 10 Jan 2013 14:27:48 +0000 (15:27 +0100)]
* autorevert.el: Add file watch support.
(auto-revert-notify-enabled): New defconst.
(auto-revert-notify-watch-descriptor-hash-list)
(auto-revert-notify-watch-descriptor)
(auto-revert-notify-modified-p): New defvars.
(auto-revert-notify-rm-watch, auto-revert-notify-add-watch)
(auto-revert-notify-handler): New defuns.
(auto-revert-mode, global-auto-revert-mode): Remove file watches
when mode is disabled.
(auto-revert-handler): Check for `auto-revert-notify-modified-p'.
(auto-revert-buffers): Add file watches for active buffers.
Dmitry Antipov [Thu, 10 Jan 2013 10:30:16 +0000 (14:30 +0400)]
Omit buffer_slot_type_mismatch and use generic predicates to enforce
the type of per-buffer values where appropriate.
* src/lisp.h (struct Lisp_Buffer_Objfwd): Rename slottype member to
predicate, which is how it's really used now. Adjust comment.
* src/buffer.h (buffer_slot_type_mismatch): Remove prototype.
* src/buffer.c (buffer_slot_type_mismatch): Remove.
(DEFVAR_PER_BUFFER, defvar_per_buffer): Rename type argument to
predicate. Adjust comment.
(syms_of_buffer): Use Qsymbolp for major-mode. Use Qintegerp for
fill-column, left-margin, tab-width, buffer-saved-size,
left-margin-width, right-margin-width, left-fringe-width,
right-fringe-width, scroll-bar-width and buffer-display-count.
Use Qstringp for default-directory, buffer-file-name,
buffer-file-truename and buffer-auto-save-file-name. Use Qfloatp for
scroll-up-aggressively and scroll-down-aggressively. Use Qnumberp for
line-spacing.
* src/data.c (store_symval_forwarding): Adjust to call the predicate.
* lisp/cus-start.el (toplevel): Only allow float values for
scroll-up-aggressively and scroll-down-aggressively.
Allow any number for line-spacing.
Roland Winkler [Thu, 10 Jan 2013 02:45:31 +0000 (21:45 -0500)]
* lisp/emacs-lisp/crm.el: Allow any regexp for separators.
(crm-default-separator): All spaces around the default comma separator.
(crm--completion-command): New macro.
(crm-completion-help, crm-complete, crm-complete-word): Use it.
(crm-complete-and-exit): Handle non-single-char separators.
Alan Mackenzie [Wed, 9 Jan 2013 21:33:00 +0000 (21:33 +0000)]
Fix bugs in the c-parse-state mechanism. Reuse some markers instead of
continually generating new ones.
cc-engine.el (c-state-old-cpp-beg-marker, c-state-old-cpp-end-marker):
New variables.
(c-append-lower-brace-pair-to-state-cache): Start a backward search for
"}" definitively outside CPP constructs.
(c-remove-stale-state-cache): Inform the caller of a need to search back
for a brace pair in certain circumstances.
(c-state-maybe-marker): New macro.
(c-parse-state): Reuse markers when appropriate.
Elias Pipping [Wed, 9 Jan 2013 21:24:42 +0000 (16:24 -0500)]
* lisp/doc-view.el: Add support for DjVu.
(doc-view-djvu->png-converter-function): New config var.
(doc-view-single-page-converter-function, doc-view--image-type)
(doc-view--image-file-extension): New vars.
(doc-view-mode): Initialize them.
(doc-view-goto-page): Use them.
(doc-view-mode-p): Add support for ddjvu.
(doc-view-djvu->png-converter-ddjvu, doc-view-djvu->png-1)
(doc-view-set-up-single-converter): New funs.
(doc-view-pdf/ps->png): Extend for djvu.
(doc-view-document->png): Rename from doc-view-pdf->png.
(doc-view-convert-current-doc): Handle djvu.
(doc-view-insert-image, doc-view-display)
(doc-view-already-converted-p): Don't hardcode png.
(doc-view-set-doc-type): Recognize djvu docs.
Elias Pipping [Wed, 9 Jan 2013 19:48:42 +0000 (14:48 -0500)]
* lisp/doc-view.el: Add support for mupdf converter.
(doc-view-pdfdraw-program, doc-view-pdf->png-converter-function)
(doc-view-ps->png-converter-function): New config vars.
(doc-view-pdf->png-converter-ghostscript)
(doc-view-ps->png-converter-ghostscript)
(doc-view-pdf->png-converter-mupdf): New functions.
(doc-view-pdf/ps->png, doc-view-pdf->png-1): Use them.
Dmitry Antipov [Wed, 9 Jan 2013 13:50:22 +0000 (17:50 +0400)]
* lisp.h (make_gap_1): New prototype.
* buffer.h (GAP_BYTES_DFL, GAP_BYTES_MIN): New macros for the special
gap size values.
* editfns.c (Fbuffer_size): Rename from Fbufsize to fit the common
naming convention.
(syms_of_editfns): Adjust defsubr. Drop commented-out obsolete code.
* insdel.c (make_gap_larger): Use GAP_BYTES_DFL.
(make_gap_smaller): Use GAP_BYTES_MIN. Adjust comment.
(make_gap_1): New function to adjust the gap of any buffer.
* coding.c (coding_alloc_by_making_gap): Use it.
* buffer.c (compact_buffer): Likewise. Use BUF_Z_BYTE, BUF_GAP_SIZE,
GAP_BYTES_DFL and GAP_BYTES_MIN. Adjust comment.
Michael Albinus [Wed, 9 Jan 2013 09:49:27 +0000 (10:49 +0100)]
* net/tramp.el (tramp-eshell-directory-change): Check remote-path
first in session cache: When `tramp-own-remote-path' is in
`tramp-remote-path', the remote path is only set in the session
cache.
Juri Linkov [Wed, 9 Jan 2013 00:20:02 +0000 (02:20 +0200)]
* lisp/international/mule-cmds.el (read-char-by-name): Move let-binding
of completion-ignore-case around completing-read to fix regression
exhibited by the test case `C-x 8 RET *acc TAB' and caused by
`string-match-p' using the nil value of `case-fold-search' and
`completion-ignore-case' in `completion-pcm--all-completions'..
Juri Linkov [Tue, 8 Jan 2013 23:50:40 +0000 (01:50 +0200)]
* lisp/textmodes/flyspell.el (flyspell-incorrect, flyspell-duplicate):
* lisp/progmodes/flymake.el (flymake-errline, flymake-warnline):
Use underline style wave on terminals that support it.
* src/xfaces.c (tty_supports_face_attributes_p): Return 0 for the case
of (supports :underline (:style wave)).
Stefan Monnier [Tue, 8 Jan 2013 15:24:56 +0000 (10:24 -0500)]
* lisp/emacs-lisp/nadvice.el (advice--tweak): New function.
(advice--remove-function, advice--subst-main): Use it.
* lisp/emacs-lisp/advice.el: Update commentary.
Juri Linkov [Tue, 8 Jan 2013 00:28:55 +0000 (02:28 +0200)]
* lisp/info.el (Info-read-node-name-2): Don't duplicate suffixes for single completion.
(info--manual-names): Expand node completions into an explicit list
before appending it to another list. Filter out internal buffers
with the leading space in the buffer name. (Bug#10771)
Juri Linkov [Tue, 8 Jan 2013 00:11:51 +0000 (02:11 +0200)]
* lisp/info.el (Info-read-node-name-1): Allow empty node name in (FILENAME)
that defaults to the Top node.
(Info-goto-node, Info-read-node-name): Doc fix to mention that
the short format (FILENAME) goes to the Top node.
(Info-build-node-completions): Rename arg `file' to `filename'.
* doc/misc/info.texi (Go to node): Mention the abbreviated format
`(FILENAME)' equal to `(FILENAME)Top'.
Michael Albinus [Mon, 7 Jan 2013 09:25:34 +0000 (10:25 +0100)]
* net/tramp.el (tramp-default-host-alist): New defcustom.
(tramp-find-host): Use it.
(tramp-eshell-directory-change): Moved from tramp-sh.el. Add to
`eshell-directory-change-hook'.
* net/tramp-adb.el (top): Add adb specific entry in
`tramp-default-host-alist'.
(tramp-adb-file-name-host): Remove function.
(tramp-adb-execute-adb-command, tramp-adb-maybe-open-connection):
Use `tramp-file-name-host' instead of `tramp-adb-file-name-host'.
* net/tramp-sh.el : Move eshell integration code to tramp.el.
Michael Albinus [Sun, 6 Jan 2013 15:44:18 +0000 (16:44 +0100)]
* net/tramp-adb.el (tramp-adb-ls-toolbox-regexp): The file size can
consist of mor than one digit.
(tramp-adb-file-name-handler-alist): Use
`tramp-handle-file-exists-p' consistently.
(tramp-adb-file-name-handler): Don't tweak `tramp-default-host'.
(tramp-adb-handle-file-exists-p): Remove function.
(tramp-adb-file-name-host): New defun.
(tramp-adb-execute-adb-command, tramp-adb-maybe-open-connection):
Use it.
(tramp-adb-maybe-open-connection): Set "remote-path" property.
Chong Yidong [Sun, 6 Jan 2013 02:38:04 +0000 (10:38 +0800)]
Fix echoing of replayed keys.
* keyboard.c (echo_add_char): New function, factored out from
echo_char. Don't add a space if the previous echo string was
empty.
(echo_char): Use it.
(read_key_sequence): When echoing mock input, ensure that the
trailing dash is properly added.
Michael Albinus [Sat, 5 Jan 2013 13:41:57 +0000 (14:41 +0100)]
* net/tramp-adb.el (tramp-adb-handle-file-attributes): More robust
parsing of ls output using regular expression (handle filenames
with spaces). Use virtual device number.
(tramp-do-parse-file-attributes-with-ls): New defun (Code
cleanup).
Eli Zaretskii [Sat, 5 Jan 2013 13:37:36 +0000 (15:37 +0200)]
Improve display of glyph matrix by dump-glyph-matrix.
src/xdisp.c (dump_glyph): Align glyph data better. Use "pD" instead
of a non-portable "t" to print ptrdiff_t values. Allow up to 9
digits for buffer positions, before misalignment starts. Display
"0" for integer "object" field.
(dump_glyph_row): Adapt the header line to changes in dump_glyph.
Display the newline glyph more unambiguously.
Michael Albinus [Fri, 4 Jan 2013 09:41:23 +0000 (10:41 +0100)]
* net/tramp-sh.el (tramp-set-file-uid-gid): UID and GID must be
non-negative integers. Otherwise, the default values are used.
(tramp-convert-file-attributes): Convert uid and gid to integers.