aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/doc-view.el2
-rw-r--r--lisp/forms.el2
-rw-r--r--lisp/mail/rmail.el2
-rw-r--r--lisp/progmodes/cc-defs.el2
-rw-r--r--lisp/progmodes/ruby-mode.el4
-rw-r--r--lisp/progmodes/xref.el11
-rw-r--r--lisp/simple.el36
7 files changed, 33 insertions, 26 deletions
diff --git a/lisp/doc-view.el b/lisp/doc-view.el
index 9d912c3f6d9..223565cedb6 100644
--- a/lisp/doc-view.el
+++ b/lisp/doc-view.el
@@ -626,7 +626,7 @@ at the bottom edge of the page moves to the next page."
626 (image-bob) 626 (image-bob)
627 (image-bol 1)) 627 (image-bol 1))
628 (set-window-hscroll (selected-window) hscroll))) 628 (set-window-hscroll (selected-window) hscroll)))
629 (image-next-line 1))) 629 (image-next-line arg)))
630 630
631(defun doc-view-previous-line-or-previous-page (&optional arg) 631(defun doc-view-previous-line-or-previous-page (&optional arg)
632 "Scroll downward by ARG lines if possible, else goto previous page. 632 "Scroll downward by ARG lines if possible, else goto previous page.
diff --git a/lisp/forms.el b/lisp/forms.el
index c0b48fd3b63..b068352e6eb 100644
--- a/lisp/forms.el
+++ b/lisp/forms.el
@@ -593,7 +593,7 @@ Commands: Equivalent keys in read-only mode:
593 ;; set-visited-file-name from calling set-auto-mode, which 593 ;; set-visited-file-name from calling set-auto-mode, which
594 ;; might kill all local variables and set forms-file nil, 594 ;; might kill all local variables and set forms-file nil,
595 ;; which will then barf in find-file-noselect below. This can 595 ;; which will then barf in find-file-noselect below. This can
596 ;; hapen when the user sets the default major mode that is 596 ;; happen when the user sets the default major mode that is
597 ;; different from the Fundamental mode. 597 ;; different from the Fundamental mode.
598 (let (change-major-mode-with-file-name) 598 (let (change-major-mode-with-file-name)
599 (set-visited-file-name nil)) 599 (set-visited-file-name nil))
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index 5c2331aea48..734155e217d 100644
--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -4585,6 +4585,8 @@ Argument MIME is non-nil if this is a mime message."
4585 (list armor-start (- (point-max) after-end) mime 4585 (list armor-start (- (point-max) after-end) mime
4586 armor-end-regexp))) 4586 armor-end-regexp)))
4587 4587
4588(declare-function rmail-mime-entity-truncated "rmailmm" (entity))
4589
4588;; Should this have a key-binding, or be in a menu? 4590;; Should this have a key-binding, or be in a menu?
4589;; There doesn't really seem to be an appropriate menu. 4591;; There doesn't really seem to be an appropriate menu.
4590;; Eg the edit command is not in a menu either. 4592;; Eg the edit command is not in a menu either.
diff --git a/lisp/progmodes/cc-defs.el b/lisp/progmodes/cc-defs.el
index 7365f695f3b..ba15d7f13e0 100644
--- a/lisp/progmodes/cc-defs.el
+++ b/lisp/progmodes/cc-defs.el
@@ -1409,7 +1409,7 @@ been put there by c-put-char-property. POINT remains unchanged."
1409 (c-state-cache-good-pos c-state-cache-good-pos) 1409 (c-state-cache-good-pos c-state-cache-good-pos)
1410 ;(c-state-nonlit-pos-cache (copy-tree c-state-nonlit-pos-cache)) 1410 ;(c-state-nonlit-pos-cache (copy-tree c-state-nonlit-pos-cache))
1411 ;(c-state-nonlit-pos-cache-limit c-state-nonlit-pos-cache-limit) 1411 ;(c-state-nonlit-pos-cache-limit c-state-nonlit-pos-cache-limit)
1412 ;(c-state-semi-nonlit-pos-cache (copy-treec c-state-semi-nonlit-pos-cache)) 1412 ;(c-state-semi-nonlit-pos-cache (copy-tree c-state-semi-nonlit-pos-cache))
1413 ;(c-state-semi-nonlit-pos-cache-limit c-state-semi-nonlit-pos-cache) 1413 ;(c-state-semi-nonlit-pos-cache-limit c-state-semi-nonlit-pos-cache)
1414 (c-state-brace-pair-desert (copy-tree c-state-brace-pair-desert)) 1414 (c-state-brace-pair-desert (copy-tree c-state-brace-pair-desert))
1415 (c-state-point-min c-state-point-min) 1415 (c-state-point-min c-state-point-min)
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el
index 2389f742937..972bf99145e 100644
--- a/lisp/progmodes/ruby-mode.el
+++ b/lisp/progmodes/ruby-mode.el
@@ -2173,7 +2173,7 @@ See `font-lock-syntax-table'.")
2173 'font-lock-string-face))) 2173 'font-lock-string-face)))
2174 ;; Perl-ish keywords. 2174 ;; Perl-ish keywords.
2175 "\\_<\\(?:BEGIN\\|END\\)\\_>\\|^__END__$" 2175 "\\_<\\(?:BEGIN\\|END\\)\\_>\\|^__END__$"
2176 ;; Variables. 2176 ;; Singleton objects.
2177 (,(concat ruby-font-lock-keyword-beg-re 2177 (,(concat ruby-font-lock-keyword-beg-re
2178 "\\_<\\(nil\\|true\\|false\\)\\_>") 2178 "\\_<\\(nil\\|true\\|false\\)\\_>")
2179 1 font-lock-constant-face) 2179 1 font-lock-constant-face)
@@ -2181,7 +2181,7 @@ See `font-lock-syntax-table'.")
2181 ("\\_<__\\(?:LINE\\|ENCODING\\|FILE\\)__\\_>" 2181 ("\\_<__\\(?:LINE\\|ENCODING\\|FILE\\)__\\_>"
2182 (0 font-lock-builtin-face)) 2182 (0 font-lock-builtin-face))
2183 ;; Symbols. 2183 ;; Symbols.
2184 ("\\(^\\|[^:]\\)\\(:@?\\(?:\\w\\|_\\)+\\)\\([!?=]\\)?" 2184 ("\\(^\\|[^:]\\)\\(:@\\{0,2\\}\\(?:\\sw\\|\\s_\\)+\\)"
2185 (2 font-lock-constant-face) 2185 (2 font-lock-constant-face)
2186 (3 (unless (and (eq (char-before (match-end 3)) ?=) 2186 (3 (unless (and (eq (char-before (match-end 3)) ?=)
2187 (eq (char-after (match-end 3)) ?>)) 2187 (eq (char-after (match-end 3)) ?>))
diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el
index 69e6a154ae5..feed0fb36d9 100644
--- a/lisp/progmodes/xref.el
+++ b/lisp/progmodes/xref.el
@@ -436,6 +436,8 @@ If SELECT is non-nil, select the target window."
436;;; XREF buffer (part of the UI) 436;;; XREF buffer (part of the UI)
437 437
438;; The xref buffer is used to display a set of xrefs. 438;; The xref buffer is used to display a set of xrefs.
439(defconst xref-buffer-name "*xref*"
440 "The name of the buffer to show xrefs.")
439 441
440(defmacro xref--with-dedicated-window (&rest body) 442(defmacro xref--with-dedicated-window (&rest body)
441 `(let* ((xref-w (get-buffer-window xref-buffer-name)) 443 `(let* ((xref-w (get-buffer-window xref-buffer-name))
@@ -470,6 +472,9 @@ If SELECT is non-nil, select the target window."
470 (xref--show-pos-in-buf marker buf select)) 472 (xref--show-pos-in-buf marker buf select))
471 (user-error (message (error-message-string err))))) 473 (user-error (message (error-message-string err)))))
472 474
475(defvar-local xref--window nil
476 "The original window this xref buffer was created from.")
477
473(defun xref-show-location-at-point () 478(defun xref-show-location-at-point ()
474 "Display the source of xref at point in the appropriate window, if any." 479 "Display the source of xref at point in the appropriate window, if any."
475 (interactive) 480 (interactive)
@@ -500,9 +505,6 @@ If SELECT is non-nil, select the target window."
500 (back-to-indentation) 505 (back-to-indentation)
501 (get-text-property (point) 'xref-item))) 506 (get-text-property (point) 'xref-item)))
502 507
503(defvar-local xref--window nil
504 "The original window this xref buffer was created from.")
505
506(defun xref-goto-xref () 508(defun xref-goto-xref ()
507 "Jump to the xref on the current line and select its window." 509 "Jump to the xref on the current line and select its window."
508 (interactive) 510 (interactive)
@@ -624,9 +626,6 @@ references displayed in the current *xref* buffer."
624 (t 626 (t
625 (error "No %s xref" (if backward "previous" "next")))))) 627 (error "No %s xref" (if backward "previous" "next"))))))
626 628
627(defconst xref-buffer-name "*xref*"
628 "The name of the buffer to show xrefs.")
629
630(defvar xref--button-map 629(defvar xref--button-map
631 (let ((map (make-sparse-keymap))) 630 (let ((map (make-sparse-keymap)))
632 (define-key map [(control ?m)] #'xref-goto-xref) 631 (define-key map [(control ?m)] #'xref-goto-xref)
diff --git a/lisp/simple.el b/lisp/simple.el
index 1701eb0e0f3..971f6006732 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -408,15 +408,19 @@ A non-nil INTERACTIVE argument means to run the `post-self-insert-hook'."
408 (last-command-event ?\n) 408 (last-command-event ?\n)
409 ;; Don't auto-fill if we have a numeric argument. 409 ;; Don't auto-fill if we have a numeric argument.
410 (auto-fill-function (if arg nil auto-fill-function)) 410 (auto-fill-function (if arg nil auto-fill-function))
411 (arg (prefix-numeric-value arg))
411 (postproc 412 (postproc
412 ;; Do the rest in post-self-insert-hook, because we want to do it 413 ;; Do the rest in post-self-insert-hook, because we want to do it
413 ;; *before* other functions on that hook. 414 ;; *before* other functions on that hook.
414 (lambda () 415 (lambda ()
415 (cl-assert (eq ?\n (char-before))) 416 ;; We are not going to insert any newlines if arg is
417 ;; non-positive.
418 (or (and (numberp arg) (<= arg 0))
419 (cl-assert (eq ?\n (char-before))))
416 ;; Mark the newline(s) `hard'. 420 ;; Mark the newline(s) `hard'.
417 (if use-hard-newlines 421 (if use-hard-newlines
418 (set-hard-newline-properties 422 (set-hard-newline-properties
419 (- (point) (prefix-numeric-value arg)) (point))) 423 (- (point) arg) (point)))
420 ;; If the newline leaves the previous line blank, and we 424 ;; If the newline leaves the previous line blank, and we
421 ;; have a left margin, delete that from the blank line. 425 ;; have a left margin, delete that from the blank line.
422 (save-excursion 426 (save-excursion
@@ -433,19 +437,21 @@ A non-nil INTERACTIVE argument means to run the `post-self-insert-hook'."
433 (move-to-left-margin nil t))))) 437 (move-to-left-margin nil t)))))
434 (unwind-protect 438 (unwind-protect
435 (if (not interactive) 439 (if (not interactive)
436 ;; FIXME: For non-interactive uses, many calls actually just want 440 ;; FIXME: For non-interactive uses, many calls actually
437 ;; (insert "\n"), so maybe we should do just that, so as to avoid 441 ;; just want (insert "\n"), so maybe we should do just
438 ;; the risk of filling or running abbrevs unexpectedly. 442 ;; that, so as to avoid the risk of filling or running
439 (let ((post-self-insert-hook (list postproc))) 443 ;; abbrevs unexpectedly.
440 (self-insert-command (prefix-numeric-value arg))) 444 (let ((post-self-insert-hook (list postproc)))
441 (unwind-protect 445 (self-insert-command arg))
442 (progn 446 (unwind-protect
443 (add-hook 'post-self-insert-hook postproc nil t) 447 (progn
444 (self-insert-command (prefix-numeric-value arg))) 448 (add-hook 'post-self-insert-hook postproc nil t)
445 ;; We first used let-binding to protect the hook, but that was naive 449 (self-insert-command arg))
446 ;; since add-hook affects the symbol-default value of the variable, 450 ;; We first used let-binding to protect the hook, but that
447 ;; whereas the let-binding might only protect the buffer-local value. 451 ;; was naive since add-hook affects the symbol-default
448 (remove-hook 'post-self-insert-hook postproc t))) 452 ;; value of the variable, whereas the let-binding might
453 ;; only protect the buffer-local value.
454 (remove-hook 'post-self-insert-hook postproc t)))
449 (cl-assert (not (member postproc post-self-insert-hook))) 455 (cl-assert (not (member postproc post-self-insert-hook)))
450 (cl-assert (not (member postproc (default-value 'post-self-insert-hook)))))) 456 (cl-assert (not (member postproc (default-value 'post-self-insert-hook))))))
451 nil) 457 nil)