Alp Aker [Sun, 17 Jun 2012 00:32:36 +0000 (20:32 -0400)]
Implement wave-style variant of underlining.
* doc/lispref/display.texi: Document new face attribute.
* lisp/cus-face.el (custom-face-attributes): Add wave-style underline
attribute.
* lisp/faces.el (set-face-attribute): Update docstring.
* src/dispextern.h (face_underline_type): New enum.
(face): Add field for underline type.
* src/nsterm.m (ns_draw_underwave): New function.
(ns_draw_text_decoration): Use it.
* src/w32term.c (w32_restore_glyph_string_clip, w32_draw_underwave):
New functions.
(x_draw_glyph_string): Use them.
* src/xfaces.c (Qline, Qwave): New Lisp objects.
(check_lface_attrs, merge_face_ref)
(Finternal_set_lisp_face_attribute, realize_x_face): Handle
wave-style underline face attributes.
* src/xterm.c (x_draw_underwave): New function.
(x_draw_glyph_string): Use it.
Eli Zaretskii [Sat, 16 Jun 2012 13:17:14 +0000 (16:17 +0300)]
Fix "make dist" on MS-Windows.
nt/makefile.w32-in (install-addpm): New target.
(dist): Depend on it.
(install-shortcuts): Depend on install-addpm instead of copying
addpm.exe as part of the recipe. See
http://lists.gnu.org/archive/html/emacs-devel/2012-06/msg00171.html
for the related problem and discussions.
Eli Zaretskii [Sat, 16 Jun 2012 09:57:56 +0000 (12:57 +0300)]
Fix bug #11653 with cursor positioning in a row that has only strings.
src/xdisp.c (set_cursor_from_row): Don't dereference glyphs_end. If
all the glyphs of the glyph row came from strings, and we have no
cursor positioning clues, put the cursor on the first glyph of the
row.
Stefan Monnier [Fri, 15 Jun 2012 03:18:14 +0000 (23:18 -0400)]
* lisp/emacs-lisp/cl-lib.el (cl--defsubst-expand): Autoload inliner.
* lisp/emacs-lisp/macroexp.el (macroexp--compiler-macro): New function.
(macroexp--expand-all): Use it.
Andreas Schwab [Thu, 14 Jun 2012 14:22:37 +0000 (16:22 +0200)]
Fixes: debbugs:11708
* play/doctor.el (doctor-doc): Remove parameter and use
doctor-sent instead of sent.
(doctor-read-print): Use doctor-sent instead of sent.
Paul Eggert [Thu, 14 Jun 2012 02:27:39 +0000 (19:27 -0700)]
Simplify lisp.h in minor ways that should not affect code.
* lisp.h (USE_2_TAGS_FOR_INTS): Remove, as it was always defined.
(LISP_INT_TAG, case_Lisp_Int, LISP_STRING_TAG, LISP_INT_TAG_P)
(LISP_INT1_TAG, enum Lisp_Type, XINT, XUINT, make_number):
Simplify under the assumption that USE_2_TAGS_FOR_INTS is defined.
(INTTYPEBITS): New macro, for clarity.
(INTMASK, MOST_POSITIVE_FIXNUM): Use it.
(LISP_INT1_TAG, LISP_STRING_TAG, LISP_INT_TAG_P): Simplify
now that USE_LSB_TAG is always defined.
(TYPEMASK, XINT) [USE_LSB_TAG]: Remove unnecessary cast.
(make_number) [!USE_LSB_TAG]: Use INTMASK; that's simpler.
Andreas Schwab [Wed, 13 Jun 2012 13:40:48 +0000 (15:40 +0200)]
Use a simple struct to implement compile time checks for the Lisp_Object type
* configure.in: Rename --enable-use-lisp-union-type to
--enable-check-lisp-object-type and define CHECK_LISP_OBJECT_TYPE
instead of USE_LISP_UNION_TYPE.
* admin/make-emacs: Rename --union-type to --check-lisp-type. Define
CHECK_LISP_OBJECT_TYPE insted of USE_LISP_UNION_TYPE.
* admin/CPP-DEFINES (DEBUG_LISP_OBJECT_TYPE): Renamed from
USE_LISP_UNION_TYPE.
* src/lisp.h (Lisp_Object) [CHECK_LISP_OBJECT_TYPE]: Define as struct
instead of union.
(XLI, XIL): Define.
(XHASH, XTYPE, XINT, XUINT, make_number, XSET, XPNTR, XUNTAG): Use
them.
* src/emacs.c (gdb_use_struct): Renamed from gdb_use_union.
* src/.gdbinit: Check gdb_use_struct instead of gdb_use_union.
* src/alloc.c (widen_to_Lisp_Object): Removed.
(mark_memory): Use XIL instead of widen_to_Lisp_Object.
* src/frame.c (delete_frame): Remove outdated comment.
* src/w32fns.c (Fw32_register_hot_key): Use XLI instead of checking
USE_LISP_UNION_TYPE.
(Fw32_unregister_hot_key): Likewise.
(Fw32_toggle_lock_key): Likewise.
* src/w32menu.c (add_menu_item): Likewise.
(w32_menu_display_help): Use XIL instead of checking
USE_LISP_UNION_TYPE.
* src/w32heap.c (allocate_heap): Don't check USE_LISP_UNION_TYPE.
(init_heap): Likewise.
* src/w32term.c (w32_read_socket): Update comment.
Chong Yidong [Wed, 13 Jun 2012 07:33:38 +0000 (15:33 +0800)]
In the Package Menu, indicate packages that are newly-available.
* lisp/emacs-lisp/package.el (list-packages): Compute a list of
packages that are newly-available since the last list-packages
invocation.
(package-menu--new-package-list): New var.
(package-menu--generate, package-menu--print-info)
(package-menu--status-predicate, package-menu-mark-install):
Handle new status label "new".
Glenn Morris [Wed, 13 Jun 2012 02:32:49 +0000 (22:32 -0400)]
* src/s/gnu.h (POSIX_SIGNALS): Remove (again).
This was added in 2012-01 in response to http://debbugs.gnu.org/10552 .
However, this issue had already been fixed in the trunk two years
earlier, by removing POSIX_SIGNALS altogether. Ref:
* alloc.c (make_number) [!defined make_number]:
Remove, as lisp.h always defines this now.
(mark_maybe_pointer): Simplify since USE_LSB_TAG is always defined now.
(roundup_size): Verify that it is a power of 2.
* data.c (Fmake_variable_buffer_local, Fmake_local_variable):
* ftfont.c (ftfont_driver): Use LISP_INITIALLY_ZERO.
* lisp.h (USE_LSB_TAG): Allow the builder to compile with
-DUSE_LSB_TAG=0, to override the automatically-selected default.
USE_LSB_TAG now is always defined to be either 0 or 1.
All uses changed.
(union Lisp_Object): Don't worry about WORDS_BIGENDIAN; the
code works fine either way, and efficiency is not a concern here,
as the union type is for debugging, not for production.
(LISP_MAKE_RVALUE, make_number) [USE_LISP_UNION_TYPE]:
Use an inline function on all platforms when using the union type,
since this is simpler and 'static inline' can be used portably
within Emacs now.
(LISP_INITIALLY_ZERO): New macro.
(XFASTINT, XSETFASTINT) [USE_LISP_UNION_TYPE]: Remove.
(XSET) [USE_LISP_UNION_TYPE]: Don't overparenthesize.
Chong Yidong [Tue, 12 Jun 2012 10:08:39 +0000 (18:08 +0800)]
Handle availability of MagickMergeImageLayers and MagickExportImagePixels
* configure.in: Check for MagickMergeImageLayers.
* src/image.c (imagemagick_load_image): Use MagickFlattenImage if
MagickMergeImageLayers is undefined. Use pixel pusher loop if
MagickExportImagePixels is undefined.
Gnus developers [Mon, 11 Jun 2012 22:35:02 +0000 (22:35 +0000)]
Merge bugfixes done in Gnus trunk
Those changes fix only the bugs having appeared in the bug list.
Many other Gnus changes not yet merged to Emacs are in:
ftp://ftp.jpl.org/pub/tmp/MaGnus-to-Emacs.patch
(or http://www.jpl.org/ftp/pub/tmp/MaGnus-to-Emacs.patch)
2012-06-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
* gnus.texi (Group Timestamp): Mention where to find documentation for
the `gnus-tmp-' variables (bug#11601).
2012-04-14 Wolfgang Jenkner <wjenkner@inode.at>
* gnus-agent.el (gnus-agent-retrieve-headers): Recalculate the range of
articles when fetch-old is non-nil (bug#11370).
Stefan Monnier [Mon, 11 Jun 2012 20:35:00 +0000 (16:35 -0400)]
Fix compiler-expansion of CL's cXXr functions.
* emacs-lisp/cl-lib.el (cl--defalias): New function.
(cl-values, cl-values-list, cl-copy-seq, cl-svref, cl-first)
(cl-second, cl-rest, cl-endp, cl-third, cl-fourth): Use it.
(cl-plusp, cl-minusp, cl-fifth, cl-sixth, cl-seventh, cl-eighth)
(cl-ninth, cl-tenth): Mark them as inlinable.
(cl-caaar, cl-caadr, cl-cadar, cl-caddr, cl-cdaar, cl-cdadr)
(cl-cddar, cl-cdddr, cl-caaaar, cl-caaadr, cl-caadar, cl-caaddr)
(cl-cadaar, cl-cadadr, cl-caddar, cl-cadddr, cl-cdaaar, cl-cdaadr)
(cl-cdadar, cl-cdaddr, cl-cddaar, cl-cddadr, cl-cdddar, cl-cddddr):
Add a compiler-macro declaration to use cl--compiler-macro-cXXr.
(cl-list*, cl-adjoin): Don't put an autoload manually.
* emacs-lisp/cl-macs.el (cl--compiler-macro-adjoin)
(cl--compiler-macro-list*): Add autoload cookie.
(cl--compiler-macro-cXXr): New function.
* help-fns.el (help-fns--compiler-macro): New function extracted from
describe-function-1; follow aliases and use `compiler-macro' property.
(describe-function-1): Use it.
Stefan Monnier [Mon, 11 Jun 2012 15:52:50 +0000 (11:52 -0400)]
Use lexical-binding for all of CL, and clean up its namespace.
* lisp/emacs-lisp/cl-lib.el: Use lexical-binding.
(cl-map-extents, cl-maclisp-member): Remove.
(cl--set-elt, cl--set-nthcdr, cl--set-buffer-substring)
(cl--set-substring, cl--block-wrapper, cl--block-throw)
(cl--compiling-file, cl--mapcar-many, cl--do-subst): Use "cl--" prefix.
* lisp/emacs-lisp/cl-extra.el: Use lexical-binding.
(cl--mapcar-many, cl--map-keymap-recursively, cl--map-intervals)
(cl--map-overlays, cl--set-frame-visible-p, cl--progv-save)
(cl--progv-before, cl--progv-after, cl--finite-do, cl--set-getf)
(cl--do-remf, cl--do-prettyprint): Use "cl--" prefix.
* lisp/emacs-lisp/cl-seq.el: Use lexical-binding.
(cl--parsing-keywords, cl--check-key, cl--check-test-nokey)
(cl--check-test, cl--check-match): Use "cl--" prefix and backquotes.
(cl--alist, cl--sublis-rec, cl--nsublis-rec, cl--tree-equal-rec):
* lisp/emacs-lisp/cl-macs.el (cl--lambda-list-keywords): Use "cl--" prefix.
* lisp/edmacro.el (edmacro-mismatch): Simplify to remove dependence on
CL's internals.
Stefan Monnier [Mon, 11 Jun 2012 15:13:27 +0000 (11:13 -0400)]
Don't purify in Fmake_byte_code.
* src/alloc.c (make_byte_code): New function.
(Fmake_byte_code): Use it. Don't purify here.
* src/lread.c (read1): Use it as well to avoid extra allocation.
Michael Albinus [Mon, 11 Jun 2012 13:03:39 +0000 (15:03 +0200)]
Sync with Tramp 2.2.6-pre.
* tramp.texi (all): Use consequently @command{}, @env{} and @kbd{}
where appropriate.
(Ad-hoc multi-hops): New section.
(Remote processes): New subsection "Running remote processes on
Windows hosts".
(History): Add remote commands on Windows, and ad-hoc multi-hop methods.
(External methods): "ControlPersist" must be set to "no" for the
`scpc' method.
(Remote processes): Add a note about `auto-revert-tail-mode'.
(Frequently Asked Questions): Use "scpx" in combination with
"ControlPersist". Reported by Adam Spiers <emacs@adamspiers.org>.
Michael Albinus [Mon, 11 Jun 2012 10:30:07 +0000 (12:30 +0200)]
Sync with Tramp 2.2.6-pre.
* net/tramp-cache.el (tramp-dump-connection-properties): Let-bind
`print-length' and `print-level' to nil, in order to avoid
truncation. Reported by Christopher Schmidt
<christopher@ristopher.com>.
* net/tramp-cmds.el (tramp-cleanup-connection): Delete also
process.
* net/tramp-compat.el (tramp-compat-condition-case-unless-debug):
New defmacro.
(tramp-compat-copy-directory): Add optional argument
COPY-CONTENTS. It is not handled yet.
* net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name):
* net/tramp-gw.el (tramp-gw-open-connection): Add hop to
connection vector.
* net/tramp-sh.el (tramp-copy-size-limit): Fix docstring.
(tramp-methods): Do not use `tramp-password-end-of-line'.
(tramp-completion-function-alist-putty): Handle
UNIX case.
(tramp-remote-path): Add "/opt/bin", "/opt/sbin"
and "/opt/local/bin".
(tramp-do-file-attributes-with-stat)
(tramp-do-directory-files-and-attributes-with-stat)
Return uid and gid as real numbers. They could run out of
integer range on cygwin.
(tramp-do-copy-or-rename-file-out-of-band): Better
trace format.
(tramp-sh-handle-expand-file-name): Handle hops.
(tramp-open-connection-setup-interactive-shell):
Use `tramp-cleanup'. Move check for busyboxes ...
(tramp-find-shell): ... here. Simplify
implementation. Set "remote-shell" property also for alternative
shells.
(tramp-remote-coding-commands): Check "test -c
/dev/stdout". If failing, a regular file would be written
otherwise. Reported by
Dmitry Kurochkin <dmitry.kurochkin@gmail.com>.
(tramp-find-inline-encoding): Cache the coding
commands in the process cache. Apply test command on the remote
side, if defined.
(tramp-find-inline-compress): Cache the compress
commands in the process cache.
(tramp-compute-multi-hops): Save
`tramp-default-proxies-alist'
when requested. Handle hops.
(tramp-current-connection): New defvar.
(tramp-maybe-open-connection): Use
`tramp-cleanup'. Throw
`suppress', if there was a failed connection
shortly before. Handle user interrupt. (Bug#10187)
(tramp-get-inline-compress,
tramp-get-inline-coding): Read
connection properties from the process cache.
* net/tramp-smb.el (tramp-smb-server-version)
(tramp-smb-wrong-passwd-regexp,
tramp-smb-actions-with-tar): New defconsts.
(tramp-smb-prompt): Extend for powershell prompt.
(tramp-smb-file-name-handler-alist): Add handlers for
`process-file', `shell-command' and
`start-file-process'.
(tramp-smb-winexe-program, tramp-smb-winexe-shell-command)
(tramp-smb-winexe-shell-command-switch): New
defcustoms.
(tramp-smb-file-name-p): Simplify.
(tramp-smb-action-with-tar,
tramp-smb-handle-process-file)
(tramp-smb-kill-winexe-function, tramp-smb-call-winexe)
(tramp-smb-shell-quote-argument): New defuns.
(tramp-smb-handle-copy-directory): Add
COPY-CONTENTS argument.
Implement using "tar". By this, time-stamps are
preserved.
(tramp-smb-handle-copy-file): Handle also the case
of directories.
(tramp-smb-do-file-attributes-with-stat)
(tramp-smb-get-file-entries,
tramp-smb-get-cifs-capabilities): Use
`tramp-get-connection-buffer').
(tramp-smb-handle-rename-file): Use "rename", when source and
target are on the same share.
(tramp-smb-maybe-open-connection): Handle wrong passwords. Use
`tramp-smb-server-version'.
(tramp-smb-wait-for-output): Remove prompt.
* net/tramp.el (top): Require 'cl.
(tramp-methods, tramp-rsh-end-of-line): Remove
`tramp-password-end-of-line' from docstring.
(tramp-save-ad-hoc-proxies): New defcustom.
(tramp-completion-function-alist): Adapt docstring.
(tramp-default-password-end-of-line): Remove defcustom.
(tramp-shell-prompt-pattern): Allow "[]" style
prompts. (Bug#11065)
(tramp-user-regexp, tramp-file-name-regexp-unified)
(tramp-file-name-regexp-url): Extend regexp by hop
separator.
(tramp-postfix-hop-format,
tramp-postfix-hop-regexp)
(tramp-remote-file-name-spec-regexp): New defconst.
(tramp-file-name-structure): Extend structure for
hops.
(tramp-get-method-parameter): Move up.
(tramp-file-name-p, tramp-dissect-file-name)
(with-parsed-tramp-file-name): Handle hops.
(tramp-file-name-hop): New defun.
(tramp-make-tramp-file-name): New optional arg HOP.
(tramp-message-show-progress-reporter-message):
New defvar.
(tramp-with-progress-reporter): Use it. We cannot use
`tramp-message-show-message' here, because this
suppresses also error buffers.
(tramp-error-with-buffer): Suppress buffer view, if
`tramp-message-show-message' is nil. Use
`tramp-get-connection-buffer'.
(tramp-cleanup): New defun.
(tramp-rfn-eshadow-update-overlay): Let-bind
`non-essential' to `t'.
(tramp-file-name-handler): If `debug-on-error' is
set, propagate an error unchanged.
(tramp-completion-handle-file-name-all-completions):
Handle hops. Fix an error when called from ido.
(tramp-completion-dissect-file-name): Use better
local variable name. Add hop to the vector.
(tramp-handle-insert-file-contents): Use
progress-reporter for the whole scenario.
(tramp-action-password): Let-bind
`enable-recursive-minibuffers' to `t'.
(tramp-check-for-regexp): Simplify search.
(tramp-enter-password): Remove it. Move
implementation ...
(tramp-action-password): ... here.
(tramp-mode-string-to-int, tramp-local-host-p)
(tramp-make-tramp-temp-file, tramp-read-passwd)
(tramp-clear-passwd, tramp-time-less-p,
tramp-time-diff): Set tramp-autoload cookie.
* net/trampver.el: Update release number.
* net/tramp.el (tramp-set-completion-function): Fix
docstring.
(tramp-parse-group, tramp-parse-file)
(tramp-parse-shostkeys-sknownhosts): New defuns.
(tramp-parse-rhosts, tramp-parse-rhosts-group, tramp-parse-shosts)
(tramp-parse-shosts-group, tramp-parse-sconfig)
(tramp-parse-sconfig-group, tramp-parse-shostkeys)
(tramp-parse-sknownhosts, tramp-parse-hosts)
(tramp-parse-hosts-group, tramp-parse-passwd,
tramp-parse-netrc): Use them.
(tramp-parse-passwd-group, tramp-parse-netrc-group)
(tramp-parse-putty-group): Don't narrow.
(tramp-parse-putty): Make a loop.
(tramp-file-name-handler): Catch the `suppress'
signal.
Stefan Monnier [Mon, 11 Jun 2012 00:33:33 +0000 (20:33 -0400)]
* lisp/emacs-lisp/pcase.el (pcase--let*): New function.
(pcase-let*): Use it. Use pcase--memoize to avoid repeated expansions.
(pcase--expand): Use macroexp-let².
Gnus developers [Sun, 10 Jun 2012 23:27:32 +0000 (23:27 +0000)]
Merge bugfixes done in Gnus trunk
Those changes fix only the bugs having appeared in the bug list.
Many other Gnus changes not yet merged to Emacs are in:
ftp://ftp.jpl.org/pub/tmp/MaGnus-to-Emacs.patch
(or http://www.jpl.org/ftp/pub/tmp/MaGnus-to-Emacs.patch)
2012-06-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
* gnus-group.el (gnus-group-get-new-news): Respect
`gnus-group-use-permanent-levels', as documented (bug#11638).
2012-06-10 Dave Abrahams <dave@boostpro.com>
* gnus-int.el (gnus-warp-to-article): Limit registry warping to real
groups (bug#11641).
Stefan Monnier [Sun, 10 Jun 2012 13:28:26 +0000 (09:28 -0400)]
Reduce use of cl in lisp/emacs-lisp/.
* lisp/emacs-lisp/timer.el, lisp/emacs-lisp/syntax.el, lisp/emacs-lisp/smie.el:
* lisp/emacs-lisp/ewoc.el, lisp/emacs-lisp/cconv.el,lisp/emacs-lisp/derived.el:
* lisp/emacs-lisp/byte-opt.el, lisp/emacs-lisp/autoload.el: Convert to cl-lib.
* lisp/emacs-lisp/easymenu.el, lisp/emacs-lisp/easy-mmode.el:
* lisp/emacs-lisp/bytecomp.el: Use pcase instead of `cl'.
* lisp/emacs-lisp/cl-lib.el: Get rid of special cl-macs auto load.
Chong Yidong [Sat, 9 Jun 2012 16:44:44 +0000 (00:44 +0800)]
Add support for italic text on ttys.
* src/dispextern.h: Replace unused TTY_CAP_BLINK with TTY_CAP_ITALIC.
(struct face): Remove unused fields tty_dim_p, tty_blinking_p, and
tty_alt_charset_p. Add tty_italic_p.
* src/term.c: Support italics in capable terminals.
(no_color_bit): Replace unused NC_BLINK with NC_ITALIC.
(turn_on_face): Output using TS_enter_italic_mode if available.
Don't handle unused blinking and alt-charset cases.
(turn_off_face): Handle italic case; discard unused tty_blinking_p
and tty_alt_charset_p cases.
(tty_capable_p, init_tty): Support italics.
* src/termchar.h (struct tty_display_info): Add field for italics.
Remove unused blink field.