Stefan Monnier [Fri, 29 Oct 2010 01:05:38 +0000 (21:05 -0400)]
* lisp/emacs-lisp/pcase.el (pcase): New `string' and `guard' patterns.
(pcase-if): Add one minor optimization.
(pcase-split-equal): Rename from pcase-split-eq.
(pcase-split-member): Rename from pcase-split-memq.
(pcase-u1): Add strings to the member optimization.
Add `guard' variant of predicates.
(pcase-q1): Add string patterns.
Glenn Morris [Thu, 28 Oct 2010 07:21:43 +0000 (00:21 -0700)]
doc/Makefile fixes related to inclusion of emacsver.texi.
* doc/lispref/Makefile.in (elisp.dvi, elisp.pdf): Also include $emacsdir.
* doc/misc/Makefile.in (MAKEINFO, ENVADD): Add $emacsdir to include path.
(($(infodir)/calc, calc.dvi, calc.pdf): Depend on emacsver.texi.
($(infodir)/efaq): Remove -I option now in $MAKEINFO.
Katsumi Yamaoka [Thu, 28 Oct 2010 06:37:35 +0000 (06:37 +0000)]
gnus-art.el: Improve MIME part functions.
gnus-art.el (gnus-article-jump-to-part): Error on no part; fix prompt.
(gnus-mime-copy-part): Check coding system, not charset.
(gnus-mime-view-part-externally): Never remove part.
(gnus-mime-view-part-internally): Don't remove part here.
(gnus-article-part-wrapper): Make sure MIME tag is visible.
(gnus-article-goto-part): Go to displayed or preferred subpart if it is multipart/alternative.
mm-decode.el (mm-display-part): Take optional arg `force'.
Stefan Monnier [Thu, 28 Oct 2010 02:22:29 +0000 (22:22 -0400)]
* lisp/minibuffer.el (completion-cycling): New var.
(minibuffer-complete, completion--do-completion):
Use completion--flush-all-sorted-completions.
(minibuffer-complete): Only cycle if completion-cycling is set.
(completion--flush-all-sorted-completions): Unset completion-cycling.
(minibuffer-force-complete): Set completion-cycling.
(completion-all-sorted-completions): Move declaration before first use.
Stefan Monnier [Wed, 27 Oct 2010 21:47:09 +0000 (17:47 -0400)]
* lisp/vc/log-edit.el (log-edit-rewrite-fixes): New var.
(log-edit-author): New dynamic var.
(log-edit-changelog-ours-p, log-edit-insert-changelog-entries): Use it
to return the author if different from committer.
(log-edit-insert-changelog): Use them to add Author: and Fixes headers.
Stefan Monnier [Wed, 27 Oct 2010 14:31:44 +0000 (10:31 -0400)]
* lisp/play/landmark.el: Adjust commenting convention.
(lm-nil-score): Rename from nil-score.
(Xscore, XXscore, XXXscore, XXXXscore, Oscore, OOscore, OOOscore)
(OOOOscore): Move into a let in lm-score-trans-table.
(lm-winning-threshold, lm-loosing-threshold): Use lm-score-trans-table.
Stefan Monnier [Wed, 27 Oct 2010 14:26:01 +0000 (10:26 -0400)]
* lisp/electric.el (electric-indent-chars): Autoload.
* lisp/progmodes/octave-mod.el (octave-mode):
* lisp/progmodes/ruby-mode.el (ruby-mode): Take advantage of it.
(ruby-mode-abbrev-table): Merge initialization and declaration.
Glenn Morris [Wed, 27 Oct 2010 06:48:04 +0000 (23:48 -0700)]
ns-win.el trivia.
* term/ns-win.el: (ns-handle-nxopen): Optionally handle the temp-case.
(ns-handle-nxopentemp): Just call ns-handle-nxopen.
(ns-insert-file, ns-find-file): Use `pop'.
Adrian Robert [Tue, 26 Oct 2010 13:20:00 +0000 (16:20 +0300)]
* term/ns-win.el (ns-new-frame, ns-show-prefs): Don't add to global map. * term/common-win.el (x-setup-function-keys): Remove most of the keymappings. Comment on the remaining ones.
* lisp/term/ns-win.el: No need to require cl when compiling.
(x-display-name, x-setup-function-keys, x-select-text, x-colors)
(xw-defined-colors): Use the common-win definitions.
(ns-alternatives-map): Make it an obsolete alias for x-alternatives-map.
(ns-handle-iconic): Make it an alias for x-handle-iconic.
* lisp/term/common-win.el (x-select-text, x-alternatives-map)
(x-setup-function-keys, x-colors, xw-defined-colors): Handle 'ns case.
* lisp/loadup.el [ns]: Load common-win.
Gnus developers [Sun, 24 Oct 2010 22:32:38 +0000 (22:32 +0000)]
Merge changes made in Gnus trunk.
message.el (message-default-headers): Fix type.
nnimap.el (nnimap-request-head, nnimap-request-move-article): Make internal nnimap moving slightly faster.
nnimap.el (nnimap-transform-headers): Don't bug out on bodiless articles.
nnimap.el (nnimap-send-command): Have no outstanding messages if the IMAP server doesn't support streaming.
nnimap.el (nnimap-transform-headers): Fold {quoted} strings more sloppily.
Gnus developers [Sun, 24 Oct 2010 09:55:56 +0000 (09:55 +0000)]
gnus-sum.el (gnus-summary-select-article): Make sure we have the original article buffer live.
gnus-sum.el (gnus-summary-select-article-buffer): Mention gnus-widen-article-buffer.
shr.el (shr-tag-object): Added.
nnir.el, gnus-group.el: Make nnir work by default.
gnus-agent.el (gnus-agent-fetch-group): Don't download stuff if the group isn't covered by the agent.
gnus-sum.el (gnus-group-make-articles-read): Propagate marks to the backend for unknown groups.
gnus-html.el (gnus-html-prefetch-images): Decode entities before prefetching images.
Glenn Morris [Sun, 24 Oct 2010 02:22:43 +0000 (19:22 -0700)]
Sync docs of selection-coding-system between C and Lisp.
* src/w16select.c (syms_of_win16select) <selection-coding-system>:
* src/w32select.c (syms_of_w32select) <selection-coding-system>:
Sync docs with select.el.
* lisp/select.el (selection-coding-system): Sync doc with C versions.
Glenn Morris [Sun, 24 Oct 2010 01:22:37 +0000 (18:22 -0700)]
Sync X and MS-Windows docs for x-use-underline-position-properties.
* src/w32term.c (syms_of_w32term) <x-use-underline-position-properties>:
Sync doc with the xterm.c version.
Glenn Morris [Sun, 24 Oct 2010 00:58:22 +0000 (17:58 -0700)]
Avoid redefining some C defcustoms.
* lisp/frame.el (show-trailing-whitespace, auto-hscroll-mode)
(display-hourglass, hourglass-delay, cursor-in-non-selected-windows):
Don't redefine things that are defined in C.
* lisp/cus-start.el: Also handle :risky, :safe, :set, and :tag.
(show-trailing-whitespace, auto-hscroll-mode)
(display-hourglass, hourglass-delay, cursor-in-non-selected-windows):
Set up the appropriate custom properties.
Wilson Snyder [Sat, 23 Oct 2010 21:12:38 +0000 (14:12 -0700)]
verilog-mode.el updates.
This file should be copied to the trunk verbatim.
* verilog-mode.el (verilog-directive-re): Make this variable
auto-built for efficiency of execution and updating.
(verilog-extended-complete-re): Support 'pure' fucntion & task
declarations (these have no bodies).
(verilog-beg-of-statement): general cleanup to enable support of
'pure' fucntion & task declarations (these have no bodies). These
efforts together fix Verilog bug210 from veripool; which was also
noticed by Steve Pearlmutter.
(verilog-directive-re, verilog-directive-begin, verilog-indent-re)
(verilog-directive-nest-re, verilog-set-auto-endcomments): Support
`elsif. Reported by Shankar Giri.
(verilog-forward-ws&directives, verilog-in-attribute-p): Fixes for
attribute handling for lining up declarations and assignments.
(verilog-beg-of-statement-1): Fix issue where continued declaration
is indented differently if it is after a begin..end clock.
(verilog-in-attribute-p, verilog-skip-backward-comments)
(verilog-skip-forward-comment-p): Support proper treatment of
attributes by indent code. Reported by Jeff Steele.
(verilog-in-directive-p): Fix comment to correctly describe
function.
(verilog-backward-up-list, verilog-in-struct-region-p)
(verilog-backward-token, verilog-in-struct-p)
(verilog-in-coverage-p, verilog-do-indent)
(verilog-pretty-declarations): Use verilog-backward-up-list as
wrapper around backward-up-list inorder to properly skip comments.
Reported by David Rogoff.
(verilog-property-re, verilog-endcomment-reason-re)
(verilog-beg-of-statement, verilog-set-auto-endcomments)
(verilog-calc-1 ): Fix for assert a; else b; indentation (new form
of if). Reported by Max Bjurling and
(verilog-calc-1): Fix for clocking block in modport
declaration. Reported by Brian Hunter.
* verilog-mode.el (verilog-auto-inst, verilog-gate-ios)
(verilog-gate-keywords, verilog-read-sub-decls)
(verilog-read-sub-decls-gate, verilog-read-sub-decls-gate-ios)
(verilog-read-sub-decls-line, verilog-read-sub-decls-sig): Support
AUTOINST for gate primitives, bug284. Reported by Mark Johnson.
(verilog-read-decls): Fix spaces in V2K module parameters causing
mis-identification as interfaces, bug287.
(verilog-read-decls): Fix not treating "parameter string" as a
parameter in AUTOINSTPARAM.
(verilog-read-always-signals-recurse, verilog-read-decls): Fix not
treating `elsif similar to `endif inside AUTOSENSE.
(verilog-do-indent): Implement correct automatic or static task or
function end comment highlight. Reported by Steve Pearlmutter.
(verilog-font-lock-keywords-2): Fix highlighting of single
character pins, bug264. Reported by Michael Laajanen.
(verilog-auto-inst, verilog-read-decls, verilog-read-sub-decls)
(verilog-read-sub-decls-in-interfaced, verilog-read-sub-decls-sig)
(verilog-subdecls-get-interfaced, verilog-subdecls-new): Support
interfaces with AUTOINST, bug270. Reported by Luis Gutierrez.
(verilog-pretty-expr): Fix interactive arguments, bug272. Reported
by Mark Johnson.
(verilog-auto-tieoff, verilog-auto-tieoff-ignore-regexp): Add
'verilog-auto-tieoff-ignore-regexp' for AUTOTIEOFF,
bug269. Suggested by Gary Delp.
(verilog-mode-map, verilog-preprocess, verilog-preprocess-history)
(verilog-preprocessor, verilog-set-compile-command): Create
verilog-preprocess and verilog-preprocessor to show preprocessed
output.
(verilog-get-beg-of-line, verilog-get-end-of-line)
(verilog-modi-file-or-buffer, verilog-modi-name)
(verilog-modi-point, verilog-within-string): Move defmacro's
before first use to avoid warning. Reported by Steve Pearlmutter.
(verilog-colorize-buffer, verilog-colorize-include-files-buffer)
(verilog-colorize-region, verilog-highlight-buffer)
(verilog-highlight-includes, verilog-highlight-modules)
(verilog-highlight-region, verilog-mode): Rename colorize to
highlight to match other packages. Disable module highlighting,
as received speed complaints, reenable for experimentation only
using new verilog-highlight-modules.
(verilog-read-decls): Fix regexp stack overflow in very large
AUTO_TEMPLATEs, bug250.
(verilog-auto, verilog-delete-auto, verilog-save-buffer-state)
(verilog-scan): Create verilog-save-buffer-state to standardize
making insignificant changes that shouldn't call hooks.
(verilog-save-no-change-functions, verilog-save-scan-cache)
(verilog-scan, verilog-scan-cache-ok-p, verilog-scan-region):
Create verilog-save-no-change-functions to wrap verilog-scan
preservation, and fix to work with nested preserved calls.
(verilog-auto-inst, verilog-auto-inst-dot-name): Support .name
port syntax for AUTOWIRE, and with new verilog-auto-inst-dot-name
generate .name with AUTOINST, bug245. Suggested by David Rogoff.
(verilog-submit-bug-report): Update variable list to be complete.
(verilog-auto, verilog-colorize-region): Fix AUTO expansion
breaking on-the-fly font-locking.
(verilog-colorize-buffer, verilog-colorize-include-files)
(verilog-colorize-include-files-buffer, verilog-colorize-region)
(verilog-load-file-at-mouse, verilog-load-file-at-point)
(verilog-mode, verilog-read-inst-module-matcher): With point on a
AUTOINST cell instance name, middle mouse button now finds-file on
it. Suggested by Brad Dobbie.
(verilog-alw-get-temps, verilog-auto-reset)
(verilog-auto-sense-sigs, verilog-read-always-signals)
(verilog-read-always-signals-recurse): Fix loop indexes being
AUTORESET. AUTORESET now assumes any variables in the
initialization section of a for() should be ignored. Reported by
Dan Dever.
(verilog-error-font-lock-keywords)
(verilog-error-regexp-emacs-alist)
(verilog-error-regexp-xemacs-alist): Fix error detection of
Cadence HAL, reported by David Asher. Repair drift between the
three similar error variables.
(verilog-modi-lookup, verilog-modi-lookup-cache)
(verilog-modi-lookup-last-current, verilog-modi-lookup-last-mod)
(verilog-modi-lookup-last-modi, verilog-modi-lookup-last-tick):
Fix slow verilog-auto expansion on very large files.
(verilog-read-sub-decls-expr, verilog-read-sub-decls-line): Fix
AUTOOUTPUT treating "1*2" as a signal name in submodule connection
"{1*2{...". Broke in last revision.
(verilog-read-sub-decls-expr): Fix AUTOOUTPUT not detecting
submodule connections with replications "{#{a},#{b}}".
Glenn Morris [Sat, 23 Oct 2010 20:43:59 +0000 (13:43 -0700)]
Make all copies of xw-defined-colors have identical docs.
* lisp/term/ns-win.el (xw-defined-colors):
* lisp/term/x-win.el (xw-defined-colors): Make docs identical to w32-win.
Glenn Morris [Sat, 23 Oct 2010 19:56:57 +0000 (12:56 -0700)]
* lisp/comint.el (comint-password-prompt-regexp): Make it less vague.
Bump custom version.
The initial regexp-opt was bracketed by \\( \\)?, so it might as well
have not been there at all. This change makes it non-optional, and
adds back "^". Hopefully the behaviour is now closer to that of emacs-23,
before it was re-written in http://debbugs.gnu.org/2817.
Eli Zaretskii [Sat, 23 Oct 2010 15:30:45 +0000 (17:30 +0200)]
Implement mouse highlight for bidi-reordered lines.
xdisp.c (fast_find_string_pos): #ifdef away, not used anymore.
(mouse_face_from_string_pos): New function, replaces
fast_find_string_pos.
(note_mouse_highlight): Call it instead of fast_find_string_pos.
(note_mode_line_or_margin_highlight): Support bidi-reordered
strings and R2L glyph rows. Fix comments.
(note_mouse_highlight): When bidi reordering is turned on in a
buffer, call next-single-property-change and
previous-single-property-change with last argument nil. Clear
mouse highlight when mouse pointer is in a R2L row on the stretch
glyph that stands for no text beyond the line end.
(row_containing_pos): Don't return too early when CHARPOS is in a
bidi-reordered continued line. Return immediately when the first
hit is found in a line that is not continued, or when an exact
match for CHARPOS is found.
(rows_from_pos_range): New function.
(mouse_face_from_buffer_pos): Use it instead of calling
row_containing_pos for START_CHARPOS and END_CHARPOS. Rewrite the
function to support mouse highlight in bidi-reordered lines and
not to assume that START_CHARPOS is always in mouse_face_beg_row.
If necessary, swap mouse_face_beg_row and mouse_face_end_row so
that the former is always above the latter or identical to it.
(show_mouse_face): Support drawing highlighted R2L lines.
(coords_in_mouse_face_p): New function, bidi-aware.
(cursor_in_mouse_face_p, note_mouse_highlight, erase_phys_cursor):
Call it instead of comparing with mouse-face members of dpyinfo.
(note_mode_line_or_margin_highlight): Fix confusingly swapped
usage of hpos and vpos.