]> git.eshelyaron.com Git - emacs.git/log
emacs.git
9 years agoRemoved test with spurious failures.
Jorgen Schaefer [Tue, 20 Jan 2015 17:08:38 +0000 (18:08 +0100)]
Removed test with spurious failures.

* automated/package-test.el (package-test-install-prioritized):
Removed test due to unreproducable failures.

9 years agoFix double chars in NS port.
Jan Djärv [Tue, 20 Jan 2015 16:22:14 +0000 (17:22 +0100)]
Fix double chars in NS port.

Fixes: debbugs:19531
* nsterm.m (EV_TRAILER2): Set Vinhibit_quit to Qt.

9 years agoeldoc: modify `eldoc-documentation-function' using `add-function'
Michal Nazarewicz [Fri, 5 Dec 2014 18:34:42 +0000 (19:34 +0100)]
eldoc: modify `eldoc-documentation-function' using `add-function'

* lisp/emacs-lisp/eldoc.el (eldoc-documentation-function): Describe how
major modes should use `add-function' to alter value of the variable.

* lisp/hexl.el (hexl-mode): Set `eldoc-documentation-function' using
`add-function' so the default value is always used.
* lisp/ielm.el (inferior-emacs-lisp-mode): Set
`eldoc-documentation-function' using `add-function' so the default
value is always used.
* lisp/progmodes/cfengine.el (cfengine3-mode): Set
`eldoc-documentation-function' using `add-function' so the default
value is always used.
* lisp/progmodes/elisp-mode (emacs-lisp-mode): Set
`eldoc-documentation-function' using `add-function' so the default
value is always used.
* lisp/progmodes/octave.el (octave-mode): Set
`eldoc-documentation-function' using `add-function' so the default
value is always used.
* lisp/progmodes/python.el (python-mode): Set
`eldoc-documentation-function' using `add-function' so the default
value is always used.
* lisp/simple.el (read--expression): Set `eldoc-documentation-function'
using `add-function' so the default value is always used.

9 years agodescr-text: add `describe-char-eldoc' describing character at point
Michal Nazarewicz [Wed, 3 Dec 2014 18:49:42 +0000 (19:49 +0100)]
descr-text: add `describe-char-eldoc' describing character at point

* lisp/descr-text.el (describe-char-eldoc): New function returning
basic Unicode codepoint information (e.g. name) about character
at point.  It is meant to be used as a default value of the
`eldoc-documentation-function' variable.
(describe-char-eldoc--format, describe-char-eldoc--truncate):
New helper functions for `describe-char-eldoc' function.

* tests/automated/descr-text-test.el: New file with tests for
`describe-char-eldoc--truncate', `describe-char-eldoc--format',
and `describe-char-eldoc'.

9 years agoparagraphs: recognise more Unicode characters as end of sentence
Michal Nazarewicz [Mon, 27 Oct 2014 16:14:38 +0000 (17:14 +0100)]
paragraphs: recognise more Unicode characters as end of sentence

* lisp/textmodes/paragraphs.el (sentence-end-base): Include an
ellipsis (…) and interrobang (‽) characters as end of a sentence,
and a closing single quote (’) as an end of a quote.

9 years agodoh, fixing year in ChangeLog entries introduced by last two commits
Michal Nazarewicz [Tue, 20 Jan 2015 13:03:45 +0000 (14:03 +0100)]
doh, fixing year in ChangeLog entries introduced by last two commits

9 years agotildify: add `tildify-double-space-undos'
Michal Nazarewicz [Sat, 22 Nov 2014 22:28:43 +0000 (23:28 +0100)]
tildify: add `tildify-double-space-undos'

* lisp/textmodes/tildify.el (tildify-double-space-undos): A new
variable specifying whether pressing space in `tildify-mode' after
a space has been replaced with hard space undos the substitution.
(tildify-space): Add code branch for handling `tildify-doule-space'.

* tests/automated/tildify-tests.el (tildify-space-undo-test--test):
A new helper function for testing `tildify-double-space-undos'
behaviour in the `tildify-space' function.
(tildify-space-undo-test-html, tildify-space-undo-test-html-nbsp)
(tildify-space-undo-test-xml, tildify-space-undo-test-tex): New
tests for `tildify-doule-space-undos' behaviour.

9 years agotildify: add `tildify-space' and `tildify-mode'
Michal Nazarewicz [Wed, 15 Oct 2014 08:01:26 +0000 (10:01 +0200)]
tildify: add `tildify-space' and `tildify-mode'

* lisp/textmodes/tildify.el (tildify-space): A new function
which can be used as a `post-self-insert-hook' to automatically
convert spaces into hard spaces.
(tildify-space-pattern): A new variable specifying pattern where
`tildify-space' should take effect.
(tildify-space-predicates): A new variable specifying list of
predicate functions that all must return non-nil for
`tildify-space' to take effect.
(tildify-space-region-predicate): A new functions meant to be
used as a predicate in `tildify-space-predicates' list.
(tildify-mode): A new minor mode enabling `tildify-space' as a
`post-self-insert-hook'

* tests/automated/tildify-tests.el (tildify-space-test--test):
A new helper function for testing `tildify-space' function.
(tildify-space-test-html, tildify-space-test-html-nbsp)
(tildify-space-test-xml, tildify-space-test-tex): New tests for
`tildify-space' function.

9 years agoPrefer xlispstrdup to avoid dumb calls to strlen
Dmitry Antipov [Tue, 20 Jan 2015 10:24:09 +0000 (13:24 +0300)]
Prefer xlispstrdup to avoid dumb calls to strlen

* nsfont.m (ns_get_family):
* nsterm.m (ns_term_init):
* w32fns.c (w32_window):
* xfns.c (x_window, Fx_select_font): Use xlispstrdup.

9 years ago* dispnew.c: Remove no-longer-valid comment.
Paul Eggert [Tue, 20 Jan 2015 08:51:06 +0000 (00:51 -0800)]
* dispnew.c: Remove no-longer-valid comment.

9 years agoMake vc-dir default to repository root
Daniel Colascione [Tue, 20 Jan 2015 05:44:30 +0000 (21:44 -0800)]
Make vc-dir default to repository root

* lisp/vc/vc-dir.el (vc-dir): Default to repository root, not
default-directory.

9 years agoCorrect an old fix for GTK font selection
Paul Eggert [Tue, 20 Jan 2015 04:42:40 +0000 (20:42 -0800)]
Correct an old fix for GTK font selection

* gtkutil.c (xg_get_font): Fix off-by-2 typo.
Fixes: bug#3228
9 years agoFix minor bugs with printing null bytes
Paul Eggert [Tue, 20 Jan 2015 04:28:51 +0000 (20:28 -0800)]
Fix minor bugs with printing null bytes

* minibuf.c (read_minibuf_noninteractive):
* xdisp.c (Ftrace_to_stderr) [GLYPH_DEBUG]:
Work even if the Lisp string contains a null byte.

9 years agoExpand xref help-echo string
Dmitry Gutov [Tue, 20 Jan 2015 02:52:48 +0000 (04:52 +0200)]
Expand xref help-echo string

* lisp/progmodes/xref.el (xref--insert-xrefs): Expand help-echo string.

9 years agoUse etags-goto-tag-location in etags xref backend
Dmitry Gutov [Tue, 20 Jan 2015 02:28:50 +0000 (04:28 +0200)]
Use etags-goto-tag-location in etags xref backend

* progmodes/etags.el (xref-etags-location): New class.
(xref-make-etags-location): New function.
(etags--xref-find-definitions): Use it.
(xref-location-marker): New method implementation.

* lisp/progmodes/xref.el: Mention that xref-location is an EIEIO class.

9 years agoPort to hypothetical case where Qnil is nonzero
Paul Eggert [Tue, 20 Jan 2015 00:49:11 +0000 (16:49 -0800)]
Port to hypothetical case where Qnil is nonzero

* alloc.c (allocate_pseudovector):
* callint.c (Fcall_interactively):
* coding.c (syms_of_coding):
* dispnew.c (realloc_glyph_pool):
* fringe.c (init_fringe):
* lisp.h (memsetnil):
* xdisp.c (init_iterator):
Port to the currently-hypothetical case where Qnil is nonzero.
* dispnew.c (adjust_glyph_matrix): Remove unnecessary verification,
as there are no Lisp_Object values in the data here.
* lisp.h (NIL_IS_NONZERO): New symbol, replacing NIL_IS_ZERO.
All uses changed.  Define only if not already defined, so that one
can debug with -DNIL_IS_NONZERO.
* xdisp.c (init_iterator): Remove unnecessary initializations to 0.

9 years agoVerify that Qnil is zero before relying on that in redisplay.
Eli Zaretskii [Mon, 19 Jan 2015 17:22:17 +0000 (19:22 +0200)]
Verify that Qnil is zero before relying on that in redisplay.

 src/dispnew.c (adjust_glyph_matrix, realloc_glyph_pool): Verify that
 Qnil is represented as zero, before using that to initialize parts
 of the glyph structure.
 src/xdisp.c (init_iterator): Verify that Qnil is represented as
 zero, before using that to initialize parts of the iterator
 structure.

9 years agoFixup ChangeLog
Dmitry Gutov [Mon, 19 Jan 2015 12:00:11 +0000 (14:00 +0200)]
Fixup ChangeLog

9 years ago* lisp/ido.el: Update Customization instructions
Dmitry Gutov [Mon, 19 Jan 2015 11:55:51 +0000 (13:55 +0200)]
* lisp/ido.el: Update Customization instructions

9 years agoSet up ido keymaps only once
Jonas Bernoulli [Mon, 19 Jan 2015 11:54:14 +0000 (13:54 +0200)]
Set up ido keymaps only once

* lisp/ido (ido-common-completion-map)
(ido-file-dir-completion-map)
(ido-file-completion-map, ido-buffer-completion-map): Set up key
bindings when each variable is defined.
(ido-completion-map): Move definition.
(ido-init-completion-maps): Noop.
(ido-common-initialization): Don't call it.
(ido-setup-completion-map): Improve doc-string, cleanup.

Fixes: debbugs:17000
9 years agoFix the value default-directory gets in custom-make-dependencies.
Ivan Shmakov [Mon, 19 Jan 2015 09:50:41 +0000 (09:50 +0000)]
Fix the value default-directory gets in custom-make-dependencies.

* lisp/cus-dep.el (custom-make-dependencies): Ensure that
default-directory is interpreted as a directory (see bug#19140.)

9 years agoPrefer memset to repeatedly assigning Qnil
Paul Eggert [Mon, 19 Jan 2015 08:56:18 +0000 (00:56 -0800)]
Prefer memset to repeatedly assigning Qnil

* alloc.c (allocate_pseudovector): Catch more bogus values.
* alloc.c (allocate_pseudovector):
* callint.c (Fcall_interactively):
* coding.c (syms_of_coding):
* fringe.c (init_fringe):
Verify that Qnil == 0.
* callint.c (Fcall_interactively):
* eval.c (Fapply, Ffuncall):
* fns.c (mapcar1, larger_vector):
* font.c (font_expand_wildcards):
* fringe.c (init_fringe):
Prefer memset to assigning zeros by hand.
* callint.c (Fcall_interactively):
Remove duplicate assignment of Qnil to args[i].
* coding.c (syms_of_coding):
Prefer LISP_INITIALLY_ZERO to assigning zeros by hand.
* fileio.c (Ffile_selinux_context):
Rewrite to avoid need for Lisp_Object array.
* lisp.h (XLI_BUILTIN_LISPSYM): New macro.
(DEFINE_LISP_SYMBOL_END): Use it.
(NIL_IS_ZERO): New constant.
(memsetnil): New function.

9 years agoxref: Use other-window-scroll-buffer and user-error
Dmitry Gutov [Mon, 19 Jan 2015 03:29:37 +0000 (05:29 +0200)]
xref: Use other-window-scroll-buffer and user-error

* lisp/progmodes/xref.el (xref--display-position):
Set `other-window-scroll-buffer'.
(xref-goto-xref): Use `user-error'.

9 years agoUse quit-window to hide buffers temporarily displayed by xref
Dmitry Gutov [Mon, 19 Jan 2015 02:19:32 +0000 (04:19 +0200)]
Use quit-window to hide buffers temporarily displayed by xref

* lisp/progmodes/xref.el (xref--display-history): New variable.
(xref--window-configuration): Remove.
(xref--save-to-history): New function.
(xref--display-position): Use it.  Add new argument.
(xref--restore-window-configuration): Remove.
(xref--show-location, xref-show-location-at-point): Update
accordingly.
(xref--xref-buffer-mode): Don't use `pre-command-hook'.
(xref--quit): New command.
(xref-goto-xref): Use it.
(xref--xref-buffer-mode-map): Bind `q' to it.

9 years agoPerform xref jump even inside indentation or at eol
Dmitry Gutov [Sun, 18 Jan 2015 08:15:41 +0000 (10:15 +0200)]
Perform xref jump even inside indentation or at eol

* lisp/progmodes/xref.el (xref-goto-xref): Perform xref jump even inside
indentation or at eol.

9 years ago* lisp/emacs-lisp/eieio-core.el: Add `subclass' specializer for cl-generic.
Stefan Monnier [Sun, 18 Jan 2015 19:08:13 +0000 (14:08 -0500)]
* lisp/emacs-lisp/eieio-core.el: Add `subclass' specializer for cl-generic.

(eieio--generic-subclass-tagcode, eieio--generic-subclass-tag-types):
New functions.
(cl-generic-tagcode-function, cl-generic-tag-types-function): Use them.

* test/automated/eieio-test-methodinvoke.el (eieio-test-cl-generic-1):
Test `subclass' specializer.

9 years agoEIEIO&cl-generic: Add obsolescence warnings and fix corner case
Stefan Monnier [Sun, 18 Jan 2015 17:24:43 +0000 (12:24 -0500)]
EIEIO&cl-generic: Add obsolescence warnings and fix corner case

* lisp/emacs-lisp/cl-generic.el (cl-generic-define-method): Correctly handle
introduction of a new dispatch argument.
(cl--generic-cache-miss): Handle dispatch on an argument which was not
considered as dispatchable for this method.
(cl-defmethod): Warn when adding a method to an obsolete generic function.
(cl--generic-lambda): Make sure it works if cl-lib is not yet loaded.

* lisp/emacs-lisp/eieio-generic.el (eieio--defgeneric-init-form):
Use autoloadp.

* lisp/emacs-lisp/eieio.el (defclass): Add obsolescence warning for the
`newname' argument.

* test/automated/cl-generic-tests.el (cl-generic-test-10-weird): New test.
Rename other tests to preserve ordering.

9 years ago(package--append-to-alist): Updated docstring due to new name.
Artur Malabarba [Sun, 18 Jan 2015 12:38:19 +0000 (10:38 -0200)]
(package--append-to-alist): Updated docstring due to new name.

9 years agopackage.el (package--append-to-alist): Renamed from `add-to-alist'
Artur Malabarba [Sun, 18 Jan 2015 12:13:07 +0000 (10:13 -0200)]
package.el (package--append-to-alist): Renamed from `add-to-alist'

9 years agoFix seq-subseq and cl-subseq for bad bounding indices
Leo Liu [Sun, 18 Jan 2015 06:03:59 +0000 (14:03 +0800)]
Fix seq-subseq and cl-subseq for bad bounding indices

Fixes: debbugs:19434 debbugs:19519
* lisp/emacs-lisp/cl-extra.el (cl-subseq): Use seq-subseq and fix
multiple evaluation.

* lisp/emacs-lisp/seq.el (seq-subseq): Throw bad bounding indices
error.

* test/automated/seq-tests.el (test-seq-subseq): Add more tests.

9 years ago* lisp/emacs-lisp/cl-generic.el: Add support for cl-next-method-p.
Stefan Monnier [Sun, 18 Jan 2015 03:50:50 +0000 (22:50 -0500)]
* lisp/emacs-lisp/cl-generic.el: Add support for cl-next-method-p.

(cl-defmethod): Add edebug spec.
(cl--generic-build-combined-method): Fix call to
cl-no-applicable-method.
(cl--generic-nnm-sample, cl--generic-cnm-sample): New constant.
(cl--generic-isnot-nnm-p): New function.
(cl--generic-lambda): Use it to add support for cl-next-method-p.
(cl-no-next-method, cl-no-applicable-method): Simplify arg list.
(cl-next-method-p): New function.

9 years agoFix mistake in rebase/merge conflict resolution.
Ulrich Müller [Sat, 17 Jan 2015 23:06:13 +0000 (00:06 +0100)]
Fix mistake in rebase/merge conflict resolution.

Remove lines from lisp/vc/vc-bzr.el again that were accidentally
restored in commit 2015-01-17T09:56:45!ulm@gentoo.org.
(Previously removed in commit 2014-12-01T13:24:27Z!esr@thyrsus.com.)

9 years agoUpdate docstring of emacs-repository-get-version.
Ulrich Müller [Sat, 17 Jan 2015 22:19:15 +0000 (23:19 +0100)]
Update docstring of emacs-repository-get-version.

* version.el (emacs-repository-get-version): Update docstring.

9 years agoUnloading support for misearch.
Ivan Shmakov [Sat, 17 Jan 2015 19:15:51 +0000 (19:15 +0000)]
Unloading support for misearch.

* lisp/misearch.el (multi-isearch-unload-function): New function.
(misearch-unload-function): New alias.

Fixes: debbugs:19566
9 years agoDo not clear the session when trying to read a non-existent desktop file.
Ivan Shmakov [Sat, 17 Jan 2015 19:12:45 +0000 (19:12 +0000)]
Do not clear the session when trying to read a non-existent desktop file.

* lisp/desktop.el (desktop-read): Do not call desktop-clear when no
desktop file is found.

Fixes: debbugs:18371
9 years agoFix: inhibit point motion hooks when encoding an enriched document.
Ivan Shmakov [Sat, 17 Jan 2015 19:07:07 +0000 (19:07 +0000)]
Fix: inhibit point motion hooks when encoding an enriched document.

* lisp/textmodes/enriched.el (enriched-encode): Use
inhibit-point-motion-hooks in addition to inhibit-read-only.

Fixes: debbugs:18246
9 years agoFix dir-locals handling for non-file buffers.
Ivan Shmakov [Sat, 17 Jan 2015 19:02:00 +0000 (19:02 +0000)]
Fix dir-locals handling for non-file buffers.

* lisp/files.el (dir-locals-collect-variables): Use default-directory
in place of the file name while working on non-file buffers, just
like hack-dir-local-variables already does.

Fixes: debbugs:19140
9 years agoAvoid mapcar in two cases in files.el.
Ivan Shmakov [Sat, 17 Jan 2015 18:57:04 +0000 (18:57 +0000)]
Avoid mapcar in two cases in files.el.

* lisp/files.el (find-file-other-window, find-file-other-frame):
Use mapc instead of mapcar.

Fixes: debbugs:18175
9 years agoIgnore print-length and print-level while formatting url-cookie data.
Ivan Shmakov [Sat, 17 Jan 2015 18:42:31 +0000 (18:42 +0000)]
Ignore print-length and print-level while formatting url-cookie data.

* lisp/url/url-cookie.el (url-cookie-write-file): Let-bind print-length
and print-level to nil to avoid writing a garbled list.

Fixes: debbugs:16805
9 years ago* lisp/emacs-lisp/eieio-core.el (eieio--class-constructor): Rename.
Stefan Monnier [Sat, 17 Jan 2015 14:50:07 +0000 (09:50 -0500)]
* lisp/emacs-lisp/eieio-core.el (eieio--class-constructor): Rename.

Fixes: debbugs:19620
(eieio--class-constructor): Rename from class-constructor, and make it an alias
for `identity'.  Update all callers.

9 years ago* lisp/emacs-lisp/eieio.el: Improve `constructor' compatibility.
Stefan Monnier [Sat, 17 Jan 2015 14:41:51 +0000 (09:41 -0500)]
* lisp/emacs-lisp/eieio.el: Improve `constructor' compatibility.

Fixes: debbugs:19620
(eieio-constructor): Handle obsolete object name argument here...
(defclass): ...instead of in the constructor here.

* test/automated/eieio-tests.el
(eieio-test-37-obsolete-name-in-constructor): New test.

9 years agoType fix for defcustom.
Jorgen Schaefer [Sat, 17 Jan 2015 10:58:58 +0000 (11:58 +0100)]
Type fix for defcustom.

* emacs-lisp/package.el (package-archive-priorities): Specify
correct type.

9 years agoDiscard the Bazaar case in repository version detection
Ulrich Müller [Fri, 14 Nov 2014 08:05:02 +0000 (09:05 +0100)]
Discard the Bazaar case in repository version detection

* version.el (emacs-bzr-version-dirstate, emacs-bzr-version-bzr):
Remove.
(emacs-repository-get-version): Discard the Bazaar case.

* vc/vc-bzr.el (vc-bzr-version-dirstate): Rename from
emacs-bzr-version-dirstate and move from version.el to here.
(vc-bzr-working-revision): Use it.

9 years agoDon't enforce :protection in EIEIO objects any more
Stefan Monnier [Sat, 17 Jan 2015 04:48:26 +0000 (23:48 -0500)]
Don't enforce :protection in EIEIO objects any more

* doc/misc/eieio.texi (Slot Options): Document :protection as unsupported.

* lisp/emacs-lisp/eieio-core.el (eieio--scoped-class-stack): Remove var.
(eieio--scoped-class): Remove function.
(eieio--with-scoped-class): Remove macro.  Replace uses with `progn'.
(eieio--slot-name-index): Don't check the :protection anymore.
(eieio-initializing-object): Remove var.
(eieio-set-defaults): Don't let-bind eieio-initializing-object.

* lisp/emacs-lisp/eieio-generic.el (call-next-method): Don't bother checking
eieio--scoped-class any more.

* test/automated/eieio-test-methodinvoke.el (eieio-test-method-store):
Use an explicit arg instead of eieio--scoped-class.  Update all callers.

* test/automated/eieio-tests.el (eieio-test-25-slot-tests)
(eieio-test-26-default-inheritance, eieio-test-28-slot-protection)
(eieio-test-30-slot-attribute-override)
(eieio-test-31-slot-attribute-override-class-allocation): Don't check
that we enforce :protection since we don't any more.

9 years agoImprove handling of doc-strings and describe-function for cl-generic
Stefan Monnier [Sat, 17 Jan 2015 03:52:15 +0000 (22:52 -0500)]
Improve handling of doc-strings and describe-function for cl-generic

* lisp/help-fns.el (find-lisp-object-file-name): Accept any `type' as long
as it's a symbol.
(help-fns-short-filename): New function.
(describe-function-1): Use it.  Use autoload-do-load.

* lisp/help-mode.el (help-function-def): Add optional arg `type'.

* lisp/emacs-lisp/cl-generic.el (cl-generic-ensure-function): It's OK to
override an autoload.
(cl-generic-current-method-specializers): Replace dyn-bind variable
with a lexically-scoped macro.
(cl--generic-lambda): Update accordingly.
(cl-generic-define-method): Record manually in the load-history with
type `cl-defmethod'.
(cl--generic-get-dispatcher): Minor optimization.
(cl--generic-search-method): New function.
(find-function-regexp-alist): Add entry for `cl-defmethod' type.
(cl--generic-search-method): Add hyperlinks for methods.  Merge the
specializers and the function's arguments.

* lisp/emacs-lisp/eieio-core.el (eieio--defalias): Move to eieio-generic.el.
(eieio-defclass-autoload): Don't record the superclasses any more.
(eieio-defclass-internal): Reuse the old class object if it was just an
autoload stub.
(eieio--class-precedence-list): Load the class if it's autoloaded.

* lisp/emacs-lisp/eieio-generic.el (eieio--defalias): Move from eieio-core.
(eieio--defgeneric-init-form): Don't throw away a previous docstring.
(eieio--method-optimize-primary): Don't mess with the docstring.
(defgeneric): Keep the `args' in the docstring.
(defmethod): Don't use the method's docstring for the generic
function's docstring.

* lisp/emacs-lisp/find-func.el: Use lexical-binding.
(find-function-regexp): Don't rule out `defgeneric'.
(find-function-regexp-alist): Document new possibility of including
a function instead of a regexp.
(find-function-search-for-symbol): Implement that new possibility.
(find-function-library): Don't assume that `function' is a symbol.
(find-function-do-it): Remove unused var `orig-buf'.

* test/automated/cl-generic-tests.el (cl-generic-test-8-after/before):
Rename from cl-generic-test-7-after/before.
(cl--generic-test-advice): New function.
(cl-generic-test-9-advice): New test.

* test/automated/eieio-test-methodinvoke.el (eieio-test-cl-generic-1): Reset
eieio-test--1.

9 years agoemacs-lisp/package.el and package-x.el: References to package-desc-kind
Artur Malabarba [Wed, 14 Jan 2015 14:57:32 +0000 (12:57 -0200)]
emacs-lisp/package.el and package-x.el: References to package-desc-kind

9 years ago* NEWS: Document installing packages from directories.
Artur Malabarba [Tue, 13 Jan 2015 02:13:55 +0000 (00:13 -0200)]
* NEWS: Document installing packages from directories.

9 years ago(package-install-file): Install packages from directory.
Artur Malabarba [Tue, 13 Jan 2015 02:03:59 +0000 (00:03 -0200)]
(package-install-file): Install packages from directory.

9 years ago(package-install-from-buffer): Install packages from dired buffer.
Artur Malabarba [Tue, 13 Jan 2015 01:35:46 +0000 (23:35 -0200)]
(package-install-from-buffer): Install packages from dired buffer.

9 years ago* emacs-lisp/package.el (package-dir-info): New function.
Artur Malabarba [Tue, 13 Jan 2015 01:26:58 +0000 (23:26 -0200)]
* emacs-lisp/package.el (package-dir-info): New function.

Find package information for a directory. The return result is a
`package-desc'.

9 years ago* emacs-lisp/package.el (package--read-pkg-desc): New function.
Artur Malabarba [Tue, 13 Jan 2015 01:24:22 +0000 (23:24 -0200)]
* emacs-lisp/package.el (package--read-pkg-desc): New function.

Read a `define-package' form in current buffer. Return the pkg-desc,
with desc-kind set to KIND.

9 years ago* lisp/emacs-lisp/cl-macs.el: Fix last change.
Stefan Monnier [Thu, 15 Jan 2015 13:58:45 +0000 (08:58 -0500)]
* lisp/emacs-lisp/cl-macs.el: Fix last change.

(cl--labels-magic): New constant.
(cl--labels-convert): Use it to ask the macro what is its replacement
in the #'f case.

9 years ago* lisp/emacs-lisp/cl-generic.el (cl--generic-build-combined-method):
Stefan Monnier [Thu, 15 Jan 2015 13:38:00 +0000 (08:38 -0500)]
* lisp/emacs-lisp/cl-generic.el (cl--generic-build-combined-method):
Return the value of the primary rather than the after method.

9 years agoFix the automated test for package priorities.
Jorgen Schaefer [Fri, 16 Jan 2015 19:28:26 +0000 (20:28 +0100)]
Fix the automated test for package priorities.

* automated/package-test.el (package-test-install-prioritized):
New test.

9 years ago# ChangeLog fixes
Glenn Morris [Fri, 16 Jan 2015 19:17:25 +0000 (14:17 -0500)]
# ChangeLog fixes

9 years agoPrefer INLINE functions in font.h to match style used in lisp.h
Dmitry Antipov [Fri, 16 Jan 2015 12:15:32 +0000 (15:15 +0300)]
Prefer INLINE functions in font.h to match style used in lisp.h

* font.h (FONTP, FONT_SPEC_P, FONT_ENTITY_P, FONT_OBJECT_P)
(CHECK_FONT, CHECK_FONT_SPEC, CHECK_FONT_ENTITY, CHECK_FONT_OBJECT)
(XFONT_SPEC, XFONT_ENTITY, XFONT_OBJECT, CHECK_FONT_GET_OBJECT):
Now functions.
* font.c (Ffont_otf_alternates, Fquery_font, Ffont_get_glyphs):
* ftfont.c (ftfont_shape):
* macfont.m (macfont_shape):
* w32uniscribe.c (uniscribe_shape):
* xftfont.c (xftfont_shape): Adjust CHECK_FONT_GET_OBJECT users.

9 years agoTiny lisp.h cleanup
Dmitry Antipov [Fri, 16 Jan 2015 11:41:20 +0000 (14:41 +0300)]
Tiny lisp.h cleanup

* lisp.h (XTERMINAL): Add eassert.
* process.c (make_lisp_proc): Now static here.

9 years agoPackage archives now have priorities.
Jorgen Schaefer [Sun, 7 Dec 2014 21:28:38 +0000 (22:28 +0100)]
Package archives now have priorities.

* lisp/package.el: Provide repository priorities.
(package-archive-priorities): New variable.
(package--add-to-alist): New function.
(package--add-to-archive-contents): Use it.
(package-menu--find-upgrades): Use it as well. Small clean up to
make the use of the package name here explicit.
(package-archive-priority): New function.
(package-desc-priority-version): New function.

Fixes: debbugs:19296
9 years agoSupport Make verbosity levels in w32 targets previously left out
Eli Zaretskii [Fri, 16 Jan 2015 09:33:08 +0000 (11:33 +0200)]
Support Make verbosity levels in w32 targets previously left out

 nt/Makefile.in (AM_V_CC, am__v_CC_, am__v_CC_0, am__v_CC_1)
 (AM_V_CCLD, am__v_CCLD_, am__v_CCLD_0, am__v_CCLD_1, AM_V_RC)
 (am__v_RC_, am__v_RC_0, am__v_RC_1): New macros.
 (addpm${EXEEXT}, ddeclient${EXEEXT}, cmdproxy${EXEEXT})
 (runemacs${EXEEXT}): Use $(AM_V_CCLD).
 (emacs.res, ../src/emacs.res): Use $(AM_V_RC).

 lib-src/Makefile.in (AM_V_RC, am__v_RC_, am__v_RC_0, am__v_RC_1): New
 macros.
 (emacsclient.res): Use $(AM_V_RC).

9 years agoTune pseudovector allocation assuming Qnil == 0
Dmitry Antipov [Fri, 16 Jan 2015 08:42:24 +0000 (11:42 +0300)]
Tune pseudovector allocation assuming Qnil == 0

* alloc.c (allocate_pseudovector): Use memset for both
Lisp_Objects and regular slots.  Add zerolen arg.
* lisp.h (allocate_pseudovector): Adjust prototype.
(ALLOCATE_PSEUDOVECTOR): Adjust user.
(ALLOCATE_ZEROED_PSEUDOVECTOR): New macro.
(allocate_hash_table, allocate_window, allocate_frame)
(allocate_process, allocate_terminal): Remove prototypes.
* fns.c (allocate_hash_table): Now static here.
* frame.c (allocate_frame):
* process.c (allocate_process):
* terminal.c (allocate_terminal):
* window.c (allocate_window): Now static here.
Use ALLOCATE_ZEROED_PSEUDOVECTOR.  Add comment.

9 years agoMake `ring-bell-function' customizable.
Daniel Colascione [Fri, 16 Jan 2015 04:51:48 +0000 (20:51 -0800)]
Make `ring-bell-function' customizable.

* lisp/cus-start.el (all): Make `ring-bell-function' customizable.

9 years agoGive up on -Wsuggest-attribute=const
Paul Eggert [Fri, 16 Jan 2015 04:37:05 +0000 (20:37 -0800)]
Give up on -Wsuggest-attribute=const

The attribute doesn't help performance significantly, and the
warning seems to be more trouble than it's worth.  See the thread at:
http://lists.gnu.org/archive/html/emacs-devel/2015-01/msg00361.html
* configure.ac (WERROR_CFLAGS): Don't use -Wsuggest-attribute=const.
* lib-src/make-docfile.c (write_globals):
Remove special hack for Fnext_read_file_uses_dialog_p.
* src/decompress.c (Fzlib_available_p):
* src/gnutls.c (Fgnutls_available_p):
* src/gtkutil.h (xg_uses_old_file_dialog):
* src/xdisp.c (Ftool_bar_height):
* src/xmenu.c (popup_activated):
No longer const, since it's not const on at lest some
configurations, and we shouldn't lie to the compiler.

9 years agovc-svn-dir-status-files: Parse output with the remote format
Dmitry Gutov [Fri, 16 Jan 2015 03:24:09 +0000 (06:24 +0300)]
vc-svn-dir-status-files: Parse output with the remote format

Fixes: debbugs:19429
* lisp/vc/vc-svn.el (vc-svn-dir-status-files): Pass t as
vc-svn-after-dir-status's second argument.

9 years agoParse pcomplete arguments regardless of pcomplete-cycle-completions
Samer Masterson [Fri, 16 Jan 2015 02:35:51 +0000 (05:35 +0300)]
Parse pcomplete arguments regardless of pcomplete-cycle-completions

* pcomplete.el (pcomplete-parse-arguments): Parse arguments regardless
of pcomplete-cycle-completions's value.

Fixes: debbugs:18950
9 years ago* lisp/dom.el (dom-strings): New function.
Lars Magne Ingebrigtsen [Fri, 16 Jan 2015 02:08:55 +0000 (03:08 +0100)]
* lisp/dom.el (dom-strings): New function.

9 years agoMinor directory-files-recursively touch-up
Lars Magne Ingebrigtsen [Fri, 16 Jan 2015 00:12:40 +0000 (01:12 +0100)]
Minor directory-files-recursively touch-up

* files.el (directory-files-recursively): Don't use the word
"path" for a file name.

9 years agoHandle the `neg' operator in some calc-units functions.
Wolfgang Jenkner [Thu, 15 Jan 2015 19:02:17 +0000 (20:02 +0100)]
Handle the `neg' operator in some calc-units functions.

* lisp/calc/calc-units.el (math-units-in-expr-p)
(math-single-units-in-expr-p, math-find-compatible-unit-rec)
(math-extract-units): Handle the `neg' operator.  (Bug#19582)
* test/automated/calc-tests.el (calc-tests-equal, calc-tests-simple):
New functions.
(test-calc-remove-units, test-calc-extract-units)
(test-calc-convert-units): New tests.

9 years agoUse POSIX redirection.
Wolfgang Jenkner [Thu, 15 Jan 2015 18:56:57 +0000 (19:56 +0100)]
Use POSIX redirection.

* test/automated/Makefile.in (WRITE_LOG): Use POSIX redirection.

9 years agolisp/gnus/nntp.el (nntp-send-authinfo): Error out if the password is wrong
Lars Magne Ingebrigtsen [Thu, 15 Jan 2015 22:19:28 +0000 (22:19 +0000)]
lisp/gnus/nntp.el (nntp-send-authinfo): Error out if the password is wrong

9 years agoAdd set-binary-mode primitive to switch a standard stream to binary I/O.
Eli Zaretskii [Thu, 15 Jan 2015 15:50:50 +0000 (17:50 +0200)]
Add set-binary-mode primitive to switch a standard stream to binary I/O.

 src/fileio.c: Include binary-io.h.
 (Fset_binary_mode): New function.
 (syms_of_fileio): Defsubr it.
 (syms_of_fileio) <Qstdin, Qstdout, Qstderr>: DEFSYM them.

 admin/unidata/unidata/uvs.el (uvs-print-table-ivd): Call set-binary-mode on
 stdout.

 doc/lispref/streams.texi (Input Functions): Document 'set-binary-mode'.
 (Output Functions): Cross-reference to documentation of
 'set-binary-mode'.

 etc/NEWS: Mention 'set-binary-mode'.

9 years agoFlag :unknown-ca and :self-signed SSL certs (Bug#19404)
Ted Zlatanov [Thu, 15 Jan 2015 14:41:58 +0000 (09:41 -0500)]
Flag :unknown-ca and :self-signed SSL certs  (Bug#19404)

Fixes: debbugs:19404
* gnutls.c (init_gnutls_functions): Import gnutls_x509_crt_check_issuer.
(Fgnutls_peer_status): Use it to set the :self-signed flag.
Rename the previous :self-signed to :unknown-ca.
(Fgnutls_peer_status_warning_describe): Explain :unknown-ca flag.

9 years ago# Set copyright to FSF, standardize license notice
Glenn Morris [Thu, 15 Jan 2015 07:08:53 +0000 (23:08 -0800)]
# Set copyright to FSF, standardize license notice

9 years ago* lisp/emacs-lisp/eieio-core.el: Provide support for cl-generic.
Stefan Monnier [Thu, 15 Jan 2015 05:19:44 +0000 (00:19 -0500)]
* lisp/emacs-lisp/eieio-core.el: Provide support for cl-generic.

(eieio--generic-tagcode): New function.
(cl-generic-tagcode-function): Use it.
(eieio--generic-tag-types): New function.
(cl-generic-tag-types-function): Use it.
(eieio-object-p): Tighten up the test.

* lisp/emacs-lisp/cl-generic.el (cl-generic-define-method): Fix paren typo.

* test/automated/eieio-test-methodinvoke.el (eieio-test-method-store): Add
keysym arg instead of relying on internal var eieio--generic-call-key.
Update all callers.
(eieio-test-cl-generic-1): New tests.

9 years ago* lisp/emacs-lisp/cl-generic.el: New file.
Stefan Monnier [Wed, 14 Jan 2015 19:37:10 +0000 (14:37 -0500)]
* lisp/emacs-lisp/cl-generic.el: New file.

* lisp/emacs-lisp/cl-macs.el (cl-flet): Allow (FUN EXP) forms.
(cl-load-time-value, cl-labels): Use closures rather than
backquoted lambdas.
(cl-macrolet): Use `eval' to create the function value, and support CL
style arguments in for the defined macros.
* test/automated/cl-generic-tests.el: New file.

9 years agoFix crashes on MS-Windows due to pop-up menus (Bug#19596)
Eli Zaretskii [Wed, 14 Jan 2015 18:51:33 +0000 (20:51 +0200)]
Fix crashes on MS-Windows due to pop-up menus  (Bug#19596)

 src/w32fns.c (w32_wnd_proc): Ignore MENUITEMINFO's dwItemData data
 when FLAGS indicate the item is not highlighted, i.e. it's not our
 help-echo string.

9 years agoIn update_frame_menubar remove garbaged code.
Martin Rudalics [Wed, 14 Jan 2015 14:47:19 +0000 (15:47 +0100)]
In update_frame_menubar remove garbaged code.

* xmenu.c (update_frame_menubar): Remove garbaged code.

9 years ago* lisp/net/eww.el: Use lexical-binding.
Stefan Monnier [Mon, 12 Jan 2015 18:07:52 +0000 (13:07 -0500)]
* lisp/net/eww.el: Use lexical-binding.

(eww-links-at-point): Remove unused arg.
(eww-mode-map): Inherit from special-mode-map.
(eww-mode): Derive from special-mode.  Don't use `setq' on a hook.

9 years agoNever move gap in make_buffer_string_both.
Dmitry Antipov [Wed, 14 Jan 2015 12:56:46 +0000 (15:56 +0300)]
Never move gap in make_buffer_string_both.

* editfns.c (make_buffer_string_both): If requested range intersects
the gap, don't move the latter but copy in two regions, thus avoiding
unnecessary relocation of buffer data.

9 years agoFix last time zone handling change.
Dmitry Antipov [Wed, 14 Jan 2015 10:05:17 +0000 (13:05 +0300)]
Fix last time zone handling change.

* editfns.c (decode_time_zone): Return Lisp string instead.
All related users changed.

9 years agoConsistently handle time zone specification.
Dmitry Antipov [Wed, 14 Jan 2015 09:43:43 +0000 (12:43 +0300)]
Consistently handle time zone specification.

* editfns.c (decode_time_zone): New function, refactored out from ...
(Fencode_time): ... adjusted user.
(Fset_time_zone_rule): Use decode_time_zone.

9 years agoremove_slash_colon need not be inline
Paul Eggert [Wed, 14 Jan 2015 08:42:15 +0000 (00:42 -0800)]
remove_slash_colon need not be inline

* process.c, process.h (remove_slash_colon): No longer inline.
This saves text bytes without hurting runtime performance.

9 years agoConsolidate common path transformation code.
Dmitry Antipov [Wed, 14 Jan 2015 07:08:44 +0000 (10:08 +0300)]
Consolidate common path transformation code.

* process.h (remove_slash_colon): New function.
* callproc.c (encode_current_directory, call_process):
* process.c (Fstart_process): Use it.

9 years agoAvoid extra multibyteness check in ENCODE_FILE users.
Dmitry Antipov [Wed, 14 Jan 2015 06:50:39 +0000 (09:50 +0300)]
Avoid extra multibyteness check in ENCODE_FILE users.

* callproc.c (encode_current_directory, Fcall_process, call_process):
* dired.c (directory_files_internal, file_name_completion):
Do not check for STRING_MULTIBYTE because encode_file_name
is a no-op for unibyte strings.

9 years agoUse bool for boolean in xmenu.c, xml.c
Paul Eggert [Wed, 14 Jan 2015 05:19:40 +0000 (21:19 -0800)]
Use bool for boolean in xmenu.c, xml.c

* xmenu.c (x_menu_set_in_use, popup_get_selection)
(Fx_menu_bar_open_internal, popup_widget_loop)
(x_activate_menubar, xg_crazy_callback_abort)
(update_frame_menubar, set_frame_menubar)
(initialize_frame_menubar, free_frame_menubar)
(create_and_show_popup_menu, x_menu_show)
(create_and_show_dialog, x_dialog_show):
* xml.c (libxml2_loaded_p, init_libxml2_functions, parse_region)
(Flibxml_parse_html_region, Flibxml_parse_xml_region):
* xrdb.c (main) [TESTRM]:
* xsettings.c (init_gsettings):
* xterm.c (XFillRectangle, xg_scroll_callback)
(xg_end_scroll_callback):
* xterm.h (x_menu_set_in_use) [USE_GTK || USE_MOTIF]:
Use bool for boolean.
* xmenu.c (TRUE): Remove; no longer used.
(show_help_event): Remove long-unused code.
(set_frame_menubar): Remove "#if 1" and corresponding "#endif" lines.

9 years agoDon't say Fnext_read_file_uses_dialog_p is const
Paul Eggert [Tue, 13 Jan 2015 23:22:19 +0000 (15:22 -0800)]
Don't say Fnext_read_file_uses_dialog_p is const

It's const only if a windowing system is not used; don't say it's
const otherwise.  See:
http://lists.gnu.org/archive/html/emacs-devel/2015-01/msg00310.html
* lib-src/make-docfile.c (write_globals):
Add a special hack for Fnext_read_file_uses_dialog_p.
* src/fileio.c (next_read_file_uses_dialog_p): Remove.
Move guts back to ...
(Fnext_read_file_uses_dialog_p): ... here.
Don't declare as const, as make-docfile.c now has a special case
for this function.  This is an ugly hack, but it's better than
lying to the compiler.

9 years agoRemove now-unnecessary forward XTYPE decl
Paul Eggert [Tue, 13 Jan 2015 22:04:23 +0000 (14:04 -0800)]
Remove now-unnecessary forward XTYPE decl

* lisp.h (XTYPE): Remove forward declaration.  The recent merge
from emacs-24 fixed the problem in a better way, by moving XPNTR's
definition to after XTYPE's.

9 years agoFix problems with 32-bit wide-int build exposed by MinGW
Eli Zaretskii [Tue, 13 Jan 2015 17:16:51 +0000 (19:16 +0200)]
Fix problems with 32-bit wide-int build exposed by MinGW

 lisp.h (XPNTR): Move definition to after XTYPE, to avoid
 compilation error in an unoptimized build when !USE_LSB_TAG.
 src/w32heap.c (DUMPED_HEAP_SIZE): For 32-bit wide-int build, use the
 same larger value as for the 64-bit build.
 src/w32term.h (SCROLL_BAR_PACK): Cast the result to UINT_PTR to
 avoid compiler warnings.
 src/w32proc.c (Fw32_get_codepage_charset, Fw32_set_keyboard_layout):
 Avoid compiler warnings about cast from integer to pointer of
 different size.
 src/w32menu.c (menubar_selection_callback, w32_menu_show): Cast to
 UINT_PTR instead of EMACS_INT, to avoid compiler warnings about
 casting from integer to pointer of different size.
 (add_menu_item): Pass the help-echo string as a pointer to
 Lisp_String, not as a Lisp_Object.
 (w32_menu_display_help): Use make_lisp_ptr to reconstruct a Lisp
 string object from its C pointer.
 src/w32fns.c (w32_msg_pump) <WM_EMACS_UNREGISTER_HOT_KEY>: Use
 make_lisp_ptr instead of XIL, to reconstruct a Lisp_Cons from its
 C pointer.
 <WM_EMACS_TOGGLE_LOCK_KEY>: msg.lparam is now a C integer.
 (Fx_create_frame): Type-cast the result of XFASTINT to avoild
 compiler warnings about size differences.
 (Fw32_unregister_hot_key): Pass the tail of w32_grabbed_keys as a
 pointer to a Lisp_Cons struct, not as a disguised EMACS_INT.
 (Fw32_toggle_lock_key): Pass the new state of the key as a C
 integer; use -1 for nil.  Doc fix.
 src/.gdbinit (xgetsym): New subroutine.
 (xsymname, xsymbol): Use it.
 (xprintsym): No need to call xgetptr.

9 years agoAllow compilation during loading of Modes derived from a CC Mode mode.
Alan Mackenzie [Tue, 13 Jan 2015 15:39:36 +0000 (15:39 +0000)]
Allow compilation during loading of Modes derived from a CC Mode mode.
Fixes debbugs#19206.

cc-bytecomp.el (cc-bytecomp-compiling-or-loading): new function which
walks the stack to discover whether we're compiling or loading.
(cc-bytecomp-is-compiling): Reformulate, and move towards beginning.
(cc-bytecomp-is-loading): New defsubst.
(cc-bytecomp-setup-environment, cc-bytecomp-restore-environment): Use
the
above defsubsts.
(cc-require-when-compile, cc-bytecomp-defvar)
(cc-bytecomp-defun): Simplify conditionals.

cc-defs.el (cc-bytecomp-compiling-or-loading): "Borrow" this function
from cc-bytecomp.el.
(c-get-current-file): Reformulate using the above.
(c-lang-defconst): Prevent duplicate entries of file names in a symbol's
'source property.
(c-lang-const): Use cc-bytecomp-is-compiling.

cc-langs.el (c-make-init-lang-vars-fun): Use cc-bytecomp-is-compiling.

9 years agoFixes: debbugs:19552
Stefan Monnier [Tue, 13 Jan 2015 15:17:44 +0000 (10:17 -0500)]
Fixes: debbugs:19552
* lisp/emacs-lisp/eieio-core.el (eieio-defclass): Fix call to `defclass'.

9 years agoMake Fnext_read_file_uses_dialog_p compatible with recent DEFUN change.
Dmitry Antipov [Tue, 13 Jan 2015 10:08:32 +0000 (13:08 +0300)]
Make Fnext_read_file_uses_dialog_p compatible with recent DEFUN change.

* fileio.c (next_read_file_uses_dialog_p): New workaround ...
(Fnext_read_file_uses_dialog_p): ... called from here to avoid
ATTRIBUTE_CONST dependency from #ifdefs.  For details, see
http://lists.gnu.org/archive/html/emacs-devel/2015-01/msg00289.html.

9 years agoIn adjust_frame_size don't return too early after font size change.
Martin Rudalics [Tue, 13 Jan 2015 08:10:05 +0000 (09:10 +0100)]
In adjust_frame_size don't return too early after font size change.

* frame.c (adjust_frame_size): Make sure new numbers of
lines/columns get installed after font size change (Bug#19575).

9 years agoConsolidate duplicated string matching code.
Dmitry Antipov [Tue, 13 Jan 2015 04:08:54 +0000 (07:08 +0300)]
Consolidate duplicated string matching code.

* search.c (fast_string_match_internal): New function,
consolidated from...
(fast_string_match, fast_string_match_ignore_case): ...functions
which are...
* lisp.h (fast_string_match, fast_string_match_ignore_case):
inlined from here now.
(fast_string_match_internal): Add prototype.
* dired.c (file_name_completion): Use fast_string_match_internal.

9 years agoSupport const and noreturn DEFUN attributes.
Dmitry Antipov [Tue, 13 Jan 2015 03:39:45 +0000 (06:39 +0300)]
Support const and noreturn DEFUN attributes.

* lib-src/make-docfile.c (struct global): New field 'flags'.
(DEFUN_noreturn, DEFUN_const): New enum bitfields.
(add_global): Now return pointer to global.
(write_globals): Add _Noreturn and ATTRIBUTE_CONST attributes
if requested by global's flags.
(stream_match): New function.
(scan_c_stream): Recognize 'attributes:' of DEFUN.

* src/callint.c (Finteractive):
* src/character.c (Fcharacterp, Fmax_char):
* src.data.c (Feq, Fnull, Fconsp, Fatom, Flistp, Fnlistp, Fsymbolp)
(Fstringp, Fchar_or_string_p, Fintegerp, Fnatnump, Fnumberp)
(Ffloatp, Fbyteorder):
* src/decompress.c (Fzlib_available_p):
* src/fns.c (Fidentity):
* src/frame.c (Fframe_windows_min_size):
* src/gnutls.c (Fgnutls_error_p, Fgnutls_available_p):
* src/window.c (Fwindow__sanitize_window_sizes):
* src/xdisp.c (Ftool_bar_height):
* src/xfaces.c (Fface_attribute_relative_p): Add const attribute.
* src/emacs.c (Fkill_emacs):
* src/eval.c (Fthrow):
* src/keyboard.c (Ftop_level, Fexit_recursive_edit)
(Fabor_recursive_edit): Add noreturn attribute.

9 years agoDon't eagerly load xref
Dmitry Gutov [Tue, 13 Jan 2015 03:06:15 +0000 (06:06 +0300)]
Don't eagerly load xref

Fixes: debbugs:19554
* lisp/menu-bar.el (menu-bar-goto-menu): Before calling
`xref-marker-stack-empty-p', first check that `xref' is loaded.

9 years agoPort to 32-bit MingGW --with-wide-int
Paul Eggert [Mon, 12 Jan 2015 19:26:06 +0000 (11:26 -0800)]
Port to 32-bit MingGW --with-wide-int

Problem reported by Eli Zaretskii in:
http://lists.gnu.org/archive/html/emacs-devel/2015-01/msg00265.html
* lisp.h (struct Lisp_Sub_Char_Table): Check that offset matches
what we think it is, rather than checking only its alignment (and
doing so incorrectly on MinGW).

9 years agoAdd autoload cookie for xref-marker-stack-empty-p (Bug#19554).
Martin Rudalics [Mon, 12 Jan 2015 17:26:39 +0000 (18:26 +0100)]
Add autoload cookie for xref-marker-stack-empty-p (Bug#19554).

* progmodes/xref.el (xref-marker-stack-empty-p): Add autoload
cookie (Bug#19554).

9 years agoMiscellaneous tiny fixes here and there.
Dmitry Antipov [Mon, 12 Jan 2015 17:14:43 +0000 (20:14 +0300)]
Miscellaneous tiny fixes here and there.

* fileio.c (Ffile_name_as_directory, Fdirectory_file_name):
Remove dead NILP check.
* image.c (Flookup_image): Use regular format for docstring.
* keyboard.c (apply_modifiers_uncached): Use stpcpy.

9 years agoAdjust frame heights to real height of tool bar.
Martin Rudalics [Mon, 12 Jan 2015 07:18:00 +0000 (08:18 +0100)]
Adjust frame heights to real height of tool bar.

* frame.el (frame-notice-user-settings): Remove code dealing with
frame-initial-frame-tool-bar-height.  Turn off `tool-bar-mode'
only if `window-system-frame-alist' or `default-frame-alist' ask
for it.
(make-frame): Update frame-adjust-size-history if needed.
* dispnew.c (change_frame_size_1): Pass Qchange_frame_size to
adjust_frame_size.
* frame.c (frame_default_tool_bar_height): New variable.
(adjust_frame_size): Possibly add requested adjustment to
Vframe_adjust_size_history.
(make_frame): Initialize tool_bar_redisplayed_once slot.
(Fset_frame_height, Fset_frame_width, Fset_frame_size): Clarify
doc-string.  Call adjust_frame_size unconditionally (the frame's
text size may remain unaltered but the pixel size may change).
(x_figure_window_size): If frame_default_tool_bar_height was
set, use it instead of calculating the tool bar height from
DEFAULT_TOOL_BAR_IMAGE_HEIGHT.  Don't set
Vframe_initial_frame_tool_bar_height.
(Qchange_frame_size, Qxg_frame_set_char_size)
(Qset_window_configuration, Qx_create_frame_1)
(Qx_create_frame_2): New symbols.
(Vframe_initial_frame_tool_bar_height): Remove.
(Vframe_adjust_size_history): New history variable for debugging
frame size adjustments.
* frame.h (struct frame): New boolean slot
tool_bar_redisplayed_once.
(frame_default_tool_bar_height): Extern.
* gtkutil.c (xg_frame_set_char_size): Pass Qxg_frame_set_char_size
to adjust_frame_size.
* nsfns.m (Fx_create_frame): Pass Pass Qx_create_frame_1 and
Qx_create_frame_2 to adjust_frame_size.
* w32fns.c (x_change_tool_bar_height): Call adjust_frame_size with
inhibit 1 when we have not redisplayed the tool bar yet.
(Fx_create_frame): Pass Pass Qx_create_frame_1 and
Qx_create_frame_2 to adjust_frame_size.
* w32menu.c (set_frame_menubar): Simplify adjust_frame_size
call.
* window.c (Fset_window_configuration): Pass
Qset_window_configuration to adjust_frame_size.
* xdisp.c (redisplay_tool_bar): Assign new height to
frame_default_tool_bar_height.
(redisplay_internal): If we haven't redisplayed this frame's
tool bar, call redisplay_tool_bar early so we can adjust the
frame size accordingly.
* xfns.c (x_change_tool_bar_height): Call adjust_frame_size with
inhibit 1 when we have not redisplayed the tool bar yet.
(Fx_create_frame): Pass Pass Qx_create_frame_1 and
Qx_create_frame_2 to adjust_frame_size.

9 years agoHave 'make' output better GEN names
Paul Eggert [Mon, 12 Jan 2015 02:19:31 +0000 (18:19 -0800)]
Have 'make' output better GEN names

* lisp/Makefile.in (PHONY_EXTRAS): New macro.
(.PHONY): Depend on it, and on $(lisp)/loaddefs.el, so that the
relevant files' time stamps are ignored.
(custom-deps, $(lisp)/cus-load.el, finder-data)
($(lisp)/finder-inf.el): Use PHONY_EXTRAS.
(custom-deps, $(lisp)/cus-load.el, finder-data)
($(lisp)/finder-inf.el, autoloads, $(lisp)/loaddefs.el)
($(lisp)/subdirs.el, update-subdirs):
Output more-accurate destination names with GEN.
* src/Makefile.in (gl-stamp, globals.h): Simplify by putting the new
contents of globals.h into gl-stamp.  This lets us use AM_V_GEN
more naturally so that 'make' can output more-accurate names.

9 years agoSay "ELC foo.elc" instead of "GEN foo.elc"
Paul Eggert [Mon, 12 Jan 2015 01:41:57 +0000 (17:41 -0800)]
Say "ELC foo.elc" instead of "GEN foo.elc"

* admin/unidata/Makefile.in, lisp/Makefile.in (AM_V_ELC)
(am__v_ELC_, am__v_ELC_0, am__v_ELC_1): New macros.
* admin/unidata/Makefile.in (%.elc):
* lisp/Makefile.in ($(THEFILE)c, .el.elc): Use them.