1. 06 Aug, 2013 11 commits
    • Dmitry Antipov's avatar
      * lisp/files.el (cache-long-line-scans): Make · ed4fd9c5
      Dmitry Antipov authored
      obsolete alias to `cache-long-scans'.
      * etc/NEWS: Mention `cache-long-scans'.
      ed4fd9c5
    • Paul Eggert's avatar
      * process.c: Fix minor off-by-one issues in descriptor counts. · 2878ba7e
      Paul Eggert authored
      This shouldn't fix any real bugs, but it cleans up the code a bit.
      (max_process_desc, max_input_desc): -1, not 0, means none.
      All uses changed.
      (delete_input_desc): New function.
      (delete_write_fd, delete_keyboard_wait_descriptor): Use it.
      (deactivate_process): Scan backwards when recomuting max_process_desc;
      that should be faster.
      (init_process_emacs): Initialize max_input_desc.
      2878ba7e
    • Katsumi Yamaoka's avatar
    • Juanma Barranquero's avatar
      lisp/frameset.el: Doc fixes. · 024b38fc
      Juanma Barranquero authored
      (frameset, frameset-filter-alist, frameset-filter-params, frameset-save)
      (frameset--reuse-frame, frameset--minibufferless-last-p, frameset-restore):
      Doc fixes.
      (frameset-compute-pos): Rename from frameset--compute-pos, and add docstring.
      (frameset-move-onscreen): Use frameset-compute-pos.
      Most changes suggested by Drew Adams <drew.adams@oracle.com>.
      024b38fc
    • Juanma Barranquero's avatar
      64e22afe
    • Dmitry Antipov's avatar
      c8c2aca8
    • Juanma Barranquero's avatar
      8951efef
    • Dmitry Antipov's avatar
      Use region cache to speedup bidi_find_paragraph_start. · e30b79c1
      Dmitry Antipov authored
      * src/buffer.h (struct buffer): New member bidi_paragraph_cache.
      Rename cache_long_line_scans to cache_long_scans.
      * src/buffer.c (bset_cache_long_line_scans): Rename to
      bset_cache_long_scans.
      (Fget_buffer_create, Fmake_indirect_buffer, Fkill_buffer)
      (Fbuffer_swap_text, init_buffer_once): Take bidi_paragraph_cache
      into account.
      (syms_of_buffer): Rename cache-long-line-scans to
      cache-long-scans.  Adjust docstring.
      * src/search.c (newline_cache_on_off):
      * src/indent.c (width_run_cache_on_off): Adjust users.
      * src/bidi.c (bidi_paragraph_cache_on_off): New function.
      (bidi_find_paragraph_start): Use bidi_paragraph_cache if needed.
      * src/insdel.c (prepare_to_modify_buffer): Invalidate
      bidi_paragraph_cache if enabled.
      * doc/lispref/positions.texi (Motion by Screen Lines):
      * doc/lispref/display.texi (Truncation): Rename `cache-long-line-scans'
      to `cache-long-scans'.
      e30b79c1
    • Dmitry Antipov's avatar
      Invalidate region caches only if buffer text is going to be changed. · 00012b86
      Dmitry Antipov authored
      * lisp.h (modify_region_1): Remove 3rd arg and rename to...
      (modify_text): ...new prototype.
      (prepare_to_modify_buffer_1): New prototype.
      * textprop.c (modify_region): Rename to...
      (modify_text_properties): ...new function.
      (add_text_properties_1, set_text_properties, Fremove_text_properties)
      (Fremove_list_of_text_properties): Adjust users.
      * insdel.c (modify_region_1): Remove 3rd arg and reimplement as...
      (modify_text): ...new function.
      (prepare_to_modify_buffer): Reimplement mostly as a wrapper for...
      (prepare_to_modify_buffer_1): ...new function.
      * casefiddle.c (casify_region):
      * editfns.c (Fsubst_char_in_region, Ftranslate_region_internal)
      (Ftranspose_regions): Use modify_text.
      00012b86
    • Juanma Barranquero's avatar
      lisp/frameset.el: Various fixes. · 307764cc
      Juanma Barranquero authored
      (frameset-p): Don't check non-nullness of the `properties'
      slot , which can indeed be nil.
      (frameset-live-filter-alist, frameset-persistent-filter-alist):
      Move entry for `left' from persistent to live filter alist.
      (frameset-filter-alist, frameset--minibufferless-last-p, frameset-save):
      Doc fixes.
      (frameset-filter-params): When restoring a frame, copy items added to
      `filtered', to avoid unwittingly modifying the original parameters.
      (frameset-move-onscreen): Rename from frameset--move-onscreen.  Doc fix.
      (frameset--restore-frame): Fix reference to frameset-move-onscreen.
      307764cc
    • Juanma Barranquero's avatar
  2. 05 Aug, 2013 16 commits
    • Stefan Monnier's avatar
      Revert introduction of isearch-filter-predicates. · dc6c0eda
      Stefan Monnier authored
      Rely on add-function instead.
      * lisp/loadup.el: Preload nadvice.
      * lisp/isearch.el (isearch-filter-predicates): Rename it back to
      isearch-filter-predicate.
      (isearch-message-prefix): Use advice-function-mapc and advice
      properties to get the isearch-message-prefix.
      (isearch-search, isearch-lazy-highlight-search): Revert to funcall
      instead of run-hook-with-args-until-failure.
      (isearch-filter-visible): Not obsolete any more.
      * lisp/replace.el (perform-replace): Revert to funcall
      instead of run-hook-with-args-until-failure.
      * lisp/wdired.el (wdired-change-to-wdired-mode): Use add-function.
      * lisp/dired-aux.el (dired-isearch-filenames-mode): Rename from
      dired-isearch-filenames-toggle; make it into a proper minor mode.
      Use add/remove-function.
      (dired-isearch-filenames-setup, dired-isearch-filenames-end):
      Call the minor-mode rather than add/remove-hook.
      (dired-isearch-filter-filenames):
      Remove isearch-message-prefix property.
      * lisp/info.el (Info--search-loop): New function, extracted from Info-search.
      Funcall isearch-filter-predicate instead of
      run-hook-with-args-until-failure isearch-filter-predicates.
      (Info-search): Use it.
      (Info-mode): Use isearch-filter-predicate instead of
      isearch-filter-predicates.
      * src/lisp.mk (lisp): Add nadvice.elc.
      * lib-src/makefile.w32-in (lisp2): Add nadvice.elc.
      
      Fixes: debbugs:14714
      dc6c0eda
    • Eli Zaretskii's avatar
      Fix bugs in update-game-score, on MS-Windows and elsewhere. · 98a428c1
      Eli Zaretskii authored
       lib-src/update-game-score.c (read_score): Try reading a character before
       probing the stream for EOF.  Initialize score->score to zero,
       before reading and accumulating the score.
       (read_scores): Fix logic that determines which value to return.
       Close the input stream when finished reading the scores (avoids
       failures in overwriting the file with a new one on MS-Windows,
       since a file that is open cannot be deleted).
       lib-src/ntlib.h (rename): Don't undefine.
       lib-src/ntlib.c (sys_rename): New function, needed for
       update-game-score.
      98a428c1
    • Juanma Barranquero's avatar
      5c0e57fe
    • Glenn Morris's avatar
    • Dmitry Antipov's avatar
      Do not call to `selected-window' where it is assumed by default. · 290d5b58
      Dmitry Antipov authored
      Affected functions are `window-minibuffer-p', `window-dedicated-p',
      `window-hscroll', `window-width', `window-height', `window-buffer',
      `window-frame', `window-start', `window-point', `next-window'
      and `window-display-table'.
      * abbrev.el (abbrev--default-expand):
      * bs.el (bs--show-with-configuration):
      * buff-menu.el (Buffer-menu-mouse-select):
      * calc/calc.el (calc):
      * calendar/calendar.el (calendar-generate-window):
      * calendar/diary-lib.el (diary-simple-display, diary-show-all-entries)
      (diary-make-entry):
      * comint.el (send-invisible, comint-dynamic-complete-filename)
      (comint-dynamic-simple-complete, comint-dynamic-list-completions):
      * completion.el (complete):
      * dabbrev.el (dabbrev-expand, dabbrev--make-friend-buffer-list):
      * disp-table.el (describe-current-display-table):
      * doc-view.el (doc-view-insert-image):
      * ebuff-menu.el (Electric-buffer-menu-mouse-select):
      * ehelp.el (with-electric-help):
      * emacs-lisp/easy-mmode.el (easy-mmode-define-navigation):
      * emacs-lisp/edebug.el (edebug-two-window-p, edebug-pop-to-buffer):
      * emacs-lisp/helper.el (Helper-help-scroller):
      * emulation/cua-base.el (cua--post-command-handler-1):
      * eshell/esh-mode.el (eshell-output-filter):
      * ffap.el (ffap-gnus-wrapper):
      * help-macro.el (make-help-screen):
      * hilit-chg.el (highlight-compare-buffers):
      * hippie-exp.el (hippie-expand, try-expand-dabbrev-visible):
      * hl-line.el (global-hl-line-highlight):
      * icomplete.el (icomplete-simple-completing-p):
      * isearch.el (isearch-done):
      * jit-lock.el (jit-lock-stealth-fontify):
      * mail/rmailsum.el (rmail-summary-scroll-msg-up):
      * lisp/mouse-drag.el (mouse-drag-should-do-col-scrolling):
      * mpc.el (mpc-tagbrowser, mpc):
      * net/rcirc.el (rcirc-any-buffer):
      * play/gomoku.el (gomoku-max-width, gomoku-max-height):
      * play/landmark.el (landmark-max-width, landmark-max-height):
      * play/zone.el (zone):
      * progmodes/compile.el (compilation-goto-locus):
      * progmodes/ebrowse.el (ebrowse-view/find-file-and-search-pattern):
      * progmodes/etags.el (find-tag-other-window):
      * progmodes/fortran.el (fortran-column-ruler):
      * progmodes/gdb-mi.el (gdb-mouse-toggle-breakpoint-fringe):
      * progmodes/verilog-mode.el (verilog-point-text):
      * reposition.el (reposition-window):
      * rot13.el (toggle-rot13-mode):
      * server.el (server-switch-buffer):
      * shell.el (shell-dynamic-complete-command)
      (shell-dynamic-complete-environment-variable):
      * simple.el (insert-buffer, set-selective-display)
      (delete-completion-window):
      * speedbar.el (speedbar-timer-fn, speedbar-center-buffer-smartly)
      (speedbar-recenter):
      * startup.el (fancy-splash-head):
      * textmodes/ispell.el (ispell-command-loop):
      * textmodes/makeinfo.el (makeinfo-compilation-sentinel-region):
      * tutorial.el (help-with-tutorial):
      * vc/add-log.el (add-change-log-entry):
      * vc/compare-w.el (compare-windows):
      * vc/ediff-help.el (ediff-indent-help-message):
      * vc/ediff-util.el (ediff-setup-control-buffer, ediff-position-region):
      * vc/ediff-wind.el (ediff-skip-unsuitable-frames)
      (ediff-setup-control-frame):
      * vc/emerge.el (emerge-position-region):
      * vc/pcvs-util.el (cvs-bury-buffer):
      * window.el (walk-windows, mouse-autoselect-window-select):
      * winner.el (winner-set-conf, winner-undo): Related users changed.
      290d5b58
    • Dave Abrahams's avatar
      gnus-int.el (gnus-warp-to-article): Allow warping in all groups so that we can... · b27a1bd5
      Dave Abrahams authored
      gnus-int.el (gnus-warp-to-article): Allow warping in all groups so that we can create nndoc groups that excerpt other groups
      b27a1bd5
    • Xue Fuqiao's avatar
      57fedd9f
    • Juanma Barranquero's avatar
      lisp/frameset.el: New frame-id functions. · 38276e01
      Juanma Barranquero authored
      (frameset--set-id): Doc fix.
      (frameset-frame-id, frameset-frame-id-equal-p)
      (frameset-locate-frame-id): New functions.
      (frameset--process-minibuffer-frames, frameset--reuse-frame)
      (frameset-restore): Use them.
      38276e01
    • Xue Fuqiao's avatar
    • Dmitry Antipov's avatar
      Do not call to `selected-frame' where it is assumed by default. · 12b4c0ea
      Dmitry Antipov authored
      Affected functions are `raise-frame', `redraw-frame',
      `frame-first-window', `frame-terminal' and `delete-frame'.
      * lisp/calendar/appt.el (appt-disp-window):
      * lisp/epg.el (epg-wait-for-completion):
      * lisp/follow.el (follow-delete-other-windows-and-split)
      (follow-avoid-tail-recenter):
      * lisp/international/mule.el (set-terminal-coding-system):
      * lisp/mail/rmail.el (rmail-mail-return):
      * lisp/net/newst-plainview.el (newsticker--buffer-set-uptodate):
      * lisp/progmodes/f90.el (f90-add-imenu-menu):
      * lisp/progmodes/idlw-toolbar.el (idlwave-toolbar-toggle):
      * lisp/server.el (server-switch-buffer):
      * lisp/simple.el (delete-completion-window):
      * lisp/talk.el (talk):
      * lisp/term/xterm.el (terminal-init-xterm-modify-other-keys)
      (xterm-turn-on-modify-other-keys, xterm-remove-modify-other-keys):
      * lisp/vc/ediff-util.el (ediff-status-info, ediff-show-diff-output):
      * lisp/vc/ediff.el (ediff-documentation): Related users changed.
      * lisp/frame.el (selected-terminal): Remove the leftover.
      12b4c0ea
    • Glenn Morris's avatar
      Auto-commit of generated files. · e412eb97
      Glenn Morris authored
      e412eb97
    • Glenn Morris's avatar
      * calendar/calendar.el (calendar-generate-month, calendar-font-lock-keywords): · 09e6d547
      Glenn Morris authored
      Fix for calendar-day-header-width > length of any day name.
      09e6d547
    • Glenn Morris's avatar
      * lisp/calendar/calendar.el (calendar-generate-month): · 17f25e76
      Glenn Morris authored
      Fix for calendar-column-width != 1 + calendar-day-digit-width.
      17f25e76
    • Juanma Barranquero's avatar
      * lisp/frameset.el: Miscellaneous cleanups. · 063233c3
      Juanma Barranquero authored
        (frameset): Add docstring.  Move :version property to its
        own `version' slot.
        (frameset-copy): Rename from copy-frameset.
        (frameset-p): Check more thoroughly.
        (frameset-prop): Do not check for :version, which is no longer a prop.
        (frameset-live-filter-alist, frameset-persistent-filter-alist):
        Use new :never value instead of t.
        (frameset-filter-alist): Expand and clarify docstring.
        (frameset-filter-tty-to-GUI, frameset-filter-sanitize-color)
        (frameset-filter-minibuffer, frameset-filter-save-param)
        (frameset-filter-restore-param, frameset-filter-iconified):
        Add pointer to docstring of frameset-filter-alist.
        (frameset-filter-params): Rename filter values to be more meaningful:
        :never instead of t, and reverse the meanings of :save and :restore.
        (frameset--process-minibuffer-frames): Clarify error message.
        (frameset-save): Avoid unnecessary and confusing call to framep.
        Use new BOA constructor for framesets.
        (frameset--reuse-list): Doc fix.
        (frameset--restore-frame): Rename from frameset--get-frame.  Doc fix.
        (frameset--minibufferless-last-p): Rename from frameset--sort-states.
        (frameset-minibufferless-first-p): Doc fix.
        Rename from frameset-sort-frames-for-deletion.
        (frameset-restore): Doc fixes.  Use new function names.
        Most changes suggested by Drew Adams <drew.adams@oracle.com>.
      
      * lisp/desktop.el (desktop-clear): Use new name of sort predicate.
      063233c3
    • Dmitry Antipov's avatar
      New macro to iterate over live buffers similar to frames. · 8f3a2c26
      Dmitry Antipov authored
      * buffer.h (FOR_EACH_LIVE_BUFFER): New macro.
      (Vbuffer_alist, Qpriority, Qbefore_string, Qafter_string):
      Declare buffer-related variables here to offload lisp.h.
      * buffer.c (Vbuffer_alist): Adjust comment.
      (Fget_file_buffer, get_truename_buffer, Fother_buffer)
      (other_buffer_safely):
      * data.c (store_symval_forwarding):
      * dispnew.c (Fframe_or_buffer_changed_p):
      * fileio.c (Fdo_auto_save):
      * filelock.c (unlock_all_files):
      * minibuf.c (read_minibuf): Use FOR_EACH_LIVE_BUFFER.
      8f3a2c26
    • Glenn Morris's avatar
      Extract truncate-string-to-width tests to a separate file · 3e2cd454
      Glenn Morris authored
      * test/automated/mule-util.el: New file, with tests extracted from
      lisp/international/mule-util.el.
      Copyright years based on when the original test-suite comment was
      added to lisp/international/mule-util.el (in 2002).
      
      * lisp/international/mule-util.el: Extract comment test-suite out to
      separate file.
      3e2cd454
  3. 04 Aug, 2013 13 commits
    • Juanma Barranquero's avatar
      * lisp/frameset.el: Add new predicate values for frameset-restore args. · d5671a82
      Juanma Barranquero authored
        (frameset-live-filter-alist, frameset-persistent-filter-alist):
        New variables.
        (frameset-filter-alist): Use them.  Add autoload cookie.
        (frameset-filter-tty-to-GUI): Move from desktop.el and rename.
        (frameset--set-id, frameset--reuse-frame): Rename `frame-id' to
        `frameset--id' (it's supposed to be internal to frameset.el).
        (frameset--process-minibuffer-frames): Ditto.  Doc fix.
        (frameset--initial-params): New function.
        (frameset--get-frame): Use it.  Doc fix.
        (frameset--move-onscreen): Accept new PRED value for FORCE-ONSCREEN.
        Accept :all, not 'all.
        (frameset-restore): Add new predicate values for FORCE-ONSCREEN and
        FORCE-DISPLAY.  Use :keywords for constant arguments to avoid collision
        with fbound symbols.  Fix frame id matching, and remove matching ids if
        the frame being restored is deleted.  Obey :delete.
      
      * lisp/desktop.el (desktop-restore-forces-onscreen)
        (desktop-restore-reuses-frames): Document :keyword constant values.
        (desktop-filter-parameters-alist): Remove, now identical to
        frameset-filter-alist.
        (desktop--filter-tty*): Remove, moved to frameset.el.
        (desktop-save-frameset, desktop-restore-frameset):
        Do not pass :filters argument.
      d5671a82
    • Stephen Berman's avatar
      Add Todo mode user manual. · 016d3f7d
      Stephen Berman authored
      * doc/misc/Makefile.in (INFO_TARGETS, DVI_TARGETS, PDF_TARGETS): Add todo-mode.
      (todo-mode, $(buildinfodir)/todo-mode$(INFO_EXT)):
      (todo-mode.dvi, todo-mode.pdf): New rules.
      
      * doc/misc/todo-mode.texi: New file.
      
      * info/dir: Add todo-mode.
      016d3f7d
    • Stefan Monnier's avatar
      * lisp/subr.el (macrop): New function. · 671d5c16
      Stefan Monnier authored
      (text-clone--maintaining): New var.
      (text-clone--maintain): Rename from text-clone-maintain.  Use it
      instead of inhibit-modification-hooks.
      
      * lisp/emacs-lisp/nadvice.el (advice--normalize): For aliases to macros, use
      a proxy, so as handle autoloads and redefinitions of the target.
      (advice--defalias-fset, advice-remove): Use advice--symbol-function.
      
      * lisp/emacs-lisp/pcase.el (pcase-mutually-exclusive-predicates):
      Remove bogus (arrayp . stringp) pair.  Add entries for `vectorp'.
      (pcase--mutually-exclusive-p): New function.
      (pcase--split-consp): Use it.
      (pcase--split-pred): Use it.  Optimize the case where `pat' is a qpat
      mutually exclusive with the current predicate.
      
      * test/automated/advice-tests.el (advice-tests-nadvice): Test removal
      before definition.
      (advice-tests-macroaliases): New test.
      
      * lisp/emacs-lisp/edebug.el (edebug-lookup-function): Remove function.
      (edebug-macrop): Remove.  Use `macrop' instead.
      * lisp/emacs-lisp/advice.el (ad-subr-p): Remove.  Use `subrp' instead.
      (ad-macro-p):
      * lisp/eshell/esh-cmd.el (eshell-macrop):
      * lisp/apropos.el (apropos-macrop): Remove.  Use `macrop' instead.
      671d5c16
    • Eli Zaretskii's avatar
      MS-Windows followup to last commit. · e443729d
      Eli Zaretskii authored
       lib-src/ntlib.h: Include fcntl.h.
       (mkostemp): Declare prototype.
       (mktemp): Don't redefine.
       lib-src/ntlib.c (mkostemp): New function.
      
      Fixes: debbugs:15015
      e443729d
    • Paul Eggert's avatar
      Fix some minor races in hosts lacking mkostemp. · e0fdb694
      Paul Eggert authored
      Gnulib's emulation of mkostemp doesn't have races that Emacs's does.
      * configure.ac (mkostemp): Remove check for this function;
      gnulib does the check now.
      (mkstemp): Remove check for this no-longer-used function.
      * lib/mkostemp.c, lib/secure_getenv.c, lib/tempname.c, lib/tempname.h:
      * m4/mkostemp.m4, m4/secure_getenv.m4, m4/tempname.m4:
      New files, copied from Gnulib.
      * lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
      * admin/merge-gnulib (GNULIB_MODULES): Add mkostemp.
      * lib-src/movemail.c (main):
      * lib-src/update-game-score.c (write_scores):
      Use mkostemp (which now works on all platforms, due to changes
      in the portability layer) rather than mktemp (which has a race)
      or mkstemp (which we no longer bother with).
      * src/callproc.c (create_temp_file):
      * src/filelock.c (create_lock_file):
      Assume mkostemp, since it's now provided by Gnulib.
      
      Fixes: debbugs:15015
      e0fdb694
    • Eli Zaretskii's avatar
      Minor fix of the last commit. · 484ab239
      Eli Zaretskii authored
      484ab239
    • Eli Zaretskii's avatar
      Implement mkostemp for MS-Windows. · 63f5c6c2
      Eli Zaretskii authored
       nt/mingw-cfg.site (ac_cv_func_mkostemp): New var with value of "yes".
       nt/inc/ms-w32.h (mkostemp): Declare prototype.
       nt/config.nt (HAVE_MKOSTEMP): Define to 1.
      
       src/w32.c (mkostemp): New function.
       (mktemp): Remove, no longer used.  Most of the code reused in mkostemp.
      
      Fixes: debbugs:15015
      63f5c6c2
    • Stefan Monnier's avatar
      * lisp/emacs-lisp/nadvice.el (advice-function-mapc): Rename from advice-mapc. · 1d44e9dc
      Stefan Monnier authored
      (advice-mapc): New function, using it.
      (advice-function-member-p): New function.
      (advice--normalize): Store the cdr in advice--saved-rewrite since
      that's the part that will be changed.
      (advice--symbol-function): New function.
      (advice-remove): Handle removal before the function is defined.
      Adjust to new advice--saved-rewrite.
      (advice-member-p): Use advice-function-member-p and
      advice--symbol-function.
      1d44e9dc
    • Glenn Morris's avatar
    • Glenn Morris's avatar
      * test/automated/icalendar-tests.el (icalendar-tests--test-export) · f8654242
      Glenn Morris authored
      (icalendar-tests--test-import): Remove debug messages.
      f8654242
    • Dmitry Antipov's avatar
      * dispnew.c (glyph_matrix_count, glyph_pool_count): · f0b79313
      Dmitry Antipov authored
      Move under GLYPH_DEBUG and ENABLE_CHECKING.
      (new_glyph_matrix, free_glyph_matrix, new_glyph_pool)
      (free_glyph_pool, check_glyph_memory): Likewise for
      all users.  Adjust comments where appropriate.
      f0b79313
    • Xue Fuqiao's avatar
      Merge: cleanup for vc-ignore. · 00f98a9d
      Xue Fuqiao authored
      00f98a9d
    • Xue Fuqiao's avatar
      Merge from mainline. · 99191b89
      Xue Fuqiao authored
      99191b89