Stefan Monnier [Sat, 5 May 2012 02:05:49 +0000 (22:05 -0400)]
* lisp/emacs-lisp/pcase.el (pcase--let*): New function.
(pcase--expand, pcase-codegen, pcase--q1): Use it to reduce nesting
a bit more.
(pcase--split-pred): Be more clever about ruling out overlap between
a predicate and some constant pattern.
(pcase--q1): Use `null' instead of (eq foo nil).
Stefan Monnier [Sat, 5 May 2012 01:47:04 +0000 (21:47 -0400)]
New function set-temporary-overlay-map and macros (defvar|setq)-local.
* lisp/subr.el (setq-local, defvar-local): New macros.
(kbd): Redefine as an alias.
(with-selected-window): Leave unrelated frames alone.
(set-temporary-overlay-map): New function.
* configure.in (INFO_EXT, INFO_OPTS): New output variables.
* doc/emacs/Makefile.in (INFO_EXT, INFO_OPTS): New, set by configure.
(info, infoclean): Use $INFO_EXT.
($(infodir)/emacs$(INFO_EXT)): Use $INFO_EXT and $INFO_OPT.
* doc/emacs/makefile.w32-in (INFO_EXT, INFO_OPTS): New.
(INFO_TARGETS): Use $INFO_EXT.
($(infodir)/emacs$(INFO_EXT)): Use $INFO_EXT and $INFO_OPT, and -o.
* doc/lispintro/Makefile.in (INFO_EXT, INFO_OPTS): New, set by configure.
(info, infoclean): Use $INFO_EXT.
(${infodir}/eintr$(INFO_EXT)): Use $INFO_EXT and $INFO_OPT.
* doc/lispintro/makefile.w32-in (INFO_EXT, INFO_OPTS): New.
(INFO_TARGETS, clean): Use $INFO_EXT.
($(infodir)/eintr$(INFO_EXT)): Use $INFO_EXT and $INFO_OPT.
* doc/lispref/Makefile.in (INFO_EXT, INFO_OPTS): New, set by configure.
(info, infoclean): Use $INFO_EXT.
($(infodir)/elisp$(INFO_EXT)): Use $INFO_EXT and $INFO_OPT.
* doc/lispref/makefile.w32-in (INFO_EXT, INFO_OPTS): New.
(info, maintainer-clean): Use $INFO_EXT.
($(infodir)/elisp$(INFO_EXT)): Use $INFO_EXT and $INFO_OPT.
* doc/misc/Makefile.in (INFO_EXT, INFO_OPTS): New, set by configure.
(INFO_TARGETS): Use $INFO_EXT.
Make all rules generating info files use $INFO_EXT, $INFO_OPT, and -o.
* doc/misc/makefile.w32-in (INFO_EXT, INFO_OPTS): New.
(INFO_TARGETS): Use $INFO_EXT.
Make all rules generating info files use $INFO_EXT, $INFO_OPT, and -o.
Paul Eggert [Thu, 3 May 2012 20:04:29 +0000 (13:04 -0700)]
Do not limit current-time-string to years 1000..9999.
* src/editfns.c (TM_YEAR_IN_ASCTIME_RANGE): Remove.
(Fcurrent_time_string): Support any year that is supported by the
underlying localtime representation. Don't use asctime, as it
has undefined behavior for years outside the range -999..9999.
* doc/lispref/os.texi (Time of Day): Do not limit current-time-string
to years 1000..9999.
* etc/NEWS: Do not limit current-time-string to years 1000..9999.
Wilson Snyder [Thu, 3 May 2012 19:23:55 +0000 (15:23 -0400)]
Merge verilog-mode.el from upstream.
* progmodes/verilog-mode.el (font-lock-keywords):
Fix mis-highligting auto. Reported by Craig Barner.
(verilog-auto, verilog-auto-undef): Add AUTOUNDEF to remove
defines from global name space. Reported by Dan Dever.
(verilog-auto-reset, verilog-auto-reset-widths)
(verilog-auto-tieoff): Support using unbased numbers for
AUTORESET and AUTOTIEOFF.
(verilog-submit-bug-report): Update variable list.
(verilog-read-auto-params): Fix AUTOINPUT regexps containing
parenthesis from not matching. Reported by Michael Rytting.
(verilog-auto-template-lint): Fix hash error when linting modules
with no used templates.
(verilog-warn, verilog-warn-error)
(verilog-warn-fatal): When non-interactive report multiple
warnings before exiting. Suggested by Brad Dobbie.
(verilog-auto-template-lint, verilog-auto-template-warn-unused)
(verilog-read-auto-template): Add `verilog-auto-template-warn-unused'
to report unused template errors. Reported by Brad Dobbie.
(verilog-read-decls): Fix AUTOWIRE etc on supply0, supply1 type
nets, bug438. Reported by Vns Blore.
(verilog-auto-inout-module, verilog-auto-reg)
(verilog-read-decls, verilog-read-sub-decls-sig)
(verilog-signals-edit-wire-reg, verilog-signals-with):
Fix passing of Verilog data types in ANSI input/output ports
such as "output logic" into the AUTOs. Special case "wire" and
"reg" for backwards compatibility presuming Verilog 2001.
(verilog-auto-ascii-enum): Add "auto enum" as alias.
(verilog-preprocess): Fix replication of preprocess output.
Reported by Brad Dobbie.
(verilog-auto-inst-interfaced-ports):
Create verilog-auto-inst-interfaced-ports, bug429.
Reported by Julian Gorfajn.
(verilog-after-save-font-hook)
(verilog-before-save-font-hook): New variable.
(verilog-modi-cache-results, verilog-save-font-mod-hooked)
(verilog-save-font-mods): Wrap disabling fontification, reported
by David Rogoff.
(verilog-do-indent, verilog-pretty-declarations-auto)
(verilog-sk-def-reg): Fix obeying `verilog-auto-lineup', bug305.
Reported by Pierre-David Pfister.
(verilog-set-auto-endcomments): Fix endtask auto comments outside
of class declarations, bug292. Reported by Kevin Heilman.
(verilog-read-decls): Fix 'parameter type' not appearing in
AUTOINSTPARAM, bug340. Reported by Jonathan Greenlaw.
(verilog-auto-logic): Fix when AUTOLOGIC present to properly do
AUTOINPUTs, bug411. Reported by Jonathan Greenlaw.
(verilog-read-auto-lisp): Avoid syntax-ppss warning on AUTOLISP.
Reported by David Kravitz.
* progmodes/verilog-mode.el (verilog-pretty-expr): Don't line up
assignment with tests in ifs and for loops.
(verilog-extended-complete-re, verilog-complete-reg): Change so
that DPI inport functions don't look like fuction declarations.
(verilog-pretty-expr): Don't line up assignment
operations to the test and increment in if and for loops
(verilog-extended-complete-re, verilog-complete-reg): Change so
that DPI inport functions don't look like fuction declarations
Stefan Monnier [Thu, 3 May 2012 02:39:23 +0000 (22:39 -0400)]
* lisp/emacs-lisp/bytecomp.el
(byte-compile-file-form-custom-declare-variable): Compile all elements,
since cconv.el might have introduced :fun-body, internal-make-closure,
and friends for bytecomp to handle.
* lisp/custom.el (defcustom): Avoid ((λ ..) ..).
Without this fix, interrupts could mess up code that uses these
nonreentrant functions, since setting TZ invalidates existing
tm_zone or tzname values, and since most of these functions return
pointers to static storage.
* editfns.c (format_time_string, Fdecode_time, Fencode_time)
(Fcurrent_time_string, Fcurrent_time_zone, Fset_time_zone_rule):
Grow the critical sections to include not just invoking
localtime/gmtime, but also accessing these functions' results
including their tm_zone values if any, and any related TZ setting.
(format_time_string): Last arg is now struct tm *, not struct tm **,
so that the struct tm is saved in the critical section. All
callers changed. Simplify allocation of initial buffer, partly
motivated by the fact that memory allocation needs to be outside
the critical section.
Glenn Morris [Wed, 2 May 2012 07:45:16 +0000 (00:45 -0700)]
Don't hard-code the list of info files in the top-level Makefile
The sed '/ing directory/d' piece is to remove the annoying
"entering/leaving directory" messages that GNU make insists on
printing when called recursively. --no-print-directory isn't portable.
* Makefile.in (INFO_FILES): Remove variable.
(INFO_NONMISC): New variable.
(install-arch-indep, uninstall): Don't use $INFO_FILES.
* doc/misc/Makefile.in (echo-info): New phony target, used by top-level.
Chong Yidong [Tue, 1 May 2012 13:37:56 +0000 (21:37 +0800)]
* lisp/follow.el: Rework, eliminating reliance on advice.
(set-process-filter, process-filter, sit-for): Advice deleted.
(follow-mode-off-hook): Obsolete hook removed.
(follow-avoid-tail-recenter-p, follow-process-filter-alist): Vars
deleted.
(follow-auto): Use a :set function.
(follow-mode): Rewritten. Don't advise process filters.
(follow-switch-to-current-buffer-all, follow-scroll-up)
(follow-scroll-down): Assume follow-mode is bound.
(follow-comint-scroll-to-bottom)
(follow-align-compilation-windows): New functions.
(follow--window-sorter): New function.
(follow-all-followers): Use it to explicitly sort windows by their
positions; don't make assumptions about next-window order.
(follow-windows-start-end, follow-delete-other-windows-and-split)
(follow-calc-win-start): Doc fix.
(follow-windows-aligned-p, follow-select-if-visible): Don't call
vertical-motion unnecessarily.
(follow-adjust-window): New function.
(follow-post-command-hook): Use it.
(follow-call-set-process-filter, follow-call-process-filter)
(follow-intercept-process-output, follow-tidy-process-filter-alist)
(follow-stop-intercept-process-output, follow-generic-filter):
Functions deleted.
(follow-scroll-bar-toolkit-scroll, follow-scroll-bar-drag)
(follow-scroll-bar-scroll-up, follow-scroll-bar-scroll-down): New
functions, replacing advice on scroll-bar-* commands.
* lisp/comint.el (comint-adjust-point): New function.
(comint-postoutput-scroll-to-bottom): Use it. Call
follow-comint-scroll-to-bottom for Follow mode buffers.
Glenn Morris [Tue, 1 May 2012 07:38:15 +0000 (00:38 -0700)]
Only print the edition number of the manuals in the TeX version
Frankly, I think the edition conveys little to no information.
The version number of Emacs is much more relevant.
No-one seems to know what the rules are for updating the edition anyway...
* doc/emacs/emacs.texi (@copying): Only print EDITION in the TeX version.
* doc/lispref/elisp.texi (@copying):
* doc/lispref/intro.texi (Introduction): Only print VERSION in the TeX version.
Glenn Morris [Tue, 1 May 2012 06:59:34 +0000 (23:59 -0700)]
Remove no-byte-compile setting from some lisp/term files.
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.
Glenn Morris [Tue, 1 May 2012 03:45:39 +0000 (20:45 -0700)]
Remove references to macros that are not defined anywhere
* src/syssignal.h: Remove reference to BROKEN_SIGINFO (last used in
s/ptx4.h), BROKEN_SIGTSTP (last used in m/ustation.h, m/dpx2.h),
and BROKEN_SIGURG (was in s/gnu-linux.h prior to 2008-02-10).
All were removed before 23.1.
Eli Zaretskii [Mon, 30 Apr 2012 12:50:12 +0000 (15:50 +0300)]
Resurrect encoding of replies by Rmail which was lost in 2012-04-11T21:37:13Z!monnier@iro.umontreal.ca.
lisp/mail/rmail.el (rmail-yank-current-message): Use the encoding of
the yanked message in preference to the default value of
buffer-file-coding-system.
Eli Zaretskii [Sun, 29 Apr 2012 17:19:08 +0000 (20:19 +0300)]
Fix bug #11367 with assertion violation during vertical motion in egg.el.
src/xdisp.c (pos_visible_p): If already at a newline from the
display string before the 'while' loop, don't walk back the glyphs
from it3.glyph_row. Solves assertion violation when the display
string begins with a newline (egg.el).
Paul Eggert [Sat, 28 Apr 2012 22:17:27 +0000 (15:17 -0700)]
Do not avoid creating empty evaporating overlays (Bug#9642).
* buffer.c (Fmove_overlay): Revert the change of 2012-04-23.
That is, do not delete an evaporating overlay if it becomes
empty after its bounds are adjusted to fit within its buffer.
This fix caused other problems, and I'm reverting it until we get
to the bottom of them.
Stefan Monnier [Sat, 28 Apr 2012 21:59:08 +0000 (17:59 -0400)]
Avoid the obsolete `assoc' package.
* lisp/speedbar.el (speedbar-refresh): Avoid adelete.
(speedbar-file-lists): Simplify and avoid aput.
* lisp/man.el (Man--sections, Man--refpages): New vars, replacing
Man-sections-alist and Man-refpages-alist.
(Man-build-section-alist, Man-build-references-alist):
Use them; avoid aput.
(Man--last-section, Man--last-refpage): New vars.
(Man-follow-manual-reference): Use them.
Use the `default' arg of completing-read.
(Man-goto-section): Idem. Move prompt to the `interactive' spec.
* lisp/gnus/auth-source.el (auth-source--aput-1, auth-source--aput)
(auth-source--aget): New functions and macros.
Use them instead of aput/aget.
* doc/misc/faq.texi: (File-name conventions):
Shorten section name to avoid overfull line.
(How to add fonts): Use smallexample to avoid overfull lines.
Fix application of menu-bar-mode etc. by X resources.
* lisp/startup.el (x-apply-session-resources): New function.
* lisp/term/ns-win.el (ns-initialize-window-system):
* lisp/term/w32-win.el (w32-initialize-window-system):
* lisp/term/x-win.el (x-initialize-window-system): Use it to properly
set menu-bar-mode and other vars from X resources, even if the initial
frame is not a window-system frame (Bug#2299).