Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emacs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
emacs
emacs
Commits
648e5523
Commit
648e5523
authored
Feb 14, 2013
by
Paul Eggert
Browse files
Options
Browse Files
Download
Plain Diff
Merge from emacs-24; up to 2012-12-19T13:01:16Z!michael.albinus@gmx.de
parents
dec2a322
974c7646
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
204 additions
and
85 deletions
+204
-85
ChangeLog
ChangeLog
+5
-0
configure.ac
configure.ac
+5
-0
doc/lispref/ChangeLog
doc/lispref/ChangeLog
+4
-0
doc/lispref/modes.texi
doc/lispref/modes.texi
+2
-3
lisp/ChangeLog
lisp/ChangeLog
+27
-0
lisp/emacs-lisp/easy-mmode.el
lisp/emacs-lisp/easy-mmode.el
+8
-7
lisp/net/goto-addr.el
lisp/net/goto-addr.el
+11
-12
lisp/progmodes/python.el
lisp/progmodes/python.el
+76
-53
lisp/xml.el
lisp/xml.el
+2
-2
src/ChangeLog
src/ChangeLog
+20
-0
src/lisp.h
src/lisp.h
+0
-4
src/w32.c
src/w32.c
+17
-4
src/w32proc.c
src/w32proc.c
+27
-0
No files found.
ChangeLog
View file @
648e5523
2013-02-15 Paul Eggert <eggert@cs.ucla.edu>
Fix AIX port (Bug#13650).
* configure.ac (DATA_START, DATA_SEG_BITS): Set to 0x20000000 on AIX.
2013-02-12 Eli Zaretskii <eliz@gnu.org>
* lib/makefile.w32-in (GNULIBOBJS): Add $(BLD)/memrchr.$(O).
...
...
configure.ac
View file @
648e5523
...
...
@@ -3750,6 +3750,11 @@ case $opsys in
AC_DEFINE(DATA_START, [({ extern int data_start; (char *) &data_start; })])
;;
aix*)
dnl This works with 32-bit executables; Emacs doesn't support 64-bit.
AC_DEFINE(DATA_START, [0x20000000])
AC_DEFINE(DATA_SEG_BITS, [0x20000000])
;;
hpux*)
dnl The data segment on this machine always starts at address 0x40000000.
AC_DEFINE(DATA_START, [0x40000000])
...
...
doc/lispref/ChangeLog
View file @
648e5523
2013-02-14 Glenn Morris <rgm@gnu.org>
* modes.texi (Basic Major Modes): 'z' no longer bound in special-mode.
2013-02-13 Glenn Morris <rgm@gnu.org>
* objects.texi (Char-Table Type): Add footnote about #^^.
...
...
doc/lispref/modes.texi
View file @
648e5523
...
...
@@ -905,9 +905,8 @@ modes derived from Special mode are given a @code{mode-class} property
of @code{special} (@pxref{Major Mode Conventions}).
Special mode sets the buffer to read-only. Its keymap defines several
common bindings, including @kbd{q} for @code{quit-window}, @kbd{z} for
@code{kill-this-buffer}, and @kbd{g} for @code{revert-buffer}
(@pxref{Reverting}).
common bindings, including @kbd{q} for @code{quit-window} and @kbd{g}
for @code{revert-buffer} (@pxref{Reverting}).
An example of a major mode derived from Special mode is Buffer Menu
mode, which is used by the @file{*Buffer List*} buffer. @xref{List
...
...
lisp/ChangeLog
View file @
648e5523
2013-02-15 Michael Albinus <michael.albinus@gmx.de>
* emacs-lisp/easy-mmode.el (define-minor-mode): Doc fix.
2013-02-15 Stefan Monnier <monnier@iro.umontreal.ca>
* net/goto-addr.el (goto-address-fontify): Add start and end args.
(goto-address-fontify-region): Use them instead of narrowing, so
syntax-ppss has access to the whole buffer.
2013-02-15 Fabián Ezequiel Gallina <fgallina@cuca>
* progmodes/python.el: Explain how to restore "cc-mode"-like
forward-sexp movement in header documentation (Bug#13642).
(python-nav--forward-sexp): Behave like emacs-lisp-mode in
comments and strings (GH bug 114).
2013-02-15 Fabián Ezequiel Gallina <fgallina@cuca>
* progmodes/python.el (python-info-current-defun): Fix current
defun detection (Bug#13618).
2013-02-15 Chong Yidong <cyd@gnu.org>
* xml.el (xml-parse-string): Fix typo in handling of bad character
references.
2013-02-15 Glenn Morris <rgm@gnu.org>
* play/fortune.el (fortune-compile): Simplify and fix previous change.
...
...
lisp/emacs-lisp/easy-mmode.el
View file @
648e5523
...
...
@@ -132,13 +132,14 @@ BODY contains code to execute each time the mode is enabled or disabled.
:require SYM Same as in `defcustom'.
:variable PLACE The location to use instead of the variable MODE to store
the state of the mode. This can be simply a different
named variable, or more generally anything that can be used
with the CL macro `setf'. PLACE can also be of the form
\(GET . SET), where GET is an expression that returns the
current state, and SET is a function that takes one argument,
the new state, and sets it. If you specify a :variable,
this function does not define a MODE variable (nor any of
the terms used in :variable).
named variable, or a generalized variable.
PLACE can also be of the form \(GET . SET), where GET is
an expression that returns the current state, and SET is
a function that takes one argument, the new state, and
sets it. If you specify a :variable, this function does
not define a MODE variable (nor any of the terms used
in :variable).
:after-hook A single lisp form which is evaluated after the mode hooks
have been run. It should not be quoted.
...
...
lisp/net/goto-addr.el
View file @
648e5523
...
...
@@ -156,18 +156,19 @@ A value of t means there is no limit--fontify regardless of the size."
(
defvar
goto-address-prog-mode
)
(
defun
goto-address-fontify
()
(
defun
goto-address-fontify
(
&optional
start
end
)
"Fontify the URLs and e-mail addresses in the current buffer.
This function implements `goto-address-highlight-p'
and `goto-address-fontify-p'."
;; Clean up from any previous go.
(
goto-address-unfontify
(
point-min
)
(
point-max
))
(
goto-address-unfontify
(
or
start
(
point-min
))
(
or
end
(
point-max
)
))
(
save-excursion
(
let
((
inhibit-point-motion-hooks
t
))
(
goto-char
(
point-min
))
(
goto-char
(
or
start
(
point-min
)
))
(
when
(
or
(
eq
t
goto-address-fontify-maximum-size
)
(
<
(
-
(
point-max
)
(
point
))
goto-address-fontify-maximum-size
))
(
while
(
re-search-forward
goto-address-url-regexp
nil
t
)
(
<
(
-
(
or
end
(
point-max
))
(
point
))
goto-address-fontify-maximum-size
))
(
while
(
re-search-forward
goto-address-url-regexp
end
t
)
(
let*
((
s
(
match-beginning
0
))
(
e
(
match-end
0
))
this-overlay
)
...
...
@@ -187,8 +188,8 @@ and `goto-address-fontify-p'."
(
overlay-put
this-overlay
'keymap
goto-address-highlight-keymap
)
(
overlay-put
this-overlay
'goto-address
t
))))
(
goto-char
(
point-min
))
(
while
(
re-search-forward
goto-address-mail-regexp
nil
t
)
(
goto-char
(
or
start
(
point-min
)
))
(
while
(
re-search-forward
goto-address-mail-regexp
end
t
)
(
let*
((
s
(
match-beginning
0
))
(
e
(
match-end
0
))
this-overlay
)
...
...
@@ -212,11 +213,9 @@ and `goto-address-fontify-p'."
(
defun
goto-address-fontify-region
(
start
end
)
"Fontify URLs and e-mail addresses in the given region."
(
save-excursion
(
save-restriction
(
let
((
beg-line
(
progn
(
goto-char
start
)
(
line-beginning-position
)))
(
end-line
(
progn
(
goto-char
end
)
(
line-end-position
))))
(
narrow-to-region
beg-line
end-line
)
(
goto-address-fontify
)))))
(
let
((
beg-line
(
progn
(
goto-char
start
)
(
line-beginning-position
)))
(
end-line
(
progn
(
goto-char
end
)
(
line-end-position
))))
(
goto-address-fontify
beg-line
end-line
))))
;; code to find and goto addresses; much of this has been blatantly
;; snarfed from browse-url.el
...
...
lisp/progmodes/python.el
View file @
648e5523
...
...
@@ -54,8 +54,13 @@
;; `python-nav-beginning-of-statement', `python-nav-end-of-statement',
;; `python-nav-beginning-of-block' and `python-nav-end-of-block' are
;; included but no bound to any key. At last but not least the
;; specialized `python-nav-forward-sexp' allows easy
;; navigation between code blocks.
;; specialized `python-nav-forward-sexp' allows easy navigation
;; between code blocks. If you prefer `cc-mode'-like `forward-sexp'
;; movement, setting `forward-sexp-function' to nil is enough, You can
;; do that using the `python-mode-hook':
;; (add-hook 'python-mode-hook
;; (lambda () (setq forward-sexp-function nil)))
;; Shell interaction: is provided and allows you to execute easily any
;; block of code of your current buffer in an inferior Python process.
...
...
@@ -1349,13 +1354,10 @@ backwards."
're-search-backward
))
(
context-type
(
python-syntax-context-type
)))
(
cond
((
eq
context-type
'string
)
((
memq
context-type
'
(
string
comment
)
)
;; Inside of a string, get out of it.
(
while
(
and
(
funcall
re-search-fn
"[\"']"
nil
t
)
(
python-syntax-context
'string
))))
((
eq
context-type
'comment
)
;; Inside of a comment, just move forward.
(
python-util-forward-comment
dir
))
(
let
((
forward-sexp-function
))
(
forward-sexp
dir
)))
((
or
(
eq
context-type
'paren
)
(
and
forward-p
(
looking-at
(
python-rx
open-paren
)))
(
and
(
not
forward-p
)
...
...
@@ -1378,16 +1380,16 @@ backwards."
(
save-excursion
(
python-nav-lisp-forward-sexp-safe
dir
)
(
point
)))
(
next-sexp-context
(
save-excursion
(
goto-char
next-sexp-pos
)
(
cond
((
python-info-beginning-of-block-p
)
'block-start
)
((
python-info-end-of-block-p
)
'block-end
)
((
python-info-beginning-of-statement-p
)
'statement-start
)
((
python-info-end-of-statement-p
)
'statement-end
)
((
python-info-statement-starts-block-p
)
'starts-block
)
((
python-info-statement-ends-block-p
)
'ends-block
)))))
(
next-sexp-context
(
save-excursion
(
goto-char
next-sexp-pos
)
(
cond
((
python-info-beginning-of-block-p
)
'block-start
)
((
python-info-end-of-block-p
)
'block-end
)
((
python-info-beginning-of-statement-p
)
'statement-start
)
((
python-info-end-of-statement-p
)
'statement-end
)
((
python-info-statement-starts-block-p
)
'starts-block
)
((
python-info-statement-ends-block-p
)
'ends-block
)))))
(
if
forward-p
(
cond
((
and
(
not
(
eobp
))
(
python-info-current-line-empty-p
))
...
...
@@ -1411,8 +1413,8 @@ backwards."
(
t
(
goto-char
next-sexp-pos
)))
(
cond
((
and
(
not
(
bobp
))
(
python-info-current-line-empty-p
))
(
python-util-forward-comment
dir
)
(
python-nav--forward-sexp
dir
))
(
python-util-forward-comment
dir
)
(
python-nav--forward-sexp
dir
))
((
eq
context
'block-end
)
(
python-nav-beginning-of-block
))
((
eq
context
'statement-end
)
...
...
@@ -2946,40 +2948,61 @@ Optional argument INCLUDE-TYPE indicates to include the type of the defun.
This function is compatible to be used as
`add-log-current-defun-function' since it returns nil if point is
not inside a defun."
(save-restriction
(widen)
(save-excursion
(end-of-line 1)
(let ((names)
(starting-indentation
(save-excursion
(and
(python-nav-beginning-of-defun 1)
;; This extra number is just for checking code
;; against indentation to work well on first run.
(+ (current-indentation) 4))))
(starting-point (point)))
;; Check point is inside a defun.
(when (and starting-indentation
(< starting-point
(save-restriction
(widen)
(save-excursion
(end-of-line 1)
(let ((names)
(starting-indentation (current-indentation))
(starting-pos (point))
(first-run t)
(last-indent)
(type))
(catch 'exit
(while (python-nav-beginning-of-defun 1)
(when (and
(or (not last-indent)
(< (current-indentation) last-indent))
(or
(and first-run
(save-excursion
(python-nav-end-of-defun)
(point))))
(catch 'exit
(while (python-nav-beginning-of-defun 1)
(when (< (current-indentation) starting-indentation)
(setq starting-indentation (current-indentation))
(setq names
(cons
(if (not include-type)
(match-string-no-properties 1)
(mapconcat 'identity
(split-string
(match-string-no-properties 0)) " "))
names)))
(and (= (current-indentation) 0) (throw 'exit t)))))
(and names
(mapconcat (lambda (string) string) names "."))))))
;; If this is the first run, we may add
;; the current defun at point.
(setq first-run nil)
(goto-char starting-pos)
(python-nav-beginning-of-statement)
(beginning-of-line 1)
(looking-at-p
python-nav-beginning-of-defun-regexp)))
(< starting-pos
(save-excursion
(let ((min-indent
(+ (current-indentation)
python-indent-offset)))
(if (< starting-indentation min-indent)
;; If the starting indentation is not
;; within the min defun indent make the
;; check fail.
starting-pos
;; Else go to the end of defun and add
;; up the current indentation to the
;; ending position.
(python-nav-end-of-defun)
(+ (point)
(if (>= (current-indentation) min-indent)
(1+ (current-indentation))
0))))))))
(setq last-indent (current-indentation))
(if (or (not include-type) type)
(setq names (cons (match-string-no-properties 1) names))
(let ((match (split-string (match-string-no-properties 0))))
(setq type (car match))
(setq names (cons (cadr match) names)))))
;; Stop searching ASAP.
(and (= (current-indentation) 0) (throw 'exit t))))
(and names
(concat (and type (format "%s " type))
(mapconcat 'identity names ".")))))))
(defun python-info-current-symbol (&optional replace-self)
"Return current symbol using dotty syntax.
...
...
lisp/xml.el
View file @
648e5523
...
...
@@ -611,7 +611,7 @@ references."
xml-validating-parser
(
error
"XML: (Validity) Invalid character reference `%s'"
(
match-string
0
)))
(
replace-match
(
or
(
string
val
)
xml-undefined-entity
)
t
t
))
(
replace-match
(
if
val
(
string
val
)
xml-undefined-entity
)
t
t
))
;; For an entity reference, search again from the start of
;; the replaced text, since the replacement can contain
;; entity or character references, or markup.
...
...
@@ -620,7 +620,7 @@ references."
(
and
(
null
val
)
xml-validating-parser
(
error
"XML: (Validity) Undefined entity `%s'"
ref
))
(
replace-match
(
cdr
val
)
t
t
)
(
replace-match
(
or
(
cdr
val
)
xml-undefined-entity
)
t
t
)
(
goto-char
(
match-beginning
0
)))
;; Check for XML bombs.
(
and
xml-entity-expansion-limit
...
...
src/ChangeLog
View file @
648e5523
2013-02-15 Paul Eggert <eggert@cs.ucla.edu>
Fix AIX port (Bug#13650).
* lisp.h (XPNTR) [!USE_LSB_TAG && DATA_SEG_BITS]:
Fix bug introduced in 2012-07-27 change. DATA_SEG_BITS, if set,
was #undeffed earlier, so it cannot be used as a macro here.
Use the constant and not the macro.
2013-02-15 Eli Zaretskii <eliz@gnu.org>
* w32proc.c (new_child): If no vacant slots are found in
child_procs[], make another pass looking for slots whose process
has exited or died. (Bug#13546)
* w32.c (sys_pipe): When failing due to file descriptors above
MAXDESC, set errno to EMFILE.
(_sys_read_ahead): Update cp->status when failing to read serial
communications input, so that the status doesn't stay at
STATUS_READ_IN_PROGRESS. (Bug#13546)
2013-02-14 Jan Djärv <jan.h.d@swipnet.se>
* gtkutil.c (tb_size_cb): New function.
...
...
src/lisp.h
View file @
648e5523
...
...
@@ -505,13 +505,9 @@ static EMACS_INT const VALMASK
(XIL ((EMACS_INT) ((EMACS_UINT) (type) << VALBITS) \
+ ((intptr_t) (ptr) & VALMASK)))
#if DATA_SEG_BITS
/* DATA_SEG_BITS forces extra bits to be or'd in with any pointers
which were stored in a Lisp_Object. */
#define XPNTR(a) ((uintptr_t) ((XLI (a) & VALMASK)) | DATA_SEG_BITS))
#else
#define XPNTR(a) ((uintptr_t) (XLI (a) & VALMASK))
#endif
#endif
/* not USE_LSB_TAG */
...
...
src/w32.c
View file @
648e5523
...
...
@@ -6800,6 +6800,7 @@ sys_pipe (int * phandles)
{
_close (phandles[0]);
_close (phandles[1]);
errno = EMFILE;
rc = -1;
}
else
...
...
@@ -6873,19 +6874,31 @@ _sys_read_ahead (int fd)
/* Configure timeouts for blocking read. */
if (!GetCommTimeouts (hnd, &ct))
return STATUS_READ_ERROR;
{
cp->status = STATUS_READ_ERROR;
return STATUS_READ_ERROR;
}
ct.ReadIntervalTimeout = 0;
ct.ReadTotalTimeoutMultiplier = 0;
ct.ReadTotalTimeoutConstant = 0;
if (!SetCommTimeouts (hnd, &ct))
return STATUS_READ_ERROR;
{
cp->status = STATUS_READ_ERROR;
return STATUS_READ_ERROR;
}
if (!ReadFile (hnd, &cp->chr, sizeof (char), (DWORD*) &rc, ovl))
{
if (GetLastError () != ERROR_IO_PENDING)
return STATUS_READ_ERROR;
{
cp->status = STATUS_READ_ERROR;
return STATUS_READ_ERROR;
}
if (!GetOverlappedResult (hnd, ovl, (DWORD*) &rc, TRUE))
return STATUS_READ_ERROR;
{
cp->status = STATUS_READ_ERROR;
return STATUS_READ_ERROR;
}
}
}
else if (fd_info[fd].flags & FILE_SOCKET)
...
...
src/w32proc.c
View file @
648e5523
...
...
@@ -802,6 +802,33 @@ new_child (void)
for
(
cp
=
child_procs
+
(
child_proc_count
-
1
);
cp
>=
child_procs
;
cp
--
)
if
(
!
CHILD_ACTIVE
(
cp
)
&&
cp
->
procinfo
.
hProcess
==
NULL
)
goto
Initialize
;
if
(
child_proc_count
==
MAX_CHILDREN
)
{
DebPrint
((
"new_child: No vacant slots, looking for dead processes
\n
"
));
for
(
cp
=
child_procs
+
(
child_proc_count
-
1
);
cp
>=
child_procs
;
cp
--
)
if
(
!
CHILD_ACTIVE
(
cp
)
&&
cp
->
procinfo
.
hProcess
)
{
DWORD
status
=
0
;
if
(
!
GetExitCodeProcess
(
cp
->
procinfo
.
hProcess
,
&
status
))
{
DebPrint
((
"new_child.GetExitCodeProcess: error %lu for PID %lu
\n
"
,
GetLastError
(),
cp
->
procinfo
.
dwProcessId
));
status
=
STILL_ACTIVE
;
}
if
(
status
!=
STILL_ACTIVE
||
WaitForSingleObject
(
cp
->
procinfo
.
hProcess
,
0
)
==
WAIT_OBJECT_0
)
{
DebPrint
((
"new_child: Freeing slot of dead process %d
\n
"
,
cp
->
procinfo
.
dwProcessId
));
CloseHandle
(
cp
->
procinfo
.
hProcess
);
cp
->
procinfo
.
hProcess
=
NULL
;
CloseHandle
(
cp
->
procinfo
.
hThread
);
cp
->
procinfo
.
hThread
=
NULL
;
goto
Initialize
;
}
}
}
if
(
child_proc_count
==
MAX_CHILDREN
)
return
NULL
;
cp
=
&
child_procs
[
child_proc_count
++
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment