Stefan Monnier [Sat, 9 Jun 2012 02:26:47 +0000 (22:26 -0400)]
Don't autoload functions too eagerly during macroexpansion.
* lisp/emacs-lisp/macroexp.el (macroexp--expand-all): Only autoload
a function if there's a clear indication that it has a compiler-macro.
* lisp/emacs-lisp/byte-run.el (defun-declarations-alist, defmacro, defun)
(macro-declarations-alist): Add arglist to declaration functions.
(defun-declarations-alist): Add `obsolete' and `compiler-macro'.
* lisp/emacs-lisp/cl-seq.el (cl-member, cl-assoc):
* lisp/emacs-lisp/cl-lib.el (cl-list*, cl-adjoin):
* lisp/emacs-lisp/cl-extra.el (cl-get): Use the new `declare' statement.
Also add autoload to find the compiler macro.
* lisp/emacs-lisp/cl-macs.el (eql) [compiler-macro]: Remove.
(cl--compiler-macro-member, cl--compiler-macro-assoc)
(cl--compiler-macro-adjoin, cl--compiler-macro-list*)
(cl--compiler-macro-get): New functions, replacing calls to
cl-define-compiler-macro.
(cl-typep) [compiler-macro]: Use macroexp-let².
* automated/icalendar-tests.el (icalendar--parse-vtimezone): Test
escaped commas in TZID (Bug#11473).
(icalendar-import-with-timezone): New.
(icalendar-real-world): Add new testcase as found in the bugreport
of Bug#11473.
* display.texi (Face Attributes): Font family does not accept
wildcards. De-document obsolete :bold and :italic attributes.
(Defining Faces): Use new-style face spec format.
Eli Zaretskii [Fri, 8 Jun 2012 13:59:28 +0000 (16:59 +0300)]
Revert inadvertent commit in dispnew.c as part of 2012-06-08T08:44:45Z!eliz@gnu.org.
src/dispnew.c (showing_window_margins_p): Undo last change, which
was done due to an inadvertent commit.
(adjust_frame_glyphs_for_frame_redisplay): Do call
showing_window_margins_p.
Stefan Monnier [Fri, 8 Jun 2012 13:18:26 +0000 (09:18 -0400)]
Clean up scoping rule of predefined single-word vars.
* lisp/startup.el (argv, argi): Make lexically scoped.
* lisp/emacs-lisp/float-sup.el (pi): Use internal-make-var-non-special.
* lisp/emacs-lisp/cl-macs.el: Use lexical-binding.
Rename cl-bind-* to cl--bind-*.
* lisp/files.el: Don't require `cl' since it doesn't use it.
* lisp/emacs-lisp/pcase.el, lisp/emacs-lisp/macroexp.el: Add coding cookie.
* src/eval.c (Fmake_var_non_special): New primitive.
(syms_of_eval): Defsubr it.
* src/lread.c (syms_of_lread): Mark `values' as lexically scoped.
lisp/textmodes/texinfmt.el: Fix bug#11640 (reverts part of 2008-07-31T05:33:56Z!dann@ics.uci.edu).
(texinfo-format-printindex): Use `texinfo-sort-region' in all platforms,
instead of calling external sort utility.
(texinfo-sort-region, texinfo-sort-startkeyfun): Restore functions.
Eli Zaretskii [Fri, 8 Jun 2012 08:44:45 +0000 (11:44 +0300)]
Mention in "C-u C-x =" display how to insert the character w/o input methods.
lisp/descr-text.el (describe-char): Mention how to insert the
character, if the current input method doesn't support it.
See the discussion in this thread for the details:
http://lists.gnu.org/archive/html/emacs-devel/2012-05/msg00533.html.
Dmitry Antipov [Fri, 8 Jun 2012 08:44:30 +0000 (12:44 +0400)]
Block-based vector allocation of small vectors.
* src/lisp.h (struct vectorlike_header): New field `nbytes',
adjust comment accordingly.
* src/alloc.c (enum mem_type): New type `MEM_TYPE_VECTOR_BLOCK'
to denote vector blocks. Adjust users (live_vector_p,
mark_maybe_pointer, valid_lisp_object_p) accordingly.
(COMMON_MULTIPLE): Move outside #if USE_LSB_TAG.
(VECTOR_BLOCK_SIZE, vroundup, VECTOR_BLOCK_BYTES),
(VBLOCK_BYTES_MIN, VBLOCK_BYTES_MAX, VECTOR_MAX_FREE_LIST_INDEX),
(VECTOR_FREE_LIST_FLAG, ADVANCE, VINDEX, SETUP_ON_FREE_LIST),
(VECTOR_SIZE, VECTOR_IN_BLOCK): New macros.
(roundup_size): New constant.
(struct vector_block): New data type.
(vector_blocks, vector_free_lists, zero_vector): New variables.
(all_vectors): Renamed to `large_vectors'.
(allocate_vector_from_block, init_vectors, allocate_vector_from_block)
(sweep_vectors): New functions.
(allocate_vectorlike): Return `zero_vector' as the only vector of
0 items. Allocate new vector from block if vector size is less than
or equal to VBLOCK_BYTES_MAX.
(Fgarbage_collect): Move all vector sweeping code to sweep_vectors.
(init_alloc_once): Add call to init_vectors.
* doc/lispref/internals.text (Garbage Collection): Document new
vector management code and vectorlike_header structure.
Katsumi Yamaoka [Fri, 8 Jun 2012 04:38:56 +0000 (04:38 +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-07 Lars Magne Ingebrigtsen <larsi@gnus.org>
* gnus-msg.el (gnus-msg-mail): Warn the user about Gnus not running
(bug#11514).
2012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
* gnus-msg.el (gnus-summary-cancel-article): See what From header we
would have gotten if we posted to the group, and use that to compare
against the message we want to cancel (bug#10808).
Sam Steingold [Fri, 8 Jun 2012 04:23:26 +0000 (00:23 -0400)]
* lisp/bindings.el (global-map): Bind XF86Forward to next-buffer and
XF86Back to previous-buffer.
(minibuffer-local-map): Bind them to next-history-element and
previous-history-element respectively.
* lisp/help-mode.el (help-mode-map): Bind them to help-go-forward and
help-go-back respectively.
* lisp/info.el (Info-mode-map): Bind them to Info-history-forward and
Info-history-back respectively.
These are the keys next to Up on the ThinkPad keyboard.
Stefan Monnier [Fri, 8 Jun 2012 02:54:35 +0000 (22:54 -0400)]
Get rid of cl-lexical-let, keeping only lexical-let for compatibility.
* lisp/emacs-lisp/cl-macs.el: Provide itself.
(cl--labels-convert-cache): New var.
(cl--labels-convert): New function.
(cl-flet, cl-labels): New implementation with new semantics, relying on
lexical-binding.
* lisp/emacs-lisp/cl.el: Mark compatibility aliases as obsolete.
(cl-closure-vars, cl--function-convert-cache)
(cl--function-convert): Move from cl-macs.el.
(lexical-let, lexical-let*, flet, labels): Move from cl-macs.el and
rename by removing the "cl-" prefix.
* lisp/emacs-lisp/macroexp.el (macroexp-unprogn): New function.
Stefan Monnier [Thu, 7 Jun 2012 19:48:22 +0000 (15:48 -0400)]
Move old compatiblity to cl.el. Remove cl-macroexpand-all.
* emacs-lisp/cl-extra.el (cl-map-keymap, cl-copy-tree)
(cl-not-hash-table, cl-builtin-gethash, cl-builtin-remhash)
(cl-builtin-clrhash, cl-builtin-maphash, cl-gethash, cl-puthash)
(cl-remhash, cl-clrhash, cl-maphash, cl-make-hash-table)
(cl-hash-table-p, cl-hash-table-count): Move to cl.el.
(cl-macroexpand-cmacs): Remove var.
(cl-macroexpand-all, cl-macroexpand-body): Remove funs.
Use macroexpand-all instead.
* emacs-lisp/cl-lib.el (cl-macro-environment): Remove decl.
(cl-macroexpand): Move to cl-macs.el and rename to cl--sm-macroexpand.
(cl-member): Remove old alias.
* emacs-lisp/cl-macs.el (cl-macro-environment): Remove var.
Use macroexpand-all-environment instead.
(cl--old-macroexpand): New var.
(cl--sm-macroexpand): New function.
(cl-symbol-macrolet): Use it during macro expansion.
(cl--function-convert-cache): New var.
(cl--function-convert): New function, extracted from
cl-macroexpand-all.
(cl-lexical-let): Use it.
Stefan Monnier [Thu, 7 Jun 2012 19:25:48 +0000 (15:25 -0400)]
Cleanup cl-macs namespace. Add macro helpers in macroexp.el.
* emacs-lisp/macroexp.el (macroexp-progn, macroexp-let*, macroexp-if)
(macroexp-let², macroexp--const-symbol-p, macroexp-const-p)
(macroexp-copyable-p): New functions and macros.
* emacs-lisp/edebug.el (edebug-unwrap):
* emacs-lisp/disass.el (disassemble-internal): Use macroexp-progn.
* emacs-lisp/pcase.el: Use macroexp-let*, macroexp-if, ...
(pcase--let*): Remove.
* emacs-lisp/bytecomp.el (byte-compile-const-symbol-p)
(byte-compile-constp): Remove. Use macroexp--const-symbol-p and
macroexp-const-p instead.
* emacs-lisp/byte-opt.el: Use macroexp-const-p and macroexp-progn.
* emacs-lisp/cl-macs.el: Clean up the name space by using "cl--"
instead of "cl-" for internal definitions. Use macroexp-const-p.
(cl-old-bc-file-form): Remove var.
(cl-const-exprs-p): Remove fun.
(cl-labels, cl-macrolet): Use backquote.
(cl-lexical-let): Use cl-symbol-macrolet. Don't use cl-defun-expander.
(cl-defun-expander, cl-byte-compile-compiler-macro): Remove fun.
(cl-define-setf-expander): Rename from cl-define-setf-method.
* emacs-lisp/cl.el: Adjust alias for define-setf-method.
* international/mule-cmds.el: Don't require CL.
(view-hello-file): Don't use `letf'.
Stefan Merten [Thu, 7 Jun 2012 09:20:41 +0000 (11:20 +0200)]
* rst.el: Use `eval-when-compile' for requiring
`cl.el'. Silence compiler warnings. Fix versions.
(rst-position-if, rst-position, rst-some, rst-signum): New
functions.
(rst-shift-region, rst-adornment-level, rst-compute-tabs)
(rst-indent-line, rst-shift-region, rst-forward-line): Use new
functions.
(rst-package-emacs-version-alist): Correct Emacs version to
represent major merge with upstream.
(rst-transition, rst-adornment, rst-compile-toolsets): Fix
versions.
Without this change, doprnt (buf, 2, "%s", FORMAT_END, AP)
would mishandle a string argument "Xc" if X was a multibyte
character of length 2: it would truncate after X's first byte
rather than including all of X.
Stefan Monnier [Wed, 6 Jun 2012 18:08:00 +0000 (14:08 -0400)]
* lisp/emacs-lisp/macroexp.el: Don't require CL since we don't use it.
(macroexp--cons): Rename from maybe-cons.
(macroexp--accumulate): Rename from macroexp-accumulate.
(macroexp--all-forms): Rename from macroexpand-all-forms.
(macroexp--all-clauses): Rename from macroexpand-all-clauses.
(macroexp--expand-all): Rename from macroexpand-all-1.
Glenn Morris [Wed, 6 Jun 2012 01:38:04 +0000 (21:38 -0400)]
Remove script stamping in lib-src/
rcs2log no longer needs it, and grep-changelog never really has
(nothing in Emacs runs that, I don't know why Emacs includes it, if you
are using an uninstalled out-of-tree build you can just as easily run
it from the source directory).
Glenn Morris [Wed, 6 Jun 2012 00:29:10 +0000 (20:29 -0400)]
Replace the last use of the external vcdiff script
* lisp/vc/vc-sccs.el (vc-sccs-write-revision): New function.
(vc-sccs-workfile-unchanged-p): Use vc-sccs-write-revision.
(vc-sccs-diff): Replace use of the external vcdiff script.
Martin Rudalics [Tue, 5 Jun 2012 09:11:06 +0000 (11:11 +0200)]
Clean up and simplify buffer display routines.
* window.el (get-lru-window, get-mru-window, get-largest-window):
New argument NOT-SELECTED to avoid picking the selected window.
(window--display-buffer-1, window--display-buffer-2): Replace by
new function window--display-buffer
(display-buffer-same-window, display-buffer-reuse-window)
(display-buffer-pop-up-frame, display-buffer-pop-up-window): Use
window--display-buffer.
(display-buffer-use-some-window): Remove temporary dedication
hack by calling get-lru-window and get-largest-window with
NOT-SELECTED argument non-nil. Call window--display-buffer.
Stefan Monnier [Mon, 4 Jun 2012 01:05:17 +0000 (21:05 -0400)]
* lisp/emacs-lisp/cl-lib.el: Rename from cl.el.
* lisp/emacs-lisp/cl.el: New compatibility file.
* emacs-lisp/cl-lib.el, lisp/emacs-lisp/cl-seq.el, lisp/emacs-lisp/cl-macs.el:
* lisp/emacs-lisp/cl-extra.el: Rename all top-level functions and variables
to obey the "cl-" prefix.
* lisp/emacs-lisp/macroexp.el (macroexpand-all-1): Adjust to new name.
Glenn Morris [Sun, 3 Jun 2012 23:49:12 +0000 (16:49 -0700)]
Remove lib-src/rcs-checkin
This script isn't used by Emacs, and I can't imagine anyone else is
using it any more either... From the commentary:
"This script is intended to be used to convert files with an
old-Emacs-style version history for use with VC (the Emacs 19
version-control interface), which likes to use RCS as its back end."
Ulrich Müller [Sun, 3 Jun 2012 23:14:22 +0000 (16:14 -0700)]
Workaround dumping problem on PaX-enabled Linux kernels
* configure.in (PAXCTL): Check for paxctl.
* src/Makefile.in (PAXCTL): Define.
(temacs$(EXEEXT)): Disable memory randomization for the temacs
binary via PaX flags if the paxctl utility is available.
(emacs$(EXEEXT), bootstrap-emacs$(EXEEXT)):
Restore PaX flags to their default.
Chong Yidong [Sun, 3 Jun 2012 10:54:22 +0000 (18:54 +0800)]
Allow clicking mouse-3 on mode line to change coding system.
* lisp/bindings.el (mode-line-coding-system-map): Allow using mouse-3
to invoke set-buffer-file-coding-system.
(mode-line-mule-info-help-echo): Update help text.
Chong Yidong [Sun, 3 Jun 2012 10:23:49 +0000 (18:23 +0800)]
Make mode line help-echo visible for unibyte buffers.
* src/xdisp.c (decode_mode_spec_coding): Display a space for a unibyte
buffer.
* lisp/bindings.el (mode-line-mule-info-help-echo)
(mode-line-read-only-help-echo, mode-line-modified-help-echo):
New functions.
(mode-line-mule-info, mode-line-modified): Use them.
(mode-line-eol-desc, propertized-buffer-identification):
Consistency fixes for help text.
Chong Yidong [Sun, 3 Jun 2012 09:03:23 +0000 (17:03 +0800)]
Implement default help-echo for mode line.
* lisp/bindings.el: Remove explicit help-echo from format-mode-line.
(mode-line-front-space, mode-line-end-spaces)
(mode-line-misc-info): New variables.
(mode-line-modes, mode-line-position): Move the default value to
the variable definition.
(mode-line-default-help-echo): New defcustom.
* src/buffer.c (buffer_local_value_1): New function, split from
Fbuffer_local_value; can return Qunbound.
(Fbuffer_local_value): Use it.
(Vmode_line_format): Docstring tweaks.
* src/xdisp.c (calc_pixel_width_or_height): Use Fbuffer_local_value.
(note_mode_line_or_margin_highlight): If there is no help echo,
use mode-line-default-help-echo. Handle the case where the mouse
position is past the end of the mode line string.
* doc/lispref/modes.texi (Mode Line Data): Use "mode line construct"
terminology for consistency.
Stefan Monnier [Sat, 2 Jun 2012 19:21:34 +0000 (15:21 -0400)]
* lisp/simple.el (execute-extended-command): Set real-this-command.
* src/keyboard.c: Export real-this-command to Elisp.
(syms_of_keyboard): Rename real_this_command to Vreal_this_command
and DEFVAR it. Update all users.
* dired.el (dired-sort-set-mode-line): Rename from
dired-sort-set-modeline. All callers changed.
* foldout.el (foldout-mode-line-string): Rename from
foldout-modeline-string. All callers changed.
(foldout-update-mode-line): Rename from foldout-update-modeline.
* strokes.el (strokes-lighter): Rename from
strokes-modeline-string.
* subr.el (redraw-modeline): Make into obsolete alias.
* calendar/timeclock.el (timeclock-mode-line-display): Rename from
timeclock-modeline-display. Make old name an alias.
(timeclock-update-mode-line): Likewise. All callers changed.
(timeclock-mode-line-display): No need to check before using
add-hook.
(timeclock-relative, timeclock-day-over-hook)
(timeclock-use-elapsed, timeclock-mode-string)
(timeclock-mode-line-display): Doc fix, "modeline" -> "mode line".
* emulation/crisp.el (crisp-mode-mode-line-string): Rename from
crisp-mode-modeline-string.
* erc-track.el (erc-track, erc-track-faces-priority-list)
(erc-track-faces-normal-list, erc-track-find-face)
(erc-track-modified-channels): Fix modeline -> mode line in docs.
* eshell/esh-mode.el (eshell-status-in-mode-line): Rename from
eshell-status-in-modeline.
Chong Yidong [Sat, 2 Jun 2012 07:30:07 +0000 (15:30 +0800)]
Add more enabled ImageMagick types.
* lisp/image.el (imagemagick-enabled-types): Rename from
imagemagick-types-enable. Add many more types.
(imagemagick-types-inhibit): Change default to nil.
(imagemagick-filter-types): Caller changed.
Stefan Monnier [Fri, 1 Jun 2012 20:36:00 +0000 (16:36 -0400)]
* lisp/emacs-lisp/cl-macs.el: Use backquotes.
(cl-transform-function-property): Use eval-and-compile rather than
abusing `require'.
(defstruct): Use declare-function instead of with-no-warnings.
Stefan Monnier [Fri, 1 Jun 2012 20:24:17 +0000 (16:24 -0400)]
* lisp/gnus/nntp.el: Stop the `letf' madness.
(nntp--report-1): New var.
(nntp-report): Merge nntp-report-1 into it.
(nntp-with-open-group-function): Set nntp--report-1 instead of modifying
the nntp-report function.
Stefan Monnier [Fri, 1 Jun 2012 19:47:54 +0000 (15:47 -0400)]
* lisp/emacs-lisp/bytecomp.el: Fix last change.
(byte-compile-output-docform): Re-add the print-circle bindings.
(byte-compile-fix-header): Use #$ just because it's shorter.
(byte-compile-output-file-form): Remove defun/defmacro.
Paul Eggert [Fri, 1 Jun 2012 18:26:21 +0000 (11:26 -0700)]
Remove --disable-maintainer-mode option from 'configure'. (Bug#11555)
It is confusingly named and rarely useful. See, for example,
<http://lists.gnu.org/archive/html/emacs-devel/2011-12/msg00089.html>.
* INSTALL.BZR: Don't mention --disable-maintainer-mode.
* Makefile.in (MAINTAINER_MODE_FLAG): Remove; all uses removed.
* configure.in: Remove --disable-maintainer-mode.
(USE_MAINTAINER_MODE, MAINT): Remove.
* admin/make-tarball.txt: Don't worry about maintainer mode.
* etc/NEWS: Mention this.
Dmitry Antipov [Fri, 1 Jun 2012 03:41:03 +0000 (07:41 +0400)]
For a 'struct window', replace some Lisp_Object fields to
bitfields where appropriate, remove unused fields.
* window.h (struct window): Remove unused 'last_mark_x' and
'last_mark_y' fields. Rename 'mini_p' field to 'mini',
change it's type from Lisp_Object to bitfield.
Change type of 'force_start', 'optional_new_start',
'last_had_star', 'update_mode_line' and 'start_at_line_beg'
fields from Lisp_Object to bitfield. Adjust users accordingly.