* lisp/files.el (save-buffer): Pass interactive flag to `basic-save-buffer`
(basic-save-buffer): Accept called-interactively as an argument instead of
directly invoking called-interactively-p, which will always yield nil
in that context.
Alan Mackenzie [Tue, 21 Apr 2015 14:02:10 +0000 (14:02 +0000)]
CC Mode: Do nothing in before/after-change-functions for text property changes
Fixes bug#20266.
lisp/progmodes/cc-mode.el (c-basic-common-init): Make
yank-handled-properties buffer local, and remove 'category from it.
(c-called-from-text-property-change-p): New function.
(c-before-change): Don't do anything if a call of the new function
returns non-nil.
(c-after-change): Don't do much if a call of the new function returns
non-nil.
(c-extend-after-change-region): Put changes to text property 'fontified
inside c-save-buffer-state.
* lisp/eshell/esh-mode.el (eshell/clear-scrollback): New function.
(eshell/clear): Add an optional SCROLLBACK argument. If non-nil,
scrollback contents are cleared.
Steve Purcell [Sun, 19 Apr 2015 16:47:02 +0000 (17:47 +0100)]
Assume package archive-contents are UTF8-encoded
* lisp/emacs-lisp/package.el (package--read-archive-file):
Set `coding-system-for-read' explicitly to 'utf-8 when reading the
downloaded and cached archive-contents files, so that non-ASCII
characters in package descriptions are displayed correctly in the
`list-packages' menu. (Bug#20231)
Co-authored-by: Steve Purcell <steve@sanityinc.com>
Paul Eggert [Sun, 19 Apr 2015 15:53:35 +0000 (08:53 -0700)]
Refactor low-level printing for simplicity
* src/print.c (PRINTDECLARE): Remove. Move its contents into
PRINTPREPARE; doable now that we assume C99. All callers changed.
(PRINTCHAR): Remove, as it adds more mystery than clarity.
All callers changed.
(strout): Assume that caller computes length. All callers changed.
(print_c_string): New function.
(write_string, write_string_1): Compute length instead of asking
the caller to compute it. All callers changed.
(write_string): Simplify by using write_string_1.
(write_string_1): Simplify by using print_c_string.
(Fterpri): Compute default val more clearly.
(Fprin1_to_string, print_object):
Assume C99 to avoid unnecessary nesting.
(print_object): Prefer print_c_string to multiple printchar, or
to calling strout with -1 length. Coalesce into sprintf when
this is easy.
Fixes: debbugs:20256
* lisp/textmodes/css-mode.el (css-fill-paragraph): Support multi-line
comment filling.
(css-adaptive-fill): New function.
(css-mode): Set `adaptive-fill-function'.
(scss-mode): Set `comment-continue'.
* lisp/leim/quail/cyrillic.el (bulgarian-phonetic, bulgarian-bds):
Replace U+042C with U+045D, as the former character is not used in
the modern Bulgarian language.
Wolfgang Jenkner [Fri, 17 Apr 2015 17:54:35 +0000 (19:54 +0200)]
Fix fontification of keywords clobbered by the prompt.
* lisp/comint.el (comint-output-filter): Remove the uses of
with-silent-modifications I introduced as part of the last change.
This fixes, e.g., erratically missing highlighting when running
./configure --help; ./configure in a shell-mode buffer with
compilation-shell-minor-mode turned on.
Paul Eggert [Thu, 16 Apr 2015 06:45:08 +0000 (23:45 -0700)]
'[:graph:]' now excludes whitespace, not just ' '
* doc/lispref/searching.texi (Char Classes):
* lisp/emacs-lisp/rx.el (rx): Document [:graph:] to be [:print:]
sans whitespace (not sans space).
* src/character.c (graphicp): Exclude all Unicode whitespace chars,
not just space.
* src/regex.c (ISGRAPH): Exclude U+00A0 (NO-BREAK SPACE).
Stefan Monnier [Thu, 16 Apr 2015 02:25:16 +0000 (22:25 -0400)]
(looking-back): Make the second arg non-optional.
* lisp/subr.el (substitute-key-definition-key, special-form-p)
(macrop): Drop deprecated second arg to indirect-function.
(looking-back): Make the second arg non-optional.
Paul Eggert [Thu, 16 Apr 2015 01:30:01 +0000 (18:30 -0700)]
Port jpeg configuration to Solaris 10 with Sun C
* configure.ac: Check for jpeglib 6b by trying to link it, instead
of relying on cpp magic that has problems in practice. Check for
both jpeglib.h and jerror.h features. Remove special case for
mingw32, which should no longer be needed (and if it were needed,
should now be addressable by hotwiring emacs_cv_jpeglib). Fixes: bug#20332
Stefan Monnier [Wed, 15 Apr 2015 20:50:17 +0000 (16:50 -0400)]
Move some Elisp-specific code from lisp-mode.el to elisp-mode.el
* lisp/emacs-lisp/lisp-mode.el (lisp--el-font-lock-flush-elisp-buffers):
Move to elisp-mode.el.
(lisp-mode-variables): (Re)move elisp-specific settings.
* lisp/progmodes/elisp-mode.el (emacs-lisp-mode): Add settings removed
from lisp-mode-variables.
(elisp--font-lock-flush-elisp-buffers): New function, moved from
lisp-mode.el.
Paul Eggert [Wed, 15 Apr 2015 17:57:50 +0000 (10:57 -0700)]
Standardize names of ChangeLog history files
Suggested by Glenn Morris in:
http://lists.gnu.org/archive/html/emacs-devel/2015-04/msg00678.html
* Makefile.in (install-man): Don't treat ChangeLog.1 as a man page.
* doc/man/ChangeLog.1: Rename back from doc/man/ChangeLog.01.
* lisp/erc/ChangeLog.1: New file, containing the old contents of ...
* lisp/erc/ChangeLog.01, lisp/erc/ChangeLog.02, lisp/erc/ChangeLog.03:
* lisp/erc/ChangeLog.04, lisp/erc/ChangeLog.05, lisp/erc/ChangeLog.06:
* lisp/erc/ChangeLog.07, lisp/erc/ChangeLog.08, lisp/erc/ChangeLog.09:
Remove.
Paul Eggert [Wed, 15 Apr 2015 17:57:50 +0000 (10:57 -0700)]
Split top-level entries into pre- and post-April 7
This more clearly distingiushes pre-April-7 ChangeLog entries (which
are for top-level files only) from post-April-7 entries (which are
about files at all levels. Problem reported by Glenn Morris in:
http://lists.gnu.org/archive/html/emacs-devel/2015-04/msg00678.html
* ChangeLog.1: Move post-April-7 entries from here ...
* ChangeLog.2: ... to this new file.
* Makefile.in (CHANGELOG_HISTORY_INDEX_MAX): Bump to 2.
Stefan Monnier [Wed, 15 Apr 2015 17:02:15 +0000 (13:02 -0400)]
Fix recent cus-start changes that added customize-rogues
* lisp/cus-start.el (custom-delayed-init-variables): Initialize the
vars early.
* lisp/loadup.el ("cus-start"): Move to the end to reduce customize-rogue.
Paul Eggert [Wed, 15 Apr 2015 07:26:32 +0000 (00:26 -0700)]
Make [:graph:] act like [:print:] sans space
In POSIX [[:print:]] is equivalent to [ [:graph:]], so change
[:graph:] so that it matches everything that [:print:] does,
except for space.
* doc/lispref/searching.texi (Char Classes):
* etc/NEWS:
* lisp/emacs-lisp/rx.el (rx):
Document [:graph:] to be [:print:] sans ' '.
* src/character.c, src/character.h (graphicp): New function.
* src/regex.c (ISGRAPH) [emacs]: Use it.
(BIT_GRAPH): New macro.
(BIT_PRINT): Increase to 0x200, to make room for BIT_GRAPH.
(re_wctype_to_bit) [! WIDE_CHAR_SUPPORT]:
Return BIT_GRAPH for RECC_GRAPH.
(re_match_2_internal) [emacs]: Use ISGRAPH if BIT_GRAPH,
and ISPRINT if BIT_PRINT.
Eli Zaretskii [Tue, 14 Apr 2015 18:57:23 +0000 (21:57 +0300)]
Improve the commit-msg Git hook for unibyte environments
* build-aux/git-hooks/commit-msg: Set LC_ALL=C, before running Awk
in unibyte environments. (Suggested by Paul Eggert
<eggert@cs.ucla.edu>.) Use a more accurate approximation to
[:print:], based on UTF-8 sequences of the unprintable characters.
Eli Zaretskii [Tue, 14 Apr 2015 15:37:07 +0000 (18:37 +0300)]
Assign correct general-category and names to surrogates
* admin/unidata/unidata-gen.el (unidata-setup-list): Don't ignore
surrogates. This avoids assigning them the default
general-category of 'Cn', i.e. unassigned codepoints.
(unidata-get-name): Give surrogates synthetic names.
Paul Eggert [Tue, 14 Apr 2015 06:26:13 +0000 (23:26 -0700)]
Avoid some int overflows in window.c
* src/print.c (print_object):
* src/window.c (sequence_number):
* src/window.h (struct window.sequence_number):
Don't assume window sequence number fits in int.
* src/window.c (window_select_count):
* src/window.h (struct window.use_time, window_select_count):
Don't assume window use time fits in int.
* src/window.c (Fsplit_window_internal):
Don't assume user-supplied integer, or sum, fits in int.
(Fset_window_configuration, count_windows, get_leaf_windows)
(save_window_save, Fcurrent_window_configuration):
Use ptrdiff_t for object counts.
(Fset_window_configuration): Omit unused local 'n'.
(count_windows): Simplify by writing in terms of get_leaf_windows.
(get_leaf_windows): Don't store through FLAT if it's null.
(extract_dimension): New static function.
(set_window_margins, set_window_fringes, set_window_scroll_bars):
Use it to avoid undefined behavior when converting user-supplied
integer to 'int'.
Stefan Monnier [Mon, 13 Apr 2015 22:21:00 +0000 (18:21 -0400)]
* lisp/loadup.el ("cus-start"): Load it after loaddefs.el
Fixes: debbugs:20321
* lisp/cus-start.el (read-buffer-function): Don't advertize
iswitchb-read-buffer any more.
(iswitchb): Don't tweak this obsolete group any more.