Implemented simple virtualenv setup via python-shell-virtualenv-path variable.
when set to a string, makes the values stored in
`python-shell-process-environment' and `python-shell-exec-path' to be
modified properly so shells are started with the specified virtualenv.
New Variables:
* python-shell-virtualenv-path
New functions:
* python-shell-calculate-process-environment
* python-shell-calculate-exec-path
This new kind of shell is intended to be used for generic
communication related to defined configurations. The main difference
with global or dedicated shells is that these ones are attached to a
configuration, not a buffer. This means that can be used for example
to retrieve the sys.path and other stuff, without messing with user
shells.
New Variables:
* python-shell-internal-buffer-name,
None, True, False, Ellipsis, __debug__, and NotImplemented now use font-lock-constant-face
Also copyright, license, credits, quit, exit are removed from
font-lock since they are added by the site module and only useful for
shell interaction and not programs.
* python-eldoc-setup-code: The code to get help now uses the
inspect element. When an object doesn't have documentation and
if it is callable it returns the signature for it. Also when
an object does contain documentation it only returns the first
line.
* python-eldoc-at-point: has been simplified to just message the
doc header of objects.
* python-info-current-defun: was not taking into account the
current indentation so point was always inside a defun, even
if the indentation was less or equal than the defun above.
Fixed weird cornercase behavior in python-indent-calculate-indentation.
Doing (setq python-indent-levels '(0)) was causing the value of
python-indent-levels to not be initialized correctly on next calls to
python-indent-calculate-indentation. Using (setq python-indent-levels
(list 0)) instead does the trick but I'm not sure why.
For this, four new variables which contain the symbol name of the
function that specifies the behavior of fill-paragraph on certain
conditions were added:
* python-fill-comment-function: For comments
* python-fill-string-function: For strings
* python-fill-decorator-function: For decorators
* python-fill-paren-function: For parens
All of these variables are safe local variables in the case the value
provided is a symbol. Out of the box, they default to these four new
functions respectively:
Corrected implementations for python-{beginning,end}-of-defun functions.
When point is at beginning-of-defun, end-of-defun moves to the end of
the defun, even if it contains nested defuns. When point is at any
inner defun end-of-defun moves to the end of it, if another inner
defun exists at the same level point is moved to it.
For beginning-of-defun things are funkier, it would move backwards
following nested defuns in order. This will be fixed soon.
Added python-shell-prompt-output-regexp to match the prompts
added before output in shells like iPython. With the value of
this variable the output generated for
python-shell-send-string-no-ouput is cleaned up.
Moved completion variables and bindings setup for shell to
inferior-python-mode definition.
Renamed python-shell-completion-strings-code to
python-shell-completion-string-code.
6 basic skeletons are defined: class, def, for, if, try and while.
While these skeletons are strongly based on GNU/Emacs' current
python.el a better definition macro, a generic template for
try/except/finally/else blocks and a cool menu display is included.
Fixed infinite while loop in python-info-current-defun
Was caused when a beginning of defun was in the beginning of buffer
because python-beginning-of-innermost-defun never reached the real
start when (bobp)
Glenn Morris [Thu, 17 May 2012 01:23:03 +0000 (21:23 -0400)]
Install a self-contained NS build's libexec directly into the right place
This is rather than installing it in one place then moving it.
* configure.in (archlibdir): Set it for self-contained ns builds.
(libexecdir): Don't expand it now (this is mainly cosmetic).
* Makefile.in (ns_appbindir, ns_appresdir):
Move them before things that may refer to them.
(install-arch-dep): No need to relocate self-contained ns libexec.
* lib-src/Makefile.in (ns_appbindir): New, set by configure.
Paul Eggert [Wed, 16 May 2012 09:01:55 +0000 (02:01 -0700)]
* configure.in: Simplify by removing CPP etc.
(CPP_TEST_OPTIONS, NON_GNU_CPP, cc_specified, SPECIFIED_CFLAGS)
(SPECIFED_CPP, CPP, NON_GNU_CC, AC_PROG_CPP): Remove; not needed.
In particular we no longer need to fiddle with CPP, since we don't
use CPP specially any more.
(gl_EARLY): Invoke this after adjusting CC, so that it uses the
adjusted compiler.
(AC_PROG_INSTALL, AC_PROG_MKDIR_P, AC_PROG_RANLIB): Comment out,
since gl_EARLY and/or Autoconf already does these.
Use for otherchars the same delay used for other word components, so word
is not inmediately checked unless we are in a char that is neither a normal
word component nor an otherchar.
Glenn Morris [Wed, 16 May 2012 06:15:52 +0000 (23:15 -0700)]
Try to fix building with gcc >= 4.6 on Darwin.
Eg, hydra builds have been failing for some time because (?) of this.
In gcc < 4.6, unrecognized -no-fo options just cause a warning.
In 4.6 and later, they cause an error.
* configure.in: (CPP): Do not unconditionally set it on Darwin.
Instead, try to test if -no-cpp-precomp is accepted.
(CPP_TEST_OPTIONS, SPECIFIED_CPP): New.
Stefan Monnier [Wed, 16 May 2012 01:57:20 +0000 (21:57 -0400)]
* lisp/minibuffer.el (completion--sifn-requote): Fix last change.
(minibuffer-local-must-match-filename-map):
Move define-obsolete-variable-alias before its var.