diff options
| author | Yuan Fu | 2025-04-18 16:26:23 -0700 |
|---|---|---|
| committer | Yuan Fu | 2025-04-18 16:26:23 -0700 |
| commit | e09b59790eb1d7a2090f20d65549d6d98a1f415b (patch) | |
| tree | 736ada3bf8805cb3fee0207960848145ba548510 | |
| parent | f965b0d756d8a9f143c7c5d57c51939a3943617b (diff) | |
| parent | 2b535a9c7719a13ab19884cca754024003875c88 (diff) | |
| download | emacs-e09b59790eb1d7a2090f20d65549d6d98a1f415b.tar.gz emacs-e09b59790eb1d7a2090f20d65549d6d98a1f415b.zip | |
Merge from savannah/emacs-30
2b535a9c771 ; Improve documentation of some functions in files-x.el
45cf832ac75 Fix deleting the first line of calc trail
| -rw-r--r-- | lisp/calc/calc-trail.el | 9 | ||||
| -rw-r--r-- | lisp/files-x.el | 30 |
2 files changed, 25 insertions, 14 deletions
diff --git a/lisp/calc/calc-trail.el b/lisp/calc/calc-trail.el index f134a7b16b9..433d3983b12 100644 --- a/lisp/calc/calc-trail.el +++ b/lisp/calc/calc-trail.el | |||
| @@ -167,14 +167,7 @@ | |||
| 167 | (interactive "p") | 167 | (interactive "p") |
| 168 | (calc-with-trail-buffer | 168 | (calc-with-trail-buffer |
| 169 | (let ((buffer-read-only nil)) | 169 | (let ((buffer-read-only nil)) |
| 170 | (save-restriction | 170 | (kill-line n)) |
| 171 | (narrow-to-region ; don't delete "Emacs Trail" header | ||
| 172 | (save-excursion | ||
| 173 | (goto-char (point-min)) | ||
| 174 | (forward-line 1) | ||
| 175 | (point)) | ||
| 176 | (point-max)) | ||
| 177 | (kill-line n))) | ||
| 178 | (calc-trail-here))) | 171 | (calc-trail-here))) |
| 179 | 172 | ||
| 180 | (provide 'calc-trail) | 173 | (provide 'calc-trail) |
diff --git a/lisp/files-x.el b/lisp/files-x.el index ee15993978b..45159cac269 100644 --- a/lisp/files-x.el +++ b/lisp/files-x.el | |||
| @@ -159,7 +159,10 @@ is not `delete' then this function adds the first line containing the | |||
| 159 | string `Local Variables:' and the last line containing the string `End:'. | 159 | string `Local Variables:' and the last line containing the string `End:'. |
| 160 | 160 | ||
| 161 | If OP is `delete' then delete all existing settings of VARIABLE | 161 | If OP is `delete' then delete all existing settings of VARIABLE |
| 162 | from the Local Variables list ignoring the input argument VALUE." | 162 | from the Local Variables list ignoring the input argument VALUE. |
| 163 | |||
| 164 | If optional variable INTERACTIVE is non-nil, display a message telling | ||
| 165 | the user how to make the new value take effect." | ||
| 163 | (catch 'exit | 166 | (catch 'exit |
| 164 | (let ((beg (point)) end replaced-pos) | 167 | (let ((beg (point)) end replaced-pos) |
| 165 | (unless enable-local-variables | 168 | (unless enable-local-variables |
| @@ -250,7 +253,10 @@ containing the string `End:'. | |||
| 250 | 253 | ||
| 251 | For adding local variables on the first line of a file, for example | 254 | For adding local variables on the first line of a file, for example |
| 252 | for settings like `lexical-binding, which must be specified there, | 255 | for settings like `lexical-binding, which must be specified there, |
| 253 | use the `add-file-local-variable-prop-line' command instead." | 256 | use the `add-file-local-variable-prop-line' command instead. |
| 257 | |||
| 258 | If optional variable INTERACTIVE is non-nil, display a message telling | ||
| 259 | the user how to make the new value take effect." | ||
| 254 | (interactive | 260 | (interactive |
| 255 | (let ((variable (read-file-local-variable "Add file-local variable"))) | 261 | (let ((variable (read-file-local-variable "Add file-local variable"))) |
| 256 | ;; Error before reading value. | 262 | ;; Error before reading value. |
| @@ -265,7 +271,10 @@ use the `add-file-local-variable-prop-line' command instead." | |||
| 265 | 271 | ||
| 266 | ;;;###autoload | 272 | ;;;###autoload |
| 267 | (defun delete-file-local-variable (variable &optional interactive) | 273 | (defun delete-file-local-variable (variable &optional interactive) |
| 268 | "Delete all settings of file-local VARIABLE from the Local Variables list." | 274 | "Delete all settings of file-local VARIABLE from the Local Variables list. |
| 275 | |||
| 276 | If optional variable INTERACTIVE is non-nil, display a message telling | ||
| 277 | the user how to make the new value take effect." | ||
| 269 | (interactive | 278 | (interactive |
| 270 | (list (read-file-local-variable "Delete file-local variable") t)) | 279 | (list (read-file-local-variable "Delete file-local variable") t)) |
| 271 | (modify-file-local-variable variable nil 'delete interactive)) | 280 | (modify-file-local-variable variable nil 'delete interactive)) |
| @@ -281,7 +290,10 @@ If there is no -*- line at the beginning of the current file buffer | |||
| 281 | and OP is not `delete' then this function adds the -*- line. | 290 | and OP is not `delete' then this function adds the -*- line. |
| 282 | 291 | ||
| 283 | If OP is `delete' then delete all existing settings of VARIABLE | 292 | If OP is `delete' then delete all existing settings of VARIABLE |
| 284 | from the -*- line ignoring the input argument VALUE." | 293 | from the -*- line ignoring the input argument VALUE. |
| 294 | |||
| 295 | If optional variable INTERACTIVE is non-nil, display a message telling | ||
| 296 | the user how to make the new value take effect." | ||
| 285 | (catch 'exit | 297 | (catch 'exit |
| 286 | (let ((beg (point)) end replaced-pos) | 298 | (let ((beg (point)) end replaced-pos) |
| 287 | (unless enable-local-variables | 299 | (unless enable-local-variables |
| @@ -409,7 +421,10 @@ If there is no -*- line at the beginning of the current file buffer | |||
| 409 | then this function adds it. | 421 | then this function adds it. |
| 410 | 422 | ||
| 411 | To add variables to the Local Variables list at the end of the file, | 423 | To add variables to the Local Variables list at the end of the file, |
| 412 | use the `add-file-local-variable' command instead." | 424 | use the `add-file-local-variable' command instead. |
| 425 | |||
| 426 | If optional variable INTERACTIVE is non-nil, display a message telling | ||
| 427 | the user how to make the new value take effect." | ||
| 413 | (interactive | 428 | (interactive |
| 414 | (let ((variable (read-file-local-variable "Add -*- file-local variable"))) | 429 | (let ((variable (read-file-local-variable "Add -*- file-local variable"))) |
| 415 | (list variable (read-file-local-variable-value variable) t))) | 430 | (list variable (read-file-local-variable-value variable) t))) |
| @@ -417,7 +432,10 @@ use the `add-file-local-variable' command instead." | |||
| 417 | 432 | ||
| 418 | ;;;###autoload | 433 | ;;;###autoload |
| 419 | (defun delete-file-local-variable-prop-line (variable &optional interactive) | 434 | (defun delete-file-local-variable-prop-line (variable &optional interactive) |
| 420 | "Delete all settings of file-local VARIABLE from the -*- line." | 435 | "Delete all settings of file-local VARIABLE from the -*- line. |
| 436 | |||
| 437 | If optional variable INTERACTIVE is non-nil, display a message telling | ||
| 438 | the user how to make the new value take effect." | ||
| 421 | (interactive | 439 | (interactive |
| 422 | (list (read-file-local-variable "Delete -*- file-local variable") t)) | 440 | (list (read-file-local-variable "Delete -*- file-local variable") t)) |
| 423 | (modify-file-local-variable-prop-line variable nil 'delete interactive)) | 441 | (modify-file-local-variable-prop-line variable nil 'delete interactive)) |