Merge remote-tracking branch 'origin/master' into feature/pgtk
This commit is contained in:
commit
47cd820d93
18 changed files with 290 additions and 242 deletions
|
@ -924,7 +924,11 @@ of the main Emacs process. This leaves the main Emacs process free to
|
|||
use while the compilation runs in the background. This is the method
|
||||
used by Emacs to natively-compile any Lisp file or byte-compiled Lisp
|
||||
file that is loaded into Emacs, when no natively-compiled file for it
|
||||
is available.
|
||||
is available. Note that because of this use of a subprocess, native
|
||||
compilation may produce warning and errors which byte-compilation does
|
||||
not, and lisp code may thus need to be modified to work correctly. See
|
||||
@code{native-comp-async-report-warnings-errors} in @pxref{Native-Compilation
|
||||
Variables} for more details.
|
||||
|
||||
@defun native-compile-async files &optional recursively load selector
|
||||
This function compiles the named @var{files} asynchronously. The
|
||||
|
@ -1038,6 +1042,12 @@ Emacs session in a buffer named @file{*Warnings*}. The default value
|
|||
@code{t} means display the resulting buffer. To log warnings without
|
||||
popping up the @file{*Warnings*} buffer, set this variable to
|
||||
@code{silent}.
|
||||
|
||||
A common cause for asynchronous native-compilation to produce
|
||||
warnings is compiling a file that is missing some @code{require} of a
|
||||
necessary feature. The feature may be loaded into the main emacs, but
|
||||
because native compilation always starts from a subprocess with a
|
||||
pristine environment, that may not be true for the subprocess.
|
||||
@end defopt
|
||||
|
||||
@defopt native-comp-async-query-on-exit
|
||||
|
|
17
etc/NEWS
17
etc/NEWS
|
@ -85,8 +85,8 @@ To get the old monospaced mode line back, customize the
|
|||
'mode-line-active' and 'mode-line-inactive' faces not to inherit from
|
||||
the 'variable-pitch' face, or add this to your "~/.emacs":
|
||||
|
||||
(set-face-attribute 'mode-line-active nil :inherit 'mode-line)
|
||||
(set-face-attribute 'mode-line-inactive nil :inherit 'mode-line)
|
||||
(set-face-attribute 'mode-line-active nil :inherit 'mode-line)
|
||||
(set-face-attribute 'mode-line-inactive nil :inherit 'mode-line)
|
||||
|
||||
|
||||
* Changes in Emacs 29.1
|
||||
|
@ -556,8 +556,8 @@ user options that are no longer needed are now obsolete:
|
|||
*** Navigation and marking commands now work in image display buffer.
|
||||
The following new bindings have been added:
|
||||
|
||||
n / SPC image-dired-display-previous-thumbnail-original
|
||||
p / DEL image-dired-display-next-thumbnail-original
|
||||
n / SPC image-dired-display-next-thumbnail-original
|
||||
p / DEL image-dired-display-previous-thumbnail-original
|
||||
m image-dired-mark-thumb-original-file
|
||||
d image-dired-flag-thumb-original-file
|
||||
u image-dired-unmark-thumb-original-file
|
||||
|
@ -610,6 +610,12 @@ The command 'bookmark-set' (bound to 'C-x r m') is now supported in
|
|||
the thumbnail view, and will create a bookmark that opens the current
|
||||
directory in Image-Dired.
|
||||
|
||||
---
|
||||
*** New user option 'image-dired-marking-shows-next'.
|
||||
If this option is non-nil (the default), marking, unmarking or
|
||||
flagging an image in either the thumbnail or display buffer shows the
|
||||
next image.
|
||||
|
||||
+++
|
||||
*** 'image-dired-show-all-from-dir-max-files' has been increased to 500.
|
||||
This option controls asking for confirmation when starting Image-Dired
|
||||
|
@ -718,10 +724,11 @@ Emacs buffers, like indentation and the like. The new ert function
|
|||
|
||||
* Incompatible Lisp Changes in Emacs 29.1
|
||||
|
||||
** User option 'mail-source-ignore-errors' is now obsolete
|
||||
** User option 'mail-source-ignore-errors' is now obsolete.
|
||||
The whole mechanism for prompting users to continue in case of
|
||||
mail-source errors has been removed, so this option is no longer
|
||||
needed.
|
||||
|
||||
** Fonts
|
||||
|
||||
---
|
||||
|
|
|
@ -1266,27 +1266,23 @@ calc-kill calc-kill-region calc-yank))))
|
|||
(math-normalize val)))))
|
||||
|
||||
|
||||
(defvar calc-help-map nil)
|
||||
|
||||
(if calc-help-map
|
||||
nil
|
||||
(setq calc-help-map (make-keymap))
|
||||
(define-key calc-help-map "b" 'calc-describe-bindings)
|
||||
(define-key calc-help-map "c" 'calc-describe-key-briefly)
|
||||
(define-key calc-help-map "f" 'calc-describe-function)
|
||||
(define-key calc-help-map "h" 'calc-full-help)
|
||||
(define-key calc-help-map "i" 'calc-info)
|
||||
(define-key calc-help-map "k" 'calc-describe-key)
|
||||
(define-key calc-help-map "n" 'calc-view-news)
|
||||
(define-key calc-help-map "s" 'calc-info-summary)
|
||||
(define-key calc-help-map "t" 'calc-tutorial)
|
||||
(define-key calc-help-map "v" 'calc-describe-variable)
|
||||
(define-key calc-help-map "\C-c" 'calc-describe-copying)
|
||||
(define-key calc-help-map "\C-d" 'calc-describe-distribution)
|
||||
(define-key calc-help-map "\C-n" 'calc-view-news)
|
||||
(define-key calc-help-map "\C-w" 'calc-describe-no-warranty)
|
||||
(define-key calc-help-map "?" 'calc-help-for-help)
|
||||
(define-key calc-help-map "\C-h" 'calc-help-for-help))
|
||||
(defvar-keymap calc-help-map
|
||||
"b" 'calc-describe-bindings
|
||||
"c" 'calc-describe-key-briefly
|
||||
"f" 'calc-describe-function
|
||||
"h" 'calc-full-help
|
||||
"i" 'calc-info
|
||||
"k" 'calc-describe-key
|
||||
"n" 'calc-view-news
|
||||
"s" 'calc-info-summary
|
||||
"t" 'calc-tutorial
|
||||
"v" 'calc-describe-variable
|
||||
"C-c" 'calc-describe-copying
|
||||
"C-d" 'calc-describe-distribution
|
||||
"C-n" 'calc-view-news
|
||||
"C-w" 'calc-describe-no-warranty
|
||||
"?" 'calc-help-for-help
|
||||
"C-h" 'calc-help-for-help)
|
||||
|
||||
(defvar calc-prefix-help-retry nil)
|
||||
(defvar calc-prefix-help-phase 0)
|
||||
|
|
|
@ -163,19 +163,19 @@
|
|||
tag (and (not val) 1))
|
||||
(message "Variable \"%s\" changed" (calc-var-name var)))))))
|
||||
|
||||
(defvar calc-var-name-map nil "Keymap for reading Calc variable names.")
|
||||
(if calc-var-name-map
|
||||
()
|
||||
(setq calc-var-name-map (copy-keymap minibuffer-local-completion-map))
|
||||
(define-key calc-var-name-map " " 'self-insert-command)
|
||||
(mapc (lambda (x)
|
||||
(define-key calc-var-name-map (char-to-string x)
|
||||
'calcVar-digit))
|
||||
"0123456789")
|
||||
(mapc (lambda (x)
|
||||
(define-key calc-var-name-map (char-to-string x)
|
||||
'calcVar-oper))
|
||||
"+-*/^|"))
|
||||
(defvar calc-var-name-map
|
||||
(let ((map (copy-keymap minibuffer-local-completion-map)))
|
||||
(define-key map " " #'self-insert-command)
|
||||
(mapc (lambda (x)
|
||||
(define-key map (char-to-string x)
|
||||
#'calcVar-digit))
|
||||
"0123456789")
|
||||
(mapc (lambda (x)
|
||||
(define-key map (char-to-string x)
|
||||
#'calcVar-oper))
|
||||
"+-*/^|")
|
||||
map)
|
||||
"Keymap for reading Calc variable names.")
|
||||
|
||||
(defvar calc-store-opers)
|
||||
|
||||
|
|
|
@ -992,12 +992,14 @@ prompted for the shell command to use interactively."
|
|||
|
||||
|
||||
(defun dired-check-process (msg program &rest arguments)
|
||||
"Display MSG while running PROGRAM, and check for output.
|
||||
Remaining arguments are strings passed as command arguments to PROGRAM.
|
||||
On error, insert output
|
||||
in a log buffer and return the offending ARGUMENTS or PROGRAM.
|
||||
Caller can cons up a list of failed args.
|
||||
Else returns nil for success."
|
||||
"Display MSG, then run PROGRAM, and log any error messages from it.
|
||||
ARGUMENTS should be strings to be passed to PROGRAM as command-line
|
||||
arguments.
|
||||
|
||||
If PROGRAM exits successfully, display \"MSG...done\" and return nil.
|
||||
If PROGRAM exits abnormally, save in `dired-log-buffer' the command
|
||||
that invoked PROGRAM and the messages it emitted, and return either
|
||||
the offending ARGUMENTS or PROGRAM if no ARGUMENTS were provided."
|
||||
(let (err-buffer err (dir default-directory))
|
||||
(message "%s..." msg)
|
||||
(save-excursion
|
||||
|
|
|
@ -1423,14 +1423,12 @@ Example:
|
|||
(setq slist (cdr slist)))
|
||||
(setcdr slist (cons elem (cdr slist))))))
|
||||
|
||||
(defvar shortdoc-mode-map
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(define-key map (kbd "n") 'shortdoc-next)
|
||||
(define-key map (kbd "p") 'shortdoc-previous)
|
||||
(define-key map (kbd "C-c C-n") 'shortdoc-next-section)
|
||||
(define-key map (kbd "C-c C-p") 'shortdoc-previous-section)
|
||||
map)
|
||||
"Keymap for `shortdoc-mode'.")
|
||||
(defvar-keymap shortdoc-mode-map
|
||||
:doc "Keymap for `shortdoc-mode'."
|
||||
"n" #'shortdoc-next
|
||||
"p" #'shortdoc-previous
|
||||
"C-c C-n" #'shortdoc-next-section
|
||||
"C-c C-p" #'shortdoc-previous-section)
|
||||
|
||||
(define-derived-mode shortdoc-mode special-mode "shortdoc"
|
||||
"Mode for shortdoc."
|
||||
|
|
|
@ -103,9 +103,6 @@
|
|||
;; TODO
|
||||
;; ====
|
||||
;;
|
||||
;; * Some sort of auto-rotate function based on rotate info in the
|
||||
;; EXIF data.
|
||||
;;
|
||||
;; * Investigate if it is possible to also write the tags to the image
|
||||
;; files.
|
||||
;;
|
||||
|
@ -114,12 +111,6 @@
|
|||
;;
|
||||
;; * From thumbs.el: Add setroot function.
|
||||
;;
|
||||
;; * From thumbs.el: Add image resizing, if useful (image-dired's automatic
|
||||
;; "image fit" might be enough)
|
||||
;;
|
||||
;; * From thumbs.el: Add the "modify" commands (emboss, negate,
|
||||
;; monochrome etc).
|
||||
;;
|
||||
;; * Add `image-dired-display-thumbs-ring' and functions to cycle that. Find out
|
||||
;; which is best, saving old batch just before inserting new, or
|
||||
;; saving the current batch in the ring when inserting it. Adding
|
||||
|
@ -499,6 +490,17 @@ variable is nil, it will never ask."
|
|||
(const :tag "Disable warning" nil))
|
||||
:version "29.1")
|
||||
|
||||
(defcustom image-dired-marking-shows-next t
|
||||
"If non-nil, marking, unmarking or flagging an image shows the next image.
|
||||
|
||||
This affects the following commands:
|
||||
\\<image-dired-thumbnail-mode-map>
|
||||
`image-dired-flag-thumb-original-file' (bound to \\[image-dired-flag-thumb-original-file])
|
||||
`image-dired-mark-thumb-original-file' (bound to \\[image-dired-mark-thumb-original-file])
|
||||
`image-dired-unmark-thumb-original-file' (bound to \\[image-dired-unmark-thumb-original-file])"
|
||||
:type 'boolean
|
||||
:version "29.1")
|
||||
|
||||
|
||||
;;; Util functions
|
||||
|
||||
|
@ -1468,46 +1470,53 @@ Should be called from commands in `image-dired-thumbnail-mode'."
|
|||
,@body
|
||||
(image-dired-thumb-update-marks))))))
|
||||
|
||||
(defmacro image-dired--do-mark-command (maybe-next &rest body)
|
||||
"Helper macro for the mark, unmark and flag commands.
|
||||
Run BODY in Dired buffer.
|
||||
If optional argument MAYBE-NEXT is non-nil, show next image
|
||||
according to `image-dired-marking-shows-next'."
|
||||
(declare (indent defun) (debug t))
|
||||
`(image-dired--with-thumbnail-buffer
|
||||
(image-dired--on-file-in-dired-buffer
|
||||
,@body)
|
||||
,(when maybe-next
|
||||
'(if image-dired-marking-shows-next
|
||||
(image-dired-display-next-thumbnail-original)
|
||||
(image-dired-next-line)))))
|
||||
|
||||
(defun image-dired-mark-thumb-original-file ()
|
||||
"Mark original image file in associated Dired buffer."
|
||||
(interactive nil image-dired-thumbnail-mode image-dired-display-image-mode)
|
||||
(image-dired--with-thumbnail-buffer
|
||||
(image-dired--on-file-in-dired-buffer
|
||||
(dired-mark 1))
|
||||
(image-dired-forward-image)))
|
||||
(image-dired--do-mark-command t
|
||||
(dired-mark 1)))
|
||||
|
||||
(defun image-dired-unmark-thumb-original-file ()
|
||||
"Unmark original image file in associated Dired buffer."
|
||||
(interactive nil image-dired-thumbnail-mode image-dired-display-image-mode)
|
||||
(image-dired--with-thumbnail-buffer
|
||||
(image-dired--on-file-in-dired-buffer
|
||||
(dired-unmark 1))
|
||||
(image-dired-forward-image)))
|
||||
(image-dired--do-mark-command t
|
||||
(dired-unmark 1)))
|
||||
|
||||
(defun image-dired-flag-thumb-original-file ()
|
||||
"Flag original image file for deletion in associated Dired buffer."
|
||||
(interactive nil image-dired-thumbnail-mode image-dired-display-image-mode)
|
||||
(image-dired--with-thumbnail-buffer
|
||||
(image-dired--on-file-in-dired-buffer
|
||||
(dired-flag-file-deletion 1))
|
||||
(image-dired-forward-image)))
|
||||
(image-dired--do-mark-command t
|
||||
(dired-flag-file-deletion 1)))
|
||||
|
||||
(defun image-dired-toggle-mark-thumb-original-file ()
|
||||
"Toggle mark on original image file in associated Dired buffer."
|
||||
(interactive nil image-dired-thumbnail-mode image-dired-display-image-mode)
|
||||
(image-dired--with-thumbnail-buffer
|
||||
(image-dired--on-file-in-dired-buffer
|
||||
(if (image-dired-dired-file-marked-p)
|
||||
(dired-unmark 1)
|
||||
(dired-mark 1)))))
|
||||
(image-dired--do-mark-command nil
|
||||
(if (image-dired-dired-file-marked-p)
|
||||
(dired-unmark 1)
|
||||
(dired-mark 1))))
|
||||
|
||||
(defun image-dired-unmark-all-marks ()
|
||||
"Remove all marks from all files in associated Dired buffer.
|
||||
Also update the marks in the thumbnail buffer."
|
||||
(interactive nil image-dired-thumbnail-mode image-dired-display-image-mode)
|
||||
(image-dired--do-mark-command nil
|
||||
(dired-unmark-all-marks))
|
||||
(image-dired--with-thumbnail-buffer
|
||||
(with-current-buffer (image-dired-associated-dired-buffer)
|
||||
(dired-unmark-all-marks))
|
||||
(image-dired-thumb-update-marks)))
|
||||
|
||||
(defun image-dired-jump-original-dired-buffer ()
|
||||
|
|
|
@ -1480,13 +1480,11 @@ argument says to read a file name and use that file as the inbox."
|
|||
(declare-function rmail-output-read-file-name "rmailout" ())
|
||||
(declare-function mail-send-and-exit "sendmail" (&optional arg))
|
||||
|
||||
(defvar rmail-summary-edit-map nil)
|
||||
(if rmail-summary-edit-map
|
||||
nil
|
||||
(setq rmail-summary-edit-map
|
||||
(nconc (make-sparse-keymap) text-mode-map))
|
||||
(define-key rmail-summary-edit-map "\C-c\C-c" 'rmail-cease-edit)
|
||||
(define-key rmail-summary-edit-map "\C-c\C-]" 'rmail-abort-edit))
|
||||
(defvar rmail-summary-edit-map
|
||||
(let ((map (nconc (make-sparse-keymap) text-mode-map)))
|
||||
(define-key map "\C-c\C-c" #'rmail-cease-edit)
|
||||
(define-key map "\C-c\C-]" #'rmail-abort-edit)
|
||||
map))
|
||||
|
||||
(defun rmail-summary-edit-current-message ()
|
||||
"Edit the contents of this message."
|
||||
|
|
147
lisp/mouse.el
147
lisp/mouse.el
|
@ -184,8 +184,8 @@ items `Turn Off' and `Help'."
|
|||
"-" " " (format "%S" minor-mode))))
|
||||
(turn-off menu-item "Turn off minor mode" ,mm-fun)
|
||||
(help menu-item "Help for minor mode"
|
||||
(lambda () (interactive)
|
||||
(describe-function ',mm-fun)))))))
|
||||
,(lambda () (interactive)
|
||||
(describe-function mm-fun)))))))
|
||||
(if menu
|
||||
(popup-menu menu)
|
||||
(message "No menu available")))))
|
||||
|
@ -271,7 +271,7 @@ not it is actually displayed."
|
|||
;; FIXME: We have a problem here: we have to use the global/local/minor
|
||||
;; so they're displayed in the expected order, but later on in the command
|
||||
;; loop, they're actually looked up in the opposite order.
|
||||
(apply 'append
|
||||
(apply #'append
|
||||
global-menu
|
||||
local-menu
|
||||
minor-mode-menus)))
|
||||
|
@ -524,8 +524,8 @@ Some context functions add menu items below the separator."
|
|||
menu)
|
||||
|
||||
(defvar context-menu-entry
|
||||
`(menu-item ,(purecopy "Context Menu") ignore
|
||||
:filter (lambda (_) (context-menu-map)))
|
||||
`(menu-item ,(purecopy "Context Menu") ,(make-sparse-keymap)
|
||||
:filter ,(lambda (_) (context-menu-map)))
|
||||
"Menu item that creates the context menu and can be bound to a mouse key.")
|
||||
|
||||
(defvar context-menu-mode-map
|
||||
|
@ -546,7 +546,7 @@ Some context functions add menu items below the separator."
|
|||
|
||||
When Context Menu mode is enabled, clicking the mouse button down-mouse-3
|
||||
activates the menu whose contents depends on its surrounding context."
|
||||
:global t :group 'mouse)
|
||||
:global t)
|
||||
|
||||
(defun context-menu-open ()
|
||||
"Start key navigation of the context menu.
|
||||
|
@ -558,7 +558,7 @@ This is the keyboard interface to \\[context-menu-map]."
|
|||
(call-interactively map)
|
||||
(popup-menu map (point)))))
|
||||
|
||||
(global-set-key [S-f10] 'context-menu-open)
|
||||
(global-set-key [S-f10] #'context-menu-open)
|
||||
|
||||
(defun mark-thing-at-mouse (click thing)
|
||||
"Activate the region around THING found near the mouse CLICK."
|
||||
|
@ -613,7 +613,7 @@ This command must be bound to a mouse click."
|
|||
(or (eq frame oframe)
|
||||
(set-mouse-position (selected-frame) (1- (frame-width)) 0))))
|
||||
|
||||
(define-obsolete-function-alias 'mouse-tear-off-window 'tear-off-window "24.4")
|
||||
(define-obsolete-function-alias 'mouse-tear-off-window #'tear-off-window "24.4")
|
||||
(defun tear-off-window (click)
|
||||
"Delete the selected window, and create a new frame displaying its buffer."
|
||||
(interactive (list last-nonmenu-event))
|
||||
|
@ -689,7 +689,6 @@ must be one of the symbols `header', `mode', or `vertical'."
|
|||
;; previously sampled position. The difference of `position'
|
||||
;; and `last-position' determines the size change of WINDOW.
|
||||
(last-position position)
|
||||
(draggable t)
|
||||
posn-window growth dragged)
|
||||
;; Decide on whether we are allowed to track at all and whose
|
||||
;; window's edge we drag.
|
||||
|
@ -742,7 +741,7 @@ must be one of the symbols `header', `mode', or `vertical'."
|
|||
(setq dragged t)
|
||||
(adjust-window-trailing-edge window growth t t))
|
||||
(setq last-position position))
|
||||
(draggable
|
||||
(t
|
||||
;; Drag bottom edge of `window'.
|
||||
(setq start (event-start event))
|
||||
;; Set `posn-window' to the window where `event' was recorded.
|
||||
|
@ -1842,7 +1841,7 @@ If MODE is 2 then do the same for lines."
|
|||
event)))
|
||||
(setcar last new)
|
||||
(if (and (not (equal modifiers old-modifiers))
|
||||
(key-binding (apply 'vector events)))
|
||||
(key-binding (apply #'vector events)))
|
||||
t
|
||||
(setcar last event)
|
||||
nil)))
|
||||
|
@ -1896,12 +1895,12 @@ regardless of where you click."
|
|||
(setq mouse-selection-click-count 0)
|
||||
(yank arg))
|
||||
|
||||
(defun mouse-yank-primary (click)
|
||||
"Insert the primary selection at the position clicked on.
|
||||
(defun mouse-yank-primary (&optional event)
|
||||
"Insert the primary selection,
|
||||
Move point to the end of the inserted text, and set mark at
|
||||
beginning. If `mouse-yank-at-point' is non-nil, insert at point
|
||||
regardless of where you click."
|
||||
(interactive "e")
|
||||
otherwise insert it at the position of EVENT."
|
||||
(interactive (list last-nonmenu-event))
|
||||
;; Give temporary modes such as isearch a chance to turn off.
|
||||
(run-hooks 'mouse-leave-buffer-hook)
|
||||
;; Without this, confusing things happen upon e.g. inserting into
|
||||
|
@ -1909,7 +1908,7 @@ regardless of where you click."
|
|||
(when select-active-regions
|
||||
(let (select-active-regions)
|
||||
(deactivate-mark)))
|
||||
(or mouse-yank-at-point (mouse-set-point click))
|
||||
(or mouse-yank-at-point (mouse-set-point event))
|
||||
(let ((primary (gui-get-primary-selection)))
|
||||
(push-mark)
|
||||
(insert-for-yank primary)))
|
||||
|
@ -2049,11 +2048,11 @@ if `mouse-drag-copy-region' is non-nil)."
|
|||
(setq mouse-save-then-kill-posn click-pt)))))
|
||||
|
||||
|
||||
(global-set-key [M-mouse-1] 'mouse-start-secondary)
|
||||
(global-set-key [M-drag-mouse-1] 'mouse-set-secondary)
|
||||
(global-set-key [M-down-mouse-1] 'mouse-drag-secondary)
|
||||
(global-set-key [M-mouse-3] 'mouse-secondary-save-then-kill)
|
||||
(global-set-key [M-mouse-2] 'mouse-yank-secondary)
|
||||
(global-set-key [M-mouse-1] #'mouse-start-secondary)
|
||||
(global-set-key [M-drag-mouse-1] #'mouse-set-secondary)
|
||||
(global-set-key [M-down-mouse-1] #'mouse-drag-secondary)
|
||||
(global-set-key [M-mouse-3] #'mouse-secondary-save-then-kill)
|
||||
(global-set-key [M-mouse-2] #'mouse-yank-secondary)
|
||||
|
||||
(defconst mouse-secondary-overlay
|
||||
(let ((ol (make-overlay (point-min) (point-min))))
|
||||
|
@ -3213,78 +3212,78 @@ is copied instead of being cut."
|
|||
|
||||
;;; Bindings for mouse commands.
|
||||
|
||||
(global-set-key [down-mouse-1] 'mouse-drag-region)
|
||||
(global-set-key [mouse-1] 'mouse-set-point)
|
||||
(global-set-key [drag-mouse-1] 'mouse-set-region)
|
||||
(global-set-key [down-mouse-1] #'mouse-drag-region)
|
||||
(global-set-key [mouse-1] #'mouse-set-point)
|
||||
(global-set-key [drag-mouse-1] #'mouse-set-region)
|
||||
|
||||
(defun mouse--strip-first-event (_prompt)
|
||||
(substring (this-single-command-raw-keys) 1))
|
||||
|
||||
(define-key function-key-map [left-fringe mouse-1] 'mouse--strip-first-event)
|
||||
(define-key function-key-map [right-fringe mouse-1] 'mouse--strip-first-event)
|
||||
(define-key function-key-map [left-fringe mouse-1] #'mouse--strip-first-event)
|
||||
(define-key function-key-map [right-fringe mouse-1] #'mouse--strip-first-event)
|
||||
|
||||
(global-set-key [mouse-2] 'mouse-yank-primary)
|
||||
(global-set-key [mouse-2] #'mouse-yank-primary)
|
||||
;; Allow yanking also when the corresponding cursor is "in the fringe".
|
||||
(define-key function-key-map [right-fringe mouse-2] 'mouse--strip-first-event)
|
||||
(define-key function-key-map [left-fringe mouse-2] 'mouse--strip-first-event)
|
||||
(global-set-key [mouse-3] 'mouse-save-then-kill)
|
||||
(define-key function-key-map [right-fringe mouse-3] 'mouse--strip-first-event)
|
||||
(define-key function-key-map [left-fringe mouse-3] 'mouse--strip-first-event)
|
||||
(define-key function-key-map [right-fringe mouse-2] #'mouse--strip-first-event)
|
||||
(define-key function-key-map [left-fringe mouse-2] #'mouse--strip-first-event)
|
||||
(global-set-key [mouse-3] #'mouse-save-then-kill)
|
||||
(define-key function-key-map [right-fringe mouse-3] #'mouse--strip-first-event)
|
||||
(define-key function-key-map [left-fringe mouse-3] #'mouse--strip-first-event)
|
||||
|
||||
;; By binding these to down-going events, we let the user use the up-going
|
||||
;; event to make the selection, saving a click.
|
||||
(global-set-key [C-down-mouse-1] 'mouse-buffer-menu)
|
||||
(global-set-key [C-down-mouse-1] #'mouse-buffer-menu)
|
||||
(if (not (eq system-type 'ms-dos))
|
||||
(global-set-key [S-down-mouse-1] 'mouse-appearance-menu))
|
||||
(global-set-key [S-down-mouse-1] #'mouse-appearance-menu))
|
||||
;; C-down-mouse-2 is bound in facemenu.el.
|
||||
(global-set-key [C-down-mouse-3]
|
||||
`(menu-item ,(purecopy "Menu Bar") ignore
|
||||
:filter (lambda (_)
|
||||
(if (zerop (or (frame-parameter nil 'menu-bar-lines) 0))
|
||||
(mouse-menu-bar-map)
|
||||
(mouse-menu-major-mode-map)))))
|
||||
:filter ,(lambda (_)
|
||||
(if (zerop (or (frame-parameter nil 'menu-bar-lines) 0))
|
||||
(mouse-menu-bar-map)
|
||||
(mouse-menu-major-mode-map)))))
|
||||
|
||||
;; Binding mouse-1 to mouse-select-window when on mode-, header-, or
|
||||
;; vertical-line prevents Emacs from signaling an error when the mouse
|
||||
;; button is released after dragging these lines, on non-toolkit
|
||||
;; versions.
|
||||
(global-set-key [header-line down-mouse-1] 'mouse-drag-header-line)
|
||||
(global-set-key [header-line mouse-1] 'mouse-select-window)
|
||||
(global-set-key [tab-line down-mouse-1] 'mouse-drag-tab-line)
|
||||
(global-set-key [tab-line mouse-1] 'mouse-select-window)
|
||||
(global-set-key [header-line down-mouse-1] #'mouse-drag-header-line)
|
||||
(global-set-key [header-line mouse-1] #'mouse-select-window)
|
||||
(global-set-key [tab-line down-mouse-1] #'mouse-drag-tab-line)
|
||||
(global-set-key [tab-line mouse-1] #'mouse-select-window)
|
||||
;; (global-set-key [mode-line drag-mouse-1] 'mouse-select-window)
|
||||
(global-set-key [mode-line down-mouse-1] 'mouse-drag-mode-line)
|
||||
(global-set-key [mode-line mouse-1] 'mouse-select-window)
|
||||
(global-set-key [mode-line mouse-2] 'mouse-delete-other-windows)
|
||||
(global-set-key [mode-line mouse-3] 'mouse-delete-window)
|
||||
(global-set-key [mode-line C-mouse-2] 'mouse-split-window-horizontally)
|
||||
(global-set-key [vertical-scroll-bar C-mouse-2] 'mouse-split-window-vertically)
|
||||
(global-set-key [horizontal-scroll-bar C-mouse-2] 'mouse-split-window-horizontally)
|
||||
(global-set-key [vertical-line down-mouse-1] 'mouse-drag-vertical-line)
|
||||
(global-set-key [vertical-line mouse-1] 'mouse-select-window)
|
||||
(global-set-key [vertical-line C-mouse-2] 'mouse-split-window-vertically)
|
||||
(global-set-key [right-divider down-mouse-1] 'mouse-drag-vertical-line)
|
||||
(global-set-key [right-divider mouse-1] 'ignore)
|
||||
(global-set-key [right-divider C-mouse-2] 'mouse-split-window-vertically)
|
||||
(global-set-key [bottom-divider down-mouse-1] 'mouse-drag-mode-line)
|
||||
(global-set-key [bottom-divider mouse-1] 'ignore)
|
||||
(global-set-key [bottom-divider C-mouse-2] 'mouse-split-window-horizontally)
|
||||
(global-set-key [left-edge down-mouse-1] 'mouse-drag-left-edge)
|
||||
(global-set-key [left-edge mouse-1] 'ignore)
|
||||
(global-set-key [top-left-corner down-mouse-1] 'mouse-drag-top-left-corner)
|
||||
(global-set-key [top-left-corner mouse-1] 'ignore)
|
||||
(global-set-key [top-edge down-mouse-1] 'mouse-drag-top-edge)
|
||||
(global-set-key [top-edge mouse-1] 'ignore)
|
||||
(global-set-key [top-right-corner down-mouse-1] 'mouse-drag-top-right-corner)
|
||||
(global-set-key [top-right-corner mouse-1] 'ignore)
|
||||
(global-set-key [right-edge down-mouse-1] 'mouse-drag-right-edge)
|
||||
(global-set-key [right-edge mouse-1] 'ignore)
|
||||
(global-set-key [bottom-right-corner down-mouse-1] 'mouse-drag-bottom-right-corner)
|
||||
(global-set-key [bottom-right-corner mouse-1] 'ignore)
|
||||
(global-set-key [bottom-edge down-mouse-1] 'mouse-drag-bottom-edge)
|
||||
(global-set-key [bottom-edge mouse-1] 'ignore)
|
||||
(global-set-key [bottom-left-corner down-mouse-1] 'mouse-drag-bottom-left-corner)
|
||||
(global-set-key [bottom-left-corner mouse-1] 'ignore)
|
||||
(global-set-key [mode-line down-mouse-1] #'mouse-drag-mode-line)
|
||||
(global-set-key [mode-line mouse-1] #'mouse-select-window)
|
||||
(global-set-key [mode-line mouse-2] #'mouse-delete-other-windows)
|
||||
(global-set-key [mode-line mouse-3] #'mouse-delete-window)
|
||||
(global-set-key [mode-line C-mouse-2] #'mouse-split-window-horizontally)
|
||||
(global-set-key [vertical-scroll-bar C-mouse-2] #'mouse-split-window-vertically)
|
||||
(global-set-key [horizontal-scroll-bar C-mouse-2] #'mouse-split-window-horizontally)
|
||||
(global-set-key [vertical-line down-mouse-1] #'mouse-drag-vertical-line)
|
||||
(global-set-key [vertical-line mouse-1] #'mouse-select-window)
|
||||
(global-set-key [vertical-line C-mouse-2] #'mouse-split-window-vertically)
|
||||
(global-set-key [right-divider down-mouse-1] #'mouse-drag-vertical-line)
|
||||
(global-set-key [right-divider mouse-1] #'ignore)
|
||||
(global-set-key [right-divider C-mouse-2] #'mouse-split-window-vertically)
|
||||
(global-set-key [bottom-divider down-mouse-1] #'mouse-drag-mode-line)
|
||||
(global-set-key [bottom-divider mouse-1] #'ignore)
|
||||
(global-set-key [bottom-divider C-mouse-2] #'mouse-split-window-horizontally)
|
||||
(global-set-key [left-edge down-mouse-1] #'mouse-drag-left-edge)
|
||||
(global-set-key [left-edge mouse-1] #'ignore)
|
||||
(global-set-key [top-left-corner down-mouse-1] #'mouse-drag-top-left-corner)
|
||||
(global-set-key [top-left-corner mouse-1] #'ignore)
|
||||
(global-set-key [top-edge down-mouse-1] #'mouse-drag-top-edge)
|
||||
(global-set-key [top-edge mouse-1] #'ignore)
|
||||
(global-set-key [top-right-corner down-mouse-1] #'mouse-drag-top-right-corner)
|
||||
(global-set-key [top-right-corner mouse-1] #'ignore)
|
||||
(global-set-key [right-edge down-mouse-1] #'mouse-drag-right-edge)
|
||||
(global-set-key [right-edge mouse-1] #'ignore)
|
||||
(global-set-key [bottom-right-corner down-mouse-1] #'mouse-drag-bottom-right-corner)
|
||||
(global-set-key [bottom-right-corner mouse-1] #'ignore)
|
||||
(global-set-key [bottom-edge down-mouse-1] #'mouse-drag-bottom-edge)
|
||||
(global-set-key [bottom-edge mouse-1] #'ignore)
|
||||
(global-set-key [bottom-left-corner down-mouse-1] #'mouse-drag-bottom-left-corner)
|
||||
(global-set-key [bottom-left-corner mouse-1] #'ignore)
|
||||
|
||||
(provide 'mouse)
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
;; browse-url-firefox Firefox Don't know (tried with 1.0.1)
|
||||
;; browse-url-chrome Chrome 47.0.2526.111
|
||||
;; browse-url-chromium Chromium 3.0
|
||||
;; browse-url-epiphany Epiphany Don't know
|
||||
;; browse-url-epiphany GNOME Web (Epiphany) Don't know
|
||||
;; browse-url-webpositive WebPositive 1.2-alpha (Haiku R1/beta3)
|
||||
;; browse-url-w3 w3 0
|
||||
;; browse-url-text-* Any text browser 0
|
||||
|
@ -156,7 +156,7 @@
|
|||
(function-item :tag "Firefox" :value browse-url-firefox)
|
||||
(function-item :tag "Google Chrome" :value browse-url-chrome)
|
||||
(function-item :tag "Chromium" :value browse-url-chromium)
|
||||
(function-item :tag "Epiphany" :value browse-url-epiphany)
|
||||
(function-item :tag "GNOME Web (Epiphany)" :value browse-url-epiphany)
|
||||
(function-item :tag "WebPositive" :value browse-url-webpositive)
|
||||
(function-item :tag "Text browser in an xterm window"
|
||||
:value browse-url-text-xterm)
|
||||
|
@ -305,15 +305,15 @@ Defaults to the value of `browse-url-firefox-arguments' at the time
|
|||
:version "24.1")
|
||||
|
||||
(defcustom browse-url-epiphany-program "epiphany"
|
||||
"The name by which to invoke Epiphany."
|
||||
"The name by which to invoke GNOME Web (Epiphany)."
|
||||
:type 'string)
|
||||
|
||||
(defcustom browse-url-epiphany-arguments nil
|
||||
"A list of strings to pass to Epiphany as arguments."
|
||||
"A list of strings to pass to GNOME Web (Epiphany) as arguments."
|
||||
:type '(repeat (string :tag "Argument")))
|
||||
|
||||
(defcustom browse-url-epiphany-startup-arguments browse-url-epiphany-arguments
|
||||
"A list of strings to pass to Epiphany when it starts up.
|
||||
"A list of strings to pass to GNOME Web (Epiphany) when it starts up.
|
||||
Defaults to the value of `browse-url-epiphany-arguments' at the time
|
||||
`browse-url' is loaded."
|
||||
:type '(repeat (string :tag "Argument")))
|
||||
|
@ -1140,12 +1140,12 @@ The optional argument NEW-WINDOW is not used."
|
|||
(function-put 'browse-url-chrome 'browse-url-browser-kind 'external)
|
||||
|
||||
(defun browse-url-epiphany (url &optional new-window)
|
||||
"Ask the Epiphany WWW browser to load URL.
|
||||
"Ask the GNOME Web (Epiphany) WWW browser to load URL.
|
||||
Default to the URL around or before point. The strings in variable
|
||||
`browse-url-galeon-arguments' are also passed to Epiphany.
|
||||
`browse-url-epiphany-arguments' are also passed to GNOME Web.
|
||||
|
||||
When called interactively, if variable `browse-url-new-window-flag' is
|
||||
non-nil, load the document in a new Epiphany window, otherwise use a
|
||||
non-nil, load the document in a new GNOME Web window, otherwise use a
|
||||
random existing one. A non-nil interactive prefix argument reverses
|
||||
the effect of `browse-url-new-window-flag'.
|
||||
|
||||
|
@ -1177,10 +1177,10 @@ used instead of `browse-url-new-window-flag'."
|
|||
(function-put 'browse-url-epiphany 'browse-url-browser-kind 'external)
|
||||
|
||||
(defun browse-url-epiphany-sentinel (process url)
|
||||
"Handle a change to the process communicating with Epiphany."
|
||||
"Handle a change to the process communicating with GNOME Web (Epiphany)."
|
||||
(or (eq (process-exit-status process) 0)
|
||||
(let* ((process-environment (browse-url-process-environment)))
|
||||
;; Epiphany is not running - start it
|
||||
;; GNOME Web is not running - start it
|
||||
(message "Starting %s..." browse-url-epiphany-program)
|
||||
(apply #'start-process (concat "epiphany " url) nil
|
||||
browse-url-epiphany-program
|
||||
|
|
|
@ -1204,8 +1204,7 @@ URL `http://www.atompub.org/2005/08/17/draft-ietf-atompub-format-11.html'"
|
|||
Return value as well as arguments NAME, TIME, and TOPNODE are the
|
||||
same as in `newsticker--parse-atom-1.0'.
|
||||
|
||||
For the RSS 0.91 specification see URL `http://backend.userland.com/rss091'
|
||||
or URL `http://my.netscape.com/publish/formats/rss-spec-0.91.html'."
|
||||
For the RSS 0.91 specification see URL `http://backend.userland.com/rss091'."
|
||||
(newsticker--debug-msg "Parsing RSS 0.91 feed %s" name)
|
||||
(let* ((channelnode (car (xml-get-children topnode 'channel)))
|
||||
is-new-feed has-new-items)
|
||||
|
|
|
@ -43,8 +43,7 @@
|
|||
;; are contained in "RSS" (RDF Site Summary) or "Atom" files. Newsticker
|
||||
;; should work with the following RSS formats:
|
||||
;; * RSS 0.91
|
||||
;; (see http://backend.userland.com/rss091 or
|
||||
;; http://my.netscape.com/publish/formats/rss-spec-0.91.html)
|
||||
;; (see http://backend.userland.com/rss091)
|
||||
;; * RSS 0.92
|
||||
;; (see http://backend.userland.com/rss092)
|
||||
;; * RSS 1.0
|
||||
|
|
|
@ -141,17 +141,17 @@ Nil means to not interpolate such scrolls."
|
|||
number)
|
||||
:version "29.1")
|
||||
|
||||
(defcustom pixel-scroll-precision-interpolation-total-time 0.01
|
||||
(defcustom pixel-scroll-precision-interpolation-total-time 0.1
|
||||
"The total time in seconds to spend interpolating a large scroll."
|
||||
:group 'mouse
|
||||
:type 'float
|
||||
:version 29.1)
|
||||
:version "29.1")
|
||||
|
||||
(defcustom pixel-scroll-precision-interpolation-factor 2.0
|
||||
(defcustom pixel-scroll-precision-interpolation-factor 4.0
|
||||
"A factor to apply to the distance of an interpolated scroll."
|
||||
:group 'mouse
|
||||
:type 'float
|
||||
:version 29.1)
|
||||
:version "29.1")
|
||||
|
||||
(defun pixel-scroll-in-rush-p ()
|
||||
"Return non-nil if next scroll should be non-smooth.
|
||||
|
@ -544,20 +544,43 @@ animation."
|
|||
(let ((percentage 0)
|
||||
(total-time pixel-scroll-precision-interpolation-total-time)
|
||||
(factor pixel-scroll-precision-interpolation-factor)
|
||||
(last-time (float-time))
|
||||
(time-elapsed 0.0)
|
||||
(between-scroll 0.001))
|
||||
(while (< percentage 1)
|
||||
(sit-for between-scroll)
|
||||
(setq time-elapsed (+ time-elapsed between-scroll)
|
||||
percentage (/ time-elapsed total-time))
|
||||
(if (< delta 0)
|
||||
(pixel-scroll-precision-scroll-down
|
||||
(ceiling (abs (* (* delta factor)
|
||||
(/ between-scroll total-time)))))
|
||||
(pixel-scroll-precision-scroll-up
|
||||
(ceiling (* (* delta factor)
|
||||
(/ between-scroll total-time)))))
|
||||
(redisplay t))))
|
||||
(between-scroll 0.001)
|
||||
(rem (window-parameter nil 'interpolated-scroll-remainder))
|
||||
(time (window-parameter nil 'interpolated-scroll-remainder-time)))
|
||||
(when (and rem time
|
||||
(< (- (float-time) time) 1.0)
|
||||
(eq (< delta 0) (< rem 0)))
|
||||
(setq delta (+ delta rem)))
|
||||
(while-no-input
|
||||
(unwind-protect
|
||||
(while (< percentage 1)
|
||||
(redisplay t)
|
||||
(sleep-for between-scroll)
|
||||
(setq time-elapsed (+ time-elapsed
|
||||
(- (float-time) last-time))
|
||||
percentage (/ time-elapsed total-time))
|
||||
(if (< delta 0)
|
||||
(pixel-scroll-precision-scroll-down
|
||||
(ceiling (abs (* (* delta factor)
|
||||
(/ between-scroll total-time)))))
|
||||
(pixel-scroll-precision-scroll-up
|
||||
(ceiling (* (* delta factor)
|
||||
(/ between-scroll total-time)))))
|
||||
(setq last-time (float-time)))
|
||||
(if (< percentage 1)
|
||||
(progn
|
||||
(set-window-parameter nil 'interpolated-scroll-remainder
|
||||
(* delta (- 1 percentage)))
|
||||
(set-window-parameter nil 'interpolated-scroll-remainder-time
|
||||
(float-time)))
|
||||
(set-window-parameter nil
|
||||
'interpolated-scroll-remainder
|
||||
nil)
|
||||
(set-window-parameter nil
|
||||
'interpolated-scroll-remainder-time
|
||||
nil))))))
|
||||
|
||||
(defun pixel-scroll-precision-scroll-up (delta)
|
||||
"Scroll the current window up by DELTA pixels."
|
||||
|
|
|
@ -4045,23 +4045,27 @@ NUMBER-OF-STATIC-VARIABLES:"
|
|||
(defvar ebrowse-global-map nil
|
||||
"Keymap for Ebrowse commands.")
|
||||
|
||||
|
||||
(defvar ebrowse-global-prefix-key "\C-c\C-m"
|
||||
"Prefix key for Ebrowse commands.")
|
||||
|
||||
(defvar-keymap ebrowse-global-submap-4
|
||||
:doc "Keymap used for `ebrowse-global-prefix' followed by `4'."
|
||||
"." #'ebrowse-tags-find-definition-other-window
|
||||
"f" #'ebrowse-tags-find-definition-other-window
|
||||
"v" #'ebrowse-tags-find-declaration-other-window
|
||||
"F" #'ebrowse-tags-view-definition-other-window
|
||||
"V" #'ebrowse-tags-view-declaration-other-window)
|
||||
|
||||
(defvar ebrowse-global-submap-4 nil
|
||||
"Keymap used for `ebrowse-global-prefix' followed by `4'.")
|
||||
|
||||
|
||||
(defvar ebrowse-global-submap-5 nil
|
||||
"Keymap used for `ebrowse-global-prefix' followed by `5'.")
|
||||
|
||||
(defvar-keymap ebrowse-global-submap-5
|
||||
:doc "Keymap used for `ebrowse-global-prefix' followed by `5'."
|
||||
"." #'ebrowse-tags-find-definition-other-frame
|
||||
"f" #'ebrowse-tags-find-definition-other-frame
|
||||
"v" #'ebrowse-tags-find-declaration-other-frame
|
||||
"F" #'ebrowse-tags-view-definition-other-frame
|
||||
"V" #'ebrowse-tags-view-declaration-other-frame)
|
||||
|
||||
(unless ebrowse-global-map
|
||||
(setq ebrowse-global-map (make-sparse-keymap))
|
||||
(setq ebrowse-global-submap-4 (make-sparse-keymap))
|
||||
(setq ebrowse-global-submap-5 (make-sparse-keymap))
|
||||
(define-key ebrowse-global-map "a" 'ebrowse-tags-apropos)
|
||||
(define-key ebrowse-global-map "b" 'ebrowse-pop-to-browser-buffer)
|
||||
(define-key ebrowse-global-map "-" 'ebrowse-back-in-position-stack)
|
||||
|
@ -4082,17 +4086,7 @@ NUMBER-OF-STATIC-VARIABLES:"
|
|||
(define-key ebrowse-global-map " " 'ebrowse-electric-buffer-list)
|
||||
(define-key ebrowse-global-map "\t" 'ebrowse-tags-complete-symbol)
|
||||
(define-key ebrowse-global-map "4" ebrowse-global-submap-4)
|
||||
(define-key ebrowse-global-submap-4 "." 'ebrowse-tags-find-definition-other-window)
|
||||
(define-key ebrowse-global-submap-4 "f" 'ebrowse-tags-find-definition-other-window)
|
||||
(define-key ebrowse-global-submap-4 "v" 'ebrowse-tags-find-declaration-other-window)
|
||||
(define-key ebrowse-global-submap-4 "F" 'ebrowse-tags-view-definition-other-window)
|
||||
(define-key ebrowse-global-submap-4 "V" 'ebrowse-tags-view-declaration-other-window)
|
||||
(define-key ebrowse-global-map "5" ebrowse-global-submap-5)
|
||||
(define-key ebrowse-global-submap-5 "." 'ebrowse-tags-find-definition-other-frame)
|
||||
(define-key ebrowse-global-submap-5 "f" 'ebrowse-tags-find-definition-other-frame)
|
||||
(define-key ebrowse-global-submap-5 "v" 'ebrowse-tags-find-declaration-other-frame)
|
||||
(define-key ebrowse-global-submap-5 "F" 'ebrowse-tags-view-definition-other-frame)
|
||||
(define-key ebrowse-global-submap-5 "V" 'ebrowse-tags-view-declaration-other-frame)
|
||||
(define-key global-map ebrowse-global-prefix-key ebrowse-global-map))
|
||||
|
||||
|
||||
|
|
|
@ -3694,27 +3694,21 @@ regular expression EXPR."
|
|||
|
||||
;;; BUFFER DISPLAY mode.
|
||||
;;
|
||||
(defvar speedbar-buffers-key-map nil
|
||||
(defvar speedbar-buffers-key-map
|
||||
(let ((map (speedbar-make-specialized-keymap)))
|
||||
;; Basic tree features
|
||||
(define-key map "e" #'speedbar-edit-line)
|
||||
(define-key map "\C-m" #'speedbar-edit-line)
|
||||
(define-key map "+" #'speedbar-expand-line)
|
||||
(define-key map "=" #'speedbar-expand-line)
|
||||
(define-key map "-" #'speedbar-contract-line)
|
||||
(define-key map " " #'speedbar-toggle-line-expansion)
|
||||
;; Buffer specific keybindings
|
||||
(define-key map "k" #'speedbar-buffer-kill-buffer)
|
||||
(define-key map "r" #'speedbar-buffer-revert-buffer)
|
||||
map)
|
||||
"Keymap used when in the buffers display mode.")
|
||||
|
||||
(if speedbar-buffers-key-map
|
||||
nil
|
||||
(setq speedbar-buffers-key-map (speedbar-make-specialized-keymap))
|
||||
|
||||
;; Basic tree features
|
||||
(define-key speedbar-buffers-key-map "e" 'speedbar-edit-line)
|
||||
(define-key speedbar-buffers-key-map "\C-m" 'speedbar-edit-line)
|
||||
(define-key speedbar-buffers-key-map "+" 'speedbar-expand-line)
|
||||
(define-key speedbar-buffers-key-map "=" 'speedbar-expand-line)
|
||||
(define-key speedbar-buffers-key-map "-" 'speedbar-contract-line)
|
||||
(define-key speedbar-buffers-key-map " " 'speedbar-toggle-line-expansion)
|
||||
|
||||
;; Buffer specific keybindings
|
||||
(define-key speedbar-buffers-key-map "k" 'speedbar-buffer-kill-buffer)
|
||||
(define-key speedbar-buffers-key-map "r" 'speedbar-buffer-revert-buffer)
|
||||
|
||||
)
|
||||
|
||||
(defvar speedbar-buffer-easymenu-definition
|
||||
'(["Jump to buffer" speedbar-edit-line t]
|
||||
["Expand File Tags" speedbar-expand-line
|
||||
|
|
|
@ -6658,8 +6658,10 @@ - (void)mouseDown: (NSEvent *)theEvent
|
|||
? ceil (fabs (delta)) : 1;
|
||||
|
||||
scrollUp = delta > 0;
|
||||
x = [theEvent scrollingDeltaX];
|
||||
y = [theEvent scrollingDeltaY];
|
||||
x = ([theEvent scrollingDeltaX]
|
||||
* FRAME_COLUMN_WIDTH (emacsframe));
|
||||
y = ([theEvent scrollingDeltaY]
|
||||
* FRAME_LINE_HEIGHT (emacsframe));
|
||||
}
|
||||
|
||||
if (lines == 0 && mwheel_coalesce_scroll_events)
|
||||
|
|
|
@ -668,13 +668,13 @@ collection clause."
|
|||
#'len))
|
||||
(`(function (lambda (,_ ,_) . ,_)) t))))
|
||||
|
||||
(with-suppressed-warnings ((lexical test) (lexical test1) (lexical test2))
|
||||
(defvar test)
|
||||
(defvar test1)
|
||||
(defvar test2))
|
||||
(ert-deftest cl-macs--progv ()
|
||||
(should (= (cl-progv '(test test) '(1 2) test) 2))
|
||||
(should (equal (cl-progv '(test1 test2) '(1 2) (list test1 test2))
|
||||
(defvar cl-macs--test)
|
||||
(defvar cl-macs--test1)
|
||||
(defvar cl-macs--test2)
|
||||
(should (= (cl-progv '(cl-macs--test cl-macs--test) '(1 2) cl-macs--test) 2))
|
||||
(should (equal (cl-progv '(cl-macs--test1 cl-macs--test2) '(1 2)
|
||||
(list cl-macs--test1 cl-macs--test2))
|
||||
'(1 2))))
|
||||
|
||||
;;; cl-macs-tests.el ends here
|
||||
|
|
|
@ -676,7 +676,7 @@
|
|||
(buffer-string))
|
||||
"foo\n")))
|
||||
|
||||
(ert-deftest test-add-display-text-property ()
|
||||
(ert-deftest subr-x-test-add-display-text-property ()
|
||||
(with-temp-buffer
|
||||
(insert "Foo bar zot gazonk")
|
||||
(add-display-text-property 4 8 'height 2.0)
|
||||
|
@ -694,5 +694,23 @@
|
|||
[(raise 0.5) (height 2.0)]))
|
||||
(should (equal (get-text-property 9 'display) '(raise 0.5)))))
|
||||
|
||||
(ert-deftest subr-x-named-let ()
|
||||
(let ((funs ()))
|
||||
(named-let loop
|
||||
((rest '(1 42 3))
|
||||
(sum 0))
|
||||
(when rest
|
||||
;; Here, we make sure that the variables are distinct in every
|
||||
;; iteration, since a naive tail-call optimization would tend to end up
|
||||
;; with a single `sum' variable being shared by all the closures.
|
||||
(push (lambda () sum) funs)
|
||||
;; Here we add a dummy `sum' variable which shadows the `sum' iteration
|
||||
;; variable since a naive tail-call optimization could also trip here
|
||||
;; thinking it can `(setq sum ...)' to set the iteration
|
||||
;; variable's value.
|
||||
(let ((sum sum))
|
||||
(loop (cdr rest) (+ sum (car rest))))))
|
||||
(should (equal (mapcar #'funcall funs) '(43 1 0)))))
|
||||
|
||||
(provide 'subr-x-tests)
|
||||
;;; subr-x-tests.el ends here
|
||||
|
|
Loading…
Add table
Reference in a new issue