resolve ChangeLog merge conflict
This commit is contained in:
commit
f3be002548
46 changed files with 867 additions and 619 deletions
|
@ -2,6 +2,14 @@
|
|||
|
||||
* CONTRIBUTE: add Savannah url, cleanup announcing freeze.
|
||||
|
||||
2014-12-23 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
Merge from gnulib
|
||||
2014-12-20 utimens: remove unnecessary assert
|
||||
2014-12-16 stdalign: port better to HP compilers
|
||||
2014-12-16 stdalign: work around Apple GCC 4.0 bug
|
||||
* lib/stdalign.in.h, lib/utimens.c, m4/stdalign.m4: Update from gnulib.
|
||||
|
||||
2014-12-19 Stephen Leake <stephen_leake@stephe-leake.org>
|
||||
|
||||
Move user-level information from CONTRIBUTE to doc/emacs/trouble.texi
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2014-12-22 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
Remove obsolete references to pre-C99 builds
|
||||
* internals.texi (C Integer Types): Don't mention pre-C99 compilers.
|
||||
|
||||
2014-12-19 Martin Rudalics <rudalics@gmx.at>
|
||||
|
||||
* windows.texi (Resizing Windows): Describe new argument of
|
||||
|
|
|
@ -1684,8 +1684,7 @@ using @code{int}. Although it is also OK to use @code{int}, @code{0}
|
|||
and @code{1}, this older style is gradually being phased out. When
|
||||
using @code{bool}, respect the limitations of the replacement
|
||||
implementation of @code{bool}, as documented in the source file
|
||||
@file{lib/stdbool.in.h}, so that Emacs remains portable to pre-C99
|
||||
platforms. In particular, boolean bitfields should be of type
|
||||
@file{lib/stdbool.in.h}. In particular, boolean bitfields should be of type
|
||||
@code{bool_bf}, not @code{bool}, so that they work correctly even when
|
||||
compiling Objective C with standard GCC.
|
||||
|
||||
|
|
|
@ -95,7 +95,10 @@
|
|||
#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112
|
||||
# if defined __cplusplus && 201103 <= __cplusplus
|
||||
# define _Alignas(a) alignas (a)
|
||||
# elif (__GNUC__ || __HP_cc || __HP_aCC || __IBMC__ || __IBMCPP__ \
|
||||
# elif ((defined __APPLE__ && defined __MACH__ \
|
||||
? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
|
||||
: __GNUC__) \
|
||||
|| __HP_cc || __HP_aCC || __IBMC__ || __IBMCPP__ \
|
||||
|| __ICC || 0x5110 <= __SUNPRO_C)
|
||||
# define _Alignas(a) __attribute__ ((__aligned__ (a)))
|
||||
# elif 1300 <= _MSC_VER
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
#define _GL_UTIMENS_INLINE _GL_EXTERN_INLINE
|
||||
#include "utimens.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdbool.h>
|
||||
|
@ -87,7 +86,6 @@ validate_timespec (struct timespec timespec[2])
|
|||
{
|
||||
int result = 0;
|
||||
int utime_omit_count = 0;
|
||||
assert (timespec);
|
||||
if ((timespec[0].tv_nsec != UTIME_NOW
|
||||
&& timespec[0].tv_nsec != UTIME_OMIT
|
||||
&& ! (0 <= timespec[0].tv_nsec
|
||||
|
|
|
@ -1,3 +1,81 @@
|
|||
2014-12-24 Michael Albinus <michael.albinus@gmx.de>
|
||||
|
||||
* eshell/esh-ext.el (eshell-find-interpreter): Expand relative
|
||||
remote file names. (Bug#18782)
|
||||
|
||||
2014-12-23 Sam Steingold <sds@gnu.org>
|
||||
|
||||
* shell.el (shell-display-buffer-actions): New user option.
|
||||
(shell): Pass it to `pop-to-buffer' instead of hard-coding
|
||||
`pop-to-buffer-same-window'.
|
||||
|
||||
2014-12-23 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* progmodes/js.el (js--syntax-propertize-regexp-syntax-table): New var.
|
||||
(js-syntax-propertize-regexp): Use it to recognize "slash in
|
||||
a character class" (bug#19397).
|
||||
|
||||
2014-12-22 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* completion.el: Use post-self-insert-hook (bug#19400).
|
||||
(completion-separator-self-insert-command)
|
||||
(completion-separator-self-insert-autofilling): Remove.
|
||||
(completion-separator-chars): New var.
|
||||
(completion-c-mode-hook, completion-setup-fortran-mode): Use it instead
|
||||
of changing the keymap.
|
||||
(completion--post-self-insert): New function.
|
||||
(dynamic-completion-mode): Use it instead of rebinding keys.
|
||||
(cmpl--completion-string): Rename from completion-string.
|
||||
(add-completion-to-head, delete-completion): Let-bind it explicitly.
|
||||
|
||||
2014-12-22 Bozhidar Batsov <bozhidar@batsov.com>
|
||||
|
||||
* progmodes/ruby-mode.el (ruby--string-region): Simplify code
|
||||
by leveraging `syntax-ppss'.
|
||||
|
||||
2014-12-22 Artur Malabarba <bruce.connor.am@gmail.com>
|
||||
|
||||
* let-alist.el (let-alist): Use `make-symbol' instead of `gensym'.
|
||||
|
||||
2014-12-20 Michael Albinus <michael.albinus@gmx.de>
|
||||
|
||||
* net/tramp-sh.el (tramp-histfile-override): Add :version.
|
||||
|
||||
2014-12-20 Teodor Zlatanov <tzz@lifelogs.com>
|
||||
|
||||
* net/tramp-sh.el (tramp-histfile-override): Clarify docstring.
|
||||
|
||||
2014-12-19 Artur Malabarba <bruce.connor.am@gmail.com>
|
||||
|
||||
* let-alist.el (let-alist): Enable access to deeper alists by
|
||||
using dots inside the dotted symbols.
|
||||
|
||||
2014-12-19 Alan Mackenzie <acm@muc.de>
|
||||
|
||||
Make C++11 uniform init syntax work. New keywords "final" and "override"
|
||||
|
||||
* progmodes/cc-engine.el (c-back-over-member-initializer-braces):
|
||||
New function.
|
||||
(c-guess-basic-syntax): Set `containing-sex' and `lim' using the
|
||||
new function.
|
||||
|
||||
* progmodes/cc-fonts.el (c-font-lock-declarations): Check more
|
||||
carefully for "are we at a declarator?" using
|
||||
c-back-over-member-initializers.
|
||||
|
||||
* progmodes/cc-langs.el (c-type-modifier-kwds): include "final"
|
||||
and "override" in the C++ value.
|
||||
|
||||
2014-12-19 Martin Rudalics <rudalics@gmx.at>
|
||||
|
||||
* textmodes/ispell.el (ispell-command-loop): Don't use
|
||||
`next-window'.
|
||||
|
||||
2014-12-21 Lars Ingebrigtsen <larsi@gnus.org>
|
||||
|
||||
* net/nsm.el (nsm-save-host): Don't save the host name twice
|
||||
(bug#19269).
|
||||
|
||||
2014-12-18 Sam Steingold <sds@gnu.org>
|
||||
|
||||
Keyboard interface (C-f10) to `mouse-buffer-menu' (C-down-mouse-1).
|
||||
|
|
|
@ -1,9 +1,21 @@
|
|||
2014-12-22 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* srecode/srt-mode.el (srecode-macro-help): Use eieio-class-children.
|
||||
|
||||
* semantic/db.el (semanticdb-cache-get): Prefer eieio-object-class over
|
||||
eieio--object-class.
|
||||
|
||||
* semantic/db-el.el (semanticdb-elisp-sym->tag): Prefer find-class over
|
||||
class-v.
|
||||
|
||||
* ede/generic.el (ede-find-target): Prefer \` and \' to ^ and $.
|
||||
|
||||
2014-12-14 Dmitry Gutov <dgutov@yandex.ru>
|
||||
|
||||
* semantic.el (semantic-analyze-completion-at-point-function)
|
||||
(semantic-analyze-notc-completion-at-point-function)
|
||||
(semantic-analyze-nolongprefix-completion-at-point-function): Do
|
||||
nothing if the current buffer is not using Semantic (bug#19077).
|
||||
(semantic-analyze-nolongprefix-completion-at-point-function):
|
||||
Do nothing if the current buffer is not using Semantic (bug#19077).
|
||||
|
||||
2014-12-08 Matt Curtis <matt.r.curtis@gmail.com> (tiny change)
|
||||
|
||||
|
@ -14,11 +26,11 @@
|
|||
|
||||
* semantic.el (semantic-mode): Add/remove 3
|
||||
completion-at-point-functions.
|
||||
(semantic-completion-at-point-function): Removed.
|
||||
(semantic-completion-at-point-function): Remove.
|
||||
(semantic-analyze-completion-at-point-function)
|
||||
(semantic-analyze-notc-completion-at-point-function)
|
||||
(semantic-analyze-nolongprefix-completion-at-point-function): New
|
||||
completion at point functions.
|
||||
(semantic-analyze-nolongprefix-completion-at-point-function):
|
||||
New completion at point functions.
|
||||
|
||||
* semantic/doc.el (semantic-doc-snarf-comment-for-tag): Fix case
|
||||
when comment-end is empty string.
|
||||
|
@ -62,18 +74,18 @@
|
|||
assignee now must be of class variable.
|
||||
|
||||
* semantic/analyze/complete.el
|
||||
(semantic-analyze-possible-completions-default): Add
|
||||
'no-longprefix' flag. When used, the prefix and prefixtypes are
|
||||
(semantic-analyze-possible-completions-default):
|
||||
Add 'no-longprefix' flag. When used, the prefix and prefixtypes are
|
||||
shortened to just the last symbol.
|
||||
|
||||
* semantic/bovine/c.el (semantic-c-do-lex-if): Catch errors from
|
||||
'hideif', and push to the parser warning stack.
|
||||
(semantic-lex-cpp-define): When a comment is at the end of a
|
||||
macro, do not subtract an extra 1 from the found position. Fixes
|
||||
bug with: #define foo (a)/**/ adding an extra ')' to the stream.
|
||||
macro, do not subtract an extra 1 from the found position.
|
||||
Fixes bug with: #define foo (a)/**/ adding an extra ')' to the stream.
|
||||
|
||||
* semantic/bovine/scm.el (semantic-lex-scheme-symbol): Allow
|
||||
symbols to be one char long.
|
||||
* semantic/bovine/scm.el (semantic-lex-scheme-symbol):
|
||||
Allow symbols to be one char long.
|
||||
|
||||
* semantic/bovine/grammar.el
|
||||
(bovine-grammar-calculate-source-on-path): New.
|
||||
|
@ -89,8 +101,8 @@
|
|||
(ede-check-project-query-fcn): New variable
|
||||
(ede-check-project-directory): Use above when querying the user.
|
||||
Added to support unit testing of this security measure.
|
||||
(ede-initialize-state-current-buffer): Use
|
||||
`ede-directory-project-cons' instead of the -detect- fcn to take
|
||||
(ede-initialize-state-current-buffer):
|
||||
Use `ede-directory-project-cons' instead of the -detect- fcn to take
|
||||
advantage of the cache. Pass found project into
|
||||
`ede-load-project-file'.
|
||||
(ede-load-project-file): Add new input DETECTIN.
|
||||
|
@ -103,18 +115,18 @@
|
|||
(ede-global-list-sanity-check): New Testing fcn.
|
||||
(ede-parent-project): Replace old code with call to faster
|
||||
`ede-find-subproject-for-directory'.
|
||||
(ede-load-project-file): Use
|
||||
`ede-directory-get-toplevel-open-project' instead of above
|
||||
deleted. Rename "pfc" to "autoloader". Use
|
||||
`ede-directory-project-cons' to detect a project. Delete no
|
||||
(ede-load-project-file):
|
||||
Use `ede-directory-get-toplevel-open-project' instead of above
|
||||
deleted. Rename "pfc" to "autoloader".
|
||||
Use `ede-directory-project-cons' to detect a project. Delete no
|
||||
project found case where we search up the tree.
|
||||
|
||||
* ede/auto.el (ede-project-autoload): Fix doc typo. Add
|
||||
`:root-only' slot.
|
||||
* ede/auto.el (ede-project-autoload): Fix doc typo.
|
||||
Add `:root-only' slot.
|
||||
(ede-auto-load-project): Doc update: warn to not use.
|
||||
(ede-dir-to-projectfile): Deleted.
|
||||
(ede-project-autoload-dirmatch): Add subdir-only slot. Make
|
||||
configdatastash unbound by default.
|
||||
(ede-dir-to-projectfile): Delete.
|
||||
(ede-project-autoload-dirmatch): Add subdir-only slot.
|
||||
Make configdatastash unbound by default.
|
||||
(ede-do-dirmatch): If subdir-only is true, then don't allow exact
|
||||
matches. Account for configdatastash as unbound. Assume value of
|
||||
nil means no tool installed. Make sure loaded path matches from
|
||||
|
@ -122,7 +134,7 @@
|
|||
(ede-project-class-files): Note that makefile and automake are not
|
||||
root only.
|
||||
(ede-auto-detect-in-dir): New (for use with `ede/detect.el').
|
||||
(ede-project-dirmatch-p): Deleted.
|
||||
(ede-project-dirmatch-p): Delete.
|
||||
(ede-project-root-directory): Remove body, return nil.
|
||||
(ede-project-autoload): :proj-root-dirmatch can be null & doc fix.
|
||||
(ede-auto-detect-in-dir): If there is no :proj-file, check for a
|
||||
|
@ -140,8 +152,8 @@
|
|||
(ede-generic-config): Remove slots: c-include-path,
|
||||
c-preprocessor-table, c-preprocessor-files, classpath,
|
||||
build-command, debug-command, run command. Inherit from
|
||||
ede-extra-config-build, ede-extra-config-program. Make
|
||||
run-command :value match :custom so only strings are accepted.
|
||||
ede-extra-config-build, ede-extra-config-program.
|
||||
Make run-command :value match :custom so only strings are accepted.
|
||||
Add some more :group slot specifiers.
|
||||
(ede-generic-project): Add mixins `ede-project-with-config-c' and
|
||||
`ede-project-with-config-java'. Inherit from
|
||||
|
@ -153,15 +165,15 @@
|
|||
(ede-generic-target-c-cpp): Add mixin `ede-target-with-config-c'.
|
||||
(ede-generic-target-java): Add mixin `ede-target-with-config-java'.
|
||||
(ede-preprocessor-map, ede-system-include-path)
|
||||
(edejava-classpath): Deleted, moved to config.el.
|
||||
(edejava-classpath): Delete, moved to config.el.
|
||||
(project-compile-project, project-compile-target)
|
||||
(project-debug-target, project-run-target): Deleted.
|
||||
(project-debug-target, project-run-target): Delete.
|
||||
(ede-generic-get-configuration, ede-generic-setup-configuration)
|
||||
(ede-commit-project, project-rescan)
|
||||
(ede-generic-project::ede-customize)
|
||||
(ede-generic-target::ede-customize)
|
||||
(ede-generic-config::eieio-done-customizing)
|
||||
(ede-generic-config::ede-commit): Deleted. Subsumed by new
|
||||
(ede-generic-config::ede-commit): Delete. Subsumed by new
|
||||
baseclass.
|
||||
(ede-preprocessor-map, ede-system-include-path)
|
||||
(project-debug-target, project-run-target): Call new
|
||||
|
@ -170,7 +182,7 @@
|
|||
|
||||
* ede/files.el (ede-find-project-root)
|
||||
(ede-files-find-existing)
|
||||
(ede-directory-get-toplevel-open-project-new): Deleted.
|
||||
(ede-directory-get-toplevel-open-project-new): Delete.
|
||||
(ede-project-root-directory): Use `ede-project-root' first.
|
||||
(ede-project-directory-remove-hash)
|
||||
(ede--directory-project-from-hash)
|
||||
|
@ -186,20 +198,20 @@
|
|||
projects. When doing directory name matching, save the 'short'
|
||||
version of an answer (non-exact match) and eventually select the
|
||||
shortest answer at the end. Expand the filename of tested
|
||||
projects. Better support for when inodes are disabled. Add
|
||||
'exact' option so that it will return a project that is an exact
|
||||
projects. Better support for when inodes are disabled.
|
||||
Add 'exact' option so that it will return a project that is an exact
|
||||
match.
|
||||
(ede-find-subproject-for-directory): Small optimization to run
|
||||
`file-truename' less often.
|
||||
(ede-directory-project-p): Move content, then use
|
||||
`ede-directory-project-cons'. Use
|
||||
`ede-detect-directory-for-project', replacing old detection loop.
|
||||
`ede-directory-project-cons'.
|
||||
Use `ede-detect-directory-for-project', replacing old detection loop.
|
||||
(ede-directory-project-cons): New, from above.
|
||||
(ede-toplevel-project): Toss old scanning code. Use
|
||||
`ede-detect-directory-for-project' instead.
|
||||
(ede-toplevel-project): Toss old scanning code.
|
||||
Use `ede-detect-directory-for-project' instead.
|
||||
(ede-directory-get-toplevel-open-project-new): New.
|
||||
|
||||
* ede/linux.el (ede-linux-project-root): Deleted.
|
||||
* ede/linux.el (ede-linux-project-root): Delete.
|
||||
(ede-project-autoload): Remove dirmatch entry - it is no longer
|
||||
needed.
|
||||
|
||||
|
@ -220,7 +232,7 @@
|
|||
* ede/linux.el (ede-linux-load): Do not add to global list here.
|
||||
Don't check for existing anymore.
|
||||
(project-rescan): New.
|
||||
(ede-linux-project-list, ede-linux-file-existing): Deleted.
|
||||
(ede-linux-project-list, ede-linux-file-existing): Delete.
|
||||
(ede-linux-project-root): Delete body. Need symbol for autoloads
|
||||
for now.
|
||||
(ede-linux-project): No longer instance tracker.
|
||||
|
@ -242,7 +254,7 @@
|
|||
(ede-cpp-root-file-existing)
|
||||
(ede-cpp-root-project-file-for-dir)
|
||||
(ede-cpp-root-count, ede-cpp-root-project-root, ede-cpp-root-load)
|
||||
(ede-project-autoload cpp-root): Deleted.
|
||||
(ede-project-autoload cpp-root): Delete.
|
||||
(ede-project-root-directory): Return :directory instead of
|
||||
calculating from :file.
|
||||
(project-rescan): New.
|
||||
|
|
|
@ -232,7 +232,7 @@ If one doesn't exist, create a new one for this directory."
|
|||
(let* ((classsym (intern (car C)))
|
||||
(extreg (oref classsym extension)))
|
||||
(when (and (not (string= extreg ""))
|
||||
(string-match (concat "^" extreg "$") ext))
|
||||
(string-match (concat "\\`\\(?:" extreg "\\)\\'") ext))
|
||||
(setq cls classsym)))))
|
||||
(when (not cls) (setq cls 'ede-generic-target-misc))
|
||||
;; find a pre-existing matching target
|
||||
|
|
|
@ -223,7 +223,9 @@ TOKTYPE is a hint to the type of tag desired."
|
|||
(symbol-name sym)
|
||||
"class"
|
||||
(semantic-elisp-desymbolify
|
||||
(eieio--class-public-a (class-v semanticdb-project-database))) ;; slots
|
||||
;; FIXME: This only gives the instance slots and ignores the
|
||||
;; class-allocated slots.
|
||||
(eieio--class-public-a (find-class semanticdb-project-database))) ;; slots ;FIXME: eieio--
|
||||
(semantic-elisp-desymbolify (eieio-class-parents sym)) ;; parents
|
||||
))
|
||||
((not toktype)
|
||||
|
|
|
@ -481,7 +481,7 @@ other than :table."
|
|||
(let ((cache (oref table cache))
|
||||
(obj nil))
|
||||
(while (and (not obj) cache)
|
||||
(if (eq (eieio--object-class (car cache)) desired-class)
|
||||
(if (eq (eieio-object-class (car cache)) desired-class)
|
||||
(setq obj (car cache)))
|
||||
(setq cache (cdr cache)))
|
||||
(if obj
|
||||
|
@ -532,7 +532,7 @@ other than :table."
|
|||
(let ((cache (oref db cache))
|
||||
(obj nil))
|
||||
(while (and (not obj) cache)
|
||||
(if (eq (eieio--object-class (car cache)) desired-class)
|
||||
(if (eq (eieio-object-class (car cache)) desired-class)
|
||||
(setq obj (car cache)))
|
||||
(setq cache (cdr cache)))
|
||||
(if obj
|
||||
|
|
|
@ -233,7 +233,7 @@ we can tell font lock about them.")
|
|||
"Provide help for working with macros in a template."
|
||||
(interactive)
|
||||
(let* ((root 'srecode-template-inserter)
|
||||
(chl (eieio--class-children (class-v root)))
|
||||
(chl (eieio-class-children root))
|
||||
(ess (srecode-template-get-escape-start))
|
||||
(ees (srecode-template-get-escape-end))
|
||||
)
|
||||
|
@ -249,7 +249,7 @@ we can tell font lock about them.")
|
|||
(showexample t)
|
||||
)
|
||||
(setq chl (cdr chl))
|
||||
(setq chl (append (eieio--class-children (class-v C)) chl))
|
||||
(setq chl (append (eieio-class-children C) chl))
|
||||
|
||||
(catch 'skip
|
||||
(when (eq C 'srecode-template-inserter-section-end)
|
||||
|
|
|
@ -373,7 +373,7 @@ Used to decide whether to save completions.")
|
|||
|
||||
(defvar cmpl-preceding-syntax)
|
||||
|
||||
(defvar completion-string)
|
||||
(defvar cmpl--completion-string)
|
||||
|
||||
;;---------------------------------------------------------------------------
|
||||
;; Low level tools
|
||||
|
@ -1082,7 +1082,7 @@ Must be called after `find-exact-completion'."
|
|||
(cmpl-db-debug-p
|
||||
;; not found, error if debug mode
|
||||
(error "Completion entry exists but not on prefix list - %s"
|
||||
completion-string))
|
||||
cmpl--completion-string))
|
||||
(inside-locate-completion-entry
|
||||
;; recursive error: really scrod
|
||||
(locate-completion-db-error))
|
||||
|
@ -1149,73 +1149,75 @@ COMPLETION-STRING must be longer than `completion-prefix-min-length'.
|
|||
Updates the saved string with the supplied string.
|
||||
This must be very fast.
|
||||
Returns the completion entry."
|
||||
;; Handle pending acceptance
|
||||
(if completion-to-accept (accept-completion))
|
||||
;; test if already in database
|
||||
(if (setq cmpl-db-entry (find-exact-completion completion-string))
|
||||
;; found
|
||||
(let* ((prefix-entry (find-cmpl-prefix-entry
|
||||
(substring cmpl-db-downcase-string 0
|
||||
completion-prefix-min-length)))
|
||||
(splice-ptr (locate-completion-entry cmpl-db-entry prefix-entry))
|
||||
(cmpl-ptr (cdr splice-ptr)))
|
||||
;; update entry
|
||||
(set-completion-string cmpl-db-entry completion-string)
|
||||
;; move to head (if necessary)
|
||||
(cond (splice-ptr
|
||||
;; These should all execute atomically but it is not fatal if
|
||||
;; they don't.
|
||||
;; splice it out
|
||||
(or (setcdr splice-ptr (cdr cmpl-ptr))
|
||||
;; fix up tail if necessary
|
||||
(set-cmpl-prefix-entry-tail prefix-entry splice-ptr))
|
||||
;; splice in at head
|
||||
(setcdr cmpl-ptr (cmpl-prefix-entry-head prefix-entry))
|
||||
(set-cmpl-prefix-entry-head prefix-entry cmpl-ptr)))
|
||||
cmpl-db-entry)
|
||||
;; not there
|
||||
(let (;; create an entry
|
||||
(entry (list (make-completion completion-string)))
|
||||
;; setup the prefix
|
||||
(prefix-entry (find-cmpl-prefix-entry
|
||||
(substring cmpl-db-downcase-string 0
|
||||
completion-prefix-min-length))))
|
||||
(cond (prefix-entry
|
||||
;; Splice in at head
|
||||
(setcdr entry (cmpl-prefix-entry-head prefix-entry))
|
||||
(set-cmpl-prefix-entry-head prefix-entry entry))
|
||||
(t
|
||||
;; Start new prefix entry
|
||||
(set cmpl-db-prefix-symbol (make-cmpl-prefix-entry entry))))
|
||||
;; Add it to the symbol
|
||||
(set cmpl-db-symbol (car entry)))))
|
||||
(let ((cmpl--completion-string completion-string))
|
||||
;; Handle pending acceptance
|
||||
(if completion-to-accept (accept-completion))
|
||||
;; test if already in database
|
||||
(if (setq cmpl-db-entry (find-exact-completion completion-string))
|
||||
;; found
|
||||
(let* ((prefix-entry (find-cmpl-prefix-entry
|
||||
(substring cmpl-db-downcase-string 0
|
||||
completion-prefix-min-length)))
|
||||
(splice-ptr (locate-completion-entry cmpl-db-entry prefix-entry))
|
||||
(cmpl-ptr (cdr splice-ptr)))
|
||||
;; update entry
|
||||
(set-completion-string cmpl-db-entry completion-string)
|
||||
;; move to head (if necessary)
|
||||
(cond (splice-ptr
|
||||
;; These should all execute atomically but it is not fatal if
|
||||
;; they don't.
|
||||
;; splice it out
|
||||
(or (setcdr splice-ptr (cdr cmpl-ptr))
|
||||
;; fix up tail if necessary
|
||||
(set-cmpl-prefix-entry-tail prefix-entry splice-ptr))
|
||||
;; splice in at head
|
||||
(setcdr cmpl-ptr (cmpl-prefix-entry-head prefix-entry))
|
||||
(set-cmpl-prefix-entry-head prefix-entry cmpl-ptr)))
|
||||
cmpl-db-entry)
|
||||
;; not there
|
||||
(let ( ;; create an entry
|
||||
(entry (list (make-completion completion-string)))
|
||||
;; setup the prefix
|
||||
(prefix-entry (find-cmpl-prefix-entry
|
||||
(substring cmpl-db-downcase-string 0
|
||||
completion-prefix-min-length))))
|
||||
(cond (prefix-entry
|
||||
;; Splice in at head
|
||||
(setcdr entry (cmpl-prefix-entry-head prefix-entry))
|
||||
(set-cmpl-prefix-entry-head prefix-entry entry))
|
||||
(t
|
||||
;; Start new prefix entry
|
||||
(set cmpl-db-prefix-symbol (make-cmpl-prefix-entry entry))))
|
||||
;; Add it to the symbol
|
||||
(set cmpl-db-symbol (car entry))))))
|
||||
|
||||
(defun delete-completion (completion-string)
|
||||
"Delete the completion from the database.
|
||||
String must be longer than `completion-prefix-min-length'."
|
||||
;; Handle pending acceptance
|
||||
(if completion-to-accept (accept-completion))
|
||||
(if (setq cmpl-db-entry (find-exact-completion completion-string))
|
||||
;; found
|
||||
(let* ((prefix-entry (find-cmpl-prefix-entry
|
||||
(substring cmpl-db-downcase-string 0
|
||||
completion-prefix-min-length)))
|
||||
(splice-ptr (locate-completion-entry cmpl-db-entry prefix-entry)))
|
||||
;; delete symbol reference
|
||||
(set cmpl-db-symbol nil)
|
||||
;; remove from prefix list
|
||||
(cond (splice-ptr
|
||||
;; not at head
|
||||
(or (setcdr splice-ptr (cdr (cdr splice-ptr)))
|
||||
;; fix up tail if necessary
|
||||
(set-cmpl-prefix-entry-tail prefix-entry splice-ptr)))
|
||||
(t
|
||||
;; at head
|
||||
(or (set-cmpl-prefix-entry-head
|
||||
(let ((cmpl--completion-string completion-string))
|
||||
(if completion-to-accept (accept-completion))
|
||||
(if (setq cmpl-db-entry (find-exact-completion completion-string))
|
||||
;; found
|
||||
(let* ((prefix-entry (find-cmpl-prefix-entry
|
||||
(substring cmpl-db-downcase-string 0
|
||||
completion-prefix-min-length)))
|
||||
(splice-ptr (locate-completion-entry cmpl-db-entry prefix-entry)))
|
||||
;; delete symbol reference
|
||||
(set cmpl-db-symbol nil)
|
||||
;; remove from prefix list
|
||||
(cond (splice-ptr
|
||||
;; not at head
|
||||
(or (setcdr splice-ptr (cdr (cdr splice-ptr)))
|
||||
;; fix up tail if necessary
|
||||
(set-cmpl-prefix-entry-tail prefix-entry splice-ptr)))
|
||||
(t
|
||||
;; at head
|
||||
(or (set-cmpl-prefix-entry-head
|
||||
prefix-entry (cdr (cmpl-prefix-entry-head prefix-entry)))
|
||||
;; List is now empty
|
||||
(set cmpl-db-prefix-symbol nil)))))
|
||||
(error "Unknown completion `%s'" completion-string)))
|
||||
;; List is now empty
|
||||
(set cmpl-db-prefix-symbol nil)))))
|
||||
(error "Unknown completion `%s'" completion-string))))
|
||||
|
||||
;; Tests --
|
||||
;; - Add and Find -
|
||||
|
@ -1311,7 +1313,7 @@ are specified."
|
|||
(delete-completion string))
|
||||
|
||||
(defun accept-completion ()
|
||||
"Accepts the pending completion in `completion-to-accept'.
|
||||
"Accept the pending completion in `completion-to-accept'.
|
||||
This bumps num-uses. Called by `add-completion-to-head' and
|
||||
`completion-search-reset'."
|
||||
(let ((string completion-to-accept)
|
||||
|
@ -2156,26 +2158,27 @@ Patched to remove the most recent completion."
|
|||
;; to work)
|
||||
|
||||
;; All common separators (eg. space "(" ")" """) characters go through a
|
||||
;; function to add new words to the list of words to complete from:
|
||||
;; COMPLETION-SEPARATOR-SELF-INSERT-COMMAND (arg).
|
||||
;; function to add new words to the list of words to complete from.
|
||||
;; If the character before this was an alpha-numeric then this adds the
|
||||
;; symbol before point to the completion list (using ADD-COMPLETION).
|
||||
|
||||
(defun completion-separator-self-insert-command (arg)
|
||||
(interactive "p")
|
||||
(if (command-remapping 'self-insert-command)
|
||||
(funcall (command-remapping 'self-insert-command) arg)
|
||||
(use-completion-before-separator)
|
||||
(self-insert-command arg)))
|
||||
(defvar completion-separator-chars
|
||||
(append " !%^&()=`|{}[];\\'#,?"
|
||||
;; We include period and colon even though they are symbol
|
||||
;; chars because :
|
||||
;; - in text we want to pick up the last word in a sentence.
|
||||
;; - in C pointer refs. we want to pick up the first symbol
|
||||
;; - it won't make a difference for lisp mode (package names
|
||||
;; are short)
|
||||
".:" nil))
|
||||
|
||||
(defun completion-separator-self-insert-autofilling (arg)
|
||||
(interactive "p")
|
||||
(if (command-remapping 'self-insert-command)
|
||||
(funcall (command-remapping 'self-insert-command) arg)
|
||||
(use-completion-before-separator)
|
||||
(self-insert-command arg)
|
||||
(and auto-fill-function
|
||||
(funcall auto-fill-function))))
|
||||
(defun completion--post-self-insert ()
|
||||
(when (memq last-command-event completion-separator-chars)
|
||||
(let ((after-pos (electric--after-char-pos)))
|
||||
(when after-pos
|
||||
(save-excursion
|
||||
(goto-char (1- after-pos))
|
||||
(use-completion-before-separator))))))
|
||||
|
||||
;;-----------------------------------------------
|
||||
;; Wrapping Macro
|
||||
|
@ -2244,9 +2247,8 @@ TYPE is the type of the wrapper to be added. Can be :before or :under."
|
|||
(completion-def-wrapper 'electric-c-semi :separator)
|
||||
(defun completion-c-mode-hook ()
|
||||
(setq completion-syntax-table completion-c-syntax-table)
|
||||
(local-set-key "+" 'completion-separator-self-insert-command)
|
||||
(local-set-key "*" 'completion-separator-self-insert-command)
|
||||
(local-set-key "/" 'completion-separator-self-insert-command))
|
||||
(setq-local completion-separator-chars
|
||||
(append "+*/" completion-separator-chars)))
|
||||
|
||||
;; FORTRAN mode diffs. (these are defined when fortran is called)
|
||||
|
||||
|
@ -2259,10 +2261,8 @@ TYPE is the type of the wrapper to be added. Can be :before or :under."
|
|||
|
||||
(defun completion-setup-fortran-mode ()
|
||||
(setq completion-syntax-table completion-fortran-syntax-table)
|
||||
(local-set-key "+" 'completion-separator-self-insert-command)
|
||||
(local-set-key "-" 'completion-separator-self-insert-command)
|
||||
(local-set-key "*" 'completion-separator-self-insert-command)
|
||||
(local-set-key "/" 'completion-separator-self-insert-command))
|
||||
(setq-local completion-separator-chars
|
||||
(append "+-*/" completion-separator-chars)))
|
||||
|
||||
;; Enable completion mode.
|
||||
|
||||
|
@ -2281,15 +2281,16 @@ if ARG is omitted or nil."
|
|||
;; This is always good, not specific to dynamic-completion-mode.
|
||||
(define-key function-key-map [C-return] [?\C-\r])
|
||||
|
||||
(dolist (x '((find-file-hook . completion-find-file-hook)
|
||||
(pre-command-hook . completion-before-command)
|
||||
(dolist (x `((find-file-hook . ,#'completion-find-file-hook)
|
||||
(pre-command-hook . ,#'completion-before-command)
|
||||
;; Save completions when killing Emacs.
|
||||
(kill-emacs-hook . kill-emacs-save-completions)
|
||||
(kill-emacs-hook . ,#'kill-emacs-save-completions)
|
||||
(post-self-insert-hook . ,#'completion--post-self-insert)
|
||||
|
||||
;; Install the appropriate mode tables.
|
||||
(lisp-mode-hook . completion-lisp-mode-hook)
|
||||
(c-mode-hook . completion-c-mode-hook)
|
||||
(fortran-mode-hook . completion-setup-fortran-mode)))
|
||||
(lisp-mode-hook . ,#'completion-lisp-mode-hook)
|
||||
(c-mode-hook . ,#'completion-c-mode-hook)
|
||||
(fortran-mode-hook . ,#'completion-setup-fortran-mode)))
|
||||
(if dynamic-completion-mode
|
||||
(add-hook (car x) (cdr x))
|
||||
(remove-hook (car x) (cdr x))))
|
||||
|
@ -2315,44 +2316,7 @@ if ARG is omitted or nil."
|
|||
;; cumb
|
||||
|
||||
;; Patches to standard keymaps insert completions
|
||||
([remap kill-region] . completion-kill-region)
|
||||
|
||||
;; Separators
|
||||
;; We've used the completion syntax table given as a guide.
|
||||
;;
|
||||
;; Global separator chars.
|
||||
;; We left out <tab> because there are too many special
|
||||
;; cases for it. Also, in normal coding it's rarely typed
|
||||
;; after a word.
|
||||
(" " . completion-separator-self-insert-autofilling)
|
||||
("!" . completion-separator-self-insert-command)
|
||||
("%" . completion-separator-self-insert-command)
|
||||
("^" . completion-separator-self-insert-command)
|
||||
("&" . completion-separator-self-insert-command)
|
||||
("(" . completion-separator-self-insert-command)
|
||||
(")" . completion-separator-self-insert-command)
|
||||
("=" . completion-separator-self-insert-command)
|
||||
("`" . completion-separator-self-insert-command)
|
||||
("|" . completion-separator-self-insert-command)
|
||||
("{" . completion-separator-self-insert-command)
|
||||
("}" . completion-separator-self-insert-command)
|
||||
("[" . completion-separator-self-insert-command)
|
||||
("]" . completion-separator-self-insert-command)
|
||||
(";" . completion-separator-self-insert-command)
|
||||
("\"". completion-separator-self-insert-command)
|
||||
("'" . completion-separator-self-insert-command)
|
||||
("#" . completion-separator-self-insert-command)
|
||||
("," . completion-separator-self-insert-command)
|
||||
("?" . completion-separator-self-insert-command)
|
||||
|
||||
;; We include period and colon even though they are symbol
|
||||
;; chars because :
|
||||
;; - in text we want to pick up the last word in a sentence.
|
||||
;; - in C pointer refs. we want to pick up the first symbol
|
||||
;; - it won't make a difference for lisp mode (package names
|
||||
;; are short)
|
||||
("." . completion-separator-self-insert-command)
|
||||
(":" . completion-separator-self-insert-command)))
|
||||
([remap kill-region] . completion-kill-region)))
|
||||
(push (cons (car binding) (lookup-key global-map (car binding)))
|
||||
completion-saved-bindings)
|
||||
(global-set-key (car binding) (cdr binding)))
|
||||
|
|
|
@ -296,6 +296,11 @@ line of the form #!<interp>."
|
|||
(let ((fullname (if (file-name-directory file) file
|
||||
(eshell-search-path file)))
|
||||
(suffixes eshell-binary-suffixes))
|
||||
(if (and fullname
|
||||
(not (file-remote-p fullname))
|
||||
(file-remote-p default-directory))
|
||||
(setq fullname (expand-file-name
|
||||
(concat "./" fullname) default-directory)))
|
||||
(if (and fullname (not (or eshell-force-execution
|
||||
(file-executable-p fullname))))
|
||||
(while suffixes
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
;; Author: Artur Malabarba <bruce.connor.am@gmail.com>
|
||||
;; Maintainer: Artur Malabarba <bruce.connor.am@gmail.com>
|
||||
;; Version: 1.0.1
|
||||
;; Version: 1.0.3
|
||||
;; Keywords: extensions lisp
|
||||
;; Prefix: let-alist
|
||||
;; Separator: -
|
||||
|
@ -39,21 +39,25 @@
|
|||
;; (let-alist alist
|
||||
;; (if (and .title .body)
|
||||
;; .body
|
||||
;; .site))
|
||||
;; .site
|
||||
;; .site.contents))
|
||||
;;
|
||||
;; expands to
|
||||
;; essentially expands to
|
||||
;;
|
||||
;; (let ((.title (cdr (assq 'title alist)))
|
||||
;; (.body (cdr (assq 'body alist)))
|
||||
;; (.site (cdr (assq 'site alist))))
|
||||
;; (.body (cdr (assq 'body alist)))
|
||||
;; (.site (cdr (assq 'site alist)))
|
||||
;; (.site.contents (cdr (assq 'contents (cdr (assq 'site alist))))))
|
||||
;; (if (and .title .body)
|
||||
;; .body
|
||||
;; .site))
|
||||
;; .site
|
||||
;; .site.contents))
|
||||
;;
|
||||
;; If you nest `let-alist' invocations, the inner one can't access
|
||||
;; the variables of the outer one. You can, however, access alists
|
||||
;; inside the original alist by using dots inside the symbol, as
|
||||
;; displayed in the example above by the `.site.contents'.
|
||||
;;
|
||||
;; Note that only one level is supported. If you nest `let-alist'
|
||||
;; invocations, the inner one can't access the variables of the outer
|
||||
;; one.
|
||||
|
||||
;;; Code:
|
||||
|
||||
|
||||
|
@ -72,6 +76,31 @@ symbol, and each cdr is the same symbol without the `.'."
|
|||
(t (apply #'append
|
||||
(mapcar #'let-alist--deep-dot-search data)))))
|
||||
|
||||
(defun let-alist--access-sexp (symbol variable)
|
||||
"Return a sexp used to acess SYMBOL inside VARIABLE."
|
||||
(let* ((clean (let-alist--remove-dot symbol))
|
||||
(name (symbol-name clean)))
|
||||
(if (string-match "\\`\\." name)
|
||||
clean
|
||||
(let-alist--list-to-sexp
|
||||
(mapcar #'intern (nreverse (split-string name "\\.")))
|
||||
variable))))
|
||||
|
||||
(defun let-alist--list-to-sexp (list var)
|
||||
"Turn symbols LIST into recursive calls to `cdr' `assq' on VAR."
|
||||
`(cdr (assq ',(car list)
|
||||
,(if (cdr list) (let-alist--list-to-sexp (cdr list) var)
|
||||
var))))
|
||||
|
||||
(defun let-alist--remove-dot (symbol)
|
||||
"Return SYMBOL, sans an initial dot."
|
||||
(let ((name (symbol-name symbol)))
|
||||
(if (string-match "\\`\\." name)
|
||||
(intern (replace-match "" nil nil name))
|
||||
symbol)))
|
||||
|
||||
|
||||
;;; The actual macro.
|
||||
;;;###autoload
|
||||
(defmacro let-alist (alist &rest body)
|
||||
"Let-bind dotted symbols to their cdrs in ALIST and execute BODY.
|
||||
|
@ -83,20 +112,28 @@ For instance, the following code
|
|||
(let-alist alist
|
||||
(if (and .title .body)
|
||||
.body
|
||||
.site))
|
||||
.site
|
||||
.site.contents))
|
||||
|
||||
expands to
|
||||
essentially expands to
|
||||
|
||||
(let ((.title (cdr (assq 'title alist)))
|
||||
(.body (cdr (assq 'body alist)))
|
||||
(.site (cdr (assq 'site alist))))
|
||||
(.body (cdr (assq 'body alist)))
|
||||
(.site (cdr (assq 'site alist)))
|
||||
(.site.contents (cdr (assq 'contents (cdr (assq 'site alist))))))
|
||||
(if (and .title .body)
|
||||
.body
|
||||
.site))"
|
||||
.site
|
||||
.site.contents))
|
||||
|
||||
If you nest `let-alist' invocations, the inner one can't access
|
||||
the variables of the outer one. You can, however, access alists
|
||||
inside the original alist by using dots inside the symbol, as
|
||||
displayed in the example above."
|
||||
(declare (indent 1) (debug t))
|
||||
(let ((var (gensym "let-alist")))
|
||||
(let ((var (make-symbol "alist")))
|
||||
`(let ((,var ,alist))
|
||||
(let ,(mapcar (lambda (x) `(,(car x) (cdr (assq ',(cdr x) ,var))))
|
||||
(let ,(mapcar (lambda (x) `(,(car x) ,(let-alist--access-sexp (car x) var)))
|
||||
(delete-dups (let-alist--deep-dot-search body)))
|
||||
,@body))))
|
||||
|
||||
|
|
|
@ -340,7 +340,6 @@ unencrypted."
|
|||
;; of the certificate/unencrypted connection.
|
||||
(cond
|
||||
((eq what 'conditions)
|
||||
(nconc saved (list :host (format "%s:%s" host port)))
|
||||
(cond
|
||||
((not status)
|
||||
(nconc saved '(:conditions (:unencrypted))))
|
||||
|
|
|
@ -66,9 +66,16 @@ files conditionalize this setup based on the TERM environment variable."
|
|||
|
||||
;;;###tramp-autoload
|
||||
(defcustom tramp-histfile-override "/dev/null"
|
||||
"Whether the HISTFILE should be overridden to something. Set
|
||||
to nil to disable the override."
|
||||
"When invoking a shell, override the HISTFILE with this value.
|
||||
By default, the HISTFILE is set to the \"/dev/null\" value, which
|
||||
is special on Unix systems and indicates the shell history should
|
||||
not be logged (this avoids clutter due to Tramp commands).
|
||||
|
||||
If you set this variable to nil, however, the *override* is
|
||||
disabled, so the history will go to the default storage
|
||||
location, e.g. \"$HOME/.sh_history\"."
|
||||
:group 'tramp
|
||||
:version "25.1"
|
||||
:type '(choice (const :tag "Do not override HISTFILE" nil)
|
||||
(const :tag "Empty the history (/dev/null)" "/dev/null")
|
||||
(string :tag "Redirect to a file")))
|
||||
|
|
|
@ -6588,6 +6588,36 @@ comment at the start of cc-engine.el for more info."
|
|||
(prog1 (car ,ps)
|
||||
(setq ,ps (cdr ,ps)))))
|
||||
|
||||
(defun c-back-over-member-initializer-braces ()
|
||||
;; Point is just after a closing brace/parenthesis. Try to parse this as a
|
||||
;; C++ member initializer list, going back to just after the introducing ":"
|
||||
;; and returning t. Otherwise return nil, leaving point unchanged.
|
||||
(let ((here (point)) res)
|
||||
(setq res
|
||||
(catch 'done
|
||||
(when (not (c-go-list-backward))
|
||||
(throw 'done nil))
|
||||
(c-backward-syntactic-ws)
|
||||
(when (not (c-simple-skip-symbol-backward))
|
||||
(throw 'done nil))
|
||||
(c-backward-syntactic-ws)
|
||||
|
||||
(while (eq (char-before) ?,)
|
||||
(backward-char)
|
||||
(c-backward-syntactic-ws)
|
||||
(when (not (memq (char-before) '(?\) ?})))
|
||||
(throw 'done nil))
|
||||
(when (not (c-go-list-backward))
|
||||
(throw 'done nil))
|
||||
(c-backward-syntactic-ws)
|
||||
(when (not (c-simple-skip-symbol-backward))
|
||||
(throw 'done nil))
|
||||
(c-backward-syntactic-ws))
|
||||
|
||||
(eq (char-before) ?:)))
|
||||
(or res (goto-char here))
|
||||
res))
|
||||
|
||||
(defun c-back-over-member-initializers ()
|
||||
;; Test whether we are in a C++ member initializer list, and if so, go back
|
||||
;; to the introducing ":", returning the position of the opening paren of
|
||||
|
@ -9588,22 +9618,26 @@ comment at the start of cc-engine.el for more info."
|
|||
(c-keyword-sym (match-string 1)))))
|
||||
|
||||
;; Init some position variables.
|
||||
(if c-state-cache
|
||||
(if paren-state
|
||||
(progn
|
||||
(setq containing-sexp (car paren-state)
|
||||
paren-state (cdr paren-state))
|
||||
(if (consp containing-sexp)
|
||||
(progn
|
||||
(setq lim (cdr containing-sexp))
|
||||
(if (cdr c-state-cache)
|
||||
;; Ignore balanced paren. The next entry
|
||||
;; can't be another one.
|
||||
(setq containing-sexp (car (cdr c-state-cache))
|
||||
paren-state (cdr paren-state))
|
||||
;; If there is no surrounding open paren then
|
||||
;; put the last balanced pair back on paren-state.
|
||||
(setq paren-state (cons containing-sexp paren-state)
|
||||
containing-sexp nil)))
|
||||
(save-excursion
|
||||
(goto-char (cdr containing-sexp))
|
||||
(if (and (c-major-mode-is 'c++-mode)
|
||||
(c-back-over-member-initializer-braces))
|
||||
(c-syntactic-skip-backward "^}" nil t))
|
||||
(setq lim (point))
|
||||
(if paren-state
|
||||
;; Ignore balanced paren. The next entry
|
||||
;; can't be another one.
|
||||
(setq containing-sexp (car paren-state)
|
||||
paren-state (cdr paren-state))
|
||||
;; If there is no surrounding open paren then
|
||||
;; put the last balanced pair back on paren-state.
|
||||
(setq paren-state (cons containing-sexp paren-state)
|
||||
containing-sexp nil)))
|
||||
(setq lim (1+ containing-sexp))))
|
||||
(setq lim (point-min)))
|
||||
|
||||
|
|
|
@ -1464,36 +1464,38 @@ casts and declarations are fontified. Used on level 2 and higher."
|
|||
c-recognize-knr-p) ; Strictly speaking, bogus, but it
|
||||
; speeds up lisp.h tremendously.
|
||||
(save-excursion
|
||||
(unless (or (eobp)
|
||||
(looking-at "\\s(\\|\\s)"))
|
||||
(forward-char))
|
||||
(setq bod-res (car (c-beginning-of-decl-1 decl-search-lim)))
|
||||
(if (and (eq bod-res 'same)
|
||||
(save-excursion
|
||||
(c-backward-syntactic-ws)
|
||||
(eq (char-before) ?\})))
|
||||
(c-beginning-of-decl-1 decl-search-lim))
|
||||
(if (c-back-over-member-initializers)
|
||||
t ; Can't be at a declarator
|
||||
(unless (or (eobp)
|
||||
(looking-at "\\s(\\|\\s)"))
|
||||
(forward-char))
|
||||
(setq bod-res (car (c-beginning-of-decl-1 decl-search-lim)))
|
||||
(if (and (eq bod-res 'same)
|
||||
(save-excursion
|
||||
(c-backward-syntactic-ws)
|
||||
(eq (char-before) ?\})))
|
||||
(c-beginning-of-decl-1 decl-search-lim))
|
||||
|
||||
;; We're now putatively at the declaration.
|
||||
(setq paren-state (c-parse-state))
|
||||
;; At top level or inside a "{"?
|
||||
(if (or (not (setq encl-pos
|
||||
(c-most-enclosing-brace paren-state)))
|
||||
(eq (char-after encl-pos) ?\{))
|
||||
(progn
|
||||
(when (looking-at c-typedef-key) ; "typedef"
|
||||
(setq is-typedef t)
|
||||
(goto-char (match-end 0))
|
||||
(c-forward-syntactic-ws))
|
||||
;; At a real declaration?
|
||||
(if (memq (c-forward-type t) '(t known found decltype))
|
||||
(progn
|
||||
(c-font-lock-declarators (point-max) t is-typedef)
|
||||
nil)
|
||||
;; False alarm. Return t to go on to the next check.
|
||||
(goto-char start-pos)
|
||||
t))
|
||||
t))))))
|
||||
;; We're now putatively at the declaration.
|
||||
(setq paren-state (c-parse-state))
|
||||
;; At top level or inside a "{"?
|
||||
(if (or (not (setq encl-pos
|
||||
(c-most-enclosing-brace paren-state)))
|
||||
(eq (char-after encl-pos) ?\{))
|
||||
(progn
|
||||
(when (looking-at c-typedef-key) ; "typedef"
|
||||
(setq is-typedef t)
|
||||
(goto-char (match-end 0))
|
||||
(c-forward-syntactic-ws))
|
||||
;; At a real declaration?
|
||||
(if (memq (c-forward-type t) '(t known found decltype))
|
||||
(progn
|
||||
(c-font-lock-declarators (point-max) t is-typedef)
|
||||
nil)
|
||||
;; False alarm. Return t to go on to the next check.
|
||||
(goto-char start-pos)
|
||||
t))
|
||||
t)))))))
|
||||
|
||||
;; It was a false alarm. Check if we're in a label (or other
|
||||
;; construct with `:' except bitfield) instead.
|
||||
|
|
|
@ -1741,7 +1741,7 @@ but they don't build a type of themselves. Unlike the keywords on
|
|||
not the type face."
|
||||
t nil
|
||||
c '("const" "restrict" "volatile")
|
||||
c++ '("const" "constexpr" "noexcept" "volatile" "throw")
|
||||
c++ '("const" "constexpr" "noexcept" "volatile" "throw" "final" "override")
|
||||
objc '("const" "volatile"))
|
||||
|
||||
(c-lang-defconst c-opt-type-modifier-key
|
||||
|
|
|
@ -1637,12 +1637,29 @@ This performs fontification according to `js--class-styles'."
|
|||
js--font-lock-keywords-3)
|
||||
"Font lock keywords for `js-mode'. See `font-lock-keywords'.")
|
||||
|
||||
(defconst js--syntax-propertize-regexp-syntax-table
|
||||
(let ((st (make-char-table 'syntax-table (string-to-syntax "."))))
|
||||
(modify-syntax-entry ?\[ "(]" st)
|
||||
(modify-syntax-entry ?\] ")[" st)
|
||||
(modify-syntax-entry ?\\ "\\" st)
|
||||
st))
|
||||
|
||||
(defun js-syntax-propertize-regexp (end)
|
||||
(when (eq (nth 3 (syntax-ppss)) ?/)
|
||||
;; A /.../ regexp.
|
||||
(when (re-search-forward "\\(?:\\=\\|[^\\]\\)\\(?:\\\\\\\\\\)*/" end 'move)
|
||||
(put-text-property (1- (point)) (point)
|
||||
'syntax-table (string-to-syntax "\"/")))))
|
||||
(let ((ppss (syntax-ppss)))
|
||||
(when (eq (nth 3 ppss) ?/)
|
||||
;; A /.../ regexp.
|
||||
(while
|
||||
(when (re-search-forward "\\(?:\\=\\|[^\\]\\)\\(?:\\\\\\\\\\)*/"
|
||||
end 'move)
|
||||
(if (nth 1 (with-syntax-table
|
||||
js--syntax-propertize-regexp-syntax-table
|
||||
(let ((parse-sexp-lookup-properties nil))
|
||||
(parse-partial-sexp (nth 8 ppss) (point)))))
|
||||
;; A / within a character class is not the end of a regexp.
|
||||
t
|
||||
(put-text-property (1- (point)) (point)
|
||||
'syntax-table (string-to-syntax "\"/"))
|
||||
nil))))))
|
||||
|
||||
(defun js-syntax-propertize (start end)
|
||||
;; Javascript allows immediate regular expression objects, written /.../.
|
||||
|
|
|
@ -1768,17 +1768,12 @@ If the result is do-end block, it will always be multiline."
|
|||
|
||||
(defun ruby--string-region ()
|
||||
"Return region for string at point."
|
||||
(let ((orig-point (point)) (regex "'\\(\\(\\\\'\\)\\|[^']\\)*'\\|\"\\(\\(\\\\\"\\)\\|[^\"]\\)*\"") beg end)
|
||||
(save-excursion
|
||||
(goto-char (line-beginning-position))
|
||||
(while (and (re-search-forward regex (line-end-position) t) (not (and beg end)))
|
||||
(let ((match-beg (match-beginning 0)) (match-end (match-end 0)))
|
||||
(when (and
|
||||
(> orig-point match-beg)
|
||||
(< orig-point match-end))
|
||||
(setq beg match-beg)
|
||||
(setq end match-end))))
|
||||
(and beg end (list beg end)))))
|
||||
(let ((state (syntax-ppss)))
|
||||
(when (memq (nth 3 state) '(?' ?\"))
|
||||
(save-excursion
|
||||
(goto-char (nth 8 state))
|
||||
(forward-sexp)
|
||||
(list (nth 8 state) (point))))))
|
||||
|
||||
(defun ruby-string-at-point-p ()
|
||||
"Check if cursor is at a string or not."
|
||||
|
|
|
@ -308,6 +308,13 @@ for Shell mode only."
|
|||
(const :tag "on" t))
|
||||
:group 'shell)
|
||||
|
||||
(defcustom shell-display-buffer-actions display-buffer-base-action
|
||||
"The `display-buffer' actions for the `*shell*' buffer."
|
||||
:type display-buffer--action-custom-type
|
||||
:risky t
|
||||
:version "25.1"
|
||||
:group 'shell)
|
||||
|
||||
(defvar shell-dirstack nil
|
||||
"List of directories saved by pushd in this buffer's shell.
|
||||
Thus, this does not include the shell's current directory.")
|
||||
|
@ -718,7 +725,7 @@ Otherwise, one argument `-i' is passed to the shell.
|
|||
|
||||
;; The buffer's window must be correctly set when we call comint (so
|
||||
;; that comint sets the COLUMNS env var properly).
|
||||
(pop-to-buffer-same-window buffer)
|
||||
(pop-to-buffer buffer shell-display-buffer-actions)
|
||||
(unless (comint-check-proc buffer)
|
||||
(let* ((prog (or explicit-shell-file-name
|
||||
(getenv "ESHELL") shell-file-name))
|
||||
|
|
|
@ -2265,8 +2265,9 @@ Global `ispell-quit' set to start location to continue spell session."
|
|||
(sit-for 0))
|
||||
|
||||
;; Display choices for misspelled word.
|
||||
(setq textwin (selected-window))
|
||||
(ispell-show-choices)
|
||||
(select-window (setq textwin (next-window)))
|
||||
(select-window textwin)
|
||||
|
||||
;; highlight word, protecting current buffer status
|
||||
(unwind-protect
|
||||
|
@ -2408,8 +2409,9 @@ Global `ispell-quit' set to start location to continue spell session."
|
|||
count (ispell-int-char (1+ count))))
|
||||
(setq count (ispell-int-char
|
||||
(- count ?0 skipped))))
|
||||
(setq textwin (selected-window))
|
||||
(ispell-show-choices)
|
||||
(select-window (next-window)))))
|
||||
(select-window textwin))))
|
||||
(and (eq 'block ispell-highlight-p)
|
||||
(ispell-highlight-spelling-error start end nil
|
||||
'block))
|
||||
|
|
|
@ -32,8 +32,12 @@ AC_DEFUN([gl_STDALIGN_H],
|
|||
/* Test _Alignas only on platforms where gnulib can help. */
|
||||
#if \
|
||||
((defined __cplusplus && 201103 <= __cplusplus) \
|
||||
|| __GNUC__ || __IBMC__ || __IBMCPP__ || __ICC \
|
||||
|| 0x5110 <= __SUNPRO_C || 1300 <= _MSC_VER)
|
||||
|| (defined __APPLE__ && defined __MACH__ \
|
||||
? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
|
||||
: __GNUC__) \
|
||||
|| __HP_cc || __HP_aCC || __IBMC__ || __IBMCPP__ \
|
||||
|| __ICC || 0x5110 <= __SUNPRO_C \
|
||||
|| 1300 <= _MSC_VER)
|
||||
struct alignas_test { char c; char alignas (8) alignas_8; };
|
||||
char test_alignas[offsetof (struct alignas_test, alignas_8) == 8
|
||||
? 1 : -1];
|
||||
|
|
|
@ -1,3 +1,80 @@
|
|||
2014-12-23 Didier Verna <didier@didierverna.net> (tiny change).
|
||||
|
||||
* nsselect.m (Fns_selection_owner_p): Return a Lisp boolean, not a
|
||||
C one (Bug#19396).
|
||||
|
||||
2014-12-22 Jan Djärv <jan.h.d@swipnet.se>
|
||||
|
||||
* xterm.c (x_bitmap_icon): Partly revert change from 2014-03-21 which
|
||||
breaks icon setting for Gtk+ except for initial frame (Bug#19403).
|
||||
|
||||
2014-12-22 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
Use bool for boolean in xterm.c
|
||||
* frame.h, nsterm.m, w32term.c, w32term.h, xterm.c:
|
||||
(x_set_window_size, x_bitmap_icon):
|
||||
* nsterm.m (ns_frame_raise_lower, x_new_font):
|
||||
* termhooks.h (struct terminal.toggle_invisible_pointer_hook)
|
||||
(struct terminal.frame_raise_lower_hook):
|
||||
* w32term.c (w32_frame_raise_lower):
|
||||
* xterm.c, xterm.h (x_text_icon):
|
||||
* xterm.c (x_update_window_begin, x_update_window_end)
|
||||
(x_update_end, x_after_update_window_line)
|
||||
(x_set_glyph_string_gc, x_draw_glyph_string_background)
|
||||
(x_draw_glyph_string_foreground)
|
||||
(x_draw_composite_glyph_string_foreground)
|
||||
(x_alloc_lighter_color, x_draw_relief_rect)
|
||||
(x_draw_glyph_string_box, x_draw_image_relief)
|
||||
(x_draw_image_glyph_string, x_draw_stretch_glyph_string)
|
||||
(x_draw_underwave, x_draw_glyph_string, x_show_hourglass)
|
||||
(x_hide_hourglass):
|
||||
(XFillRectangle) [HAVE_GTK3]:
|
||||
(XTtoggle_invisible_pointer, frame_highlight, frame_unhighlight)
|
||||
(x_focus_changed, x_find_modifier_meanings, note_mouse_movement)
|
||||
(XTmouse_position, xt_action_hook, xt_horizontal_action_hook)
|
||||
(x_send_scroll_bar_event, xm_scroll_callback)
|
||||
(xg_scroll_callback, xaw_jump_callback, xaw_scroll_callback)
|
||||
(x_create_toolkit_scroll_bar)
|
||||
(x_create_horizontal_toolkit_scroll_bar)
|
||||
(x_set_toolkit_horizontal_scroll_bar_thumb, x_scroll_bar_create)
|
||||
(x_scroll_bar_set_handle, XTset_vertical_scroll_bar)
|
||||
(XTset_horizontal_scroll_bar, x_scroll_bar_expose)
|
||||
(x_scroll_bar_handle_click, x_scroll_bar_note_movement)
|
||||
(x_scroll_bar_report_motion)
|
||||
(x_horizontal_scroll_bar_report_motion, x_net_wm_state)
|
||||
(handle_one_xevent, XTread_socket, x_draw_bar_cursor)
|
||||
(x_draw_window_cursor, x_clear_errors)
|
||||
(x_trace_wire, x_new_font, x_set_offset, wm_supports)
|
||||
(set_wm_state, x_set_sticky, get_current_wm_state)
|
||||
(do_ewmh_fullscreen, x_handle_net_wm_state)
|
||||
(x_check_expected_move, x_sync_with_move, x_wait_for_event)
|
||||
(x_set_window_size_1, XTframe_raise_lower)
|
||||
(x_make_frame_visible, x_iconify_frame)
|
||||
(x_timeout_atimer_activated_flag, same_x_server, x_display_ok)
|
||||
(x_term_init, x_process_timeouts, x_activate_timeout_atimer)
|
||||
(x_delete_terminal, x_initialize, syms_of_xterm):
|
||||
Use bool for boolean.
|
||||
|
||||
2014-12-20 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
* composite.h (struct composition.width): Now int
|
||||
instead of unsigned short, as we prefer signed integers.
|
||||
|
||||
Let charset tick grow past USHRT_MAX
|
||||
* charset.c, charset.h (charset_ordered_list_tick):
|
||||
Now EMACS_UINT, not unsigned short.
|
||||
* fontset.c (reorder_font_vector): Allow the tick to grow to the
|
||||
maximum representable Emacs integer value before wrapping it around.
|
||||
|
||||
Simplify unexec file mode setting
|
||||
* unexaix.c, unexcoff.c, unexelf.c, unexmacosx.c:
|
||||
Don't include <sys/stat.h> when no longer needed.
|
||||
(unexec): Create file with correct mode in the first place,
|
||||
rather than overwriting the mode later and fiddling with the
|
||||
global umask in the mean time. Avoid bogus usage like
|
||||
'umask (777)', which should have been 'umask (0777)'.
|
||||
(mark_x): Remove. All callers removed.
|
||||
|
||||
2014-12-19 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
Minor cleanups for Lisp objects and symbols
|
||||
|
@ -14,6 +91,7 @@
|
|||
* nsmenu.m (syms_of_nsmenu):
|
||||
* nsselect.m (syms_of_nsselect):
|
||||
Prefer DEFSYM to defining by hand.
|
||||
* buffer.c (syms_of_buffer): Omit unneeded staticpros.
|
||||
* data.c: Fix too-long line.
|
||||
* lisp.h (DECLARE_GDB_SYM): New macro.
|
||||
(DEFINE_GDB_SYMBOL_BEGIN): Use it.
|
||||
|
|
|
@ -5395,13 +5395,8 @@ syms_of_buffer (void)
|
|||
last_overlay_modification_hooks
|
||||
= Fmake_vector (make_number (10), Qnil);
|
||||
|
||||
staticpro (&Qfundamental_mode);
|
||||
staticpro (&Qmode_class);
|
||||
staticpro (&QSFundamental);
|
||||
staticpro (&Vbuffer_alist);
|
||||
staticpro (&Qprotected_field);
|
||||
staticpro (&Qpermanent_local);
|
||||
staticpro (&Qkill_buffer_hook);
|
||||
|
||||
DEFSYM (Qchoice, "choice");
|
||||
DEFSYM (Qleft, "left");
|
||||
|
|
|
@ -101,10 +101,9 @@ Lisp_Object Vcharset_ordered_list;
|
|||
charsets. */
|
||||
Lisp_Object Vcharset_non_preferred_head;
|
||||
|
||||
/* Incremented everytime we change Vcharset_ordered_list. This is
|
||||
unsigned short so that it fits in Lisp_Int and never matches
|
||||
-1. */
|
||||
unsigned short charset_ordered_list_tick;
|
||||
/* Incremented every time we change the priority of charsets.
|
||||
Wraps around. */
|
||||
EMACS_UINT charset_ordered_list_tick;
|
||||
|
||||
/* List of iso-2022 charsets. */
|
||||
Lisp_Object Viso_2022_charset_list;
|
||||
|
|
|
@ -253,8 +253,7 @@ extern struct charset *charset_table;
|
|||
extern Lisp_Object Vcharset_ordered_list;
|
||||
extern Lisp_Object Vcharset_non_preferred_head;
|
||||
|
||||
/* Incremented everytime we change the priority of charsets. */
|
||||
extern unsigned short charset_ordered_list_tick;
|
||||
extern EMACS_UINT charset_ordered_list_tick;
|
||||
|
||||
extern Lisp_Object Viso_2022_charset_list;
|
||||
extern Lisp_Object Vemacs_mule_charset_list;
|
||||
|
|
|
@ -156,7 +156,7 @@ struct composition {
|
|||
/* How many columns the overall glyphs occupy on the screen. This
|
||||
gives an approximate value for column calculation in
|
||||
Fcurrent_column, and etc. */
|
||||
unsigned short width;
|
||||
int width;
|
||||
|
||||
/* Method of the composition. */
|
||||
enum composition_method method;
|
||||
|
|
|
@ -309,8 +309,8 @@ extern void _DebPrint (const char *fmt, ...);
|
|||
Other .c files should not define INLINE.
|
||||
|
||||
C99 compilers compile functions like 'incr' as C99-style extern
|
||||
inline functions. Pre-C99 GCCs do something similar with
|
||||
GNU-specific keywords. Pre-C99 non-GCC compilers use static
|
||||
inline functions. Buggy GCC implementations do something similar with
|
||||
GNU-specific keywords. Buggy non-GCC compilers use static
|
||||
functions, which bloats the code but is good enough. */
|
||||
|
||||
#ifndef INLINE
|
||||
|
|
|
@ -389,7 +389,7 @@ reorder_font_vector (Lisp_Object font_group, struct font *font)
|
|||
Lisp_Object vec, font_object;
|
||||
int size;
|
||||
int i;
|
||||
bool score_changed = 0;
|
||||
bool score_changed = false;
|
||||
|
||||
if (font)
|
||||
XSETFONT (font_object, font);
|
||||
|
@ -444,14 +444,15 @@ reorder_font_vector (Lisp_Object font_group, struct font *font)
|
|||
if (RFONT_DEF_SCORE (rfont_def) != score)
|
||||
{
|
||||
RFONT_DEF_SET_SCORE (rfont_def, score);
|
||||
score_changed = 1;
|
||||
score_changed = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (score_changed)
|
||||
qsort (XVECTOR (vec)->contents, size, word_size,
|
||||
fontset_compare_rfontdef);
|
||||
XSETCAR (font_group, make_number (charset_ordered_list_tick));
|
||||
EMACS_INT low_tick_bits = charset_ordered_list_tick & MOST_POSITIVE_FIXNUM;
|
||||
XSETCAR (font_group, make_number (low_tick_bits));
|
||||
}
|
||||
|
||||
/* Return a font-group (actually a cons (-1 . FONT-GROUP-VECTOR)) for
|
||||
|
|
|
@ -1435,7 +1435,7 @@ extern Lisp_Object display_x_get_resource (Display_Info *,
|
|||
Lisp_Object subclass);
|
||||
|
||||
extern void set_frame_menubar (struct frame *f, bool first_time, bool deep_p);
|
||||
extern void x_set_window_size (struct frame *f, int change_grav,
|
||||
extern void x_set_window_size (struct frame *f, bool change_gravity,
|
||||
int width, int height, bool pixelwise);
|
||||
extern Lisp_Object x_get_focus_frame (struct frame *);
|
||||
extern void frame_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y);
|
||||
|
@ -1462,7 +1462,7 @@ extern void x_focus_frame (struct frame *);
|
|||
|
||||
#ifndef HAVE_NS
|
||||
|
||||
extern int x_bitmap_icon (struct frame *, Lisp_Object);
|
||||
extern bool x_bitmap_icon (struct frame *, Lisp_Object);
|
||||
|
||||
/* Set F's bitmap icon, if specified among F's parameters. */
|
||||
|
||||
|
|
|
@ -438,7 +438,8 @@ Updated by Christian Limpach (chris@nice.ch)
|
|||
if (EQ (selection, Qnil)) selection = QPRIMARY;
|
||||
if (EQ (selection, Qt)) selection = QSECONDARY;
|
||||
return ns_get_pb_change_count (selection)
|
||||
== ns_get_our_change_count_for (selection);
|
||||
== ns_get_our_change_count_for (selection)
|
||||
? Qt : Qnil;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1082,7 +1082,7 @@ Free a pool and temporary objects it refers to (callable from C)
|
|||
|
||||
|
||||
static void
|
||||
ns_frame_raise_lower (struct frame *f, int raise)
|
||||
ns_frame_raise_lower (struct frame *f, bool raise)
|
||||
/* --------------------------------------------------------------------------
|
||||
External (hook)
|
||||
-------------------------------------------------------------------------- */
|
||||
|
@ -1322,7 +1322,7 @@ Free a pool and temporary objects it refers to (callable from C)
|
|||
|
||||
void
|
||||
x_set_window_size (struct frame *f,
|
||||
int change_grav,
|
||||
bool change_gravity,
|
||||
int width,
|
||||
int height,
|
||||
bool pixelwise)
|
||||
|
@ -7622,8 +7622,8 @@ @implementation EmacsDocument
|
|||
|
||||
/* Now make the frame display the given font. */
|
||||
if (FRAME_NS_WINDOW (f) != 0 && ! [view isFullscreen])
|
||||
x_set_window_size (f, 0, FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f),
|
||||
FRAME_LINES (f) * FRAME_LINE_HEIGHT (f), 1);
|
||||
x_set_window_size (f, false, FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f),
|
||||
FRAME_LINES (f) * FRAME_LINE_HEIGHT (f), true);
|
||||
|
||||
return font_object;
|
||||
}
|
||||
|
|
|
@ -451,7 +451,7 @@ struct terminal
|
|||
void (*delete_glyphs_hook) (struct frame *, int);
|
||||
|
||||
void (*ring_bell_hook) (struct frame *f);
|
||||
void (*toggle_invisible_pointer_hook) (struct frame *f, int invisible);
|
||||
void (*toggle_invisible_pointer_hook) (struct frame *f, bool invisible);
|
||||
|
||||
void (*reset_terminal_modes_hook) (struct terminal *);
|
||||
void (*set_terminal_modes_hook) (struct terminal *);
|
||||
|
@ -496,10 +496,10 @@ struct terminal
|
|||
support overlapping frames, so there's no need to raise or lower
|
||||
anything.
|
||||
|
||||
If RAISE_FLAG is non-zero, F is brought to the front, before all other
|
||||
windows. If RAISE_FLAG is zero, F is sent to the back, behind all other
|
||||
If RAISE_FLAG, F is brought to the front, before all other
|
||||
windows. If !RAISE_FLAG, F is sent to the back, behind all other
|
||||
windows. */
|
||||
void (*frame_raise_lower_hook) (struct frame *f, int raise_flag);
|
||||
void (*frame_raise_lower_hook) (struct frame *f, bool raise_flag);
|
||||
|
||||
/* If the value of the frame parameter changed, this hook is called.
|
||||
For example, if going from fullscreen to not fullscreen this hook
|
||||
|
|
|
@ -55,7 +55,6 @@ what you give them. Help stamp out software-hoarding! */
|
|||
#include <inttypes.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/stat.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
|
@ -134,7 +133,7 @@ unexec (const char *new_name, const char *a_name)
|
|||
{
|
||||
PERROR (a_name);
|
||||
}
|
||||
if ((new = emacs_open (new_name, O_WRONLY | O_CREAT | O_TRUNC, 0666)) < 0)
|
||||
if ((new = emacs_open (new_name, O_WRONLY | O_CREAT | O_TRUNC, 0777)) < 0)
|
||||
{
|
||||
PERROR (new_name);
|
||||
}
|
||||
|
@ -152,7 +151,6 @@ unexec (const char *new_name, const char *a_name)
|
|||
emacs_close (new);
|
||||
if (a_out >= 0)
|
||||
emacs_close (a_out);
|
||||
mark_x (new_name);
|
||||
}
|
||||
|
||||
/* ****************************************************************
|
||||
|
@ -466,29 +464,6 @@ copy_sym (int new, int a_out, const char *a_name, const char *new_name)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* ****************************************************************
|
||||
* mark_x
|
||||
*
|
||||
* After successfully building the new a.out, mark it executable
|
||||
*/
|
||||
static void
|
||||
mark_x (const char *name)
|
||||
{
|
||||
struct stat sbuf;
|
||||
int um;
|
||||
int new = 0; /* for PERROR */
|
||||
|
||||
um = umask (777);
|
||||
umask (um);
|
||||
if (stat (name, &sbuf) == -1)
|
||||
{
|
||||
PERROR (name);
|
||||
}
|
||||
sbuf.st_mode |= 0111 & ~um;
|
||||
if (chmod (name, sbuf.st_mode) == -1)
|
||||
PERROR (name);
|
||||
}
|
||||
|
||||
static int
|
||||
adjust_lnnoptrs (int writedesc, int readdesc, const char *new_name)
|
||||
{
|
||||
|
|
|
@ -97,7 +97,6 @@ struct aouthdr
|
|||
#include <sys/types.h>
|
||||
#endif /* makedev */
|
||||
#include <stdio.h>
|
||||
#include <sys/stat.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <sys/file.h>
|
||||
|
@ -439,29 +438,6 @@ copy_sym (int new, int a_out, const char *a_name, const char *new_name)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* ****************************************************************
|
||||
* mark_x
|
||||
*
|
||||
* After successfully building the new a.out, mark it executable
|
||||
*/
|
||||
static void
|
||||
mark_x (const char *name)
|
||||
{
|
||||
struct stat sbuf;
|
||||
int um;
|
||||
int new = 0; /* for PERROR */
|
||||
|
||||
um = umask (777);
|
||||
umask (um);
|
||||
if (stat (name, &sbuf) == -1)
|
||||
{
|
||||
PERROR (name);
|
||||
}
|
||||
sbuf.st_mode |= 0111 & ~um;
|
||||
if (chmod (name, sbuf.st_mode) == -1)
|
||||
PERROR (name);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* If the COFF file contains a symbol table and a line number section,
|
||||
|
@ -542,7 +518,7 @@ unexec (const char *new_name, const char *a_name)
|
|||
{
|
||||
PERROR (a_name);
|
||||
}
|
||||
if ((new = emacs_open (new_name, O_WRONLY | O_CREAT | O_TRUNC, 0666)) < 0)
|
||||
if ((new = emacs_open (new_name, O_WRONLY | O_CREAT | O_TRUNC, 0777)) < 0)
|
||||
{
|
||||
PERROR (new_name);
|
||||
}
|
||||
|
@ -560,7 +536,6 @@ unexec (const char *new_name, const char *a_name)
|
|||
emacs_close (new);
|
||||
if (a_out >= 0)
|
||||
emacs_close (a_out);
|
||||
mark_x (new_name);
|
||||
}
|
||||
|
||||
#endif /* not CANNOT_DUMP */
|
||||
|
|
|
@ -665,7 +665,6 @@ unexec (const char *new_name, const char *old_name)
|
|||
#endif
|
||||
struct stat stat_buf;
|
||||
off_t old_file_size;
|
||||
int mask;
|
||||
|
||||
/* Open the old file, allocate a buffer of the right size, and read
|
||||
in the file contents. */
|
||||
|
@ -799,7 +798,7 @@ unexec (const char *new_name, const char *old_name)
|
|||
the image of the new file. Set pointers to various interesting
|
||||
objects. */
|
||||
|
||||
new_file = emacs_open (new_name, O_RDWR | O_CREAT, 0666);
|
||||
new_file = emacs_open (new_name, O_RDWR | O_CREAT, 0777);
|
||||
if (new_file < 0)
|
||||
fatal ("Can't creat (%s): %s", new_name, strerror (errno));
|
||||
|
||||
|
@ -1319,13 +1318,4 @@ unexec (const char *new_name, const char *old_name)
|
|||
|
||||
if (emacs_close (new_file) != 0)
|
||||
fatal ("Can't close (%s): %s", new_name, strerror (errno));
|
||||
|
||||
if (stat (new_name, &stat_buf) != 0)
|
||||
fatal ("Can't stat (%s): %s", new_name, strerror (errno));
|
||||
|
||||
mask = umask (777);
|
||||
umask (mask);
|
||||
stat_buf.st_mode |= 0111 & ~mask;
|
||||
if (chmod (new_name, stat_buf.st_mode) != 0)
|
||||
fatal ("Can't chmod (%s): %s", new_name, strerror (errno));
|
||||
}
|
||||
|
|
|
@ -1267,7 +1267,7 @@ unexec (const char *outfile, const char *infile)
|
|||
unexec_error ("cannot open input file `%s'", infile);
|
||||
}
|
||||
|
||||
outfd = emacs_open (outfile, O_WRONLY | O_TRUNC | O_CREAT, 0755);
|
||||
outfd = emacs_open (outfile, O_WRONLY | O_TRUNC | O_CREAT, 0777);
|
||||
if (outfd < 0)
|
||||
{
|
||||
emacs_close (infd);
|
||||
|
|
|
@ -185,7 +185,7 @@ void x_lower_frame (struct frame *);
|
|||
void x_scroll_bar_clear (struct frame *);
|
||||
void x_wm_set_size_hint (struct frame *, long, bool);
|
||||
void x_raise_frame (struct frame *);
|
||||
void x_set_window_size (struct frame *, int, int, int, bool);
|
||||
void x_set_window_size (struct frame *, bool, int, int, bool);
|
||||
void x_wm_set_window_state (struct frame *, int);
|
||||
void x_wm_set_icon_pixmap (struct frame *, int);
|
||||
static void w32_initialize (void);
|
||||
|
@ -5716,7 +5716,7 @@ w32_draw_window_cursor (struct window *w, struct glyph_row *glyph_row,
|
|||
|
||||
/* Icons. */
|
||||
|
||||
int
|
||||
bool
|
||||
x_bitmap_icon (struct frame *f, Lisp_Object icon)
|
||||
{
|
||||
HANDLE main_icon;
|
||||
|
@ -6096,12 +6096,13 @@ w32fullscreen_hook (struct frame *f)
|
|||
}
|
||||
|
||||
/* Call this to change the size of frame F's x-window.
|
||||
If CHANGE_GRAVITY is 1, we change to top-left-corner window gravity
|
||||
If CHANGE_GRAVITY, change to top-left-corner window gravity
|
||||
for this size change and subsequent size changes.
|
||||
Otherwise we leave the window gravity unchanged. */
|
||||
|
||||
void
|
||||
x_set_window_size (struct frame *f, int change_gravity, int width, int height, bool pixelwise)
|
||||
x_set_window_size (struct frame *f, bool change_gravity,
|
||||
int width, int height, bool pixelwise)
|
||||
{
|
||||
int pixelwidth, pixelheight;
|
||||
RECT rect;
|
||||
|
@ -6331,7 +6332,7 @@ x_lower_frame (struct frame *f)
|
|||
}
|
||||
|
||||
static void
|
||||
w32_frame_raise_lower (struct frame *f, int raise_flag)
|
||||
w32_frame_raise_lower (struct frame *f, bool raise_flag)
|
||||
{
|
||||
if (! FRAME_W32_P (f))
|
||||
return;
|
||||
|
|
|
@ -240,7 +240,7 @@ extern struct w32_display_info *w32_term_init (Lisp_Object,
|
|||
char *, char *);
|
||||
extern int w32_defined_color (struct frame *f, const char *color,
|
||||
XColor *color_def, int alloc);
|
||||
extern void x_set_window_size (struct frame *f, int change_grav,
|
||||
extern void x_set_window_size (struct frame *f, bool change_gravity,
|
||||
int width, int height, bool pixelwise);
|
||||
extern int x_display_pixel_height (struct w32_display_info *);
|
||||
extern int x_display_pixel_width (struct w32_display_info *);
|
||||
|
@ -257,7 +257,7 @@ extern void x_set_internal_border_width (struct frame *f,
|
|||
Lisp_Object value,
|
||||
Lisp_Object oldval);
|
||||
extern void x_activate_menubar (struct frame *);
|
||||
extern int x_bitmap_icon (struct frame *, Lisp_Object);
|
||||
extern bool x_bitmap_icon (struct frame *, Lisp_Object);
|
||||
extern void initialize_frame_menubar (struct frame *);
|
||||
extern void x_free_frame_resources (struct frame *);
|
||||
extern void x_real_positions (struct frame *, int *, int *);
|
||||
|
|
532
src/xterm.c
532
src/xterm.c
File diff suppressed because it is too large
Load diff
|
@ -834,7 +834,7 @@ struct scroll_bar
|
|||
int whole;
|
||||
#endif
|
||||
|
||||
/* 1 if the scroll bar is horizontal. */
|
||||
/* True if the scroll bar is horizontal. */
|
||||
bool horizontal;
|
||||
};
|
||||
|
||||
|
@ -979,7 +979,7 @@ XrmDatabase x_load_resources (Display *, const char *, const char *,
|
|||
|
||||
/* Defined in xterm.c */
|
||||
|
||||
extern int x_text_icon (struct frame *, const char *);
|
||||
extern bool x_text_icon (struct frame *, const char *);
|
||||
extern void x_catch_errors (Display *);
|
||||
extern void x_check_errors (Display *, const char *)
|
||||
ATTRIBUTE_FORMAT_PRINTF (2, 0);
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
2014-12-19 Artur Malabarba <bruce.connor.am@gmail.com>
|
||||
|
||||
* automated/let-alist.el: require `cl-lib'
|
||||
New tests for accessing alists inside alists.
|
||||
|
||||
2014-12-18 Artur Malabarba <bruce.connor.am@gmail.com>
|
||||
|
||||
|
|
|
@ -30,10 +30,22 @@
|
|||
(.test-two (cdr (assq 'test-two symbol))))
|
||||
(list .test-one .test-two
|
||||
.test-two .test-two)))
|
||||
(cl-letf (((symbol-function #'gensym) (lambda (x) 'symbol)))
|
||||
(cl-letf (((symbol-function #'make-symbol) (lambda (x) 'symbol)))
|
||||
(macroexpand
|
||||
'(let-alist data (list .test-one .test-two
|
||||
.test-two .test-two)))))))
|
||||
.test-two .test-two))))))
|
||||
(should
|
||||
(equal
|
||||
(let ((.external "ext")
|
||||
(.external.too "et"))
|
||||
(let-alist '((test-two . 0)
|
||||
(test-three . 1)
|
||||
(sublist . ((foo . 2)
|
||||
(bar . 3))))
|
||||
(list .test-one .test-two .test-three
|
||||
.sublist.foo .sublist.bar
|
||||
..external ..external.too)))
|
||||
(list nil 0 1 2 3 "ext" "et"))))
|
||||
|
||||
(defvar let-alist--test-counter 0
|
||||
"Used to count number of times a function is called.")
|
||||
|
@ -49,5 +61,17 @@
|
|||
(list .test-one .test-two .test-two .test-three .cl-incf))
|
||||
'(nil 1 1 2 nil)))))
|
||||
|
||||
(ert-deftest let-alist-remove-dot ()
|
||||
"Remove firt dot from symbol."
|
||||
(should (equal (let-alist--remove-dot 'hi) 'hi))
|
||||
(should (equal (let-alist--remove-dot '.hi) 'hi))
|
||||
(should (equal (let-alist--remove-dot '..hi) '.hi)))
|
||||
|
||||
(ert-deftest let-alist-list-to-sexp ()
|
||||
"Check that multiple dots are handled correctly."
|
||||
(should (= 1 (eval (let-alist--list-to-sexp '(a b c d) ''((d (c (b (a . 1)))))))))
|
||||
(should (equal (let-alist--access-sexp '.foo.bar.baz 'var)
|
||||
'(cdr (assq 'baz (cdr (assq 'bar (cdr (assq 'foo var))))))))
|
||||
(should (equal (let-alist--access-sexp '..foo.bar.baz 'var) '.foo.bar.baz)))
|
||||
|
||||
;;; let-alist.el ends here
|
||||
|
|
|
@ -7,6 +7,11 @@ let c = 1,
|
|||
var e = 100500,
|
||||
+ 1;
|
||||
|
||||
function test ()
|
||||
{
|
||||
return /[/]/.test ('/') // (bug#19397)
|
||||
}
|
||||
|
||||
var f = bar('/protocols/')
|
||||
baz();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue