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
627d5326
Commit
627d5326
authored
Mar 30, 2013
by
Eli Zaretskii
Browse files
Options
Browse Files
Download
Plain Diff
Merge from trunk.
parents
a433a2a7
66828436
Changes
20
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
383 additions
and
258 deletions
+383
-258
ChangeLog
ChangeLog
+5
-1
etc/NEWS
etc/NEWS
+7
-0
lisp/ChangeLog
lisp/ChangeLog
+32
-0
lisp/emacs-lisp/edebug.el
lisp/emacs-lisp/edebug.el
+27
-24
lisp/gnus/ChangeLog
lisp/gnus/ChangeLog
+8
-0
lisp/gnus/nnir.el
lisp/gnus/nnir.el
+36
-14
lisp/kmacro.el
lisp/kmacro.el
+21
-0
lisp/mpc.el
lisp/mpc.el
+84
-78
lisp/progmodes/subword.el
lisp/progmodes/subword.el
+15
-5
lisp/subr.el
lisp/subr.el
+52
-0
lisp/thingatpt.el
lisp/thingatpt.el
+0
-49
nt/ChangeLog
nt/ChangeLog
+12
-0
nt/config.nt
nt/config.nt
+3
-3
nt/inc/ms-w32.h
nt/inc/ms-w32.h
+1
-0
src/ChangeLog
src/ChangeLog
+23
-0
src/indent.c
src/indent.c
+0
-11
src/keyboard.c
src/keyboard.c
+0
-11
src/lisp.h
src/lisp.h
+54
-59
src/makefile.w32-in
src/makefile.w32-in
+2
-0
src/xdisp.c
src/xdisp.c
+1
-3
No files found.
ChangeLog
View file @
627d5326
2013-03-29 Aidan Gauland <aidalgol@no8wireless.co.nz>
* etc/NEWS: Added entry for em-tramp change in 2013-03-26T22:08:58Z!aidalgol@no8wireless.co.nz
2013-03-27 Paul Eggert <eggert@cs.ucla.edu>
* configure.ac (HAVE_XKBGETKEYBOARD): Remove.
Subsumed by HAVE_XKB. All uses changed.
2013-03-27 Aidan Gauland <aidalgol@no8wireless.co.nz
2013-03-27 Aidan Gauland <aidalgol@no8wireless.co.nz
>
* lisp/eshell/em-unix.el: Moved su and sudo to...
* lisp/eshell/em-tramp.el: ...Eshell tramp module
...
...
etc/NEWS
View file @
627d5326
...
...
@@ -239,6 +239,13 @@ which support POSIX ACLs.
*** The commands `woman-default-faces' and `woman-monochrome-faces'
are obsolete. Customize the `woman-* faces instead.
** Eshell
*** Added Eshell-TRAMP module
External su and sudo commands are now the default; the internal,
TRAMP-using variants can still be used by enabling the eshell-tramp
module.
** Obsolete packages:
*** longlines.el is obsolete; use visual-line-mode instead.
...
...
lisp/ChangeLog
View file @
627d5326
2013-03-30 Teodor Zlatanov <tzz@lifelogs.com>
* progmodes/subword.el: Back to using `forward-symbol'.
* subr.el (forward-whitespace, forward-symbol)
(forward-same-syntax): Move from thingatpt.el.
2013-03-29 Leo Liu <sdl.web@gmail.com>
* kmacro.el (kmacro-to-register): New command.
(kmacro-execute-from-register): New function.
(kmacro-keymap): Bind to 'x'. (Bug#14071)
2013-03-29 Stefan Monnier <monnier@iro.umontreal.ca>
* mpc.el: Use defvar-local and setq-local.
(mpc--proc-connect): Connection failures are not bugs.
(mpc-mode-map): `follow-link' only applies to the buffer's content.
(mpc-volume-map): Bind to the up-events.
2013-03-29 Teodor Zlatanov <tzz@lifelogs.com>
* progmodes/subword.el (superword-mode): Use `forward-sexp'
instead of `forward-symbol'.
2013-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
* emacs-lisp/edebug.el (edebug-mode): Make it a minor mode.
(edebug--recursive-edit): Use it.
(edebug-kill-buffer): Don't let-bind kill-buffer-hook.
(edebug-temp-display-freq-count): Don't let-bind buffer-read-only.
2013-03-28 Leo Liu <sdl.web@gmail.com>
* vc/vc-bzr.el (vc-bzr-revert): Don't backup. (Bug#14066)
...
...
lisp/emacs-lisp/edebug.el
View file @
627d5326
...
...
@@ -54,6 +54,7 @@
(
require
'macroexp
)
(
eval-when-compile
(
require
'cl-lib
))
(
eval-when-compile
(
require
'pcase
))
;;; Options
...
...
@@ -2072,11 +2073,6 @@ expressions; a `progn' form will be returned enclosing these forms."
(
defvar
edebug-active
nil
)
;; Non-nil when edebug is active
;;; add minor-mode-alist entry
(
or
(
assq
'edebug-active
minor-mode-alist
)
(
setq
minor-mode-alist
(
cons
(
list
'edebug-active
" *Debugging*"
)
minor-mode-alist
)))
(
defvar
edebug-stack
nil
)
;; Stack of active functions evaluated via edebug.
;; Should be nil at the top level.
...
...
@@ -2715,8 +2711,7 @@ MSG is printed after `::::} '."
;; Start up a recursive edit inside of edebug.
;; The current buffer is the edebug-buffer, which is put into edebug-mode.
;; Assume that none of the variables below are buffer-local.
(
let
((
edebug-buffer-read-only
buffer-read-only
)
;; match-data must be done in the outside buffer
(
let
(
;; match-data must be done in the outside buffer
(
edebug-outside-match-data
(
with-current-buffer
edebug-outside-buffer
; in case match buffer different
(
match-data
)))
...
...
@@ -2730,8 +2725,6 @@ MSG is printed after `::::} '."
;; during a recursive-edit
edebug-inside-windows
(
edebug-outside-map
(
current-local-map
))
;; Save the outside value of executing macro. (here??)
(
edebug-outside-executing-macro
executing-kbd-macro
)
(
edebug-outside-pre-command-hook
...
...
@@ -2804,10 +2797,9 @@ MSG is printed after `::::} '."
(
not
(
memq
arg-mode
'
(
after
error
))))
(
message
"Break"
))
(
setq
buffer-read-only
t
)
(
setq
signal-hook-function
nil
)
(
edebug-mode
)
(
edebug-mode
1
)
(
unwind-protect
(
recursive-edit
)
; <<<<<<<<<< Recursive edit
...
...
@@ -2828,10 +2820,7 @@ MSG is printed after `::::} '."
(
set-buffer
edebug-buffer
)
(
if
(
memq
edebug-execution-mode
'
(
go
Go-nonstop
))
(
edebug-overlay-arrow
))
(
setq
buffer-read-only
edebug-buffer-read-only
)
(
use-local-map
edebug-outside-map
)
(
remove-hook
'kill-buffer-hook
'edebug-kill-buffer
t
)
)
(
edebug-mode
-1
))
;; gotta have a buffer to let its buffer local variables be set
(
get-buffer-create
" bogus edebug buffer"
))
))
;; inner let
...
...
@@ -3773,7 +3762,9 @@ be installed in `emacs-lisp-mode-map'.")
(
interactive
)
(
describe-function
'edebug-mode
))
(
defun
edebug-mode
()
(
defvar
edebug--mode-saved-vars
nil
)
(
define-minor-mode
edebug-mode
"Mode for Emacs Lisp buffers while in Edebug.
In addition to all Emacs Lisp commands (except those that modify the
...
...
@@ -3807,20 +3798,32 @@ Options:
`edebug-on-signal'
`edebug-unwrap-results'
`edebug-global-break-condition'"
:lighter
" *Debugging*"
:keymap
edebug-mode-map
;; If the user kills the buffer in which edebug is currently active,
;; exit to top level, because the edebug command loop can't usefully
;; continue running in such a case.
;;
;; Append `edebug-kill-buffer' to the hook to avoid interfering with
;; other entries that are ungarded against deleted buffer.
(
add-hook
'kill-buffer-hook
'edebug-kill-buffer
t
t
)
(
use-local-map
edebug-mode-map
))
(
if
(
not
edebug-mode
)
(
progn
(
while
edebug--mode-saved-vars
(
let
((
setting
(
pop
edebug--mode-saved-vars
)))
(
if
(
consp
setting
)
(
set
(
car
setting
)
(
cdr
setting
))
(
kill-local-variable
setting
))))
(
remove-hook
'kill-buffer-hook
'edebug-kill-buffer
t
))
(
pcase-dolist
(
`
(
,
var
.
,
val
)
'
((
buffer-read-only
.
t
)))
(
push
(
if
(
local-variable-p
var
)
var
(
cons
var
(
symbol-value
var
)))
edebug--mode-saved-vars
)
(
set
(
make-local-variable
var
)
val
))
;; Append `edebug-kill-buffer' to the hook to avoid interfering with
;; other entries that are ungarded against deleted buffer.
(
add-hook
'kill-buffer-hook
'edebug-kill-buffer
t
t
)))
(
defun
edebug-kill-buffer
()
"Used on `kill-buffer-hook' when Edebug is operating in a buffer of Lisp code."
(
let
(
kill-buffer-hook
)
(
kill-buffer
(
current-buffer
)))
(
top-level
))
(
run-with-timer
0
nil
#'
top-level
))
;;; edebug eval list mode
...
...
@@ -4143,7 +4146,7 @@ reinstrument it."
It is removed when you hit any char."
;; This seems not to work with Emacs 18.59. It undoes too far.
(
interactive
)
(
let
((
buffer-read-only
nil
))
(
let
((
inhibit-read-only
t
))
(
undo-boundary
)
(
edebug-display-freq-count
)
(
setq
unread-command-events
...
...
lisp/gnus/ChangeLog
View file @
627d5326
2013-03-29 Andrew Cohen <cohen@bu.edu>
* nnir.el: Define 'number-sequence for xemacs.
(gnus-summary-create-nnir-group): New function to create an nnir group
from an nnir summary buffer based on the current query.
(nnir-request-create-group): Update to allow nnir group creation based
on the current query.
2013-03-28 Katsumi Yamaoka <yamaoka@jpl.org>
* nndraft.el (nndraft-request-expire-articles):
...
...
lisp/gnus/nnir.el
View file @
627d5326
...
...
@@ -173,7 +173,15 @@
;; For Emacs <22.2 and XEmacs.
(
eval-and-compile
(
unless
(
fboundp
'declare-function
)
(
defmacro
declare-function
(
&rest
r
))))
(
unless
(
fboundp
'declare-function
)
(
defmacro
declare-function
(
&rest
r
)))
(
unless
(
fboundp
'number-sequence
)
(
defun
number-sequence
(
from
to
)
(
let
(
seq
(
n
0
)
(
next
from
))
(
while
(
<=
next
to
)
(
setq
seq
(
cons
next
seq
)
n
(
1+
n
)
next
(
+
from
n
)))
(
nreverse
seq
)))))
(
require
'nnoo
)
(
require
'gnus-group
)
...
...
@@ -1840,24 +1848,38 @@ article came from is also searched."
(
add-hook
'gnus-summary-article-expire-hook
'nnir-registry-action
t
t
))))
(
defun
gnus-summary-create-nnir-group
()
(
interactive
)
(
let
((
name
(
gnus-read-group
"Group name: "
))
(
method
"nnir"
)
(
pgroup
(
if
(
gnus-group-prefixed-p
gnus-newsgroup-name
)
gnus-newsgroup-name
(
gnus-group-prefixed-name
gnus-newsgroup-name
'
(
nnir
"nnir"
)))))
(
with-current-buffer
gnus-group-buffer
(
gnus-group-make-group
name
method
nil
(
gnus-group-find-parameter
pgroup
)))))
(
deffoo
nnir-request-create-group
(
group
&optional
server
args
)
(
message
"Creating nnir group %s"
group
)
(
let
((
group
(
gnus-group-prefixed-name
group
'
(
nnir
"nnir"
)))
(
query-spec
(
list
(
cons
'query
(
read-string
"Query: "
nil
'nnir-search-history
))))
(
group-spec
(
list
(
list
(
read-string
"Server: "
nil
nil
)))))
(
gnus-group-set-parameter
group
'nnir-specs
(
list
(
cons
'nnir-query-spec
query-spec
)
(
cons
'nnir-group-spec
group-spec
)))
(
let*
((
group
(
gnus-group-prefixed-name
group
'
(
nnir
"nnir"
)))
(
specs
(
assoc
'nnir-specs
args
))
(
query-spec
(
or
(
cdr
(
assoc
'nnir-query-spec
specs
))
(
list
(
cons
'query
(
read-string
"Query: "
nil
'nnir-search-history
)))))
(
group-spec
(
or
(
cdr
(
assoc
'nnir-group-spec
specs
))
(
list
(
list
(
read-string
"Server: "
nil
nil
)))))
(
nnir-specs
(
list
(
cons
'nnir-query-spec
query-spec
)
(
cons
'nnir-group-spec
group-spec
))))
(
gnus-group-set-parameter
group
'nnir-specs
nnir-specs
)
(
gnus-group-set-parameter
group
'nnir-artlist
(
setq
nnir-artlist
(
nnir-run-query
(
list
(
cons
'nnir-query-spec
query-spec
)
(
cons
'nnir-group-spec
group-spec
)))))
(
or
(
cdr
(
assoc
'nnir-artlist
args
))
(
nnir-run-query
nnir-specs
)))
(
nnir-request-update-info
group
(
gnus-get-info
group
)))
t
)
...
...
lisp/kmacro.el
View file @
627d5326
...
...
@@ -202,6 +202,7 @@ macro to be executed before appending to it."
;; naming and binding
(
define-key
map
"b"
'kmacro-bind-to-key
)
(
define-key
map
"n"
'kmacro-name-last-macro
)
(
define-key
map
"x"
'kmacro-to-register
)
map
)
"Keymap for keyboard macro commands."
)
(
defalias
'kmacro-keymap
kmacro-keymap
)
...
...
@@ -836,6 +837,26 @@ Such a \"function\" cannot be called from Lisp, but it is a valid editor command
(
put
symbol
'kmacro
t
))
(
defun
kmacro-execute-from-register
(
k
)
(
let
((
last-kbd-macro
k
))
(
kmacro-call-macro
current-prefix-arg
)))
(
defun
kmacro-to-register
(
r
)
"Store the last keyboard macro in register R."
(
interactive
(
progn
(
or
last-kbd-macro
(
error
"No keyboard macro defined"
))
(
list
(
read-char
"Save to register: "
))))
(
set-register
r
(
registerv-make
last-kbd-macro
:jump-func
'kmacro-execute-from-register
:print-func
(
lambda
(
k
)
(
princ
(
format
"a keyboard macro:\n %s"
(
format-kbd-macro
k
))))
:insert-func
(
lambda
(
k
)
(
insert
(
format-kbd-macro
k
))))))
(
defun
kmacro-view-macro
(
&optional
_arg
)
"Display the last keyboard macro.
If repeated, it shows previous elements in the macro ring."
...
...
lisp/mpc.el
View file @
627d5326
...
...
@@ -192,7 +192,7 @@ numerically rather than lexicographically."
;; to the fact that MPD tends to disconnect fairly often, although our
;; constant polling often prevents disconnection.
(defvar mpc--find-memoize (make-hash-table :test 'equal)) ;; :weakness t
(defvar
mpc-tag nil) (make-variable-buffer-local 'mpc-tag
)
(defvar
-local mpc-tag nil
)
;;; Support for the actual connection and MPD command execution ;;;;;;;;;;;;
...
...
@@ -279,7 +279,9 @@ defaults to 6600 and HOST defaults to localhost."
(erase-buffer)
(let* ((coding-system-for-read 'utf-8-unix)
(coding-system-for-write 'utf-8-unix)
(proc (open-network-stream "
MPC
" (current-buffer) host port)))
(proc (condition-case err
(open-network-stream "
MPC
" (current-buffer) host port)
(error (user-error (error-message-string err))))))
(when (processp mpc-proc)
;; Inherit the properties of the previous connection.
(let ((plist (process-plist mpc-proc)))
...
...
@@ -1079,7 +1081,11 @@ If PLAYLIST is t or nil or missing, use the main playlist."
(define-key map [C-mouse-2] 'mpc-select-toggle)
(define-key map [drag-mouse-2] 'mpc-drag-n-drop)
;; We use `always' because a binding to t is like a binding to nil.
(define-key map [follow-link] 'always)
(define-key map [follow-link] :always)
;; But follow-link doesn't apply blindly to header-line and
;; mode-line clicks.
(define-key map [header-line follow-link] 'ignore)
(define-key map [mode-line follow-link] 'ignore)
;; Doesn't work because the first click changes the buffer, so the second
;; is applied elsewhere :-(
;; (define-key map [(double mouse-2)] 'mpc-play-at-point)
...
...
@@ -1136,17 +1142,18 @@ If PLAYLIST is t or nil or missing, use the main playlist."
"
Major
mode
for
the
features
common
to
all
buffers
of
MPC.
"
(buffer-disable-undo)
(setq buffer-read-only t)
(set
(make-local-variable 'tool-bar-map)
mpc-tool-bar-map)
(set
(make-local-variable 'truncate-lines)
t))
(set
q-local tool-bar-map
mpc-tool-bar-map)
(set
q-local truncate-lines
t))
;;; The mpc-status-mode buffer ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define-derived-mode mpc-status-mode mpc-mode "
MPC-Status
"
"
Major
mode
to
display
MPC
status
info.
"
(set (make-local-variable 'mode-line-format)
'("
%e
" mode-line-frame-identification mode-line-buffer-identification))
(set (make-local-variable 'window-area-factor) 3)
(set (make-local-variable 'header-line-format) '("
MPC
" mpc-volume)))
(setq-local mode-line-format
'("
%e
" mode-line-frame-identification
mode-line-buffer-identification))
(setq-local window-area-factor 3)
(setq-local header-line-format '("
MPC
" mpc-volume)))
(defvar mpc-status-buffer-format
'("
%-5{Time}
/
%{Duration}
%2{Disc--}%4{Track}
" "
%{Title}
" "
%{Album}
" "
%{Artist}
" "
%128{Cover}
"))
...
...
@@ -1188,8 +1195,7 @@ If PLAYLIST is t or nil or missing, use the main playlist."
(defvar mpc-separator-ol nil)
(defvar mpc-select nil)
(make-variable-buffer-local 'mpc-select)
(defvar-local mpc-select nil)
(defmacro mpc-select-save (&rest body)
"
Execute
BODY
and
restore
the
selection
afterwards.
"
...
...
@@ -1420,20 +1426,18 @@ when constructing the set of constraints."
;;; The TagBrowser mode ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defconst mpc-tagbrowser-all-name (propertize "
*ALL*
" 'face 'italic))
(defvar mpc-tagbrowser-all-ol nil)
(make-variable-buffer-local 'mpc-tagbrowser-all-ol)
(defvar mpc-tag-name nil) (make-variable-buffer-local 'mpc-tag-name)
(defvar-local mpc-tagbrowser-all-ol nil)
(defvar-local mpc-tag-name nil)
(defun mpc-tagbrowser-all-p ()
(and (eq (point-min) (line-beginning-position))
(equal mpc-tagbrowser-all-name
(buffer-substring (point-min) (line-end-position)))))
(define-derived-mode mpc-tagbrowser-mode mpc-mode '("
MPC-
" mpc-tag-name)
(set (make-local-variable 'mode-line-process) '("" mpc-tag-name))
(set (make-local-variable 'mode-line-format) nil)
(set (make-local-variable 'header-line-format) '("" mpc-tag-name ;; "
s
"
))
(set (make-local-variable 'buffer-undo-list) t)
(setq-local mode-line-process '("" mpc-tag-name))
(setq-local mode-line-format nil)
(setq-local header-line-format '("" mpc-tag-name)) ;; "
s
"
(setq-local buffer-undo-list t)
)
(defun mpc-tagbrowser-refresh ()
...
...
@@ -1539,14 +1543,14 @@ when constructing the set of constraints."
(let ((ol (make-overlay (point) (line-beginning-position 2))))
(overlay-put ol 'face 'region)
(overlay-put ol 'evaporate t)
(set
(make-local-variable 'mpc-tagbrowser-all-ol)
ol))))))
(set
q-local mpc-tagbrowser-all-ol
ol))))))
;; (defvar mpc-constraints nil)
(defun mpc-separator (active)
;; Place a separator mark.
(unless mpc-separator-ol
(set
(make-local-variable 'mpc-separator-ol)
(make-overlay (point) (point)))
(set
q-local mpc-separator-ol
(make-overlay (point) (point)))
(overlay-put mpc-separator-ol 'after-string
(propertize "
\n
"
'face '(:height 0.05 :inverse-video t))))
...
...
@@ -1605,7 +1609,7 @@ Return non-nil if a selection was deactivated."
(let ((constraints (mpc-constraints-get-current (current-buffer)))
(active 'all))
;; (unless (equal constraints mpc-constraints)
;; (set
(make-local-variable 'mpc-constraints)
constraints)
;; (set
q-local mpc-constraints
constraints)
(dolist (cst constraints)
(let ((vals (apply 'mpc-union
(mapcar (lambda (val)
...
...
@@ -1672,7 +1676,7 @@ Return non-nil if a selection was deactivated."
;; '(mpc-tagbrowser-dir-hide-prefix))
(define-derived-mode mpc-tagbrowser-dir-mode mpc-tagbrowser-mode '("
MPC-
" mpc-tag-name)
;; (set
(make-local-variable 'font-lock-defaults)
;; (set
q-local font-lock-defaults
;; '(mpc-tagbrowser-dir-keywords t))
)
...
...
@@ -1705,10 +1709,9 @@ Return non-nil if a selection was deactivated."
;;; Playlist management ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defvar mpc-songs-playlist nil
(defvar
-local
mpc-songs-playlist nil
"
Name
of
the
currently
selected
playlist,
if
any.
A
value
of
t
means
the
main
playlist.
")
(make-variable-buffer-local 'mpc-songs-playlist)
(defun mpc-playlist-create (name)
"
Save
current
playlist
under
name
NAME.
"
...
...
@@ -1775,12 +1778,14 @@ A value of t means the main playlist.")
(defvar mpc-volume-map
(let ((map (make-sparse-keymap)))
(define-key map [down-mouse-1] 'mpc-volume-mouse-set)
(define-key map [mouse-1] 'ignore)
(define-key map [header-line down-mouse-1] 'mpc-volume-mouse-set)
(define-key map [header-line mouse-1] 'ignore)
(define-key map [mode-line down-mouse-1] 'mpc-volume-mouse-set)
(define-key map [mode-line mouse-1] 'ignore)
;; Bind the up-events rather than the down-event, so the
;; `message' isn't canceled by the subsequent up-event binding.
(define-key map [down-mouse-1] 'ignore)
(define-key map [mouse-1] 'mpc-volume-mouse-set)
(define-key map [header-line mouse-1] 'mpc-volume-mouse-set)
(define-key map [header-line down-mouse-1] 'ignore)
(define-key map [mode-line mouse-1] 'mpc-volume-mouse-set)
(define-key map [mode-line down-mouse-1] 'ignore)
map))
(defvar mpc-volume nil) (put 'mpc-volume 'risky-local-variable t)
...
...
@@ -1945,9 +1950,9 @@ This is used so that they can be compared with `eq', which is needed for
(search-backward (cdr curline) nil t))
(beginning-of-line)
(goto-char (point-min)))
(set
(make-local-variable 'mpc-songs-totaltime)
(unless (zerop totaltime)
(list "
" (mpc-secs-to-time totaltime))))
(set
q-local mpc-songs-totaltime
(unless (zerop totaltime)
(list "
" (mpc-secs-to-time totaltime))))
))))
(let ((mpc-songpointer-set-visible t))
(mpc-songpointer-refresh)))
...
...
@@ -2056,46 +2061,47 @@ This is used so that they can be compared with `eq', which is needed for
(
define-derived-mode
mpc-songs-mode
mpc-mode
"MPC-song"
(
setq
mpc-songs-format-description
(
with-temp-buffer
(
mpc-format
mpc-songs-format
'self
)
(
buffer-string
)))
(
set
(
make-local-variable
'header-line-format
)
;; '("MPC " mpc-volume " " mpc-current-song)
(
list
(
propertize
" "
'display
'
(
space
:align-to
0
))
;; 'mpc-songs-format-description
'
(
:eval
(
let
((
hscroll
(
window-hscroll
)))
(
with-temp-buffer
(
mpc-format
mpc-songs-format
'self
hscroll
)
;; That would be simpler than the hscroll handling in
;; mpc-format, but currently move-to-column does not
;; recognize :space display properties.
;; (move-to-column hscroll)
;; (delete-region (point-min) (point))
(
buffer-string
))))))
(
set
(
make-local-variable
'mode-line-format
)
'
(
"%e"
mode-line-frame-identification
mode-line-buffer-identification
#(
" "
0
3
(
help-echo
"mouse-1: Select (drag to resize)\nmouse-2: Make current window occupy the whole frame\nmouse-3: Remove current window from display"
))
mode-line-position
#(
" "
0
2
(
help-echo
"mouse-1: Select (drag to resize)\nmouse-2: Make current window occupy the whole frame\nmouse-3: Remove current window from display"
))
mpc-songs-totaltime
mpc-current-updating
#(
" "
0
2
(
help-echo
"mouse-1: Select (drag to resize)\nmouse-2: Make current window occupy the whole frame\nmouse-3: Remove current window from display"
))
(
mpc--song-search
(
:propertize
(
"Search=\""
mpc--song-search
"\""
)
help-echo
"mouse-2: kill this search"
follow-link
t
mouse-face
mode-line-highlight
keymap
(
keymap
(
mode-line
keymap
(
mouse-2
.
mpc-songs-kill-search
))))
(
:propertize
"NoSearch"
help-echo
"mouse-2: set a search restriction"
follow-link
t
mouse-face
mode-line-highlight
keymap
(
keymap
(
mode-line
keymap
(
mouse-2
.
mpc-songs-search
)))))))
;; (set (make-local-variable 'mode-line-process)
(
setq-local
header-line-format
;; '("MPC " mpc-volume " " mpc-current-song)
(
list
(
propertize
" "
'display
'
(
space
:align-to
0
))
;; 'mpc-songs-format-description
'
(
:eval
(
let
((
hscroll
(
window-hscroll
)))
(
with-temp-buffer
(
mpc-format
mpc-songs-format
'self
hscroll
)
;; That would be simpler than the hscroll handling in
;; mpc-format, but currently move-to-column does not
;; recognize :space display properties.
;; (move-to-column hscroll)
;; (delete-region (point-min) (point))
(
buffer-string
))))))
(
setq-local
mode-line-format
'
(
"%e"
mode-line-frame-identification
mode-line-buffer-identification
#(
" "
0
3
(
help-echo
"mouse-1: Select (drag to resize)\nmouse-2: Make current window occupy the whole frame\nmouse-3: Remove current window from display"
))
mode-line-position
#(
" "
0
2
(
help-echo
"mouse-1: Select (drag to resize)\nmouse-2: Make current window occupy the whole frame\nmouse-3: Remove current window from display"
))
mpc-songs-totaltime
mpc-current-updating
#(
" "
0
2
(
help-echo
"mouse-1: Select (drag to resize)\nmouse-2: Make current window occupy the whole frame\nmouse-3: Remove current window from display"
))
(
mpc--song-search
(
:propertize
(
"Search=\""
mpc--song-search
"\""
)
help-echo
"mouse-2: kill this search"
follow-link
t
mouse-face
mode-line-highlight
keymap
(
keymap
(
mode-line
keymap
(
mouse-2
.
mpc-songs-kill-search
))))
(
:propertize
"NoSearch"
help-echo
"mouse-2: set a search restriction"
follow-link
t
mouse-face
mode-line-highlight
keymap
(
keymap
(
mode-line
keymap
(
mouse-2
.
mpc-songs-search
)))))))
;; (setq-local mode-line-process
;; '("" ;; mpc-volume " "
;; mpc-songs-totaltime
;; mpc-current-updating))
...
...
@@ -2111,7 +2117,7 @@ This is used so that they can be compared with `eq', which is needed for
(
<=
(
window-start
win
)
overlay-arrow-position
)
(
<
overlay-arrow-position
(
window-end
win
)))))))
(
unless
(
local-variable-p
'overlay-arrow-position
)
(
set
(
make-local-variable
'overlay-arrow-position
)
(
make-marker
)))
(
set
q-local
overlay-arrow-position
(
make-marker
)))
(
move-marker
overlay-arrow-position
pos
)
;; If the arrow was visible, try to keep it that way.
(
if
(
and
visible
pos
...
...
@@ -2613,8 +2619,8 @@ This is used so that they can be compared with `eq', which is needed for
(
window-minibuffer-p
))
(
ignore-errors
(
select-frame
(
make-frame
mpc-frame-alist
)))
(
with-current-buffer
song-buf
(
set
(
make-local-variable
'mpc-previous-window-config
)
(
current-window-configuration
))))
(
set
q-local
mpc-previous-window-config
(
current-window-configuration
))))
(
let*
((
win1
(
selected-window
))
(
win2
(
split-window
))
(
tags
mpc-browser-tags
))
...
...
lisp/progmodes/subword.el
View file @
627d5326
...
...
@@ -154,7 +154,7 @@ as words.
"Do the same as `forward-word' but on subwords.
See the command `subword-mode' for a description of subwords.
Optional argument ARG is the same as for `forward-word'."
(
interactive
"p"
)
(
interactive
"
^
p"
)
(
unless
arg
(
setq
arg
1
))
(
cond
((
<
0
arg
)
...
...
@@ -168,16 +168,26 @@ Optional argument ARG is the same as for `forward-word'."
(
put
'subword-forward
'CUA
'move
)
(
defalias
'subword-right
'subword-forward
)
(
defun
subword-backward
(
&optional
arg
)
"Do the same as `backward-word' but on subwords.
See the command `subword-mode' for a description of subwords.
Optional argument ARG is the same as for `backward-word'."
(
interactive
"p"
)
(
interactive
"
^
p"
)
(
subword-forward
(
-
(
or
arg
1
))))
(
defalias
'subword-left
'subword-backward
)
(
defun
subword-right
(
&optional
arg
)
"Do the same as `right-word' but on subwords."
(
interactive
"^p"
)
(
if
(
eq
(
current-bidi-paragraph-direction
)
'left-to-right
)
(
subword-forward
arg
)
(
subword-backward
arg
)))
(
defun
subword-left
(
&optional
arg
)
"Do the same as `left-word' but on subwords."
(
interactive
"^p"
)
(
if
(
eq
(
current-bidi-paragraph-direction
)
'left-to-right
)
(
subword-backward
arg
)
(
subword-forward
arg
)))
(
defun
subword-mark
(
arg
)
"Do the same as `mark-word' but on subwords.
...
...
lisp/subr.el
View file @
627d5326
...
...
@@ -3839,6 +3839,58 @@ node `(elisp)Syntax Table Internals' for a list of codes.
If SYNTAX is nil, return nil."
(and syntax (logand (car syntax) 65535)))
;; Utility motion commands
;; Whitespace
(defun forward-whitespace (arg)
"Move point to the end of the next sequence of whitespace chars.
Each such sequence may be a single newline, or a sequence of
consecutive space and/or tab characters.
With prefix argument ARG, do it ARG times if positive, or move
backwards ARG times if negative."
(interactive "^p")
(if (natnump arg)
(re-search-forward "[ \t]+\\|\n" nil 'move arg)
(while (< arg 0)
(if (re-search-backward "[ \t]+\\|\n" nil 'move)
(or (eq (char-after (match-beginning 0)) ?\n)
(skip-chars-backward " \t")))
(setq arg (1+ arg)))))
;; Symbols
(defun forward-symbol (arg)
"Move point to the next position that is the end of a symbol.
A symbol is any sequence of characters that are in either the
word constituent or symbol constituent syntax class.
With prefix argument ARG, do it ARG times if positive, or move
backwards ARG times if negative."
(interactive "^p")
(if (natnump arg)
(re-search-forward "\\(\\sw\\|\\s_\\)+" nil 'move arg)
(while (< arg 0)