Anonymous avatar Anonymous committed 83f7468

Patches from Yoshiki & Karl H.

Comments (0)

Files changed (4)

+2000-12-06  Karl M. Hegbloom  <karlheg@debian.org>
+
+	* shell.el (shell): Return the buffer so callers may use it.
+
+2000-12-04  Yoshiki Hayashi  <yoshiki@xemacs.org>
+
+	* case-table.el: Use new API when available.
+
+2000-12-04  Yoshiki Hayashi  <yoshiki@xemacs.org>
+
+	* case-table.el: Use new API when available.
+
 2000-11-09  Volker Franz <volker.franz@tuebingen.mpg.de>
 
 	* comint.el (comint-send-input): Extracted function
   "Describe the case table of the current buffer."
   (interactive)
   (let ((buffer (current-buffer))
-	(ch 0))
+	(i 0)
+	ch)
     (with-displaying-help-buffer
      (lambda ()
        (set-buffer standard-output)
-       (while (< ch 256)
-	 (cond ((/= ch (downcase ch buffer))
+       (while (< i 256)
+	 (setq ch (int-to-char i))
+	 (cond ((eq (upcase ch) (downcase ch))
+		nil)
+	       ((eq ch (downcase ch buffer))
 		(insert (text-char-description ch))
 		(indent-to 16)
 		(insert "uppercase, matches "
 			(text-char-description (downcase ch))
 			"\n"))
-	       ((/= ch (upcase ch buffer))
+	       ((eq ch (upcase ch buffer))
 		(insert (text-char-description ch))
 		(indent-to 16)
 		(insert "lowercase, matches "
 	       ;;	       (indent-to 16)
 	       ;;	       (insert "case-invariant\n"))
 	       )
-	 (setq ch (1+ ch)))))))
+	 (setq i (1+ i)))))))
 
 (defun invert-case (count)
   "Change the case of the character just after point and move over it.
 
 (defun set-case-syntax-delims (l r table)
   "Make characters L and R a matching pair of non-case-converting delimiters.
-Sets the entries for L and R in standard-case-table,
+TABLE is a case-table object.
+Sets the entries for L and R in TABLE,
 standard-syntax-table, and text-mode-syntax-table to indicate
 left and right delimiters."
-  (aset (car table) l l)
-  (aset (car table) r r)
+  (if (functionp 'put-case-table-pair)
+      (progn
+	(put-case-table-pair l l table)
+	(put-case-table-pair r r table))
+    (aset (car table) l l)
+    (aset (car table) r r))
   (modify-syntax-entry l (concat "(" (char-to-string r) "  ")
 		       (standard-syntax-table))
   (modify-syntax-entry l (concat "(" (char-to-string r) "  ")
 
 (defun set-case-syntax-pair (uc lc table)
   "Make characters UC and LC a pair of inter-case-converting letters.
+TABLE is a case-table object.
 Sets the entries for characters UC and LC in
-standard-case-table, standard-syntax-table, and
+TABLE, standard-syntax-table, and
 text-mode-syntax-table to indicate an (uppercase, lowercase)
 pair of letters."
-  (aset (car table) uc lc)
+  (if (functionp 'put-case-table-pair)
+      (put-case-table-pair uc lc table)
+    (aset (car table) uc lc))
   (modify-syntax-entry lc "w   " (standard-syntax-table))
   (modify-syntax-entry lc "w   " text-mode-syntax-table)
   (modify-syntax-entry uc "w   " (standard-syntax-table))
 
 (defun set-case-syntax (c syntax table)
   "Make characters C case-invariant with syntax SYNTAX.
-Sets the entries for character C in standard-case-table,
+TABLE is a case-table object.
+Sets the entries for character C in TABLE,
 standard-syntax-table, and text-mode-syntax-table to indicate this.
 SYNTAX should be \" \", \"w\", \".\" or \"_\"."
-  (aset (car table) c c)
+  (if (functionp 'put-case-table-pair)
+      (put-case-table-pair c c table)
+    (aset (car table) c c))
   (modify-syntax-entry c syntax (standard-syntax-table))
   (modify-syntax-entry c syntax text-mode-syntax-table))
 
 
 ;; Written by Howard Gayle.  See case-table.el for details.
 
+;; This file exists for backward compatibility.
 ;;; Code:
 
-(require 'case-table)
-
-(let ((downcase (standard-case-table)))
-  (set-case-syntax 160 " " downcase)	; NBSP (no-break space)
-  (set-case-syntax 161 "." downcase)	; inverted exclamation mark
-  (set-case-syntax 162 "w" downcase)	; cent sign
-  (set-case-syntax 163 "w" downcase)	; pound sign
-  (set-case-syntax 164 "w" downcase)	; general currency sign
-  (set-case-syntax 165 "w" downcase)	; yen sign
-  (set-case-syntax 166 "_" downcase)	; broken vertical line
-  (set-case-syntax 167 "w" downcase)	; section sign
-  (set-case-syntax 168 "w" downcase)	; diaeresis
-  (set-case-syntax 169 "_" downcase)	; copyright sign
-  (set-case-syntax 170 "w" downcase)	; ordinal indicator, feminine
-  (set-case-syntax-delims 171 187 downcase) ; angle quotation marks
-  (set-case-syntax 172 "_" downcase)	; not sign
-  (set-case-syntax 173 "_" downcase)	; soft hyphen
-  (set-case-syntax 174 "_" downcase)	; registered sign
-  (set-case-syntax 175 "w" downcase)	; macron
-  (set-case-syntax 176 "_" downcase)	; degree sign
-  (set-case-syntax 177 "_" downcase)	; plus or minus sign
-  (set-case-syntax 178 "w" downcase)	; superscript two
-  (set-case-syntax 179 "w" downcase)	; superscript three
-  (set-case-syntax 180 "w" downcase)	; acute accent
-  (set-case-syntax 181 "_" downcase)	; micro sign
-  (set-case-syntax 182 "w" downcase)	; pilcrow
-  (set-case-syntax 183 "_" downcase)	; middle dot
-  (set-case-syntax 184 "w" downcase)	; cedilla
-  (set-case-syntax 185 "w" downcase)	; superscript one
-  (set-case-syntax 186 "w" downcase)	; ordinal indicator, masculine
-  ;;    	       	      187          ; See 171 above.
-  (set-case-syntax 188 "_" downcase)	; fraction one-quarter
-  (set-case-syntax 189 "_" downcase)	; fraction one-half
-  (set-case-syntax 190 "_" downcase)	; fraction three-quarters
-  (set-case-syntax 191 "." downcase)	; inverted question mark
-  (set-case-syntax-pair 192 224 downcase) ; A with grave accent
-  (set-case-syntax-pair 193 225 downcase) ; A with acute accent
-  (set-case-syntax-pair 194 226 downcase) ; A with circumflex accent
-  (set-case-syntax-pair 195 227 downcase) ; A with tilde
-  (set-case-syntax-pair 196 228 downcase) ; A with diaeresis or umlaut mark
-  (set-case-syntax-pair 197 229 downcase) ; A with ring
-  (set-case-syntax-pair 198 230 downcase) ; AE diphthong
-  (set-case-syntax-pair 199 231 downcase) ; C with cedilla
-  (set-case-syntax-pair 200 232 downcase) ; E with grave accent
-  (set-case-syntax-pair 201 233 downcase) ; E with acute accent
-  (set-case-syntax-pair 202 234 downcase) ; E with circumflex accent
-  (set-case-syntax-pair 203 235 downcase) ; E with diaeresis or umlaut mark
-  (set-case-syntax-pair 204 236 downcase) ; I with grave accent
-  (set-case-syntax-pair 205 237 downcase) ; I with acute accent
-  (set-case-syntax-pair 206 238 downcase) ; I with circumflex accent
-  (set-case-syntax-pair 207 239 downcase) ; I with diaeresis or umlaut mark
-  (set-case-syntax-pair 208 240 downcase) ; D with stroke, Icelandic eth
-  (set-case-syntax-pair 209 241 downcase) ; N with tilde
-  (set-case-syntax-pair 210 242 downcase) ; O with grave accent
-  (set-case-syntax-pair 211 243 downcase) ; O with acute accent
-  (set-case-syntax-pair 212 244 downcase) ; O with circumflex accent
-  (set-case-syntax-pair 213 245 downcase) ; O with tilde
-  (set-case-syntax-pair 214 246 downcase) ; O with diaeresis or umlaut mark
-  (set-case-syntax 215 "_" downcase)	; multiplication sign
-  (set-case-syntax-pair 216 248 downcase) ; O with slash
-  (set-case-syntax-pair 217 249 downcase) ; U with grave accent
-  (set-case-syntax-pair 218 250 downcase) ; U with acute accent
-  (set-case-syntax-pair 219 251 downcase) ; U with circumflex accent
-  (set-case-syntax-pair 220 252 downcase) ; U with diaeresis or umlaut mark
-  (set-case-syntax-pair 221 253 downcase) ; Y with acute accent
-  (set-case-syntax-pair 222 254 downcase) ; thorn, Icelandic
-  (set-case-syntax 223 "w" downcase)	; small sharp s, German
-  (set-case-syntax 247 "_" downcase)	; division sign
-  (set-case-syntax 255 "w" downcase)	; small y with diaeresis or umlaut mark
-  (set-standard-case-table downcase)
-)
-
+(require 'iso8859-1)
 (provide 'iso-syntax)
 
 ;;; iso-syntax.el ends here
 					       (symbol-value xargs-name)
 					     '("-i")))))
 	   (shell-mode))))
-  (pop-to-buffer buffer)
-  (if shell-multiple-shells
-      (rename-buffer (generate-new-buffer-name "*shell*")))
-  ))
+  (prog1
+      buffer
+    (pop-to-buffer buffer)
+    (if shell-multiple-shells
+	(rename-buffer (generate-new-buffer-name "*shell*"))))))
 
 ;;; Don't do this when shell.el is loaded, only while dumping.
 ;;;###autoload (add-hook 'same-window-buffer-names "*shell*")
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.