]> git.eshelyaron.com Git - emacs.git/log
emacs.git
9 years agoFurther work on `stopped' events in filenotify.el
Michael Albinus [Mon, 26 Oct 2015 15:46:48 +0000 (16:46 +0100)]
Further work on `stopped' events in filenotify.el

* doc/lispref/os.texi (File Notifications): Rework examples.

* lisp/filenotify.el (file-notify--rm-descriptor): Optional parameter.
(file-notify--rm-descriptor, file-notify-callback): Improve check
for sending `stopped' event.
(file-notify-add-watch): Check for more events for `inotify'.

* test/automated/file-notify-tests.el
(file-notify--test-expected-events): New defvar.
(file-notify--test-with-events): Use it.
(file-notify--test-cleanup): Make it more robust when deleting
directories.
(file-notify--test-event-test): Check also for watched directories.
(file-notify--test-event-handler): Suppress temporary .#files.
(file-notify-test02-events, file-notify-test04-file-validity):
Rework `stopped' events.
(file-notify-test05-dir-validity): Wait for events when appropriate.

9 years ago* src/keyboard.c (post-command-hook): Shorten docstring
Artur Malabarba [Mon, 26 Oct 2015 10:05:09 +0000 (10:05 +0000)]
* src/keyboard.c (post-command-hook): Shorten docstring

9 years agoFix infinite loop in sh-script's SMIE code
Tassilo Horn [Mon, 26 Oct 2015 07:01:18 +0000 (08:01 +0100)]
Fix infinite loop in sh-script's SMIE code

* lisp/progmodes/sh-script.el (sh-smie-sh-forward-token): Fix infinite
loop (bug#21747).

9 years ago* lisp/isearch.el (search-default-regexp-mode): Revert to nil
Artur Malabarba [Mon, 26 Oct 2015 01:38:48 +0000 (01:38 +0000)]
* lisp/isearch.el (search-default-regexp-mode): Revert to nil

Character-fold search _still_ doesn't play well with
lax-whitespace.  So disable it by default (again) for now.

9 years ago* lisp/isearch.el: No visual feedback for default search mode
Artur Malabarba [Mon, 26 Oct 2015 00:51:02 +0000 (00:51 +0000)]
* lisp/isearch.el: No visual feedback for default search mode

During an isearch where character-folding is the default, we don't
want to take up minibuffer space just to tell the user that
"Char-fold " is on.  The same goes for other modes, if the user
changes the default.  In contrast, if the user toggles OFF the
default mode, they should see "Literal", to distinguish it from
the default mode.

(isearch--describe-regexp-mode): Return "" if describing the
default mode, and return "literal " if describing a plain search
and it is not default.

9 years ago* test/automated/simple-test.el: New file
Artur Malabarba [Sat, 24 Oct 2015 22:43:06 +0000 (23:43 +0100)]
* test/automated/simple-test.el: New file

Define tests for `newline' and `open-line'.

9 years ago* lisp/simple.el (open-line): Integrate with electric-indent-mode
Artur Malabarba [Sat, 24 Oct 2015 21:26:27 +0000 (22:26 +0100)]
* lisp/simple.el (open-line): Integrate with electric-indent-mode

Also run `post-self-insert-hook' when called interactively.

9 years ago* lisp/simple.el (open-line): Fix docstring
Artur Malabarba [Sat, 24 Oct 2015 21:24:09 +0000 (22:24 +0100)]
* lisp/simple.el (open-line): Fix docstring

Also explain apparently redundant line.

9 years agoSync with soap-client repository, version 3.0.1
Thomas Fitzsimmons [Sun, 25 Oct 2015 21:00:37 +0000 (17:00 -0400)]
Sync with soap-client repository, version 3.0.1

* soap-client.el, soap-inspect.el: Bump version to 3.0.1.

* soap-client.el, soap-inspect.el: Update home page.

* soap-client.el, soap-inspect.el: Bump version to 3.0.0.

* soap-inspect.el: Merge in changes from Emacs master branch.

* soap-client.el: Merge in changes from Emacs master branch.

* soap-inspect.el: Shorten first line description.

* soap-client.el: Make a small whitespace fix.

* soap-inspect.el: Update copyright years.

* soap-client.el (soap-encoded-namespaces): Move above first use
in soap-encode-xs-element.

* soap-client.el (soap-type-is-array?): new defun
(soap-encode-xs-element): handle array elements in this function
(soap-encode-xs-complex-type): flag error if asked to encode an
array type, this is handled in `soap-encode-xs-element'

* soap-inspect.el (soap-inspect-xs-attribute-group): Do not print
type for attribute group.

* soap-inspect.el (soap-sample-value-for-xs-attribute-group): New
function.
(soap-inspect-xs-attribute-group): Likewise.

* soap-inspect.el
(soap-resolve-references-for-xs-attribute-group): Resolve
references of attributes in an attribute group.

* soap-client.el (soap-decode-xs-attributes): Process attribute
type directly, not through soap-wsdl-get.

* soap-client.el (soap-xs-parse-attribute): Leave reference nil if
reference attribute is nil.

* soap-client.el (soap-resolve-references-for-xs-attribute):
Convert XML schema attributes to xsd:string.

* soap-inspect.el (soap-sample-value-for-xs-attribute): New
function.
(soap-sample-value-for-xs-simple-type): Prepend attributes to
result.
(soap-sample-value-for-xs-complex-type): Likewise.
(soap-inspect-xs-attribute): New function.
(soap-inspect-xs-simple-type): Print attributes.
(soap-inspect-xs-complex-type): Likewise.

* soap-inspect.el (soap-resolve-references-for-xs-simple-type):
Resolve references for attributes.
(soap-resolve-references-for-xs-complex-type): Likewise.

* soap-client.el (soap-xml-node-find-matching-child): Rename from
soap-xml-node-first-child.
(soap-xs-parse-attribute): Call soap-xml-node-find-matching-child.
(soap-xs-parse-simple-type): Likewise.

* soap-client.el (soap-invoke-async): Add error checking.

* soap-client.el (soap-invoke-internal): New function.
(soap-invoke-async): Call soap-invoke-internal.
(soap-invoke): Likewise.

* soap-client.el (soap-invoke-async): Ensure buffer passed to
url-retrieve callback is killed.

* soap-client.el (soap-parse-wsdl-phase-validate-node): Rename
function.
(soap-parse-wsdl-phase-fetch-imports): Likewise.
(soap-parse-wsdl-phase-parse-schema): Likewise.
(soap-parse-wsdl-phase-fetch-schema): Likewise.
(soap-parse-wsdl-phase-finish-parsing): Likewise.
(soap-parse-wsdl): Update calls.

* soap-client.el (soap-invoke-async): Fix callback invocation.

* soap-client.el (soap-invoke-async): New function.
(soap-invoke): Reimplement using soap-invoke-async.

* soap-client.el (soap-parse-server-response): Improve docstring.
(soap-invoke): Inline call to soap-parse-server-response.

* soap-client.el (soap-decode-xs-complex-type): Prevent incorrect
warning.

* soap-client.el (soap-parse-server-response): Rename
soap-process-url-response.  Destroy the mime part.
(soap-invoke): Call soap-parse-server-response.

* soap-client.el: Update copyright date.

* soap-client.el: Fix checkdoc issues.

* soap-client.el: Fix indentation and long lines.

* soap-client.el (soap-time-format): Remove variable.
(soap-encode-xs-basic-type): Simplify date-time format detection.
(soap-decode-xs-basic-type): Remove soap-time-format support.

* soap-client.el (soap-process-url-response): New function.
(soap-fetch-xml-from-url): Call soap-process-url-response.
(soap-parse-wsdl-phase-1): New function.
(soap-parse-wsdl-phase-2): Likewise.
(soap-parse-wsdl-phase-3): Likewise.
(soap-parse-wsdl-phase-4): Likewise.
(soap-parse-wsdl-phase-5): Likewise.
(soap-parse-wsdl): Call phase functions.

* soap-client.el (soap-decode-xs-basic-type): Remove one-argument
and call.

* soap-client.el (soap-decode-date-time): Improve docstring.

* soap-client.el (soap-xmlschema-imports): Remove variable.
(soap-parse-schema): Add wsdl argument.  Look up XML schema
imports from wsdl.
(soap-load-wsdl): Do not set soap-xmlschema-imports.
(soap-parse-wsdl): Get XML schema imports from wsdl.

* soap-client.el (soap-current-file): Remove variable.
(soap-wsdl): Add current-file slot.
(soap-fetch-xml-from-url): Add wsdl argument.  Look up current
file from wsdl.
(soap-fetch-xml-from-file): Likewise.
(soap-fetch-xml): Likewise.
(soap-load-wsdl): Always create wsdl object first.
(soap-parse-wsdl): Pass wsdl to soap-fetch-xml.

* soap-client.el (soap-xs-element): Add is-group slot.
(soap-xs-parse-element): Set is-group slot.
(soap-resolve-references-for-xs-element): Skip is-group elements.
(soap-xs-complex-type): Add is-group slot.
(soap-xs-parse-complex-type): Set is-group slot.
(soap-xs-parse-sequence): Parse xsd:group elements.
(soap-resolve-references-for-xs-complex-type): Inline elements
from referenced xsd:group nodes.
(soap-parse-schema): Parse xsd:group nodes.

* soap-client.el (soap-invoke): Don't set url-http-version to 1.0.

* soap-client.el (soap-decode-xs-complex-type): Allow choice nodes
to accept multiple values.

* soap-client.el (soap-encode-body): Check parameters argument for
extra header values.

* soap-client.el (soap-well-known-xmlns): Add wsa and wsaw tags.
(soap-operation): Add input-action and output-action slots.
(soap-parse-operation): Parse wsaw:Action nodes.
(soap-encode-body): Encode service-url for WS-Addressing.
(soap-create-envelope): Likewise.
(soap-invoke): Update soap-create-envelope call to provide
service-url argument.

* soap-client.el (soap-decode-xs-complex-type): Support xsi:type
override attribute.
(soap-decode-array): Likewise.

* soap-client.el (soap-parse-schema): Handle location attribute.

* soap-client.el (soap-decode-type): Check that multiRef matched
validation regexp.

* soap-client.el (soap-encode-xs-simple-type): Encode xsd:list
nodes.
(soap-decode-xs-simple-type): Decode xsd:list nodes.

* soap-client.el (soap-get-candidate-elements): Fix reference
handling.

* soap-client.el (soap-xs-simple-type): Add is-list slot.
(soap-xs-parse-simple-type): Call soap-xs-add-list for xsd:list
nodes.
(soap-xs-add-list): New function.

* soap-client.el (soap-encode-xs-element): When a boolean is
expected, interpret nil as "false".

* soap-client.el (soap-make-xs-basic-types): Add gYearMonth,
gYear, gMonthDay, gDay and gMonth.

* soap-client.el (soap-time-format): New variable.
(soap-encode-xs-basic-type): Handle dateTime, time, date,
gYearMonth, gYear, gMonthDay, gDay and gMonth.
(soap-decode-date-time): New function.
(soap-decode-xs-basic-type): Use soap-decode-date-time.

* soap-client.el (soap-encode-xs-basic-type): Validate value after
encoding.
(soap-decode-xs-basic-type): Validate value before decoding.

* soap-client.el (soap-validate-xs-basic-type): New function.
(soap-validate-xs-simple-type): Call soap-validate-xs-basic-type.

* soap-client.el (soap-xs-add-union): Append result to base
instead of overwriting it.
(soap-validate-xs-simple-type): Add union support.

* soap-client.el (soap-xs-add-restriction): Translate pattern to
Emacs regexp using xsdre-translate.
(soap-validate-xs-simple-type): Validate value against pattern.

* soap-client.el (soap-xs-add-union): Preserve WSDL order of
inline simpleType nodes.
(soap-decode-type): Handle union types.

* soap-client.el (soap-decode-xs-attributes): Decode basic-type
attributes.

* soap-client.el (soap-get-xs-attributes-from-groups): renamed
from soap-xs-attribute-group-consolidate, all callers updated
(soap-get-xs-attributes): renamed from
soap-xs-attributes-consolidate, all callers updated

* soap-client.el (soap-xs-type): Add attribute-group slot.
(soap-xs-attribute-group): New type.
(soap-xs-parse-attribute-group): New function.
(soap-resolve-references-for-xs-attribute-group): Likewise.
(soap-xs-add-extension): Handle attribute groups.
(soap-resolve-references-for-xs-simple-type): Likewise.
(soap-xs-parse-complex-type): Likewise.
(soap-xs-parse-extension-or-restriction): Likewise.
(soap-resolve-references-for-xs-complex-type): Likewise.
(soap-xs-attribute-group-consolidate): New function.
(soap-xs-attributes-consolidate): Handle attribute groups.
(soap-parse-schema): Likewise.

* soap-client.el (soap-encode-xs-basic-type): Fix boolean
encoding.

* soap-client.el (soap-encode-xs-complex-type): Print ref element
names in warnings.

* soap-client.el (soap-decode-xs-complex-type): Fix splicing.

* soap-client.el (soap-decode-xs-complex-type): Eliminate invalid
warnings for choice types.

* soap-client.el (soap-encode-xs-complex-type-attributes): Also
encode base type attributes.

* soap-client.el (soap-encode-xs-complex-type): Fix compilation
warning.  Print e-name in warnings, or element if e-name is nil.

* soap-client.el (soap-xs-element): Add alternatives slot.
(soap-xs-parse-element): Set substitution-group.
(soap-resolve-references-for-xs-element): Populate alternatives
slot.
(soap-get-candidate-elements): New function.
(soap-encode-xs-complex-type): Iterate through all candidate
elements.  Handle types with nil type indicator.  Fix warning
logic.

* soap-client.el (soap-current-wsdl): moved declaration earlier in
the file to prevent compiler warning.

* soap-client.el (soap-node-optional): New function.
(soap-node-multiple): Likewise.
(soap-xs-parse-element): Call soap-node-optional and
soap-node-multiple.
(soap-xs-complex-type): Add optional? and multiple? slots.
(soap-xml-get-children-fq): New function.
(soap-xs-element-get-fq-name): Likewise.
(soap-xs-complex-type-optional-p): Likewise.
(soap-xs-complex-type-multiple-p): Likewise.
(soap-xs-attributes-consolidate): Likewise.
(soap-decode-xs-attributes): Likewise.
(soap-decode-xs-complex-type): Decode types with nil type
indicator.  Support children that use local namespaces.  Decode
attributes.  Add type considerations to optional? and multiple?
warnings.

* soap-client.el (soap-xs-parse-extension-or-restriction): Store
parsed attributes.
(soap-encode-xs-complex-type-attributes): Encode custom
attributes.

* soap-client.el (soap-encode-xs-complex-type-attributes): don't
add the xsi:type attribute (Exchange refuses requests which have
this attribute)

* soap-client.el, soap-inspect.el: converted to lexical binding,
corrected compiler warnings about unused function arguments and
local variables.

* soap-client.el (soap-decode-xs-complex-type): Handle nil type
indicator.
(soap-parse-envelope): Handle response headers.
(soap-parse-response): Likewise.  Only return non-nil decoded
values.

* soap-client.el (soap-validate-xs-simple-type): Return validated
value.

* soap-client.el (soap-xs-parse-element)
(soap-xs-parse-simple-type)
(soap-xs-parse-complex-type)
(soap-parse-message)
(soap-parse-operation): add the current namespace to the element
being created
(soap-resolve-references-for-xs-element)
(soap-resolve-references-for-xs-simple-type)
(soap-resolve-references-for-xs-complex-type)
(soap-resolve-references-for-operation): resolve the namespace to
the namespace tag
(soap-make-wsdl): specify a namespace tag when creating the xsd
and soapenc namespaces
(soap-wsdl-resolve-references): don't update namespace tags in
elements here
(soap-parse-port-type): bind the urn: to soap-target-xmlns
(soap-encode-body): don't add nil namespace tags to
soap-encoded-namespaces

* soap-inspect.el: use `soap-make-wsdl` to construct the object
for registering the soap-inspect method.Make debbugs tests pass
* soap-client.el (soap-decode-any-type): use soap-l2fq on the type
name, also skip string only nodes when decoding a structure.
(soap-xs-parse-complex-type): (BUG) dispatch parsing for choice
types too
(soap-encode-body): grab the header value from the param table

* soap-client.el (soap-should-encode-value-for-xs-element): new
function
(soap-encode-xs-element): don't encode nil value unless needed

* soap-client.el (soap-bound-operation): new slot `soap-body`
(soap-parse-binding): parse the message parts required in the body
(soap-encode-body): encode only the parts that are declared to be
part of the body

* soap-client.el (soap-encode-xs-element): use the fq name when
writing out the tag.
(soap-encode-body): remove hack that inserts the xmlns in the
element attributes list.

* soap-client.el (soap-xs-attribute): add "default" slot
(soap-xs-parse-attribute): default slot is set from the XML
"fixed" attribute.
(soap-encode-xs-complex-type-attributes): encode any attributes
that have a default value.  Also, don't put the xsi:nil attribute
when the complex type has no content anyway.

* soap-client.el (soap-well-known-xmlns): add the xml namespace
(soap-local-xmlns): start with the xml namespace
(soap-xml-node-first-child): skip xsd:annotation nodes too
(soap-make-xs-basic-types): more xsd types added
(soap-encode-xs-basic-type, soap-decode-xs-basic-type): handle
"language", "time", "date", "nonNegativeInteger"
(soap-resolve-references-for-xs-element): don't signal an error if
the element does not have a type.
(soap-xs-parse-simple-type): subtypes are handled with ecase,
added stum for xsd:list
(soap-xs-add-union): call soap-l2fq on all union members
(soap-xs-add-extension): call soap-l2fq on the base member
(soap-resolve-references-for-xs-simple-type): don't signal an
error if the simple type has no base.
(soap-resolve-references-for-xs-simple-type): bugfix, call
soap-wsdl-get on each type of the base

* soap-client.el (soap-resolve-references-for-xs-attribute):
referenced type can be eiher a simple type or a basic type
(soap-xs-add-restriction)
(soap-xs-parse-extension-or-restriction): use `soap-l2fq' on base
(soap-make-xs-basic-types)
(soap-encode-xs-basic-type, soap-decode-xs-basic-type): add
support for more XMLSchema basic types
(soap-current-file, soap-xmlschema-imports): new defvars
(soap-parse-schema): add locations from xsd:import tags to
`soap-xmlschema-imports'
(soap-wsdl): make destructor private
(soap-make-wsdl): new defun, SOAP-WSDL object constructor
(soap-wsdl-add-alias): check if we try to replace aliases
(soap-fetch-xml-from-url, soap-fetch-xml-from-file)
(soap-fetch-xml): new defuns
(soap-load-wsdl): updated to load the WSDL from either a file or
an url
(soap-load-wsdl-from-url): now an alias to `soap-load-wsdl'
(soap-parse-wsdl): process wsdl:import tags and imports from
`soap-xmlschema-imports'
* soap-client.el (soap-l2wk): bugfix: call symbolp instead of
symbol-name
(soap-l2fq): make the name part always a string
(soap-name-p): new defun, used for name tests

* soap-inspect.el (soap-sample-value-for-xs-complex-type): supply
sample values for choice types with a special tag
* soap-client.el (soap-encode-xs-complex-type): handle anonymous
elements correctly
(soap-encode-value): accept nodes that have no namespace tag

* soap-client.el (soap-invoke): encode the string for
`url-request-data' as UTF-8. Fixes issue 16

Co-authored-by: Alexandru Harsanyi <AlexHarsanyi@gmail.com>
9 years ago* lisp/progmodes/grep.el (grep): Doc fix. (Bug#21754)
Eli Zaretskii [Sun, 25 Oct 2015 20:05:44 +0000 (22:05 +0200)]
* lisp/progmodes/grep.el (grep): Doc fix.  (Bug#21754)

9 years ago* src/keyboard.c (post-command-hook): Extend the docstring
Artur Malabarba [Sun, 25 Oct 2015 14:34:18 +0000 (14:34 +0000)]
* src/keyboard.c (post-command-hook): Extend the docstring

Mainly, explain how to use it without hanging Emacs, or giving the
impression that it is hanging.  Also mention `pre-command-hook'.

(pre-command-hook): Mention `post-command-hook'.

9 years ago* lisp/custom.el (custom-declare-variable): Shorten code again
Artur Malabarba [Sun, 25 Oct 2015 11:24:40 +0000 (11:24 +0000)]
* lisp/custom.el (custom-declare-variable): Shorten code again

Without using pcase this time.  We can't use pcase because it is loaded
after custom in loadup.el.  Also add a comment explaining this to future
dummies like me.

9 years ago; ChangeLog.2 fixes
Juanma Barranquero [Sun, 25 Oct 2015 14:00:58 +0000 (15:00 +0100)]
; ChangeLog.2 fixes

9 years agoDocument file notification `stopped' event
Michael Albinus [Sun, 25 Oct 2015 13:59:45 +0000 (14:59 +0100)]
Document file notification `stopped' event

* doc/lispref/os.texi (File Notifications): Document `stopped event'.

9 years agoIntroduce `stopped' event in file notification
Michael Albinus [Sun, 25 Oct 2015 13:18:17 +0000 (14:18 +0100)]
Introduce `stopped' event in file notification

* lisp/filenotify.el (file-notify--rm-descriptor): New defun.
(file-notify-rm-watch): Use it.
(file-notify-callback): Implement `stopped' event.
(file-notify-add-watch): Mention `stopped' in the docstring.
Check, that upper directory exists.

* test/automated/file-notify-tests.el (file-notify-test01-add-watch):
Add two test cases.
(file-notify-test02-events): Handle also `stopped' event.
(file-notify-test04-file-validity): Add another test case.

9 years ago; Auto-commit of ChangeLog files.
Glenn Morris [Sun, 25 Oct 2015 10:23:48 +0000 (06:23 -0400)]
; Auto-commit of ChangeLog files.

9 years agoRevert commit that broke 'make bootstrap'
Paul Eggert [Sun, 25 Oct 2015 07:29:42 +0000 (00:29 -0700)]
Revert commit that broke 'make bootstrap'

* lisp/custom.el (custom-declare-variable): Revert commit
79fac080d277fed07b3c192890ad59d36d9f83b6.  custom.el needs to work
even when pcase has not been defined yet, when doing bootstrapping.

9 years agoPort recent inline functions fix to Standard C
Paul Eggert [Sun, 25 Oct 2015 06:51:19 +0000 (23:51 -0700)]
Port recent inline functions fix to Standard C

* src/lisp.h (LISP_MACRO_DEFUN, LISP_MACRO_DEFUN_VOID): Remove.
All uses rewritten to define the function directly rather than to
use a macro to define the function.  This conforms to Standard C,
which does not allow stray semicolons at the top level.  I hope it
also avoids the problems with TAGS.  Those macros, though clever,
were pretty confusing anyway, and it wasn’t clear they were worth
the aggravation even without the TAGS problem.

9 years ago* lisp/isearch.el: Make character-fold search the default again
Artur Malabarba [Sun, 25 Oct 2015 00:52:01 +0000 (01:52 +0100)]
* lisp/isearch.el: Make character-fold search the default again

9 years ago* lisp/character-fold.el: Many improvements
Artur Malabarba [Sun, 25 Oct 2015 00:43:23 +0000 (01:43 +0100)]
* lisp/character-fold.el: Many improvements

(character-fold-search-forward, character-fold-search-backward):
New command
(character-fold-to-regexp): Remove lax-whitespace hack.
(character-fold-search): Remove variable.  Only isearch and
query-replace use char-folding, and they both have their own
variables to configure that.

9 years ago* lisp/isearch.el: Generalize definition of regexp-function toggles
Artur Malabarba [Sun, 25 Oct 2015 00:31:04 +0000 (01:31 +0100)]
* lisp/isearch.el: Generalize definition of regexp-function toggles

(isearch-specify-regexp-function): New macro for specifying
possible values of `isearch-regexp-function'.

(isearch-toggle-character-fold, isearch-toggle-symbol)
(isearch-toggle-word): Define with `isearch-specify-regexp-function'.

9 years ago* lisp/isearch.el (search-default-regexp-mode): New variable
Artur Malabarba [Sat, 24 Oct 2015 23:42:29 +0000 (00:42 +0100)]
* lisp/isearch.el (search-default-regexp-mode): New variable

(isearch-mode): Use it.

9 years ago* lisp/isearch.el: Delete redundant :group entries
Artur Malabarba [Sat, 24 Oct 2015 23:11:37 +0000 (00:11 +0100)]
* lisp/isearch.el: Delete redundant :group entries

(search-exit-option, search-slow-window-lines)
(search-slow-speed, search-upper-case)
(search-nonincremental-instead, search-whitespace-regexp)
(search-invisible, isearch-hide-immediately)
(isearch-resume-in-command-history, search-ring-max)
(regexp-search-ring-max, search-ring-update, search-highlight)
(isearch-fail): Delete :group entries.

9 years ago* lisp/custom.el (custom-declare-variable): Shorten code a bit
Artur Malabarba [Sun, 25 Oct 2015 00:37:17 +0000 (01:37 +0100)]
* lisp/custom.el (custom-declare-variable): Shorten code a bit

9 years agoaddpm.c: Silence some warnings.
Juanma Barranquero [Sat, 24 Oct 2015 22:58:08 +0000 (00:58 +0200)]
addpm.c: Silence some warnings.

* nt/addpm.c (DdeCommand): Cast pData argument of DdeClientTransaction
to LPBYTE.
(add_registry): Pass NULL to optional lpClass argument of
RegCreateKeyEx, not an empty string.

9 years agoaddpm.c: Do not add obsolete GTK libraries to the path.
Juanma Barranquero [Sat, 24 Oct 2015 22:20:03 +0000 (00:20 +0200)]
addpm.c: Do not add obsolete GTK libraries to the path.

* nt/addpm.c (REG_GTK, REG_RUNEMACS_PATH): Delete.
(add_registry): Remove variables `size' and `gtk_key'.
Do not add the GTK DLL directory to the library search path; it is
confusing behavior (in particular, the same Emacs version with and
without invoking addpm will use a different path), and the GTK image
libraries are obsolete anyway.

9 years agoaddpm.c: Replace existing entries, but do not create new ones
Juanma Barranquero [Sat, 24 Oct 2015 02:31:30 +0000 (04:31 +0200)]
addpm.c: Replace existing entries, but do not create new ones

* nt/addpm.c (add_registry): If the Emacs registry key exists, replace
existing values from previous versions, but do not add new ones; the
key could exist for other reasons unrelated to old Emacsen, like X-style
resources, or to set some environment variables like HOME or LANG, and
in that case we don't want to populate it with obsolete values.

9 years ago* nt/addpm.c (add_registry): Do not compute unused return value.
Juanma Barranquero [Sat, 24 Oct 2015 02:01:22 +0000 (04:01 +0200)]
* nt/addpm.c (add_registry): Do not compute unused return value.

9 years agoaddpm.c: Don't pass REG_OPTION_NON_VOLATILE to RegOpenKeyEx
Juanma Barranquero [Sat, 24 Oct 2015 01:22:50 +0000 (03:22 +0200)]
addpm.c: Don't pass REG_OPTION_NON_VOLATILE to RegOpenKeyEx

* nt/addpm.c (add_registry): Pass 0 to ulOptions argument of
RegOpenKeyEx, not REG_OPTION_NON_VOLATILE.  This doesn't change
current behavior because REG_OPTION_NON_VOLATILE is defined to
be 0L anyway, but that option is actually documented only for
RegCreateKeyEx.

9 years ago* src/w32notify.c (Fw32notify_add_watch): Fix version check.
Juanma Barranquero [Sat, 24 Oct 2015 22:00:26 +0000 (00:00 +0200)]
* src/w32notify.c (Fw32notify_add_watch): Fix version check.

9 years agoUpdate frame title when redisplay scrolls selected window
Eli Zaretskii [Sat, 24 Oct 2015 15:54:15 +0000 (18:54 +0300)]
Update frame title when redisplay scrolls selected window

* src/xdisp.c (redisplay_window): Reconsider the frame's title
when the mode-line of the frame's selected window needs to be
updated.

9 years agoUpdate frame title when scrolling the selected window
Eli Zaretskii [Sat, 24 Oct 2015 15:41:32 +0000 (18:41 +0300)]
Update frame title when scrolling the selected window

* src/window.c (wset_update_mode_line): New function, sets either the
window's update_mode_line flag or the global update_mode_lines
variable.
(Fset_window_start, set_window_buffer, window_scroll_pixel_based)
(window_scroll_line_based): Call it instead of only setting the
window's update_mode_line flag.

9 years agoAn even better fix for bug#21739
Eli Zaretskii [Sat, 24 Oct 2015 14:58:34 +0000 (17:58 +0300)]
An even better fix for bug#21739

* src/window.c (set_window_buffer): If the window is the frame's
selected window, set update_mode_lines, not the window's
update_mode_line flag.  (Bug#21739)
* src/buffer.c (Fkill_buffer): Undo last change.
(set_update_modelines_for_buf): Function deleted.

9 years ago; * src/xdisp.c (redisplay_internal): Improve commentary.
Eli Zaretskii [Sat, 24 Oct 2015 14:16:14 +0000 (17:16 +0300)]
; * src/xdisp.c (redisplay_internal): Improve commentary.

9 years ago; * src/xdisp.c: Fix typo.
Ken Brown [Sat, 24 Oct 2015 14:12:01 +0000 (10:12 -0400)]
; * src/xdisp.c: Fix typo.

9 years agoSync with soap-client repository, version 3.0.0
Thomas Fitzsimmons [Sat, 24 Oct 2015 12:33:18 +0000 (08:33 -0400)]
Sync with soap-client repository, version 3.0.0

9 years agoUpdate the new icon
Nicolas Petton [Sat, 24 Oct 2015 11:35:11 +0000 (13:35 +0200)]
Update the new icon

Move the E slightly to the right in the circle.

* etc/images/icons/hicolor/128x128/apps/emacs.png:
* etc/images/icons/hicolor/16x16/apps/emacs.png:
* etc/images/icons/hicolor/24x24/apps/emacs.png:
* etc/images/icons/hicolor/32x32/apps/emacs.png:
* etc/images/icons/hicolor/48x48/apps/emacs.png:
* etc/images/icons/hicolor/scalable/apps/emacs.svg:
* nextstep/Cocoa/Emacs.base/Contents/Resources/Emacs.icns:
* nt/icons/emacs.ico: New icom update.

9 years agoAvoid missing inline functions from lisp.h in TAGS
Eli Zaretskii [Sat, 24 Oct 2015 10:27:52 +0000 (13:27 +0300)]
Avoid missing inline functions from lisp.h in TAGS

* src/lisp.h (LISP_MACRO_DEFUN): Mention in the commentary the
need to end each invocation with a semi-colon.
Add a semi-colon at the end of each invocation of LISP_MACRO_DEFUN
and LISP_MACRO_DEFUN_VOID.  This is to avoid missing in TAGS
inline functions defined immediately after each invocation, and
also avoid tagging every invocation of these macros.

9 years ago; Auto-commit of loaddefs files.
Glenn Morris [Sat, 24 Oct 2015 10:18:36 +0000 (06:18 -0400)]
; Auto-commit of loaddefs files.

9 years ago; * src/xdisp.c: Improve commentary for 'update_mode_lines'.
Eli Zaretskii [Sat, 24 Oct 2015 08:23:10 +0000 (11:23 +0300)]
; * src/xdisp.c: Improve commentary for 'update_mode_lines'.

9 years agoA better fix for bug#21739
Eli Zaretskii [Sat, 24 Oct 2015 07:03:07 +0000 (10:03 +0300)]
A better fix for bug#21739

* src/buffer.c (set_update_modelines_for_buf): New function.
(Fkill_buffer): Use it to set the global variable
update_mode_lines if the killed buffer was displayed in some
window.  Don't set windows_or_buffers_changed.  This is a better
fix for bug#21739 than the previous fix, since it will cause only
redisplay of mode lines, not of entire windows, but will still
catch attention of x_consider_frame_title in xdisp.c, which
redraws the frame title.

9 years agoAdd support for tar.bz2 and tar.xz archives
Tassilo Horn [Sat, 24 Oct 2015 05:38:10 +0000 (07:38 +0200)]
Add support for tar.bz2 and tar.xz archives

* lisp/dired-aux.el (dired-compress-files-alist): Add support for
tar.bz2 and tar.xz archives.

9 years ago; NEWS tweak
Xue Fuqiao [Sat, 24 Oct 2015 02:42:00 +0000 (10:42 +0800)]
; NEWS tweak

9 years agoFix infloop in redisplay introduced by a recent change
Eli Zaretskii [Fri, 23 Oct 2015 20:06:57 +0000 (23:06 +0300)]
Fix infloop in redisplay introduced by a recent change

* src/xdisp.c (redisplay_internal): Avoid inflooping when
redisplaying the selected window sets the selected frame's
redisplay flag.  (Bug#21745)

9 years ago* lisp/emacs-lisp/thunk.el: Better documentation.
Nicolas Petton [Fri, 23 Oct 2015 16:06:54 +0000 (18:06 +0200)]
* lisp/emacs-lisp/thunk.el: Better documentation.

9 years agoReplace the old icon for Windows and Mac OSX
Nicolas Petton [Fri, 23 Oct 2015 14:22:22 +0000 (16:22 +0200)]
Replace the old icon for Windows and Mac OSX

* nt/icons/emacs.ico:
* nextstep/Cocoa/Emacs.base/Contents/Resources/Emacs.icns: Use the new
icons.

9 years ago`load-path' should contain only directory names
Stephen Leake [Fri, 23 Oct 2015 13:52:01 +0000 (08:52 -0500)]
`load-path' should contain only directory names

* lisp/emacs-lisp/package.el (package-autoload-ensure-default-file):
`load-path' should contain only directory names

9 years agoNew library thunk.el
Nicolas Petton [Fri, 23 Oct 2015 11:20:45 +0000 (13:20 +0200)]
New library thunk.el

thunk.el is extracted from stream.el in ELPA, with additional tests.

* lisp/emacs-lisp/thunk.el: New file.
* test/automated/thunk-tests.el: New file.
* etc/NEWS: Add information about thunk.el

9 years agoFix Bug#21669
Michael Albinus [Fri, 23 Oct 2015 11:14:09 +0000 (13:14 +0200)]
Fix Bug#21669

* lisp/filenotify.el (file-notify-rm-watch): Improve check for
calling low-level functions.

* test/automated/file-notify-tests.el (file-notify--test-timeout):
Decrase to 6 seconds for remote directories.
(file-notify-test02-events): Expect different number of
`attribute-changed' events for the local and remote cases.  Apply
short delays between the operations, in order to receive all
events in the remote case.  Combine `attribute-change' tests.
(Bug#21669)

9 years agoDecode the HTML source when displaying it in EWW
Eli Zaretskii [Fri, 23 Oct 2015 09:23:23 +0000 (12:23 +0300)]
Decode the HTML source when displaying it in EWW

* lisp/net/eww.el (eww-view-source): Decode the HTML source
according to its headers.

9 years agoNew default icon
Nicolas Petton [Thu, 22 Oct 2015 14:24:34 +0000 (16:24 +0200)]
New default icon

* etc/images/icons/hicolor/128x128/apps/emacs23.png:
* etc/images/icons/hicolor/16x16/apps/emacs23.png:
* etc/images/icons/hicolor/24x24/apps/emacs23.png:
* etc/images/icons/hicolor/32x32/apps/emacs23.png:
* etc/images/icons/hicolor/48x48/apps/emacs23.png:
* etc/images/icons/hicolor/scalable/apps/emacs23.svg:
* etc/images/icons/hicolor/scalable/mimetypes/emacs-document23.svg: Move
  the old logo files to emacs23.*.
* etc/images/icons/hicolor/128x128/apps/emacs.png:
* etc/images/icons/hicolor/16x16/apps/emacs.png:
* etc/images/icons/hicolor/24x24/apps/emacs.png:
* etc/images/icons/hicolor/32x32/apps/emacs.png:
* etc/images/icons/hicolor/48x48/apps/emacs.png:
* etc/images/icons/hicolor/scalable/apps/emacs.svg:
* etc/images/icons/hicolor/scalable/mimetypes/emacs-document.svg: New files.
* etc/images/icons/README: Update the copyright information.

9 years agoFix redisplay of frame title when current buffer is killed
Eli Zaretskii [Fri, 23 Oct 2015 08:47:27 +0000 (11:47 +0300)]
Fix redisplay of frame title when current buffer is killed

* src/buffer.c (Fkill_buffer): Set windows_or_buffers_changed to a
non-zero value, to redisplay more than just the affected windows.
(Bug#21739)

9 years agoNextSten maximization and NSTRACE rewrite.
Anders Lindgren [Fri, 23 Oct 2015 05:58:02 +0000 (07:58 +0200)]
NextSten maximization and NSTRACE rewrite.

Full-height, full-width, and maximized windows now cover the
entire screen (except the menu bar), including the part where the
system dock is placed.  The system zoom animation is no longer
used.

Made NonMaximized->FullWidth->FullHeight->NonMaximized restore the
original size.

* nsterm.m (ns_menu_bar_height): New function, return height of
the menu bar, or 0 when it's hidden.
* nsterm.m (constrain_frame_rect): New function for constraining a
frame.
* nsterm.m (ns_constrain_all_frames): Set frame size explicitly
rather than relying on the system doing it for us by writing back
the current frame size.
* nsterm.m (windowWillUseStandardFrame): Register non-maximized
width or height as new user size.  When entering full width or
height, the other size component is taken from the user size.
* nsterm.m (fullscreenState): New method for accessing the
fullscreen state.
* nsterm.m (constrainFrameRect): Restrict frame to be placed under
the menu bar, if present.  The old version, sometimes, restricted
the height of a frame to the screen, this version never does this.
* nsterm.m (zoom): Perform zoom by setting the frame to the full
size of the screen (minus the menu bar).  The default system
function, with the zoom animation, is no longer used, as the final
frame size doesn't cover the entire screen.

Rework how to constrain resizing to the character grid.  The old
system used "resizeIncrements" in NSWindows.  However, once a frame
was resized so that it was not aligned to the text grid, it
remained unaligned even after a resize.  In addition, it conflicted
when resizing a fullheight window.

* nsterm.m (windowWillResize): Restrict frame size to text grid,
unless when pixelwise frame resizing is enabled.
* nsterm.m (updateFrameSize, initFrameFromEmacs)
(toggleFullScreen, handleFS): Don't set resizeIncrements.

Redesign the NS trace system.  The call structure is represented
using indentations and vertical lines.  The NSTRACE macro accepts
printf-style arguments.  New macros for printing various
information.

* nsterm.h (NSTRACE_ENABLED): Macro to enable trace system.
* nsterm.h (NSTRACE, NSTRACE_WHEN, NSTRACE_UNLESS): Macros to
start a new block (typically a function), accept printf-style
arguments.
* nsterm.h (NSTRACE_MSG): Macro for extra information, accepts
printf-style arguments.
* nsterm.h (NSTRACE_what): Macros for printing various types.
* nsterm.h (NSTRACE_FMT_what): Macro with printf format string
snippets.
* nsterm.h (NSTRACE_ARG_what): Macros for passing printf-style
arguments, corresponds to NSTRACE_FMT_what.
* nsterm.h (NSTRACE_RETURN): Macro to print return value, accept
printf-style arguments.
* nsterm.h (NSTRACE_RETURN_what): Macros to print return value for
various types.

* nsterm.m: Remove old NSTRACE macro.
* nsterm.m (nstrace_num): Trace counter.
* nsterm.m (nstrace_depth): Current call depth.
* nsterm.m (nstrace_leave): NSTRACE support function, called when
the local variable "nstrace_enabled" goes out of scope using the
"cleanup" extension.
* nsterm.m (ns_print_fullscreen_type_name): NSTRACE_FSTYPE support
function.
* nsterm.m (constrain_frame_rect, ns_constrain_all_frames)
(ns_update_auto_hide_menu_bar, ns_update_begin)
(ns_update_window_begin, update_window_end, ns_update_end)
(ns_focus, ns_unfocus, ns_ring_bell, ns_frame_raise_lower)
(ns_frame_rehighlight, x_make_frame_visible)
(x_make_frame_invisible, x_iconify_frame, x_free_frame_resources)
(x_destroy_window, x_set_offset, x_set_window_size)
(ns_fullscreen_hook, ns_lisp_to_color, ns_color_to_lisp)
(ns_defined_color, frame_set_mouse_pixel_position)
(note_mouse_movement, ns_mouse_position, ns_frame_up_to_date)
(ns_define_frame_cursor, x_get_keysym_name, ns_redraw_scroll_bars)
(ns_clear_frame, ns_clear_frame_area, ns_scroll_run)
(ns_after_update_window_line, ns_shift_glyphs_for_insert)
(dumpcursor, ns_draw_vertical_window_border)
(ns_draw_window_divider, ns_draw_relief)
(ns_dumpglyphs_box_or_relief, ns_maybe_dumpglyphs_background)
(ns_dumpglyphs_image, ns_draw_glyph_string, ns_send_appdefined)
(ns_read_socket, ns_select, ns_set_vertical_scroll_bar)
(ns_set_horizontal_scroll_bar, ns_condemn_scroll_bars)
(ns_redeem_scroll_bar, ns_judge_scroll_bars, ns_delete_terminal)
(ns_create_terminal, ns_term_init, sendEvent)
(applicationDidFinishLaunching, applicationDidBecomeActive)
(timeout_handler, fd_handler, EmacsView_dealloc, changeFont)
(acceptsFirstResponder, resetCursorRects, keyDown, mouseDown)
(deltaIsZero, rightMouseDown, otherMouseDown, mouseUp)
(rightMouseUp, otherMouseUp, scrollWheel, mouseMoved)
(mouse_autoselect_window, in_window, mouseDragged)
(rightMouseDragged, otherMouseDragged, windowShouldClose)
(updateFrameSize, windowWillResize, windowDidResize)
(windowDidBecomeKey, windowDidResignKey, windowWillMiniaturize)
(initFrameFromEmacs, windowDidMove, windowDidDeminiaturize)
(windowDidExpose, windowDidMiniaturize, windowWillEnterFullScreen)
(windowDidEnterFullScreen, windowWillExitFullScreen)
(windowDidExitFullScreen, toggleFullScreen, handleFS, setFSValue)
(mouseEntered, mouseExited, menuDown, toolbarClicked, drawRect)
(draggingEntered, performDragOperation, validRequestorForSendType)
(setMiniwindowImage, constrainFrameRect, performZoom, zoom)
(EmacsScroller_initFrame, EmacsScroller_setFrame)
(EmacsScroller_dealloc, condemn, reprieve, judge)
(resetCursorRects, setPosition, EmacsScroller_mouseDown)
(EmacsScroller_mouseDragged, syms_of_nsterm): Use new trace system.

* nsfns.m: Remove old NSTRACE macro.
* nsfns.m (x_set_icon_name, ns_set_name, x_explicitly_set_name)
(x_implicitly_set_name, x_set_title, ns_set_name_as_filename)
(ns_implicitly_set_icon_type, x_set_icon_type): Use new trace system.

* nsimage.m: Remove old NSTRACE macro.
* nsimage.m (ns_image_from_XBM, ns_image_for_XPM)
(ns_image_from_bitmap_file, ns_load_image): Use new trace system.

* nsmenu.m: Remove old NSTRACE macro.
* nsmenu.m (ns_update_menubar, ns_menu_show, ns_popup_dialog):
Use new trace system.

9 years agoNo need to use eval-and-compile
Katsumi Yamaoka [Fri, 23 Oct 2015 02:39:47 +0000 (02:39 +0000)]
No need to use eval-and-compile

* lisp/gnus/auth-source.el: Do require epg (when compiling) before
autoload epg functions.

9 years agoFix auth-source-epa-make-gpg-token compilation (bug#21724)
Katsumi Yamaoka [Thu, 22 Oct 2015 23:55:31 +0000 (23:55 +0000)]
Fix auth-source-epa-make-gpg-token compilation (bug#21724)

* lisp/gnus/auth-source.el: Add eval-and-compile to autoloads for
epg-context-set-passphrase-callback, epg-decrypt-string, and
epg-encrypt-string; require epg when compiling for the setf-method
for epg-context-armor. (bug#21724)

9 years agoInclude file cleanup for w32 files in src directory
Eli Zaretskii [Thu, 22 Oct 2015 16:52:18 +0000 (19:52 +0300)]
Include file cleanup for w32 files in src directory

* src/w32xfns.c: Don't include keyboard.h, window.h, charset.h,
fontset.h, blockinput.h.
* src/w32uniscribe.c: Don't include dispextern.h, character.h,
charset.h, fontset.h.
* src/w32term.c: Don't include systty.h, systime.h, charset.h,
character.h, ccl.h, dispextern.h, disptab.h, intervals.h,
process.h, atimer.h, keymap.h, w32heap.h.  Include bitmap/gray.xbm
in an ifdef-ed away block.
Include fcntl.h for CYGWIN.
(set_frame_param): Remove unused function.
* src/w32select.c: Don't include charset.h and composite.h.
(setup_config, Fw32_get_clipboard_data): Avoid compiler warnings
due to pointer signedness mismatches.
* src/w32reg.c (w32_get_string_resource): Avoid compiler warnings
due to pointer signedness mismatches.
* src/w32proc.c: Include unistd.h.  Don't include systime.h,
process.h, dispextern.h.
(sys_spawnve, Fw32_short_file_name, Fw32_long_file_name)
(Fw32_application_type): Avoid compiler warnings due to pointer
signedness mismatches.
* src/w32menu.c: Don't include keymap.h, termhooks.h, window.h,
character.h, charset.h, dispextern.h.
(simple_dialog_show, add_menu_item): Avoid compiler warnings due
to pointer signedness mismatches.
* src/w32inevt.c: Don't include dispextern.h, window.h,
termhooks.h, w32heap.h.
* src/w32font.c: Don't include dispextern.h, character.h,
charset.h, fontset.h, font.h.
(intern_font_name, add_font_entity_to_list)
(registry_to_w32_charset, w32_to_x_charset, fill_in_logfont)
(list_all_matching_fonts): Avoid compiler warnings due to pointer
signedness mismatches.
* src/w32fns.c: Don't include character.h, intervals.h,
dispextern.h, epaths.h, charset.h, ccl.h, fontset.h, systime.h,
termhooks.h, w32heap.h, bitmap/gray.xbm, font.h, w32font.h.
(w32_color_map_lookup, add_system_logical_colors_to_map)
(x_decode_color, x_set_name, FPRINTF_WM_CHARS, Fxw_color_defined_p)
(Fxw_color_values, x_display_info_for_name, Fset_message_beep)
(x_create_tip_frame, Fx_file_dialog, Fsystem_move_file_to_trash)
(w32_parse_hot_key, Ffile_system_info, w32_kbd_patch_key): Avoid
compiler warnings, mainly due to pointer signedness mismatches.
(unwind_create_frame_1): Remove unused function.
* src/w32console.c: Don't include character.h, disptab.h, frame.h,
window.h, termhooks.h, dispextern.h.
(w32con_write_glyphs, w32con_write_glyphs_with_face): Fix pointer
signedness mismatch.
* src/w32.c: Include c-strcase.h and systty.h.  Don't include
w32heap.h.

9 years agoImprove doc-view wrt. auto-revert-mode
Tassilo Horn [Thu, 22 Oct 2015 15:01:57 +0000 (17:01 +0200)]
Improve doc-view wrt. auto-revert-mode

* lisp/doc-view.el (doc-view-revert-buffer): Don't revert when file is
corrupted (bug#21729).
(doc-view-mode): Set doc-view-revert-buffer as revert-buffer-function.

9 years agoDescribe dired-do-compress-to in the manual
Oleh Krehel [Thu, 22 Oct 2015 10:05:59 +0000 (12:05 +0200)]
Describe dired-do-compress-to in the manual

* etc/NEWS: Update.

* lisp/dired-aux.el: Fix typo.

* doc/emacs/dired.texi: Add entry.

9 years agoFurther fix for proper locale handling in tramp-gvfs.el
Jürgen Hötzel [Thu, 22 Oct 2015 07:09:27 +0000 (09:09 +0200)]
Further fix for proper locale handling in tramp-gvfs.el

* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-attributes):
Just suppress LC_MESSAGES locale category settings.

9 years agoSpelling fixes
Paul Eggert [Thu, 22 Oct 2015 03:26:21 +0000 (20:26 -0700)]
Spelling fixes

9 years agoNew lispref section “Security Considerations”
Paul Eggert [Thu, 22 Oct 2015 03:22:34 +0000 (20:22 -0700)]
New lispref section “Security Considerations”

This attempts to document some of the issues recently discussed
on emacs-devel, and to indicate other such issues.  The section
could be a lot longer.
* doc/lispref/os.texi (Security Considerations):
New node.
* doc/lispref/elisp.texi (Top):
* doc/lispref/processes.texi (Shell Arguments):
* lisp/subr.el (shell-quote-argument):
* src/callproc.c (syms_of_callproc):
Reference it.

9 years agoMerge from gnulib
Paul Eggert [Thu, 22 Oct 2015 03:10:40 +0000 (20:10 -0700)]
Merge from gnulib

This incorporates:
2015-10-18 stdalign: work around pre-4.9 GCC x86 bug
2015-10-18 time_rz: avoid warning from bleeding-edge gcc's -Wnonnull
* doc/misc/texinfo.tex, lib/stdalign.in.h, lib/time_rz.c:
Copy from gnulib.

9 years agoRemove fboundp checks from mailcap-mime-data
Katsumi Yamaoka [Thu, 22 Oct 2015 00:08:23 +0000 (00:08 +0000)]
Remove fboundp checks from mailcap-mime-data

* lisp/gnus/mailcap.el (mailcap-mime-data): Remove fboundp checks.
(mailcap-viewer-passes-test): Do it instead.  Thanks to Stefan Monnier.

9 years agoFurther include-file cleanup
Ken Brown [Wed, 21 Oct 2015 22:08:36 +0000 (18:08 -0400)]
Further include-file cleanup

* src/sheap.c: Include stdlib.h.
* src/unexcw.c: Include string.h.

9 years agoFix logic in 'server-kill-emacs-query-function'
Eli Zaretskii [Wed, 21 Oct 2015 16:50:10 +0000 (19:50 +0300)]
Fix logic in 'server-kill-emacs-query-function'

* lisp/server.el (server-kill-emacs-query-function): Correct the
logic that controls whether the user is asked for confirmation.
(Bug#21723)

9 years ago* lisp/isearch.el (isearch-search-fun-default): Simplify logic
Artur Malabarba [Wed, 21 Oct 2015 16:27:23 +0000 (17:27 +0100)]
* lisp/isearch.el (isearch-search-fun-default): Simplify logic

(isearch--lax-regexp-function-p): New function.

9 years ago* lisp/isearch.el: Support lax-whitespace in regexp-function searches
Artur Malabarba [Wed, 21 Oct 2015 16:16:36 +0000 (17:16 +0100)]
* lisp/isearch.el: Support lax-whitespace in regexp-function searches

(isearch-search-fun-default): Let-bind `search-spaces-regexp'
around `isearch-regexp-function'.

9 years ago* lisp/isearch.el: Rename word search to regexp-function search
Artur Malabarba [Wed, 21 Oct 2015 16:07:08 +0000 (17:07 +0100)]
* lisp/isearch.el: Rename word search to regexp-function search

`isearch-word' went well beyond its original purpose, and the name
no longer makes sense.  It is now called
`isearch-regexp-function', and it's value should always be a
function that converts a string to a regexp (though setting it to
t is still supported for now).

(isearch-word): Make obsolete.
(isearch-regexp-function): New variable.
(isearch-mode, isearch-done, isearch--state, isearch--set-state)
(with-isearch-suspended, isearch-toggle-regexp)
(isearch-toggle-word, isearch-toggle-symbol)
(isearch-toggle-character-fold, isearch-query-replace)
(isearch-occur, isearch-highlight-regexp)
(isearch-search-and-update, isearch-message-prefix)
(isearch-search-fun-default, isearch-search)
(isearch-lazy-highlight-new-loop, isearch-lazy-highlight-search):
Use it.
(isearch-lazy-highlight-regexp-function): New var.
(isearch-lazy-highlight-word): Make obsolete.
(isearch--describe-regexp-mode): New function.
(isearch--describe-word-mode): Make obsolete.

* lisp/info.el (Info-isearch-search): Use the new var.

* lisp/replace.el (replace-search, replace-highlight): Use the new
var.

* lisp/obsolete/longlines.el (longlines-search-function): Use the
new var.

* lisp/hexl.el (hexl-isearch-search-function): Use the new var.

* lisp/cedet/semantic/senator.el (senator-isearch-search-fun): Use
the new var.

9 years agoAdd dired-do-compress-to command bound to "c"
Oleh Krehel [Wed, 21 Oct 2015 14:39:36 +0000 (16:39 +0200)]
Add dired-do-compress-to command bound to "c"

* lisp/dired-aux.el (dired-shell-command): Use the caller's
  `default-directory', return the result of `process-file'.
(dired-compress-file-suffixes): Add comment on why "tar -zxf" isn't
used by default.
(dired-compress-files-alist): New defvar.
(dired-do-compress-to): New command.

* lisp/dired.el (dired-mode-map): Bind `dired-do-compress-to' to "c".
(dired-do-compress-to): Add an autoload entry.

* etc/NEWS: Add two entries.

9 years agoMake RefTeX work with LaTeX subfiles package
Tassilo Horn [Wed, 21 Oct 2015 12:17:18 +0000 (14:17 +0200)]
Make RefTeX work with LaTeX subfiles package

* lisp/textmodes/reftex.el (reftex-TeX-master-file): Recognize subfiles
document class argument as master file for referencing purposes.

9 years ago; etc/NEWS: Remove duplicate text.
Juanma Barranquero [Tue, 20 Oct 2015 11:42:18 +0000 (13:42 +0200)]
; etc/NEWS: Remove duplicate text.

9 years agolisp/gnus/mailcap.el (mailcap-mailcap-entry-passes-test): Doc fix
Katsumi Yamaoka [Wed, 21 Oct 2015 05:36:51 +0000 (05:36 +0000)]
lisp/gnus/mailcap.el (mailcap-mailcap-entry-passes-test): Doc fix

9 years agoInclude-file cleanup for src directory
Paul Eggert [Wed, 21 Oct 2015 01:27:05 +0000 (18:27 -0700)]
Include-file cleanup for src directory

Omit ‘#include "foo.h"’ unless the file needs foo.h (Bug#21707).
In a few cases, add ‘#include "foo.h"’ if the file needs foo.h
but does not include it directly.  As a general rule, a source
file should include foo.h if it needs the interfaces that foo.h
defines.
* src/alloc.c: Don’t include process.h.  Include dispextern.h,
systime.h.
* src/atimer.c: Don’t include blockinput.h.
* src/buffer.c: Include coding.h, systime.h.  Don’t include
keyboard.h, coding.h.
* src/callint.c: Don’t include commands.h, keymap.h.
* src/callproc.c: Don’t include character.h, ccl.h, composite.h,
systty.h, termhooks.h.
* src/casetab.c: Don’t include character.h.
* src/category.c: Don’t include charset.h, keymap.h.
* src/ccl.h: Don’t include character.h.
* src/character.c: Don’t include charset.h.
* src/charset.c: Don’t include disptab.h.
* src/chartab.c: Don’t include ccl.h.
* src/cm.c: Don’t include frame.h, termhooks.h.
* src/cmds.c: Don’t include window.h, dispextern.h.
* src/coding.c: Don’t include window.h, frame.h.
* src/composite.c: Include composite.h.  Don’t include window.h,
font.h.
* src/data.c: Don’t include syssignal.h, termhooks.h, font.h.
* src/dbusbind.c: Don’t include frame.h.
* src/decompress.c: Don’t include character.h.
* src/dired.c: Don’t include character.h, commands.h, charset.h.
* src/dispnew.c: Don’t include character.h, indent.h, intervals.h,
process.h, timespec.h.  Include systime.h.
* src/doc.c: Include coding.h.  Don’t include keyboard.h.
* src/editfns.c: Include composite.h.  Don’t include frame.h.
* src/emacs.c: Include fcntl.h, coding.h.  Don’t include
commands.h, systty.h..
* src/fileio.c: Don’t include intervals.h, dispextern.h.
Include composite.h.
* src/filelock.c: Don’t include character.h, systime.h.
* src/fns.c: Don’t include time.h, commands.h, keyboard.h,
keymap.h, frame.h, blockinput.h, xterm.h.  Include composite.h.
* src/font.c: Include termhooks.h.
* src/font.h: Don’t include ccl.h, frame.h.  Add forward decls of
struct composition_it, struct face, struct glyph_string.
* src/fontset.c: Don’t include buffer.h, ccl.h, keyboard.h,
intervals.h, window.h, termhooks.h.
* src/frame.c: Don’t include character.h, commands.h, font.h.
* src/frame.h: Don’t include dispextern.h.
* src/fringe.c: Don’t include character.h.
* src/ftcrfont.c: Don’t include dispextern.h, frame.h,
character.h, charset.h, fontset.h.
* src/ftfont.c: Don’t include frame.h, blockinput.h, coding.h,
fontset.h.
* src/ftxfont.c: Don’t include dispextern.h, character.h,
charset.h, fontset.h.
* src/gfilenotify.c: Don’t include frame.h, process.h.
* src/gtkutil.c: Include dispextern.h, frame.h, systime.h.
Don’t include syssignal.h, buffer.h, charset.h, font.h.
* src/gtkutil.h: Don’t include frame.h.
* src/image.c: Include fcntl.h and stdio.h instead of sysstdio.h.
Don’t include character.h.
* src/indent.c: Don’t include keyboard.h, termchar.h.
* src/inotify.c: Don’t include character.h, frame.h.
* src/insdel.c: Include composite.h.  Don’t include blockinput.h.
* src/intervals.c: Don’t include character.h, keyboard.h.
* src/intervals.h: Don’t include dispextern.h, composite.h.
* src/keyboard.c: Don’t include sysstdio.h, disptab.h, puresize.h.
Include coding.h.
* src/keyboard.h: Don’t incldue systime.h.
* src/keymap.c: Don’t include charset.h, frame.h.
* src/lread.c: Include dispextern.h and systime.h.
Don’t include frame.h.  Include systime.h.
* src/macros.c: Don’t include commands.h, character.h, buffer.h.
* src/menu.c: Include character.h, coding.h.  Don’t include
dispextern.h.
* src/menu.h: Don’t include systime.h.
* src/minibuf.c: Don’t include commands.h, dispextern.h, syntax.h,
intervals.h, termhooks.h.
* src/print.c: Include coding.h.  Don’t include keyboard.h,
window.h, dispextern.h, termchar.h, termhooks.h, font.h.
Add forward decl of struct terminal.
* src/process.c: Don’t include termhooks.h, commands.h,
dispextern.h, composite.h.
* src/region-cache.c: Don’t include character.h.
* src/scroll.c: Don’t include keyboard.h, window.h.
* src/search.c: Don’t include category.h, commands.h.
* src/sound.c: Don’t include dispextern.h.
* src/syntax.c: Don’t include command.h, keymap.h.
* src/sysdep.c: Don’t include window.h, dispextern.h.
* src/systime.h: Use ‘#ifdef emacs’, not ‘#ifdef EMACS_LISP_H’,
* src/term.c: Don’t include systty.h, intervals.h, xterm.h.
* src/terminal.c: Include character.h.
Don’t include charset.h, coding.h.
* src/textprop.c: Don’t include character.h.
* src/undo.c: Don’t include character.h, commands.h, window.h.
* src/unexsol.c: Don’t include character.h, charset.h.
* src/widget.c: Include widget.h.  Don’t include keyboard.h,
window.h, dispextern.h, blockinput.h, character.h, font.h.
* src/widgetprv.h: Don’t include widget.h.
* src/window.c: Don’t include character.h, menu.h, intervals.h.
* src/xdisp.c: Include composite.h, systime.h.  Don’t include
macros.h, process.h.
* src/xfaces.c: Don’t include charset.h, keyboard.h, termhooks.h,
intervals.h.
* src/xfns.c: Don’t include menu.h, character.h, intervals.h,
epaths.h, fontset.h, systime.h, atimer.h, termchar.h.
* src/xfont.c: Don’t include dispextern.h, fontset.h, ccl.h.
* src/xftfont.c: Don’t include dispextern.h, character.h, fontset.h.
* src/xgselect.c: Don’t include timespec.h, frame.h.
Include systime.h.
* src/xgselect.h: Don’t include time.h.
Use a forward decl to struct timespec instead.
* src/xmenu.c: Don’t include keymap.h, character.h, charset.h,
dispextern.h.  Include systime.h.
* src/xml.c: Don’t include character.h.
* src/xrdb.c [USE_MOTIF]: Don’t include keyboard.h.
* src/xselect.c: Don’t include dispextern.h, character.h,
buffer.h, process.h.
* src/xsmfns.c: Don’t include systime.h, sysselect.h.
* src/xterm.c: Don’t include syssignal.h, charset.h, disptab.h,
intervals.h process.h, keymap.h, xgselect.h.  Include composite.h.

9 years ago(/ N) now returns the reciprocal of N
Paul Eggert [Wed, 21 Oct 2015 01:16:47 +0000 (18:16 -0700)]
(/ N) now returns the reciprocal of N

This is more compatible with Common Lisp and XEmacs (Bug#21690).  See:
http://lists.gnu.org/archive/html/emacs-devel/2015-10/msg01053.html
* lisp/color.el (color-hue-to-rgb, color-hsl-to-rgb)
(color-xyz-to-srgb, color-xyz-to-lab):
* lisp/emacs-lisp/cl-extra.el (cl-float-limits):
* lisp/net/shr-color.el (shr-color-hue-to-rgb)
(shr-color-hsl-to-rgb-fractions):
Exploit the change to simplify the code a bit.
* lisp/emacs-lisp/bytecomp.el (byte-compile-quo):
Don’t complain about single-argument calls to ‘/’.
* src/data.c (arith_driver, float_arith_driver):
Implement the change.

9 years agoCall vc-dir-defresh after stash operations
Dmitry Gutov [Tue, 20 Oct 2015 17:04:47 +0000 (20:04 +0300)]
Call vc-dir-defresh after stash operations

* lisp/vc/vc-git.el (vc-git-stash-apply-at-point)
(vc-git-stash-pop-at-point): Call vc-dir-defresh (bug#13960).

* lisp/vc/vc-dir.el (vc-dir-resynch-file): Expand FNAME as well,
since it can be abbreviated (as returned by vc-find-root).

9 years agoDon't declare vc-exec-after anymore
Dmitry Gutov [Tue, 20 Oct 2015 16:37:30 +0000 (19:37 +0300)]
Don't declare vc-exec-after anymore

* lisp/vc/vc-svn.el:
* lisp/vc/vc-mtn.el:
* lisp/vc/vc-hg.el:
* lisp/vc/vc-cvs.el:
* lisp/vc/vc-git.el:
* lisp/vc/vc-bzr.el: Don't declare vc-exec-after anymore.  Its
usages have been replaced with vc-run-delayed.

9 years agoFix memory leak in fontset handling
Dima Kogan [Tue, 20 Oct 2015 15:12:55 +0000 (18:12 +0300)]
Fix memory leak in fontset handling

* src/font.c (copy_font_spec): Make a deep copy of the input
argument FONT.  (Bug#21651)

9 years ago* lisp/gnus/mailcap.el (mailcap-mime-data):
Michael Sperber [Tue, 20 Oct 2015 11:18:30 +0000 (11:18 +0000)]
* lisp/gnus/mailcap.el (mailcap-mime-data):
Conditonalize `doc-view-mode', which does not exist on XEmacs.

9 years ago; Auto-commit of loaddefs files.
Glenn Morris [Tue, 20 Oct 2015 10:17:55 +0000 (06:17 -0400)]
; Auto-commit of loaddefs files.

9 years agoUpdate the way directories are compressed
Oleh Krehel [Fri, 16 Oct 2015 14:44:20 +0000 (16:44 +0200)]
Update the way directories are compressed

* lisp/dired-aux.el (dired-compress-file-suffixes): Update the recipe
  for *.tar.gz decompression to use a pipe.
  Add an entry for the default directory compression (to *.tar.g).

(dired-compress-file): Update.

See https://lists.gnu.org/archive/html/emacs-devel/2015-10/msg00949.html.

9 years agoUnbreak `group' option for `mail-sources'
Michael Sperber [Tue, 20 Oct 2015 06:10:37 +0000 (06:10 +0000)]
Unbreak `group' option for `mail-sources'

* nnml.el (nnml-retrieve-groups, nnml-request-scan):
* nnmail.el (nnmail-get-new-mail-per-group):
(nnmail-get-new-mail-1): Unbreak `group' option for `mail-sources'.

9 years agoNew function seq-position
Nicolas Petton [Mon, 19 Oct 2015 22:11:30 +0000 (00:11 +0200)]
New function seq-position

* lisp/emacs-lisp/seq.el (seq-position): New function.
* test/automated/seq-tests.el: New tests for seq-position.
* doc/lispref/sequences.texi: Add documentation for `seq-position'.

9 years agoEnable --with-wide-int build on 32-bit Cygwin
Ken Brown [Mon, 19 Oct 2015 20:53:22 +0000 (16:53 -0400)]
Enable --with-wide-int build on 32-bit Cygwin

* src/sheap.c (STATIC_HEAP_SIZE): Remove distinction between x86
and x86_64 to enable --with-wide-int build on 32-bit Cygwin.

9 years ago* doc/emacs/ack.texi (Acknowledgments): Small, sad, update.
Glenn Morris [Mon, 19 Oct 2015 20:35:25 +0000 (16:35 -0400)]
* doc/emacs/ack.texi (Acknowledgments): Small, sad, update.

9 years agoResurrect image loading under auto-image-file-mode
Eli Zaretskii [Mon, 19 Oct 2015 13:15:30 +0000 (16:15 +0300)]
Resurrect image loading under auto-image-file-mode

* src/image.c (x_find_image_fd): Handle the case of -2 returned by
'openp' specially.  This special case was lost in the changes on
2015-08-18.  (Bug#21685)

9 years agoFix return value of 'set-file-extended-attributes'
Eli Zaretskii [Mon, 19 Oct 2015 07:04:50 +0000 (10:04 +0300)]
Fix return value of 'set-file-extended-attributes'

* lisp/files.el (set-file-extended-attributes): Return non-nil
when setting either ACLs or SELinux context succeeds.  Document
the return value.  (Bug#21699)

* doc/lispref/files.texi (Changing Files): Document the return
value of set-file-extended-attributes.

9 years ago; * doc/lispref/processes.texi (Synchronous Processes): Minor copyedit.
Eli Zaretskii [Mon, 19 Oct 2015 06:12:51 +0000 (09:12 +0300)]
; * doc/lispref/processes.texi (Synchronous Processes): Minor copyedit.

9 years agoImprove documentation of functions that change files
Eli Zaretskii [Mon, 19 Oct 2015 05:31:58 +0000 (08:31 +0300)]
Improve documentation of functions that change files

* doc/lispref/files.texi (Changing Files): Document that these
functions signal an error on failure.

9 years agoFix doc string of 'shell-quote-argument'
Eli Zaretskii [Sun, 18 Oct 2015 17:08:32 +0000 (20:08 +0300)]
Fix doc string of 'shell-quote-argument'

* lisp/subr.el (shell-quote-argument): Doc fix.  (Bug#21702)

9 years ago; Remove obsolete comment in tramp.el
Michael Albinus [Sun, 18 Oct 2015 15:09:07 +0000 (17:09 +0200)]
; Remove obsolete comment in tramp.el

9 years ago; Add bug number in ChangeLog.2
Michael Albinus [Sun, 18 Oct 2015 11:23:50 +0000 (13:23 +0200)]
; Add bug number in ChangeLog.2

9 years agoSome minor Tramp changes
Michael Albinus [Sun, 18 Oct 2015 11:22:02 +0000 (13:22 +0200)]
Some minor Tramp changes

* doc/misc/tramp.texi (Obtaining Tramp): Add http git cloning.

* lisp/net/tramp.el (tramp-handle-make-auto-save-file-name):
Expand `tramp-auto-save-directory'.

9 years ago; Auto-commit of ChangeLog files.
Glenn Morris [Sun, 18 Oct 2015 10:23:59 +0000 (06:23 -0400)]
; Auto-commit of ChangeLog files.

9 years agoMinor edits in Tramp
Michael Albinus [Sun, 18 Oct 2015 08:29:43 +0000 (10:29 +0200)]
Minor edits in Tramp

* lisp/net/tramp-adb.el (directory-listing-before-filename-regexp):
Declare it.

* lisp/net/tramp-compat.el (directory-listing-before-filename-regexp):
Remove declaration.

9 years ago* lisp/emacs-lisp/eldoc.el: Add back-to-indentation to the command list
Mark Oteiza [Sat, 17 Oct 2015 15:49:36 +0000 (11:49 -0400)]
* lisp/emacs-lisp/eldoc.el: Add back-to-indentation to the command list

9 years agoAvoid crashes when redisplayng a window changes faces or fonts
Eli Zaretskii [Sat, 17 Oct 2015 12:10:58 +0000 (15:10 +0300)]
Avoid crashes when redisplayng a window changes faces or fonts

* src/xdisp.c (redisplay_internal): If redisplaying the selected
window or one of the frames turns on the frame's 'redisplay' flag,
redisplay again.  (Bug#21428)

* src/frame.c (x_set_font): Set the frame's 'fonts_changed' flag.

9 years agoSolve timimg issues in file-notify-tests.el
Michael Albinus [Sat, 17 Oct 2015 09:20:05 +0000 (11:20 +0200)]
Solve timimg issues in file-notify-tests.el

* test/automated/file-notify-tests.el (file-notify-test02-events):
Rectify `attribute-change' tests.  There are timing issues with
gfilenotify.

9 years agoFix quoting of data within htmlfontify doc
Paul Eggert [Sat, 17 Oct 2015 02:01:36 +0000 (19:01 -0700)]
Fix quoting of data within htmlfontify doc

* doc/misc/htmlfontify.texi (Data Structures, Customization):
Fix quoting of data structures.  A Lisp quote is needed only
when data appears within Lisp code.

9 years ago* emacs-lisp/package.el: Reload archive-contents if priorities change
Artur Malabarba [Fri, 16 Oct 2015 22:54:38 +0000 (23:54 +0100)]
* emacs-lisp/package.el: Reload archive-contents if priorities change

(package--old-archive-priorities): New variable.
(package-read-all-archive-contents, package-menu--refresh): Use it
to decide when the `package-archive-contents' needs to be read
again.

9 years agoMake src headers idempotent and standalone
Paul Eggert [Fri, 16 Oct 2015 21:54:09 +0000 (14:54 -0700)]
Make src headers idempotent and standalone

Redo src/*.h so that each include file is idempotent (that is, can
be included multiple times with the latter inclusions having no
effect) and standalone (that is, can be included by itself,
with no include file other than config.h needed as a prerequisite).
This is standard practice in GNU programs nowadays.
* lwlib/lwlib-widget.h, src/buffer.h, src/category.h, src/character.h:
* src/charset.h, src/coding.h, src/commands.h, src/disptab.h:
* src/fontset.h, src/gnutls.h, src/indent.h, src/keymap.h, src/macros.h:
* src/regex.h [emacs]:
* src/syntax.h, src/systty.h, src/termhooks.h:
Include lisp.h, for Lisp_Object.
* src/buffer.h, src/category.h, src/cm.h, src/commands.h, src/disptab.h:
* src/indent.h, src/intervals.h, src/keyboard.h, src/macros.h:
* src/process.h, src/puresize.h, src/region-cache.h, src/syntax.h:
* src/syssignal.h, src/sysstdio.h, src/systty.h, src/termchar.h:
* src/termopts.h, src/tparam.h, src/unexec.h:
Protect against multiple inclusion.
* src/buffer.h: Include character.h, for STRING_CHAR.
* src/emacsgtkfixed.h (struct frame):
* src/fontset.h (struct face):
* src/region-cache.h (struct buffer):
* src/termhooks.h (struct glyph):
* src/xsettings.h (struct x_display_info):
Add possibly-forward decl.
* src/syntax.h: Include buffer.h, for BVAR.
* src/sysselect.h: Include lisp.h, for eassume.
* src/termchar.h: Include <stdio.h>, for FILE.
* src/widget.h: Include <X11/IntrinsicP.h>, for Widget.
* src/xsettings.h: Include <X11/Xlib.h>, for XEvent.