Chong Yidong [Sun, 13 May 2012 14:23:45 +0000 (22:23 +0800)]
Adapt Electric Buffer Menu to recent Buffer Menu changes.
* lisp/ebuff-menu.el (electric-buffer-list): Put electric buffer menu
command descriptions in this docstring, instead of the docstring
of electric-buffer-menu-mode. Code cleanups.
(electric-buffer-menu-mode): Use define-derived-mode. Rename from
Electric-buffer-menu-mode.
(electric-buffer-update-highlight): Minor code cleanup.
* lisp/emacs-lisp/tabulated-list.el (tabulated-list-format)
(tabulated-list-entries, tabulated-list-padding)
(tabulated-list-sort-key): Make permanent-local.
Glenn Morris [Sat, 12 May 2012 16:44:01 +0000 (09:44 -0700)]
Make doc/misc/Makefile.in look more like the other doc Makefiles
* doc/misc/Makefile.in:
Use explicit $srcdir in all dependencies.
Remove cd $srcdir from rules.
(VPATH): Remove.
(infodir): Set to an absolute path.
(INFO_TARGETS): Use short names.
(mkinfodir): infodir is now absolute.
(echo-info, maintainer-clean): Update for new format of INFO_TARGETS.
Glenn Morris [Fri, 11 May 2012 17:13:18 +0000 (13:13 -0400)]
* Makefile.in (install-arch-indep): Remove dead code.
./lisp/simpl.ele never exists in the _build_ directory,
the Lisp files are always in the _source_ directory.
Even if they were not, it would be wrong to install just
*.el and *.elc, since there are subdirectories in lisp/.
Stefan Monnier [Fri, 11 May 2012 15:05:03 +0000 (11:05 -0400)]
* lisp/term.el: Move keymap initialization code to be more idiomatic.
(term-signals-menu, term-mode-map, term-raw-map, term-raw-escape-map)
(term-terminal-menu): Move initialization into declaration.
(term-escape-char): Let the user set it in her .emacs.
Stefan Monnier [Fri, 11 May 2012 14:24:50 +0000 (10:24 -0400)]
* lisp/progmodes/sh-script.el: Use post-self-insert-hook&electric-pair-mode.
Provide SMIE-based indentation (not enabled by default yet).
(sh-mode-map): Don't bind electric keys.
Use electric-pair-mode instead of skeleton-pair.
(sh-assignment-regexp): Fit within 80 columns.
(sh-indent-supported): Specify actual shell name instead of boolean.
(sh--maybe-here-document): New fun, from sh-maybe-here-document.
(sh-maybe-here-document): Use it. Make obsolete.
(sh-electric-here-document-mode) New minor mode.
(sh-mode): Use it. Don't set sh-indent-supported-here here.
(sh-smie-sh-grammar, sh-smie--sh-operators, sh-smie--sh-operators-re)
(sh-smie--sh-operators-back-re, sh-indent-after-continuation)
(sh-smie-rc-grammar, sh-use-smie): New vars.
(sh-smie--keyword-p, sh-smie--newline-semi-p, sh-smie--sh-keyword-p)
(sh-smie-sh-forward-token, sh-smie--looking-back-at-continuation-p)
(sh-smie-sh-backward-token, sh-smie--continuation-start-indent)
(sh-smie-sh-rules, sh-smie-rc-rules, sh-smie--sh-keyword-in-p)
(sh-smie--rc-after-special-arg-p, sh-smie-rc-backward-token)
(sh-smie-sh-rules, sh-smie--rc-newline-semi-p): New functions.
(sh-set-shell): Use smie-setup if requested.
Chong Yidong [Thu, 10 May 2012 06:27:12 +0000 (14:27 +0800)]
Cleanups and improvements for FFAP and URL.
* ffap.el (ffap-url-unwrap-local): Make it work right.
Use url-generic-parse-url, and handle host names and Windows
filenames properly.
(ffap-url-unwrap-remote): Use url-generic-parse-url.
(ffap-url-unwrap-remote): Accept list values, specifying a list of
URL schemes to work on.
(ffap--toggle-read-only): New function.
(ffap-read-only, ffap-read-only-other-window)
(ffap-read-only-other-frame): Use it.
(ffap-fixup-url): Don't check ffap-ftp-regexp, since it is not
necessary for ffap-url-unwrap-remote.
* url-parse.el (url-path-and-query, url-port-if-non-default): New
functions.
(url-generic-parse-url): Don't set the portspec slot if it is not
specified; that is what `url-port' is for.
(url-port): Only require the scheme to be specified to call
url-scheme-get-property.
* url-util.el (url-encode-url): Use url-path-and-query.
Glenn Morris [Thu, 10 May 2012 03:40:20 +0000 (20:40 -0700)]
Install self-contained ns leim files directly to their final destination
This is instead of installing them first in one place, then moving them.
It also fixes the previous change, which was incorrect for
the -disable-ns-self-contained case.
* configure.in (LEIM_INSTALLDIR): New output variable.
* leim/Makefile.in: (install_prefix): New.
(LEIM_INSTALLDIR): New, set by configure.
(install): Use LEIM_INSTALLDIR.
Paul Eggert [Thu, 10 May 2012 00:27:32 +0000 (17:27 -0700)]
etags: pacify gcc -Wstack-protector on Ubuntu 12.04 x86
* etags.c: Include <stdarg.h>.
(error): Declare as printf-style, as that's what it really is.
All uses changed.
(add_regex): Use single char rather than array-of-one char.
Michael Albinus [Wed, 9 May 2012 21:13:43 +0000 (23:13 +0200)]
* dbusbind.c (xd_registered_buses): New internal Lisp object.
Rename all occurences of Vdbus_registered_buses to xd_registered_buses.
(syms_of_dbusbind): Remove declaration of Vdbus_registered_buses.
Initialize xd_registered_buses.
Paul Eggert [Wed, 9 May 2012 17:51:30 +0000 (10:51 -0700)]
Untag more efficiently if USE_LSB_TAG.
This is based on a proposal by YAMAMOTO Mitsuharu in
<http://lists.gnu.org/archive/html/emacs-devel/2008-01/msg01876.html>.
For an admittedly artificial (nth 8000 longlist) benchmark on
Fedora 15 x86-64, this yields a 25% CPU speedup. Also, it shrinks
Emacs's overall text size by 1%.
* lisp.h (XUNTAG): New macro.
(XCONS, XVECTOR, XSTRING, XSYMBOL, XFLOAT, XMISC, XPROCESS, XWINDOW)
(XTERMINAL, XSUBR, XBUFFER, XCHAR_TABLE, XSUB_CHAR_TABLE, XBOOL_VECTOR)
(XSETTYPED_PSEUDOVECTOR, XHASH_TABLE, TYPED_PSEUDOVECTORP): Use it.
* eval.c (Fautoload):
* font.h (XFONT_SPEC, XFONT_ENTITY, XFONT_OBJECT):
* frame.h (XFRAME): Use XUNTAG.
Paul Eggert [Wed, 9 May 2012 15:07:46 +0000 (08:07 -0700)]
Port recent dbusbind.c changes to 32-bit --with-wide-int.
* dbusbind.c (xd_append_arg, xd_retrieve_arg, Fdbus_message_internal):
Remove unportable assumptions about print widths of types like
dbus_uint32_t.
(xd_get_connection_address, Fdbus_init_bus): Cast Emacs integer to
intptr_t when converting between pointer and integer, to avoid GCC
warnings about wrong width.
Chong Yidong [Wed, 9 May 2012 08:33:48 +0000 (16:33 +0800)]
Improve RFC 3986 conformance of url package.
Fix 2012-04-10 change to url.el.
* url-http.el (url-http-create-request): Ignore obsolete
attributes slot of url-object.
* url-parse.el: Improve RFC 3986 conformance.
(url-generic-parse-url): Do not populate the ATTRIBUTES slot,
since this is not reliable for general RFC 3986 URIs. Keep the
whole path and query inside the FILENAME slot. Improve docstring.
(url-recreate-url-attributes): Mark as obsolete.
(url-recreate-url): Handle missing scheme and userinfo.
* url-util.el (url-encode-url): New function for URL quoting.
(url-encoding-table, url-host-allowed-chars)
(url-path-allowed-chars): New constants.
(url--allowed-chars): New helper function.
(url-hexify-string): Use them.
* url-vars.el (url-nonrelative-link): Make the regexp stricter.
* url.el (url-retrieve-internal): Use url-encode-url.
Glenn Morris [Wed, 9 May 2012 03:11:41 +0000 (20:11 -0700)]
Remove the need for lispref vol1.texi and vol2.texi
* vol1.texi, vol2.texi: Remove files.
* elisp.texi: Add VOL1,2 conditionals equivalent to vol1,2.texi
* two-volume.make: Use elisp.texi as input rather than vol1,2.texi.
lisp/progmodes/idlw-shell.el: Cleanup after 2012-05-04T05:14:14Z!cyd@gnu.org.
(specs): Remove reference to deleted variable
`idlwave-shell-activate-alt-keybindings' and simplify.
Stefan Monnier [Tue, 8 May 2012 15:19:18 +0000 (11:19 -0400)]
* lisp/vc/log-edit.el: Add GNU coding standards highlighting.
(log-edit-font-lock-gnu-style)
(log-edit-font-lock-gnu-keywords): New vars.
(log-edit-font-lock-keywords): New fun.
(log-edit-mode): Don't fold case in font-lock.
(log-edit-font-lock-keywords): Do not assume case-folding.
* .dir-locals.el (log-edit-mode): Enable gnu-style checks.
Stefan Monnier [Tue, 8 May 2012 14:19:08 +0000 (10:19 -0400)]
* lisp/imenu.el: Misc cleanup. Make docstrings out of comments.
Use lexical-binding.
(imenu--index-alist, imenu--last-menubar-index-alist)
(imenu-menubar-modified-tick): Use defvar-local.
(imenu--split-menu): Remove unused var.
(imenu--cleanup-seen): Declare as global.
(imenu--cleanup): Use dolist.
Glenn Morris [Tue, 8 May 2012 01:50:17 +0000 (21:50 -0400)]
Remove no-byte-compile setting from some lisp/language files.
Same comments as per 2012-05-01T06:59:34Z!rgm@gnu.org, for lisp/term:
Not that compiling these will bring any noticeable speed benefit, but
there's really no reason not to compile them. The extra disk space
and build time is negligible, and it might reveal use of obsolete
functions, bugs, etc.
Stefan Merten [Mon, 7 May 2012 19:51:25 +0000 (21:51 +0200)]
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
Stefan Monnier [Mon, 7 May 2012 16:29:55 +0000 (12:29 -0400)]
* lisp/buff-menu.el (list-buffers--refresh): Mark `size' as right-align.
* lisp/emacs-lisp/tabulated-list.el (tabulated-list-init-header):
Handle new :right-align column property.
(tabulated-list-print-col): Idem, plus use `display' text-property to
try and preserve alignment for variable pitch fonts.
Fix up display of the *Minibuf-0* buffer in the mini window.
* src/keyboard.c (read_char): Don't clear the echo area if there's no
message to clear.
* src/xdisp.c (redisplay_internal): Redisplay the mini window (with the
contents of *Minibuf-0*) if there' no message displayed in its stead.
* lisp/emacs-lisp/tabulated-list.el: Add no-header-line alternative.
(tabulated-list-use-header-line): New var.
(tabulated-list-init-header): Use it.
(tabulated-list-print-fake-header): New function.
(tabulated-list-print): Use it.
(tabulated-list-sort-button-map): Add non-header-line commands.
(tabulated-list-init-header): Add column name property to basic
labels as well.
(tabulated-list-col-sort): Handle non-header-line button case.
(tabulated-list--sort-by-column-name): Fix a corner case.
Chong Yidong [Mon, 7 May 2012 03:14:21 +0000 (11:14 +0800)]
Fix a gdb-mi process filtering issue arising in ansi-color.el.
* lisp/ansi-color.el (ansi-color-process-output): Check for validity
of comint-last-output-start before using it. This avoids a bad
interaction with gdb-mi's input/output buffer.
Chong Yidong [Sun, 6 May 2012 16:45:46 +0000 (00:45 +0800)]
* lisp/buff-menu.el: Convert to Tabulated List mode.
(Buffer-menu-buffer+size-width): Make obsolete.
(Buffer-menu-name-width, Buffer-menu-size-width): New variables.
(Buffer-menu-mode-map): Inherit from tabulated-list-mode-map.
(Buffer-menu-mode): Derive from tabulated-list-mode. Move command
documentation into docstring of buffer-menu.
(Buffer-menu-toggle-files-only): Add an informative message.
(Buffer-menu-sort): Convert to alias for tabulated-list-sort.
(Buffer-menu-buffer, Buffer-menu-beginning, Buffer-menu-mark)
(Buffer-menu-unmark, Buffer-menu-backup-unmark)
(Buffer-menu-delete, Buffer-menu-save, Buffer-menu-not-modified)
(Buffer-menu-execute, Buffer-menu-select)
(Buffer-menu-marked-buffers, Buffer-menu-toggle-read-only)
(Buffer-menu-bury): Use Tabulated List machinery.
(Buffer-menu-mouse-select, Buffer-menu-sort-by-column)
(Buffer-menu-sort-button-map, Buffer-menu-make-sort-button):
Deleted.
(list-buffers--refresh): New function.
(list-buffers-noselect): Use it.
(tabulated-list-entry-size->, Buffer-menu--pretty-name)
(Buffer-menu--pretty-file-name): New helper functions.
* lisp/loadup.el: Preload tabulated-list.
* lisp/emacs-lisp/tabulated-list.el (tabulated-list-sort): Rename from
tabulated-list-sort-column.
(tabulated-list-init-header): Add the initial aligning space even
if tabulated-list-padding is zero.
Chong Yidong [Sun, 6 May 2012 08:32:37 +0000 (16:32 +0800)]
Improvements for Tabulated List mode.
* lisp/emacs-lisp/tabulated-list.el (tabulated-list-format): Accept
additional plist in column descriptors.
(tabulated-list-init-header): Obey it.
(tabulated-list-get-entry): New function.
(tabulated-list-put-tag): Use it. Use string-width instead of
length.
(tabulated-list--column-number): New function.
(tabulated-list-print): Use it.
(tabulated-list-print-col): New function. Set
`tabulated-list-column-name' property on each column's text.
(tabulated-list-print-entry): Use it.
(tabulated-list-delete-entry, tabulated-list-set-col): New
functions.
(tabulated-list-sort-column): New command.
Glenn Morris [Sat, 5 May 2012 21:31:41 +0000 (14:31 -0700)]
Optionally include holidays in cal-html output
* lisp/calendar/cal-html.el: (cal-html-holidays): New option.
(cal-html-css-default): Add holiday entry.
(holiday-in-range): Autoload it.
(cal-html-htmlify-entry): Add optional class argument.
(cal-html-htmlify-list): Add optional holidays argument.
(cal-html-insert-agenda-days): Include holidays in the output.
(cal-html-one-month): Maybe include holidays.
Glenn Morris [Sat, 5 May 2012 20:58:14 +0000 (13:58 -0700)]
Move function from cal-tex to holidays
* calendar/holidays.el (holiday-in-range):
Move here from cal-tex-list-holidays.
* calendar/cal-tex.el (cal-tex-list-holidays):
Make it an obsolete alias for holiday-in-range. Update all callers.