1. 07 Sep, 2012 18 commits
    • Chong Yidong's avatar
      Remove obsolete display-buffer-reuse-frames from manuals. · 14ba4cf3
      Chong Yidong authored
      * doc/emacs/windows.texi (Window Choice): Don't mention obsolete
      display-buffer-reuse-frames.
      
      * doc/lispref/windows.texi (Display Action Functions)
      (Choosing Window Options): Remove obsolete variable
      display-buffer-reuse-frames.
      14ba4cf3
    • Chong Yidong's avatar
      Let ESC ESC quit in read-char-choice, and use it in userlock.el. · 145823ec
      Chong Yidong authored
      * lisp/subr.el (read-char-choice): Allow quitting via ESC ESC.
      
      * lisp/userlock.el (ask-user-about-supersession-threat): Use
      read-char-choice.
      
      Fixes: debbugs:12093
      145823ec
    • Glenn Morris's avatar
      Auto-commit of generated files. · 843f2634
      Glenn Morris authored
      843f2634
    • Chong Yidong's avatar
      Add a utility function buffer-narrowed-p, and use it. · e5c2edf7
      Chong Yidong authored
      * lisp/subr.el (buffer-narrowed-p): New function.
      
      * lisp/ses.el (ses-widen):
      * lisp/simple.el (count-words--buffer-message):
      * lisp/net/browse-url.el (browse-url-of-buffer): Use it
      
      * lisp/simple.el (count-words-region): Don't signal an error if there
      is a non-nil prefix arg and the mark is not set.
      
      * doc/lispref/positions.texi (Narrowing): Document buffer-narrowed-p.
      e5c2edf7
    • Paul Eggert's avatar
      * emacs.c (main): Convert three 'signal' calls to 'sigaction' calls. · eddb36a7
      Paul Eggert authored
      Problem introduced when merging patches.  Noted by Eli Zaretskii in
      <http://bugs.gnu.org/12327#67>.
      eddb36a7
    • Paul Eggert's avatar
      More signal-handler cleanup. · 1a4f1e9b
      Paul Eggert authored
      * configure.ac (FLOAT_CHECK_DOMAIN): Comment fix (Bug#12327).
      * src/floatfns.c: Comment fix.
      * src/lisp.h (force_auto_save_soon): Declare regardless of SIGDANGER.
      SIGDANGER might not be in scope so "#ifdef SIGDANGER" is not right,
      and anyway the declaration is harmless even if SIGDANGER is not defined.
      * src/syssignal.h (SIGIO): Also #undef if (! defined FIONREAD ||
      defined BROKEN_FIONREAD).  systty.h formerly did this, but other
      source files not surprisingly expected syssignal.h to define, or
      not define, SIGIO, and it's cleaner to do it that way, for consistency.
      Include <sys/ioctl.h>, for FIONREAD.
      * src/systty.h (SIGIO): Do not #undef here; it's now syssignal.h's job.
      This eliminates a problem whereby other files mysteriously had
      to include "syssignal.h" before including "systty.h" if they
      wanted to use "#ifdef SIGIO".
      1a4f1e9b
    • Chong Yidong's avatar
    • Eli Zaretskii's avatar
      MS-Windows followup for 2012-09-07T01:27:44Z!eggert@cs.ucla.edu, signal-handler cleanup. · 3e6d6928
      Eli Zaretskii authored
       src/w32proc.c (sigaction): New function, emulates Posix 'sigaction'.
       src/w32.c (sigemptyset): Empty the set.
       (sigsetmask, sigmask, sigblock, sigunblock): Remove unused functions.
      
       nt/inc/ms-w32.h (struct sigaction): Declare sa_handler __cdecl.
      
      Fixes: debbugs:12327
      3e6d6928
    • Eli Zaretskii's avatar
      Fix compilation failure under ENABLE_CHECKING. · bc8000ff
      Eli Zaretskii authored
       src/alloc.c [ENABLE_CHECKING]: Include signal.h, since we need SIGABRT.
      
      Fixes: debbugs:12327
      bc8000ff
    • Dmitry Antipov's avatar
      * alloc.c (mark_buffer): Revert unsafe marking optimization. · b4fa72f2
      Dmitry Antipov authored
      (mark_object): Likewise for frame objects.
      b4fa72f2
    • Paul Eggert's avatar
      * syssignal.h (handle_on_main_thread): Always declare, · 30730c93
      Paul Eggert authored
      even if FORWARD_SIGNAL_TO_MAIN_THREAD is not defined.
      This ports to platforms without HAVE_PTHREAD.
      30730c93
    • Dmitry Gutov's avatar
      * lisp/progmodes/ruby-mode.el · 8f06acce
      Dmitry Gutov authored
      (ruby-beginning-of-defun): Only consider 3 keywords defun beginners.
      (ruby-end-of-defun): Expect that the point is at the beginning of
      the defun.
      8f06acce
    • Chong Yidong's avatar
      Fix for invoking C-h c from the minibuffer. · 74c582e6
      Chong Yidong authored
      * help.el (describe-key-briefly): Allow the message to be seen
      when invoked from the minibuffer.
      
      Fixes: debbugs:7014
      74c582e6
    • Chong Yidong's avatar
      Add a couple of xrefs to the Lisp manual. · 52404181
      Chong Yidong authored
      * markers.texi (Moving Markers): Add xref to Point.
      
      * syntax.texi (Low-Level Parsing): Add xref to Parser State.
      
      Fixes: debbugs:12269
      52404181
    • Dmitry Gutov's avatar
      * lisp/progmodes/ruby-mode.el (ruby-end-of-defun) · d81ceaaf
      Dmitry Gutov authored
      (ruby-beginning-of-defun): Simplify, allow indentation before
      block beginning and end keywords.  Also, fix accidental change in the former.
      d81ceaaf
    • Dmitry Gutov's avatar
      * lisp/progmodes/ruby-mode.el (ruby-indent-beg-re): Add pieces from · 0ba2d4b6
      Dmitry Gutov authored
      ruby-beginning-of-indent, simplify, allow all keywords to have
      indentation before them.
      (ruby-beginning-of-indent): Adjust for above.  Search until the
      found point is not inside a string or comment.
      (ruby-font-lock-keywords): Allow symbols to start with "@"
      character, give them higher priority than variables.
      (ruby-syntax-propertize-function)
      (ruby-font-lock-syntactic-keywords): Remove the "not comments"
      matchers.  Expression expansions are not comments when inside a
      string, and there comment syntax status is irrelevant.
      (ruby-match-expression-expansion): New function.  Check that
      expression expansion is inside a string, and it's not escaped.
      (ruby-font-lock-keywords): Use it.
      
      * test/automated/ruby-mode-tests.el: New tests (Bug#11613).
      0ba2d4b6
    • Chong Yidong's avatar
      Partially revert last Gnus merge. · 1d43a35f
      Chong Yidong authored
      The add-face function has been added gnus-compat.el, but is not in
      Emacs; this leaves Gnus in an unusable state.
      
      * lisp/gnus/gnus-salt.el (gnus-tree-highlight-node):
      * lisp/gnus/gnus-sum.el (gnus-summary-highlight-line):
      * lisp/gnus/gnus-group.el (gnus-group-highlight-line): Revert use of add-face.
      
      * lisp/gnus/gnus-util.el (gnus-put-text-property-excluding-characters-with-faces): Restore.
      1d43a35f
    • Paul Eggert's avatar
      Signal-handler cleanup. · 2fe28299
      Paul Eggert authored
      Emacs's signal handlers were written in the old 4.2BSD style with
      sigblock and sigmask and so forth, and this led to some
      inefficiencies and confusion.  Rewrite these to use
      pthread_sigmask etc. without copying signal sets around.  Also,
      get rid of the confusing macros 'SIGNAL_THREAD_CHECK' and
      'signal', and instead use functions that do not attempt to take
      over the system name space.  This patch causes Emacs's text
      segment to shrink by 0.7% on my platform, Fedora 17 x86-64.
      * configure.ac (PTY_OPEN, PTY_TTY_NAME_SPRINTF):
      Adjust to syssignal.h changes.
      (SIGNAL_H_AB): Remove; no longer needed.
      * src/alloc.c, src/emacsgtkfixed.c, src/nsfns.m, src/widget.c, src/xmenu.c:
      Do not include <signal.h> or "syssignal.h", as these
      modules do not use signals.
      * src/atimer.c, src/callproc.c, src/data.c, src/dispnew.c, src/emacs.c:
      * src/floatfns.c, src/gtkutil.c, src/keyboard.c, src/process.c, src/sound.c:
      * src/sysdep.c, src/term.c, src/xterm.c:
      Do not include <signal.h>, as "syssignal.h" does that for us now.
      * src/atimer.c (sigmask_atimers): New function.
      (block_atimers, unblock_atimers): New functions,
      replacing the old macros BLOCK_ATIMERS and UNBLOCK_ATIMERS.
      All uses replaced.
      * src/conf_post.h [SIGNAL_H_AHB]: Do not include <signal.h>;
      no longer needed here.
      * src/emacs.c (main): Inspect existing signal handler with sigaction,
      so that there's	no need to block and unblock SIGHUP.
      * src/sysdep.c (struct save_signal): New member 'action', replacing
      old member 'handler'.
      (save_signal_handlers, restore_signal_handlers):
      Use sigaction instead of 'signal' to save and restore.
      (get_set_sighandler, set_sighandler) [!WINDOWSNT]:
      New function.  All users of 'signal' modified to use set_sighandler
      if they're writeonly, and to use sys_signal if they're read+write.
      (emacs_sigaction_init, forwarded_signal): New functions.
      (sys_signal): Remove.  All uses replaced by calls to sigaction
      and emacs_sigaction_init, or by direct calls to 'signal'.
      (sys_sigmask) [!__GNUC__]: Remove; no longer needed.
      (sys_sigblock, sys_sigunblock, sys_sigsetmask): Remove;
      all uses replaced by pthread_sigmask etc. calls.
      * src/syssignal.h: Include <signal.h>.
      (emacs_sigaction_init, forwarded_signal): New decls.
      (SIGMASKTYPE): Remove.  All uses replaced by its definiens, sigset_t.
      (SIGEMPTYMASK): Remove; all uses replaced by its definiens, empty_mask.
      (sigmask, sys_sigmask): Remove; no longer needed.
      (sigpause): Remove.  All uses replaced by its definiens, sigsuspend.
      (sigblock, sigunblock, sigfree):
      (sigsetmask) [!defined sigsetmask]:
      Remove.  All uses replaced by pthread_sigmask.
      (signal): Remove.  Its remaining uses (with SIG_DFL and SIG_IGN)
      no longer need to be replaced, and its typical old uses
      are now done via emacs_sigaction_init and sigaction.
      (sys_sigblock, sys_sigunblock, sys_sigsetmask): Remove decls.
      (sys_sigdel): Remove; unused.
      (NSIG): Remove a FIXME; the code's fine.  Remove an unnecessary ifdef.
      
      Fixes: debbugs:12327
      2fe28299
  2. 06 Sep, 2012 14 commits
    • Gnus developers's avatar
      Misc changes made in Gnus master · 845ce106
      Gnus developers authored
      Use combining faces for highlighting.
      Change ephemeral Gnus group names to be prettier.
      gnus-util.el: Fix compilation error on XEmacs 21.4.
      845ce106
    • Eli Zaretskii's avatar
      Fix bug #12327 with SIGCHLD handling on Windows and some other systems. · 0216c128
      Eli Zaretskii authored
       src/process.c (CAN_HANDLE_MULTIPLE_CHILDREN): Fix a typo that broke
       SIGCHLD handling on systems that don't have WNOHANG.
      0216c128
    • Stefan Monnier's avatar
      * lisp/emacs-lisp/cl-macs.el (cl--do-arglist): Understand _ on &key args. · d458ef98
      Stefan Monnier authored
      (cl--make-usage-args): Strip _ from argument names.
      
      Fixes: debbugs:12367
      d458ef98
    • Chong Yidong's avatar
      Remove references to obsolete variable speedbar-key-map. · fcbfbdea
      Chong Yidong authored
      * speedbar.el (speedbar-update-flag, speedbar-mode): Remove
      references to obsolete variable speedbar-key-map.
      fcbfbdea
    • Rüdiger Sonderfeld's avatar
      Fix use of obsolete variables in vhdl-mode.el. · 20367d28
      Rüdiger Sonderfeld authored
      * progmodes/vhdl-mode.el (vhdl-speedbar-initialize): Don't use
      obsolete alias speedbar-key-map.
      (vhdl-doc-variable, vhdl-doc-mode): Use called-interactively-p.
      (vhdl-index-menu-init): Don't use obsolete variable font-lock-maximum-size.
      20367d28
    • Chong Yidong's avatar
    • Dmitry Antipov's avatar
      Explicitly mark buffer_defaults and buffer_local_symbols. · c752cfa9
      Dmitry Antipov authored
      * alloc.c (Fgarbage_collect): Mark buffer_defaults and
      mark_local_symbols here.
      (mark_object): If GC_CHECK_MARKED_OBJECTS, simplify checking
      since special buffers aren't marked here any more.
      (allocate_buffer): Chain new buffer with all_buffers here...
      * buffer.c (Fget_buffer_create, Fmake_indirect_buffer): ...and
      not here.
      (Vbuffer_defaults, Vbuffer_local_symbols): Remove.
      (syms_of_buffer): Remove staticpro of the above.
      (init_buffer_once): Set names for buffer_defaults and
      buffer_local_symbols.
      c752cfa9
    • Juri Linkov's avatar
      * lisp/replace.el (replace-lax-whitespace): New defcustom. · 826b3235
      Juri Linkov authored
      (query-replace, query-replace-regexp, query-replace-regexp-eval)
      (replace-string, replace-regexp): Mention it in docstrings.
      (perform-replace, replace-highlight): Let-bind
      isearch-lax-whitespace and isearch-regexp-lax-whitespace according
      to the values of replace-lax-whitespace and regexp-flag.
      Don't let-bind search-whitespace-regexp. 
      
      * lisp/isearch.el (isearch-query-replace): Let-bind
      replace-lax-whitespace instead of let-binding
      replace-search-function and replace-re-search-function.
      (isearch-lazy-highlight-search): Let-bind isearch-lax-whitespace
      and isearch-regexp-lax-whitespace to lazy-highlight variables.
      (isearch-toggle-symbol): Set isearch-regexp to nil
      in isearch-word mode (like in isearch-toggle-word).
      
      Fixes: debbugs:10885
      826b3235
    • Juri Linkov's avatar
      Use `isearch-search-fun' in `perform-replace' (bug#10885, bug#10887). · 1ec5e41d
      Juri Linkov authored
      * lisp/replace.el (replace-search-function)
      (replace-re-search-function): Set default values to nil.
      (perform-replace): Let-bind isearch-related variables based on
      replace-related values, call `isearch-search-fun' and let-bind
      the result to `search-function'.  Remove code that sets
      `search-function' and `search-string' separately for
      `delimited-flag'.
      (replace-highlight): Add new argument `delimited-flag' and
      rename other arguments to the names used in `perform-replace'.
      Let-bind `isearch-word' to the argument `delimited-flag'.
      1ec5e41d
    • Paul Eggert's avatar
      Use bool for booleans in font-related modules. · a864ef14
      Paul Eggert authored
      * font.c (font_intern_prop, font_style_to_value)
      (font_style_symbolic, font_parse_xlfd, font_parse_fcname)
      (generate_otf_features, font_check_otf_features, font_check_otf)
      (font_match_p, font_list_entities, font_at):
      * fontset.c (fontset_id_valid_p, reorder_font_vector
      (fontset_find_font, Fset_fontset_font)
      (face_suitable_for_char_p) [0]:
      * ftfont.c (fc_initialized, ftfont_get_open_type_spec)
      (ftfont_open, ftfont_text_extents, ftfont_check_otf):
      (m17n_flt_initialized, ftfont_shape_by_flt):
      * ftxfont.c (ftxfont_draw_bitmap, ftxfont_draw):
      * nsfont.m (nsfont_draw):
      * w32font.c (w32font_draw):
      * w32term.c (x_draw_glyphless_glyph_string_foreground):
      Use bool for booleans.
      * font.h: Adjust to above API changes.
      (struct font, struct font_driver, struct font_driver_list):
      Use bool for booleans.
      (struct font): Remove useless member encoding_type.
      All users removed.
      * fontset.c, xftfont.c: Omit unnecessary static decls.
      a864ef14
    • Dmitry Antipov's avatar
      * alloc.c (mark_object): Revert window marking code · 0699fc18
      Dmitry Antipov authored
      since it's unsafe for the Fset_window_configuration.
      0699fc18
    • Katsumi Yamaoka's avatar
      [Gnus] XEmacs 21.5 compilation fix · 4fd78b62
      Katsumi Yamaoka authored
      * gnus-score.el (gnus-score-decode-text-parts): Use #' for
        mm-text-parts used in labels macro to make it work with XEmacs 21.5.
      * gnus-util.el (gnus-string-prefix-p): New function, an alias to
        string-prefix-p in Emacs >=23.2.
      * nnmaildir.el (nnmaildir--ensure-suffix, nnmaildir--add-flag)
        (nnmaildir--remove-flag, nnmaildir--scan): Use gnus-string-match-p
        instead of string-match-p.
        (nnmaildir--scan): Use gnus-string-prefix-p instead of string-prefix-p.
      4fd78b62
    • Kenichi Handa's avatar
      merge trunk · fca81a8d
      Kenichi Handa authored
      fca81a8d
    • Kenichi Handa's avatar
  3. 05 Sep, 2012 8 commits
    • Gnus developers's avatar
      Merge changes made in Gnus master · 067b39d4
      Gnus developers authored
      2012-09-05  Magnus Henoch  <magnus.henoch@gmail.com>
      * nnmaildir.el (nnmaildir--article-set-flags): Fix compilation error.
      
      2012-09-05  Martin Stjernholm  <mast@lysator.liu.se>
      * gnus-demon.el (gnus-demon-init): Fixed regression when IDLE is t and
        TIME is set.
      
      2012-09-05  Juri Linkov  <juri@jurta.org>
      * gnus-group.el (gnus-read-ephemeral-bug-group): Allow opening more
        than one group at a time (bug#11961).
      067b39d4
    • Gnus developers's avatar
      Merge changes made in Gnus master · 350a1888
      Gnus developers authored
      2012-09-05 Julien Danjou <julien@danjou.info>
      * gnus-srvr.el (gnus-server-open-server): Don't message on failure:
        this hide the real reason with a message giving absolutely no hint.
      
      2012-09-05 Lars Ingebrigtsen <larsi@gnus.org>
      * gnus-group.el (gnus-group-mark-article-read): Propagate the read mark
        to the backend (bug#11804).
      * message.el (message-insert-newsgroups): Don't insert newsgroup
        duplicates (bug#12275).
      
      2012-09-05 John Wiegley <johnw@newartisans.com>
      * gnus.el (gnus-expand-group-parameters): Allow regexp substitutions in
        sieve rules.
      
      2012-09-05 Jan Tatarik <jan.tatarik@gmail.com>
      * gnus-score.el (gnus-score-decode-text-parts): Use #' for the local
        function.
      * gnus-logic.el (gnus-advanced-body): Allow scoring on decoded bodies.
      * gnus-score.el (gnus-score-decode-text-parts): Ditto.
      
      2012-09-05 Magnus Henoch <magnus.henoch@gmail.com>
      * nnmaildir.el: Make nnmaildir understand and write maildir flags.
        That is, rename files from "unique:2," to "unique:2,S" for "seen", etc.
        This should make nnmaildir more usable with offlineimap.
      350a1888
    • Paul Eggert's avatar
      Fix race conditions with signal handlers and errno. · 20ef56db
      Paul Eggert authored
      Be more systematic about preserving errno whenever a signal
      handler returns, even if it's not in the main thread.  Do this by
      renaming signal handlers to distinguish between signal delivery
      and signal handling.  All uses changed.
      * atimer.c (deliver_alarm_signal): Rename from alarm_signal_handler.
      * data.c (deliver_arith_signal): Rename from arith_error.
      * dispnew.c (deliver_window_change_signal): Rename from
      window_change_signal.
      * emacs.c (deliver_error_signal): Rename from fatal_error_signal.
      (deliver_danger_signal) [SIGDANGER]: Rename from memory_warning_signal.
      * keyboard.c (deliver_input_available_signal): Rename from
      input_available_signal.
      (deliver_user_signal): Rename from handle_user_signal.
      (deliver_interrupt_signal): Rename from interrupt_signal.
      * process.c (deliver_pipe_signal): Rename from send_process_trap.
      (deliver_child_signal): Rename from sigchld_handler.
      * atimer.c (handle_alarm_signal):
      * data.c (handle_arith_signal):
      * dispnew.c (handle_window_change_signal):
      * emacs.c (handle_fatal_signal, handle_danger_signal):
      * keyboard.c (handle_input_available_signal):
      * keyboard.c (handle_user_signal, handle_interrupt_signal):
      * process.c (handle_pipe_signal, handle_child_signal):
      New functions, with the actual signal-handling code taken from the
      original respective signal handlers, sans the sporadic attempts to
      preserve errno, since that's now done by handle_on_main_thread.
      * atimer.c (alarm_signal_handler): Remove unnecessary decl.
      * emacs.c, floatfns.c, lisp.h: Remove unused FLOAT_CATCH_SIGKILL cruft.
      * emacs.c (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
      Move to sysdep.c.
      (main) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
      Move initialization of main_thread to sysdep.c's init_signals.
      * process.c (waitpid) [!WNOHANG]: #define to wait; that's good enough for
      our usage, and simplifies the mainline code.
      (record_child_status_change): New static function, as a helper
      for handle_child_signal, and with most of the old child handler's
      contents.
      (CAN_HANDLE_MULTIPLE_CHILDREN): New constant.
      (handle_child_signal): Use the above.
      * sysdep.c (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
      Moved here from emacs.c.
      (init_signals) [FORWARD_SIGNAL_TO_MAIN_THREAD]: Initialize it;
      code moved here from emacs.c's main function.
      * sysdep.c, syssignal.h (handle_on_main_thread): New function,
      replacing the old SIGNAL_THREAD_CHECK.  All uses changed.  This
      lets callers save and restore errno properly.
      20ef56db
    • Eli Zaretskii's avatar
    • Dmitry Antipov's avatar
      Remove redundant or unused things here and there. · e3ccf108
      Dmitry Antipov authored
      * lisp.h (CYCLE_CHECK, CHAR_TABLE_TRANSLATE): Remove.
      * conf_post.h (RE_TRANSLATE): Use char_table_translate.
      * editfns.c (Fcompare_buffer_substrings): Likewise.
      * frame.h (struct terminal, struct font_driver_list):
      Remove redundant declarations.
      * window.h (Qleft, Qright): Likewise.
      e3ccf108
    • Dmitry Antipov's avatar
      Do not mark objects from deleted buffers, windows and frames. · 697e1e39
      Dmitry Antipov authored
      * alloc.c (mark_buffer): Mark just the buffer if it is dead.
      (mark_object): Likewise for windows and frames.
      697e1e39
    • Dmitry Antipov's avatar
      * alloc.c (valid_lisp_object_p): Treat killed buffers, · c1ca42ca
      Dmitry Antipov authored
      buffer_defaults and buffer_local_symbols as valid objects.
      Return special value to denote them.
      c1ca42ca
    • Glenn Morris's avatar
      Auto-commit of generated files. · e4996ae9
      Glenn Morris authored
      e4996ae9