Merge from trunk.
This commit is contained in:
commit
627d532608
20 changed files with 382 additions and 257 deletions
|
@ -1,9 +1,13 @@
|
|||
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
|
||||
|
|
7
etc/NEWS
7
etc/NEWS
|
@ -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.
|
||||
|
|
|
@ -1,3 +1,35 @@
|
|||
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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,3 +1,11 @@
|
|||
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):
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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."
|
||||
|
|
160
lisp/mpc.el
160
lisp/mpc.el
|
@ -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))
|
||||
(setq-local tool-bar-map mpc-tool-bar-map)
|
||||
(setq-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))))))
|
||||
(setq-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)))
|
||||
(setq-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)
|
||||
;; (setq-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)
|
||||
;; (setq-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))))
|
||||
(setq-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)))))))
|
||||
(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)))))))
|
||||
|
||||
;; (set (make-local-variable 'mode-line-process)
|
||||
;; (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)))
|
||||
(setq-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))))
|
||||
(setq-local mpc-previous-window-config
|
||||
(current-window-configuration))))
|
||||
(let* ((win1 (selected-window))
|
||||
(win2 (split-window))
|
||||
(tags mpc-browser-tags))
|
||||
|
|
|
@ -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.
|
||||
|
|
52
lisp/subr.el
52
lisp/subr.el
|
@ -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)
|
||||
(if (re-search-backward "\\(\\sw\\|\\s_\\)+" nil 'move)
|
||||
(skip-syntax-backward "w_"))
|
||||
(setq arg (1+ arg)))))
|
||||
|
||||
;; Syntax blocks
|
||||
|
||||
(defun forward-same-syntax (&optional arg)
|
||||
"Move point past all characters with the same syntax class.
|
||||
With prefix argument ARG, do it ARG times if positive, or move
|
||||
backwards ARG times if negative."
|
||||
(interactive "^p")
|
||||
(or arg (setq arg 1))
|
||||
(while (< arg 0)
|
||||
(skip-syntax-backward
|
||||
(char-to-string (char-syntax (char-before))))
|
||||
(setq arg (1+ arg)))
|
||||
(while (> arg 0)
|
||||
(skip-syntax-forward (char-to-string (char-syntax (char-after))))
|
||||
(setq arg (1- arg))))
|
||||
|
||||
|
||||
;;;; Text clones
|
||||
|
||||
(defun text-clone-maintain (ol1 after beg end &optional _len)
|
||||
|
|
|
@ -529,60 +529,11 @@ with angle brackets.")
|
|||
(buffer-substring-no-properties
|
||||
(car boundary-pair) (cdr boundary-pair))))))
|
||||
|
||||
;; 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)))))
|
||||
|
||||
;; Buffer
|
||||
|
||||
(put 'buffer 'end-op (lambda () (goto-char (point-max))))
|
||||
(put 'buffer 'beginning-op (lambda () (goto-char (point-min))))
|
||||
|
||||
;; 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)
|
||||
(if (re-search-backward "\\(\\sw\\|\\s_\\)+" nil 'move)
|
||||
(skip-syntax-backward "w_"))
|
||||
(setq arg (1+ arg)))))
|
||||
|
||||
;; Syntax blocks
|
||||
|
||||
(defun forward-same-syntax (&optional arg)
|
||||
"Move point past all characters with the same syntax class.
|
||||
With prefix argument ARG, do it ARG times if positive, or move
|
||||
backwards ARG times if negative."
|
||||
(interactive "p")
|
||||
(or arg (setq arg 1))
|
||||
(while (< arg 0)
|
||||
(skip-syntax-backward
|
||||
(char-to-string (char-syntax (char-before))))
|
||||
(setq arg (1+ arg)))
|
||||
(while (> arg 0)
|
||||
(skip-syntax-forward (char-to-string (char-syntax (char-after))))
|
||||
(setq arg (1- arg))))
|
||||
|
||||
;; Aliases
|
||||
|
||||
(defun word-at-point ()
|
||||
|
|
12
nt/ChangeLog
12
nt/ChangeLog
|
@ -1,3 +1,15 @@
|
|||
2013-03-29 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* inc/ms-w32.h (copysign) [_MSC_VER]: Redirect to _copysign.
|
||||
|
||||
* config.nt (HAVE_COPYSIGN): Define.
|
||||
|
||||
2013-03-29 Juanma Barranquero <lekktu@gmail.com>
|
||||
|
||||
* config.nt: Sync with autogen/config.in.
|
||||
(HAVE_XKBGETKEYBOARD): Remove.
|
||||
(HAVE_XKB): New macro.
|
||||
|
||||
2013-03-27 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* makefile.w32-in (all-other-dirs-nmake, all-other-dirs-gmake)
|
||||
|
|
|
@ -251,7 +251,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
|
|||
#undef HAVE_COM_ERR_H
|
||||
|
||||
/* Define to 1 if you have the `copysign' function. */
|
||||
#undef HAVE_COPYSIGN
|
||||
#define HAVE_COPYSIGN 1
|
||||
|
||||
/* Define to 1 if data_start is the address of the start of the main data
|
||||
segment. */
|
||||
|
@ -1113,8 +1113,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
|
|||
/* Define to 1 if XIM is available */
|
||||
#undef HAVE_XIM
|
||||
|
||||
/* Define to 1 if you have the XkbGetKeyboard function. */
|
||||
#undef HAVE_XKBGETKEYBOARD
|
||||
/* Define to 1 if you have the Xkb extension. */
|
||||
#undef HAVE_XKB
|
||||
|
||||
/* Define to 1 if you have the Xpm library (-lXpm). */
|
||||
#undef HAVE_XPM
|
||||
|
|
|
@ -268,6 +268,7 @@ extern int sys_unlink (const char *);
|
|||
typedef int pid_t;
|
||||
#define snprintf _snprintf
|
||||
#define strtoll _strtoi64
|
||||
#define copysign _copysign
|
||||
#endif
|
||||
#define isatty _isatty
|
||||
#define _longjmp longjmp
|
||||
|
|
|
@ -1,3 +1,26 @@
|
|||
2013-03-29 Dmitry Antipov <dmantipov@yandex.ru>
|
||||
|
||||
* indent.c (current_column_bol_cache): Remove leftover which is not
|
||||
used in Fmove_to_column any more.
|
||||
(current_column, scan_for_column): Adjust users.
|
||||
* keyboard.c (last_point_position_buffer, last_point_position_window):
|
||||
Remove leftovers which are not used for recording undo any more.
|
||||
(command_loop_1, syms_of_keyboard): Adjust users.
|
||||
* xdisp.c (last_max_ascent): Remove leftover which is not used in
|
||||
redisplay_window any more.
|
||||
(move_it_to): Adjust user.
|
||||
|
||||
2013-03-29 Juanma Barranquero <lekktu@gmail.com>
|
||||
|
||||
* makefile.w32-in ($(BLD)/filelock.$(O), $(BLD)/filelock.$(O)):
|
||||
Update dependencies.
|
||||
|
||||
2013-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* lisp.h (save_type, XSAVE_POINTER, set_save_pointer, XSAVE_INTEGER)
|
||||
(set_save_integer, XSAVE_OBJECT, XSAVE_VALUE): Move to avoid
|
||||
forward references.
|
||||
|
||||
2013-03-28 Dmitry Antipov <dmantipov@yandex.ru>
|
||||
|
||||
* window.h (struct window): Replace hchild, vchild and buffer slots
|
||||
|
|
11
src/indent.c
11
src/indent.c
|
@ -56,11 +56,6 @@ static EMACS_INT last_known_column_modified;
|
|||
static ptrdiff_t current_column_1 (void);
|
||||
static ptrdiff_t position_indentation (ptrdiff_t);
|
||||
|
||||
/* Cache of beginning of line found by the last call of
|
||||
current_column. */
|
||||
|
||||
static ptrdiff_t current_column_bol_cache;
|
||||
|
||||
/* Get the display table to use for the current buffer. */
|
||||
|
||||
struct Lisp_Char_Table *
|
||||
|
@ -439,11 +434,6 @@ current_column (void)
|
|||
col += post_tab;
|
||||
}
|
||||
|
||||
if (ptr == BEGV_ADDR)
|
||||
current_column_bol_cache = BEGV;
|
||||
else
|
||||
current_column_bol_cache = BYTE_TO_CHAR (PTR_BYTE_POS (ptr));
|
||||
|
||||
last_known_column = col;
|
||||
last_known_column_point = PT;
|
||||
last_known_column_modified = MODIFF;
|
||||
|
@ -525,7 +515,6 @@ scan_for_column (ptrdiff_t *endpos, EMACS_INT *goalcol, ptrdiff_t *prevcol)
|
|||
{
|
||||
ptrdiff_t opoint = PT, opoint_byte = PT_BYTE;
|
||||
scan_newline (PT, PT_BYTE, BEGV, BEGV_BYTE, -1, 1);
|
||||
current_column_bol_cache = PT;
|
||||
scan = PT, scan_byte = PT_BYTE;
|
||||
SET_PT_BOTH (opoint, opoint_byte);
|
||||
next_boundary = scan;
|
||||
|
|
|
@ -210,12 +210,6 @@ static EMACS_INT last_auto_save;
|
|||
/* The value of point when the last command was started. */
|
||||
static ptrdiff_t last_point_position;
|
||||
|
||||
/* The buffer that was current when the last command was started. */
|
||||
static Lisp_Object last_point_position_buffer;
|
||||
|
||||
/* The window that was selected when the last command was started. */
|
||||
static Lisp_Object last_point_position_window;
|
||||
|
||||
/* The frame in which the last input event occurred, or Qmacro if the
|
||||
last event came from a macro. We use this to determine when to
|
||||
generate switch-frame events. This may be cleared by functions
|
||||
|
@ -1512,8 +1506,6 @@ command_loop_1 (void)
|
|||
prev_buffer = current_buffer;
|
||||
prev_modiff = MODIFF;
|
||||
last_point_position = PT;
|
||||
last_point_position_window = selected_window;
|
||||
XSETBUFFER (last_point_position_buffer, prev_buffer);
|
||||
|
||||
/* By default, we adjust point to a boundary of a region that
|
||||
has such a property that should be treated intangible
|
||||
|
@ -11047,9 +11039,6 @@ syms_of_keyboard (void)
|
|||
Fset (Qinput_method_exit_on_first_char, Qnil);
|
||||
Fset (Qinput_method_use_echo_area, Qnil);
|
||||
|
||||
last_point_position_buffer = Qnil;
|
||||
last_point_position_window = Qnil;
|
||||
|
||||
{
|
||||
int i;
|
||||
int len = sizeof (head_table) / sizeof (head_table[0]);
|
||||
|
|
113
src/lisp.h
113
src/lisp.h
|
@ -552,11 +552,6 @@ clip_to_bounds (ptrdiff_t lower, EMACS_INT num, ptrdiff_t upper)
|
|||
}
|
||||
|
||||
|
||||
/* Forward declarations. */
|
||||
|
||||
LISP_INLINE bool SAVE_VALUEP (Lisp_Object);
|
||||
LISP_INLINE struct Lisp_Save_Value *XSAVE_VALUE (Lisp_Object);
|
||||
|
||||
/* Extract a value or address from a Lisp_Object. */
|
||||
|
||||
#define XCONS(a) (eassert (CONSP (a)), \
|
||||
|
@ -1487,53 +1482,6 @@ struct Lisp_Save_Value
|
|||
} data[SAVE_VALUE_SLOTS];
|
||||
};
|
||||
|
||||
/* Return the type of V's Nth saved value. */
|
||||
LISP_INLINE int
|
||||
save_type (struct Lisp_Save_Value *v, int n)
|
||||
{
|
||||
eassert (0 <= n && n < SAVE_VALUE_SLOTS);
|
||||
return (v->save_type >> (SAVE_SLOT_BITS * n) & ((1 << SAVE_SLOT_BITS) - 1));
|
||||
}
|
||||
|
||||
/* Get and set the Nth saved pointer. */
|
||||
|
||||
LISP_INLINE void *
|
||||
XSAVE_POINTER (Lisp_Object obj, int n)
|
||||
{
|
||||
eassert (save_type (XSAVE_VALUE (obj), n) == SAVE_POINTER);
|
||||
return XSAVE_VALUE (obj)->data[n].pointer;;
|
||||
}
|
||||
LISP_INLINE void
|
||||
set_save_pointer (Lisp_Object obj, int n, void *val)
|
||||
{
|
||||
eassert (save_type (XSAVE_VALUE (obj), n) == SAVE_POINTER);
|
||||
XSAVE_VALUE (obj)->data[n].pointer = val;
|
||||
}
|
||||
|
||||
/* Likewise for the saved integer. */
|
||||
|
||||
LISP_INLINE ptrdiff_t
|
||||
XSAVE_INTEGER (Lisp_Object obj, int n)
|
||||
{
|
||||
eassert (save_type (XSAVE_VALUE (obj), n) == SAVE_INTEGER);
|
||||
return XSAVE_VALUE (obj)->data[n].integer;
|
||||
}
|
||||
LISP_INLINE void
|
||||
set_save_integer (Lisp_Object obj, int n, ptrdiff_t val)
|
||||
{
|
||||
eassert (save_type (XSAVE_VALUE (obj), n) == SAVE_INTEGER);
|
||||
XSAVE_VALUE (obj)->data[n].integer = val;
|
||||
}
|
||||
|
||||
/* Extract Nth saved object. */
|
||||
|
||||
LISP_INLINE Lisp_Object
|
||||
XSAVE_OBJECT (Lisp_Object obj, int n)
|
||||
{
|
||||
eassert (save_type (XSAVE_VALUE (obj), n) == SAVE_OBJECT);
|
||||
return XSAVE_VALUE (obj)->data[n].object;
|
||||
}
|
||||
|
||||
/* A miscellaneous object, when it's on the free list. */
|
||||
struct Lisp_Free
|
||||
{
|
||||
|
@ -1555,13 +1503,6 @@ union Lisp_Misc
|
|||
struct Lisp_Save_Value u_save_value;
|
||||
};
|
||||
|
||||
LISP_INLINE struct Lisp_Save_Value *
|
||||
XSAVE_VALUE (Lisp_Object a)
|
||||
{
|
||||
eassert (SAVE_VALUEP (a));
|
||||
return & XMISC (a)->u_save_value;
|
||||
}
|
||||
|
||||
/* Forwarding pointer to an int variable.
|
||||
This is allowed only in the value cell of a symbol,
|
||||
and it means that the symbol's value really lives in the
|
||||
|
@ -1854,6 +1795,60 @@ SAVE_VALUEP (Lisp_Object x)
|
|||
return MISCP (x) && XMISCTYPE (x) == Lisp_Misc_Save_Value;
|
||||
}
|
||||
|
||||
LISP_INLINE struct Lisp_Save_Value *
|
||||
XSAVE_VALUE (Lisp_Object a)
|
||||
{
|
||||
eassert (SAVE_VALUEP (a));
|
||||
return & XMISC (a)->u_save_value;
|
||||
}
|
||||
|
||||
/* Return the type of V's Nth saved value. */
|
||||
LISP_INLINE int
|
||||
save_type (struct Lisp_Save_Value *v, int n)
|
||||
{
|
||||
eassert (0 <= n && n < SAVE_VALUE_SLOTS);
|
||||
return (v->save_type >> (SAVE_SLOT_BITS * n) & ((1 << SAVE_SLOT_BITS) - 1));
|
||||
}
|
||||
|
||||
/* Get and set the Nth saved pointer. */
|
||||
|
||||
LISP_INLINE void *
|
||||
XSAVE_POINTER (Lisp_Object obj, int n)
|
||||
{
|
||||
eassert (save_type (XSAVE_VALUE (obj), n) == SAVE_POINTER);
|
||||
return XSAVE_VALUE (obj)->data[n].pointer;;
|
||||
}
|
||||
LISP_INLINE void
|
||||
set_save_pointer (Lisp_Object obj, int n, void *val)
|
||||
{
|
||||
eassert (save_type (XSAVE_VALUE (obj), n) == SAVE_POINTER);
|
||||
XSAVE_VALUE (obj)->data[n].pointer = val;
|
||||
}
|
||||
|
||||
/* Likewise for the saved integer. */
|
||||
|
||||
LISP_INLINE ptrdiff_t
|
||||
XSAVE_INTEGER (Lisp_Object obj, int n)
|
||||
{
|
||||
eassert (save_type (XSAVE_VALUE (obj), n) == SAVE_INTEGER);
|
||||
return XSAVE_VALUE (obj)->data[n].integer;
|
||||
}
|
||||
LISP_INLINE void
|
||||
set_save_integer (Lisp_Object obj, int n, ptrdiff_t val)
|
||||
{
|
||||
eassert (save_type (XSAVE_VALUE (obj), n) == SAVE_INTEGER);
|
||||
XSAVE_VALUE (obj)->data[n].integer = val;
|
||||
}
|
||||
|
||||
/* Extract Nth saved object. */
|
||||
|
||||
LISP_INLINE Lisp_Object
|
||||
XSAVE_OBJECT (Lisp_Object obj, int n)
|
||||
{
|
||||
eassert (save_type (XSAVE_VALUE (obj), n) == SAVE_OBJECT);
|
||||
return XSAVE_VALUE (obj)->data[n].object;
|
||||
}
|
||||
|
||||
#define AUTOLOADP(x) (CONSP (x) && EQ (Qautoload, XCAR (x)))
|
||||
|
||||
#define INTFWDP(x) (XFWDTYPE (x) == Lisp_Fwd_Int)
|
||||
|
|
|
@ -873,6 +873,7 @@ $(BLD)/filelock.$(O) : \
|
|||
$(CHARACTER_H) \
|
||||
$(CODING_H) \
|
||||
$(CONFIG_H) \
|
||||
$(C_CTYPE_H) \
|
||||
$(LISP_H) \
|
||||
$(SYSTIME_H)
|
||||
|
||||
|
@ -1398,6 +1399,7 @@ $(BLD)/sysdep.$(O) : \
|
|||
$(NT_INC)/netdb.h \
|
||||
$(NT_INC)/pwd.h \
|
||||
$(NT_INC)/sys/file.h \
|
||||
$(NT_INC)/sys/param.h \
|
||||
$(NT_INC)/sys/stat.h \
|
||||
$(NT_INC)/unistd.h \
|
||||
$(GNU_LIB)/execinfo.h \
|
||||
|
|
|
@ -580,7 +580,7 @@ static struct glyph scratch_glyphs[MAX_SCRATCH_GLYPHS];
|
|||
|
||||
/* Ascent and height of the last line processed by move_it_to. */
|
||||
|
||||
static int last_max_ascent, last_height;
|
||||
static int last_height;
|
||||
|
||||
/* Non-zero if there's a help-echo in the echo area. */
|
||||
|
||||
|
@ -8925,7 +8925,6 @@ move_it_to (struct it *it, ptrdiff_t to_charpos, int to_x, int to_y, int to_vpos
|
|||
it->current_y += it->max_ascent + it->max_descent;
|
||||
++it->vpos;
|
||||
last_height = it->max_ascent + it->max_descent;
|
||||
last_max_ascent = it->max_ascent;
|
||||
it->max_ascent = it->max_descent = 0;
|
||||
}
|
||||
|
||||
|
@ -8952,7 +8951,6 @@ move_it_to (struct it *it, ptrdiff_t to_charpos, int to_x, int to_y, int to_vpos
|
|||
it->current_y += it->max_ascent + it->max_descent;
|
||||
++it->vpos;
|
||||
last_height = it->max_ascent + it->max_descent;
|
||||
last_max_ascent = it->max_ascent;
|
||||
}
|
||||
|
||||
if (backup_data)
|
||||
|
|
Loading…
Add table
Reference in a new issue