bpt/emacs.git
11 years agoSwitch from NO_RETURN to C11's _Noreturn.
Paul Eggert [Sun, 24 Jun 2012 17:39:14 +0000 (10:39 -0700)]
Switch from NO_RETURN to C11's _Noreturn.

Fixes: debbugs:11750

11 years agoImprove port of struct timespec to MS-Windows.
Eli Zaretskii [Sun, 24 Jun 2012 17:21:20 +0000 (20:21 +0300)]
Improve port of struct timespec to MS-Windows.

 lib/makefile.w32-in ($(BLD)/dtotimespec.$(O)):
 ($(BLD)/timespec-add.$(O)):
 ($(BLD)/timespec-sub.$(O)): Don't depend on
 $(EMACS_ROOT)/nt/inc/sys/time.h.
 lib/stat-time.h:
 lib/timespec.h:
 lib/utimens.h: Revert last change.
 src/makefile.w32-in (TIMESPEC_H): Remove nt/inc/sys/time.h.
 (SYSTIME_H): Add nt/inc/sys/time.h.
 src/systime.h [WINDOWSNT]: Include sys/time.h.
 src/s/ms-w32.h (struct timespec): Definition moved from
 nt/inc/sys/time.h.  Suggested by Paul Eggert <eggert@cs.ucla.edu>.
 nt/inc/sys/time.h (struct timespec): Don't define it here, it is
 now defined in src/s/ms-w32.h.

Fixes: debbugs:9000

11 years ago* etc/NEWS: Move and improve the defun/defalias changes.
Lawrence Mitchell [Sun, 24 Jun 2012 17:07:26 +0000 (13:07 -0400)]
* etc/NEWS: Move and improve the defun/defalias changes.

Fixes: debbugs:11686

11 years agoFirst Coccinelle semantic patch.
Dmitry Antipov [Sun, 24 Jun 2012 16:18:41 +0000 (20:18 +0400)]
First Coccinelle semantic patch.
* coccinelle: New subdirectory
* coccinelle/README: Documentation stub.
* coccinelle/vector_contents.cocci: Semantic patch to replace direct
access to `contents' member of Lisp_Vector objects with AREF and ASET
where appropriate.

11 years ago* xml.el (xml-parse-tag): Corrrectly handle comment embedded in non-tag text.
Chong Yidong [Sun, 24 Jun 2012 15:06:24 +0000 (23:06 +0800)]
* xml.el (xml-parse-tag): Corrrectly handle comment embedded in non-tag text.

11 years agoAuto-commit of generated files.
Glenn Morris [Sun, 24 Jun 2012 10:17:34 +0000 (06:17 -0400)]
Auto-commit of generated files.

11 years ago* emacsclient.c (set_local_socket): Fix a compiler warning.
Samuel Bronson [Sun, 24 Jun 2012 09:43:09 +0000 (17:43 +0800)]
* emacsclient.c (set_local_socket): Fix a compiler warning.

Fixes: debbugs:7838

11 years agoLisp manual -- improve discussion of ptys vs pipes.
Thien-Thi Nguyen [Sun, 24 Jun 2012 09:30:35 +0000 (17:30 +0800)]
Lisp manual -- improve discussion of ptys vs pipes.

* processes.texi (Asynchronous Processes): Make the pty vs pipe
discussion more prominent.

11 years agoFix bug when time_t is unsigned and as wide as intmax_t.
Paul Eggert [Sun, 24 Jun 2012 04:11:19 +0000 (21:11 -0700)]
Fix bug when time_t is unsigned and as wide as intmax_t.

* lisp.h (WAIT_READING_MAX): New macro.
* dispnew.c (Fsleep_for, sit_for):
* keyboard.c (kbd_buffer_get_event):
* process.c (Faccept_process_output):
Use it to avoid bogus compiler warnings with obsolescent GCC versions.
This improves on the previous patch, which introduced a bug
when time_t is unsigned and as wide as intmax_t.
See <http://bugs.gnu.org/9000#51>.

11 years agoAvoid compiler warnings in comparing time_t.
Eli Zaretskii [Sat, 23 Jun 2012 19:40:50 +0000 (22:40 +0300)]
Avoid compiler warnings in comparing time_t.

 src/dispnew.c (sit_for, Fsleep_for):
 src/keyboard.c (kbd_buffer_get_event):
 src/process.c (Faccept_process_output): Avoid compiler warnings when
 comparing a 32-bit time_t with a 64-bit INTMAX_MAX.

11 years agosrc/makefile.w32-in: Update dependencies.
Juanma Barranquero [Sat, 23 Jun 2012 19:28:01 +0000 (21:28 +0200)]
src/makefile.w32-in: Update dependencies.

11 years agoFix misspelling in latest ChangeLog entry.
Paul Eggert [Sat, 23 Jun 2012 17:32:27 +0000 (10:32 -0700)]
Fix misspelling in latest ChangeLog entry.

11 years agoMerge from gnulib.
Paul Eggert [Sat, 23 Jun 2012 17:25:56 +0000 (10:25 -0700)]
Merge from gnulib.

* m4/getopt.m4: Copy new version from gnulib, incorporating:
getopt-gnu: Handle suboptimal getopt_long's abbreviation handling.

11 years agolisp/makefile.w32-in (COMPILE_FIRST): Synch with changes in 2012-06-22T21:24:54Z...
Juanma Barranquero [Sat, 23 Jun 2012 16:58:13 +0000 (18:58 +0200)]
lisp/makefile.w32-in (COMPILE_FIRST): Synch with changes in 2012-06-22T21:24:54Z!monnier@iro.umontreal.ca.

11 years agosrc/w32.c (ltime): Add return type and declare static.
Juanma Barranquero [Sat, 23 Jun 2012 16:56:47 +0000 (18:56 +0200)]
src/w32.c (ltime): Add return type and declare static.
(w32_get_internal_run_time): Remove usused variable `time_100ns'.

11 years ago* sysdep.c [__FreeBSD__]: Fix more recently-introduced typos.
Paul Eggert [Sat, 23 Jun 2012 16:44:45 +0000 (09:44 -0700)]
* sysdep.c [__FreeBSD__]: Fix more recently-introduced typos.

Privately reported by Herbert J. Skuhra.
(make_lisp_timeval) [__FreeBSD__]: Rename from TIMELIST.
All uses changed.
(system_process_attributes) [__FreeBSD__]: Invoke make_lisp_time,
not make_lisp_timeval, when the argument is of type EMACS_TIME.

11 years agoMiscellaneous minor cleanups and simplifications.
Stefan Monnier [Sat, 23 Jun 2012 15:38:23 +0000 (11:38 -0400)]
Miscellaneous minor cleanups and simplifications.
* lisp/help-fns.el (describe-variable): Don't croak when doc is not found.
* lisp/vc/pcvs.el (cvs-retrieve-revision): Avoid toggle-read-only.
* lisp/menu-bar.el (menu-bar-line-wrapping-menu): Purecopy a tiny bit more.
* lisp/emacs-lisp/syntax.el (syntax-ppss): Simplify with new `if' place.
* lisp/emacs-lisp/smie.el (smie-next-sexp): CSE.
* lisp/emacs-lisp/macroexp.el (macroexp-let2): Fix edebug spec and avoid
((lambda ..) ..).
* lisp/emacs-lisp/eieio.el (eieio-oref, slot-value): Use simpler defsetf.

11 years agoUse @ interactive spec for Info-mouse-follow-link.
Chong Yidong [Sat, 23 Jun 2012 13:32:29 +0000 (21:32 +0800)]
Use @ interactive spec for Info-mouse-follow-link.

Fixes: debbugs:11672

11 years agoFixes for Info link-following mouse commands.
Chong Yidong [Sat, 23 Jun 2012 13:27:40 +0000 (21:27 +0800)]
Fixes for Info link-following mouse commands.

* lisp/info.el (Info-mouse-follow-link): Accept symbol values of the
link-args property.  Select the window.
(Info-fontify-node): Use Info-link-keymap for all navigation
buttons, with link-args property to perform the desired action.
(Info-link-keymap): Doc fix.
(Info-next-link-keymap, Info-prev-link-keymap)
(Info-up-link-keymap): Delete now-unused keymaps.

Fixes: debbugs:11672

11 years agoFix last commit.
Chong Yidong [Sat, 23 Jun 2012 12:54:59 +0000 (20:54 +0800)]
Fix last commit.

11 years ago* mouse.el (mouse-drag-track): Deactivate the mark before popping.
Chong Yidong [Sat, 23 Jun 2012 12:48:24 +0000 (20:48 +0800)]
* mouse.el (mouse-drag-track): Deactivate the mark before popping.

11 years agoFix a bug in w32-get-locale-info.
Eli Zaretskii [Sat, 23 Jun 2012 12:44:42 +0000 (15:44 +0300)]
Fix a bug in w32-get-locale-info.

 src/w32proc.c (Fw32_get_locale_info): Fix an off-by-one error in
 last argument of make_unibyte_string.

11 years agoImprove and document the language-change event on MS-Windows.
Eli Zaretskii [Sat, 23 Jun 2012 12:39:23 +0000 (15:39 +0300)]
Improve and document the language-change event on MS-Windows.

 src/keyboard.c (kbd_buffer_get_event): Include the codepage and the
 language ID in the event parameters.
 src/w32term.c (w32_read_socket): Put the new keyboard codepage into
 event.code, not the obscure "character set ID".
 doc/lispref/commands.texi (Misc Events): Document the language-change event.

11 years ago* xmenu.c (x_menu_wait_for_event): Adapt GTK3 to new xg_select.
Chong Yidong [Sat, 23 Jun 2012 10:47:00 +0000 (18:47 +0800)]
* xmenu.c (x_menu_wait_for_event): Adapt GTK3 to new xg_select.

11 years agoFix the MS-Windows build broken by 2012-06-22T21:17:42Z!eggert@cs.ucla.edu.
Eli Zaretskii [Sat, 23 Jun 2012 10:22:59 +0000 (13:22 +0300)]
Fix the MS-Windows build broken by 2012-06-22T21:17:42Z!eggert@cs.ucla.edu.

 nt/inc/sys/time.h (struct timespec): Define.
 lib/makefile.w32-in (GNULIBOBJS): Add $(BLD)/dtotimespec.$(O),
 $(BLD)/gettime.$(O), $(BLD)/timespec-add.$(O), and
 $(BLD)/timespec-sub.$(O).
 ($(BLD)/dtotimespec.$(O)):
 ($(BLD)/gettime.$(O)):
 ($(BLD)/timespec-add.$(O)):
 ($(BLD)/timespec-sub.$(O)): New dependencies.
 lib/stat-time.h:
 lib/timespec.h:
 lib/utimens.h: Include sys/time.h
 src/w32.c (fdutimens): New function.
 src/w32proc.c (sys_select): Adapt to change in the EMACS_TIME type.
 src/s/ms-w32.h (pselect): Redirect to sys_select.
 src/sysselect.h [WINDOWSNT]: Don't include sys/select.h.

Fixes: debbugs:9000

11 years agoAuto-commit of generated files.
Glenn Morris [Sat, 23 Jun 2012 10:17:30 +0000 (06:17 -0400)]
Auto-commit of generated files.

11 years ago* configure.in: Don't use AC_CHECK_FUNCS_ONCE, which doesn't use
Andreas Schwab [Sat, 23 Jun 2012 09:55:13 +0000 (11:55 +0200)]
* configure.in: Don't use AC_CHECK_FUNCS_ONCE, which doesn't use
the correct CFLAGS and LIBS.

11 years agoReally fix bug #11519, by fixing the last change in ralloc.c.
Eli Zaretskii [Sat, 23 Jun 2012 09:46:33 +0000 (12:46 +0300)]
Really fix bug #11519, by fixing the last change in ralloc.c.

 src/ralloc.c (r_alloc_inhibit_buffer_relocation): Fix stupid thinko
 in the logic of incrementing and decrementing the value of
 use_relocatable_buffers.

11 years agoMark python-mode abbrevs as system abbrevs.
Chong Yidong [Sat, 23 Jun 2012 09:28:10 +0000 (17:28 +0800)]
Mark python-mode abbrevs as system abbrevs.

* progmodes/python.el (python-skeleton-define): Mark abbrevs as
system abbrevs.

* ansi-color.el (ansi-color-apply-on-region): Doc fix.

11 years ago* sysdep.c [__FreeBSD__]: Fix recently-introduced typos.
Paul Eggert [Sat, 23 Jun 2012 08:21:48 +0000 (01:21 -0700)]
* sysdep.c [__FreeBSD__]: Fix recently-introduced typos.

Privately reported by Herbert J. Skuhra.
[__FreeBSD__]: Remove "*/" typo after "#include".
(timeval_to_EMACS_TIME) [__FreeBSD__]: New static function.
(TIMEVAL) [__FreeBSD__]: Now a static function rather than a macro.
(TIMEVAL, system_process_attributes) [__FreeBSD__]:
Don't assume EMACS_TIME and struct timeval are the same type.

11 years ago* lisp/emacs-lisp/cl-macs.el (cl--make-usage-args): Handle improper lists.
Stefan Monnier [Sat, 23 Jun 2012 04:24:06 +0000 (00:24 -0400)]
* lisp/emacs-lisp/cl-macs.el (cl--make-usage-args): Handle improper lists.

Fixes: debbugs:11719

11 years ago* lisp/minibuffer.el (completion--twq-try): Try to fail more gracefully when
Stefan Monnier [Sat, 23 Jun 2012 03:48:18 +0000 (23:48 -0400)]
* lisp/minibuffer.el (completion--twq-try): Try to fail more gracefully when
the requote function doesn't work properly.

Fixes: debbugs:11714

11 years ago* lisp/pcmpl-rpm.el (pcmpl-rpm-packages): Give status messages.
Glenn Morris [Sat, 23 Jun 2012 01:02:17 +0000 (21:02 -0400)]
* lisp/pcmpl-rpm.el (pcmpl-rpm-packages): Give status messages.

11 years agoAdd gnulib files to support higher-resolution time stamps.
Paul Eggert [Fri, 22 Jun 2012 21:26:37 +0000 (14:26 -0700)]
Add gnulib files to support higher-resolution time stamps.

Fixes: debbugs:9000

11 years agoFurther GV/CL cleanups.
Stefan Monnier [Fri, 22 Jun 2012 21:24:54 +0000 (17:24 -0400)]
Further GV/CL cleanups.
* lisp/emacs-lisp/gv.el (gv-get): Autoload functions to find their
gv-expander.
(gv--defun-declaration): New function.
(defun-declarations-alist): Use it.
(gv-define-modify-macro, gv-pushnew!, gv-inc!, gv-dec!): Remove.
(gv-place): Autoload.
* lisp/emacs-lisp/cl.el (cl--dotimes, cl--dolist): Remember subr.el's
original definition of dotimes and dolist.
* lisp/emacs-lisp/cl-macs.el (cl-expr-access-order): Remove unused.
(cl-dolist, cl-dotimes): Use `dolist' and `dotimes'.
* lisp/emacs-lisp/cl-lib.el: Move gv handlers from cl-macs to here.
(cl-fifth, cl-sixth, cl-seventh, cl-eighth)
(cl-ninth, cl-tenth): Move gv handler to the function's definition.
* lisp/emacs-lisp/cl-extra.el (cl-subseq, cl-get, cl-getf): Move gv handler
to the function's definition.
* lisp/Makefile.in (COMPILE_FIRST): Re-order to speed it up by about 50%.
* lisp/window.el:
* lisp/files.el:
* lisp/faces.el:
* lisp/env.el: Don't use CL.

11 years agoSupport higher-resolution time stamps.
Paul Eggert [Fri, 22 Jun 2012 21:17:42 +0000 (14:17 -0700)]
Support higher-resolution time stamps.

Fixes: debbugs:9000

11 years ago* lisp/icomplete.el (icomplete-minibuffer-setup, icomplete-completions):
Stefan Monnier [Fri, 22 Jun 2012 17:37:28 +0000 (13:37 -0400)]
* lisp/icomplete.el (icomplete-minibuffer-setup, icomplete-completions):
Move the non-essential binding to the post/pre-command-hook where it is
more obviously correct.

11 years ago* lisp/subr.el (read-passwd): Don't use a history at all.
Stefan Monnier [Fri, 22 Jun 2012 17:30:25 +0000 (13:30 -0400)]
* lisp/subr.el (read-passwd): Don't use a history at all.
* lisp/savehist.el (savehist-save): Remove password saved accidentally
because of the above bug.

11 years agoMerge from gnulib.
Paul Eggert [Fri, 22 Jun 2012 17:20:00 +0000 (10:20 -0700)]
Merge from gnulib.

* lib/filemode.h, lib/signal.in.h, lib/stat.c, lib/stdint.in.h:
* lib/stdlib.in.h, lib/unistd.in.h, m4/extensions.m4, m4/getloadavg.m4:
* m4/getopt.m4, m4/gnulib-common.m4, m4/largefile.m4, m4/mktime.m4:
* m4/multiarch.m4, m4/nocrash.m4, m4/stdio_h.m4, m4/time_r.m4:
Copy new versions from gnulib, incorporating the following changes:
2012-06-22 time_r: fix typo that always overrode localtime_r decl
2012-06-22 Write "Mac OS X" instead of "MacOS X".
2012-06-21 mktime: fix integer overflow in 'configure'-time test
2012-06-21 nonblocking: Avoid compilation error on mingw64.
2012-06-19 stat, fstat: Avoid warnings on mingw64.
2012-06-19 getopt-gnu: Fix exit code overflow in autoconf test.

11 years agoImprove pcmpl-rpm-query-options custom type
Glenn Morris [Fri, 22 Jun 2012 16:00:34 +0000 (09:00 -0700)]
Improve pcmpl-rpm-query-options custom type

11 years agoFix bug #11726 -- send a message after `toggle-read-only'.
Bastien Guerry [Fri, 22 Jun 2012 14:12:42 +0000 (16:12 +0200)]
Fix bug #11726 -- send a message after `toggle-read-only'.

Thanks to Drew Adam for reporting this.

11 years agoProvide generalized variables in core Elisp.
Stefan Monnier [Fri, 22 Jun 2012 13:42:38 +0000 (09:42 -0400)]
Provide generalized variables in core Elisp.
* lisp/emacs-lisp/gv.el: New file.
* lisp/subr.el (push, pop): Extend to generalized variables.
* lisp/loadup.el (macroexp): Unload if preloaded and uncompiled.
* lisp/emacs-lisp/cl-lib.el (cl-pop, cl-push, cl--set-nthcdr): Remove.
* lisp/emacs-lisp/cl-macs.el: Require gv.  Use gv-define-setter,
gv-define-simple-setter, and gv-define-expander.
Remove setf-methods defined in gv.  Rename cl-setf -> setf.
(cl-setf, cl-do-pop, cl-get-setf-method): Remove.
(cl-letf, cl-letf*, cl-define-modify-macro, cl-defsetf)
(cl-define-setf-expander, cl-struct-setf-expander): Move to cl.el.
(cl-remf, cl-shiftf, cl-rotatef, cl-callf, cl-callf2): Rewrite with
gv-letplace.
(cl-defstruct): Don't define setf-method any more.
* lisp/emacs-lisp/cl.el (flet): Don't autoload.
(cl--letf, letf, cl--letf*, letf*, cl--gv-adapt)
(define-setf-expander, defsetf, define-modify-macro)
(cl-struct-setf-expander): Move from cl-lib.el.
* lisp/emacs-lisp/syntax.el:
* lisp/emacs-lisp/ewoc.el:
* lisp/emacs-lisp/smie.el:
* lisp/emacs-lisp/cconv.el:
* lisp/emacs-lisp/timer.el: Rename cl-setf -> setf, cl-push -> push.
(timer--time): Use gv-define-simple-setter.
* lisp/emacs-lisp/macroexp.el (macroexp-let2): Rename from macroexp-let²
to avoid coding-system problems in subr.el.  Adjust all users.
(macroexp--maxsize, macroexp-small-p): New functions.
* lisp/emacs-lisp/bytecomp.el (byte-compile-file): Don't use cl-letf.
* lisp/scroll-bar.el (scroll-bar-mode):
* lisp/simple.el (auto-fill-mode, overwrite-mode, binary-overwrite-mode)
(normal-erase-is-backspace-mode): Don't use the `eq' place.
* lisp/winner.el (winner-configuration, winner-make-point-alist)
(winner-set-conf, winner-get-point, winner-set): Don't abuse letf.
* lisp/files.el (locate-file-completion-table): Avoid list*.

Fixes: debbugs:11657

11 years agoFurther speed up rpm completion, by caching the installed packages
Glenn Morris [Fri, 22 Jun 2012 07:38:26 +0000 (00:38 -0700)]
Further speed up rpm completion, by caching the installed packages

* lisp/pcmpl-rpm.el (pcmpl-rpm-cache): New option.
(pcmpl-rpm-cache-stamp-file): New constant.
(pcmpl-rpm-cache-time, pcmpl-rpm-packages): New variables.
(pcmpl-rpm-packages): Optionally cache list of packages.

11 years agoMisc doc fixes for Dired.
Chong Yidong [Fri, 22 Jun 2012 07:30:33 +0000 (15:30 +0800)]
Misc doc fixes for Dired.

* dired-aux.el (dired-do-create-files): Doc fix (Bug#11327).
(dired-create-files): Doc fix (Bug#11329).
(dired-do-copy): Doc fix (Bug#11334).
(dired-mark-read-string): Doc fix (Bug#11553).

* dired.el (dired-recursive-copies, dired-recursive-deletes): Doc
fix (Bug#11326).
(dired-make-relative): Doc fix (Bug#11332).  Remove unused arg.
(dired-dwim-target): Doc fix.

* wdired.el (wdired-mode): Doc fix.

11 years ago* xdisp.c (x_consider_frame_title): Revert last change.
Chong Yidong [Fri, 22 Jun 2012 07:28:28 +0000 (15:28 +0800)]
* xdisp.c (x_consider_frame_title): Revert last change.

11 years agoTry to speed up pcomplete's calling of rpm -qa
Glenn Morris [Fri, 22 Jun 2012 07:01:32 +0000 (00:01 -0700)]
Try to speed up pcomplete's calling of rpm -qa
Ref: http://lists.gnu.org/archive/html/emacs-devel/2012-04/msg00174.html

* lisp/pcmpl-rpm.el (pcmpl-rpm): New group.
(pcmpl-rpm-query-options): New option.
(pcmpl-rpm-packages): No need to inline it.  Use pcmpl-rpm-query-options.

11 years agoEnlarge NSTATICS to 0x650.
Eli Zaretskii [Fri, 22 Jun 2012 06:51:06 +0000 (09:51 +0300)]
Enlarge NSTATICS to 0x650.

 src/alloc.c (NSTATICS): Enlarge to 0x650.  Otherwise, Emacs compiled
 with -DENABLE_CHECKING -DXASSERTS -DGLYPH_DEBUG=1 -DBYTE_CODE_METER
 aborts in staticpro during startup.  (Without -DBYTE_CODE_METER,
 staticidx goes up to 1597 out of 1600 = 0x640.)

11 years ago* calendar.el (calendar-in-read-only-buffer): Avoid some needless mode changes.
Glenn Morris [Fri, 22 Jun 2012 01:50:35 +0000 (21:50 -0400)]
* calendar.el (calendar-in-read-only-buffer): Avoid some needless mode changes.

11 years ago* url.el (url-retrieve-internal): Fix last change.
Chong Yidong [Thu, 21 Jun 2012 09:21:28 +0000 (17:21 +0800)]
* url.el (url-retrieve-internal): Fix last change.

Fixes: debbugs:11627

11 years agoMerge from emacs-24; up to 2012-04-26T03:04:36Z!cyd@gnu.org
Glenn Morris [Thu, 21 Jun 2012 07:34:27 +0000 (00:34 -0700)]
Merge from emacs-24; up to 2012-04-26T03:04:36Z!cyd@gnu.org

11 years ago* desktop.el (desktop-read): Use user-emacs-directory if desktop-path is nil.
Chong Yidong [Thu, 21 Jun 2012 07:25:56 +0000 (15:25 +0800)]
* desktop.el (desktop-read): Use user-emacs-directory if desktop-path is nil.

11 years agoFixes to desktop reading logic.
Chong Yidong [Thu, 21 Jun 2012 07:15:42 +0000 (15:15 +0800)]
Fixes to desktop reading logic.

* desktop.el (desktop-read): Don't prompt if daemon.
(desktop-path): Remove . from the default value.

11 years ago* fileio.c (Fdefault_file_modes): Block input while fiddling with umask.
Paul Eggert [Wed, 20 Jun 2012 21:20:06 +0000 (14:20 -0700)]
* fileio.c (Fdefault_file_modes): Block input while fiddling with umask.

Otherwise, the umask might be mistakenly 0 while handling input signals.

11 years agoterm.el (term-send-raw-meta): Make C-M-<char> keys work (Bug#8172).
Chong Yidong [Wed, 20 Jun 2012 16:21:57 +0000 (12:21 -0400)]
term.el (term-send-raw-meta): Make C-M-<char> keys work (Bug#8172).
-------------- This lime and the following will be ignored --------------

modified:
  lisp/ChangeLog
  lisp/term.el

11 years ago* lisp/ido.el (ido-switch-buffer, ido-find-file): Fix up doc of C-j.
David Röthlisberger [Wed, 20 Jun 2012 15:51:34 +0000 (11:51 -0400)]
* lisp/ido.el (ido-switch-buffer, ido-find-file): Fix up doc of C-j.

Fixes: debbugs:11201

11 years agoChange term.el to use font-lock.
Chong Yidong [Wed, 20 Jun 2012 09:21:06 +0000 (17:21 +0800)]
Change term.el to use font-lock.

* term.el (term-mode): Set font-lock-defaults.
(term-move-columns, term-insert-char, term-emulate-terminal)
(term-erase-in-line, term-insert-spaces): Use font-lock-face.

Fixes: debbugs:7692

11 years agoFixes to window size calculations in term.el.
Chong Yidong [Wed, 20 Jun 2012 08:34:21 +0000 (16:34 +0800)]
Fixes to window size calculations in term.el.

* term.el (term-window-width): Handle the case of a missing right
fringe.
(term-check-size): Use window-text-height.
(term-mode): Use define-derived-mode.  Minor cleanups.

Fixes: debbugs:8837

11 years ago* net/ange-ftp.el (ange-ftp-get-passwd): Bind
Michael Albinus [Wed, 20 Jun 2012 06:51:53 +0000 (08:51 +0200)]
* net/ange-ftp.el (ange-ftp-get-passwd): Bind
`enable-recursive-minibuffers'.
(ange-ftp-get-process): Throw if `non-essential' is non-nil.

11 years agoFix misspelling of Dmitry's last name in ChangeLog.
Paul Eggert [Tue, 19 Jun 2012 18:57:39 +0000 (11:57 -0700)]
Fix misspelling of Dmitry's last name in ChangeLog.

11 years ago* lisp/ido.el (ido-find-file): Mention C-d binding in docstring.
David Röthlisberger [Tue, 19 Jun 2012 18:17:14 +0000 (14:17 -0400)]
* lisp/ido.el (ido-find-file): Mention C-d binding in docstring.

Fixes: debbugs:11244

11 years ago* src/minibuf.c (Fread_string): Bind minibuffer-completion-table.
Stefan Monnier [Tue, 19 Jun 2012 17:05:41 +0000 (13:05 -0400)]
* src/minibuf.c (Fread_string): Bind minibuffer-completion-table.

11 years ago* alloc.c, bytecode.c, ccl.c, coding.c, composite.c, data.c, dosfns.c:
Dmitry Antipov [Tue, 19 Jun 2012 16:56:28 +0000 (20:56 +0400)]
* alloc.c, bytecode.c, ccl.c, coding.c, composite.c, data.c, dosfns.c:
* font.c, image.c, keyboard.c, lread.c, menu.c, minibuf.c, msdos.c:
* print.c, syntax.c, window.c, xmenu.c, xselect.c: Replace direct
access to `contents' member of Lisp_Vector objects with AREF and ASET
where appropriate.

11 years ago* lisp/progmodes/python.el (python-mode): Derive from prog-mode.
Glenn Morris [Tue, 19 Jun 2012 16:04:47 +0000 (09:04 -0700)]
* lisp/progmodes/python.el (python-mode): Derive from prog-mode.

11 years agoIn EDT emulator, allow updating of menu-bar Buffers menu.
Kevin Gallagher [Tue, 19 Jun 2012 07:05:44 +0000 (15:05 +0800)]
In EDT emulator, allow updating of menu-bar Buffers menu.

* lisp/emulation/edt.el (edt-default-menu-bar-update-buffers)
(edt-user-menu-bar-update-buffers): New functions.
(edt-default-emulation-setup, edt-user-emulation-setup): Use them.

11 years agoPreserve tty top-frames under various window-changing operations.
Chong Yidong [Tue, 19 Jun 2012 06:49:50 +0000 (14:49 +0800)]
Preserve tty top-frames under various window-changing operations.

* subr.el (with-selected-window): Preserve the selected window's
terminal's top-frame.

* window.el (save-selected-window): Likewise.

* frame.c (delete_frame): When selecting a frame on a different
text terminal, do not alter the terminal's top-frame.

* term.c (Ftty_top_frame): New function.

* xdisp.c (format_mode_line_unwind_data): Record the target
frame's selected window and its terminal's top-frame.
(unwind_format_mode_line): Restore them.
(x_consider_frame_title, display_mode_line, Fformat_mode_line):
Callers changed.
(x_consider_frame_title): Do not condition on HAVE_WINDOW_SYSTEM,
since tty frames can be explicitly named.
(prepare_menu_bars): Likewise.

Fixes: debbugs:4702

11 years agoRename infodir to buildinfodir in doc/*/Makefile.in (bug#11737)
Glenn Morris [Tue, 19 Jun 2012 01:59:38 +0000 (21:59 -0400)]
Rename infodir to buildinfodir in doc/*/Makefile.in (bug#11737)

This also makes it clearer that it has no relation to the "infodir"
used by install.

11 years agognus-win.el (gnus-configure-frame): Pass an arg to window-dedicated-p
Nelson Ferreira [Mon, 18 Jun 2012 23:12:10 +0000 (23:12 +0000)]
gnus-win.el (gnus-configure-frame): Pass an arg to window-dedicated-p

11 years agoPort byte-code-meter to modern targets.
Paul Eggert [Mon, 18 Jun 2012 22:53:53 +0000 (15:53 -0700)]
Port byte-code-meter to modern targets.

* bytecode.c (METER_CODE) [BYTE_CODE_METER]: Don't assume
!CHECK_LISP_OBJECT_TYPE && !USE_LSB_TAG.  Problem with
CHECK_LISP_OBJECT_TYPE reported by Dmitry Andropov in
<http://lists.gnu.org/archive/html/emacs-devel/2012-06/msg00282.html>.
(METER_1, METER_2): Simplify.

11 years ago* lisp/progmodes/python.el (python-rx-constituents): Move backquote.
Stefan Monnier [Mon, 18 Jun 2012 20:41:23 +0000 (16:41 -0400)]
* lisp/progmodes/python.el (python-rx-constituents): Move backquote.
(python-skeleton-define, python-define-auxiliary-skeleton): Use `declare'.

11 years ago* minibuffer.el (read-file-name-default): Revert the patch from 2012-06-17.
Michael Albinus [Mon, 18 Jun 2012 20:39:52 +0000 (22:39 +0200)]
* minibuffer.el (read-file-name-default): Revert the patch from 2012-06-17.

11 years ago* lisp/emacs-lisp/pcase.el (pcase--expand): Warn for unused pattern.
Stefan Monnier [Mon, 18 Jun 2012 19:23:35 +0000 (15:23 -0400)]
* lisp/emacs-lisp/pcase.el (pcase--expand): Warn for unused pattern.
(pcase--u1, pcase--q1): Don't use apply-partially.

11 years agoFix python.el obsolescence versions
Glenn Morris [Mon, 18 Jun 2012 18:23:59 +0000 (14:23 -0400)]
Fix python.el obsolescence versions

* lisp/progmodes/python.el (python-proc, python-buffer)
(python-send-receive, python-send-string): Fix obsolete versions.

11 years agoAdd coding cookie
Glenn Morris [Mon, 18 Jun 2012 18:04:21 +0000 (14:04 -0400)]
Add coding cookie

12 years agoFix return value of `defun' and un-define it.
Stefan Monnier [Mon, 18 Jun 2012 15:57:41 +0000 (11:57 -0400)]
Fix return value of `defun' and un-define it.
* src/data.c (Fdefalias): Return `symbol'.
* doc/lispref/functions.texi (Defining Functions):
* doc/lispref/macros.texi (Defining Macros): Un-define the return value of
`defun', `defmacro' and `defalias'.

Fixes: debbugs:11686

12 years agoHandle cases where buffer gets killed while running Fkill_buffer (Bug#11665).
Martin Rudalics [Mon, 18 Jun 2012 07:20:19 +0000 (09:20 +0200)]
Handle cases where buffer gets killed while running Fkill_buffer (Bug#11665).

* buffer.c (Fkill_buffer): Don't throw an error when the buffer
gets killed during executing of this function (Bug#11665).  Try
to always return Qt when the buffer has been actually killed.
(Vkill_buffer_query_functions): In doc-string say that functions
run by this hook should not change the current buffer.

12 years agoFix recently-introduced process.c problems found by static checking.
Paul Eggert [Mon, 18 Jun 2012 06:58:00 +0000 (23:58 -0700)]
Fix recently-introduced process.c problems found by static checking.

* process.c (write_queue_push, write_queue_pop, send_process):
Use ptrdiff_t, not int or EMACS_INT, for buffer lengths and offsets.
(write_queue_pop): Fix pointer signedness problem.
(send_process): Remove unused local.

12 years agoCompletely remove stringp check in special-display-p.
Martin Rudalics [Mon, 18 Jun 2012 06:22:22 +0000 (08:22 +0200)]
Completely remove stringp check in special-display-p.

* window.el (special-display-p): Completely remove stringp
check.  Suggested by Andreas Schwab <schwab@linux-m68k.org>.

12 years ago* minibuffer.el (read-file-name-default): Bind `non-essential' to `t'.
Michael Albinus [Sun, 17 Jun 2012 18:54:39 +0000 (20:54 +0200)]
* minibuffer.el (read-file-name-default): Bind `non-essential' to `t'.

* net/tramp.el (tramp-file-name-handler): Catch 'non-essential.

* net/ange-ftp.el (ange-ftp-gwp-start, ange-ftp-start-process):
* net/tramp-sh.el (tramp-maybe-open-connection):
Throw if `non-essential' is non-nil.

12 years agoChangeLog date fixes
Glenn Morris [Sun, 17 Jun 2012 18:52:31 +0000 (11:52 -0700)]
ChangeLog date fixes

12 years agoIn special-display-p signal an error if BUFFER-NAME is not a string (Bug#11713).
Martin Rudalics [Sun, 17 Jun 2012 10:43:50 +0000 (12:43 +0200)]
In special-display-p signal an error if BUFFER-NAME is not a string (Bug#11713).

* window.el (special-display-p): Signal an error if BUFFER-NAME
is not a string (Bug#11713).

12 years agoOptimization to avoid redisplaying hidden terminal frames.
Chong Yidong [Sun, 17 Jun 2012 10:11:39 +0000 (18:11 +0800)]
Optimization to avoid redisplaying hidden terminal frames.

* xdisp.c (redisplay_internal): No need to redisplay terminal
frames that are not on top.

12 years agoEnsure correct ordering of process writes.
Troels Nielsen [Sun, 17 Jun 2012 09:00:37 +0000 (17:00 +0800)]
Ensure correct ordering of process writes.

* process.c (make_process): Initialize write_queue.
(write_queue_push, write_queue_pop): New functions.
(send_process): Use them to maintain correct ordering of process writes.

Fixes: debbugs:10815

12 years agoSpelling fixes.
Paul Eggert [Sun, 17 Jun 2012 08:53:31 +0000 (01:53 -0700)]
Spelling fixes.

12 years agoFix point motion bug in term-emulate-terminal.
Chong Yidong [Sun, 17 Jun 2012 08:26:13 +0000 (16:26 +0800)]
Fix point motion bug in term-emulate-terminal.

* lisp/term.el (term-emulate-terminal): If term-check-size is called,
move point to the process mark without resetting point.

Fixes: debbugs:4635

12 years ago* lisp.h (eassert): Assume C89 or later.
Paul Eggert [Sun, 17 Jun 2012 08:21:25 +0000 (01:21 -0700)]
* lisp.h (eassert): Assume C89 or later.

This removes the need for CHECK.
(CHECK): Remove.  Its comments about always evaluating its
argument were confusing, as 'eassert' typically does not evaluate
its argument.

12 years ago* coding.c (produce_chars): Use ptrdiff_t, not int.
Paul Eggert [Sun, 17 Jun 2012 07:57:28 +0000 (00:57 -0700)]
* coding.c (produce_chars): Use ptrdiff_t, not int.

12 years ago* xterm.c (x_draw_underwave): Check for integer overflow.
Paul Eggert [Sun, 17 Jun 2012 07:39:50 +0000 (00:39 -0700)]
* xterm.c (x_draw_underwave): Check for integer overflow.

This pacifies gcc 4.7.0 -Wunsafe-loop-optimizations on x86-64.

12 years agoMerge changes from emacs-24; up to 2012-04-26T02:03:19Z!ueno@unixuser.org
Chong Yidong [Sun, 17 Jun 2012 05:13:40 +0000 (13:13 +0800)]
Merge changes from emacs-24; up to 2012-04-26T02:03:19Z!ueno@unixuser.org

12 years agoMinor edits for Face Attributes section of display.texi
Glenn Morris [Sun, 17 Jun 2012 02:07:26 +0000 (19:07 -0700)]
Minor edits for Face Attributes section of display.texi

* display.texi (Face Attributes): Copyedits.  Add a few cindex entries.
Overlining no longer behaves exactly like underlining.

12 years agoMention face underwave
Glenn Morris [Sun, 17 Jun 2012 01:49:50 +0000 (18:49 -0700)]
Mention face underwave

12 years agoChangeLog fix
Glenn Morris [Sun, 17 Jun 2012 01:42:56 +0000 (18:42 -0700)]
ChangeLog fix

12 years agoImplement wave-style variant of underlining.
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.

12 years agoNEWS fixes: positioning, copyedits
Glenn Morris [Sat, 16 Jun 2012 17:56:44 +0000 (10:56 -0700)]
NEWS fixes: positioning, copyedits

12 years agoChangeLog position, case fixes
Glenn Morris [Sat, 16 Jun 2012 17:45:09 +0000 (10:45 -0700)]
ChangeLog position, case fixes

12 years agosrc/makefile.w32-in: Update dependencies.
Juanma Barranquero [Sat, 16 Jun 2012 13:44:20 +0000 (15:44 +0200)]
src/makefile.w32-in: Update dependencies.

12 years agoFix "make dist" on MS-Windows.
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.

12 years ago* buffer.h (FETCH_MULTIBYTE_CHAR): Define as inline.
Andreas Schwab [Sat, 16 Jun 2012 12:24:15 +0000 (14:24 +0200)]
* buffer.h (FETCH_MULTIBYTE_CHAR): Define as inline.
(BUF_FETCH_MULTIBYTE_CHAR): Likewise.
* character.c (_fetch_multibyte_char_p): Remove.
* alloc.c: Include "character.h" before "buffer.h".
* bidi.c: Likewise.
* buffer.c: Likewise.
* bytecode.c: Likewise.
* callint.c: Likewise.
* callproc.c: Likewise.
* casefiddle.c: Likewise.
* casetab.c: Likewise.
* category.c: Likewise.
* cmds.c: Likewise.
* coding.c: Likewise.
* composite.c: Likewise.
* dired.c: Likewise.
* dispnew.c: Likewise.
* doc.c: Likewise.
* dosfns.c: Likewise.
* editfns.c: Likewise.
* emacs.c: Likewise.
* fileio.c: Likewise.
* filelock.c: Likewise.
* font.c: Likewise.
* fontset.c: Likewise.
* fringe.c: Likewise.
* indent.c: Likewise.
* insdel.c: Likewise.
* intervals.c: Likewise.
* keyboard.c: Likewise.
* keymap.c: Likewise.
* lread.c: Likewise.
* macros.c: Likewise.
* marker.c: Likewise.
* minibuf.c: Likewise.
* nsfns.m: Likewise.
* nsmenu.m: Likewise.
* print.c: Likewise.
* process.c: Likewise.
* regex.c: Likewise.
* region-cache.c: Likewise.
* search.c: Likewise.
* syntax.c: Likewise.
* term.c: Likewise.
* textprop.c: Likewise.
* undo.c: Likewise.
* unexsol.c: Likewise.
* w16select.c: Likewise.
* w32fns.c: Likewise.
* w32menu.c: Likewise.
* window.c: Likewise.
* xdisp.c: Likewise.
* xfns.c: Likewise.
* xmenu.c: Likewise.
* xml.c: Likewise.
* xselect.c: Likewise.

12 years agoFix bug #11720 with cursor positioning in outline-mode and Org buffers.
Eli Zaretskii [Sat, 16 Jun 2012 11:47:44 +0000 (14:47 +0300)]
Fix bug #11720 with cursor positioning in outline-mode and Org buffers.

 src/xdisp.c (set_cursor_from_row): Use the leftmost glyph as GLYPH_BEFORE, not
 the rightmost.

12 years agoFix bug #11653 with a crash when more than 16 overlay strings are loaded.
Eli Zaretskii [Sat, 16 Jun 2012 10:18:21 +0000 (13:18 +0300)]
Fix bug #11653 with a crash when more than 16 overlay strings are loaded.

 src/xdisp.c (handle_face_prop): Use chunk-relative overlay string index when
 indexing into it->string_overlays array.

12 years agoFix bug #11653 with cursor positioning in a row that has only strings.
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.