mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-22 18:35:09 +00:00
(syntax-after): Undo last change.
This commit is contained in:
parent
abe0aa3e2a
commit
d8ac3d271c
@ -1,3 +1,17 @@
|
||||
2004-11-22 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* descr-text.el (describe-char):
|
||||
* paren.el (show-paren-function):
|
||||
* subr.el (syntax-after): Undo last change.
|
||||
|
||||
* progmodes/python.el (run-python): Don't hard code *Python*.
|
||||
Don't modify global process-environment.
|
||||
(python-send-region, python-load-file): Don't assume that
|
||||
python-buffer == (process-buffer (python-proc)).
|
||||
(python-switch-to-python): Simplify.
|
||||
|
||||
* dired.el (dired-align-file): Don't assume line starts with spaces.
|
||||
|
||||
2004-11-21 Jay Belanger <belanger@truman.edu>
|
||||
|
||||
* calc/calc-ext.el (math-read-big-expr, math-read-big-bigp):
|
||||
|
@ -1,6 +1,7 @@
|
||||
;;; descr-text.el --- describe text mode
|
||||
|
||||
;; Copyright (c) 1994, 95, 96, 2001, 02, 03, 04 Free Software Foundation, Inc.
|
||||
;; Copyright (c) 1994, 1995, 1996, 2001, 2002, 2003, 2004
|
||||
;; Free Software Foundation, Inc.
|
||||
|
||||
;; Author: Boris Goldowsky <boris@gnu.org>
|
||||
;; Keywords: faces
|
||||
@ -507,10 +508,7 @@ as well as widgets, buttons, overlays, and text properties."
|
||||
(format "%d" (nth 1 split))
|
||||
(format "%d %d" (nth 1 split) (nth 2 split)))))
|
||||
("syntax"
|
||||
,(let* ((st (if parse-sexp-lookup-properties
|
||||
(get-char-property pos 'syntax-table)))
|
||||
(syntax (if (consp st) st
|
||||
(aref (or st (syntax-table)) (char-after pos)))))
|
||||
,(let ((syntax (syntax-after pos)))
|
||||
(with-temp-buffer
|
||||
(internal-describe-syntax-value syntax)
|
||||
(buffer-string))))
|
||||
@ -687,5 +685,5 @@ as well as widgets, buttons, overlays, and text properties."
|
||||
|
||||
(provide 'descr-text)
|
||||
|
||||
;;; arch-tag: fc55a498-f3e9-4312-b5bd-98cc02480af1
|
||||
;; arch-tag: fc55a498-f3e9-4312-b5bd-98cc02480af1
|
||||
;;; descr-text.el ends here
|
||||
|
@ -1,6 +1,6 @@
|
||||
;;; paren.el --- highlight matching paren
|
||||
|
||||
;; Copyright (C) 1993, 1996, 2001 Free Software Foundation, Inc.
|
||||
;; Copyright (C) 1993, 1996, 2001, 2004 Free Software Foundation, Inc.
|
||||
|
||||
;; Author: rms@gnu.org
|
||||
;; Maintainer: FSF
|
||||
@ -139,8 +139,8 @@ in `show-paren-style' after `show-paren-delay' seconds of Emacs idle time."
|
||||
(defun show-paren-function ()
|
||||
(if show-paren-mode
|
||||
(let ((oldpos (point))
|
||||
(dir (cond ((eq (car (syntax-after (1- (point)))) ?\)) -1)
|
||||
((eq (car (syntax-after (point))) ?\() 1)))
|
||||
(dir (cond ((eq (car (syntax-after (1- (point)))) 5) -1)
|
||||
((eq (car (syntax-after (point))) 4) 1)))
|
||||
pos mismatch face)
|
||||
;;
|
||||
;; Find the other end of the sexp.
|
||||
@ -246,5 +246,5 @@ in `show-paren-style' after `show-paren-delay' seconds of Emacs idle time."
|
||||
|
||||
(provide 'paren)
|
||||
|
||||
;;; arch-tag: d0969b88-7ac0-4bd0-bd53-e73b892b86a9
|
||||
;; arch-tag: d0969b88-7ac0-4bd0-bd53-e73b892b86a9
|
||||
;;; paren.el ends here
|
||||
|
18
lisp/subr.el
18
lisp/subr.el
@ -2227,20 +2227,12 @@ from `standard-syntax-table' otherwise."
|
||||
table))
|
||||
|
||||
(defun syntax-after (pos)
|
||||
"Return the syntax of the char after POS.
|
||||
The value is either a syntax class character (a character that designates
|
||||
a syntax in `modify-syntax-entry'), or a cons cell
|
||||
of the form (CLASS . MATCH), where CLASS is the syntax class character
|
||||
and MATCH is the matching parenthesis."
|
||||
"Return the raw syntax of the char after POS."
|
||||
(unless (or (< pos (point-min)) (>= pos (point-max)))
|
||||
(let* ((st (if parse-sexp-lookup-properties
|
||||
(get-char-property pos 'syntax-table)))
|
||||
(value
|
||||
(if (consp st) st
|
||||
(aref (or st (syntax-table)) (char-after pos))))
|
||||
(code (if (consp value) (car value) value)))
|
||||
(setq code (aref "-.w_()'\"$\\/<>@!|" code))
|
||||
(if (consp value) (cons code (cdr value)) code))))
|
||||
(let ((st (if parse-sexp-lookup-properties
|
||||
(get-char-property pos 'syntax-table))))
|
||||
(if (consp st) st
|
||||
(aref (or st (syntax-table)) (char-after pos))))))
|
||||
|
||||
(defun add-to-invisibility-spec (arg)
|
||||
"Add elements to `buffer-invisibility-spec'.
|
||||
|
Loading…
Reference in New Issue
Block a user