emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/m-buffer 7dc326288e 065/115: Documentation now orgified


From: ELPA Syncer
Subject: [elpa] externals/m-buffer 7dc326288e 065/115: Documentation now orgified.
Date: Tue, 19 Jul 2022 15:58:49 -0400 (EDT)

branch: externals/m-buffer
commit 7dc326288ec2b450e0649125ca17cd63a48c07f6
Author: Phillip Lord <phillip.lord@newcastle.ac.uk>
Commit: Phillip Lord <phillip.lord@newcastle.ac.uk>

    Documentation now orgified.
    
    The m-buffer files now function well with lentic.
---
 m-buffer-at.el    | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++--
 m-buffer-macro.el | 39 +++++++++++++++++++++++++++++++++----
 m-buffer.el       | 30 +++++++++++++++++-----------
 3 files changed, 110 insertions(+), 17 deletions(-)

diff --git a/m-buffer-at.el b/m-buffer-at.el
index f427e676a8..7d591e47c2 100644
--- a/m-buffer-at.el
+++ b/m-buffer-at.el
@@ -1,7 +1,53 @@
-;; Return information at location.
-;; Stateless version of emacs code
+;;; m-buffer-at.el --- Stateless point functions -*- lexical-binding: t -*-
+
+;;; Header:
+
+;; This file is not part of Emacs
+
+;; The contents of this file are subject to the GPL License, Version 3.0.
+
+;; Copyright (C) 2014, Phillip Lord, Newcastle University
+
+;; This program 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.
+
+;; This program 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 this program.  If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; Provides stateless equivalents to many core Emacs functions, that provide
+;; information about a buffer. Most of these functions take either a buffer as
+;; a parameter or a location, which is either a marker (with a non-nil buffer
+;; and location) or a buffer and integer.
+
+;; These functions are generally competitive with the originals in terms of
+;; speed.
+
+;;; Status:
+
+;; There are lots more to do, but the interface should be stable.
+
+;;; Code:
+
+;; #+begin_src emacs-lisp
+
 (require 'm-buffer-macro)
 
+(defun m-buffer-point (buffer)
+  "Return the location of point in BUFFER.
+See also `point'."
+  (with-current-buffer
+      buffer
+    (point)))
+
 (defun m-buffer-at-eolp (&rest location)
   "Return t if LOCATION is at the end of a line.
 See also `eolp'."
@@ -17,13 +63,21 @@ See also `bolp'"
     (bolp)))
 
 (defun m-buffer-at-line-beginning-position (&rest location)
+  "Return the start of the line of LOCATION."
   (m-buffer-with-current-location
       location
     (line-beginning-position)))
 
 (defun m-buffer-at-line-end-position (&rest location)
+  "REturn the end of the line of LOCATION."
   (m-buffer-with-current-location
       location
     (line-end-position)))
 
 (provide 'm-buffer-at)
+
+;; #+end_src
+
+(provide 'm-buffer-at)
+
+;;; m-buffer-at.el ends here
diff --git a/m-buffer-macro.el b/m-buffer-macro.el
index 253b6e601c..711c81b298 100644
--- a/m-buffer-macro.el
+++ b/m-buffer-macro.el
@@ -1,11 +1,39 @@
-;;
-;; Macro Support
-;;
+;;; m-buffer-macro.el --- Stateless point functions -*- lexical-binding: t -*-
+
+;;; Header:
+
+;; This file is not part of Emacs
+
+;; The contents of this file are subject to the GPL License, Version 3.0.
+
+;; Copyright (C) 2014, Phillip Lord, Newcastle University
+
+;; This program 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.
+
+;; This program 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 this program.  If not, see <http://www.gnu.org/licenses/>.
+
+;; #+begin_src emacs-lisp
+
+;;; Commentary:
+
+;; Macro support for markers with post-cleanup.
+
+;;; Code:
+
 (defmacro m-buffer-with-markers (varlist &rest body)
   "Bind variables after VARLIST then eval BODY.
 All variables should contain markers or collections of markers.
 All markers are niled after BODY."
-  ;; indent let part specially.
+  ;; indent let part specially, and debug like let
   (declare (indent 1)(debug let))
   ;; so, create a rtn var with make-symbol (for hygene)
   (let* ((rtn-var (make-symbol "rtn-var"))
@@ -66,3 +94,6 @@ If a two element, it is a buffer and position."
 
 
 (provide 'm-buffer-macro)
+;; #+end_src
+
+;;; m-buffer-macro.el ends here
diff --git a/m-buffer.el b/m-buffer.el
index 9899f171a5..b253ef7221 100644
--- a/m-buffer.el
+++ b/m-buffer.el
@@ -1,5 +1,7 @@
 ;;; m-buffer.el --- List-Oriented, Functional Buffer Manipulation -*- 
lexical-binding: t -*-
 
+;;; Header:
+
 ;; This file is not part of Emacs
 
 ;; Author: Phillip Lord <phillip.lord@newcastle.ac.uk>
@@ -8,28 +10,28 @@
 ;; Package-Requires: ((dash "2.8.0")(emacs "24.3"))
 
 ;; The contents of this file are subject to the GPL License, Version 3.0.
-;;
+
 ;; Copyright (C) 2014, Phillip Lord, Newcastle University
-;;
+
 ;; This program 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.
-;;
+;; ;;
 ;; This program 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 this program.  If not, see <http://www.gnu.org/licenses/>.
 
 ;;; Commentary:
-;;
-;; This file provides a set of list orientated functions for operating over
-;; the contents of buffers. They avoid the use of looping, manipulating global
-;; state with `match-data'. Many high-level functions exist for matching
-;; sentences, lines and so on.
+
+;; This file provides a set of list-oriented functions for operating over the
+;; contents of buffers. They avoid the use of looping, manipulating global 
state
+;; with `match-data'. Many high-level functions exist for matching sentences,
+;; lines and so on.
 
 ;; Functions are generally purish: i.e. they may change the state of one
 ;; buffer by side-effect, but should not affect point, current buffer, match
@@ -41,13 +43,17 @@
 
 
 ;;; Status:
-;;
+
 ;; This library is early release at the moment. I write it become I got fed up
 ;; with writing (while (re-search-forward) do-stuff) forms. I found that it
 ;; considerably simplified writing `linked-buffer'. The API is beginning to
 ;; stablize now and should not undergo major changes.
 
 ;;; Code:
+
+
+;; #+begin_src emacs-lisp
+
 (require 'dash)
 (require 'm-buffer-macro)
 
@@ -708,4 +714,6 @@ enabled; otherwise use `m-buffer-text-property-face'."
    'font-lock-face face))
 
 (provide 'm-buffer)
-;;; m-buffer.el ends here
+;; #+end_src
+
+;; ;;; m-buffer.el ends here



reply via email to

[Prev in Thread] Current Thread [Next in Thread]