]> git.eshelyaron.com Git - emacs.git/log
emacs.git
7 years agoCEDET: Fix "unknown slot [...]" warnings scratch/last-cedet-merge
David Engster [Wed, 25 Jan 2017 22:12:00 +0000 (23:12 +0100)]
CEDET: Fix "unknown slot [...]"  warnings

Replace (oref OBJECT :SLOT) with (slot-value OBJECT 'SLOT).

TODO: ChangeLog

7 years agoCEDET: Fix "obsolete name arg [...] to constructor" warnings
David Engster [Wed, 25 Jan 2017 21:01:36 +0000 (22:01 +0100)]
CEDET: Fix "obsolete name arg [...] to constructor" warnings

Add ':name' where it makes sense.

TODO: ChangeLog

7 years agosemantic: Improve C++ 'friend' parsing
Eric Ludlam [Wed, 26 Nov 2014 19:24:11 +0000 (14:24 -0500)]
semantic: Improve C++ 'friend' parsing

* admin/grammars/c.by (classsubparts): Add a FRIEND for a class that
 doesn't specify the token CLASS. Add SEMICOLON to end of friend
 statements.

7 years agosemantic: Use file name for grammar name instead of %package token
Eric Ludlam [Wed, 26 Nov 2014 16:45:46 +0000 (11:45 -0500)]
semantic: Use file name for grammar name instead of %package token

* lisp/cedet/semantic/ede-grammar.el
  (ede-proj-makefile-insert-variables): Request the grammar name come
  from the file name, not the %package token.

7 years agosemantic: Add 'fromfile' option to grammar package
Eric Ludlam [Wed, 26 Nov 2014 16:45:15 +0000 (11:45 -0500)]
semantic: Add 'fromfile' option to grammar package

* lisp/cedet/semantic/grammar.el (semantic-grammar-package): Add
  optional 'fromfile' option. This indicates we want to make a
  filename from the originating file name.

7 years agosemantic: Fix scope calculation for 'enum'
Eric Ludlam [Wed, 26 Nov 2014 16:24:39 +0000 (11:24 -0500)]
semantic: Fix scope calculation for 'enum'

* lisp/cedet/semantic/scope.el (semantic-analyze-scoped-tags-default):
 Add "enum" as pulling contents into parent scope similar to
 namespace.

7 years agosemantic: Fix for Python lexer
Eric Ludlam [Wed, 26 Nov 2014 15:42:32 +0000 (10:42 -0500)]
semantic: Fix for Python lexer

* lisp/cedet/semantic/wisent/python.el (wisent-python-default-setup):
  Add syntax mod for . as punctuation.

7 years agosemantic: Set `semantic-type-relation-separator-character' for Emacs Lisp
Eric Ludlam [Wed, 26 Nov 2014 15:42:10 +0000 (10:42 -0500)]
semantic: Set `semantic-type-relation-separator-character' for Emacs Lisp

* lisp/cedet/semantic/bovine/el.el
  (semantic-type-relation-separator-character): New, and empty.

7 years agosemantic: Improve grammar-mode
Eric Ludlam [Wed, 26 Nov 2014 15:41:48 +0000 (10:41 -0500)]
semantic: Improve grammar-mode

* lisp/cedet/semantic/grammar.el (semantic-grammar-create-package):
 Get the setupfcn and mode before switching to other buffers. Don't
 special eval defvar, we generate defconst now. Be more aggressive
 reparsing open buffers of the mode being updated.
 (semantic-grammar-mode-map): Don't bind M-TAB.
 (semantic-grammar-menu): Use `completion-at-point' instead of grammar
 version.
 (semantic-grammar-mode): Remove type relation character.
 (semantic-grammar-complete): Delete.
 (semantic-ctxt-current-class-list): Also support 'token' class.
 (semantic-analyze-possible-completions): Support the optional FLAGS
 that are passed in for other languages. Reverse the found prefix.

7 years agosemantic: Allow empty type relation separation character
Eric Ludlam [Wed, 26 Nov 2014 15:38:37 +0000 (10:38 -0500)]
semantic: Allow empty type relation separation character

* lisp/cedet/semantic/ctxt.el (semantic-ctxt-current-symbol-default):
  Allow the type relation separator to be empty for languages that
  don't have symbol sequences, such as grammars and Lisp.

7 years agosemantic: Check if slot is bound
Eric Ludlam [Wed, 26 Nov 2014 15:37:28 +0000 (10:37 -0500)]
semantic: Check if slot is bound

* lisp/cedet/semantic/analyze.el (semantic-analyze-show): Protect
  against unbound error slot.

7 years agosemantic: Properly create canonical name for C++ type tag
Eric Ludlam [Mon, 24 Nov 2014 17:36:29 +0000 (12:36 -0500)]
semantic: Properly create canonical name for C++ type tag

* lisp/cedet/semantic/bovine/c.el
 (semantic-format-tag-canonical-name): Add part for a type with
 :parent. Merge parent names together.
 (semantic-c-dereference-typedef): If type is tag, use canonical name.

7 years agosemantic: Fix for db-global
Eric Ludlam [Mon, 24 Nov 2014 17:35:05 +0000 (12:35 -0500)]
semantic: Fix for db-global

* lisp/cedet/semantic/db-global.el
 (semanticdb-enable-gnu-global-in-buffer): Don't try if file doesn't
 exist.

7 years agosemantic: Change unary expression rule
Eric Ludlam [Tue, 13 Sep 2016 23:05:10 +0000 (19:05 -0400)]
semantic: Change unary expression rule

* admin/grammars/c.by (unaryexpression): Use 'namespace-symbol'
 instead of 'symbol'.

7 years agosemantic: Add missing save-excursion for scope calculation
Eric Ludlam [Fri, 18 Mar 2016 18:47:15 +0000 (14:47 -0400)]
semantic: Add missing save-excursion for scope calculation

* lisp/cedet/semantic/scope.el (semantic-calculate-scope-for-tag):
 Also save-excursion in case the internal jump is local and moves
 point.

7 years agoEDE: Fix for project detection
Edward Steere [Sun, 13 Mar 2016 15:28:21 +0000 (11:28 -0400)]
EDE: Fix for project detection

* lisp/cedet/ede/detect.el (ede--detect-ldf-root-predicate): Make sure
 updir is not nil before trying to detect it.

Copyright-paperwork-exempt: yes

7 years agosemantic: C grammar fixes
Eric Ludlam [Sun, 14 Feb 2016 15:26:36 +0000 (10:26 -0500)]
semantic: C grammar fixes

* admin/grammars/c.by (constexpr, noexcept): New.
 (cvdeclmod, metadeclmod,post-fcn-modifiers): Add ocurences of
 above.
 (expr-start): Allow to be empty.
 (expression): Delete - simplify to just find unaryexpression followed
 by more.
 (opt-more-expression): New - has specifics originally in expression.
 (unaryexpression): Simplified a couple bits around lists and unary
 expressions.

7 years agosemantic: Parse C++ override/final correctly
Ramkumar Ramachandra [Sat, 17 Jan 2015 22:43:57 +0000 (17:43 -0500)]
semantic: Parse C++ override/final correctly

override and final are a perfectly good opt-post-fcn-modifiers in
C++. Parse them correctly.

* admin/grammars/c.by (post-fcn-modifiers): Add tokens OVERRIDE and
  FINAL.
* lisp/cedet/semantic/bovine/c.el (semantic-c-reconstitute-token): Add
  :override-flag and :final-flag.

Copyright-paperwork-exempt: yes

7 years agosemantic: completion fixes
Eric Ludlam [Sun, 18 Oct 2015 14:17:24 +0000 (10:17 -0400)]
semantic: completion fixes

* lisp/cedet/semantic/complete.el (semantic-complete-read-tag-engine):
 Don't allow buffer switching.
 (semantic-collector-calculate-completions): Protect against
 cases where the context being completed with isn't a smart completion case.

7 years agosemantic: Optimize 'typeformbase' in C grammar
Eric Ludlam [Sun, 18 Oct 2015 14:10:32 +0000 (10:10 -0400)]
semantic: Optimize 'typeformbase' in C grammar

* admin/grammar/c.by (typeformbase): Replace two rules that could
 match the same with one. Replace special
 'namespace-symbol-for-typeformbase' with just 'namespace-symbol'.
 (namespace-symbol): Force that a symbol @ end can
 never have a template specifier.
 (opt-namespace-symbol-more): This must now always be
 '::namespace-symbol'.
 (namespace-symbol-for-typeformbase): Deleted.

7 years agosemantic: C grammar optimizations
Eric Ludlam [Fri, 16 Oct 2015 20:37:48 +0000 (16:37 -0400)]
semantic: C grammar optimizations

* admin/grammars/c.by (extern-c, c-or-cpp, opt-extern-c-contents):
 Optimize out all the extra EXTERN matches.

7 years agosemantic: More C grammar optimizations
Eric Ludlam [Fri, 16 Oct 2015 20:05:17 +0000 (16:05 -0400)]
semantic: More C grammar optimizations

* admin/grammars/c.by (declmods): Optimize out 2nd match to DECLMOD.
 (varnamelist, opt-varnamelist-more): Optimize out 2nd match for a variable
 name into 'opt-varnamelist-more'.
 (namespace-symbol, opt-namespace-symbol-more): Optimize out 2nd match
 for the template specifier.

7 years agosemantic: Some C grammar optimizations
Eric Ludlam [Fri, 16 Oct 2015 19:02:55 +0000 (15:02 -0400)]
semantic: Some C grammar optimizations

* admin/grammars/c.y (typesimple): Optimize out one rule by making
 optional subparts.
 (typdef-symbol-list,typedef-symbol-list-opt-comma): Optimize symbol
 list so only parses typedefname once.
 (type,type-namespace): Optimize so we parse 'namespace' only once.

7 years agoEDE: Improve Emacs project type
Eric Ludlam [Sun, 9 Aug 2015 15:03:09 +0000 (11:03 -0400)]
EDE: Improve Emacs project type

* lisp/cedet/ede/emacs.el (ede-emacs-target-texi): New.
 (ede-find-target): Add texi support.
 (project-compile-project) (ede-compile-target)
 (ede-compile-target) (ede-compile-target): New

7 years agoEDE: Expand file name
Eric Ludlam [Sun, 9 Aug 2015 14:15:14 +0000 (10:15 -0400)]
EDE: Expand file name

* lisp/cedet/ede/auto.el (ede-calc-fromconfig): Expand the found file
 name.

7 years agosemantic: Add more syntax modifications for scheme lexer
Eric Ludlam [Sat, 8 Aug 2015 14:47:21 +0000 (10:47 -0400)]
semantic: Add more syntax modifications for scheme lexer

* lisp/cedet/semantic/bovine/scm.el (semantic-default-scheme-setup):
 Add lex syntax modifications for / and @.

7 years agosemantic: New function to find library with macro definition
Eric Ludlam [Sat, 8 Aug 2015 14:45:15 +0000 (10:45 -0400)]
semantic: New function to find library with macro definition

* lisp/cedet/semantic/grammar.el
  (semantic--grammar-find-macro-symbol-library): New

7 years agosemantic: Update keybinings for grammar mode
Eric Ludlam [Sat, 8 Aug 2015 14:45:15 +0000 (10:45 -0400)]
semantic: Update keybinings for grammar mode

* lisp/cedet/semantic/grammar.el (semantic-grammar-mode-map): Update
 keybindings for macro-expander and insert keyword to conform to
 standards.

7 years agosemantic: New c-mode override for analyzing tag type members
Eric Ludlam [Thu, 23 Apr 2015 00:58:47 +0000 (20:58 -0400)]
semantic: New c-mode override for analyzing tag type members

* lisp/cedet/semantic/bovine/c.el (semantic-analyze-tag-type-members):
 New override.

7 years agosemantic: Add autoload for Add autoload for `semantic-analyze-debug-assist'
Eric Ludlam [Thu, 23 Apr 2015 00:58:27 +0000 (20:58 -0400)]
semantic: Add autoload for Add autoload for `semantic-analyze-debug-assist'

* lisp/cedet/semantic/analyze/debug.el: Add autoload for
  `semantic-analyze-debug-assist'.

7 years agosemantic: Introduce `semantic-analyze-tag-type-members'
Eric Ludlam [Thu, 23 Apr 2015 00:56:04 +0000 (20:56 -0400)]
semantic: Introduce `semantic-analyze-tag-type-members'

* lisp/cedet/semantic/analyze.el (semantic-analyze-tag-type-members)
 (semantic-analyze-tag-type-members-default): New
 (semantic-analyze-find-tag-sequence-default)
 (semantic-analyze-current-context-default):
* lisp/cedet/semantic/db-typecache.el
 (semanticdb-typecache-find):
* lisp/cedet/semantic/scope.el (semantic-completable-tags-from-type)
 (semantic-scope-find):
* lisp/cedet/semantic/analyze/complete.el
 (semantic-analyze-possible-completions-default):
* lisp/cedet/semantic/analyze/debug.el
  (semantic-analyzer-debug-missing-innertype): Use new
 `semantic-analyze-tag-type-members'.

7 years agosemantic: Accept FLAGS parameter for srecode-template-mode
Eric Ludlam [Sat, 11 Apr 2015 23:18:29 +0000 (19:18 -0400)]
semantic: Accept FLAGS parameter for srecode-template-mode

* lisp/cedet/srecode/srt-mode.el
 (semantic-analyze-possible-completions): Add support for FLAGS arg
 (currently ignored).

7 years agosemantic: Accept FLAGS parameter for makefile-mode for analyzing completions
Eric Ludlam [Sat, 11 Apr 2015 23:18:14 +0000 (19:18 -0400)]
semantic: Accept FLAGS parameter for makefile-mode for analyzing completions

* lisp/cedet/semantic/bovine/make.el
  (semantic-analyze-possible-completions): Add support for FLAGS
  arg (currently ignored)

7 years agosemantic: Accept FLAGS in texinfo-mode for analyzing completions
Eric Ludlam [Sat, 11 Apr 2015 23:18:01 +0000 (19:18 -0400)]
semantic: Accept FLAGS in texinfo-mode for analyzing completions

* lisp/cedet/semantic/texi.el (semantic-analyze-possible-completions):
 Add support for FLAGS (currently ignored).

7 years agosemantic: Incorporate local scope when finding type
Eric Ludlam [Sun, 22 Mar 2015 21:36:16 +0000 (17:36 -0400)]
semantic: Incorporate local scope when finding type

* lisp/cedet/semantic/analyze/fcn.el (semantic-analyze-tag-type): When
 first search fails, calc scope from the originating tag, and try
 again.

7 years agosemantic: New function to calculate scope around tag
Eric Ludlam [Sun, 22 Mar 2015 21:35:27 +0000 (17:35 -0400)]
semantic: New function to calculate scope around tag

* lisp/cedet/semantic/scope.el (semantic-calculate-scope-for-tag):
  New.

7 years agoEDE: Rework config file detection
Eric Ludlam [Sun, 22 Mar 2015 16:26:14 +0000 (12:26 -0400)]
EDE: Rework config file detection

* lisp/cedet/ede/auto.el (ede-calc-fromconfig): New.
  (ede-dirmatch-installed, ede-do-dirmatch): Use above to find config
  file.

7 years agosemantic: Do not strip '*' from operator
Eric Ludlam [Sun, 1 Mar 2015 14:37:01 +0000 (09:37 -0500)]
semantic: Do not strip '*' from operator

* lisp/cedet/semantic/bovine/c.el (semantic-c-reconstitute-token): Do
 not strip a fcnpoint * off the name of an operator.

7 years agoEDE: Add missing require and silence byte compiler
Eric Ludlam [Mon, 16 Feb 2015 18:05:08 +0000 (13:05 -0500)]
EDE: Add missing require and silence byte compiler

* lisp/cedet/ede/config.el: Require 'ede/shell and declare functions
  to silence byte compiler.

7 years agoEDE: Move ede-global-list-sanity-check to ede/files.el
Eric Ludlam [Mon, 16 Feb 2015 18:03:51 +0000 (13:03 -0500)]
EDE: Move ede-global-list-sanity-check to ede/files.el

* lisp/cedet/ede.el: Declare `ede-directory-project-cons'.
* lisp/cedet/ede/files.el (ede-global-list-sanity-check): Moved from
  ede.el.

7 years agosemantic: Fix wisent parser recursion
Martin Stein [Mon, 16 Feb 2015 14:01:12 +0000 (09:01 -0500)]
semantic: Fix wisent parser recursion

* lisp/cedet/semantic/wisent/wisent.el (wisent-parse): The semantic
 action might be an EXPAND, EXPANDFULL or some similar action calling
 the parser recursively. If the last token of the recursively called
 parsing step failed to match it ends up in wisent-lookahead, and
 function wisent-parse-stream pushs it back onto
 wisent-lex-istream. From there on it simply ends up occuring twice on
 the unmatched-syntax-cache, or worse might even lead to parse errors
 in rare cases.

Copyright-paperwork-exempt: yes

7 years agosemantic: Deal with missing prefix when completing symbol
Eric Ludlam [Mon, 16 Feb 2015 13:38:42 +0000 (08:38 -0500)]
semantic: Deal with missing prefix when completing symbol

* lisp/cedet/semantic/ia.el (semantic-ia-complete-symbol): Protect
 against a nil prefix.
 (semantic-ia-complete-symbol-menu): If bounds are empty (no prefix),
 don't delete region.

7 years ago; semantic: Add TODO comment regarding arg indexing
Eric Ludlam [Sun, 15 Feb 2015 12:54:53 +0000 (07:54 -0500)]
; semantic: Add TODO comment regarding arg indexing

7 years agosemantic: Fix current symbol info
Eric Ludlam [Mon, 26 Jan 2015 23:12:12 +0000 (18:12 -0500)]
semantic: Fix current symbol info

* lisp/cedet/semantic/bovine/c.el
  (semantic-idle-summary-current-symbol-info): The macro symbol value
  might be a string, so support that.

7 years agoEDE: Fallback to project-linux-build-directory-default if necessary
Eric Ludlam [Mon, 26 Jan 2015 22:26:35 +0000 (17:26 -0500)]
EDE: Fallback to project-linux-build-directory-default if necessary

* lisp/cedet/ede/linux.el (ede-linux--get-build-directory): Use
  variable `project-linux-build-directory-default' as fallback.

7 years agoEDE: Fix slot type in ede-proj-target-makefile
Eric Ludlam [Mon, 26 Jan 2015 21:32:45 +0000 (16:32 -0500)]
EDE: Fix slot type in ede-proj-target-makefile

* lisp/cedet/ede/proj.el (ede-proj-target-makefile): Set type to
  `ede-makefile-rule-list'.

7 years agosemantic: Add support for typedef references
David Engster [Sun, 25 Jan 2015 22:10:13 +0000 (23:10 +0100)]
semantic: Add support for typedef references

* admin/grammars/c.by (typedefname): Also parse optional reference
  qualifier.

* lisp/cedet/semantic/bovine/c.el (semantic-expand-c-tag-namelist):
  Add :reference attribute for typedefs.

7 years agosemantic: Apply enum-type to all members
David Engster [Sun, 25 Jan 2015 21:32:25 +0000 (22:32 +0100)]
semantic: Apply enum-type to all members

* lisp/cedet/semantic/bovine/c.el (semantic-expand-c-tag): For typed
  enums, apply the :enum-type attribute as :type to all members.

7 years agosemantic: Do not add enum-type for every type
David Engster [Sat, 24 Jan 2015 10:14:38 +0000 (11:14 +0100)]
semantic: Do not add enum-type for every type

* lisp/cedet/semantic/bovine/c.el (semantic-c-reconstitute-token): Do
  not add :enum-type here, since the Bovinator will do this for ENUMs
  already.

7 years agosemantic: make semanticdb-default-find-index-class buffer-local
Joris Steyn [Fri, 16 Jan 2015 19:03:08 +0000 (20:03 +0100)]
semantic: make semanticdb-default-find-index-class buffer-local

* lisp/cedet/semantic/db.el (semanticdb-default-find-index-class): Fix
  typo.

Copyright-paperwork-exempt: yes

7 years agoCheck that variable lists are actually lists
Philipp Stephani [Wed, 18 Jan 2017 18:49:58 +0000 (19:49 +0100)]
Check that variable lists are actually lists

'let' and 'let*' document that their first argument has to be a list,
but don't check for that; instead, they allow (and silently ignore)
other types.  Introduce an explicit type check.

* src/eval.c (Flet, FletX): Check that the variable list is indeed a
list.
* test/src/eval-tests.el: Add unit tests.

7 years agoAvoid inefficient regex in diff-refine-hunk (Bug#25410)
Noam Postavsky [Fri, 13 Jan 2017 04:32:44 +0000 (23:32 -0500)]
Avoid inefficient regex in diff-refine-hunk (Bug#25410)

* lisp/vc/diff-mode.el (diff--forward-while-leading-char): New function.
(diff-refine-hunk): Use it instead of trying to match multiple lines
with a single lines.

7 years agoRemove lock file when auto-saving into the visited file
Eli Zaretskii [Wed, 18 Jan 2017 18:36:14 +0000 (20:36 +0200)]
Remove lock file when auto-saving into the visited file

* src/fileio.c (write_region): When auto-saving into the visited
file, unlock the file whenever we mark the buffer unmodified.
(Bug#25470)

7 years agoFix a bug with signaling a thread that waits for condvar
Eli Zaretskii [Wed, 18 Jan 2017 16:06:42 +0000 (18:06 +0200)]
Fix a bug with signaling a thread that waits for condvar

* src/thread.c (lisp_mutex_lock_for_thread): New function,
with all the guts of lisp_mutex_lock.
(lisp_mutex_lock): Call lisp_mutex_lock_for_thread.
(condition_wait_callback): Don't call post_acquire_global_lock
before locking the mutex, as that could cause a signaled thread to
exit prematurely, because the condvar's mutex is recorded to be
not owned by any thread, and with-mutex wants to unlock it as part
of unwinding the stack in response to the signal.

7 years agoRudimentary error handling for non-main threads
Eli Zaretskii [Wed, 18 Jan 2017 16:00:16 +0000 (18:00 +0200)]
Rudimentary error handling for non-main threads

* src/thread.c (last_thread_error): New static variable.
(syms_of_threads): Staticpro it.
(record_thread_error, Fthread_last_error): New functions.
(syms_of_threads): Defsubr Fthread_last_error.

* doc/lispref/threads.texi (Basic Thread Functions): Document
thread-last-error.

* test/src/thread-tests.el (thread-errors, thread-signal-early)
(threads-condvar-wait): Test the values returned by
thread-last-error.

7 years agoAdd info-lookup help for gdb-script-mode
Tom Tromey [Mon, 16 Jan 2017 22:59:06 +0000 (15:59 -0700)]
Add info-lookup help for gdb-script-mode

Bug#25464:
* lisp/info-look.el (info-lookup-guess-gdb-script-symbol): New
function.
Add help for gdb-script-mode.

7 years agoTreat ":root" as a css-selector
Tom Tromey [Tue, 17 Jan 2017 00:17:38 +0000 (17:17 -0700)]
Treat ":root" as a css-selector

* lisp/textmodes/css-mode.el (css--font-lock-keywords): Recognize bare
":root" as selector.

7 years agoFix JS regexp literal syntax propertization in expressions
Tom Tromey [Mon, 16 Jan 2017 21:02:45 +0000 (14:02 -0700)]
Fix JS regexp literal syntax propertization in expressions

Bug#25465:
* lisp/progmodes/js.el (js-syntax-propertize): Recognize a regexp
literal after "!", "&", and "|".
test/lisp/progmodes/js-tests.el (js-mode-regexp-syntax): New test.

7 years agoMark unused arguments and remove unused variables
Mark Oteiza [Tue, 17 Jan 2017 20:19:30 +0000 (15:19 -0500)]
Mark unused arguments and remove unused variables

* lisp/play/dunnet.el (dun-mode, dun-die, dun-inven, dun-try-take):
(dun-dig, dun-type, dun-n, dun-s, dun-e, dun-w, dun-ne, dun-se):
(dun-nw, dun-sw, dun-up, dun-down, dun-in, dun-out, dun-long):
(dun-swim, dun-score, dun-flush, dun-piss, dun-sleep, dun-drive):
(dun-superb, dun-power, dun-unix-parse, dun-bin, dun-fascii):
(dun-ftpquit, dun-ftphelp, dun-uexit, dun-pwd, dun-dos-parse):
(dun-dos-invd, dun-dos-spawn, dun-dos-exit, dun-dos-nil):
(dungeon-nil): Mark arguments as unused.
(dun-drop, dun-objnum-from-args, dun-get-path, dun-ftp):
(dun-restore): Remove unused variable.

7 years agoFix auto-save-file-name problem in Tramp on MS Windows
Michael Albinus [Tue, 17 Jan 2017 16:35:23 +0000 (17:35 +0100)]
Fix auto-save-file-name problem in Tramp on MS Windows

* lisp/files.el (make-auto-save-file-name): Use `file-remote-p'
rather than an ange-ftp regexp.

* lisp/net/tramp.el (tramp-handle-make-auto-save-file-name):
Fix a problem when running on MS Windows.

* test/lisp/net/tramp-tests.el (tramp-test31-make-auto-save-file-name):
Adapt test.

7 years ago; Spelling fixes
Paul Eggert [Tue, 17 Jan 2017 15:45:39 +0000 (07:45 -0800)]
; Spelling fixes

7 years agoMerge from origin/emacs-25
Paul Eggert [Tue, 17 Jan 2017 15:34:25 +0000 (07:34 -0800)]
Merge from origin/emacs-25

42614fa Update remaining copyright years with admin.el M-x set-copyright
f17a006 * lisp/ffap.el (ffap-lax-url): Bump :version after recent cha...

7 years ago; Merge from origin/emacs-25
Paul Eggert [Tue, 17 Jan 2017 15:32:13 +0000 (07:32 -0800)]
; Merge from origin/emacs-25

The following commit was skipped:

8dd624c Document that functions in 'ffap-alist' can use the match data

7 years agoNix some uses of eval
Mark Oteiza [Tue, 17 Jan 2017 05:48:00 +0000 (00:48 -0500)]
Nix some uses of eval

* lisp/play/dunnet.el: Fix triple negative.
(dun-doverb): Use funcall instead of eval.
(dun-echo): Just call dun-mprinc.
(dun-save-val): Just bind value without eval.

7 years ago; * lisp/play/dunnet.el: Fix file footer.
Mark Oteiza [Tue, 17 Jan 2017 04:35:05 +0000 (23:35 -0500)]
; * lisp/play/dunnet.el: Fix file footer.

7 years agoFix comment in css-mode.el
Tom Tromey [Tue, 17 Jan 2017 00:21:55 +0000 (17:21 -0700)]
Fix comment in css-mode.el

* lisp/textmodes/css-mode.el: Remove obsolete comment.

7 years agoImprove ffap-gopher-at-point handling of long lines
Noam Postavsky [Sun, 8 Jan 2017 23:19:32 +0000 (18:19 -0500)]
Improve ffap-gopher-at-point handling of long lines

* lisp/ffap.el (ffap-gopher-regexp): Only match the KEY part.  Note
setting to nil is now supported.
(ffap--gopher-var-on-line): New function.
(ffap-gopher-at-point): Use it instead of the old ffap-gopher-regexp
which could overflow the regexp stack on long lines (Bug#25391).  Use
`let-alist' instead of calling `set' on local variables.
* test/lisp/ffap-tests.el (ffap-gopher-at-point): New test.

7 years agoFix NS main thread check (bug#25265)
Alan Third [Sat, 14 Jan 2017 16:57:46 +0000 (16:57 +0000)]
Fix NS main thread check (bug#25265)

* src/nsterm.m (ns_read_socket, ns_select): Replace mainThread with
isMainThread.

7 years agoCorrect c-parse-state-get-strategy for moving HERE backward into a macro.
Alan Mackenzie [Sat, 14 Jan 2017 12:38:43 +0000 (12:38 +0000)]
Correct c-parse-state-get-strategy for moving HERE backward into a macro.

* list/progmodes/c-engine.el (c-parse-state-get-strategy): When HERE is below
its previous value, we chose strategy 'forward, and the new HERE is in a
(different) macro, ensure the returned START-POINT is not above the start of
the macro.

7 years agoInclude "Date:" in mail messages filed by 'sendmail-send-it'
Eli Zaretskii [Sat, 14 Jan 2017 08:55:16 +0000 (10:55 +0200)]
Include "Date:" in mail messages filed by 'sendmail-send-it'

* lisp/mail/sendmail.el (mail-do-fcc): Insert a 'Date:' header
into the filed message.  In the outgoing message, sendmail will
add the date, but the composed message body doesn't have it.
(Bug#25436)

7 years agoRemove leftover references to log-view-message-face
Dmitry Gutov [Sat, 14 Jan 2017 03:56:37 +0000 (06:56 +0300)]
Remove leftover references to log-view-message-face

* lisp/vc/vc-bzr.el (vc-bzr-log-view-mode): Use log-view-message.

* lisp/vc/vc-git.el (vc-git-root-log-format): Same.

* lisp/vc/vc-hg.el (vc-hg-root-log-format): Same.

7 years agoRecord autoloads till emacs dump
Phillip Lord [Fri, 13 Jan 2017 13:57:51 +0000 (13:57 +0000)]
Record autoloads till emacs dump

* admin/ldefs-clean.el (ldefs-clean-up): Record autoloads till emacs dump
* lisp/ldefs-boot-auto.el (batch-byte-compile): Update

Previously, autoloads were collected till loaddefs.el was generated as
part of the build. However, bootstrap-emacs does not load
loaddefs (rather it is dumped), hence we must record autoloads until the
full emacs binary is dumped.

7 years agoAdd chained indentation to js-mode
Tom Tromey [Fri, 13 Jan 2017 06:15:00 +0000 (23:15 -0700)]
Add chained indentation to js-mode

Bug#20896
* lisp/progmodes/js.el (js-chain-indent): New variable.
(js--skip-term-backward, js--skip-terms-backward)
(js--chained-expression-p): New functions.
(js--proper-indentation): Call js--chained-expression-p.
* test/manual/indent/js-chain.js: New file.
* test/manual/indent/js.js: Add (non-)chained indentation test.

7 years agoFix js-mode indentation bug
Tom Tromey [Tue, 10 Jan 2017 05:15:57 +0000 (22:15 -0700)]
Fix js-mode indentation bug

Bug#15582:
* lisp/progmodes/js.el (js--find-newline-backward): New function.
(js--continued-expression-p): Use it.
* test/manual/indent/js.js: Add new test.

7 years agoFix definition of EMACS in test/manual/indent/Makefile
Tom Tromey [Fri, 13 Jan 2017 06:20:02 +0000 (23:20 -0700)]
Fix definition of EMACS in test/manual/indent/Makefile

* test/manual/indent/Makefile (EMACS): Add one more "..".

7 years agoAdd .jsx to auto-mode-alist
Tom Tromey [Tue, 10 Jan 2017 03:44:19 +0000 (20:44 -0700)]
Add .jsx to auto-mode-alist

Bug#25389:
* lisp/files.el (auto-mode-alist): Add entry for .jsx.

7 years agoFix two js-mode filling bugs
Tom Tromey [Tue, 10 Jan 2017 03:42:43 +0000 (20:42 -0700)]
Fix two js-mode filling bugs

Bug#19399 and Bug#22431:
* lisp/progmodes/js.el (js-mode): Set comment-line-break-function and
c-block-comment-start-regexp.
* test/lisp/progmodes/js-tests.el: New file.

7 years agoFix last change
Eli Zaretskii [Fri, 13 Jan 2017 16:17:12 +0000 (18:17 +0200)]
Fix last change

* test/src/thread-tests.el (threads-condvar-wait): Revert
previous change.  Make sure no other threads from previous
tests are running, to avoid interfering with our thread counts.

7 years agoFix the new condvar test
Eli Zaretskii [Fri, 13 Jan 2017 16:05:38 +0000 (18:05 +0200)]
Fix the new condvar test

* test/src/thread-tests.el (threads-condvar-wait): Enlarge the
time we sleep in the main thread to let the other thread
process notifications.

7 years agoMinor improvements in the new condvar test
Eli Zaretskii [Fri, 13 Jan 2017 14:13:30 +0000 (16:13 +0200)]
Minor improvements in the new condvar test

* test/src/thread-tests.el (threads-test-condvar-wait): Use
with-mutex instead of emulating it inline.
(threads-condvar-wait): Improve comments.  Check that the new
thread is alive before waiting for it to become blocked on the
conditional variable.

7 years agoFix a bug in waiting for condition variable
Eli Zaretskii [Fri, 13 Jan 2017 09:48:51 +0000 (11:48 +0200)]
Fix a bug in waiting for condition variable

* src/thread.c (lisp_mutex_lock, lisp_mutex_unlock)
(lisp_mutex_unlock_for_wait, condition_wait_callback)
(condition_notify_callback): Improve commentary.
(condition_wait_callback): Call post_acquire_global_lock before
attempting to lock the mutex, to make sure the lock's owner is
recorded correctly.

* test/src/thread-tests.el (threads-condvar-wait): New test.

7 years agoFix last change of dd80ee6 (was: mm-uu.el: Don't dissect patch part)
Katsumi Yamaoka [Fri, 13 Jan 2017 07:42:35 +0000 (07:42 +0000)]
Fix last change of dd80ee6 (was: mm-uu.el: Don't dissect patch part)

7 years agomm-uu.el: Don't dissect patch part
Katsumi Yamaoka [Fri, 13 Jan 2017 07:22:30 +0000 (07:22 +0000)]
mm-uu.el: Don't dissect patch part

This fixes a bug that the patch part is broken in the article
<87inpjzhpb.fsf@users.sourceforge.net> in the bug-gnu-emacs list.

* lisp/gnus/mm-uu.el (mm-uu-dissect-text-parts):
Don't dissect patch part.

7 years agoFix extracting async def type and name in python mode imenu
Dmitry Lazurkin [Wed, 4 Jan 2017 18:46:21 +0000 (21:46 +0300)]
Fix extracting async def type and name in python mode imenu

* lisp/progmodes/python.el (python-imenu--get-defun-type-name):
New function.
(python-imenu--build-tree): Use python-imenu--get-defun-type-name for
extract async or simple def type and name at current
position (Bug#24820).
* test/lisp/progmodes/python-tests.el (python-imenu-create-index-1):
(python-imenu-create-flat-index-1): Add async def's.

7 years agoRemove garbage from Content-Transfer-Encoding value (bug#25420)
Katsumi Yamaoka [Thu, 12 Jan 2017 23:32:41 +0000 (23:32 +0000)]
Remove garbage from Content-Transfer-Encoding value (bug#25420)

* lisp/mail/ietf-drums.el (ietf-drums-strip-cte): New function.
(ietf-drums-remove-garbage): New function.
(ietf-drums-remove-whitespace): Remove CR as well.

* lisp/mail/mail-parse.el (mail-header-strip-cte):
Alias to ietf-drums-strip-cte.

* lisp/gnus/gnus-art.el (article-decode-charset):
* lisp/gnus/gnus-sum.el (gnus-summary-enter-digest-group):
* lisp/gnus/mm-decode.el (mm-dissect-buffer):
* lisp/gnus/nndoc.el (nndoc-decode-content-transfer-encoding)
(nndoc-rfc822-forward-generate-article):
* lisp/mh-e/mh-mime.el (mh-decode-message-body):
Replace mail-header-strip with mail-header-strip-cte.

7 years agoRestore behavior of ‘./autogen.sh autoconf git’
Paul Eggert [Thu, 12 Jan 2017 23:04:38 +0000 (15:04 -0800)]
Restore behavior of ‘./autogen.sh autoconf git’

* autogen.sh: Do both autoconf and git setup when invoked
as ‘./autogen.sh autoconf git’.  Avoid unnecessary newline in chatter.
Mention new --no-check option in usage message.  (Bug#25359)

7 years ago* autogen.sh: Simplify argument parsing.
Glenn Morris [Thu, 12 Jan 2017 19:06:03 +0000 (14:06 -0500)]
* autogen.sh: Simplify argument parsing.

7 years ago* autogen.sh: Add --no-check option. (Bug#25359)
Glenn Morris [Wed, 11 Jan 2017 20:01:28 +0000 (15:01 -0500)]
* autogen.sh: Add --no-check option.  (Bug#25359)

7 years agoConvert some network test failures to skipping
Glenn Morris [Wed, 11 Jan 2017 19:35:51 +0000 (14:35 -0500)]
Convert some network test failures to skipping

These tests intermittently fail on hydra.nixos.org for unclear
reasons related to starting the external process.
This isn't an Emacs issue, and the failures cause noise on
the emacs-buildstatus list.  (Bug#24503)
* test/lisp/net/network-stream-tests.el (echo-server-nowait)
(connect-to-tls-ipv4-nowait): Skip rather than fail if the
external process fails to start properly.

7 years agoAdd DNS keywords and remove duplications
Alexander Kuleshov [Fri, 23 Dec 2016 10:53:41 +0000 (16:53 +0600)]
Add DNS keywords and remove duplications

* lisp/textmodes/dns-mode.el (dns-mode-types): Add two TLSA and
NSEC" DNS related keywords and remove duplication of "NSAP".

7 years agoHandle syntactic WS cache properties more accurately at buffer changes.
Alan Mackenzie [Wed, 11 Jan 2017 18:25:39 +0000 (18:25 +0000)]
Handle syntactic WS cache properties more accurately at buffer changes.

This fixes bug #25362.

* lisp/progmodes/cc-engine.el (c-sws-lit-type, c-sws-lit-limits)
(c-invalidate-sws-region-before, c-invalidate-sws-region-after-del)
(c-invalidate-sws-region-after-ins): New variables and functions.
(c-invalidate-sws-region-after): Change from a defsubst to a defun.
Also pass
it the standard OLD-LEN argument.  Call both
c-invalidate-sws-region-after-{ins,del} to check for "dangerous" WS
cache
properties.

* lisp/progmodes/cc-langs.el (c-block-comment-ender-regexp): New language
variable.

* lisp/progmodes/cc-mode.el (c-before-change): Call
c-invalidate-sws-region-before.
(c-after-change): Pass old-len to c-invalidate-sws-region-after.

7 years agoSupport stat 8.26 in Tramp
Michael Albinus [Wed, 11 Jan 2017 16:13:41 +0000 (17:13 +0100)]
Support stat 8.26 in Tramp

* lisp/net/tramp-sh.el (tramp-get-remote-stat): Use QUOTING_STYLE
environment variable of newer coreutils.  (Bug#23422)

7 years agoMerge from gnulib
Paul Eggert [Tue, 10 Jan 2017 15:48:37 +0000 (07:48 -0800)]
Merge from gnulib

This incorporates:
2017-01-09 maint: time stamp -> timestamp
2017-01-07 stdioext: Port to Minix 3.2 and newer
2017-01-06 glob, intprops, xalloc: work around Clang bug
2017-01-02 revert copyright-year change to synced files
* doc/misc/texinfo.tex, lib/fpending.c, lib/intprops.h, lib/mktime.c:
* lib/stat-time.h, lib/stdio-impl.h, lib/time.in.h, lib/timespec.h:
* lib/utimens.c, lib/xalloc-oversized.h:
Copy from gnulib.

7 years agoDon't use unsafe encoding for the bookmark file
Eli Zaretskii [Tue, 10 Jan 2017 15:47:10 +0000 (17:47 +0200)]
Don't use unsafe encoding for the bookmark file

* lisp/bookmark.el (bookmark-write-file): Handle the case when the
explicitly specified encoding of the bookmark file cannot encode the
additional bookmarks just added.  (Bug#25365)

7 years agoRemove unused ldefs-boot.el
Phillip Lord [Mon, 9 Jan 2017 08:56:03 +0000 (08:56 +0000)]
Remove unused ldefs-boot.el

 * lisp/ldefs-boot.el: Remove

This file was not removed as reported in c27b645956a11, but accidentally
left.

7 years agoUse expanded stack during regex matches
Noam Postavsky [Sun, 1 Jan 2017 19:09:13 +0000 (14:09 -0500)]
Use expanded stack during regex matches

While the stack is increased in main(), to allow the regex stack
allocation to use alloca we also need to modify regex.c to actually take
advantage of the increased stack, and not limit stack allocations to
SAFE_ALLOCA bytes.

* src/regex.c (MATCH_MAY_ALLOCATE): Remove obsolete comment about
allocations in signal handlers which no longer happens and correct
description about when and why MATCH_MAY_ALLOCATE should be defined.
(emacs_re_safe_alloca): New variable.
(REGEX_USE_SAFE_ALLOCA): Use it as the limit of stack allocation instead
of MAX_ALLOCA.
(emacs_re_max_failures): Rename from `re_max_failures' to avoid
confusion with glibc's `re_max_failures'.
* src/emacs.c (main): Increase the amount of fixed 'extra' bytes we add
to the stack.  Instead of changing emacs_re_max_failures based on the
new stack size, just change emacs_re_safe_alloca; emacs_re_max_failures
remains constant regardless, since if we run out stack space SAFE_ALLOCA
will fall back to heap allocation.

Co-authored-by: Eli Zaretskii <eliz@gnu.org>
7 years agoFix computation of regex stack limit
Noam Postavsky [Sat, 5 Nov 2016 20:51:53 +0000 (16:51 -0400)]
Fix computation of regex stack limit

The regex stack limit was being computed as the number of stack entries,
whereas it was being compared with the current size as measured in
bytes.  This could cause indefinite looping when nearing the stack limit
if re_max_failures happened not to be a multiple of sizeof
fail_stack_elt_t (Bug #24751).

* src/regex.c (GROW_FAIL_STACK): Compute both current stack size and
limit as numbers of stack entries.

7 years agoRemove apploopnr
Alan Third [Sun, 8 Jan 2017 09:47:51 +0000 (09:47 +0000)]
Remove apploopnr

* src/nsterm.m (ns_select, ns_read_socket): Remove apploopnr and only
allow app loop to run in main thread.

7 years agoRemove unused configure output variable
Glenn Morris [Sun, 8 Jan 2017 18:19:48 +0000 (10:19 -0800)]
Remove unused configure output variable

* configure.ac (GNULIB_MK):
* Makefile.in (gnulib_mk): Remove, no longer used.

7 years agoFix automake dependencies
Glenn Morris [Sun, 8 Jan 2017 18:16:16 +0000 (10:16 -0800)]
Fix automake dependencies

* Makefile.in (AUTOMAKE_INPUTS): Add nt/gnulib.mk.  (Bug#25372)
All platforms need this file to exist.