From d8ac3d271c6ff4377b597006753df7dc074d1b55 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 22 Nov 2004 06:00:51 +0000 Subject: [PATCH] (syntax-after): Undo last change. --- lisp/ChangeLog | 14 ++++++++++++++ lisp/descr-text.el | 10 ++++------ lisp/paren.el | 8 ++++---- lisp/subr.el | 18 +++++------------- 4 files changed, 27 insertions(+), 23 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index de55e25b772..09af28a06d0 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,17 @@ +2004-11-22 Stefan Monnier + + * 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 * calc/calc-ext.el (math-read-big-expr, math-read-big-bigp): diff --git a/lisp/descr-text.el b/lisp/descr-text.el index 7dd6966a486..49b9b12154a 100644 --- a/lisp/descr-text.el +++ b/lisp/descr-text.el @@ -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 ;; 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 diff --git a/lisp/paren.el b/lisp/paren.el index 10695a41098..e654cc2cc10 100644 --- a/lisp/paren.el +++ b/lisp/paren.el @@ -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 diff --git a/lisp/subr.el b/lisp/subr.el index c8dfedbd8c6..b40c64c63eb 100644 --- a/lisp/subr.el +++ b/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'. -- 2.39.2