1. 18 Nov, 2012 1 commit
  2. 14 Nov, 2012 9 commits
    • Kenichi Handa's avatar
      merge trunk · 9ba02fc3
      Kenichi Handa authored
      9ba02fc3
    • Dmitry Gutov's avatar
      * lisp/progmodes/ruby-mode.el · c62792e7
      Dmitry Gutov authored
      (ruby-syntax-propertize-function): After everything else, search
      for expansions in string literals, mark their insides as
      whitespace syntax and save match data for font-lock.
      (ruby-font-lock-keywords): Highlight just the 2nd group from
      expression expansion matches.
      (ruby-match-expression-expansion): Use the match data saved to the
      text property in ruby-syntax-propertize-function.
      
      * test/automated/ruby-mode-tests.el
      Change direct font-lock face references to var references.
      (ruby-interpolation-suppresses-syntax-inside): New test.
      (ruby-interpolation-inside-percent-literal-with-paren): New
      failing test.
      c62792e7
    • Glenn Morris's avatar
      Auto-commit of generated files. · 710f5812
      Glenn Morris authored
      710f5812
    • Dmitry Antipov's avatar
      * xdisp.c (echo_area_display, redisplay_internal): · 77731919
      Dmitry Antipov authored
      Omit redundant check whether frame_garbaged is set.
      77731919
    • Dmitry Gutov's avatar
      * lisp/progmodes/ruby-mode.el (ruby-expr-beg): Make heredoc detection · 8619323f
      Dmitry Gutov authored
      more strict.  Add docstring.
      
      * test/automated/ruby-mode-tests.el (ruby-indent-singleton-class): Pass.
      (ruby-indent-inside-heredoc-after-operator)
      (ruby-indent-inside-heredoc-after-space): New tests.
      8619323f
    • Paul Eggert's avatar
      Use trunk version of gnulib lib/fcntl.in.h. · f360feb8
      Paul Eggert authored
      This corrects a recent checkin, which used an experimental
      version of this file by mistake.  Stick with the standard version.
      f360feb8
    • Paul Eggert's avatar
      Spelling fixes. · 7831fb1b
      Paul Eggert authored
      7831fb1b
    • Paul Eggert's avatar
      Use faccessat, not access, when checking file permissions. · 73dcdb9f
      Paul Eggert authored
      This fixes a bug that has been present in Emacs since its creation.
      It was reported by Chris Torek in 1983 even before GNU Emacs existed,
      which must set some sort of record.  (Torek's bug report was against
      a predecessor of GNU Emacs, but GNU Emacs happened to have the
      same common flaw.)  See Torek's Usenet posting
      "setuid/setgid programs & Emacs" Article-I.D.: sri-arpa.858
      Posted: Fri Apr  8 14:18:56 1983.
      * .bzrignore: Add lib/fcntl.h.
      * configure.ac (euidaccess): Remove check; gnulib does this for us now.
      (gl_FCNTL_O_FLAGS): Define a dummy version.
      * lib/at-func.c, lib/euidaccess.c, lib/faccessat.c, lib/fcntl.in.h:
      * lib/getgroups.c, lib/group-member.c, lib/root-uid.h:
      * lib/xalloc-oversized.h, m4/euidaccess.m4, m4/faccessat.m4:
      * m4/fcntl_h.m4, m4/getgroups.m4, m4/group-member.m4:
      New files, from gnulib.
      * lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
      * admin/merge-gnulib (GNULIB_MODULES): Add faccessat.
      (GNULIB_TOOL_FLAGS): Avoid at-internal, fchdir, malloc-posix,
      openat-die, openat-h, save-cwd.  Do not avoid fcntl-h.
      Omit gnulib's m4/fcntl-o.m4.
      * nt/inc/ms-w32.h (AT_FDCWD, AT_EACCESS): New symbols.
      (access): Remove.
      (faccessat): New macro.
      * src/Makefile.in (LIB_EACCESS): New macro.
      (LIBES): Use it.
      * src/callproc.c (init_callproc):
      * src/charset.c (init_charset):
      * src/fileio.c (check_existing, check_executable, check_writable)
      (Ffile_readable_p):
      * src/lread.c (openp, load_path_check):
      * src/process.c (allocate_pty):
      * src/xrdb.c (file_p):
      Use effective UID when checking permissions, not real UID.
      * src/callproc.c (init_callproc):
      * src/charset.c (init_charset):
      * src/lread.c (load_path_check, init_lread):
      Test whether directories are accessible, not merely whether they exist.
      * src/conf_post.h (GNULIB_SUPPORT_ONLY_AT_FDCWD): New macro.
      * src/fileio.c (check_existing, check_executable, check_writable)
      (Ffile_readable_p):
      Use symbolic names instead of integers for the flags, as they're
      portable now.
      (check_writable): New arg AMODE.  All uses changed.
      Set errno on failure.
      (Ffile_readable_p): Use faccessat, not stat + open + close.
      (Ffile_writable_p): No need to call check_existing + check_writable.
      Just call check_writable and then look at errno.  This saves a syscall.
      dir should never be nil; replace an unnecessary runtime check
      with an eassert.  When checking the parent directory of a nonexistent
      file, check that the directory is searchable as well as writable, as
      we can't create files in unsearchable directories.
      (file_directory_p): New function, which uses 'stat' on most platforms
      but faccessat with D_OK (for efficiency) if WINDOWSNT.
      (Ffile_directory_p, Fset_file_times): Use it.
      (file_accessible_directory_p): New function, which uses a single
      syscall for efficiency.
      (Ffile_accessible_directory_p): Use it.
      * src/xrdb.c (file_p): Use file_directory_p.
      * src/lisp.h (file_directory_p, file_accessible_directory_p): New decls.
      * src/lread.c (openp): When opening a file, use fstat rather than
      stat, as that avoids a permissions race.  When not opening a file,
      use file_directory_p rather than stat.
      (dir_warning): First arg is now a usage string, not a format.
      Use errno.  All uses changed.
      * src/nsterm.m (ns_term_init): Remove unnecessary call to file-readable
      that merely introduced a race.
      * src/process.c, src/sysdep.c, src/term.c: All uses of '#ifdef O_NONBLOCK'
      changed to '#if O_NONBLOCK', to accommodate gnulib O_* style,
      and similarly for the other O_* flags.
      * src/w32.c (sys_faccessat): Rename from sys_access and switch to
      faccessat's API.  All uses changed.
      * src/xrdb.c: Do not include <sys/stat.h>; no longer needed.
      (magic_db): Rename from magic_file_p.
      (magic_db, search_magic_path): Return an XrmDatabase rather than a
      char *, so that we don't have to test for file existence
      separately from opening the file for reading.  This removes a race
      fixes a permission-checking problem, and simplifies the code.
      All uses changed.
      (file_p): Remove; no longer needed.
      
      Fixes: debbugs:12632
      73dcdb9f
    • Stefan Monnier's avatar
      * lisp/emacs-lisp/gv.el (setf): Fix debug spec for multiple assignments. · 9c3912d3
      Stefan Monnier authored
      Fixes: debbugs:12879
      9c3912d3
  3. 13 Nov, 2012 15 commits
  4. 12 Nov, 2012 15 commits
    • Stefan Monnier's avatar
      * lisp/emacs-lisp/gv.el (gv-define-simple-setter): One more fix. · f8705f6e
      Stefan Monnier authored
      Fixes: debbugs:12871
      f8705f6e
    • Stefan Monnier's avatar
      * lisp/emacs-lisp/nadvice.el: New package. · 231d8498
      Stefan Monnier authored
      * lisp/subr.el (special-form-p): New function.
      * lisp/emacs-lisp/elp.el: Use lexical-binding and advice-add.
      (elp-all-instrumented-list): Remove var.
      (elp-not-profilable): Remove elp-wrapper.
      (elp-profilable-p): Use autoloadp and special-form-p.
      (elp--advice-name): New const.
      (elp-instrument-function): Use advice-add.
      (elp--instrumented-p): New predicate.
      (elp-restore-function): Use advice-remove.
      (elp-restore-all, elp-reset-all): Use mapatoms.
      (elp-set-master): Use elp--instrumented-p.
      (elp--make-wrapper): Rename from elp-wrapper, return a function
      suitable for advice-add.  Use cl-inf.
      (elp-results): Use mapatoms+elp--instrumented-p.
      * lisp/emacs-lisp/debug.el: Use lexical-binding and advice-add.
      (debug-function-list): Remove var.
      (debug): Rename arg, and then let-bind it explicitly inside.
      (debugger-setup-buffer): Rename arg.
      (debugger-setup-buffer): Adjust counts to new debug-on-entry setup.
      (debugger-frame-number): Adjust to new debug-on-entry setup.
      (debug--implement-debug-on-entry): Rename from
      implement-debug-on-entry, add argument.
      (debugger-special-form-p): Remove, use special-form-p instead.
      (debug-on-entry): Use advice-add.
      (debug--function-list): New function.
      (cancel-debug-on-entry): Use it, along with advice-remove.
      (debug-arglist, debug-convert-byte-code, debug-on-entry-1): Remove.
      (debugger-list-functions): Use debug--function-list instead of
      debug-function-list.
      * lisp/emacs-lisp/advice.el (ad-save-real-definition): Remove, unused.
      (ad-special-form-p): Remove, use special-form-p instead.
      (ad-set-advice-info): Use add-function and remove-function.
      (ad--defalias-fset): Adjust accordingly.
      * test/automated/advice-tests.el: New tests.
      231d8498
    • Chong Yidong's avatar
      Doc fix for gdb-stopped-functions. · 0f5414fc
      Chong Yidong authored
      * building.texi (Multithreaded Debugging): gdb-stopped-hooks is
      actually named gdb-stopped-functions.
      0f5414fc
    • Glenn Morris's avatar
      53f8dc84
    • Wolfgang Jenkner's avatar
      lisp/ansi-color.el (ansi-color-apply-sequence): Implement SGR codes 39 and 49. · 9db94175
      Wolfgang Jenkner authored
      This fixes bug#12792.  Also, treat unimplemented parameters as 0,
      thereby restoring the behavior of revisions prior to 2012-08-15T03:33:55Z!monnier@iro.umontreal.ca.
      9db94175
    • Stefan Monnier's avatar
      * lisp/cedet/semantic/mru-bookmark.el (semantic-mru-bookmark-mode): · 237b5653
      Stefan Monnier authored
      * lisp/cedet/semantic/grammar.el (semantic-grammar-mode):
      * lisp/cedet/semantic/util-modes.el (semantic-highlight-edits-mode)
      (semantic-show-parser-state-mode): Avoid obsolete name
      semantic-edits-new-change-hooks.
      
      Fixes: debbugs:12869
      237b5653
    • Dmitry Antipov's avatar
      * frame.h (struct frame): Convert external_tool_bar member to · be49ba74
      Dmitry Antipov authored
      1-bit unsigned bitfield.
      * termhooks.h (struct terminal): Remove mouse_moved member since
      all users are long dead.  Adjust comment on mouse_position_hook.
      be49ba74
    • Eli Zaretskii's avatar
      Fix bug #12867 with crashes due to large field width in mode-line format. · 32520273
      Eli Zaretskii authored
       src/xdisp.c (decode_mode_spec): Limit the value of WIDTH argument
       passed to pint2str and pint2hrstr to be at most the size of the
       frame's decode_mode_spec_buffer.  This avoids crashes with very
       large values of FIELD_WIDTH argument to decode_mode_spec.
      32520273
    • Fabián Ezequiel Gallina's avatar
      Fix end-of-defun misbehavior. · 2e6625b5
      Fabián Ezequiel Gallina authored
      * progmodes/python.el (python-nav-beginning-of-defun): Rename from
      python-beginning-of-defun-function.  Handle nested defuns
      correctly.
      (python-nav-end-of-defun): Rename from
      python-end-of-defun-function.  Ensure forward movement.
      (python-info-current-defun): Reimplemented to work as intended
      with new fixed python-nav-{end,beginning}-of-defun.  Stop scanning
      parent defuns as soon as possible.
      2e6625b5
    • Glenn Morris's avatar
      Document flymake fringe bitmaps · 24c38527
      Glenn Morris authored
      * doc/misc/flymake.texi (Customizable variables)
      (Highlighting erroneous lines): Mention flymake-error-bitmap,
      flymake-warning-bitmap, and flymake-fringe-indicator-position.
      
      * lisp/progmodes/flymake.el (flymake-error-bitmap)
      (flymake-warning-bitmap, flymake-fringe-indicator-position): Doc fixes.
      (flymake-error-bitmap, flymake-warning-bitmap): Fix :types.
      
      * etc/NEWS: Related markup.
      24c38527
    • Glenn Morris's avatar
      Mention a few more gv.el features in the lispref · a13e12f9
      Glenn Morris authored
      * doc/lispref/variables.texi (Adding Generalized Variables):
      At least mention gv-define-expander and gv-letplace.
      a13e12f9
    • Glenn Morris's avatar
      * doc/emacs/misc.texi (Single Shell): Mention async-shell-command-buffer. · adad6d8f
      Glenn Morris authored
      * etc/NEWS: Related markup.
      adad6d8f
    • Vincent Belaïche's avatar
      * ses.texi: Doc for ses-rename-cell, ses-repair-cell-reference-all & ses-range. · 1796ef98
      Vincent Belaïche authored
      In all file place SES into @acronym{...}.
      (Advanced Features): Add key index and function index for
      ses-set-header-row. Add description for function
      ses-rename-cell. Add description for function
      ses-repair-cell-reference-all.
      (Ranges in formulas): Add description for ses-range flags.
      1796ef98
    • Dmitry Antipov's avatar
      Simplify by using FOR_EACH_FRAME here and there. · 5b04e9f9
      Dmitry Antipov authored
      * frame.c (next_frame, prev_frame, other_visible_frames)
      (delete_frame, visible-frame-list): Use FOR_EACH_FRAME.
      * w32term.c (x_window_to_scroll_bar): Likewise.
      * window.c (window_list): Likewise.
      * xdisp.c (x_consider_frame_title): Likewise.
      * xfaces.c ( Fdisplay_supports_face_attributes_p): Likewise.
      * xfns.c (x_window_to_frame, x_any_window_to_frame)
      (x_menubar_window_to_frame, x_top_window_to_frame): Likewise.
      * xmenu.c (menubar_id_to_frame): Likewise.
      * xselect.c (frame_for_x_selection): Likewise.
      * xterm.c (x_frame_of_widget, x_window_to_scroll_bar)
      (x_window_to_menu_bar): Likewise.
      * w32fns.c (x_window_to_frame): Likewise.  Adjust comment.
      5b04e9f9
    • Paul Eggert's avatar
      * texinfo.tex: Merge from gnulib. · 31f47fba
      Paul Eggert authored
      31f47fba