216c6aa * net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band): Use `tramp-rsh-end-of-line', it ought to be more robust. 20cfd24 Improve indexing on the chapter/section/subsection levels. 14c3739 * lisp/progmodes/js.el (js-syntax-propertize): "return" can't be divided. ea78112 * net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band): Use "\n" as end-of-line delimeter for passwords, when running on MS Windows. 012479a * lisp/progmodes/sh-script.el: Don't set global indent-line-function 75e114f Fix line numbers on Python shell. d0fd23c doc/emacs/buffers.texi (Kill Buffer): Improve indexing. 8e818d1 Keep maximized when going fullscreen. 749813e python.el: Fix electric colon behavior 936d5e5 Fix last patch. 74d3b20 Fixes: debbugs:18623
Dmitry Gutov [Sat, 27 Dec 2014 14:06:37 +0000 (16:06 +0200)]
elisp-xref-find: Don't create buffers eagerly
* lisp/emacs-lisp/find-func.el (find-function-library): New function,
extracted from `find-function-noselect'.
* lisp/progmodes/elisp-mode.el (elisp--identifier-location): Fold back
into `elisp--company-location'.
(elisp--identifier-completion-table): Rename to
`elisp--identifier-completion-table', and do not include just any
symbols with a property list.
(elisp-completion-at-point): Revert the 2014-12-25 change.
(elisp--xref-identifier-file): New function.
(elisp--xref-find-definitions): Use it.
* lisp/progmodes/xref.el (xref-elisp-location): New class.
(xref-make-elisp-location): New function.
(xref-location-marker): New implementation.
Juri Linkov [Sat, 27 Dec 2014 00:54:56 +0000 (02:54 +0200)]
Avoid duplicate calls of window-height in with-displayed-buffer-window
* lisp/minibuffer.el (minibuffer-completion-help):
Use shrink-window-if-larger-than-buffer in window-height
when temp-buffer-resize-mode is nil.
* lisp/window.el (with-displayed-buffer-window): Remove window-height
from the action alist in the temp-buffer-window-show call
when window-height is handled explicitly afterwards.
Juri Linkov [Sat, 27 Dec 2014 00:38:34 +0000 (02:38 +0200)]
Support subdirectories when saving places in dired.
* lisp/saveplace.el (toggle-save-place, save-place-to-alist)
(save-places-to-alist, save-place-dired-hook):
Use dired-current-directory instead of dired-directory.
(save-place-dired-hook): Add check for alist to make the new
format future-proof to allow other possible formats.
Dmitry Gutov [Fri, 26 Dec 2014 16:34:47 +0000 (18:34 +0200)]
Add basic xref apropos implementation to elisp-mode
* lisp/progmodes/elisp-mode.el (elisp--xref-find-definitions):
Filter out nil results.
(elisp--xref-find-apropos): New function.
(elisp-xref-find): Use it.
* lisp/progmodes/xref.el (xref--show-xrefs): Use `user-error'.
Eli Zaretskii [Fri, 26 Dec 2014 09:52:24 +0000 (11:52 +0200)]
MS-Windows followup to stpcpy changes.
src/w32proc.c (sys_spawnve, get_lcid_callback): Use strcpy instead
of strcat.
src/w32menu.c (add_menu_item): Use stpcpy instead of strcat.
src/w32.c (sys_readdir, stat_worker, symlink): Use strcpy instead of
strcat.
nt/gnulib.mk (stpcpy, string): Sync with the latest change in
lib/gnulib.mk.
Dmitry Gutov [Thu, 25 Dec 2014 20:08:19 +0000 (22:08 +0200)]
Consolidate cross-referencing commands
Move autoloaded bindings for `M-.', `M-,', `C-x 4 .' and
`C-x 5 .' from etags.el to xref.el.
* progmodes/xref.el: New file.
* progmodes/elisp-mode.el (elisp--identifier-types): New variable.
(elisp--identifier-location): New function, extracted from
`elisp--company-location'.
(elisp--company-location): Use it.
(elisp--identifier-completion-table): New variable.
(elisp-completion-at-point): Use it.
(emacs-lisp-mode): Set the local values of `xref-find-function'
and `xref-identifier-completion-table-function'.
(elisp-xref-find, elisp--xref-find-definitions)
(elisp--xref-identifier-completion-table): New functions.
* progmodes/etags.el (find-tag-marker-ring): Mark obsolete in
favor of `xref--marker-ring'.
(tags-lazy-completion-table): Autoload.
(tags-reset-tags-tables): Use `xref-clear-marker-stack'.
(find-tag-noselect): Use `xref-push-marker-stack'.
(pop-tag-mark): Make an alias for `xref-pop-marker-stack'.
(etags--xref-limit): New constant.
(etags-xref-find, etags--xref-find-definitions): New functions.
Martin Rudalics [Thu, 25 Dec 2014 13:13:26 +0000 (14:13 +0100)]
Make `resize-mini-windows' customizable and update documentation for it.
* cus-start.el (resize-mini-windows): Make it customizable.
* minibuf.texi (Minibuffer Windows): Add descriptions of
`resize-mini-windows' and `max-mini-window-height'.
Martin Rudalics [Wed, 24 Dec 2014 18:37:45 +0000 (19:37 +0100)]
Handle glitch in delayed autoselection of windows.
* window.el (mouse-autoselect-window-position-1): New variable.
(mouse-autoselect-window-cancel)
(mouse-autoselect-window-select, handle-select-window): With
delayed autoselection select window only if mouse moves after
selecting its frame.
Stephen Leake [Tue, 23 Dec 2014 19:11:45 +0000 (13:11 -0600)]
Move user-level information from CONTRIBUTE to doc/emacs/trouble.texi
Fixes bug#19299
* CONTRIBUTE: Move user-level information to doc/emacs/trouble.texi
(commit messages): new, gathered from comments on emacs-devel
(Changelog notes): add reference to GNU coding standards section 5.2;
doc 'present tense', bug fix format
(branches): freeze announcements are made on info-gnu-emacs mailing
list
(git vs rename): new
* doc/emacs/trouble.texi: Move user-level information from CONTRIBUTE here
* lisp/startup.el (fancy-about-text): change buttons for etc/CONTRIBUTE
to (info "(emacs)Contributing")
Eli Zaretskii [Tue, 23 Dec 2014 18:42:30 +0000 (20:42 +0200)]
Improve indexing on the chapter/section/subsection levels.
doc/lispref/windows.texi (Recombining Windows): Index subject of sections.
doc/lispref/variables.texi (Variables with Restricted Values)
(Generalized Variables): Index subject of sections.
doc/lispref/text.texi (Buffer Contents, Examining Properties)
(Changing Properties, Property Search, Substitution): Index
subject of sections.
doc/lispref/syntax.texi (Motion and Syntax, Parsing Expressions)
(Motion via Parsing, Position Parse, Control Parsing): Index
subject of sections.
doc/lispref/strings.texi (Predicates for Strings, Creating Strings)
(Modifying Strings, Text Comparison): Index subject of sections.
doc/lispref/searching.texi (Syntax of Regexps, Regexp Special)
(Regexp Functions, Regexp Functions): Index subject of sections.
doc/lispref/processes.texi (Subprocess Creation, Process Information): Index
subject of sections.
doc/lispref/positions.texi (Screen Lines): Index subject of sections.
doc/lispref/nonascii.texi (Scanning Charsets, Specifying Coding Systems):
Index subject of sections.
doc/lispref/minibuf.texi (Text from Minibuffer, Object from Minibuffer)
(Multiple Queries, Minibuffer Contents): Index subject of
sections.
doc/lispref/markers.texi (Predicates on Markers, Creating Markers)
(Information from Markers, Moving Markers): Index subject of
sections.
doc/lispref/macros.texi (Defining Macros, Problems with Macros): Index
subject of sections.
doc/lispref/loading.texi (Loading Non-ASCII, Where Defined): Index subject
of sections.
doc/lispref/lists.texi (List-related Predicates, List Variables, Setcar)
(Setcdr, Plist Access): Index subject of sections.
doc/lispref/keymaps.texi (Controlling Active Maps, Scanning Keymaps)
(Modifying Menus): Index subject of sections.
doc/lispref/help.texi (Accessing Documentation, Help Functions): Index
subject of sections.
doc/lispref/hash.texi (Hash Access): Index subject of sections.
doc/lispref/functions.texi (Core Advising Primitives)
(Advising Named Functions, Porting old advices): Index subject of
sections.
doc/lispref/frames.texi (Creating Frames, Initial Parameters)
(Position Parameters, Buffer Parameters, Minibuffers and Frames)
(Pop-Up Menus, Drag and Drop): Index subject of sections.
doc/lispref/files.texi (Visiting Functions, Kinds of Files)
(Unique File Names): Index subject of sections.
doc/lispref/display.texi (Refresh Screen, Echo Area Customization)
(Warning Variables, Warning Options, Delayed Warnings)
(Temporary Displays, Managing Overlays, Overlay Properties)
(Finding Overlays, Size of Displayed Text, Defining Faces)
(Attribute Functions, Displaying Faces, Face Remapping)
(Basic Faces, Font Lookup, Fontsets, Replacing Specs)
(Defining Images, Showing Images): Index subject of sections.
doc/lispref/debugging.texi (Debugging, Explicit Debug)
(Invoking the Debugger, Excess Open, Excess Close): Index subject
of sections.
doc/lispref/customize.texi (Defining New Types, Applying Customizations)
(Custom Themes): Index subject of sections.
doc/lispref/control.texi (Sequencing, Combining Conditions)
(Processing of Errors, Cleanups): Index subject of sections.
doc/lispref/compile.texi (Eval During Compile): Index subject of sections.
doc/lispref/commands.texi (Using Interactive, Distinguish Interactive)
(Command Loop Info, Classifying Events, Event Mod)
(Invoking the Input Method): Index subject of sections.
doc/lispref/buffers.texi (Buffer List, Buffer Gap): Index subject of sections.
doc/lispref/backups.texi (Making Backups, Numbered Backups, Backup Names)
(Reverting): Index subject of sections.
doc/lispref/abbrevs.texi (Abbrev Tables, Defining Abbrevs, Abbrev Files)
(Abbrev Expansion, Standard Abbrev Tables, Abbrev Properties)
(Abbrev Table Properties): Index subject of sections.
doc/lispref/os.texi (Time of Day, Time Conversion, Time Parsing)
(Time Calculations, Idle Timers): Index subject of sections.
Sam Steingold [Tue, 23 Dec 2014 16:44:45 +0000 (11:44 -0500)]
Use a new user option instead of hard-coding shell display.
* lisp/shell.el (shell-display-buffer-actions): New user option.
(shell): Pass it to `pop-to-buffer' instead of hard-coding
`pop-to-buffer-same-window'.
Stefan Monnier [Tue, 23 Dec 2014 16:17:55 +0000 (11:17 -0500)]
(js-syntax-propertize-regexp): Recognize "slash in a character class"
Fixes: debbugs:19397
* lisp/progmodes/js.el (js--syntax-propertize-regexp-syntax-table): New var.
(js-syntax-propertize-regexp): Use it to recognize "slash in
a character class".
Paul Eggert [Tue, 23 Dec 2014 02:42:50 +0000 (18:42 -0800)]
Merge from gnulib
2014-12-20 utimens: remove unnecessary assert
2014-12-16 stdalign: port better to HP compilers
2014-12-16 stdalign: work around Apple GCC 4.0 bug
* lib/stdalign.in.h, lib/utimens.c, m4/stdalign.m4: Update from gnulib.
Stefan Monnier [Mon, 22 Dec 2014 17:35:29 +0000 (12:35 -0500)]
* lisp/completion.el: Use post-self-insert-hook.
Fixes: debbugs:19400
(completion-separator-self-insert-command)
(completion-separator-self-insert-autofilling): Remove.
(completion-separator-chars): New var.
(completion-c-mode-hook, completion-setup-fortran-mode): Use it instead
of changing the keymap.
(completion--post-self-insert): New function.
(dynamic-completion-mode): Use it instead of rebinding keys.
(cmpl--completion-string): Rename from completion-string.
(add-completion-to-head, delete-completion): Let-bind it explicitly.
* lisp/progmodes/python.el (python-indent-post-self-insert-function):
Make colon to re-indent only for dedenters, handling
multiline-statements gracefully.
* test/automated/python-tests.el (python-indent-electric-colon-2)
(python-indent-electric-colon-3): New tests.
Paul Eggert [Sat, 20 Dec 2014 23:20:56 +0000 (15:20 -0800)]
Let charset tick grow past USHRT_MAX
* charset.c, charset.h (charset_ordered_list_tick):
Now EMACS_UINT, not unsigned short.
* fontset.c (reorder_font_vector): Allow the tick to grow to the
maximum representable Emacs integer value before wrapping it around.
Paul Eggert [Sat, 20 Dec 2014 21:11:40 +0000 (13:11 -0800)]
Simplify unexec file mode setting
* unexaix.c, unexcoff.c, unexelf.c, unexmacosx.c:
Don't include <sys/stat.h> when no longer needed.
(unexec): Create file with correct mode in the first place,
rather than overwriting the mode later and fiddling with the
global umask in the mean time. Avoid bogus usage like
'umask (777)', which should have been 'umask (0777)'.
(mark_x): Remove. All callers removed.
Andreas Schwab [Fri, 19 Dec 2014 10:47:51 +0000 (11:47 +0100)]
Fix content decoding in gnus-read-ephemeral-bug-group
* gnus-group.el (gnus-read-ephemeral-bug-group): Bind
coding-system-for-read and coding-system-for-write only around
with-temp-file, and make buffer unibyte. Don't write temp file twice.
Paul Eggert [Fri, 19 Dec 2014 02:12:01 +0000 (18:12 -0800)]
Minor cleanups for Lisp objects and symbols
* alloc.c (next_vector, set_next_vector):
* lisp.h (lisp_h_INTEGERP, make_number, XFASTINT, make_natnum):
(lisp_h_make_number) [USE_LSB_TAG]:
Use Lisp_Int0 instead of the mystery constant 0.
* alloc.c (mark_object): Always set and use po; that's simpler.
(CHECK_LIVE, CHECK_ALLOCATED_AND_LIVE):
Properly parenthesize definientia.
* bidi.c (bidi_initialize):
* buffer.c (init_buffer_once):
* nsfns.m (syms_of_nsfns):
* nsmenu.m (syms_of_nsmenu):
* nsselect.m (syms_of_nsselect):
Prefer DEFSYM to defining by hand.
* data.c: Fix too-long line.
* lisp.h (DECLARE_GDB_SYM): New macro.
(DEFINE_GDB_SYMBOL_BEGIN): Use it.
(DEFINE_GDB_SYMBOL_BEGIN, DEFINE_GDB_SYMBOL_END) [!MAIN_PROGRAM]:
Declare the symbol, so it's visible to everywhere lisp.h is included.
Move forward decls as far forward as they can go,
to allow future changes to use them.
Sam Steingold [Thu, 18 Dec 2014 21:41:34 +0000 (16:41 -0500)]
Keyboard interface (C-f10) to `mouse-buffer-menu' (C-down-mouse-1).
* lisp/mouse.el (mouse-buffer-menu-map): Extract from `mouse-buffer-menu'.
(mouse-buffer-menu): Use `mouse-buffer-menu-map'.
* lisp/menu-bar.el (menu-bar-buffer-vector): Extract from
`menu-bar-update-buffers'.
(menu-bar-update-buffers): Use `menu-bar-buffer-vector'.
(buffer-menu-open): New user command, bound globally to C-f10,
provides a keyboard interface to `mouse-buffer-menu' (C-down-mouse-1).
(mouse-buffer-menu-keymap): Use `menu-bar-buffer-vector' to
convert the value returned by `mouse-buffer-menu-map' to a list
acceptable to `popup-menu' for `buffer-menu-open'.
Stefan Monnier [Thu, 18 Dec 2014 18:19:54 +0000 (13:19 -0500)]
* lisp/gnus/gnus-art.el: Fix up compiler warnings.
(article-display-face, article-display-x-face): Remove unused `face'.
(gnus-article-browse-html-save-cid-content): Remove unused var `type'.
(article-date-ut): Remove unused var `first'.
(gnus-article-prepare): Remove unused var `gnus-article'.
(gnus-mime-save-part-and-strip): Remove unused var `param'.
(gnus-mime-inline-part): Remove unused vars `charset', `contents', and
`coding-system' along with corresponding dead code.
(gnus-mime-view-part-externally): Remove unused var
`mm-user-display-methods'.
(gnus-insert-mime-button): Let-bind gnus-tmp-id explicitly.
(gnus-display-mime): Remove unused var `handle'.
(gnus-mime-display-alternative): Remove unused var `props'.
(gnus-article-read-summary-keys): Remove unused var `up-to-top'.
(gnus-article-edit-done): Remove unused var `p'.
(gnus-url-mailto): Remove unused var `to'.
(gnus-treat-article): Let-bind gnus-treat-condition, part-number,
total-parts, and gnus-treat-type explicitly. Remove unused var `elem'.
* lisp/gnus/mm-util.el (mm-with-unibyte-current-buffer): Mark obsolete and
add warning.
Martin Rudalics [Thu, 18 Dec 2014 17:53:48 +0000 (18:53 +0100)]
Fix ispell window handling.
* textmodes/ispell.el (ispell-command-loop): Suppress horizontal
scroll bar on ispell's windows. Don't count window lines and
don't deal with dedicated windows.
(ispell-show-choices, ispell-help): Let `ispell-display-buffer'
do the window handling.
(ispell-adjusted-window-height, ispell-overlay-window): Remove.
(ispell-display-buffer): New function to reuse, create and fit
window to ispell's buffers. (Bug#3413)
Martin Rudalics [Thu, 18 Dec 2014 17:12:24 +0000 (18:12 +0100)]
Add code for "preserving" window sizes.
* frame.c (frame_windows_min_size): New argument IGNORE.
(adjust_frame_size): When called from change_frame_size call
frame_windows_min_size with IGNORE Qt so we can ignore size
restrictions.
* dired.el (dired-pop-to-buffer): Call fit-window-to-buffer with
`preserve-size' t.
(dired-mark-pop-up): Preserve size of window showing marked
files.
* electric.el (Electric-pop-up-window):
* help.el (resize-temp-buffer-window): Call fit-window-to-buffer
with `preserve-size' t.
* minibuffer.el (minibuffer-completion-help): Use
`resize-temp-buffer-window' instead of `fit-window-to-buffer'
(Bug#19355). Preserve size of completions window.
* register.el (register-preview): Preserve size of register
preview window.
* tmm.el (tmm-add-prompt): Call fit-window-to-buffer
with `preserve-size' t (Bug#1291).
* window.el (with-displayed-buffer-window): Add calls to
`window-preserve-size'.
(window-min-pixel-size, window--preservable-size)
(window-preserve-size, window-preserved-size)
(window--preserve-size, window--min-size-ignore-p): New
functions.
(window-min-size, window-min-delta, window--resizable)
(window--resize-this-window, split-window-below)
(split-window-right): Amend doc-string.
(adjust-window-trailing-edge): Handle preserving window
sizes. Signal user-error instead of an error when there's no
window above or below.
(window--min-size-1, window-sizable, window--size-fixed-1)
(window-size-fixed-p, window--min-delta-1)
(frame-windows-min-size, window--max-delta-1, window-resize)
(window--resize-child-windows, window--resize-siblings)
(enlarge-window, shrink-window, split-window): Handle preserving
window sizes.
(window--state-put-2): Handle horizontal scroll bars.
(window--display-buffer): Call `preserve-size' if asked for.
(display-buffer): Mention `preserve-size' alist member in
doc-string.
(fit-window-to-buffer): New argument PRESERVE-SIZE.
Eli Zaretskii [Thu, 18 Dec 2014 16:07:26 +0000 (18:07 +0200)]
Allow querying font by name for its height and other info. (Bug#19395)
src/font.c (Ffont_info): Add more font information to the vector
returned by the function, inspired by query-font. Doc fix.
doc/lispref/display.texi (Low-Level Font): Document font-info and query-font.
lisp/international/mule-diag.el (describe-font-internal): Display
additional info returned by font-info.
lisp/linum.el (linum--face-width): Rename from linum--face-height,
and use the new functionality of font-info.
(linum-update-window): Use linum--face-width and frame-char-width,
instead of approximating with height.