Using saved parent location: http://bzr.savannah.gnu.org/r/emacs/trunk/ Now on revision 100300. ------------------------------------------------------------ revno: 100300 committer: Eli Zaretskii branch nick: trunk timestamp: Sat 2010-05-15 09:25:23 +0300 message: Fix a typo in msdos/ChangeLog. diff: === modified file 'msdos/ChangeLog' --- msdos/ChangeLog 2010-05-15 01:55:24 +0000 +++ msdos/ChangeLog 2010-05-15 06:25:23 +0000 @@ -3,7 +3,7 @@ * sed1v2.inp (OLDXMENU_TARGET): Edit to empty. * sed1x.inp (OLDXMENU_TARGET): Edit to really-oldxmenu. - * sed1v2.inp (LIBXT_OTHER): Exit to empty. + * sed1v2.inp (LIBXT_OTHER): Edit to empty. 2010-05-14 Glenn Morris === modified file 'src/ChangeLog' --- src/ChangeLog 2010-05-15 01:55:24 +0000 +++ src/ChangeLog 2010-05-15 06:25:23 +0000 @@ -18,7 +18,7 @@ 2010-05-14 Eli Zaretskii Make the cache of bidi iterator states dynamically allocated. - (bidi_cache_shrink): New function. + * bidi.c (bidi_cache_shrink): New function. (bidi_init_it): Call it. (bidi_cache_iterator_state): Enlarge the cache if needed. ------------------------------------------------------------ revno: 100299 committer: Jay Belanger branch nick: trunk timestamp: Fri 2010-05-14 23:50:25 -0500 message: calc-aent.el (math-read-token, math-find-user-tokens): calc-lang.el (math-read-big-rec, math-lang-read-symbol) (math-compose-tex-func): calccomp.el (math-compose-expr): calc-ext.el (math-format-flat-expr-fancy): calc-store.el (calc-read-var-name): calc-units.el (calc-explain-units-rec): Allow Greek letters. calc.el (var-Ï€, var-φ, var-γ): New variables. calc-aent.el (math-read-replacement-list): Add "micro" symbol. calc-units.el (math-unit-prefixes): Add mu for micro. (math-standard-units): Add units. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-05-15 04:10:22 +0000 +++ lisp/ChangeLog 2010-05-15 04:50:25 +0000 @@ -1,3 +1,18 @@ +2010-05-15 Jay Belanger + + * calc/calc-aent.el (math-read-token, math-find-user-tokens): + * calc/calc-lang.el (math-read-big-rec, math-lang-read-symbol): + (math-compose-tex-func): + * calc/calccomp.el (math-compose-expr): + * calc/calc-ext.el (math-format-flat-expr-fancy): + * calc/calc-store.el (calc-read-var-name): + * calc/calc-units.el (calc-explain-units-rec): Allow Greek letters. + + * calc/calc.el (var-Ï€, var-φ, var-γ): New variables. + * calc/calc-aent.el (math-read-replacement-list): Add "micro" symbol. + * calc/calc-units.el (math-unit-prefixes): Add mu for micro. + (math-standard-units): Add units. + 2010-05-15 Stefan Monnier * progmodes/asm-mode.el (asm-mode): @@ -14,7 +29,7 @@ 2010-05-14 Jay Belanger - * calc-bin.el (math-format-twos-complement): Group digits when + * calc/calc-bin.el (math-format-twos-complement): Group digits when appropriate. 2010-05-14 Stefan Monnier === modified file 'lisp/calc/calc-aent.el' --- lisp/calc/calc-aent.el 2010-01-13 08:35:10 +0000 +++ lisp/calc/calc-aent.el 2010-05-15 04:50:25 +0000 @@ -510,6 +510,7 @@ ("≥" ">=") ("≦" "<=") ("≧" ">=") + ("µ" "μ") ;; fractions ("¼" "(1:4)") ; 1/4 ("½" "(1:2)") ; 1/2 @@ -675,11 +676,11 @@ (cond ((and (stringp (car p)) (or (> (length (car p)) 1) (equal (car p) "$") (equal (car p) "\"")) - (string-match "[^a-zA-Z0-9]" (car p))) + (string-match "[^a-zA-Zα-ωΑ-Ω0-9]" (car p))) (let ((s (regexp-quote (car p)))) - (if (string-match "\\`[a-zA-Z0-9]" s) + (if (string-match "\\`[a-zA-Zα-ωΑ-Ω0-9]" s) (setq s (concat "\\<" s))) - (if (string-match "[a-zA-Z0-9]\\'" s) + (if (string-match "[a-zA-Zα-ωΑ-Ω0-9]\\'" s) (setq s (concat s "\\>"))) (or (assoc s math-toks) (progn @@ -718,15 +719,17 @@ math-expr-data (math-match-substring math-exp-str 0) math-exp-pos (match-end 0))) ((or (and (>= ch ?a) (<= ch ?z)) - (and (>= ch ?A) (<= ch ?Z))) + (and (>= ch ?A) (<= ch ?Z)) + (and (>= ch ?α) (<= ch ?ω)) + (and (>= ch ?Α) (<= ch ?Ω))) (string-match (cond ((and (memq calc-language calc-lang-allow-underscores) (memq calc-language calc-lang-allow-percentsigns)) - "[a-zA-Z0-9_'#]*") + "[a-zA-Zα-ωΑ-Ω0-9_'#]*") ((memq calc-language calc-lang-allow-underscores) - "[a-zA-Z0-9_#]*") - (t "[a-zA-Z0-9'#]*")) + "[a-zA-Zα-ωΑ-Ω0-9_#]*") + (t "[a-zA-Zα-ωΑ-Ω0-9'#]*")) math-exp-str math-exp-pos) (setq math-exp-token 'symbol math-exp-pos (match-end 0) @@ -744,12 +747,12 @@ (or (eq math-exp-pos 0) (and (not (memq calc-language calc-lang-allow-underscores)) - (eq (string-match "[^])}\"a-zA-Z0-9'$]_" + (eq (string-match "[^])}\"a-zA-Zα-ωΑ-Ω0-9'$]_" math-exp-str (1- math-exp-pos)) (1- math-exp-pos)))))) (or (and (memq calc-language calc-lang-c-type-hex) (string-match "0[xX][0-9a-fA-F]+" math-exp-str math-exp-pos)) - (string-match "_?\\([0-9]+.?0*@ *\\)?\\([0-9]+.?0*' *\\)?\\(0*\\([2-9]\\|1[0-4]\\)\\(#[#]?\\|\\^\\^\\)[0-9a-dA-D.]+[eE][-+_]?[0-9]+\\|0*\\([2-9]\\|[0-2][0-9]\\|3[0-6]\\)\\(#[#]?\\|\\^\\^\\)[0-9a-zA-Z:.]+\\|[0-9]+:[0-9:]+\\|[0-9.]+\\([eE][-+_]?[0-9]+\\)?\"?\\)?" + (string-match "_?\\([0-9]+.?0*@ *\\)?\\([0-9]+.?0*' *\\)?\\(0*\\([2-9]\\|1[0-4]\\)\\(#[#]?\\|\\^\\^\\)[0-9a-dA-D.]+[eE][-+_]?[0-9]+\\|0*\\([2-9]\\|[0-2][0-9]\\|3[0-6]\\)\\(#[#]?\\|\\^\\^\\)[0-9a-zA-Zα-ωΑ-Ω:.]+\\|[0-9]+:[0-9:]+\\|[0-9.]+\\([eE][-+_]?[0-9]+\\)?\"?\\)?" math-exp-str math-exp-pos)) (setq math-exp-token 'number math-expr-data (math-match-substring math-exp-str 0) === modified file 'lisp/calc/calc-ext.el' --- lisp/calc/calc-ext.el 2010-04-17 02:47:25 +0000 +++ lisp/calc/calc-ext.el 2010-05-15 04:50:25 +0000 @@ -3283,7 +3283,7 @@ (concat "-" (math-format-flat-expr (nth 1 a) 1000))) (t (concat (math-remove-dashes - (if (string-match "\\`calcFunc-\\([a-zA-Z0-9']+\\)\\'" + (if (string-match "\\`calcFunc-\\([a-zA-Zα-ωΑ-Ω0-9']+\\)\\'" (symbol-name (car a))) (math-match-substring (symbol-name (car a)) 1) (symbol-name (car a)))) === modified file 'lisp/calc/calc-lang.el' --- lisp/calc/calc-lang.el 2010-01-13 08:35:10 +0000 +++ lisp/calc/calc-lang.el 2010-05-15 04:50:25 +0000 @@ -214,7 +214,7 @@ (put 'pascal 'math-lang-read-symbol '((?\$ (eq (string-match - "\\(\\$[0-9a-fA-F]+\\)\\($\\|[^0-9a-zA-Z]\\)" + "\\(\\$[0-9a-fA-F]+\\)\\($\\|[^0-9a-zA-Zα-ωΑ-Ω]\\)" math-exp-str math-exp-pos) math-exp-pos) (setq math-exp-token 'number @@ -312,7 +312,7 @@ (put 'fortran 'math-lang-read-symbol '((?\. - (eq (string-match "\\.[a-zA-Z][a-zA-Z][a-zA-Z]?\\." + (eq (string-match "\\.[a-zA-Zα-ωΑ-Ω][a-zA-Zα-ωΑ-Ω][a-zA-Zα-ωΑ-Ω]?\\." math-exp-str math-exp-pos) math-exp-pos) (setq math-exp-token 'punc math-expr-data (upcase (math-match-substring math-exp-str 0)) @@ -603,9 +603,9 @@ '((?\\ (< math-exp-pos (1- (length math-exp-str))) (progn - (or (string-match "\\\\hbox *{\\([a-zA-Z0-9]+\\)}" + (or (string-match "\\\\hbox *{\\([a-zA-Zα-ωΑ-Ω0-9]+\\)}" math-exp-str math-exp-pos) - (string-match "\\(\\\\\\([a-zA-Z]+\\|[^a-zA-Z]\\)\\)" + (string-match "\\(\\\\\\([a-zA-Zα-ωΑ-Ω]+\\|[^a-zA-Zα-ωΑ-Ω]\\)\\)" math-exp-str math-exp-pos)) (setq math-exp-token 'symbol math-exp-pos (match-end 0) @@ -691,7 +691,7 @@ (defun math-compose-tex-var (a prec) (if (and calc-language-option (not (= calc-language-option 0)) - (string-match "\\`[a-zA-Z][a-zA-Z0-9]+\\'" + (string-match "\\`[a-zA-Zα-ωΑ-Ω][a-zA-Zα-ωΑ-Ω0-9]+\\'" (symbol-name (nth 1 a)))) (if (eq calc-language 'latex) (format "\\text{%s}" (symbol-name (nth 1 a))) @@ -702,7 +702,7 @@ (let (left right) (if (and calc-language-option (not (= calc-language-option 0)) - (string-match "\\`[a-zA-Z][a-zA-Z0-9]+\\'" func)) + (string-match "\\`[a-zA-Zα-ωΑ-Ω][a-zA-Zα-ωΑ-Ω0-9]+\\'" func)) (if (< (prefix-numeric-value calc-language-option) 0) (setq func (format "\\%s" func)) (setq func (if (eq calc-language 'latex) @@ -824,11 +824,11 @@ '((?\\ (< math-exp-pos (1- (length math-exp-str))) (progn - (or (string-match "\\\\hbox *{\\([a-zA-Z0-9]+\\)}" - math-exp-str math-exp-pos) - (string-match "\\\\text *{\\([a-zA-Z0-9]+\\)}" - math-exp-str math-exp-pos) - (string-match "\\(\\\\\\([a-zA-Z]+\\|[^a-zA-Z]\\)\\)" + (or (string-match "\\\\hbox *{\\([a-zA-Zα-ωΑ-Ω0-9]+\\)}" + math-exp-str math-exp-pos) + (string-match "\\\\text *{\\([a-zA-Zα-ωΑ-Ω0-9]+\\)}" + math-exp-str math-exp-pos) + (string-match "\\(\\\\\\([a-zA-Zα-ωΑ-Ω]+\\|[^a-zA-Zα-ωΑ-Ω]\\)\\)" math-exp-str math-exp-pos)) (setq math-exp-token 'symbol math-exp-pos (match-end 0) @@ -2301,9 +2301,11 @@ ;; Variable name or function call. ((or (and (>= other-char ?a) (<= other-char ?z)) - (and (>= other-char ?A) (<= other-char ?Z))) + (and (>= other-char ?A) (<= other-char ?Z)) + (and (>= other-char ?α) (<= other-char ?ω)) + (and (>= other-char ?Α) (<= other-char ?Ω))) (setq line (nth v math-read-big-lines)) - (string-match "\\([a-zA-Z'_]+\\) *" line math-rb-h1) + (string-match "\\([a-zA-Zα-ωΑ-Ω'_]+\\) *" line math-rb-h1) (setq h (match-end 1) widest (match-end 0) p (math-match-substring line 1)) === modified file 'lisp/calc/calc-store.el' --- lisp/calc/calc-store.el 2010-01-13 08:35:10 +0000 +++ lisp/calc/calc-store.el 2010-05-15 04:50:25 +0000 @@ -202,7 +202,7 @@ 'calc-read-var-name-history))))) (setq calc-aborted-prefix "") (and (not (equal var "var-")) - (if (string-match "\\`\\([-a-zA-Z0-9]+\\) *:?=" var) + (if (string-match "\\`\\([-a-zA-Zα-ωΑ-Ω0-9]+\\) *:?=" var) (if (null calc-given-value-flag) (error "Assignment is not allowed in this command") (let ((svar (intern (substring var 0 (match-end 1))))) === modified file 'lisp/calc/calc-units.el' --- lisp/calc/calc-units.el 2010-01-13 08:35:10 +0000 +++ lisp/calc/calc-units.el 2010-05-15 04:50:25 +0000 @@ -36,13 +36,13 @@ ;;; Units table last updated 9-Jan-91 by Ulrich Mueller (ulm@vsnhd1.cern.ch) ;;; with some additions by Przemek Klosowski (przemek@rrdstrad.nist.gov) -;;; Updated April 2002 by Jochen Küpper +;;; Updated April 2002 by Jochen Küpper ;;; Updated August 2007, using ;;; CODATA (http://physics.nist.gov/cuu/Constants/index.html) ;;; NIST (http://physics.nist.gov/Pubs/SP811/appenB9.html) ;;; ESUWM (Encyclopaedia of Scientific Units, Weights and -;;; Measures, by François Cardarelli) +;;; Measures, by François Cardarelli) ;;; All conversions are exact unless otherwise noted. (defvar math-standard-units @@ -210,6 +210,7 @@ "1.602176487 10^-19 C (*)") ;;(approx) CODATA ( V "W/A" "Volt" ) ( ohm "V/A" "Ohm" ) + ( Ω "ohm" "Ohm" ) ( mho "A/V" "Mho" ) ( S "A/V" "Siemens" ) ( F "C/V" "Farad" ) @@ -259,7 +260,9 @@ "6.62606896 10^-34 J s (*)") ( hbar "h / (2 pi)" "Planck's constant" ) ;; Exact ( mu0 "4 pi 10^(-7) H/m" "Permeability of vacuum") ;; Exact + ( μ0 "mu0" "Permeability of vacuum") ;; Exact ( eps0 "1 / (mu0 c^2)" "Permittivity of vacuum" ) + ( ε0 "eps0" "Permittivity of vacuum" ) ( G "6.67428*10^(-11) m^3/(kg s^2)" "Gravitational constant" nil "6.67428 10^-11 m^3/(kg s^2) (*)") ( Nav "6.02214179*10^(23) / mol" "Avogadro's constant" nil @@ -272,12 +275,16 @@ "1.674927211 10^-27 kg (*)") ( mmu "1.88353130*10^(-28) kg" "Muon rest mass" nil "1.88353130 10^-28 kg (*)") + ( mμ "mmu" "Muon rest mass" nil + "1.88353130 10^-28 kg (*)") ( Ryd "10973731.568527 /m" "Rydberg's constant" nil "10973731.568527 /m (*)") ( k "1.3806504*10^(-23) J/K" "Boltzmann's constant" nil "1.3806504 10^-23 J/K (*)") ( alpha "7.2973525376*10^(-3)" "Fine structure constant" nil "7.2973525376 10^-3 (*)") + ( α "alpha" "Fine structure constant" nil + "7.2973525376 10^-3 (*)") ( muB "927.400915*10^(-26) J/T" "Bohr magneton" nil "927.400915 10^-26 J/T (*)") ( muN "5.05078324*10^(-27) J/T" "Nuclear magneton" nil @@ -316,6 +323,7 @@ ( ?c (^ 10 -2) "Centi" ) ( ?m (^ 10 -3) "Milli" ) ( ?u (^ 10 -6) "Micro" ) + ( ?μ (^ 10 -6) "Micro" ) ( ?n (^ 10 -9) "Nano" ) ( ?p (^ 10 -12) "Pico" ) ( ?f (^ 10 -15) "Femto" ) @@ -581,8 +589,8 @@ (let ((name (or (nth 2 u) (symbol-name (car u))))) (if (eq (aref name 0) ?\*) (setq name (substring name 1))) - (if (string-match "[^a-zA-Z0-9']" name) - (if (string-match "^[a-zA-Z0-9' ()]*$" name) + (if (string-match "[^a-zA-Zα-ωΑ-Ω0-9']" name) + (if (string-match "^[a-zA-Zα-ωΑ-Ω0-9' ()]*$" name) (while (setq pos (string-match "[ ()]" name)) (setq name (concat (substring name 0 pos) (if (eq (aref name pos) 32) "-" "") @@ -592,7 +600,7 @@ (setq name (concat (nth 2 (assq (aref (symbol-name (nth 1 expr)) 0) math-unit-prefixes)) - (if (and (string-match "[^a-zA-Z0-9']" name) + (if (and (string-match "[^a-zA-Zα-ωΑ-Ω0-9']" name) (not (memq (car u) '(mHg gf)))) (concat "-" name) (downcase name))))) @@ -1540,9 +1548,5 @@ (provide 'calc-units) -;; Local Variables: -;; coding: iso-latin-1 -;; End: - ;; arch-tag: e993314f-3adc-4191-be61-4ef8874881c4 ;;; calc-units.el ends here === modified file 'lisp/calc/calc.el' --- lisp/calc/calc.el 2010-04-18 03:09:18 +0000 +++ lisp/calc/calc.el 2010-05-15 04:50:25 +0000 @@ -999,9 +999,12 @@ (defvar math-working-step-2 nil) (defvar var-i '(special-const (math-imaginary 1))) (defvar var-pi '(special-const (math-pi))) +(defvar var-Ï€ '(special-const (math-pi))) (defvar var-e '(special-const (math-e))) (defvar var-phi '(special-const (math-phi))) +(defvar var-φ '(special-const (math-phi))) (defvar var-gamma '(special-const (math-gamma-const))) +(defvar var-γ '(special-const (math-gamma-const))) (defvar var-Modes '(special-const (math-get-modes-vec))) (mapc (lambda (v) (or (boundp v) (set v nil))) === modified file 'lisp/calc/calccomp.el' --- lisp/calc/calccomp.el 2010-01-13 08:35:10 +0000 +++ lisp/calc/calccomp.el 2010-05-15 04:50:25 +0000 @@ -663,6 +663,8 @@ (and prevc nextc (or (and (>= nextc ?a) (<= nextc ?z)) (and (>= nextc ?A) (<= nextc ?Z)) + (and (>= nextc ?α) (<= nextc ?ω)) + (and (>= nextc ?Α) (<= nextc ?Ω)) (and (>= nextc ?0) (<= nextc ?9)) (memq nextc '(?. ?_ ?# ?\( ?\[ ?\{)) @@ -732,7 +734,7 @@ (not (math-tex-expr-is-flat (nth 1 a)))))) (list 'horiz (if lr "\\left" "") - (if (string-match "\\`u\\([^a-zA-Z]\\)\\'" (car op)) + (if (string-match "\\`u\\([^a-zA-Zα-ωΑ-Ω]\\)\\'" (car op)) (substring (car op) 1) (car op)) (if (or lr (> (length (car op)) 2)) " " "") @@ -758,7 +760,7 @@ (t (let ((rhs (math-compose-expr (nth 1 a) (nth 3 op)))) (list 'horiz - (let ((ops (if (string-match "\\`u\\([^a-zA-Z]\\)\\'" + (let ((ops (if (string-match "\\`u\\([^a-zA-Zα-ωΑ-Ω]\\)\\'" (car op)) (substring (car op) 1) (car op)))) @@ -806,7 +808,7 @@ (setq func (car func2))) (setq func (math-remove-dashes (if (string-match - "\\`calcFunc-\\([a-zA-Z0-9']+\\)\\'" + "\\`calcFunc-\\([a-zA-Zα-ωΑ-Ω0-9']+\\)\\'" (symbol-name func)) (math-match-substring (symbol-name func) 1) (symbol-name func)))) ------------------------------------------------------------ revno: 100298 committer: Stefan Monnier branch nick: trunk timestamp: Sat 2010-05-15 00:10:22 -0400 message: * progmodes/asm-mode.el (asm-mode): Use define-derived-mode. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-05-15 04:08:03 +0000 +++ lisp/ChangeLog 2010-05-15 04:10:22 +0000 @@ -1,5 +1,6 @@ 2010-05-15 Stefan Monnier + * progmodes/asm-mode.el (asm-mode): * progmodes/prolog.el (prolog-mode): Use define-derived-mode. * pcomplete.el (pcomplete-completions-at-point): New function, === modified file 'lisp/progmodes/asm-mode.el' --- lisp/progmodes/asm-mode.el 2010-01-13 08:35:10 +0000 +++ lisp/progmodes/asm-mode.el 2010-05-15 04:10:22 +0000 @@ -109,7 +109,7 @@ "Additional expressions to highlight in Assembler mode.") ;;;###autoload -(defun asm-mode () +(define-derived-mode asm-mode prog-mode "Assembler" "Major mode for editing typical assembler code. Features a private abbrev table and the following bindings: @@ -128,13 +128,8 @@ Special commands: \\{asm-mode-map}" - (interactive) - (kill-all-local-variables) - (setq mode-name "Assembler") - (setq major-mode 'asm-mode) (setq local-abbrev-table asm-mode-abbrev-table) - (make-local-variable 'font-lock-defaults) - (setq font-lock-defaults '(asm-font-lock-keywords)) + (set (make-local-variable 'font-lock-defaults) '(asm-font-lock-keywords)) (set (make-local-variable 'indent-line-function) 'asm-indent-line) ;; Stay closer to the old TAB behavior (was tab-to-tab-stop). (set (make-local-variable 'tab-always-indent) nil) @@ -157,8 +152,7 @@ (setq comment-end-skip "[ \t]*\\(\\s>\\|\\*+/\\)") (make-local-variable 'comment-end) (setq comment-end "") - (setq fill-prefix "\t") - (run-mode-hooks 'asm-mode-hook)) + (setq fill-prefix "\t")) (defun asm-indent-line () "Auto-indent the current line." ------------------------------------------------------------ revno: 100297 committer: Stefan Monnier branch nick: trunk timestamp: Sat 2010-05-15 00:08:03 -0400 message: * progmodes/prolog.el (prolog-mode): Use define-derived-mode. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-05-15 03:50:26 +0000 +++ lisp/ChangeLog 2010-05-15 04:08:03 +0000 @@ -1,5 +1,7 @@ 2010-05-15 Stefan Monnier + * progmodes/prolog.el (prolog-mode): Use define-derived-mode. + * pcomplete.el (pcomplete-completions-at-point): New function, extracted from pcomplete-std-complete. (pcomplete-std-complete): Use it. === modified file 'lisp/progmodes/prolog.el' --- lisp/progmodes/prolog.el 2010-01-13 08:35:10 +0000 +++ lisp/progmodes/prolog.el 2010-05-15 04:08:03 +0000 @@ -136,26 +136,18 @@ )) ;;;###autoload -(defun prolog-mode () +(define-derived-mode prolog-mode prog-mode "Prolog" "Major mode for editing Prolog code for Prologs. Blank lines and `%%...' separate paragraphs. `%'s start comments. Commands: \\{prolog-mode-map} Entry to this mode calls the value of `prolog-mode-hook' if that value is non-nil." - (interactive) - (kill-all-local-variables) - (use-local-map prolog-mode-map) - (set-syntax-table prolog-mode-syntax-table) - (setq major-mode 'prolog-mode) - (setq mode-name "Prolog") (prolog-mode-variables) (set (make-local-variable 'comment-add) 1) - ;; font lock (setq font-lock-defaults '(prolog-font-lock-keywords nil nil nil - beginning-of-line)) - (run-mode-hooks 'prolog-mode-hook)) + beginning-of-line))) (defun prolog-indent-line () "Indent current line as Prolog code. ------------------------------------------------------------ revno: 100296 committer: Stefan Monnier branch nick: trunk timestamp: Fri 2010-05-14 23:50:26 -0400 message: * pcomplete.el (pcomplete-completions-at-point): New function, extracted from pcomplete-std-complete. (pcomplete-std-complete): Use it. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-05-15 00:42:22 +0000 +++ lisp/ChangeLog 2010-05-15 03:50:26 +0000 @@ -1,3 +1,9 @@ +2010-05-15 Stefan Monnier + + * pcomplete.el (pcomplete-completions-at-point): New function, + extracted from pcomplete-std-complete. + (pcomplete-std-complete): Use it. + 2010-05-15 Glenn Morris * Makefile.in (setwins, setwins_almost, setwins_for_subdirs): === modified file 'lisp/pcomplete.el' --- lisp/pcomplete.el 2010-04-13 01:24:10 +0000 +++ lisp/pcomplete.el 2010-05-15 03:50:26 +0000 @@ -444,12 +444,14 @@ ;; I don't think such commands are usable before first setting up buffer-local ;; variables to parse args, so there's no point autoloading it. ;; ;;;###autoload -(defun pcomplete-std-complete () +(defun pcomplete-completions-at-point () "Provide standard completion using pcomplete's completion tables. Same as `pcomplete' but using the standard completion UI." - (interactive) ;; FIXME: it only completes the text before point, whereas the ;; standard UI may also consider text after point. + ;; FIXME: the `pcomplete' UI may be used internally during + ;; pcomplete-completions and then throw to `pcompleted', thus + ;; imposing the pcomplete UI over the standard UI. (catch 'pcompleted (let* ((pcomplete-stub) pcomplete-seen pcomplete-norm-func @@ -516,7 +518,7 @@ (directory-file-name f)) pcomplete-seen)))))) - (completion-in-region + (list beg (point) ;; Add a space at the end of completion. Use a terminator-regexp ;; that never matches since the terminator cannot appear @@ -527,7 +529,14 @@ (cons pcomplete-termination-string "\\`a\\`") table)) - pred)))) + :predicate pred)))) + + ;; I don't think such commands are usable before first setting up buffer-local + ;; variables to parse args, so there's no point autoloading it. + ;; ;;;###autoload +(defun pcomplete-std-complete () + (let ((completion-at-point-functions '(pcomplete-completions-at-point))) + (completion-at-point))) ;;; Pcomplete's native UI. ------------------------------------------------------------ revno: 100295 committer: Glenn Morris branch nick: trunk timestamp: Fri 2010-05-14 19:02:28 -0700 message: * lwlib/Makefile.in (mostlyclean): Remove references to non-existent files. diff: === modified file 'lwlib/ChangeLog' --- lwlib/ChangeLog 2010-05-13 17:48:56 +0000 +++ lwlib/ChangeLog 2010-05-15 02:02:28 +0000 @@ -1,3 +1,7 @@ +2010-05-15 Glenn Morris + + * Makefile.in (mostlyclean): Remove references to non-existent files. + 2010-05-13 Jan Djärv * lwlib-Xaw.c (make_dialog): Remove extra arg to XtVaGetSubresources. === modified file 'lwlib/Makefile.in' --- lwlib/Makefile.in 2010-05-06 07:24:18 +0000 +++ lwlib/Makefile.in 2010-05-15 02:02:28 +0000 @@ -75,7 +75,7 @@ xlwmenu.o: xlwmenu.c xlwmenu.h lwlib.h xlwmenuP.h mostlyclean: - $(RM) *.o core errs ,* *.a .emacs_* make.log MakeOut \#* + $(RM) *.o core liblw.a \#* clean: mostlyclean distclean: clean ------------------------------------------------------------ revno: 100294 committer: Glenn Morris branch nick: trunk timestamp: Fri 2010-05-14 18:58:36 -0700 message: Regenerate configure. diff: === modified file 'configure' --- configure 2010-05-14 03:36:40 +0000 +++ configure 2010-05-15 01:58:36 +0000 @@ -805,6 +805,7 @@ WIDGET_OBJ TOOLKIT_LIBW LIBXT_OTHER +OLDXMENU_TARGET OLDXMENU LIBXMENU LIBX_OTHER @@ -26456,11 +26457,14 @@ if test "$USE_X_TOOLKIT" = "none"; then LIBXT_OTHER="\$(LIBXSM)" + OLDXMENU_TARGET="really-oldXMenu" else LIBXT_OTHER="\$(LIBXMU) -lXt \$(LIBXTR6) -lXext" + OLDXMENU_TARGET="really-lwlib" fi + ## The X Menu stuff is present in the X10 distribution, but missing ## from X11. If we have X10, just use the installed library; ## otherwise, use our own copy. @@ -26722,6 +26726,9 @@ # the C preprocessor to some helpful value like 1, or maybe the empty # string. Needless to say consequent macro substitutions are less # than conducive to the makefile finding the correct directory. +# src/Makefile.in used to treat X11 as equivalent to HAVE_X11. +# But nothing in Emacs defines X11, and everywhere else uses HAVE_X11, +# so that cannot have been doing anything. cpp_undefs="`echo $srcdir $configuration $canonical unix mktime register X11 | sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \ -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g'`" ------------------------------------------------------------ revno: 100293 committer: Glenn Morris branch nick: trunk timestamp: Fri 2010-05-14 18:55:24 -0700 message: Choose dependency of oldxmenu using configure. * configure.in (OLDXMENU_TARGET): New output variable. * src/Makefile.in (OLDXMENU_TARGET): New, set by configure. (really-lwlib, really-oldXMenu): Always define. ($OLDXMENU): Depend on $OLDXMENU_TARGET. * msdos/sed1v2.inp (OLDXMENU_TARGET): Edit to empty. * msdos/sed1x.inp (OLDXMENU_TARGET): Edit to really-oldxmenu. diff: === modified file 'ChangeLog' --- ChangeLog 2010-05-15 00:48:53 +0000 +++ ChangeLog 2010-05-15 01:55:24 +0000 @@ -1,5 +1,7 @@ 2010-05-15 Glenn Morris + * configure.in (OLDXMENU_TARGET): New output variable. + * Makefile.in (install-arch-dep): Update odd NS rule for Emacs version. * Makefile.in (install-arch-indep): Remove references to RCS, CVS, === modified file 'configure.in' --- configure.in 2010-05-14 03:36:40 +0000 +++ configure.in 2010-05-15 01:55:24 +0000 @@ -3126,10 +3126,13 @@ if test "$USE_X_TOOLKIT" = "none"; then LIBXT_OTHER="\$(LIBXSM)" + OLDXMENU_TARGET="really-oldXMenu" else LIBXT_OTHER="\$(LIBXMU) -lXt \$(LIBXTR6) -lXext" + OLDXMENU_TARGET="really-lwlib" fi AC_SUBST(LIBXT_OTHER) +AC_SUBST(OLDXMENU_TARGET) ## The X Menu stuff is present in the X10 distribution, but missing ## from X11. If we have X10, just use the installed library; === modified file 'msdos/ChangeLog' --- msdos/ChangeLog 2010-05-15 01:45:18 +0000 +++ msdos/ChangeLog 2010-05-15 01:55:24 +0000 @@ -1,5 +1,8 @@ 2010-05-15 Glenn Morris + * sed1v2.inp (OLDXMENU_TARGET): Edit to empty. + * sed1x.inp (OLDXMENU_TARGET): Edit to really-oldxmenu. + * sed1v2.inp (LIBXT_OTHER): Exit to empty. 2010-05-14 Glenn Morris === modified file 'msdos/sed1v2.inp' --- msdos/sed1v2.inp 2010-05-15 01:45:18 +0000 +++ msdos/sed1v2.inp 2010-05-15 01:55:24 +0000 @@ -82,6 +82,7 @@ /^LIBXSM *=/s/@LIBXSM@// /^LIBXTR6 *=/s/@LIBXTR6@// /^LIBXT_OTHER *=/s/@LIBXT_OTHER@// +/^OLDXMENU_TARGET *=/s/@OLDXMENU_TARGET@// /^XOBJ *=/s/@XOBJ@// /^TOOLKIT_LIBW *=/s/@TOOLKIT_LIBW@// /^LIBSOUND *=/s/@LIBSOUND@// === modified file 'msdos/sed1x.inp' --- msdos/sed1x.inp 2010-05-14 03:13:39 +0000 +++ msdos/sed1x.inp 2010-05-15 01:55:24 +0000 @@ -7,6 +7,7 @@ /^OLDXMENU *=/s!@OLDXMENU@!${oldXMenudir}libXMenu11.a! /^LIBXMENU *=/s!@LIBXMENU@!${OLDXMENU}! /^LIBX_OTHER *=/s!@LIBX_OTHER@!${LIBXT} ${LIBX_EXTRA}! +/^OLDXMENU_TARGET *=/s!= *!= really-oldxmenu! /^LIBS_SYSTEM *=/s!= *!= -lxext -lsys! /^MSDOS_X_OBJ *=/s!= *!= w16select.o termcap.o! /^TOOLTIP_SUPPORT *=/s!= *!= ${lispsource}tooltip.elc! === modified file 'src/ChangeLog' --- src/ChangeLog 2010-05-15 00:54:24 +0000 +++ src/ChangeLog 2010-05-15 01:55:24 +0000 @@ -1,5 +1,9 @@ 2010-05-15 Glenn Morris + * Makefile.in (OLDXMENU_TARGET): New, set by configure. + (really-lwlib, really-oldXMenu): Always define. + ($OLDXMENU): Depend on $OLDXMENU_TARGET. + * Makefile.in: Simplify cpp conditional. * Makefile.in (${ns_appdir}): Simplify using umask. === modified file 'src/Makefile.in' --- src/Makefile.in 2010-05-15 00:54:24 +0000 +++ src/Makefile.in 2010-05-15 01:55:24 +0000 @@ -65,6 +65,7 @@ bootstrap_exe = ${abs_builddir}/bootstrap-emacs${EXEEXT} +## ns-app if HAVE_NS, else empty. OTHER_FILES = @OTHER_FILES@ CRT_DIR=@CRT_DIR@ @@ -167,6 +168,10 @@ ## Only used if HAVE_X_WINDOWS. LIBXT_OTHER=@LIBXT_OTHER@ +## Only used if HAVE_X11 && !USE_GTK. +## really-lwlib if USE_X_TOOLKIT, else really-oldxmenu. +OLDXMENU_TARGET=@OLDXMENU_TARGET@ + XMENU_OBJ=@XMENU_OBJ@ XOBJ=@XOBJ@ @@ -665,6 +670,21 @@ prefix-args${EXEEXT}: prefix-args.o $(config_h) $(CC) $(LDFLAGS) prefix-args.o -o prefix-args + +/* Only (possibly) used if HAVE_X11 && !USE_GTK, but no harm in always + defining. */ +really-lwlib: + cd ${lwlibdir}; ${MAKE} ${MFLAGS} \ + CC='${CC}' CFLAGS='${CFLAGS}' MAKE='${MAKE}' + @true /* make -t should not create really-lwlib. */ +.PHONY: really-lwlib + +really-oldXMenu: + cd ${oldXMenudir}; ${MAKE} ${MFLAGS} \ + CC='${CC}' CFLAGS='${CFLAGS}' MAKE='${MAKE}' + @true /* make -t should not create really-oldXMenu. */ +.PHONY: really-oldXMenu + /* HAVE_X11 implies HAVE_X_WINDOWS and HAVE_MENUS. */ #if defined (HAVE_X11) && ! defined (USE_GTK) /* We use stamp-xmenu with these two deps to both ensure that lwlib @@ -675,25 +695,9 @@ /* Supply an ordering for parallel make. */ ../src/$(OLDXMENU): ${OLDXMENU} -#ifdef USE_X_TOOLKIT -$(OLDXMENU): really-lwlib - -really-lwlib: - cd ${lwlibdir}; ${MAKE} ${MFLAGS} \ - CC='${CC}' CFLAGS='${CFLAGS}' MAKE='${MAKE}' - @true /* make -t should not create really-lwlib. */ -.PHONY: really-lwlib -#else /* not USE_X_TOOLKIT */ -$(OLDXMENU): really-oldXMenu - -really-oldXMenu: - cd ${oldXMenudir}; ${MAKE} ${MFLAGS} \ - CC='${CC}' CFLAGS='${CFLAGS}' MAKE='${MAKE}' - @true /* make -t should not create really-oldXMenu. */ -.PHONY: really-oldXMenu -#endif /* not USE_X_TOOLKIT */ -#else /* !HAVE_X11 || USE_GTK */ - +$(OLDXMENU): $(OLDXMENU_TARGET) + +#else /* !HAVE_X11 || USE_GTK */ /* We don''t really need this, but satisfy the dependency. */ stamp-oldxmenu: touch stamp-oldxmenu ------------------------------------------------------------ revno: 100292 committer: Glenn Morris branch nick: trunk timestamp: Fri 2010-05-14 18:45:18 -0700 message: * msdos/sed1v2.inp (LIBXT_OTHER): Exit to empty. diff: === modified file 'msdos/ChangeLog' --- msdos/ChangeLog 2010-05-14 04:23:23 +0000 +++ msdos/ChangeLog 2010-05-15 01:45:18 +0000 @@ -1,3 +1,7 @@ +2010-05-15 Glenn Morris + + * sed1v2.inp (LIBXT_OTHER): Exit to empty. + 2010-05-14 Glenn Morris * sed1v2.inp (ns_appdir, ns_appbindir, ns_appsrc): Edit to empty. === modified file 'msdos/sed1v2.inp' --- msdos/sed1v2.inp 2010-05-14 04:23:23 +0000 +++ msdos/sed1v2.inp 2010-05-15 01:45:18 +0000 @@ -81,6 +81,7 @@ /^LIBXMU *=/s/@LIBXMU@// /^LIBXSM *=/s/@LIBXSM@// /^LIBXTR6 *=/s/@LIBXTR6@// +/^LIBXT_OTHER *=/s/@LIBXT_OTHER@// /^XOBJ *=/s/@XOBJ@// /^TOOLKIT_LIBW *=/s/@TOOLKIT_LIBW@// /^LIBSOUND *=/s/@LIBSOUND@// ------------------------------------------------------------ revno: 100291 committer: Glenn Morris branch nick: trunk timestamp: Fri 2010-05-14 18:09:16 -0700 message: * lisp/org/org-docview.el: Fix copyright years. diff: === modified file 'lisp/org/org-docview.el' --- lisp/org/org-docview.el 2010-04-15 10:11:52 +0000 +++ lisp/org/org-docview.el 2010-05-15 01:09:16 +0000 @@ -1,9 +1,8 @@ ;;; org-docview.el --- support for links to doc-view-mode buffers -;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. -;; Author: Jan Böcker +;; Author: Jan Böcker ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org ;; Version: 6.35i ------------------------------------------------------------ revno: 100290 committer: Glenn Morris branch nick: trunk timestamp: Fri 2010-05-14 18:05:11 -0700 message: * lib-src/Makefile.in: Break some long lines. diff: === modified file 'lib-src/Makefile.in' --- lib-src/Makefile.in 2010-05-12 03:06:50 +0000 +++ lib-src/Makefile.in 2010-05-15 01:05:11 +0000 @@ -106,14 +106,15 @@ # ========================== Lists of Files =========================== -# Things that a user might actually run, -# which should be installed in bindir. -INSTALLABLES = etags${EXEEXT} ctags${EXEEXT} emacsclient${EXEEXT} b2m${EXEEXT} ebrowse${EXEEXT} +# Things that a user might actually run, which should be installed in bindir. +INSTALLABLES = etags${EXEEXT} ctags${EXEEXT} emacsclient${EXEEXT} \ + b2m${EXEEXT} ebrowse${EXEEXT} + INSTALLABLE_SCRIPTS = rcs-checkin grep-changelog # Things that Emacs runs internally, or during the build process, # which should not be installed in bindir. -UTILITIES= profile${EXEEXT} digest-doc${EXEEXT} sorted-doc${EXEEXT} \ +UTILITIES = profile${EXEEXT} digest-doc${EXEEXT} sorted-doc${EXEEXT} \ movemail${EXEEXT} fakemail${EXEEXT} \ hexl${EXEEXT} update-game-score${EXEEXT} @@ -153,7 +154,8 @@ LIBS_MAIL=@LIBS_MAIL@ ## Extra libraries to use when linking movemail. -LIBS_MOVE = $(LIBS_MAIL) $(KRB4LIB) $(DESLIB) $(KRB5LIB) $(CRYPTOLIB) $(COM_ERRLIB) $(LIBHESIOD) $(LIBRESOLV) +LIBS_MOVE = $(LIBS_MAIL) $(KRB4LIB) $(DESLIB) $(KRB5LIB) $(CRYPTOLIB) \ + $(COM_ERRLIB) $(LIBHESIOD) $(LIBRESOLV) ## Some systems define this to request special libraries. LIBS_SYSTEM = @LIBS_SYSTEM@ @@ -161,7 +163,8 @@ # Those files shared with other GNU utilities need HAVE_CONFIG_H # defined before they know they can take advantage of the information # in ../src/config.h. -BASE_CFLAGS = $(C_SWITCH_SYSTEM) $(C_SWITCH_MACHINE) -DHAVE_CONFIG_H -I. -I../src -I${srcdir} -I${srcdir}/../src +BASE_CFLAGS = $(C_SWITCH_SYSTEM) $(C_SWITCH_MACHINE) -DHAVE_CONFIG_H \ + -I. -I../src -I${srcdir} -I${srcdir}/../src ALL_CFLAGS = ${BASE_CFLAGS} ${LDFLAGS} ${CPPFLAGS} ${CFLAGS} LINK_CFLAGS = ${BASE_CFLAGS} ${LDFLAGS} ${CFLAGS} @@ -316,24 +319,31 @@ REGEXPDEPS = $(REGEXPOBJ) $(srcdir)/../src/regex.h regex.o: $(srcdir)/../src/regex.c $(srcdir)/../src/regex.h ../src/config.h - ${CC} -c ${CPP_CFLAGS} -DCONFIG_BROKETS -DINHIBIT_STRING_HEADER ${srcdir}/../src/regex.c + ${CC} -c ${CPP_CFLAGS} -DCONFIG_BROKETS -DINHIBIT_STRING_HEADER \ + ${srcdir}/../src/regex.c etags${EXEEXT}: ${srcdir}/etags.c $(GETOPTDEPS) $(REGEXPDEPS) ../src/config.h - $(CC) ${ALL_CFLAGS} -DEMACS_NAME="\"GNU Emacs\"" -DVERSION="\"${version}\"" ${srcdir}/etags.c $(GETOPTOBJS) $(REGEXPOBJ) $(LOADLIBES) -o etags + $(CC) ${ALL_CFLAGS} -DEMACS_NAME="\"GNU Emacs\"" \ + -DVERSION="\"${version}\"" ${srcdir}/etags.c $(GETOPTOBJS) \ + $(REGEXPOBJ) $(LOADLIBES) -o etags ebrowse${EXEEXT}: ${srcdir}/ebrowse.c $(GETOPTDEPS) ../src/config.h - $(CC) ${ALL_CFLAGS} -DVERSION="\"${version}\"" ${srcdir}/ebrowse.c $(GETOPTOBJS) $(LOADLIBES) -o ebrowse + $(CC) ${ALL_CFLAGS} -DVERSION="\"${version}\"" \ + ${srcdir}/ebrowse.c $(GETOPTOBJS) $(LOADLIBES) -o ebrowse ## We depend on etags to assure that parallel makes do not write two ## etags.o files on top of each other. ctags${EXEEXT}: etags${EXEEXT} - $(CC) ${ALL_CFLAGS} -DCTAGS -DEMACS_NAME="\"GNU Emacs\"" -DVERSION="\"${version}\"" ${srcdir}/etags.c $(GETOPTOBJS) $(REGEXPOBJ) $(LOADLIBES) -o ctags + $(CC) ${ALL_CFLAGS} -DCTAGS -DEMACS_NAME="\"GNU Emacs\"" \ + -DVERSION="\"${version}\"" ${srcdir}/etags.c $(GETOPTOBJS) \ + $(REGEXPOBJ) $(LOADLIBES) -o ctags profile${EXEEXT}: ${srcdir}/profile.c ../src/config.h $(CC) ${ALL_CFLAGS} ${srcdir}/profile.c $(LOADLIBES) -o profile make-docfile${EXEEXT}: ${srcdir}/make-docfile.c ../src/config.h - $(CC) ${ALL_CFLAGS} ${srcdir}/make-docfile.c $(LOADLIBES) -o make-docfile + $(CC) ${ALL_CFLAGS} ${srcdir}/make-docfile.c $(LOADLIBES) \ + -o make-docfile digest-doc${EXEEXT}: ${srcdir}/digest-doc.c $(CC) ${ALL_CFLAGS} ${srcdir}/digest-doc.c $(LOADLIBES) -o digest-doc @@ -346,9 +356,9 @@ $(GETOPTOBJS) $(LOADLIBES) -o b2m movemail${EXEEXT}: movemail.o pop.o $(GETOPTDEPS) - $(CC) ${LINK_CFLAGS} ${MOVE_FLAGS} movemail.o pop.o $(GETOPTOBJS) $(LOADLIBES) $(LIBS_MOVE) -o movemail + $(CC) ${LINK_CFLAGS} ${MOVE_FLAGS} movemail.o pop.o \ + $(GETOPTOBJS) $(LOADLIBES) $(LIBS_MOVE) -o movemail -## We need to define emacs to get the right version of something (what?). movemail.o: ${srcdir}/movemail.c ../src/config.h $(GETOPT_H) $(CC) -c ${CPP_CFLAGS} ${MOVE_FLAGS} ${srcdir}/movemail.c @@ -367,7 +377,8 @@ $(CC) ${ALL_CFLAGS} ${srcdir}/hexl.c $(LOADLIBES) -o hexl update-game-score${EXEEXT}: update-game-score.o $(GETOPTDEPS) - $(CC) ${LINK_CFLAGS} update-game-score.o $(GETOPTOBJS) $(LOADLIBES) -o update-game-score + $(CC) ${LINK_CFLAGS} update-game-score.o $(GETOPTOBJS) \ + $(LOADLIBES) -o update-game-score update-game-score.o: ${srcdir}/update-game-score.c ../src/config.h $(GETOPT_H) $(CC) -c ${CPP_CFLAGS} ${srcdir}/update-game-score.c \ ------------------------------------------------------------ revno: 100289 committer: Glenn Morris branch nick: trunk timestamp: Fri 2010-05-14 17:54:24 -0700 message: If HAVE_X11, also HAVE_X_WINDOWS and HAVE_MENUS. * src/Makefile.in: Simplify cpp conditional. * admin/CPP-DEFINES: Comment. diff: === modified file 'admin/CPP-DEFINES' --- admin/CPP-DEFINES 2010-05-14 03:36:40 +0000 +++ admin/CPP-DEFINES 2010-05-15 00:54:24 +0000 @@ -22,6 +22,9 @@ NS_IMPL_COCOA Compile support for Cocoa (Apple) implementation of NS GUI API. HAVE_X11 Compile support for the X11 GUI. HAVE_X_WINDOWS Compile support for X Window system + (It looks like, nowadays, if HAVE_X11 is set, HAVE_X_WINDOWS must + be, and vice versa. At least, this is true for configure, and + msdos; not sure about nt.) USE_LUCID Use the Lucid toolkit for menus&scrollbars. Requires HAVE_X11. USE_MOTIF Use the Motif toolkit for menus&scrollbars. Requires HAVE_X11. USE_GTK Use the Gtk toolkit for menus&scrollbars. Requires HAVE_X11. === modified file 'src/ChangeLog' --- src/ChangeLog 2010-05-15 00:48:53 +0000 +++ src/ChangeLog 2010-05-15 00:54:24 +0000 @@ -1,5 +1,7 @@ 2010-05-15 Glenn Morris + * Makefile.in: Simplify cpp conditional. + * Makefile.in (${ns_appdir}): Simplify using umask. * Makefile.in (${ns_appdir}): Remove references to CVS-related files. === modified file 'src/Makefile.in' --- src/Makefile.in 2010-05-15 00:48:53 +0000 +++ src/Makefile.in 2010-05-15 00:54:24 +0000 @@ -611,6 +611,7 @@ all: emacs${EXEEXT} $(OTHER_FILES) +/* Does anyone ever pay attention to the load-path-shadows output here? */ emacs${EXEEXT}: temacs${EXEEXT} ${etc}DOC ${lisp} #ifdef CANNOT_DUMP rm -f emacs${EXEEXT} @@ -664,8 +665,8 @@ prefix-args${EXEEXT}: prefix-args.o $(config_h) $(CC) $(LDFLAGS) prefix-args.o -o prefix-args -#if defined (HAVE_X_WINDOWS) && defined (HAVE_X11) && defined (HAVE_MENUS) && ! defined (USE_GTK) - +/* HAVE_X11 implies HAVE_X_WINDOWS and HAVE_MENUS. */ +#if defined (HAVE_X11) && ! defined (USE_GTK) /* We use stamp-xmenu with these two deps to both ensure that lwlib gets remade based on its dependencies in its own makefile, and remake temacs if lwlib gets changed by this. */ @@ -691,12 +692,12 @@ @true /* make -t should not create really-oldXMenu. */ .PHONY: really-oldXMenu #endif /* not USE_X_TOOLKIT */ -#else /* not (HAVE_X_WINDOWS && HAVE_X11 && HAVE_MENUS && ! USE_GTK) */ +#else /* !HAVE_X11 || USE_GTK */ /* We don''t really need this, but satisfy the dependency. */ stamp-oldxmenu: touch stamp-oldxmenu -#endif /* not (HAVE_X_WINDOWS && HAVE_X11 && HAVE_MENUS && ! USE_GTK) */ +#endif /* HAVE_X11 && !USE_GTK */ ../config.status:: epaths.in @echo "The file epaths.h needs to be set up from epaths.in." @@ -979,7 +980,6 @@ cp -f emacs${EXEEXT} ${ns_appbindir}Emacs ns-app: ${ns_appdir} ${ns_appbindir}Emacs - #endif /* HAVE_NS */ mostlyclean: ------------------------------------------------------------ revno: 100288 committer: Glenn Morris branch nick: trunk timestamp: Fri 2010-05-14 17:48:53 -0700 message: Minor NS build fixes. * Makefile.in (install-arch-dep): Update odd NS rule for Emacs version. * src/Makefile.in (${ns_appdir}): Simplify using umask. diff: === modified file 'ChangeLog' --- ChangeLog 2010-05-15 00:42:22 +0000 +++ ChangeLog 2010-05-15 00:48:53 +0000 @@ -1,5 +1,7 @@ 2010-05-15 Glenn Morris + * Makefile.in (install-arch-dep): Update odd NS rule for Emacs version. + * Makefile.in (install-arch-indep): Remove references to RCS, CVS, and other files that no longer exist. === modified file 'Makefile.in' --- Makefile.in 2010-05-15 00:42:22 +0000 +++ Makefile.in 2010-05-15 00:48:53 +0000 @@ -425,10 +425,15 @@ rm -fr share ) ; \ ( cd ${ns_appbindir}/libexec ; dir=emacs/*/*/* ; $(MV_DIRS); \ rm -fr emacs ) ; \ - ( cd ${ns_appbindir}/bin ; rm -f emacs emacs-23* ; \ + ( cd ${ns_appbindir}/bin ; rm -f emacs emacs-24* ; \ ln -sf ../libexec/* .) ; \ else true ; fi +## FIXME is the emacs-24* bit above really necessary and correct? +## What if I have 24.1 and 24.2 installed at the same time? +## In any case, it should use something like echo $version | sed 's/\..*//' +## instead of hard-coding a version. + ## http://lists.gnu.org/archive/html/emacs-devel/2007-10/msg01672.html ## Needs to be the user running install, so configure can't set it. set_installuser=for installuser in $${LOGNAME} $${USERNAME} $${USER} \ === modified file 'src/ChangeLog' --- src/ChangeLog 2010-05-15 00:42:22 +0000 +++ src/ChangeLog 2010-05-15 00:48:53 +0000 @@ -1,5 +1,7 @@ 2010-05-15 Glenn Morris + * Makefile.in (${ns_appdir}): Simplify using umask. + * Makefile.in (${ns_appdir}): Remove references to CVS-related files. 2010-05-14 Stefan Monnier === modified file 'src/Makefile.in' --- src/Makefile.in 2010-05-15 00:42:22 +0000 +++ src/Makefile.in 2010-05-15 00:48:53 +0000 @@ -972,9 +972,7 @@ ${ns_appdir}: ${ns_appsrc} rm -fr ${ns_appdir} mkdir -p ${ns_appdir} - ( cd ${ns_appsrc} ; tar cfh - . ) | ( cd ${ns_appdir} ; tar xf - ) - ( cd ${ns_appdir} ; for subdir in `find . -type d -print` ; do \ - chmod a+rx $${subdir} ; done ; ) + ( cd ${ns_appsrc} ; tar cfh - . ) | ( cd ${ns_appdir} ; umask 022; tar xf - ) ${ns_appbindir}Emacs: emacs${EXEEXT} mkdir -p ${ns_appbindir} ------------------------------------------------------------ revno: 100287 committer: Glenn Morris branch nick: trunk timestamp: Fri 2010-05-14 17:42:22 -0700 message: Remove references to CVS directories etc in Makefiles. * Makefile.in (install-arch-indep): Remove references to RCS, CVS, and other files that no longer exist. * leim/Makefile.in (install): Remove references to CVS-related files. * lisp/Makefile.in (setwins, setwins_almost, setwins_for_subdirs): Remove references to CVS, RCS and Old directories. * src/Makefile.in (${ns_appdir}): Remove references to CVS-related files. diff: === modified file 'ChangeLog' --- ChangeLog 2010-05-14 03:36:40 +0000 +++ ChangeLog 2010-05-15 00:42:22 +0000 @@ -1,3 +1,8 @@ +2010-05-15 Glenn Morris + + * Makefile.in (install-arch-indep): Remove references to RCS, CVS, + and other files that no longer exist. + 2010-05-14 Glenn Morris * configure.in (cpp_undefs): Add mktime, register, X11. === modified file 'Makefile.in' --- Makefile.in 2010-05-06 07:24:18 +0000 +++ Makefile.in 2010-05-15 00:42:22 +0000 @@ -476,11 +476,8 @@ | (cd $${dest}; umask 022; \ tar -xvf - && cat > /dev/null) || exit 1; \ find $${dest} -exec chown $${installuser} {} ';' ;\ - for subdir in `find $${dest} -type d ! -name RCS ! -name CVS -print` ; do \ + for subdir in `find $${dest} -type d -print` ; do \ chmod a+rx $${subdir} ; \ - rm -rf $${subdir}/RCS ; \ - rm -rf $${subdir}/CVS ; \ - rm -f $${subdir}/.cvsignore ; \ rm -f $${subdir}/.gitignore ; \ rm -f $${subdir}/.arch-inventory ; \ rm -f $${subdir}/.DS_Store ; \ @@ -492,7 +489,6 @@ rm -f $${subdir}/[mM]akefile*.c $${subdir}/[mM]akefile*[.-]in \ $${subdir}/[mM]akefile ; \ rm -f $${subdir}/ChangeLog* ; \ - rm -f $${subdir}/dired.todo ; \ done) ; \ done -rm -f $(DESTDIR)${lispdir}/subdirs.el === modified file 'leim/ChangeLog' --- leim/ChangeLog 2010-05-08 18:47:07 +0000 +++ leim/ChangeLog 2010-05-15 00:42:22 +0000 @@ -1,3 +1,7 @@ +2010-05-15 Glenn Morris + + * Makefile.in (install): Remove references to CVS-related files. + 2010-05-07 Chong Yidong * Version 23.2 released. === modified file 'leim/Makefile.in' --- leim/Makefile.in 2010-03-18 06:37:26 +0000 +++ leim/Makefile.in 2010-05-15 00:42:22 +0000 @@ -237,8 +237,6 @@ tar -chf - quail/* ja-dic \ | (cd ${INSTALLDIR}; umask 0; tar -xvf - && cat > /dev/null) ;\ fi; \ - rm -rf ${INSTALLDIR}/CVS ${INSTALLDIR}/*/CVS; \ - rm -f ${INSTALLDIR}/.cvsignore ${INSTALLDIR}/*/.cvsignore; \ rm -f ${INSTALLDIR}/.gitignore ${INSTALLDIR}/*/.gitignore; \ rm -f ${INSTALLDIR}/.arch-inventory ${INSTALLDIR}/*/.arch-inventory; \ rm -f ${INSTALLDIR}/\#* ${INSTALLDIR}/*/\#* ; \ === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-05-14 23:46:11 +0000 +++ lisp/ChangeLog 2010-05-15 00:42:22 +0000 @@ -1,3 +1,8 @@ +2010-05-15 Glenn Morris + + * Makefile.in (setwins, setwins_almost, setwins_for_subdirs): + Remove references to CVS, RCS and Old directories. + 2010-05-14 Jay Belanger * calc-bin.el (math-format-twos-complement): Group digits when === modified file 'lisp/Makefile.in' --- lisp/Makefile.in 2010-04-24 02:36:43 +0000 +++ lisp/Makefile.in 2010-05-15 00:42:22 +0000 @@ -84,28 +84,25 @@ emacs = EMACSLOADPATH=$(lisp) LC_ALL=C $(EMACS) $(EMACSOPT) # Common command to find subdirectories - setwins=subdirs=`(find . -type d -print)`; \ for file in $$subdirs; do \ - case $$file in */Old | */RCS | */CVS | */CVS/* | */.* | */.*/* | */=* ) ;; \ + case $$file in */.* | */.*/* | */=* ) ;; \ *) wins="$$wins $$file" ;; \ esac; \ done # Find all subdirectories except `obsolete' and `term'. - setwins_almost=subdirs=`(find . -type d -print)`; \ for file in $$subdirs; do \ - case $$file in */Old | */RCS | */CVS | */CVS/* | */.* | */.*/* | */=* | */obsolete | */term ) ;; \ + case $$file in */.* | */.*/* | */=* | */obsolete | */term ) ;; \ *) wins="$$wins $$file" ;; \ esac; \ done # Find all subdirectories in which we might want to create subdirs.el - setwins_for_subdirs=subdirs=`(find . -type d -print)`; \ for file in $$subdirs; do \ - case $$file in */Old | */RCS | */CVS | */CVS/* | */.* | */.*/* | */=* | */cedet* ) ;; \ + case $$file in */.* | */.*/* | */=* | */cedet* ) ;; \ *) wins="$$wins $$file" ;; \ esac; \ done === modified file 'src/ChangeLog' --- src/ChangeLog 2010-05-14 17:53:42 +0000 +++ src/ChangeLog 2010-05-15 00:42:22 +0000 @@ -1,3 +1,7 @@ +2010-05-15 Glenn Morris + + * Makefile.in (${ns_appdir}): Remove references to CVS-related files. + 2010-05-14 Stefan Monnier * eval.c (specbind): Remove left-over duplicate test. === modified file 'src/Makefile.in' --- src/Makefile.in 2010-05-14 04:23:23 +0000 +++ src/Makefile.in 2010-05-15 00:42:22 +0000 @@ -973,10 +973,8 @@ rm -fr ${ns_appdir} mkdir -p ${ns_appdir} ( cd ${ns_appsrc} ; tar cfh - . ) | ( cd ${ns_appdir} ; tar xf - ) - ( cd ${ns_appdir} ; for subdir in `find . -type d ! -name CVS -print` ; do \ - chmod a+rx $${subdir} ; \ - rm -rf $${subdir}/CVS ; \ - rm -f $${subdir}/.cvsignore ; done ; ) + ( cd ${ns_appdir} ; for subdir in `find . -type d -print` ; do \ + chmod a+rx $${subdir} ; done ; ) ${ns_appbindir}Emacs: emacs${EXEEXT} mkdir -p ${ns_appbindir} ------------------------------------------------------------ revno: 100286 committer: Jay Belanger branch nick: trunk timestamp: Fri 2010-05-14 18:46:11 -0500 message: calc-bin.el (math-format-twos-complement): Group digits when appropriate. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-05-14 21:21:12 +0000 +++ lisp/ChangeLog 2010-05-14 23:46:11 +0000 @@ -1,3 +1,8 @@ +2010-05-14 Jay Belanger + + * calc-bin.el (math-format-twos-complement): Group digits when + appropriate. + 2010-05-14 Stefan Monnier * progmodes/sh-script.el (sh-mode-default-syntax-table): Remove. === modified file 'lisp/calc/calc-bin.el' --- lisp/calc/calc-bin.el 2010-04-18 04:13:09 +0000 +++ lisp/calc/calc-bin.el 2010-05-14 23:46:11 +0000 @@ -845,6 +845,8 @@ (len (length num))) (if (< len digs) (setq num (concat (make-string (- digs len) ?0) num)))) + (when calc-group-digits + (setq num (math-group-float num))) (concat (number-to-string calc-number-radix) "##" ------------------------------------------------------------ revno: 100285 committer: Stefan Monnier branch nick: trunk timestamp: Fri 2010-05-14 17:21:12 -0400 message: * progmodes/sh-script.el (sh-mode-default-syntax-table): Remove. (sh-mode-syntax-table): Give it a default value instead. (sh-header-marker): Make buffer-local. (sh-mode): Move make-local-variable to the corresponding setq. (sh-add-completer): Avoid gratuitously let-binding a buffer-local var. Use complete-with-action. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-05-14 16:41:01 +0000 +++ lisp/ChangeLog 2010-05-14 21:21:12 +0000 @@ -1,5 +1,12 @@ 2010-05-14 Stefan Monnier + * progmodes/sh-script.el (sh-mode-default-syntax-table): Remove. + (sh-mode-syntax-table): Give it a default value instead. + (sh-header-marker): Make buffer-local. + (sh-mode): Move make-local-variable to the corresponding setq. + (sh-add-completer): Avoid gratuitously let-binding a buffer-local var. + Use complete-with-action. + * simple.el (prog-mode): New (abstract) major mode. * emacs-lisp/lisp-mode.el (emacs-lisp-mode, lisp-mode): Use it. * progmodes/sh-script.el (sh-mode): Remove redundant var assignment. === modified file 'lisp/progmodes/sh-script.el' --- lisp/progmodes/sh-script.el 2010-05-14 16:41:01 +0000 +++ lisp/progmodes/sh-script.el 2010-05-14 21:21:12 +0000 @@ -411,11 +411,7 @@ (modify-syntax-entry (pop list) (pop list) table)) table) -(defvar sh-mode-syntax-table nil - "The syntax table to use for Shell-Script mode. -This is buffer-local in every such buffer.") - -(defvar sh-mode-default-syntax-table +(defvar sh-mode-syntax-table (sh-mode-syntax-table () ?\# "<" ?\n ">#" @@ -436,7 +432,8 @@ ?= "." ?< "." ?> ".") - "Default syntax table for shell mode.") + "The syntax table to use for Shell-Script mode. +This is buffer-local in every such buffer.") (defvar sh-mode-syntax-table-input '((sh . nil)) @@ -611,7 +608,7 @@ (defvar sh-header-marker nil "When non-nil is the end of header for prepending by \\[sh-execute-region]. That command is also used for setting this variable.") - +(make-variable-buffer-local 'sh-header-marker) (defcustom sh-beginning-of-command "\\([;({`|&]\\|\\`\\|[^\\]\n\\)[ \t]*\\([/~[:alnum:]:]\\)" @@ -1533,54 +1530,39 @@ If your shell gives error messages with line numbers, you can use \\[executable-interpret] with your script for an edit-interpret-debug cycle." - (make-local-variable 'skeleton-end-hook) - (make-local-variable 'paragraph-start) - (make-local-variable 'paragraph-separate) - (make-local-variable 'comment-start) - (make-local-variable 'comment-start-skip) - (make-local-variable 'require-final-newline) - (make-local-variable 'sh-header-marker) (make-local-variable 'sh-shell-file) (make-local-variable 'sh-shell) - (make-local-variable 'skeleton-pair-alist) - (make-local-variable 'skeleton-pair-filter-function) - (make-local-variable 'comint-dynamic-complete-functions) - (make-local-variable 'comint-prompt-regexp) - (make-local-variable 'font-lock-defaults) - (make-local-variable 'skeleton-filter-function) - (make-local-variable 'skeleton-newline-indent-rigidly) - (make-local-variable 'sh-shell-variables) - (make-local-variable 'sh-shell-variables-initialized) - (make-local-variable 'imenu-generic-expression) - (make-local-variable 'sh-indent-supported-here) - (make-local-variable 'skeleton-pair-default-alist) - (setq skeleton-pair-default-alist sh-skeleton-pair-default-alist) - (setq skeleton-end-hook (lambda () - (or (eolp) (newline) (indent-relative))) - paragraph-start (concat page-delimiter "\\|$") - paragraph-separate paragraph-start - comment-start "# " - comment-start-skip "#+[\t ]*" - local-abbrev-table sh-mode-abbrev-table - comint-dynamic-complete-functions sh-dynamic-complete-functions - ;; we can't look if previous line ended with `\' - comint-prompt-regexp "^[ \t]*" - imenu-case-fold-search nil - font-lock-defaults - `((sh-font-lock-keywords - sh-font-lock-keywords-1 sh-font-lock-keywords-2) - nil nil - ((?/ . "w") (?~ . "w") (?. . "w") (?- . "w") (?_ . "w")) nil - (font-lock-syntactic-keywords . sh-font-lock-syntactic-keywords) - (font-lock-syntactic-face-function - . sh-font-lock-syntactic-face-function)) - skeleton-pair-alist '((?` _ ?`)) - skeleton-pair-filter-function 'sh-quoted-p - skeleton-further-elements '((< '(- (min sh-indentation - (current-column))))) - skeleton-filter-function 'sh-feature - skeleton-newline-indent-rigidly t - sh-indent-supported-here nil) + + (set (make-local-variable 'skeleton-pair-default-alist) + sh-skeleton-pair-default-alist) + (set (make-local-variable 'skeleton-end-hook) + (lambda () (or (eolp) (newline) (indent-relative)))) + + (set (make-local-variable 'paragraph-start) (concat page-delimiter "\\|$")) + (set (make-local-variable 'paragraph-separate) paragraph-start) + (set (make-local-variable 'comment-start) "# ") + (set (make-local-variable 'comment-start-skip) "#+[\t ]*") + (set (make-local-variable 'local-abbrev-table) sh-mode-abbrev-table) + (set (make-local-variable 'comint-dynamic-complete-functions) + sh-dynamic-complete-functions) + ;; we can't look if previous line ended with `\' + (set (make-local-variable 'comint-prompt-regexp) "^[ \t]*") + (set (make-local-variable 'imenu-case-fold-search) nil) + (set (make-local-variable 'font-lock-defaults) + `((sh-font-lock-keywords + sh-font-lock-keywords-1 sh-font-lock-keywords-2) + nil nil + ((?/ . "w") (?~ . "w") (?. . "w") (?- . "w") (?_ . "w")) nil + (font-lock-syntactic-keywords . sh-font-lock-syntactic-keywords) + (font-lock-syntactic-face-function + . sh-font-lock-syntactic-face-function))) + (set (make-local-variable 'skeleton-pair-alist) '((?` _ ?`))) + (set (make-local-variable 'skeleton-pair-filter-function) 'sh-quoted-p) + (set (make-local-variable 'skeleton-further-elements) + '((< '(- (min sh-indentation (current-column)))))) + (set (make-local-variable 'skeleton-filter-function) 'sh-feature) + (set (make-local-variable 'skeleton-newline-indent-rigidly) t) + (set (make-local-variable 'sh-indent-supported-here) nil) (set (make-local-variable 'defun-prompt-regexp) (concat "^\\(function[ \t]\\|[[:alnum:]]+[ \t]+()[ \t]+\\)")) ;; Parse or insert magic number for exec, and set all variables depending @@ -1736,21 +1718,20 @@ no-query-flag insert-flag))) (let ((tem (sh-feature sh-require-final-newline))) (if (eq tem t) - (setq require-final-newline mode-require-final-newline))) - (setq - mode-line-process (format "[%s]" sh-shell) - sh-shell-variables nil - sh-shell-variables-initialized nil - imenu-generic-expression (sh-feature sh-imenu-generic-expression)) - (make-local-variable 'sh-mode-syntax-table) + (set (make-local-variable 'require-final-newline) + mode-require-final-newline))) + (setq mode-line-process (format "[%s]" sh-shell)) + (set (make-local-variable 'sh-shell-variables) nil) + (set (make-local-variable 'sh-shell-variables-initialized) nil) + (set (make-local-variable 'imenu-generic-expression) + (sh-feature sh-imenu-generic-expression)) (let ((tem (sh-feature sh-mode-syntax-table-input))) - (setq sh-mode-syntax-table - (if tem (apply 'sh-mode-syntax-table tem) - sh-mode-default-syntax-table))) - (set-syntax-table sh-mode-syntax-table) + (when tem + (set (make-local-variable 'sh-mode-syntax-table) + (apply 'sh-mode-syntax-table tem)) + (set-syntax-table sh-mode-syntax-table))) (dolist (var (sh-feature sh-variables)) (sh-remember-variable var)) - (make-local-variable 'indent-line-function) (if (setq sh-indent-supported-here (sh-feature sh-indent-supported)) (progn (message "Setting up indent for shell type %s" sh-shell) @@ -1763,7 +1744,7 @@ (message "setting up indent stuff") ;; sh-mode has already made indent-line-function local ;; but do it in case this is called before that. - (setq indent-line-function 'sh-indent-line) + (set (make-local-variable 'indent-line-function) 'sh-indent-line) (if sh-make-vars-local (sh-make-vars-local)) (message "Indentation setup for shell type %s" sh-shell)) @@ -3462,20 +3443,15 @@ nil means to return the best completion of STRING, or nil if there is none. t means to return a list of all possible completions of STRING. `lambda' means to return t if STRING is a valid completion as it stands." - (let ((sh-shell-variables + (let ((vars (with-current-buffer sh-add-buffer (or sh-shell-variables-initialized (sh-shell-initialize-variables)) (nconc (mapcar (lambda (var) - (let ((name - (substring var 0 (string-match "=" var)))) - (cons name name))) + (substring var 0 (string-match "=" var))) process-environment) sh-shell-variables)))) - (case code - ((nil) (try-completion string sh-shell-variables predicate)) - (lambda (test-completion string sh-shell-variables predicate)) - (t (all-completions string sh-shell-variables predicate))))) + (complete-with-action code vars string predicate))) (defun sh-add (var delta) "Insert an addition of VAR and prefix DELTA for Bourne (type) shell." ------------------------------------------------------------ revno: 100284 committer: Stefan Monnier branch nick: trunk timestamp: Fri 2010-05-14 13:53:42 -0400 message: * eval.c (specbind): Disallow let-binding frame-local vars. Remove left-over duplicate test. Add comment. diff: === modified file 'etc/NEWS' --- etc/NEWS 2010-05-14 16:41:01 +0000 +++ etc/NEWS 2010-05-14 17:53:42 +0000 @@ -221,6 +221,7 @@ * Lisp changes in Emacs 24.1 +** frame-local variables cannot be let-bound any more. ** prog-mode is a new major-mode meant to be the parent of programming mode. ** define-minor-mode accepts a new keyword :variable. === modified file 'src/ChangeLog' --- src/ChangeLog 2010-05-14 15:19:07 +0000 +++ src/ChangeLog 2010-05-14 17:53:42 +0000 @@ -1,3 +1,8 @@ +2010-05-14 Stefan Monnier + + * eval.c (specbind): Remove left-over duplicate test. + Disallow let-binding frame-local vars. Add comment. + 2010-05-14 Eli Zaretskii Make the cache of bidi iterator states dynamically allocated. @@ -5,7 +10,7 @@ (bidi_init_it): Call it. (bidi_cache_iterator_state): Enlarge the cache if needed. - * bidi.c (bidi_move_to_visually_next): Renamed from + * bidi.c (bidi_move_to_visually_next): Rename from bidi_get_next_char_visually. All callers changed. 2010-05-14 Kenichi Handa @@ -18,8 +23,8 @@ Set CMP_IT->reversed_p. (composition_update_it): Pay attention to CMP_IT->reversed_p. - * xdisp.c (set_iterator_to_next): Call - composition_compute_stop_pos with negative ENDPOS if we are + * xdisp.c (set_iterator_to_next): + Call composition_compute_stop_pos with negative ENDPOS if we are scanning backward. Call composition_compute_stop_pos if scan direction is changed. (next_element_from_buffer): Call composition_compute_stop_pos with === modified file 'src/eval.c' --- src/eval.c 2010-05-07 20:33:00 +0000 +++ src/eval.c 2010-05-14 17:53:42 +0000 @@ -3308,6 +3308,21 @@ specpdl_ptr = specpdl + count; } +/* specpdl_ptr->symbol is a field which describes which variable is + let-bound, so it can be properly undone when we unbind_to. + It can have the following two shapes: + - SYMBOL : if it's a plain symbol, it means that we have let-bound + a symbol that is not buffer-local (at least at the time + the let binding started). Note also that it should not be + aliased (i.e. when let-binding V1 that's aliased to V2, we want + to record V2 here). + - (SYMBOL WHERE . BUFFER) : this means that it is a let-binding for + variable SYMBOL which can be buffer-local. WHERE tells us + which buffer is affected (or nil if the let-binding affects the + global value of the variable) and BUFFER tells us which buffer was + current (i.e. if WHERE is non-nil, then BUFFER==WHERE, otherwise + BUFFER did not yet have a buffer-local value). */ + void specbind (symbol, value) Lisp_Object symbol, value; @@ -3339,7 +3354,10 @@ set_internal (symbol, value, Qnil, 1); break; } - case SYMBOL_LOCALIZED: case SYMBOL_FORWARDED: + case SYMBOL_LOCALIZED: + if (SYMBOL_BLV (sym)->frame_local) + error ("Frame-local vars cannot be let-bound"); + case SYMBOL_FORWARDED: { Lisp_Object ovalue = find_symbol_value (symbol); specpdl_ptr->func = 0; @@ -3376,6 +3394,7 @@ /* FIXME: The third value `current_buffer' is only used in let_shadows_buffer_binding_p which is itself only used in set_internal for local_if_set. */ + eassert (NILP (where) || EQ (where, cur_buf)); specpdl_ptr->symbol = Fcons (symbol, Fcons (where, cur_buf)); /* If SYMBOL is a per-buffer variable which doesn't have a @@ -3460,13 +3479,10 @@ Fset_default (symbol, this_binding.old_value); /* If `where' is non-nil, reset the value in the appropriate local binding, but only if that binding still exists. */ - else if (BUFFERP (where)) - { - if (BUFFERP (where) - ? !NILP (Flocal_variable_p (symbol, where)) - : !NILP (Fassq (symbol, XFRAME (where)->param_alist))) - set_internal (symbol, this_binding.old_value, where, 1); - } + else if (BUFFERP (where) + ? !NILP (Flocal_variable_p (symbol, where)) + : !NILP (Fassq (symbol, XFRAME (where)->param_alist))) + set_internal (symbol, this_binding.old_value, where, 1); } /* If variable has a trivial value (no forwarding), we can just set it. No need to check for constant symbols here, ------------------------------------------------------------ revno: 100283 committer: Stefan Monnier branch nick: trunk timestamp: Fri 2010-05-14 12:41:01 -0400 message: * simple.el (prog-mode): New (abstract) major mode. * emacs-lisp/lisp-mode.el (emacs-lisp-mode, lisp-mode): Use it. * progmodes/sh-script.el (sh-mode): Remove redundant var assignment. diff: === modified file 'etc/NEWS' --- etc/NEWS 2010-05-12 00:39:46 +0000 +++ etc/NEWS 2010-05-14 16:41:01 +0000 @@ -221,6 +221,7 @@ * Lisp changes in Emacs 24.1 +** prog-mode is a new major-mode meant to be the parent of programming mode. ** define-minor-mode accepts a new keyword :variable. ** delete-file now accepts an optional second arg, FORCE, which says === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-05-14 13:31:36 +0000 +++ lisp/ChangeLog 2010-05-14 16:41:01 +0000 @@ -1,3 +1,9 @@ +2010-05-14 Stefan Monnier + + * simple.el (prog-mode): New (abstract) major mode. + * emacs-lisp/lisp-mode.el (emacs-lisp-mode, lisp-mode): Use it. + * progmodes/sh-script.el (sh-mode): Remove redundant var assignment. + 2010-05-14 Juanma Barranquero * progmodes/sql.el (sql-oracle-program): Reflow docstring. @@ -24,8 +30,8 @@ only when the message would be displayed. Handled nested calls. (tramp-handle-load, tramp-handle-file-local-copy) (tramp-handle-insert-file-contents, tramp-handle-write-region) - (tramp-maybe-send-script, tramp-find-shell): Use - `with-progress-reporter'. + (tramp-maybe-send-script, tramp-find-shell): + Use `with-progress-reporter'. (tramp-handle-dired-compress-file, tramp-maybe-open-connection): Fix message text. === modified file 'lisp/emacs-lisp/lisp-mode.el' --- lisp/emacs-lisp/lisp-mode.el 2010-05-01 01:29:12 +0000 +++ lisp/emacs-lisp/lisp-mode.el 2010-05-14 16:41:01 +0000 @@ -221,8 +221,6 @@ ;;(set (make-local-variable 'adaptive-fill-mode) nil) (make-local-variable 'indent-line-function) (setq indent-line-function 'lisp-indent-line) - (make-local-variable 'parse-sexp-ignore-comments) - (setq parse-sexp-ignore-comments t) (make-local-variable 'outline-regexp) (setq outline-regexp ";;;\\(;* [^ \t\n]\\|###autoload\\)\\|(") (make-local-variable 'outline-level) @@ -431,7 +429,7 @@ :type 'hook :group 'lisp) -(define-derived-mode emacs-lisp-mode nil "Emacs-Lisp" +(define-derived-mode emacs-lisp-mode prog-mode "Emacs-Lisp" "Major mode for editing Lisp code to run in Emacs. Commands: Delete converts tabs to spaces as it moves back. @@ -466,7 +464,7 @@ "Keymap for ordinary Lisp mode. All commands in `lisp-mode-shared-map' are inherited by this map.") -(define-derived-mode lisp-mode nil "Lisp" +(define-derived-mode lisp-mode prog-mode "Lisp" "Major mode for editing Lisp code for Lisps other than GNU Emacs Lisp. Commands: Delete converts tabs to spaces as it moves back. === modified file 'lisp/progmodes/sh-script.el' --- lisp/progmodes/sh-script.el 2010-05-13 00:44:22 +0000 +++ lisp/progmodes/sh-script.el 2010-05-14 16:41:01 +0000 @@ -1583,7 +1583,6 @@ sh-indent-supported-here nil) (set (make-local-variable 'defun-prompt-regexp) (concat "^\\(function[ \t]\\|[[:alnum:]]+[ \t]+()[ \t]+\\)")) - (set (make-local-variable 'parse-sexp-ignore-comments) t) ;; Parse or insert magic number for exec, and set all variables depending ;; on the shell thus determined. (sh-set-shell === modified file 'lisp/simple.el' --- lisp/simple.el 2010-05-07 12:49:14 +0000 +++ lisp/simple.el 2010-05-14 16:41:01 +0000 @@ -422,6 +422,13 @@ "Parent major mode from which special major modes should inherit." (setq buffer-read-only t)) +;; Major mode meant to be the parent of programming modes. + +(define-derived-mode prog-mode fundamental-mode "Prog" + "Major mode for editing programming language source code." + (set (make-local-variable 'require-final-newline) mode-require-final-newline) + (set (make-local-variable 'parse-sexp-ignore-comments) t)) + ;; Making and deleting lines. (defvar hard-newline (propertize "\n" 'hard t 'rear-nonsticky '(hard)) ------------------------------------------------------------ revno: 100282 committer: Eli Zaretskii branch nick: trunk timestamp: Fri 2010-05-14 18:19:07 +0300 message: Make the cache of bidi iterator states dynamically allocated. bidi.c (bidi_cache_shrink): New function. (bidi_init_it): Call it. (bidi_cache_iterator_state): Enlarge the cache if needed. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-05-14 14:30:45 +0000 +++ src/ChangeLog 2010-05-14 15:19:07 +0000 @@ -1,5 +1,10 @@ 2010-05-14 Eli Zaretskii + Make the cache of bidi iterator states dynamically allocated. + (bidi_cache_shrink): New function. + (bidi_init_it): Call it. + (bidi_cache_iterator_state): Enlarge the cache if needed. + * bidi.c (bidi_move_to_visually_next): Renamed from bidi_get_next_char_visually. All callers changed. === modified file 'src/bidi.c' --- src/bidi.c 2010-05-14 14:30:45 +0000 +++ src/bidi.c 2010-05-14 15:19:07 +0000 @@ -540,9 +540,11 @@ /* Caching the bidi iterator states. */ -static struct bidi_it bidi_cache[1000]; /* FIXME: make this dynamically allocated! */ -static int bidi_cache_idx; -static int bidi_cache_last_idx; +#define BIDI_CACHE_CHUNK 200 +static struct bidi_it *bidi_cache; +static size_t bidi_cache_size = 0; +static int bidi_cache_idx; /* next unused cache slot */ +static int bidi_cache_last_idx; /* slot of last cache hit */ static INLINE void bidi_cache_reset (void) @@ -552,6 +554,17 @@ } static INLINE void +bidi_cache_shrink (void) +{ + if (bidi_cache_size > BIDI_CACHE_CHUNK) + { + bidi_cache_size = BIDI_CACHE_CHUNK * sizeof (struct bidi_it); + bidi_cache = (struct bidi_it *) xrealloc (bidi_cache, bidi_cache_size); + } + bidi_cache_reset (); +} + +static INLINE void bidi_cache_fetch_state (int idx, struct bidi_it *bidi_it) { int current_scan_dir = bidi_it->scan_dir; @@ -672,9 +685,13 @@ if (idx < 0) { idx = bidi_cache_idx; - /* Don't overrun the cache limit. */ - if (idx > sizeof (bidi_cache) / sizeof (bidi_cache[0]) - 1) - abort (); + /* Enlarge the cache as needed. */ + if (idx >= bidi_cache_size) + { + bidi_cache_size += BIDI_CACHE_CHUNK * sizeof (struct bidi_it); + bidi_cache = + (struct bidi_it *) xrealloc (bidi_cache, bidi_cache_size); + } /* Character positions should correspond to cache positions 1:1. If we are outside the range of cached positions, the cache is useless and must be reset. */ @@ -990,6 +1007,7 @@ bidi_it->prev_for_neutral.type_after_w1 = bidi_it->prev_for_neutral.orig_type = UNKNOWN_BT; bidi_it->sor = L2R; /* FIXME: should it be user-selectable? */ + bidi_cache_shrink (); } /* Push the current embedding level and override status; reset the ------------------------------------------------------------ revno: 100281 committer: Eli Zaretskii branch nick: trunk timestamp: Fri 2010-05-14 17:30:45 +0300 message: Rename bidi_get_next_char_visually to bidi_move_to_visually_next. bidi.c (bidi_move_to_visually_next): Renamed from bidi_get_next_char_visually. All callers changed. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-05-14 09:02:50 +0000 +++ src/ChangeLog 2010-05-14 14:30:45 +0000 @@ -1,3 +1,8 @@ +2010-05-14 Eli Zaretskii + + * bidi.c (bidi_move_to_visually_next): Renamed from + bidi_get_next_char_visually. All callers changed. + 2010-05-14 Kenichi Handa * dispextern.h (struct composition_it): New member reversed_p. === modified file 'src/bidi.c' --- src/bidi.c 2010-04-21 17:59:39 +0000 +++ src/bidi.c 2010-05-14 14:30:45 +0000 @@ -26,13 +26,13 @@ designed to be called once for every character in the buffer or string. - The main entry point is bidi_get_next_char_visually. Each time it + The main entry point is bidi_move_to_visually_next. Each time it is called, it finds the next character in the visual order, and returns its information in a special structure. The caller is then expected to process this character for display or any other - purposes, and call bidi_get_next_char_visually for the next - character. See the comments in bidi_get_next_char_visually for - more details about its algorithm that finds the next visual-order + purposes, and call bidi_move_to_visually_next for the next + character. See the comments in bidi_move_to_visually_next for more + details about its algorithm that finds the next visual-order character by resolving their levels on the fly. The two other entry points are bidi_paragraph_init and @@ -1876,7 +1876,7 @@ } void -bidi_get_next_char_visually (struct bidi_it *bidi_it) +bidi_move_to_visually_next (struct bidi_it *bidi_it) { int old_level, new_level, next_level; struct bidi_it sentinel; === modified file 'src/dispextern.h' --- src/dispextern.h 2010-05-14 04:14:23 +0000 +++ src/dispextern.h 2010-05-14 14:30:45 +0000 @@ -2868,7 +2868,7 @@ /* Defined in bidi.c */ extern void bidi_init_it P_ ((EMACS_INT, EMACS_INT, struct bidi_it *)); -extern void bidi_get_next_char_visually P_ ((struct bidi_it *)); +extern void bidi_move_to_visually_next P_ ((struct bidi_it *)); extern void bidi_paragraph_init P_ ((bidi_dir_t, struct bidi_it *)); extern int bidi_mirror_char P_ ((int)); === modified file 'src/xdisp.c' --- src/xdisp.c 2010-05-14 13:44:12 +0000 +++ src/xdisp.c 2010-05-14 14:30:45 +0000 @@ -184,7 +184,7 @@ reordering engine which is called by set_iterator_to_next and returns the next character to display in the visual order. See commentary on bidi.c for more details. As far as redisplay is - concerned, the effect of calling bidi_get_next_char_visually, the + concerned, the effect of calling bidi_move_to_visually_next, the main interface of the reordering engine, is that the iterator gets magically placed on the buffer or string position that is to be displayed next. In other words, a linear iteration through the @@ -3918,7 +3918,7 @@ } do { - bidi_get_next_char_visually (&it->bidi_it); + bidi_move_to_visually_next (&it->bidi_it); } while (it->stop_charpos <= it->bidi_it.charpos && it->bidi_it.charpos < newpos); @@ -5276,7 +5276,7 @@ while (it->bidi_it.charpos >= BEGV && it->prev_stop <= it->bidi_it.charpos && it->bidi_it.charpos < CHARPOS (it->position)) - bidi_get_next_char_visually (&it->bidi_it); + bidi_move_to_visually_next (&it->bidi_it); /* Record the stop_pos we just crossed, for when we cross it back, maybe. */ if (it->bidi_it.charpos > CHARPOS (it->position)) @@ -6311,7 +6311,7 @@ character of the next grapheme cluster, or to the character visually after the current composition. */ for (i = 0; i < it->cmp_it.nchars; i++) - bidi_get_next_char_visually (&it->bidi_it); + bidi_move_to_visually_next (&it->bidi_it); IT_BYTEPOS (*it) = it->bidi_it.bytepos; IT_CHARPOS (*it) = it->bidi_it.charpos; @@ -6339,7 +6339,7 @@ /* Update IT's char/byte positions to point to the last character of the previous grapheme cluster, or the character visually after the current composition. */ - bidi_get_next_char_visually (&it->bidi_it); + bidi_move_to_visually_next (&it->bidi_it); IT_BYTEPOS (*it) = it->bidi_it.bytepos; IT_CHARPOS (*it) = it->bidi_it.charpos; @@ -6378,7 +6378,7 @@ direction (a.k.a. its base embedding level). */ if (it->bidi_it.new_paragraph) bidi_paragraph_init (it->paragraph_embedding, &it->bidi_it); - bidi_get_next_char_visually (&it->bidi_it); + bidi_move_to_visually_next (&it->bidi_it); IT_BYTEPOS (*it) = it->bidi_it.bytepos; IT_CHARPOS (*it) = it->bidi_it.charpos; if (prev_scan_dir != it->bidi_it.scan_dir) @@ -6858,7 +6858,7 @@ /* If we are at the beginning of a line, we can produce the next element right away. */ bidi_paragraph_init (it->paragraph_embedding, &it->bidi_it); - bidi_get_next_char_visually (&it->bidi_it); + bidi_move_to_visually_next (&it->bidi_it); } else { @@ -6876,7 +6876,7 @@ { /* Now return to buffer position where we were asked to get the next display element, and produce that. */ - bidi_get_next_char_visually (&it->bidi_it); + bidi_move_to_visually_next (&it->bidi_it); } while (it->bidi_it.bytepos != orig_bytepos && it->bidi_it.bytepos < ZV_BYTE); @@ -7100,7 +7100,7 @@ /* Resync the bidi iterator with IT's new position. FIXME: this doesn't support bidirectional text. */ while (it->bidi_it.charpos < IT_CHARPOS (*it)) - bidi_get_next_char_visually (&it->bidi_it); + bidi_move_to_visually_next (&it->bidi_it); } return 0; } @@ -7116,7 +7116,7 @@ correct (struct glyph)->charpos. */ int i; for (i = 0; i < it->cmp_it.nchars - 1; i++) - bidi_get_next_char_visually (&it->bidi_it); + bidi_move_to_visually_next (&it->bidi_it); IT_CHARPOS (*it) = it->bidi_it.charpos; IT_BYTEPOS (*it) = it->bidi_it.bytepos; it->position = it->current.pos; ------------------------------------------------------------ revno: 100280 committer: Eli Zaretskii branch nick: trunk timestamp: Fri 2010-05-14 16:44:12 +0300 message: Fix comments from revno 100276. diff: === modified file 'src/composite.c' --- src/composite.c 2010-05-14 04:14:23 +0000 +++ src/composite.c 2010-05-14 13:44:12 +0000 @@ -1150,13 +1150,13 @@ /* Search backward for a pattern that may be composed and the position of (possibly) the last character of the match is closest to (but not after) START. The reason for the last - character is that set_iterator_to_next works in reverse order - and, thus we must stop at the last character for composition + character is that set_iterator_to_next works in reverse order, + and thus we must stop at the last character for composition check. */ unsigned char *p; int len; - /* limit byte position used in fast_looking_at. This is the - byte position of the next character of START. */ + /* Limit byte position used in fast_looking_at. This is the + byte position of the character after START. */ EMACS_INT limit; if (NILP (string)) @@ -1191,7 +1191,7 @@ len = 1; if (len > 0) { - /* Make CPOS points the last character of match. + /* Make CPOS point to the last character of match. Note that LEN is byte-length. */ bpos += len; if (NILP (string)) === modified file 'src/xdisp.c' --- src/xdisp.c 2010-05-14 04:15:58 +0000 +++ src/xdisp.c 2010-05-14 13:44:12 +0000 @@ -6307,29 +6307,14 @@ else if (! it->cmp_it.reversed_p) { /* Composition created while scanning forward. */ - /* Update IT's char/byte positions to point the first + /* Update IT's char/byte positions to point to the first character of the next grapheme cluster, or to the character visually after the current composition. */ -#if 0 - /* Is it ok to do this directly? */ - IT_CHARPOS (*it) += it->cmp_it.nchars; - IT_BYTEPOS (*it) += it->cmp_it.nbytes; -#else - /* Or do we have to call bidi_get_next_char_visually - repeatedly (perhaps not to confuse some internal - state of bidi_it)? At least we must do this if we - have consumed all grapheme clusters in the current - composition because the next character will be in the - different bidi level. */ for (i = 0; i < it->cmp_it.nchars; i++) bidi_get_next_char_visually (&it->bidi_it); - /* BTW, it seems that the name - bidi_get_next_char_visually is confusing because - it sounds like not advancing character position. - How about bidi_set_iterator_to_next? */ IT_BYTEPOS (*it) = it->bidi_it.bytepos; IT_CHARPOS (*it) = it->bidi_it.charpos; -#endif + if (it->cmp_it.to < it->cmp_it.nglyphs) { /* Proceed to the next grapheme cluster. */ @@ -6337,7 +6322,7 @@ } else { - /* No more grapheme cluster in this composition. + /* No more grapheme clusters in this composition. Find the next stop position. */ EMACS_INT stop = it->stop_charpos; if (it->bidi_it.scan_dir < 0) @@ -6351,7 +6336,7 @@ else { /* Composition created while scanning backward. */ - /* Update IT's char/byte positions to point the last + /* Update IT's char/byte positions to point to the last character of the previous grapheme cluster, or the character visually after the current composition. */ bidi_get_next_char_visually (&it->bidi_it); @@ -6365,7 +6350,7 @@ } else { - /* No more grapheme cluster in this composition. + /* No more grapheme clusters in this composition. Find the next stop position. */ EMACS_INT stop = it->stop_charpos; if (it->bidi_it.scan_dir < 0) @@ -6398,8 +6383,8 @@ IT_CHARPOS (*it) = it->bidi_it.charpos; if (prev_scan_dir != it->bidi_it.scan_dir) { - /* As scan direction was changed, we must re-compute - the stop position for composition. */ + /* As the scan direction was changed, we must + re-compute the stop position for composition. */ EMACS_INT stop = it->stop_charpos; if (it->bidi_it.scan_dir < 0) stop = -1; ------------------------------------------------------------ revno: 100279 committer: Juanma Barranquero branch nick: trunk timestamp: Fri 2010-05-14 15:31:36 +0200 message: * progmodes/sql.el: Fix typos in docstrings. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-05-13 21:52:20 +0000 +++ lisp/ChangeLog 2010-05-14 13:31:36 +0000 @@ -1,3 +1,12 @@ +2010-05-14 Juanma Barranquero + + * progmodes/sql.el (sql-oracle-program): Reflow docstring. + (sql-oracle-scan-on, sql-sybase-program, sql-product-font-lock) + (sql-add-product-keywords, sql-highlight-product, sql-set-product) + (sql-make-alternate-buffer-name, sql-placeholders-filter) + (sql-escape-newlines-filter, sql-input-sender) + (sql-send-magic-terminator, sql-sybase): Fix typos in docstrings. + 2010-05-13 Chong Yidong Add TeX open-block and close-block keybindings to SGML, and vice === modified file 'lisp/progmodes/sql.el' --- lisp/progmodes/sql.el 2010-05-10 02:07:58 +0000 +++ lisp/progmodes/sql.el 2010-05-14 13:31:36 +0000 @@ -663,9 +663,9 @@ Starts `sql-interactive-mode' after doing some setup. -On Windows, \"sqlplus\" usually starts the sqlplus \"GUI\". In order to -start the sqlplus console, use \"plus33\" or something similar. You -will find the file in your Orant\\bin directory." +On Windows, \"sqlplus\" usually starts the sqlplus \"GUI\". In order +to start the sqlplus console, use \"plus33\" or something similar. +You will find the file in your Orant\\bin directory." :type 'file :group 'SQL) @@ -690,7 +690,7 @@ When non-nil, Emacs will scan text sent to sqlplus and prompt for replacement text for & placeholders as sqlplus does. This -is needed on Windows where sqlplus output is buffer and the +is needed on Windows where sqlplus output is buffered and the prompts are not shown until after the text is entered. You will probably want to issue the following command in sqlplus @@ -772,10 +772,10 @@ :version "24.1" :group 'SQL) -;; Customization for SyBase +;; Customization for Sybase (defcustom sql-sybase-program "isql" - "Command to start isql by SyBase. + "Command to start isql by Sybase. Starts `sql-interactive-mode' after doing some setup." :type 'file @@ -2042,7 +2042,7 @@ (message "`%s' is not a known product; use `sql-add-product' to add it first." product)))) (defun sql-product-font-lock (keywords-only imenu) - "Configures font-lock and imenu with product-specific settings. + "Configure font-lock and imenu with product-specific settings. The KEYWORDS-ONLY flag is passed to font-lock to specify whether only keywords should be hilighted and syntactic hilighting @@ -2098,7 +2098,7 @@ (defun sql-add-product-keywords (product keywords &optional append) "Add highlighting KEYWORDS for SQL PRODUCT. -PRODUCT should be a symbol, the name of a sql product, such as +PRODUCT should be a symbol, the name of a SQL product, such as `oracle'. KEYWORDS should be a list; see the variable `font-lock-keywords'. By default they are added at the beginning of the current highlighting list. If optional argument APPEND is @@ -2131,7 +2131,7 @@ ;;; Functions to switch highlighting (defun sql-highlight-product () - "Turns on the font highlighting for the SQL product selected." + "Turn on the font highlighting for the SQL product selected." (when (derived-mode-p 'sql-mode) ;; Setup font-lock (sql-product-font-lock nil t) @@ -2141,7 +2141,7 @@ (symbol-name sql-product)) "]")))) (defun sql-set-product (product) - "Set `sql-product' to product and enable appropriate highlighting." + "Set `sql-product' to PRODUCT and enable appropriate highlighting." (interactive (list (completing-read "SQL product: " (mapcar (lambda (info) (symbol-name (car info))) @@ -2416,7 +2416,7 @@ (message "Current SQLi buffer is %s." (buffer-name sql-buffer))))) (defun sql-make-alternate-buffer-name () - "Returns a string that can be used to rename a SQLi buffer. + "Return a string that can be used to rename a SQLi buffer. This is used to set `sql-alternate-buffer-name' within `sql-interactive-mode'." @@ -2475,7 +2475,7 @@ (defun sql-placeholders-filter (string) "Replace placeholders in STRING. -Placeholders are words starting with and ampersand like &this." +Placeholders are words starting with an ampersand like &this." (when sql-oracle-scan-on (while (string-match "&\\(\\sw+\\)" string) @@ -2489,7 +2489,7 @@ ;; Using DB2 interactively, newlines must be escaped with " \". ;; The space before the backslash is relevant. (defun sql-escape-newlines-filter (string) - "Escapes newlines in STRING. + "Escape newlines in STRING. Every newline in STRING will be preceded with a space and a backslash." (let ((result "") (start 0) mb me) (while (string-match "\n" string start) @@ -2508,7 +2508,7 @@ ;;; Input sender for SQLi buffers (defun sql-input-sender (proc string) - "Sends STRING to PROC after applying filters." + "Send STRING to PROC after applying filters." (let* ((product (with-current-buffer (process-buffer proc) sql-product)) (filter (sql-get-product-feature product :input-filter))) @@ -2575,7 +2575,7 @@ (sql-send-region (point-min) (point-max))) (defun sql-send-magic-terminator (buf str terminator) - "Sends TERMINATOR to buffer BUF if its not present in STR." + "Send TERMINATOR to buffer BUF if its not present in STR." (let (pat term) ;; If flag is merely on(t), get product-specific terminator (if (eq terminator t) @@ -2961,7 +2961,7 @@ ;;;###autoload (defun sql-sybase () - "Run isql by SyBase as an inferior process. + "Run isql by Sybase as an inferior process. If buffer `*SQL*' exists but no process is running, make a new process. If buffer exists and a process is running, just switch to buffer ------------------------------------------------------------ revno: 100278 committer: Eli Zaretskii branch nick: trunk timestamp: Fri 2010-05-14 12:02:50 +0300 message: Fix spelling and remove merge marks due to revno 100276. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-05-14 07:29:06 +0000 +++ src/ChangeLog 2010-05-14 09:02:50 +0000 @@ -6,7 +6,7 @@ ENDPOS < CHARPOS. (composition_reseat_it): Handle the case that ENDPOS < CHARPOS. Set CMP_IT->reversed_p. - (composition_update_it): Pay attention ot CMP_IT->reversed_p. + (composition_update_it): Pay attention to CMP_IT->reversed_p. * xdisp.c (set_iterator_to_next): Call composition_compute_stop_pos with negative ENDPOS if we are @@ -102,7 +102,6 @@ * xdisp.c (init_iterator): Don't turn on bidi reordering in unibyte buffers. See http://lists.gnu.org/archive/html/emacs-devel/2010-05/msg00263.html. ->>>>>>> MERGE-SOURCE 2010-05-10 Glenn Morris ------------------------------------------------------------ revno: 100277 [merge] committer: Katsumi Yamaoka branch nick: trunk timestamp: Fri 2010-05-14 07:49:16 +0000 message: Synch with Gnus trunk. (gnus-summary-save-article): Don't bother to re-fetch article unless decoding article to be saved. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2010-05-13 05:59:23 +0000 +++ lisp/gnus/ChangeLog 2010-05-14 07:48:21 +0000 @@ -1,3 +1,8 @@ +2010-05-14 Katsumi Yamaoka + + * gnus-sum.el (gnus-summary-save-article): Don't bother to re-fetch + article unless decoding article to be saved. + 2010-05-13 Katsumi Yamaoka * mml1991.el (mml1991-mailcrypt-encrypt, mml1991-gpg-encrypt) === modified file 'lisp/gnus/gnus-sum.el' --- lisp/gnus/gnus-sum.el 2010-05-12 14:09:25 +0000 +++ lisp/gnus/gnus-sum.el 2010-05-14 07:48:21 +0000 @@ -11664,12 +11664,8 @@ (gnus-message 1 "Article %d is unsaveable" article)) ;; This is a real article. (save-window-excursion - (let ((gnus-display-mime-function (when decode - gnus-display-mime-function)) - (gnus-article-prepare-hook (when decode - gnus-article-prepare-hook))) - (gnus-summary-select-article t t nil article) - (gnus-summary-goto-subject article))) + (gnus-summary-select-article decode decode nil article) + (gnus-summary-goto-subject article)) (with-current-buffer save-buffer (erase-buffer) (insert-buffer-substring (if decode ------------------------------------------------------------ revno: 100276 [merge] committer: Kenichi Handa branch nick: trunk timestamp: Fri 2010-05-14 16:30:39 +0900 message: Fix bidi-composition interaction. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-05-14 04:23:23 +0000 +++ src/ChangeLog 2010-05-14 07:29:06 +0000 @@ -1,5 +1,24 @@ 2010-05-14 Kenichi Handa + * dispextern.h (struct composition_it): New member reversed_p. + + * composite.c (composition_compute_stop_pos): Search backward if + ENDPOS < CHARPOS. + (composition_reseat_it): Handle the case that ENDPOS < CHARPOS. + Set CMP_IT->reversed_p. + (composition_update_it): Pay attention ot CMP_IT->reversed_p. + + * xdisp.c (set_iterator_to_next): Call + composition_compute_stop_pos with negative ENDPOS if we are + scanning backward. Call composition_compute_stop_pos if scan + direction is changed. + (next_element_from_buffer): Call composition_compute_stop_pos with + negative ENDPOS if we are scanning backward. + (next_element_from_composition): Pay attention to + IT->cmp_it.reversed_p. + +2010-05-14 Kenichi Handa + * font.c (font_range): Return the range for the font found at first. @@ -83,6 +102,7 @@ * xdisp.c (init_iterator): Don't turn on bidi reordering in unibyte buffers. See http://lists.gnu.org/archive/html/emacs-devel/2010-05/msg00263.html. +>>>>>>> MERGE-SOURCE 2010-05-10 Glenn Morris === modified file 'src/composite.c' --- src/composite.c 2010-05-08 18:47:07 +0000 +++ src/composite.c 2010-05-14 04:14:23 +0000 @@ -1018,12 +1018,29 @@ return unbind_to (count, Qnil); } +static Lisp_Object _work_val; +static int _work_char; + +/* 1 iff the character C is composable. */ +#define CHAR_COMPOSABLE_P(C) \ + ((C) == 0x200C || (C) == 0x200D \ + || (_work_val = CHAR_TABLE_REF (Vunicode_category_table, (C)), \ + (SYMBOLP (_work_val) \ + && (_work_char = SDATA (SYMBOL_NAME (_work_val))[0]) != 'C' \ + && _work_char != 'Z'))) /* Update cmp_it->stop_pos to the next position after CHARPOS (and BYTEPOS) where character composition may happen. If BYTEPOS is - negative, compute it. If it is a static composition, set - cmp_it->ch to -1. Otherwise, set cmp_it->ch to the character that - triggers a automatic composition. */ + negative, compute it. ENDPOS is a limit of searching. If it is + less than CHARPOS, search backward to ENDPOS+1 assuming that + set_iterator_to_next works in reverse order. In this case, if a + composition closest to CHARPOS is found, set cmp_it->stop_pos to + the last character of the composition. + + If no composition is found, set cmp_it->ch to -2. If a static + composition is found, set cmp_it->ch to -1. Otherwise, set + cmp_it->ch to the character that triggers the automatic + composition. */ void composition_compute_stop_pos (cmp_it, charpos, bytepos, endpos, string) @@ -1036,60 +1053,200 @@ /* This is from forward_to_next_line_start in xdisp.c. */ const int MAX_NEWLINE_DISTANCE = 500; - if (endpos > charpos + MAX_NEWLINE_DISTANCE) - endpos = charpos + MAX_NEWLINE_DISTANCE; - cmp_it->stop_pos = endpos; + if (charpos < endpos) + { + if (endpos > charpos + MAX_NEWLINE_DISTANCE) + endpos = charpos + MAX_NEWLINE_DISTANCE; + } + else if (endpos < charpos) + { + /* We search backward for a position to check composition. */ + if (endpos < 0) + { + /* But we don't know where to stop the searching. */ + endpos = NILP (string) ? BEGV - 1 : -1; + /* Usually we don't reach ENDPOS because we stop searching + at an uncomposable character (NL, LRE, etc). */ + } + } cmp_it->id = -1; cmp_it->ch = -2; - if (find_composition (charpos, endpos, &start, &end, &prop, string) + cmp_it->reversed_p = 0; + cmp_it->stop_pos = endpos; + if (charpos == endpos) + return; + /* FIXME: Bidi is not yet handled well in static composition. */ + if (charpos < endpos + && find_composition (charpos, endpos, &start, &end, &prop, string) && COMPOSITION_VALID_P (start, end, prop)) { cmp_it->stop_pos = endpos = start; cmp_it->ch = -1; } - if (NILP (string) && PT > charpos && PT < endpos) - cmp_it->stop_pos = PT; + if (NILP (string)) + { + /* A composition never strides over PT. */ + if (PT > charpos) + { + if (PT < endpos) + cmp_it->stop_pos = endpos = PT; + } + else if (PT < charpos && PT > endpos) + { + cmp_it->stop_pos = endpos = PT - 1; + } + } if (NILP (current_buffer->enable_multibyte_characters) || NILP (Vauto_composition_mode)) return; if (bytepos < 0) { - if (STRINGP (string)) + if (NILP (string)) + bytepos = CHAR_TO_BYTE (charpos); + else bytepos = string_char_to_byte (string, charpos); - else - bytepos = CHAR_TO_BYTE (charpos); } start = charpos; - while (charpos < endpos) - { - if (STRINGP (string)) - FETCH_STRING_CHAR_ADVANCE (c, string, charpos, bytepos); - else - FETCH_CHAR_ADVANCE (c, charpos, bytepos); - if (c == '\n') - { - cmp_it->ch = -2; - break; - } - val = CHAR_TABLE_REF (Vcomposition_function_table, c); - if (! NILP (val)) - { - Lisp_Object elt; - - for (; CONSP (val); val = XCDR (val)) - { - elt = XCAR (val); - if (VECTORP (elt) && ASIZE (elt) == 3 && NATNUMP (AREF (elt, 1)) - && charpos - 1 - XFASTINT (AREF (elt, 1)) >= start) - break; - } - if (CONSP (val)) - { - cmp_it->lookback = XFASTINT (AREF (elt, 1)); - cmp_it->stop_pos = charpos - 1 - cmp_it->lookback; - cmp_it->ch = c; - return; + if (charpos < endpos) + { + /* Forward search. */ + while (charpos < endpos) + { + if (STRINGP (string)) + FETCH_STRING_CHAR_ADVANCE (c, string, charpos, bytepos); + else + FETCH_CHAR_ADVANCE (c, charpos, bytepos); + if (c == '\n') + { + cmp_it->ch = -2; + break; + } + val = CHAR_TABLE_REF (Vcomposition_function_table, c); + if (! NILP (val)) + { + Lisp_Object elt; + + for (; CONSP (val); val = XCDR (val)) + { + elt = XCAR (val); + if (VECTORP (elt) && ASIZE (elt) == 3 + && NATNUMP (AREF (elt, 1)) + && charpos - 1 - XFASTINT (AREF (elt, 1)) >= start) + break; + } + if (CONSP (val)) + { + cmp_it->lookback = XFASTINT (AREF (elt, 1)); + cmp_it->stop_pos = charpos - 1 - cmp_it->lookback; + cmp_it->ch = c; + return; + } + } + } + } + else + { + /* Search backward for a pattern that may be composed and the + position of (possibly) the last character of the match is + closest to (but not after) START. The reason for the last + character is that set_iterator_to_next works in reverse order + and, thus we must stop at the last character for composition + check. */ + unsigned char *p; + int len; + /* limit byte position used in fast_looking_at. This is the + byte position of the next character of START. */ + EMACS_INT limit; + + if (NILP (string)) + p = BYTE_POS_ADDR (bytepos); + else + p = SDATA (string) + bytepos; + c = STRING_CHAR_AND_LENGTH (p, len); + limit = bytepos + len; + while (CHAR_COMPOSABLE_P (c)) + { + for (val = CHAR_TABLE_REF (Vcomposition_function_table, c); + CONSP (val); val = XCDR (val)) + { + Lisp_Object elt = XCAR (val); + int back, len; + + if (VECTORP (elt) && ASIZE (elt) == 3 + && NATNUMP (AREF (elt, 1)) + && charpos - (back = XFASTINT (AREF (elt, 1))) > endpos) + { + EMACS_INT cpos = charpos - back, bpos; + + if (back == 0) + bpos = bytepos; + else + bpos = (NILP (string) ? CHAR_TO_BYTE (cpos) + : string_char_to_byte (string, cpos)); + if (STRINGP (AREF (elt, 0))) + len = fast_looking_at (AREF (elt, 0), cpos, bpos, + start + 1, limit, string); + else + len = 1; + if (len > 0) + { + /* Make CPOS points the last character of match. + Note that LEN is byte-length. */ + bpos += len; + if (NILP (string)) + cpos = BYTE_TO_CHAR (bpos) - 1; + else + cpos = string_byte_to_char (string, bpos) - 1; + back = cpos - (charpos - back); + if (cmp_it->stop_pos < cpos + || (cmp_it->stop_pos == cpos + && cmp_it->lookback < back)) + { + cmp_it->stop_pos = cpos; + cmp_it->ch = c; + cmp_it->lookback = back; + } + } + } + } + if (charpos - 1 == endpos) + break; + if (STRINGP (string)) + { + p--, bytepos--; + while (! CHAR_HEAD_P (*p)) + p--, bytepos--; + charpos--; + } + else + { + DEC_BOTH (charpos, bytepos); + p = BYTE_POS_ADDR (bytepos); + } + c = STRING_CHAR (p); + } + if (cmp_it->ch >= 0) + /* We found a position to check. */ + return; + /* Skip all uncomposable characters. */ + if (NILP (string)) + { + while (charpos - 1 > endpos && ! CHAR_COMPOSABLE_P (c)) + { + DEC_BOTH (charpos, bytepos); + c = FETCH_MULTIBYTE_CHAR (bytepos); + } + } + else + { + while (charpos - 1 > endpos && ! CHAR_COMPOSABLE_P (c)) + { + p--; + while (! CHAR_HEAD_P (*p)) + p--; + charpos--; + c = STRING_CHAR (p); } } } @@ -1104,8 +1261,8 @@ string. In that case, FACE must not be NULL. If the character is composed, setup members of CMP_IT (id, nglyphs, - and from), and return 1. Otherwise, update CMP_IT->stop_pos, and - return 0. */ + from, to, reversed_p), and return 1. Otherwise, update + CMP_IT->stop_pos, and return 0. */ int composition_reseat_it (cmp_it, charpos, bytepos, endpos, w, face, string) @@ -1115,13 +1272,29 @@ struct face *face; Lisp_Object string; { - if (NILP (string) && charpos < PT && PT < endpos) - endpos = PT; + if (endpos <= charpos) + { + if (NILP (string)) + { + if (endpos < 0) + endpos = BEGV; + if (endpos < PT && PT < charpos) + endpos = PT; + } + else if (endpos < 0) + endpos = 0; + } + else + { + if (NILP (string) && charpos < PT && PT < endpos) + endpos = PT; + } if (cmp_it->ch == -2) { composition_compute_stop_pos (cmp_it, charpos, bytepos, endpos, string); - if (cmp_it->ch == -2) + if (cmp_it->stop_pos != charpos) + /* The current position is not composed. */ return 0; } @@ -1145,18 +1318,46 @@ int i; val = CHAR_TABLE_REF (Vcomposition_function_table, cmp_it->ch); - for (; CONSP (val); val = XCDR (val)) - { - elt = XCAR (val); - if (cmp_it->lookback == XFASTINT (AREF (elt, 1))) - break; - } - if (NILP (val)) - goto no_composition; - - val = autocmp_chars (val, charpos, bytepos, endpos, w, face, string); - if (! composition_gstring_p (val)) - goto no_composition; + if (charpos < endpos) + { + for (; CONSP (val); val = XCDR (val)) + { + elt = XCAR (val); + if (cmp_it->lookback == XFASTINT (AREF (elt, 1))) + break; + } + if (NILP (val)) + goto no_composition; + + val = autocmp_chars (val, charpos, bytepos, endpos, w, face, string); + if (! composition_gstring_p (val)) + goto no_composition; + cmp_it->reversed_p = 0; + } + else + { + EMACS_INT saved_charpos = charpos, saved_bytepos = bytepos; + + if (cmp_it->lookback > 0) + { + charpos -= cmp_it->lookback; + if (charpos < endpos) + goto no_composition; + if (STRINGP (string)) + bytepos = string_char_to_byte (string, charpos); + else + bytepos = CHAR_TO_BYTE (charpos); + } + val = autocmp_chars (val, charpos, bytepos, saved_charpos + 1, + w, face, string); + if (! composition_gstring_p (val) + || charpos + LGSTRING_CHAR_LEN (val) <= saved_charpos) + { + charpos = saved_charpos, bytepos = saved_bytepos; + goto no_composition; + } + cmp_it->reversed_p = 1; + } if (NILP (LGSTRING_ID (val))) val = composition_gstring_put_cache (val, -1); cmp_it->id = XINT (LGSTRING_ID (val)); @@ -1164,22 +1365,40 @@ if (NILP (LGSTRING_GLYPH (val, i))) break; cmp_it->nglyphs = i; + cmp_it->from = 0; + cmp_it->to = i; } else goto no_composition; - cmp_it->from = 0; return 1; no_composition: - charpos++; - if (STRINGP (string)) - bytepos += MULTIBYTE_LENGTH_NO_CHECK (SDATA (string) + bytepos); + if (charpos == endpos) + return 0; + if (charpos < endpos) + { + charpos++; + if (STRINGP (string)) + bytepos += MULTIBYTE_LENGTH_NO_CHECK (SDATA (string) + bytepos); + else + INC_POS (bytepos); + } else - INC_POS (bytepos); + { + charpos--; + /* BYTEPOS is calculated in composition_compute_stop_pos */ + bytepos = -1; + } composition_compute_stop_pos (cmp_it, charpos, bytepos, endpos, string); return 0; } +/* Update nchars, nbytes, and width of the current grapheme cluster + which is identified by CMP_IT->from (if the composition is static + or automatic in l2r context) or CMPT_IT->to (if the composition is + automatic in r2l context). In addition, in the former case, update + CMP_IT->to, and in the latter case, update CMP_IT->from. */ + int composition_update_it (cmp_it, charpos, bytepos, string) struct composition_it *cmp_it; @@ -1215,7 +1434,7 @@ cmp_it->nchars = LGSTRING_CHAR_LEN (gstring); cmp_it->width = 0; } - else + else if (! cmp_it->reversed_p) { Lisp_Object glyph = LGSTRING_GLYPH (gstring, cmp_it->from); int from = LGLYPH_FROM (glyph); @@ -1234,6 +1453,33 @@ cmp_it->width += CHAR_WIDTH (LGLYPH_CHAR (glyph)); } } + else + { + int from_idx = cmp_it->to - 1; + Lisp_Object glyph = LGSTRING_GLYPH (gstring, from_idx); + int from = LGLYPH_FROM (glyph); + + c = XINT (LGSTRING_CHAR (gstring, from)); + cmp_it->nchars = LGLYPH_TO (glyph) - from + 1; + cmp_it->width = (LGLYPH_WIDTH (glyph) > 0 + ? CHAR_WIDTH (LGLYPH_CHAR (glyph)) : 0); + for (from_idx--; from_idx >= 0; from_idx--) + { + glyph = LGSTRING_GLYPH (gstring, from_idx); + if (LGLYPH_FROM (glyph) != from) + break; + if (LGLYPH_WIDTH (glyph) > 0) + cmp_it->width += CHAR_WIDTH (LGLYPH_CHAR (glyph)); + } + cmp_it->from = from_idx + 1; + charpos -= cmp_it->nchars - 1; + bytepos += CHAR_BYTES (c); + if (STRINGP (string)) + cmp_it->nbytes = bytepos - string_char_to_byte (string, charpos); + else + cmp_it->nbytes = bytepos - CHAR_TO_BYTE (charpos); + return c; + } } charpos += cmp_it->nchars; @@ -1279,17 +1525,6 @@ (POSITION).pos--; \ } while (0) -static Lisp_Object _work_val; -static int _work_char; - -/* 1 iff the character C is composable. */ -#define CHAR_COMPOSABLE_P(C) \ - ((C) == 0x200C || (C) == 0x200D \ - || (_work_val = CHAR_TABLE_REF (Vunicode_category_table, (C)), \ - (SYMBOLP (_work_val) \ - && (_work_char = SDATA (SYMBOL_NAME (_work_val))[0]) != 'C' \ - && _work_char != 'Z'))) - /* This is like find_composition, but find an automatic composition instead. If found, set *GSTRING to the glyph-string representing the composition, and return 1. Otherwise, return 0. */ === modified file 'src/dispextern.h' --- src/dispextern.h 2010-04-23 17:48:22 +0000 +++ src/dispextern.h 2010-05-14 04:14:23 +0000 @@ -1987,6 +1987,10 @@ graphic display and in units of canonical characters on a terminal display. */ int width; + /* Nonzero iff the composition is created while buffer is scanned in + reverse order, and thus the grapheme clusters must be rendered + from the last to the first. */ + int reversed_p; }; struct it === modified file 'src/xdisp.c' --- src/xdisp.c 2010-05-11 17:52:18 +0000 +++ src/xdisp.c 2010-05-14 04:15:58 +0000 @@ -6285,25 +6285,96 @@ reseat_at_next_visible_line_start (it, 0); else if (it->cmp_it.id >= 0) { - IT_CHARPOS (*it) += it->cmp_it.nchars; - IT_BYTEPOS (*it) += it->cmp_it.nbytes; - if (it->bidi_p) - { - if (it->bidi_it.new_paragraph) - bidi_paragraph_init (it->paragraph_embedding, &it->bidi_it); - /* Resync the bidi iterator with IT's new position. - FIXME: this doesn't support bidirectional text. */ - while (it->bidi_it.charpos < IT_CHARPOS (*it)) + /* We are currently getting glyphs from a composition. */ + int i; + + if (! it->bidi_p) + { + IT_CHARPOS (*it) += it->cmp_it.nchars; + IT_BYTEPOS (*it) += it->cmp_it.nbytes; + if (it->cmp_it.to < it->cmp_it.nglyphs) + { + it->cmp_it.from = it->cmp_it.to; + } + else + { + it->cmp_it.id = -1; + composition_compute_stop_pos (&it->cmp_it, IT_CHARPOS (*it), + IT_BYTEPOS (*it), + it->stop_charpos, Qnil); + } + } + else if (! it->cmp_it.reversed_p) + { + /* Composition created while scanning forward. */ + /* Update IT's char/byte positions to point the first + character of the next grapheme cluster, or to the + character visually after the current composition. */ +#if 0 + /* Is it ok to do this directly? */ + IT_CHARPOS (*it) += it->cmp_it.nchars; + IT_BYTEPOS (*it) += it->cmp_it.nbytes; +#else + /* Or do we have to call bidi_get_next_char_visually + repeatedly (perhaps not to confuse some internal + state of bidi_it)? At least we must do this if we + have consumed all grapheme clusters in the current + composition because the next character will be in the + different bidi level. */ + for (i = 0; i < it->cmp_it.nchars; i++) bidi_get_next_char_visually (&it->bidi_it); + /* BTW, it seems that the name + bidi_get_next_char_visually is confusing because + it sounds like not advancing character position. + How about bidi_set_iterator_to_next? */ + IT_BYTEPOS (*it) = it->bidi_it.bytepos; + IT_CHARPOS (*it) = it->bidi_it.charpos; +#endif + if (it->cmp_it.to < it->cmp_it.nglyphs) + { + /* Proceed to the next grapheme cluster. */ + it->cmp_it.from = it->cmp_it.to; + } + else + { + /* No more grapheme cluster in this composition. + Find the next stop position. */ + EMACS_INT stop = it->stop_charpos; + if (it->bidi_it.scan_dir < 0) + /* Now we are scanning backward and don't know + where to stop. */ + stop = -1; + composition_compute_stop_pos (&it->cmp_it, IT_CHARPOS (*it), + IT_BYTEPOS (*it), stop, Qnil); + } } - if (it->cmp_it.to < it->cmp_it.nglyphs) - it->cmp_it.from = it->cmp_it.to; else { - it->cmp_it.id = -1; - composition_compute_stop_pos (&it->cmp_it, IT_CHARPOS (*it), - IT_BYTEPOS (*it), it->stop_charpos, - Qnil); + /* Composition created while scanning backward. */ + /* Update IT's char/byte positions to point the last + character of the previous grapheme cluster, or the + character visually after the current composition. */ + bidi_get_next_char_visually (&it->bidi_it); + IT_BYTEPOS (*it) = it->bidi_it.bytepos; + IT_CHARPOS (*it) = it->bidi_it.charpos; + + if (it->cmp_it.from > 0) + { + /* Proceed to the previous grapheme cluster. */ + it->cmp_it.to = it->cmp_it.from; + } + else + { + /* No more grapheme cluster in this composition. + Find the next stop position. */ + EMACS_INT stop = it->stop_charpos; + if (it->bidi_it.scan_dir < 0) + /* Now we are scanning backward and don't know + where to stop. */ + stop = -1; + composition_compute_stop_pos (&it->cmp_it, IT_CHARPOS (*it), + IT_BYTEPOS (*it), stop, Qnil); + } } } else @@ -6317,6 +6388,7 @@ } else { + int prev_scan_dir = it->bidi_it.scan_dir; /* If this is a new paragraph, determine its base direction (a.k.a. its base embedding level). */ if (it->bidi_it.new_paragraph) @@ -6324,6 +6396,16 @@ bidi_get_next_char_visually (&it->bidi_it); IT_BYTEPOS (*it) = it->bidi_it.bytepos; IT_CHARPOS (*it) = it->bidi_it.charpos; + if (prev_scan_dir != it->bidi_it.scan_dir) + { + /* As scan direction was changed, we must re-compute + the stop position for composition. */ + EMACS_INT stop = it->stop_charpos; + if (it->bidi_it.scan_dir < 0) + stop = -1; + composition_compute_stop_pos (&it->cmp_it, IT_CHARPOS (*it), + IT_BYTEPOS (*it), stop, Qnil); + } } xassert (IT_BYTEPOS (*it) == CHAR_TO_BYTE (IT_CHARPOS (*it))); } @@ -6820,6 +6902,13 @@ IT_CHARPOS (*it) = it->bidi_it.charpos; IT_BYTEPOS (*it) = it->bidi_it.bytepos; SET_TEXT_POS (it->position, IT_CHARPOS (*it), IT_BYTEPOS (*it)); + { + EMACS_INT stop = it->stop_charpos; + if (it->bidi_it.scan_dir < 0) + stop = -1; + composition_compute_stop_pos (&it->cmp_it, IT_CHARPOS (*it), + IT_BYTEPOS (*it), stop, Qnil); + } } if (IT_CHARPOS (*it) >= it->stop_charpos) @@ -6897,6 +6986,7 @@ /* No face changes, overlays etc. in sight, so just return a character from current_buffer. */ unsigned char *p; + EMACS_INT stop; /* Maybe run the redisplay end trigger hook. Performance note: This doesn't seem to cost measurable time. */ @@ -6905,8 +6995,9 @@ && IT_CHARPOS (*it) >= it->redisplay_end_trigger_charpos) run_redisplay_end_trigger_hook (it); + stop = it->bidi_it.scan_dir < 0 ? -1 : it->end_charpos; if (CHAR_COMPOSED_P (it, IT_CHARPOS (*it), IT_BYTEPOS (*it), - it->end_charpos) + stop) && next_element_from_composition (it)) { return 1; @@ -7032,6 +7123,19 @@ it->object = it->w->buffer; it->c = composition_update_it (&it->cmp_it, IT_CHARPOS (*it), IT_BYTEPOS (*it), Qnil); + if (it->cmp_it.reversed_p) + { + /* Now it->position points the last character of the current + grapheme cluster. Adjust it to point the first one. We + have to do it here so that append_composite_glyph sets + correct (struct glyph)->charpos. */ + int i; + for (i = 0; i < it->cmp_it.nchars - 1; i++) + bidi_get_next_char_visually (&it->bidi_it); + IT_CHARPOS (*it) = it->bidi_it.charpos; + IT_BYTEPOS (*it) = it->bidi_it.bytepos; + it->position = it->current.pos; + } } return 1; } ------------------------------------------------------------ revno: 100275 committer: Glenn Morris branch nick: trunk timestamp: Thu 2010-05-13 21:23:23 -0700 message: No harm in always defining some ns_ Makefile variables. * src/Makefile.in (ns_appdir, ns_appbindir, ns_appsrc): Always define. * msdos/sed1v2.inp (ns_appdir, ns_appbindir, ns_appsrc): Edit to empty. diff: === modified file 'msdos/ChangeLog' --- msdos/ChangeLog 2010-05-14 03:13:39 +0000 +++ msdos/ChangeLog 2010-05-14 04:23:23 +0000 @@ -1,5 +1,7 @@ 2010-05-14 Glenn Morris + * sed1v2.inp (ns_appdir, ns_appbindir, ns_appsrc): Edit to empty. + * sed1v2.inp (MSDOS_OBJ): Edit to dosfns.o msdos.o. (MSDOS_SUPPORT): Edit to $(MSDOS_SUPPORT_REAL). * sed1x.inp (MSDOS_X_OBJ): Edit to w16select.o termcap.o. === modified file 'msdos/sed1v2.inp' --- msdos/sed1v2.inp 2010-05-14 03:13:39 +0000 +++ msdos/sed1v2.inp 2010-05-14 04:23:23 +0000 @@ -91,6 +91,9 @@ /^CYGWIN_OBJ *=/s/@CYGWIN_OBJ@// /^MSDOS_OBJ *=/s/= */= dosfns.o msdos.o/ /^MSDOS_SUPPORT *=/s/= */= $(MSDOS_SUPPORT_REAL)/ +/^ns_appdir *=/s/@ns_appdir@// +/^ns_appbindir *=/s/@ns_appbindir@// +/^ns_appsrc *=/s/@ns_appsrc@// /^NS_OBJ *=/s/@NS_OBJ@// /^NS_SUPPORT *=/s/@NS_SUPPORT@// /^GNU_OBJC_CFLAGS*=/s/@GNU_OBJC_CFLAGS@// === modified file 'src/ChangeLog' --- src/ChangeLog 2010-05-14 03:52:21 +0000 +++ src/ChangeLog 2010-05-14 04:23:23 +0000 @@ -5,6 +5,8 @@ 2010-05-14 Glenn Morris + * Makefile.in (ns_appdir, ns_appbindir, ns_appsrc): Always define. + * Makefile.in (mktime, X11, register): Move undefs to configure. * Makefile.in (MSDOS_OBJ): Default to empty, let msdos scripts set it. === modified file 'src/Makefile.in' --- src/Makefile.in 2010-05-14 03:36:40 +0000 +++ src/Makefile.in 2010-05-14 04:23:23 +0000 @@ -194,6 +194,9 @@ ## $MSDOS_SUPPORT_REAL if MSDOS. MSDOS_SUPPORT = +ns_appdir=@ns_appdir@/ +ns_appbindir=@ns_appbindir@/ +ns_appsrc=@ns_appsrc@ NS_OBJ=@NS_OBJ@ NS_SUPPORT=@NS_SUPPORT@ ## Next two only set if NS_IMPL_GNUSTEP. @@ -333,12 +336,6 @@ #endif /* not ORDINARY_LINK */ -#ifdef HAVE_NS -ns_appdir=@ns_appdir@/ -ns_appbindir=@ns_appbindir@/ -ns_appsrc=@ns_appsrc@ -#endif /* HAVE_NS */ - /* lastfile must follow all files whose initialized data areas should be dumped as pure by dump-emacs. */ obj= dispnew.o frame.o scroll.o xdisp.o menu.o $(XMENU_OBJ) window.o \ ------------------------------------------------------------ revno: 100274 [merge] committer: Kenichi Handa branch nick: trunk timestamp: Fri 2010-05-14 12:53:22 +0900 message: font.c (font_range): Return the range for the font found at first. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-05-14 03:36:40 +0000 +++ src/ChangeLog 2010-05-14 03:52:21 +0000 @@ -1,3 +1,8 @@ +2010-05-14 Kenichi Handa + + * font.c (font_range): Return the range for the font found at + first. + 2010-05-14 Glenn Morris * Makefile.in (mktime, X11, register): Move undefs to configure. === modified file 'src/font.c' --- src/font.c 2010-04-20 17:17:29 +0000 +++ src/font.c 2010-05-14 03:47:38 +0000 @@ -3961,7 +3961,7 @@ struct face *face; Lisp_Object string; { - EMACS_INT pos_byte, ignore, start, start_byte; + EMACS_INT pos_byte, ignore; int c; Lisp_Object font_object = Qnil; @@ -3983,7 +3983,6 @@ pos_byte = string_char_to_byte (string, pos); } - start = pos, start_byte = pos_byte; while (pos < *limit) { Lisp_Object category; @@ -3992,6 +3991,10 @@ FETCH_CHAR_ADVANCE_NO_CHECK (c, pos, pos_byte); else FETCH_STRING_CHAR_ADVANCE_NO_CHECK (c, string, pos, pos_byte); + category = CHAR_TABLE_REF (Vunicode_category_table, c); + if (EQ (category, QCf) + || CHAR_VARIATION_SELECTOR_P (c)) + continue; if (NILP (font_object)) { font_object = font_for_char (face, c, pos - 1, string); @@ -3999,40 +4002,8 @@ return Qnil; continue; } - - category = CHAR_TABLE_REF (Vunicode_category_table, c); - if (! EQ (category, QCf) - && ! CHAR_VARIATION_SELECTOR_P (c) - && font_encode_char (font_object, c) == FONT_INVALID_CODE) - { - Lisp_Object f = font_for_char (face, c, pos - 1, string); - EMACS_INT i, i_byte; - - - if (NILP (f)) - { - *limit = pos - 1; - return font_object; - } - i = start, i_byte = start_byte; - while (i < pos - 1) - { - - if (NILP (string)) - FETCH_CHAR_ADVANCE_NO_CHECK (c, i, i_byte); - else - FETCH_STRING_CHAR_ADVANCE_NO_CHECK (c, string, i, i_byte); - category = CHAR_TABLE_REF (Vunicode_category_table, c); - if (! EQ (category, QCf) - && ! CHAR_VARIATION_SELECTOR_P (c) - && font_encode_char (f, c) == FONT_INVALID_CODE) - { - *limit = pos - 1; - return font_object; - } - } - font_object = f; - } + if (font_encode_char (font_object, c) == FONT_INVALID_CODE) + *limit = pos - 1; } return font_object; } ------------------------------------------------------------ Use --include-merges or -n0 to see merged revisions.