Function: describe-buffer-case-table
describe-buffer-case-table is an interactive and byte-compiled
function defined in case-table.el.gz.
Signature
(describe-buffer-case-table)
Documentation
Describe the case table of the current buffer.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/case-table.el.gz
;;; case-table.el --- code to extend the character set and support case tables -*- lexical-binding: t -*-
;; Copyright (C) 1988, 1994, 2001-2025 Free Software Foundation, Inc.
;; Author: Howard Gayle
;; Maintainer: emacs-devel@gnu.org
;; Keywords: i18n
;; Package: emacs
;; This file is part of GNU Emacs.
;; GNU Emacs is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
;;; Commentary:
;; Written by:
;; TN/ETX/TX/UMG Howard Gayle UUCP : seismo!enea!erix!howard
;; Telefonaktiebolaget L M Ericsson Phone: +46 8 719 55 65
;; Ericsson Telecom Telex: 14910 ERIC S
;; S-126 25 Stockholm FAX : +46 8 719 64 82
;; Sweden
;;; Code:
(defun describe-buffer-case-table ()
"Describe the case table of the current buffer."
(interactive)
(let ((description (make-char-table 'case-table)))
(map-char-table
(lambda (key value)
(if (not (natnump value))
(if (consp key)
(set-char-table-range description key "case-invariant")
(aset description key "case-invariant"))
(let (from to)
(if (consp key)
(setq from (car key) to (cdr key))
(setq from (setq to key)))
(while (<= from to)
(aset
description from
(cond ((/= from (downcase from))
(concat "uppercase, matches "
(char-to-string (downcase from))))
((/= from (upcase from))
(concat "lowercase, matches "
(char-to-string (upcase from))))
(t "case-invariant")))
(setq from (1+ from))))))
(current-case-table))
(save-excursion
(with-output-to-temp-buffer "*Help*"
(set-buffer standard-output)
(describe-vector description)
(help-mode)))))